[Moto G Q&A, Help & Troubleshooting] Gache:
The wifi on my Moto G (1st Gen/XT1032) won't turn on - on stock 5.0 and 5.1, the toggle slides across and immediately slides itself back. On Cyanogenmod, the toggle is greyed out altogether.

Got a log via ADB, seems to say it can't load the wifi driver at /persist/WCNSS_qcom_wlan_factory_nv.bin.

Here's the relevant section from the log. Shows what happens when I try to toggle wifi on:

09-01 01:07:57.423 D/WifiService( 916): setWifiEnabled: true pid=3928, uid=1000
09-01 01:07:57.423 E/WifiService( 916): Invoking mWifiStateMachine.setWifiEnabled
09-01 01:07:57.434 W/Settings( 1526): Setting wifi_on has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
09-01 01:07:57.435 W/ContextImpl( 1526): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1455 android.content.ContextWrapper.sendBroadcast:376 com.motorola.motocare.internal.settings.SettingsTrigger$1.onChange:401 android.database.ContentObserver.onChange:130 android.database.ContentObserver.onChange:145
09-01 01:07:57.440 W/Settings( 1526): Setting wifi_on has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
09-01 01:07:57.440 W/ContextImpl( 1526): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1455 android.content.ContextWrapper.sendBroadcast:376 com.motorola.motocare.internal.settings.SettingsTrigger$1.onChange:401 android.database.ContentObserver.onChange:130 android.database.ContentObserver.onChange:145
09-01 01:07:57.445 E/WifiStateMachine( 916): setting operational mode to 1
09-01 01:07:57.598 D/Checkin ( 3437): publish the event [tag = MOT_DEVICE_STATS_L1 event name = SettingLogs]
09-01 01:07:57.647 W/ueventd ( 6429): type=1400 audit(0.0:5): avc: denied { read } for uid=0 name="WCNSS_qcom_wlan_factory_nv.bin" dev="mmcblk0p29" ino=12 scontext=u:r:ueventd:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
09-01 01:07:57.686 D/Checkin ( 3437): publish the event [tag = MOT_DEVICE_STATS_L1 event name = SettingLogs]
09-01 01:07:57.704 E/WifiStateMachine( 916): Failed to load driver
09-01 01:07:57.704 E/WifiStateMachine( 916): setWifiState: unknown state
09-01 01:07:57.706 I/SBar.MotoNetworkCtrlr( 1336): onReceive: WifiManager.WIFI_STATE_CHANGED_ACTION Received
09-01 01:07:57.706 I/SBar.MotoNetworkCtrlr( 1336): updateTelephonySignalStrength[0]: No service
09-01 01:07:57.709 E/WifiStateMachine( 916): setSuspendOptimizations: 2 true
09-01 01:07:57.709 E/WifiStateMachine( 916): mSuspendOptNeedsDisabled 4
09-01 01:07:57.714 W/Settings( 1526): Setting wifi_on has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
09-01 01:07:57.715 W/ContextImpl( 1526): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1455 android.content.ContextWrapper.sendBroadcast:376 com.motorola.motocare.internal.settings.SettingsTrigger$1.onChange:401 android.database.ContentObserver.onChange:130 android.database.ContentObserver.onChange:145
09-01 01:07:57.716 W/Settings( 1526): Setting wifi_on has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
09-01 01:07:57.716 W/ContextImpl( 1526): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1455 android.content.ContextWrapper.sendBroadcast:376 com.motorola.motocare.internal.settings.SettingsTrigger$1.onChange:401 android.database.ContentObserver.onChange:130 android.database.ContentObserver.onChange:145
09-01 01:07:57.727 D/Index ( 3928): Deleting data for locale 'en_GB' took 3 millis
09-01 01:07:57.732 D/Index ( 3928): Indexing locale 'en_GB' took 5 millis
09-01 01:07:57.867 D/Checkin ( 3437): publish the event [tag = MOT_DEVICE_STATS_L1 event name = SettingLogs]
09-01 01:07:57.957 D/Checkin ( 3437): publish the event [tag = MOT_DEVICE_STATS_L1 event name = SettingLogs]

I think this is the critical item, seems to say it can't read the file?

09-01 01:07:57.647 W/ueventd ( 6429): type=1400 audit(0.0:5): avc: denied { read } for uid=0 name="WCNSS_qcom_wlan_factory_nv.bin" dev="mmcblk0p29" ino=12 scontext=u:r:ueventd:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0

I've tried replacing the file (in case it was corrupted) and also setting permissions to 777. Neither change helps!

I don't know what else might cause it to be unable to load the wifi driver. Can anyone who know more than me ;) offer any suggestions?