[Moto X Android Development] Mike7143:
Here's the steps I did in the below log:

1. Booted phone up from off state

2. Went to app drawer>settings>wifi and tried to turn wifi on (turns off immediately/doesn't work)

3. Plugged phone into computer

4. Used ADB to get root and then save logcat

5. Pulled logcat to computer

When I search the log for WifiStateMachine I see entries and some error about failed to load driver. Full logcat.log attached.

D/WifiP2pService( 932): Full connection with WifiStateMachine established
E/WifiStateMachine( 932): BOOT COMPLETE RX'd
E/WifiStateMachine( 932): Boot is complete! - processing initializeCountryDetectorAndCheckCountry
E/WifiStateMachine( 932): Boot is complete! - processing initializeCountryDetectorAndCheckCountry
E/WifiStateMachine( 932): need to initialize CountryDetector
E/WifiStateMachine( 932): APM OFF
E/WifiStateMachine( 932): CountryDetector initialized - checking
E/WifiStateMachine( 932): Country detected via CountryDetector - Country {ISO=US, source=3, time=62404}
E/WifiStateMachine( 932): Country code flush interval not set - FLUSH at 1490307833511
D/WifiService( 932): setWifiEnabled: true pid=2337, uid=1000
E/WifiService( 932): Invoking mWifiStateMachine.setWifiEnabled
E/WifiStateMachine( 932): setting operational mode to 1
E/WifiStateMachine( 932): Failed to load driver
E/WifiStateMachine( 932): setWifiState: unknown state
E/WifiStateMachine( 932): setSuspendOptimizations: 2 true
E/WifiStateMachine( 932): mSuspendOptNeedsDisabled 0
I/MotoNetwCtrlr( 1072): onReceive: Received intent=Intent { act=android.net.wifi.WIFI_STATE_CHANGED flg=0x4000010 (has extras) } Action=android.net.wifi.WIFI_STATE_CHANGED
I/MotoNetwCtrlr.MotoWifiSignalCtrlr( 1072): handleBroadcast: Entered: Intent=Intent { act=android.net.wifi.WIFI_STATE_CHANGED flg=0x4000010 (has extras) } Action=android.net.wifi.WIFI_STATE_CHANGED
I/MotoNetwCtrlr.MotorolaWifiSignalController( 1072): isDirty: returns false
I/MotoNetwCtrlr.MotoWifiSignalCtrlr( 1072): handleBroadcast: Completed
I/MotoNetwCtrlr( 1072): onReceive: Completed intent=Intent { act=android.net.wifi.WIFI_STATE_CHANGED flg=0x4000010 (has extras) } Action=android.net.wifi.WIFI_STATE_CHANGED
I/art ( 932): Explicit concurrent mark sweep GC freed 23233(1013KB) AllocSpace objects, 2(32KB) LOS objects, 33% free, 19MB/29MB, paused 1.831ms total 159.591ms

And here's what I get when I try using insmod wlan.ko and lsmod wlan.ko:

1|root@ghost:/mnt/sdcard # cd /system/lib/modules
cd /system/lib/modules
root@ghost:/system/lib/modules # insmod wlan.ko
insmod wlan.ko
insmod: init_module 'wlan.ko' failed (No such file or directory)
255|root@ghost:/system/lib/modules # lsmod wlan.ko
lsmod wlan.ko
root@ghost:/system/lib/modules # logcat -d > /mnt/sdcard/logcat2.log

Again, I have the wlan.ko file that was created during the compile, renamed it prima_wlan.ko, put it in system/lib/modules/prima, changed it's permissions to 644, and then made a link in system/lib/modules named wlan.ko that points to system/lib/modules/prima/prima_wlan.ko.

Regarding the defconfigs in arc/arm/configs I don't see anything in the source for this kernel on github that's msm8960dt, just msm8960, msm8960-perf, and full_msm8960-perf.

So, any ideas on where to go with the Wi-Fi.

Thanks for helping me out so far too by the way, much appreciated! I know this device is past its prime...