Oops. One should not drink and adb. This is the result of flashing a newer system image on a Motorola X Style (XT1572) without wiping the partition first. The system booted and appeared to have been upgraded from 6.0.0 to 6.0.1, but WiFi no longer functioned.
Digging a little further this appears to be some kind of mismatch between the WiFi driver and the firmware on the system partition. Oops again.
Luckily I was still able to back up my files to the SD card (tell your manufacturer you want expandable storage!) and reflashing a “stock” firmware image also restored my ability to use WiFi.
Stock is in quotes because annoyingly, Motorola don’t provide factory images for the Style, only the Pure – which in theory should work but I really don’t want to do something serious like mess up EFS or the radio firmware.
Therefore, I’ll have to hope that the firmware at http://dl.prazaar.de/?dir=Android/XT1572/Factory/6.0.1/MPHS24.107-58-5_September_2016 is unmodified and genuine.
One more sidenote: Flashing a factory image and relocking the bootloader doesn’t remove the annoying “bootloader was unlocked” warning when turning on the phone.