Closed adam-lee closed 11 years ago
Externel kernel modules seem to be getting built either by the wrong version of cross-compiler or with wrong compile flags:
E/WifiStateMachine( 325): Failed to load driver
shell@pepper:/ $ [ 36.082183] warning: `zygote' uses 32-bit capabilities (legacy support in use)
[ 45.058135] request_suspend_state: wakeup (3->0) at 44985085277 (2000-01-01 00:13:44.104370274 UTC)
[ 49.842407] net eth0: CPSW phy found : id is : 0x221611
[ 49.854187] PHY 0:01 not found
[ 49.876403] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 50.443023] sd8xxx: Unknown symbol cfg80211_sched_scan_results (err 0)
[ 50.455688] sd8xxx: Unknown symbol cfg80211_scan_done (err 0)
[ 50.473419] sd8xxx: Unknown symbol cfg80211_sched_scan_stopped (err 0)
[ 50.496520] sd8xxx: Unknown symbol cfg80211_remain_on_channel_expired (err 0)
[ 50.523468] sd8xxx: Unknown symbol regulatory_hint (err 0)
[ 50.531768] sd8xxx: Unknown symbol cfg80211_new_sta (err 0)
[ 50.562774] sd8xxx: Unknown symbol cfg80211_disconnected (err 0)
[ 50.586029] sd8xxx: Unknown symbol cfg80211_ready_on_channel (err 0)
[ 50.604553] sd8xxx: Unknown symbol wiphy_register (err 0)
[ 50.610260] sd8xxx: Unknown symbol wiphy_new (err 0)
[ 50.648864] sd8xxx: Unknown symbol cfg80211_put_bss (err 0)
[ 50.664367] sd8xxx: Unknown symbol cfg80211_roamed (err 0)
[ 50.679840] sd8xxx: Unknown symbol cfg80211_inform_bss (err 0)
[ 50.697753] acc_open
[ 50.700103] acc_release
[ 50.711853] sd8xxx: Unknown symbol ieee80211_bss_get_ie (err 0)
[ 50.737518] sd8xxx: Unknown symbol cfg80211_ibss_joined (err 0)
[ 50.757476] sd8xxx: Unknown symbol cfg80211_michael_mic_failure (err 0)
[ 50.783386] sd8xxx: Unknown symbol cfg80211_connect_result (err 0)
[ 50.806762] sd8xxx: Unknown symbol wiphy_unregister (err 0)
[ 50.831665] sd8xxx: Unknown symbol cfg80211_get_bss (err 0)
[ 50.847961] sd8xxx: Unknown symbol __ieee80211_get_channel (err 0)
[ 50.863494] sd8xxx: Unknown symbol cfg80211_mgmt_tx_status (err 0)
[ 50.880187] sd8xxx: Unknown symbol cfg80211_del_sta (err 0)
[ 50.890197] sd8xxx: Unknown symbol ieee80211_channel_to_frequency (err 0)
[ 50.902587] sd8xxx: Unknown symbol cfg80211_rx_mgmt (err 0)
[ 50.910583] sd8xxx: Unknown symbol ieee80211_frequency_to_channel (err 0)
[ 50.918121] sd8xxx: Unknown symbol woal_set_radio (err 0)
[ 50.924591] sd8xxx: Unknown symbol cfg80211_unlink_bss (err 0)
[ 50.930938] sd8xxx: Unknown symbol wiphy_free (err 0)
With gcc version set to arm-eabi-4.7 from arm-eabi-4.6 in the driver make file:
[ 12.345886] Bluetooth: RFCOMM TTY layer initialized
[ 12.352203] Bluetooth: RFCOMM socket layer initialized
[ 12.359649] Bluetooth: RFCOMM ver 1.11
[ 12.363647] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 12.369262] Bluetooth: BNEP filters: protocol multicast
[ 12.374816] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 12.381378] lib80211: common routines for IEEE802.11 drivers
[ 12.387390] Registering the dns_resolver key type
[ 12.392425] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 12.400543] ThumbEE CPU extension supported.
[ 12.405212] mux: Failed to setup hwmod io irq -22
[ 12.412872] Power Management for AM33XX family
[ 12.417877] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[ 12.424652] Copied the M3 firmware to UMEM
[ 12.429046] Cortex M3 Firmware Version = 0x181
[ 12.451477] mmc2: new high speed SDIO card at address 0001
[ 12.458129] clock: disabling unused clocks to save power
[ 12.467620] Detected MACID=0:18:31:e1:24:97
[ 12.476226] input: gpio-keys as /devices/platform/gpio-keys/input/input1
[ 12.484222] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:07:30 UTC (946685250)
[ 12.494506] Freeing init memory: 400K
[ 12.503326] SELinux: Could not mount selinuxfs: No such device
[ 12.514221] init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
[ 12.671264] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 12.984893] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=panic
[ 13.026031] EXT4-fs (mmcblk0p4): recovery complete
[ 13.032470] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=panic
[ 13.233337] init: cannot find '/system/bin/rild', disabling 'ril-daemon'
[ 13.310974] init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
[ 13.401397] android_usb: already disabled
[ 13.461791] adb_bind_config
[ 13.499267] adb_bind_config
[ 13.550933] adb_open
[ 13.616699] Disabling lock debugging due to kernel taint
[ 13.916046] android_work: sent uevent USB_STATE=CONNECTED
[ 13.921813] android_work: sent uevent USB_STATE=DISCONNECTED
[ 14.005035] android_work: sent uevent USB_STATE=CONNECTED
[ 14.011199] gadget: high-speed config #1: android
[ 14.027648] android_work: sent uevent USB_STATE=CONFIGURED
**[ 16.212768] mwifiex_sdio mmc2:0001:1: WLAN FW is active
[ 16.411346] mwifiex_sdio mmc2:0001:1: driver_version = mwifiex 1.0 (14.66.35.p16) **
[ 16.429321] Bluetooth: vendor=0x2df, device=0x911a, class=255, fn=2
[ 36.631195] warning: `zygote' uses 32-bit capabilities (legacy support in use)
[ 44.236083] request_suspend_state: wakeup (3->0) at 44161450347 (2000-01-01 00:08:02.237691942 UTC)
[ 46.964141] net eth0: CPSW phy found : id is : 0x221611
[ 46.978790] PHY 0:01 not found
[ 47.005157] ADDRCONF(NETDEV_UP): eth0: link is not ready
**[ 48.553558] sd8xxx: Unknown symbol woal_set_radio (err 0)**
[ 49.774902] acc_open
[ 49.777252] acc_release
This is different from (previous) [http://pastebin.com/ujkdnxBe]. Note I also used the .bin that is slightly newer.
At compile time:
WARNING: "woal_set_radio" [/mnt/pepper2/hardware/ti/marvell/wlan_src/sd8xxx.ko] undefined!
This could be due to a macro not getting defined
marvell/wlan_src/mlinux/moal_wext.c:3120
#ifdef STA_SUPPORT
int woal_set_radio(moal_private * priv, t_u8 option)
{
...
}
STA_SUPPORT is defined. Explicit definition at the top of moal_wext.c will give a lot of warnings about duplicate definitions, with the same undefined warning at the end.
CONFIG_WEXT_PRIV is not enabled in the Kernel config. HOSTAP had to be enabled as a dependency. Now the driver compiles with no warning.
Kernel modules are running, and wpa_supplicant attempts to bring up the interface. The device mlan is missing however.
D/wpa_supplicant( 429): Could not open file /sys/class/net/mlan0/phy80211/name: No such file or directory
E/wpa_supplicant( 429): Could not read interface mlan0 flags: No such device
E/wpa_supplicant( 429): mlan0: Failed to initialize driver interface
D/wpa_supplicant( 429): Failed to add interface mlan0
D/wpa_supplicant( 429): mlan0: Cancelling scan request
D/wpa_supplicant( 429): mlan0: P2P: Station mode scan operation not pending anymore (sta_scan_pending=0 p2p_cb_on_scan_complete=0)
D/wpa_supplicant( 429): mlan0: Cancelling authentication timeout
<1>[ 44.611661] wlan: Loading MWLAN driver
<1>[ 44.628136] vendor=0x02DF device=0x9119 class=0 function=1
<4>[ 44.695429] WLAN FW already running! Skip FW download
<1>[ 44.704481] WLAN FW is active
<6>[ 44.772508] acc_open
<6>[ 44.774872] acc_release
<1>[ 45.002076] wlan: Driver loaded successfully
<1>[ 49.006781] fun0: reg 0x05=0x02 ret=0
<1>[ 49.010729] fun0: reg 0x04=0x02 ret=0
<1>[ 49.014636] fun1: reg 0x03=0x02 ret=0
<1>[ 49.018565] fun1: reg 0x04=0x02 ret=0
<1>[ 49.022439] fun1: reg 0x05=0x02 ret=0
<1>[ 49.026326] fun1: reg 0x60=0x02 ret=0
<1>[ 49.030236] fun1: reg 0x61=0x02 ret=0
<4>[ 49.034105] moal_read_data_sync: read registers failed
<1>[ 51.324346] fun0: reg 0x05=0x00 ret=0
<1>[ 51.328287] fun0: reg 0x04=0x00 ret=0
<1>[ 51.332186] fun1: reg 0x03=0x00 ret=0
<1>[ 51.336072] fun1: reg 0x04=0x00 ret=0
<1>[ 51.339981] fun1: reg 0x05=0x00 ret=0
<1>[ 51.343864] fun1: reg 0x60=0x00 ret=0
<1>[ 51.347745] fun1: reg 0x61=0x00 ret=0
<4>[ 51.351628] moal_read_data_sync: read registers failed
root@pepper:/ # lsmod
sd8xxx 330858 0 - Live 0x00000000 (O)
mlan 281359 1 sd8xxx, Live 0x00000000 (O)
omaplfb 13216 0 - Live 0x00000000 (O)
pvrsrvkm 187704 45 omaplfb, Live 0x00000000 (O)
root@pepper:/ #
WPA Supplicant is successfully initializing after I aligned the device names to wlan0 in a number of places. Getting close, but RFKill is not working
D/SoftapController( 78): Softap fwReload - Ok
D/CommandListener( 78): Setting iface cfg
D/CommandListener( 78): Trying to bring down wlan0
E/BluetoothAdapter( 589): Bluetooth binder is null
D/wpa_supplicant( 1110): wpa_supplicant v2.1-devel-4.3
D/wpa_supplicant( 1110): random: Trying to read entropy from /dev/random
I/wpa_supplicant( 1110): Successfully initialized wpa_supplicant
D/wpa_supplicant( 1110): Initializing interface 'wlan0' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
D/wpa_supplicant( 1110): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 1110): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 1110): update_config=1
D/wpa_supplicant( 1110): ctrl_interface='DIR=/data/misc/wifi/sockets/wlan0'
D/wpa_supplicant( 1110): ap_scan=1
D/wpa_supplicant( 1110): fast_reauth=1
D/wpa_supplicant( 1110): nl80211: interface wlan0 in phy mwiphy0
I/wpa_supplicant( 1110): rfkill: Cannot open RFKILL control device
D/wpa_supplicant( 1110): nl80211: RFKILL status not available
D/wpa_supplicant( 1110): nl80211: Set mode ifindex 4 iftype 2 (STATION)
D/wpa_supplicant( 1110): nl80211: Subscribe to mgmt frames with non-AP handle 0x41ca7740
D/wpa_supplicant( 1110): nl80211: Register frame type=0xd0 nl_handle=0x41ca7740
D/wpa_supplicant( 1110): nl80211: Register frame match - hexdump(len=2): 04 0a
D/wpa_supplicant( 1110): nl80211: Register frame type=0xd0 nl_handle=0x41ca7740
D/wpa_supplicant( 1110): nl80211: Register frame match - hexdump(len=2): 04 0b
D/wpa_supplicant( 1110): nl80211: Register frame type=0xd0 nl_handle=0x41ca7740
D/wpa_supplicant( 1110): nl80211: Register frame match - hexdump(len=2): 04 0c
D/wpa_supplicant( 1110): nl80211: Register frame type=0xd0 nl_handle=0x41ca7740
D/wpa_supplicant( 1110): nl80211: Register frame match - hexdump(len=2): 04 0d
D/wpa_supplicant( 1110): nl80211: Register frame type=0xd0 nl_handle=0x41ca7740
D/wpa_supplicant( 1110): nl80211: Register frame match - hexdump(len=6): 04 09 50 6f 9a 09
D/wpa_supplicant( 1110): nl80211: Register frame type=0xd0 nl_handle=0x41ca7740
D/wpa_supplicant( 1110): nl80211: Register frame match - hexdump(len=5): 7f 50 6f 9a 09
D/wpa_supplicant( 1110): nl80211: Register frame type=0xd0 nl_handle=0x41ca7740
D/wpa_supplicant( 1110): nl80211: Register frame match - hexdump(len=1): 06
D/wpa_supplicant( 1110): nl80211: Register frame type=0xd0 nl_handle=0x41ca7740
D/wpa_supplicant( 1110): nl80211: Register frame match - hexdump(len=2): 0a 07
D/wpa_supplicant( 1110): nl80211: Register frame type=0xd0 nl_handle=0x41ca7740
D/wpa_supplicant( 1110): nl80211: Register frame match - hexdump(len=2): 0a 11
Also main socket is showing up:
root@pepper:/data/misc/wifi/sockets # ls
wlan0
wpa_ctrl_326-47
wpa_ctrl_326-48
root@pepper:/data/misc/wifi/sockets # cd wlan0/
root@pepper:/data/misc/wifi/sockets/wlan0 # ls
wlan0
Fixed with the following commits. More to come.
Also need to edit some files
In short, bluetooth is disabled in the kernel configuration. RFKill works as-is, and the device name did not have to be changed after all (stays as mlan0).
-CONFIG_BT=y
-CONFIG_BT_L2CAP=y
-CONFIG_BT_SCO=y
-CONFIG_BT_RFCOMM=y
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=y
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_HIDP=y
Full diff here
Currently SD8787 wifi driver doesn't properly load. Android (at user space level) is not able to set an operation mode. Initially I thought the network manager was incompatible with the driver, but re-reading this thread I may just have incorrect configuration.