Hi Angelo and Nikolaj,
I am working to bring up WiFi on a custom board made out of IMX6UL. It has the WiFi module SN8000 connected to USDHC2, two GPIOs, each connected to RST_N and VDD_3V3_EN of the WiFi module. VDD_BAT is coming from external regulator and VDD_IO is coming from the source. Using kernel 4.1.15.
I have the following structure in the .dts file as I am using the BCMDHD as a module. (Included both BCMDHD, BRCMFMAC as modules in the menuconfig)
bcmdhd_wlan_0: bcmdhd_wlan@0 {
compatible = "android,bcmdhd_wlan";
wlreg_on-supply = <&wlreg_on>;
};
Once I insert the module bcmdhd.ko I could get the wlan0 interface enabled with a proper MAC address.
insmod /lib/modules/4.1.15-1.1.1+g1881fb8/kernel/drivers/net/wireless/bcmdhd/bcmdhd.ko \
firmware_path=/lib/firmware/brcm/brcmfmac43362-sdio.bin \
nvram_path=/lib/firmware/brcm/brcmfmac43362-sdio.txt
But in the later steps when I give the command ifup wlan0 or ifconfig wlan0 up, I get a Kernel panic situation as shown below.
# ifup wlan0
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
CFG80211-ERROR) wl_update_wiphybands : error reading vhtmode (-23)
ioctl[SIOCSIWPMKSA]: Invalid argument
ioctl[SIOCSIWMODE]: Invalid argument
ioctl[SIOCGIWRANGE]: Invalid argument
ioctl[SIOCGIWMODE]: Invalid argument
ioctl[SIOCSIWAP]: Invalid argument
ioctl[SIOCSIWESSID]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWPMKSA]: Invalid argument
udhcpc (v1.23.2) started
Unable to handle kernel paging request at virtual address 889da900
pgd = 88aa8000
[889da900] *pgd=8881141e(bad)
Internal error: Oops: 8000000d [#1] PREEMPT SMP ARM
Modules linked in: brcmfmac brcmutil bcmdhd
CPU: 0 PID: 374 Comm: dhd_dpc Not tainted 4.1.15-1.1.1+g1881fb8 #84
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
task: 88123440 ti: 88c14000 task.ti: 88c14000
PC is at 0x889da900
LR is at rcu_process_callbacks+0x460/0x578
pc : [<889da900>] lr : [<800778fc>] psr: a0010113
sp : 88c15da0 ip : 88508780 fp : 00000000
r10: 889da600 r9 : 0000000a r8 : 00000000
r7 : 88c14000 r6 : 8bb35e1c r5 : 80b04740 r4 : 8bb35e00
r3 : 889da900 r2 : 8840c8e8 r1 : 8840c8e8 r0 : 88508780
Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c53c7d Table: 88aa806a DAC: 00000015
Process dhd_dpc (pid: 374, stack limit = 0x88c14210)
Stack: (0x88c15da0 to 0x88c16000)
5da0: 10b87200 88bd8000 00000201 80b04d40 80af3dc0 8079989c 80b608b1 80af3dc0
5dc0: 8840c8e8 80b04740 00000001 00000000 00000009 80af80a4 88c14000 00000101
5de0: 80af8080 80af8080 40000009 800379fc 00000001 80af8594 88c15df0 80b66000
5e00: 00000009 ffffadd3 80af8100 00208140 80af8594 60010113 00000201 00000000
5e20: 7f04ea48 885e1800 ffffd8f1 00000000 00000000 80037b88 88bd8000 80037c8c
5e40: 88bd8000 00000000 00000000 7f0096f0 88bd8000 7f04c604 88bdb9a0 a0010193
5e60: 00000014 80796108 00000014 80796488 88bd8000 a0010113 88bdb000 000007d0
5e80: 889e0900 7f00f378 7f0763f8 00000003 00000014 80796488 7f0763f8 885e1800
5ea0: 7f0763f8 7f07acac 00000000 889e0900 00000000 00000000 00000014 7f057374
5ec0: 00000000 600b0013 88bdb8bc 00000032 ffffae9a 88bdb000 80ba8140 80af3800
5ee0: 01000000 0b042000 80ba8140 80052b28 88bdb858 ffffae9a 00000000 80796488
5f00: 88bdb858 8007a8cc 00000000 a0010193 88bd8000 a0010113 88bdb000 88bd8000
5f20: 88bdb8a8 88bdb8e0 00000000 60010113 88bdb8bc 00000000 00000000 7f00f528
5f40: 88bdb8a8 00000001 00000000 00000000 8899de00 88bdb8a8 7f00f440 00000000
5f60: 00000000 8004cdf8 e3130001 00000000 e3000000 88bdb8a8 00000000 00000000
5f80: 88c15f80 88c15f80 00000000 00000000 88c15f90 88c15f90 88c15fac 8899de00
5fa0: 8004cd1c 00000000 00000000 8000f528 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 eaffff1a e5973000
[<800778fc>] (rcu_process_callbacks) from [<800379fc>] (__do_softirq+0x120/0x238)
[<800379fc>] (__do_softirq) from [<80037b88>] (do_softirq.part.2+0x30/0x38)
[<80037b88>] (do_softirq.part.2) from [<80037c8c>] (__local_bh_enable_ip+0xfc/0x100)
[<80037c8c>] (__local_bh_enable_ip) from [<7f0096f0>] (dhd_os_wlfc_unblock+0x1c/0x40 [bcmdhd])
[<7f0096f0>] (dhd_os_wlfc_unblock [bcmdhd]) from [<7f04c604>] (dhd_wlfc_commit_packets+0x90/0x660 [bcmdhd])
[<7f04c604>] (dhd_wlfc_commit_packets [bcmdhd]) from [<7f057374>] (dhdsdio_dpc+0x15c/0x1024 [bcmdhd])
[<7f057374>] (dhdsdio_dpc [bcmdhd]) from [<7f00f528>] (dhd_dpc_thread+0xe8/0x130 [bcmdhd])
[<7f00f528>] (dhd_dpc_thread [bcmdhd]) from [<8004cdf8>] (kthread+0xdc/0xf4)
[<8004cdf8>] (kthread) from [<8000f528>] (ret_from_fork+0x14/0x2c)
Code: 00000000 00000000 00000000 00000000 (00000000)
---[ end trace 953822d756db6542 ]---
Kernel panic - not syncing: Fatal exception in interrupt
---[ end Kernel panic - not syncing: Fatal exception in interrupt
sched: RT throttling activated
Neither am I able to do the iw wlan0 scan operation (apparently because the wlan0 is not UP).
You have mentioned in the above answer that "sn8000 works reliably with brcmfmac driver". I want to know from you on what should be the compatible property for BRCMFMAC driver and what all the drivers should be enabled in the menuconfig other that BRCMFMAC? What are the other drivers that need to be enabled for this module.?
Thanks,
Tarun