4 Replies Latest reply on Aug 14, 2015 5:34 PM by CMata_Intel

    Edison as Access Point: WiFi driver bug?

    pcarranzav

      Hi!

      I'm working on a project that requires an Edison to switch between Station and Access Point modes. I'm using connman to do this.

      I read on a few places that enabling Access Point mode requires reloading the bcm4334x module with an argument (op_mode=2).

      However, I'm hitting a problem when this happens:

      On dmesg, I see this when modprobeing:

       

      Dongle Host Driver, version 1.141.59 (r)
      Compiled in /var/lib/yocto/edison/build/master/work/edison-poky-linux/bcm43340-mod/1.141-r47/git on Jul 23 2015 at 11:56:24
      [ 4948.817807] wl_android_wifi_on in
      [ 4948.817824] wifi_platform_set_power = 1
      [ 4949.408085] firmware path not found
      [ 4949.418866] F1 signature OK, socitype:0x1 chip:0xa94c rev:0x2 pkg:0x0
      [ 4949.420488] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
      [ 4949.423158] dhdsdio_download_firmware: firmware path=, nvram path=
      [ 4951.431315] bcmsdh_sdmmc: enable F2 failed:-62bcmsdh_sdmmc: Failed to Write byte F0:@0x00002=06, Err: -62
      [ 4953.440670] bcmsdh_sdmmc: enable F2 failed:-62bcmsdh_sdmmc: Failed to Write byte F0:@0x00002=06, Err: -62
      [ 4955.450434] bcmsdh_sdmmc: enable F2 failed:-62bcmsdh_sdmmc: Failed to Write byte F0:@0x00002=06, Err: -62
      [ 4958.470034] dhd_bus_init: enable 0x06, ready 0x02 (waited 3006383us)
      [ 4958.471111] dhd_prot_ioctl : bus is down. we have nothing to do
      [ 4958.471138] dhd_check_hang: Event HANG send up due to  re=0 te=0 e=-1 s=0
      [ 4958.471205]
      Retry WIFI ON procedure (1)

      ...

      And then:

      [ 5006.446446] ------------[ cut here ]------------
      [ 5006.446483] WARNING: at /var/lib/yocto/edison/build/master/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/linux/net/wireless/sme.c:757 cfg80211_disconnected+0xce/0xe0()
      [ 5006.446496] Modules linked in: bcm4334x(O) xt_connmark iptable_mangle usb_f_acm u_serial g_multi libcomposite bcm_bt_lpm [last unloaded: bcm4334x]
      [ 5006.446579] CPU: 0 PID: 1258 Comm: kworker/0:0 Tainted: G        W  O 3.10.17-yocto-standard #1
      [ 5006.446595] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 466 2014.06.23:19.20.05
      [ 5006.446683] Workqueue: events dhd_deferred_work_handler [bcm4334x]
      [ 5006.44670200000000 00000000 ea317e1c c1958c77 ea317e44 c123e92e c1b7ed31 c1c333d4
      [ 5006.446760000002f5 c192a2de c192a2de f4760460 00000001 ec726c00 ea317e54 c123e9f2
      [ 5006.44681600000009 00000000 ea317e74 c192a2de 00000000 00000000 f47601c0 f4760460
      [ 5006.446872] Call Trace:
      [ 5006.446907[<c1958c77>] dump_stack+0x16/0x18
      [ 5006.446938[<c123e92e>] warn_slowpath_common+0x5e/0x80
      [ 5006.446967[<c192a2de>] ? cfg80211_disconnected+0xce/0xe0
      [ 5006.446994[<c192a2de>] ? cfg80211_disconnected+0xce/0xe0
      [ 5006.447022[<c123e9f2>] warn_slowpath_null+0x22/0x30
      [ 5006.447050[<c192a2de>] cfg80211_disconnected+0xce/0xe0
      [ 5006.447158[<f8d6d581>] wl_cfg80211_hang+0x61/0xe0 [bcm4334x]
      [ 5006.447187[<c17c6c01>] ? netdev_run_todo+0x41/0x240
      [ 5006.447268[<f8d3e3a0>] ? dhd_ethtool+0x240/0x240 [bcm4334x]
      [ 5006.447346[<f8d3e3a0>] ? dhd_ethtool+0x240/0x240 [bcm4334x]
      [ 5006.447425[<f8d3e3d3>] dhd_hang_process+0x33/0x40 [bcm4334x]
      [ 5006.447512[<f8d46ce7>] dhd_deferred_work_handler+0xd7/0x240 [bcm4334x]
      [ 5006.447539[<c1961825>] ? sub_preempt_count+0x55/0xe0
      [ 5006.447618[<f8d3e3a0>] ? dhd_ethtool+0x240/0x240 [bcm4334x]
      [ 5006.447648[<c125a5a9>] process_one_work+0x119/0x400
      [ 5006.447674[<c196175d>] ? add_preempt_count+0x7d/0xf0
      [ 5006.447698[<c1961825>] ? sub_preempt_count+0x55/0xe0
      [ 5006.447727[<c125b12e>] worker_thread+0xfe/0x330
      [ 5006.447754[<c195e0c6>] ? _raw_spin_unlock_irqrestore+0x26/0x50
      [ 5006.447782[<c125b030>] ? manage_workers.isra.26+0x250/0x250
      [ 5006.447807[<c1260304>] kthread+0x94/0xa0
      [ 5006.447831[<c1961825>] ? sub_preempt_count+0x55/0xe0
      [ 5006.447864[<c19636b7>] ret_from_kernel_thread+0x1b/0x28
      [ 5006.447888[<c1260270>] ? kthread_create_on_node+0xc0/0xc0
      [ 5006.447910] ---[ end trace d722ad237247810e ]---
      [ 5006.447971] CFG80211-ERROR) wl_cfg80211_hang : In : chip crash eventing
      [ 5006.447992] ------------[ cut here ]------------
      [ 5006.448020] WARNING: at /var/lib/yocto/edison/build/master/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/linux/net/wireless/sme.c:757 cfg80211_disconnected+0xce/0xe0()
      [ 5006.448032] Modules linked in: bcm4334x(O) xt_connmark iptable_mangle usb_f_acm u_serial g_multi libcomposite bcm_bt_lpm [last unloaded: bcm4334x]
      [ 5006.448105] CPU: 0 PID: 1258 Comm: kworker/0:0 Tainted: G        W  O 3.10.17-yocto-standard #1
      [ 5006.448120] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 466 2014.06.23:19.20.05
      [ 5006.448203] Workqueue: events dhd_deferred_work_handler [bcm4334x]
      [ 5006.44822000000000 00000000 ea317e1c c1958c77 ea317e44 c123e92e c1b7ed31 c1c333d4
      [ 5006.448277000002f5 c192a2de c192a2de f4760460 00000001 ec726c00 ea317e54 c123e9f2
      [ 5006.44833200000009 00000000 ea317e74 c192a2de 00000000 00000000 f47601c0 f4760460
      [ 5006.448388] Call Trace:
      [ 5006.448418[<c1958c77>] dump_stack+0x16/0x18
      [ 5006.448448[<c123e92e>] warn_slowpath_common+0x5e/0x80
      [ 5006.448477[<c192a2de>] ? cfg80211_disconnected+0xce/0xe0
      [ 5006.448504[<c192a2de>] ? cfg80211_disconnected+0xce/0xe0
      [ 5006.448532[<c123e9f2>] warn_slowpath_null+0x22/0x30
      [ 5006.448560[<c192a2de>] cfg80211_disconnected+0xce/0xe0
      [ 5006.448665[<f8d6d581>] wl_cfg80211_hang+0x61/0xe0 [bcm4334x]
      [ 5006.448693[<c17c6c01>] ? netdev_run_todo+0x41/0x240
      [ 5006.448773[<f8d3e3a0>] ? dhd_ethtool+0x240/0x240 [bcm4334x]
      [ 5006.448851[<f8d3e3a0>] ? dhd_ethtool+0x240/0x240 [bcm4334x]
      [ 5006.448929[<f8d3e3d3>] dhd_hang_process+0x33/0x40 [bcm4334x]
      [ 5006.449015[<f8d46ce7>] dhd_deferred_work_handler+0xd7/0x240 [bcm4334x]
      [ 5006.449041[<c1961825>] ? sub_preempt_count+0x55/0xe0
      [ 5006.449120[<f8d3e3a0>] ? dhd_ethtool+0x240/0x240 [bcm4334x]
      [ 5006.449148[<c125a5a9>] process_one_work+0x119/0x400
      [ 5006.449174[<c196175d>] ? add_preempt_count+0x7d/0xf0
      [ 5006.449198[<c1961825>] ? sub_preempt_count+0x55/0xe0
      [ 5006.449226[<c125b12e>] worker_thread+0xfe/0x330
      [ 5006.449252[<c195e0c6>] ? _raw_spin_unlock_irqrestore+0x26/0x50
      [ 5006.449280[<c125b030>] ? manage_workers.isra.26+0x250/0x250
      [ 5006.449304[<c1260304>] kthread+0x94/0xa0
      [ 5006.449329[<c1961825>] ? sub_preempt_count+0x55/0xe0
      [ 5006.449361[<c19636b7>] ret_from_kernel_thread+0x1b/0x28
      [ 5006.449385[<c1260270>] ? kthread_create_on_node+0xc0/0xc0


      This looks like it could be something wrong with the bcm4334x driver. I get various similar errors when running modprobe -r and modprobe. It doesn't always fail (every now and then the AP works and I can even connect to it), and it also fails (sometimes) when doing modprobe without the op_mode=2 to go back to Station mode.

      Has anyone else encountered this? Has anyone managed to get an AP set up with connman? Has anyone managed to go back to Station mode after being in AP mode?

      Thanks!