How to enable SDIO WiFi in imx7

Hi @neeraj.verma

CYW43455 is a Broadcom chip and not Marvell. The best would be to use Bsp 3.0 with Kernel Config WLAN_VENDOR_BROADCOM enabled.

Best regards,
Jaski

Hi @jaski.tx ,
OK,
Do I have to follow same procedure to use backport driver ?
or BSP3.0 (repo init -u Index of /toradex-bsp-platform.git -b LinuxImage3.0 -m default.xml) already has CYW43455 chip support?

Thank you
Neeraj

No, for Bsp 3.0, there are no backports anymore.

You can just customize your kernel.

Best regards,
Jaski

Hi @jaski.tx ,
I do not see any boardcom options in kernel config, with default kernel options with 3.0 kernel I mwifiex.ko is not available.

Colibri-iMX7-eMMC_Console-Image 3.0b2 20191202

colibri-imx7-emmc login: root
root@colibri-imx7-emmc:~# modprobe cfg80211
root@colibri-imx7-emmc:~# modprobe mwifiex
modprobe: FATAL: Module mwifiex not found in directory /lib/modules/4.14.117-3.0.2+ge43e3a26e1b7
root@colibri-imx7-emmc:~#

Thank you
Neeraj

Did you use the toradex_4.14-2.0.x-imx kernel branch?

Hi @jaski.tx ,
Yes, that’s right.
git clone -b toradex_4.14-2.0.x-imx git://git.toradex.com/linux-toradex.git

Thank you
Neeraj

Thanks for your Input. If you do make menuconfig after doing make colibri_imx7_defconfig, then you can search for broadcom. The config for broadcom should be there.

Best regards,
Jaski

Hi @jaski.tx ,
I do not see that option.

neeraj.verma@IRVAPPARM1:/build$ git clone -b toradex_4.14-2.0.x-imx git://git.toradex.com/linux-toradex.git
Cloning into 'linux-toradex'...
remote: Counting objects: 8412576, done.
remote: Compressing objects: 100% (1232903/1232903), done.
remote: Total 8412576 (delta 7124941), reused 8412457 (delta 7124848)
Receiving objects: 100% (8412576/8412576), 1.70 GiB | 8.88 MiB/s, done.
Resolving deltas: 100% (7124941/7124941), done.
Checking out files: 100% (62662/62662), done.
neeraj.verma@IRVAPPARM1:/build$ cd linux-toradex/
neeraj.verma@IRVAPPARM1:/build/linux-toradex$ make colibri_imx7_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
neeraj.verma@IRVAPPARM1:/build/linux-toradex$ make menuconfig
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf  Kconfig

*** End of the configuration.
*** Execute ‘make’ to start the build or try ‘make help’.

Networking support --->
 Wireless --->
   --- Wireless                                                                                            \u2502 \u2502  
  \u2502 \u2502                                    cfg80211 - wireless configuration API                                                             \u2502 \u2502  
  \u2502 \u2502                                 [ ]     nl80211 testmode command                                                                        \u2502 \u2502  
  \u2502 \u2502                                 [ ]     enable developer warnings                                                                       \u2502 \u2502  
  \u2502 \u2502                                 [ ]     cfg80211 certification onus                                                                     \u2502 \u2502  
  \u2502 \u2502                                 [*]     enable powersave by default                                                                     \u2502 \u2502  
  \u2502 \u2502                                 [ ]     cfg80211 DebugFS entries                                                                        \u2502 \u2502  
  \u2502 \u2502                                 [ ]     use statically compiled regulatory rules database                                               \u2502 \u2502  
  \u2502 \u2502                                 [*]     cfg80211 wireless extensions compatibility                                                      \u2502 \u2502  
  \u2502 \u2502                                    Generic IEEE 802.11 Networking Stack (mac80211)                                                   \u2502 \u2502  
  \u2502 \u2502                                 [*]   Minstrel                                                                                          \u2502 \u2502  
  \u2502 \u2502                                 [*]     Minstrel 802.11n support                                                                        \u2502 \u2502  
  \u2502 \u2502                                 [ ]       Minstrel 802.11ac support                                                                     \u2502 \u2502  
  \u2502 \u2502                                       Default rate control algorithm (Minstrel)  --->                                                   \u2502 \u2502  
  \u2502 \u2502                                 [ ]   Enable mac80211 mesh networking (pre-802.11s) support                                             \u2502 \u2502  
  \u2502 \u2502                                 [ ]   Enable LED triggers                                                                               \u2502 \u2502  
  \u2502 \u2502                                 [ ]   Export mac80211 internals in DebugFS                                                              \u2502 \u2502  
  \u2502 \u2502                                 [ ]   Trace all mac80211 debug messages                                                                 \u2502 \u2502  
  \u2502 \u2502                                 [ ]   Select mac80211 debugging features  ----    

Could you please help?
Thank you
Neeraj

You can search with / in menuconfig.

The driver is located here:

Symbol: WLAN_VENDOR_BROADCOM [=n]
│ Type : boolean
│ Prompt: Broadcom devices
│ Location:
│ → Device Drivers
│ → Network device support (NETDEVICES [=y])
│ (3) → Wireless LAN (WLAN [=n])
│ Defined at drivers/net/wireless/broadcom/Kconfig:1
│ Depends on: NETDEVICES [=y] && WLAN [=n]

Hi @jaski.tx ,
Thank you for pointing me the right option, I can get broadcom option to enable.
it seems still I am missing something.

I followed below:

repo init -u http://git.toradex.com/toradex-bsp-platform.git -b LinuxImage3.0 -m default.xml
bitbake virtual/kernel -c menuconfig
bitbake -k console-tdx-image

After loading:
Colibri-iMX7-eMMC_Console-Image 3.0b2 20191204

colibri-imx7-emmc login: root
root@colibri-imx7-emmc:~# [  261.990953] random: crng init done
[  261.994376] random: 7 urandom warning(s) missed due to ratelimiting

root@colibri-imx7-emmc:~# modprobe cfg80211
root@colibri-imx7-emmc:~# modprobe mwifiex
modprobe: FATAL: Module mwifiex not found in directory /lib/modules/4.14.117-3.0.2+ge43e3a26e1b7
root@colibri-imx7-emmc:~# lsmod
Module                  Size  Used by
cfg80211              270336  0
bluetooth             335872  2
usb_f_rndis            24576  2
u_ether                20480  1 usb_f_rndis
mcp251x                20480  0
can_dev                24576  1 mcp251x
imx_sdma               28672  2
virt_dma               16384  1 imx_sdma
libcomposite           49152  10 usb_f_rndis
configfs               36864  3 usb_f_rndis,libcomposite
root@colibri-imx7-emmc:~#

Thank you
Neeraj

Hi @jaski.tx ,
Could you please suggest me on this?

Thank you
Neeraj

Could you check if mwifiex is activated in the kernel config?

Hi @jaski.tx ,
I don’t see mwifiex under Boardcom but I found under Marvell and enabled. I don’t see any error while executing but no virtual adopter created in ifconfig.

I enabled below so far:
[*] Broadcom 43xx SDIO device support
Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8997

Log:

root@colibri-imx7-emmc:~# modprobe cfg80211
root@colibri-imx7-emmc:~# modprobe mwifiex
root@colibri-imx7-emmc:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:14:2D:62:D4:3D
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:402 errors:0 dropped:0 overruns:0 frame:0
          TX packets:402 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29260 (28.5 KiB)  TX bytes:29260 (28.5 KiB)

usb0      Link encap:Ethernet  HWaddr 00:14:2D:FF:FF:FF
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@colibri-imx7-emmc:~# lsmod
Module                  Size  Used by
mwifiex               274432  0
cfg80211              270336  1 mwifiex
mcp251x                20480  0
can_dev                24576  1 mcp251x
imx_sdma               28672  2
virt_dma               16384  1 imx_sdma
bluetooth             335872  2
usb_f_rndis            24576  2
u_ether                20480  1 usb_f_rndis
libcomposite           49152  10 usb_f_rndis
configfs               36864  3 usb_f_rndis,libcomposite
root@colibri-imx7-emmc:~# dmesg | sdio
-sh: sdio: command not found

Thank you
Neeraj

Actually as we already found out, you have a dongle with broadcom wifi chip.
So you should look for a module containing bcm in the name. ( find / . -name bcm* ).

Once you find the module (.ko file), then you try to load it.

Best regards,
Jaski

Hi @jaski.tx ,
Now we have Laird WiFi module Marvell 88W8997 chipset.

modprobe cfg80211
modprobe mwifiex

root@colibri-imx7-emmc:~# lsmod
Module                  Size  Used by
mwifiex               270988  0
cfg80211              254686  1 mwifiex
usb_f_rndis            15714  2
u_ether                12580  1 usb_f_rndis
bluetooth             339518  2
compat                 91786  3 mwifiex,bluetooth,cfg80211
libcomposite           44419  10 usb_f_rndis
configfs               31094  3 usb_f_rndis,libcomposite
root@colibri-imx7-emmc:~#

root@colibri-imx7-emmc:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:14:2D:62:D2:3E  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:8242 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8242 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:593740 (579.8 KiB)  TX bytes:593740 (579.8 KiB)

usb0      Link encap:Ethernet  HWaddr 00:14:2D:FF:FF:FF  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@colibri-imx7-emmc:~# 

I do not see wlan0 or something to config IP address?
is there anything I am missing?

Thank you
Neeraj

Hi @jaski.tx ,
Could you please help me on this? I posted here as it is more relevant on this thread.

Thank you
Neeraj

Hi @neeraj.verma

We will continue this discussion in the new thread.

Best regards,
Jaski

Sure, Thank you.

You are welcome.