Skip to contentSkip to conversation

Kernel panic with brcm4313 (kernel 3.2.2)

DISCUSSION Frank A. Kingswood 2 participants 9 messages Feb 4, 2012 – Apr 17, 2012 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

On a new (Samsung 305U1A) laptop with BRCM4313 wireless I have not been able to use the wireless at all, although occasionally a flicker of life can be seen in it.

"iwconfig scan" usually fails to report more than one access point. Disabling the local AP makes it show up a different one, suggesting it is actually able to see it but somewhere fails to pass the data along.

Fiddling with NetworkManager produces this kernel panic:

------------[ cut here ]------------
WARNING: at net/wireless/mlme.c:309 cfg80211_send_auth_timeout+0x6d/0xd0 [cfg80211]()
Hardware name: 305U1A
Modules linked in: powernow_k8 mperf cpufreq_powersave cpufreq_userspace cpufreq_stats cpufreq_conservative xt_recent nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp iptable_filter ip_tables x_tables fuse arc4 brcmsmac mac80211 brcmutil cfg80211 crc8 cordic loop snd_hda_codec_realtek snd_hda_codec_hdmi radeon ttm drm_kms_helper snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss uvcvideo snd_mixer_oss drm i2c_piix4 snd_pcm agpgart i2c_algo_bit cfbcopyarea cfbimgblt video cfbfillrect snd_timer snd_page_alloc battery processor button ac thermal_sys sd_mod ahci libahci libata scsi_mod
Pid: 132, comm: kworker/u:4 Not tainted 3.2.2 #9
Call Trace:
[<ffffffff8103af0b>] ? warn_slowpath_common+0x7b/0xc0
[<ffffffffa02a0d3d>] ? cfg80211_send_auth_timeout+0x6d/0xd0 [cfg80211]
[<ffffffff8105b4fd>] ? sched_clock_cpu+0x5d/0xe0
[<ffffffffa02c0301>] ? ieee80211_probe_auth_done+0x101/0x110 [mac80211]
[<ffffffffa02c35a6>] ? ieee80211_work_work+0x4d6/0x1300 [mac80211]
[<ffffffffa02c30d0>] ? free_work+0x10/0x10 [mac80211]
[<ffffffff8104fb88>] ? process_one_work+0xf8/0x370
[<ffffffff8104ec8f>] ? cwq_activate_first_delayed+0x2f/0x90
[<ffffffff8105079d>] ? worker_thread+0x14d/0x320
[<ffffffff81050650>] ? manage_workers.isra.31+0x1f0/0x1f0
[<ffffffff8105587e>] ? kthread+0x7e/0x90
[<ffffffff813b25f4>] ? kernel_thread_helper+0x4/0x10
[<ffffffff81055800>] ? kthread_worker_fn+0x180/0x180
[<ffffffff813b25f0>] ? gs_change+0xb/0xb
---[ end trace eacbed78fae113fa ]---

The WiFi card:
03:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)
Subsystem: Wistron NeWeb Corp. Device [185f:051a]
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at fea00000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: brcmsmac

Kernel: 3.2.2
CONFIG_WLAN=y
CONFIG_BRCMUTIL=m
CONFIG_BRCMSMAC=m
# CONFIG_BRCMDBG is not set

Full .config at http://pastebin.com/TqhTJpBS

I know support for 4313 is still very new, and am willing to test out development kernels if that helps.

Frank

#1 lore raw
Quoted 9 lines · Frank A. Kingswood

Hi,

On a new (Samsung 305U1A) laptop with BRCM4313 wireless I have not been able to use the wireless at all, although occasionally a flicker of life can be seen in it.

"iwconfig scan" usually fails to report more than one access point. Disabling the local AP makes it show up a different one, suggesting it is actually able to see it but somewhere fails to pass the data along.

Could you sent me the output of 'iwconfig scan' or better 'iw scan'? What is the SSID of the 'local AP'?

Quoted 1 line

Fiddling with NetworkManager produces this kernel panic:

What does 'Fiddling with NetworkManager' mean exactly?

Gr. AvS

#9 lore raw
In reply to Frank A. Kingswood
Quoted 11 lines · Frank A. Kingswood

Hi,

On a new (Samsung 305U1A) laptop with BRCM4313 wireless I have not been able to use the wireless at all, although occasionally a flicker of life can be seen in it.

"iwconfig scan" usually fails to report more than one access point. Disabling the local AP makes it show up a different one, suggesting it is actually able to see it but somewhere fails to pass the data along.

Fiddling with NetworkManager produces this kernel panic:

Also a full dmesg log would be helpful.

Gr. AvS

#2 lore raw
In reply to Arend van Spriel
Quoted 6 lines · Arend van Spriel
Quoted 4 lines · Frank A. Kingswood

On a new (Samsung 305U1A) laptop with BRCM4313 wireless I have not been able to use the wireless at all, although occasionally a flicker of life can be seen in it.

Quoted 7 lines
Quoted 4 lines

"iwconfig scan" usually fails to report more than one access point. Disabling the local AP makes it show up a different one, suggesting it is actually able to see it but somewhere fails to pass the data along.

Could you sent me the output of 'iwconfig scan' or better 'iw scan'? What is the SSID of the 'local AP'?

Thanks for picking this up.

Full current dmesg is at http://pastebin.com/6yV0AgA1 which does not have a kernel panic but has brcmsmac debugging enabled. The syslog has some NM messages:

Feb  5 22:38:21 ceres NetworkManager[1372]: <warn> Activation (wlan0/wireless): association took too long.
Feb  5 22:38:21 ceres NetworkManager[1372]: <info> (wlan0): device state change: config -> need-auth (reason 'none') [50 60 0]
Feb  5 22:38:21 ceres NetworkManager[1372]: <warn> Activation (wlan0/wireless): asking for new secrets
Feb  5 22:38:21 ceres NetworkManager[1372]: <info> (wlan0): supplicant interface state: authenticating -> disconnected
Feb  5 22:38:21 ceres NetworkManager[1372]: <warn> Couldn't disconnect supplicant interface: This interface is not connected.
Feb  5 22:38:32 ceres dbus[1351]: [system] Activating service name='org.freedesktop.PackageKit' (using servicehelper)
Feb  5 22:38:32 ceres dbus[1351]: [system] Successfully activated service 'org.freedesktop.PackageKit'
Feb  5 22:40:27 ceres NetworkManager[1372]: <warn> No agents were available for this request.
Feb  5 22:40:27 ceres NetworkManager[1372]: <info> (wlan0): device state change: need-auth -> failed (reason 'no-secrets') [60 120 7]
Feb  5 22:40:27 ceres NetworkManager[1372]: <warn> Activation (wlan0) failed for access point (002257217de0)
Feb  5 22:40:27 ceres NetworkManager[1372]: <info> Marking connection '002257217de0 - Home' invalid.
Feb  5 22:40:27 ceres NetworkManager[1372]: <warn> Activation (wlan0) failed.
Feb  5 22:40:27 ceres NetworkManager[1372]: <info> (wlan0): device state change: failed -> disconnected (reason 'none') [120 30 0]
Feb  5 22:40:27 ceres NetworkManager[1372]: <info> (wlan0): deactivating device (reason 'none') [0]
Feb  5 22:40:27 ceres NetworkManager[1372]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.
Feb  5 22:40:27 ceres NetworkManager[1372]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.

On the Samsung the scan only finds my local AP. With that AP off yesterday it found a neighbour's AP. Another laptop finds 13 APs, the next one down is at -88dBm.

$ iw dev wlan0 scan

BSS 00:22:57:21:7d:e0 (on wlan0)
TSF: 73342264677 usec (0d, 20:22:22)
freq: 2462
beacon interval: 333
capability: ESS Privacy ShortSlotTime (0x0411)
signal: -47.00 dBm
last seen: 316 ms ago
SSID: 002257217de0
Supported rates: 1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 DS Parameter set: channel 11
Extended supported rates: 6.0 12.0 24.0 48.0
Country: GB Environment: Indoor/Outdoor
Channels [1 - 11] @ 16 dBm
TIM: DTIM Count 0 DTIM Period 1 Bitmap Control 0x0 Bitmap[0] 0x0
ERP: Barker_Preamble_Mode
HT capabilities:
Capabilities: 0x11ee
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003) Minimum RX AMPDU time spacing: 4 usec (0x05)
HT RX MCS rate indexes supported: 0-15, 32
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 11
* secondary channel offset: below
* STA channel width: any
* RIFS: 0
* HT protection: 20 MHz
* non-GF present: 1
* OBSS non-GF present: 0
* dual beacon: 0
* dual CTS protection: 0
* STBC beacon: 0
* L-SIG TXOP Prot: 0
* PCO active: 0
* PCO phase: 0
Extended capabilities: HT Information Exchange Supported
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: PreAuth (0x0001)
WMM: * Parameter version 1
* BE: CW 15-1023, AIFSN 3
* BK: CW 15-1023, AIFSN 7
* VI: CW 7-15, AIFSN 2, TXOP 3008 usec
* VO: acm CW 3-7, AIFSN 2, TXOP 1504 usec

Quoted 4 lines
Quoted 2 lines

Fiddling with NetworkManager produces this kernel panic:

What does 'Fiddling with NetworkManager' mean exactly?

Hard to say :-)
I was trying to get NM to first find and then connect to the AP. This is not really reproducable, sorry, it took perhaps a dozen attempts.

Frank

Signature · 3 lines
------------------------------------------------------------------------
Frank A. Kingswood                      [email protected]
Cambridge, United Kingdom                               +44-7545-209 100
#3 lore raw
Quoted 18 lines · Frank Kingswood
Quoted 6 lines · Arend van Spriel
Quoted 4 lines · Frank A. Kingswood

On a new (Samsung 305U1A) laptop with BRCM4313 wireless I have not been able to use the wireless at all, although occasionally a flicker of life can be seen in it.

Quoted 7 lines
Quoted 4 lines

"iwconfig scan" usually fails to report more than one access point. Disabling the local AP makes it show up a different one, suggesting it is actually able to see it but somewhere fails to pass the data along.

Could you sent me the output of 'iwconfig scan' or better 'iw scan'? What is the SSID of the 'local AP'?

Thanks for picking this up.

Quoted 2 lines
Quoted 2 lines

Fiddling with NetworkManager produces this kernel panic:

Quoted 8 lines
Quoted 2 lines

What does 'Fiddling with NetworkManager' mean exactly?

Hard to say :-)
I was trying to get NM to first find and then connect to the AP. This is not really reproducable, sorry, it took perhaps a dozen attempts.

Frank

Sorry for getting back to you after so long. I was looking at some other issues with bcm4313 and there was a reference to a message you posted on LKML. So I searched my email archive for your name.

I noticed in some log you sent that your regulatory domain is set to GB, which makes sense. I submitted a patch [1] last week so could you try that and let me know the results.

Gr. AvS

[1] http://article.gmane.org/gmane.linux.kernel.wireless.general/88651

#6 lore raw
In reply to Arend van Spriel

Hi Arend,

Quoted 1 line

I noticed in some log you sent that your regulatory domain is set to GB, which makes sense. I submitted a patch [1] last week so could you try that and let me know the results.

[re-sending as plain text]

Thanks for the update. Yes, my AP is on channel 13 so might be affected by this.

But there is the other issue where the driver only shows one AP (seems to be the one with highest received power) when I do iw dev wlan0 scan (or the same with NetworkManager). Your patch does not touch this area and this still occurs.

I've applied your tx dma resume patch on top of 3.3.1 and tried to connect with NM. No luck connecting, and also got a kernel WARNING:

Apr 17 13:10:24 ceres kernel: ------------[ cut here ]------------
Apr 17 13:10:24 ceres kernel: WARNING: at drivers/net/wireless/brcm80211/brcmsmac/main.c:8006 brcms_c_wait_for_tx_completion+0x91/0xa0 [brcmsmac]()
Apr 17 13:10:24 ceres kernel: Hardware name: 305U1A
Apr 17 13:10:24 ceres kernel: Modules linked in: powernow_k8 mperf cpufreq_powersave cpufreq_userspace cpufreq_stats cpufreq_conservative xt_recent nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp iptable_filter ip_tables x_tables fuse arc4 brcmsmac brcmutil bcma mac80211 cfg80211 loop video battery ac processor thermal_sys button sd_mod ahci libahci libata scsi_mod
Apr 17 13:10:24 ceres kernel: Pid: 3938, comm: wpa_supplicant Not tainted 3.3.1+ #20
Apr 17 13:10:24 ceres kernel: Call Trace:
Apr 17 13:10:24 ceres kernel: [<ffffffff8102c87b>] ? warn_slowpath_common+0x7b/0xc0
Apr 17 13:10:24 ceres kernel: [<ffffffffa0121c01>] ? brcms_c_wait_for_tx_completion+0x91/0xa0 [brcmsmac]
Apr 17 13:10:24 ceres kernel: [<ffffffffa0114212>] ? brcms_ops_flush+0x32/0x50 [brcmsmac]
Apr 17 13:10:24 ceres kernel: [<ffffffffa00ebec5>] ? __ieee80211_recalc_idle+0x1f5/0x230 [mac80211]
Apr 17 13:10:24 ceres kernel: [<ffffffffa00ece6c>] ? ieee80211_recalc_idle+0x2c/0x70 [mac80211]
Apr 17 13:10:24 ceres kernel: [<ffffffffa00e8e4c>] ? ieee80211_mgd_disassoc+0xec/0x110 [mac80211]
Apr 17 13:10:24 ceres kernel: [<ffffffffa00b907d>] ? cfg80211_mlme_disassoc+0xfd/0x150 [cfg80211]
Apr 17 13:10:24 ceres kernel: [<ffffffffa00a89b5>] ? nl80211_disassociate+0xc5/0x100 [cfg80211]
Apr 17 13:10:24 ceres kernel: [<ffffffff81372bbc>] ? genl_rcv_msg+0x1cc/0x240
Apr 17 13:10:24 ceres kernel: [<ffffffff813729f0>] ? genl_rcv+0x30/0x30
Apr 17 13:10:24 ceres kernel: [<ffffffff81372551>] ? netlink_rcv_skb+0x91/0xb0
Apr 17 13:10:24 ceres kernel: [<ffffffff813729df>] ? genl_rcv+0x1f/0x30
Apr 17 13:10:24 ceres kernel: [<ffffffff81371ef1>] ? netlink_unicast+0x1a1/0x1f0
Apr 17 13:10:24 ceres kernel: [<ffffffff813721f9>] ? netlink_sendmsg+0x2b9/0x310
Apr 17 13:10:24 ceres kernel: [<ffffffff8134206e>] ? sock_sendmsg+0xde/0x110
Apr 17 13:10:24 ceres kernel: [<ffffffff8134206e>] ? sock_sendmsg+0xde/0x110
Apr 17 13:10:24 ceres kernel: [<ffffffff813447bd>] ? move_addr_to_kernel+0x3d/0x50
Apr 17 13:10:24 ceres kernel: [<ffffffff8134f0ae>] ? verify_iovec+0x4e/0xd0
Apr 17 13:10:24 ceres kernel: [<ffffffff81343a36>] ? __sys_sendmsg+0x366/0x370
Apr 17 13:10:24 ceres kernel: [<ffffffff81007013>] ? emulate_vsyscall+0x213/0x2d0
Apr 17 13:10:24 ceres kernel: [<ffffffff810ae42c>] ? handle_mm_fault+0x4c/0x260
Apr 17 13:10:24 ceres kernel: [<ffffffff813450ee>] ? sys_sendto+0x13e/0x1a0
Apr 17 13:10:24 ceres kernel: [<ffffffff810606ed>] ? ktime_get_ts+0x6d/0xe0
Apr 17 13:10:24 ceres kernel: [<ffffffff810e8e1f>] ? poll_select_copy_remaining+0xff/0x150
Apr 17 13:10:24 ceres kernel: [<ffffffff81345534>] ? sys_sendmsg+0x44/0x80
Apr 17 13:10:24 ceres kernel: [<ffffffff81401d62>] ? system_call_fastpath+0x16/0x1b
Apr 17 13:10:24 ceres kernel: ---[ end trace 420dd744f04101fd ]---
Apr 17 13:10:24 ceres kernel: cfg80211: Calling CRDA for country: US
Apr 17 13:10:24 ceres kernel: cfg80211: Regulatory domain changed to country: US
Apr 17 13:10:24 ceres kernel: cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Apr 17 13:10:24 ceres kernel: cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211: Calling CRDA for country: GB
Apr 17 13:10:24 ceres kernel: cfg80211: Regulatory domain changed to country: GB
Apr 17 13:10:24 ceres kernel: cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Apr 17 13:10:24 ceres kernel: cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211:   (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211: Calling CRDA to update world regulatory domain
Apr 17 13:10:24 ceres kernel: cfg80211: World regulatory domain updated:
Apr 17 13:10:24 ceres kernel: cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
Apr 17 13:10:24 ceres kernel: cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
Apr 17 13:10:24 ceres kernel: cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)

That line is in brcms_c_wait_for_tx_completion()

main.c,8006 WARN_ON_ONCE(timeout == 0);

Would using another channel be any different for this?

Thanks,

Frank

#7 lore raw
Quoted 6 lines · Frank Kingswood

Hi Arend,

Quoted 3 lines

I noticed in some log you sent that your regulatory domain is set to GB, which makes sense. I submitted a patch [1] last week so could you try that and let me know the results.

[re-sending as plain text]

Quoted 9 lines

Thanks for the update. Yes, my AP is on channel 13 so might be affected by this.

That line is in brcms_c_wait_for_tx_completion()

main.c,8006 WARN_ON_ONCE(timeout == 0);

Would using another channel be any different for this?

I actually did not expect that warning to come up with the patch in place. So if you can try another channel in 1-11 range and let me know the result, I might be able to make some sense of it all.

Gr. AvS

#8 lore raw
Quoted 10 lines · Arend van Spriel
Quoted 9 lines · Frank Kingswood

Hi Arend,

Quoted 3 lines

I noticed in some log you sent that your regulatory domain is set to GB, which makes sense. I submitted a patch [1] last week so could you try that and let me know the results.

[re-sending as plain text]

Thanks for the update. Yes, my AP is on channel 13 so might be affected by this.

Quoted 8 lines
Quoted 6 lines

That line is in brcms_c_wait_for_tx_completion()

main.c,8006 WARN_ON_ONCE(timeout == 0);

Would using another channel be any different for this?

I actually did not expect that warning to come up with the patch in place. So if you can try another channel in 1-11 range and let me know the result, I might be able to make some sense of it all.

Sorry, I misremembered.
It was already on channel 11, but it had 20/40 MHz bandwidth selected with channel 9 as the extension channel. That might have been OK on channel 13, but I think these two overlap.

Also I'm not sure if this is a standard mode, so I've turned it to just 802.11n+g mode, with 20MHz BW on channel 7 now. Output from "iw dev wlan0 scan" for reference.

Attempting to connect with NM no longer gives the kernel warning, but stull no luck.

BSS 00:22:57:xx:xx:xx (on wlan0)
TSF: 1796346187 usec (0d, 00:29:56)
freq: 2442
beacon interval: 333
capability: ESS Privacy ShortSlotTime (0x0411)
signal: -44.00 dBm
last seen: 476 ms ago
SSID: xxxxxxxxxxxx
Supported rates: 1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 DS Parameter set: channel 7
Extended supported rates: 6.0 12.0 24.0 48.0
Country: GB Environment: Indoor/Outdoor
Channels [1 - 11] @ 16 dBm
TIM: DTIM Count 0 DTIM Period 1 Bitmap Control 0x0 Bitmap[0] 0x0
ERP: Barker_Preamble_Mode
HT capabilities:
Capabilities: 0x1ec
HT20
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003) Minimum RX AMPDU time spacing: 4 usec (0x05)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
HT operation:
* primary channel: 7
* secondary channel offset: no secondary
* STA channel width: 20 MHz
* RIFS: 0
* HT protection: non-HT mixed
* non-GF present: 1
* OBSS non-GF present: 0
* dual beacon: 0
* dual CTS protection: 0
* STBC beacon: 0
* L-SIG TXOP Prot: 0
* PCO active: 0
* PCO phase: 0
Extended capabilities: HT Information Exchange Supported
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: PreAuth (0x0001)
WMM: * Parameter version 1
* BE: CW 15-1023, AIFSN 3
* BK: CW 15-1023, AIFSN 7
* VI: CW 7-15, AIFSN 2, TXOP 3008 usec
* VO: acm CW 3-7, AIFSN 2, TXOP 1504 usec

Frank