Bug 42840

Summary: Broadcom BCM4313 random AP disconnects and network hang
Product: Drivers Reporter: Terry (mrkennie)
Component: network-wirelessAssignee: brcm80211 driver developers (brcm80211-dev-list)
Status: REOPENED ---    
Severity: normal CC: akb825, alan, alunduil, aspriel, brcm80211-dev-list, florian, headcrabextra, linville, mezin.alexander, pflugerama, ronne, stf_xl, swt, szg00000
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.2 - 3.6 Subsystem:
Regression: No Bisected commit-id:

Description Terry 2012-02-29 16:22:11 UTC
Using the brcmsmac driver I'm experiencing random AP disconnects and network hangs. I can usually come out of a hang by simply reconnecting where it will work normally again for a short while. 

I got a lot of the following in kern.log during the issues

Feb 27 00:30:10 lenny kernel: [ 455.059482] ieee80211 phy0: brcms_c_ampdu_dotxstatus_complete: Pkt tx suppressed, illegal channel possibly 2
Feb 27 00:30:10 lenny kernel: [ 455.059494] ieee80211 phy0: AMPDU status: BA Timeout, seq 264, in_transit 15
Feb 27 00:30:10 lenny kernel: [ 455.059517] ieee80211 phy0: AMPDU status: BA Timeout, seq 265, in_transit 14
Feb 27 00:30:10 lenny kernel: [ 455.059522] ieee80211 phy0: AMPDU status: BA Timeout, seq 266, in_transit 13
Feb 27 00:30:10 lenny kernel: [ 455.059527] ieee80211 phy0: AMPDU status: BA Timeout, seq 267, in_transit 12
Feb 27 00:30:10 lenny kernel: [ 455.059532] ieee80211 phy0: AMPDU status: BA Timeout, seq 268, in_transit 11
Feb 27 00:30:10 lenny kernel: [ 455.059539] ieee80211 phy0: AMPDU status: BA Timeout, seq 269, in_transit 10
Feb 27 00:30:10 lenny kernel: [ 455.059544] ieee80211 phy0: AMPDU status: BA Timeout, seq 270, in_transit 9
Feb 27 00:30:10 lenny kernel: [ 455.059550] ieee80211 phy0: AMPDU status: BA Timeout, seq 271, in_transit 8
Feb 27 00:30:10 lenny kernel: [ 455.059556] ieee80211 phy0: AMPDU status: BA Timeout, seq 272, in_transit 7
Feb 27 00:30:10 lenny kernel: [ 455.059561] ieee80211 phy0: AMPDU status: BA Timeout, seq 273, in_transit 6
Feb 27 00:30:10 lenny kernel: [ 455.059566] ieee80211 phy0: AMPDU status: BA Timeout, seq 274, in_transit 5
Feb 27 00:30:10 lenny kernel: [ 455.059572] ieee80211 phy0: AMPDU status: BA Timeout, seq 275, in_transit 4
Feb 27 00:30:10 lenny kernel: [ 455.059576] ieee80211 phy0: AMPDU status: BA Timeout, seq 276, in_transit 3
Feb 27 00:30:10 lenny kernel: [ 455.059581] ieee80211 phy0: AMPDU status: BA Timeout, seq 277, in_transit 2
Feb 27 00:30:10 lenny kernel: [ 455.059587] ieee80211 phy0: AMPDU status: BA Timeout, seq 278, in_transit 1
Feb 27 00:30:10 lenny kernel: [ 455.059592] ieee80211 phy0: AMPDU status: BA Timeout, seq 279, in_transit 0
Feb 27 00:30:10 lenny kernel: [ 455.069190] ieee80211 phy0: brcms_c_ampdu_dotxstatus_complete: Pkt tx suppressed, illegal channel possibly 2
Feb 27 00:30:10 lenny kernel: [ 455.069193] ieee80211 phy0: AMPDU status: BA Timeout, seq 280, in_transit 3
Feb 27 00:30:10 lenny kernel: [ 455.069199] ieee80211 phy0: AMPDU status: BA Timeout, seq 281, in_transit 2
Feb 27 00:30:10 lenny kernel: [ 455.069205] ieee80211 phy0: AMPDU status: BA Timeout, seq 282, in_transit 1
Feb 27 00:30:10 lenny kernel: [ 455.069210] ieee80211 phy0: AMPDU status: BA Timeout, seq 283, in_transit 0
Feb 27 00:30:10 lenny kernel: [ 455.428023] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:10 lenny kernel: [ 455.428914] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:10 lenny kernel: [ 455.429236] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:10 lenny kernel: [ 455.626571] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:10 lenny kernel: [ 455.627441] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:11 lenny kernel: [ 456.131106] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:11 lenny kernel: [ 456.132082] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:11 lenny kernel: [ 456.328771] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:11 lenny kernel: [ 456.329630] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:11 lenny kernel: [ 456.713335] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:11 lenny kernel: [ 456.714013] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:12 lenny kernel: [ 456.908024] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:12 lenny kernel: [ 456.908935] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:12 lenny kernel: [ 457.166170] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU
Feb 27 00:30:12 lenny kernel: [ 457.167601] ieee80211 phy0: brcms_c_dotxstatus: INTERMEDIATE but not AMPDU

02:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)
 Subsystem: Broadcom Corporation Device [14e4:051b]
 Flags: bus master, fast devsel, latency 0, IRQ 17
 Memory at d0400000 (64-bit, non-prefetchable) [size=16K]
 Capabilities: <access denied>
 Kernel driver in use: brcmsmac
 Kernel modules: bcma, brcmsmac
Comment 1 Terry 2012-02-29 16:35:12 UTC
Sorry, I figured you need more detailed info from lspci:

02:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)
	Subsystem: Broadcom Corporation Device [14e4:051b]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 17
	Region 0: Memory at d0400000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=2 PME-
	Capabilities: [58] Vendor Specific Information: Len=78 <?>
	Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [d0] Express (v1) Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x1, ASPM unknown, Latency L0 <4us, L1 <64us
			ClockPM+ Surprise- LLActRep+ BwNot-
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-
	Capabilities: [100 v1] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		AERCap:	First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
	Capabilities: [13c v1] Virtual Channel
		Caps:	LPEVC=0 RefClk=100ns PATEntryBits=1
		Arb:	Fixed- WRR32- WRR64- WRR128-
		Ctrl:	ArbSelect=Fixed
		Status:	InProgress-
		VC0:	Caps:	PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
			Arb:	Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
			Ctrl:	Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
			Status:	NegoPending- InProgress-
	Capabilities: [160 v1] Device Serial Number 00-00-37-ff-ff-4e-64-27
	Capabilities: [16c v1] Power Budgeting <?>
	Kernel driver in use: brcmsmac
	Kernel modules: wl, bcma, brcmsmac
Comment 2 Terry 2012-03-01 03:20:43 UTC
Right, I've finally found something that may give some better idea as to what is happening. When my network connection hangs and I don't touch anything, after about a minute or so I get the following and then my network connection resumes again.

Mar  1 03:12:33 lenny kernel: [  222.946997] ------------[ cut here ]------------
Mar  1 03:12:33 lenny kernel: [  222.947037] WARNING: at /build/buildd/linux-3.2.0/drivers/net/wireless/brcm80211/brcmsmac/main.c:8234 brcms_c_wait_for_tx_completion+0x99/0xb0 [brcmsmac]()
Mar  1 03:12:33 lenny kernel: [  222.947044] Hardware name: 4334                            
Mar  1 03:12:33 lenny kernel: [  222.947048] Modules linked in: parport_pc ppdev dm_crypt rfcomm bnep bluetooth nfsd nfs binfmt_misc lockd fscache auth_rpcgss nfs_acl sunrpc joydev bcma arc4 snd_hda_codec_hdmi snd_hda_codec_conexant brcmsmac mac80211 brcmutil cfg80211 crc8 cordic rts5139(C) uvcvideo videodev v4l2_compat_ioctl32 snd_hda_intel snd_hda_codec snd_hwdep psmouse serio_raw snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd mei(C) soundcore snd_page_alloc ideapad_laptop sparse_keymap mac_hid lp parport atl1c i915 drm_kms_helper drm i2c_algo_bit video
Mar  1 03:12:33 lenny kernel: [  222.947140] Pid: 1238, comm: wpa_supplicant Tainted: G         C   3.2.0-17-generic #27-Ubuntu
Mar  1 03:12:33 lenny kernel: [  222.947145] Call Trace:
Mar  1 03:12:33 lenny kernel: [  222.947162]  [<ffffffff8106723f>] warn_slowpath_common+0x7f/0xc0
Mar  1 03:12:33 lenny kernel: [  222.947171]  [<ffffffff8106729a>] warn_slowpath_null+0x1a/0x20
Mar  1 03:12:33 lenny kernel: [  222.947192]  [<ffffffffa0355b39>] brcms_c_wait_for_tx_completion+0x99/0xb0 [brcmsmac]
Mar  1 03:12:33 lenny kernel: [  222.947208]  [<ffffffffa03441bb>] brcms_ops_flush+0x3b/0x60 [brcmsmac]
Mar  1 03:12:33 lenny kernel: [  222.947235]  [<ffffffffa02ad31f>] ieee80211_start_sw_scan+0x7f/0x1d0 [mac80211]
Mar  1 03:12:33 lenny kernel: [  222.947259]  [<ffffffffa02ad6e5>] __ieee80211_start_scan+0x275/0x2a0 [mac80211]
Mar  1 03:12:33 lenny kernel: [  222.947283]  [<ffffffffa02adfc9>] ieee80211_request_scan+0x39/0x60 [mac80211]
Mar  1 03:12:33 lenny kernel: [  222.947311]  [<ffffffffa02becfc>] ieee80211_scan+0x6c/0x90 [mac80211]
Mar  1 03:12:33 lenny kernel: [  222.947332]  [<ffffffffa02875f8>] nl80211_trigger_scan+0x368/0x620 [cfg80211]
Mar  1 03:12:33 lenny kernel: [  222.947345]  [<ffffffff81566d85>] genl_rcv_msg+0x1d5/0x250
Mar  1 03:12:33 lenny kernel: [  222.947354]  [<ffffffff81566bb0>] ? genl_rcv+0x40/0x40
Mar  1 03:12:33 lenny kernel: [  222.947362]  [<ffffffff81566649>] netlink_rcv_skb+0xa9/0xd0
Mar  1 03:12:33 lenny kernel: [  222.947370]  [<ffffffff81566b95>] genl_rcv+0x25/0x40
Mar  1 03:12:33 lenny kernel: [  222.947378]  [<ffffffff81565f90>] netlink_unicast+0x2b0/0x300
Mar  1 03:12:33 lenny kernel: [  222.947388]  [<ffffffff81532027>] ? memcpy_fromiovec+0x67/0xb0
Mar  1 03:12:33 lenny kernel: [  222.947396]  [<ffffffff81566296>] netlink_sendmsg+0x2b6/0x310
Mar  1 03:12:33 lenny kernel: [  222.947406]  [<ffffffff8152420e>] sock_sendmsg+0x10e/0x130
Mar  1 03:12:33 lenny kernel: [  222.947416]  [<ffffffff8116dc18>] ? __mem_cgroup_commit_charge+0x78/0xe0
Mar  1 03:12:33 lenny kernel: [  222.947425]  [<ffffffff8103dbb9>] ? default_spin_lock_flags+0x9/0x10
Mar  1 03:12:33 lenny kernel: [  222.947435]  [<ffffffff8105fa4e>] ? try_to_wake_up+0x18e/0x200
Mar  1 03:12:33 lenny kernel: [  222.947441]  [<ffffffff81526da1>] ? move_addr_to_kernel+0x71/0x80
Mar  1 03:12:33 lenny kernel: [  222.947450]  [<ffffffff81532326>] ? verify_iovec+0x56/0xd0
Mar  1 03:12:33 lenny kernel: [  222.947457]  [<ffffffff81525dd6>] __sys_sendmsg+0x396/0x3b0
Mar  1 03:12:33 lenny kernel: [  222.947466]  [<ffffffff8107d192>] ? set_current_blocked+0x52/0x70
Mar  1 03:12:33 lenny kernel: [  222.947475]  [<ffffffff81013700>] ? handle_signal+0xc0/0x190
Mar  1 03:12:33 lenny kernel: [  222.947483]  [<ffffffff8101db74>] ? restore_user_xstate+0x54/0xa0
Mar  1 03:12:33 lenny kernel: [  222.947491]  [<ffffffff8101de6f>] ? restore_i387_xstate+0x8f/0x130
Mar  1 03:12:33 lenny kernel: [  222.947498]  [<ffffffff81527d39>] sys_sendmsg+0x49/0x90
Mar  1 03:12:33 lenny kernel: [  222.947507]  [<ffffffff81661202>] system_call_fastpath+0x16/0x1b
Mar  1 03:12:33 lenny kernel: [  222.947513] ---[ end trace 09e64f0f14d3c7a4 ]---
Comment 3 Terry 2012-03-01 04:07:38 UTC
I've tried patch found here https://bugzilla.redhat.com/show_bug.cgi?id=787649
and get pretty much the same thing except there's a lot more AMPDU related noise with the same messages in the bug description but much more of them and a crash (as per comment #2).

If you need anything else, please let me know.

Oh and apologies for all the additional comments.
Comment 4 Terry 2012-04-16 21:00:51 UTC
I've since replaced my card with an Intel based card so if it helps I'm more than happy to donate the BCM4313 based card to anyone who wants to work on it.
Comment 5 Arend van Spriel 2012-08-31 16:30:13 UTC
I have been digging into this issue last week and reworked the code in mac80211 .flush() code path (which is in comment #2 trace). I will mention this bug report in the commit message.
Comment 6 Stanislaw Gruszka 2012-10-08 07:56:37 UTC
This still happen on latest kernel.
Comment 7 Aaron Barany 2012-10-08 08:36:26 UTC
This is the exact backtrace I got. (I originally reported here https://bugzilla.kernel.org/show_bug.cgi?id=48391)

[  471.789161] WARNING: at drivers/net/wireless/brcm80211/brcmsmac/main.c:7968
brcms_c_wait_for_tx_completion+0x99/0xb0 [brcmsmac]()
[  471.789164] Hardware name: Aspire E1-571
[  471.789167] Modules linked in: uvcvideo videobuf2_vmalloc videobuf2_memops
videobuf2_core videodev media fuse aes_x86_64 aes_generic ipt_REJECT
ip6t_REJECT xt_tcpudp nf_conntrack_ipv6 nf_defrag_ipv6 nf_conntrack_ipv4
nf_defrag_ipv4 xt_conntrack nf_conntrack ip6table_filter ip6_tables
iptable_filter ip_tables x_tables snd_hda_codec_hdmi snd_hda_codec_realtek arc4
joydev i915 brcmsmac cordic brcmutil mac80211 acpi_cpufreq mperf microcode
ghash_clmulni_intel i2c_algo_bit drm_kms_helper drm snd_hda_intel snd_hda_codec
snd_hwdep snd_pcm acer_wmi cryptd cfg80211 intel_agp i2c_i801 sdhci_pci sdhci
serio_raw tg3 sparse_keymap snd_page_alloc snd_timer snd soundcore intel_gtt
iTCO_wdt iTCO_vendor_support mmc_core mei lpc_ich i2c_core mfd_core kvm_intel
libphy bcma psmouse processor pcspkr evdev kvm rfkill wmi coretemp crc32c_intel
battery ac button video nfs nfs_acl lockd auth_rpcgss sunrpc fscache ext4 crc16
jbd2 mbcache sd_mod sr_mod cdrom ahci libahci libata scsi_mod ehci_hcd usbcore
usb_common
[  471.789283] Pid: 1266, comm: kworker/u:30 Not tainted 3.5.5-1-ARCH #1
[  471.789284] Call Trace:
[  471.789291]  [<ffffffff81051a3f>] warn_slowpath_common+0x7f/0xc0
[  471.789293]  [<ffffffff81051a9a>] warn_slowpath_null+0x1a/0x20
[  471.789299]  [<ffffffffa04d3d29>] brcms_c_wait_for_tx_completion+0x99/0xb0
[brcmsmac]
[  471.789303]  [<ffffffffa04c61bb>] brcms_ops_flush+0x3b/0x60 [brcmsmac]
[  471.789312]  [<ffffffffa0478f69>] ieee80211_mgd_probe_ap_send+0xc9/0x230
[mac80211]
[  471.789318]  [<ffffffffa047974f>] ieee80211_mgd_probe_ap.part.22+0x10f/0x130
[mac80211]
[  471.789323]  [<ffffffffa04798fe>] ieee80211_sta_monitor_work+0x2e/0x30
[mac80211]
[  471.789327]  [<ffffffff8106ef1a>] process_one_work+0x12a/0x440
[  471.789332]  [<ffffffffa04798d0>] ?
ieee80211_beacon_connection_loss_work+0x160/0x160 [mac80211]
[  471.789335]  [<ffffffff8106f77e>] worker_thread+0x12e/0x2d0
[  471.789337]  [<ffffffff8106f650>] ? manage_workers.isra.26+0x1f0/0x1f0
[  471.789340]  [<ffffffff81074e73>] kthread+0x93/0xa0
[  471.789344]  [<ffffffff8148aa24>] kernel_thread_helper+0x4/0x10
[  471.789346]  [<ffffffff81074de0>] ? kthread_freezable_should_stop+0x70/0x70
[  471.789348]  [<ffffffff8148aa20>] ? gs_change+0x13/0x13
Comment 8 Stanislaw Gruszka 2013-01-24 15:10:43 UTC
This should be fixed currently i.e. on 3.8 .
Comment 9 Florian Mickler 2013-02-23 10:27:44 UTC
A patch referencing this bug report has been merged in Linux v3.8-rc7:

commit 7b2385b95363c9ff49801c19cba2489a05bd6672
Author: Arend van Spriel <arend@broadcom.com>
Date:   Sat Feb 2 14:36:50 2013 +0100

    brcmsmac: rework of mac80211 .flush() callback operation
Comment 10 Aleksandr Mezin 2013-03-05 20:26:59 UTC
Linux 3.8.2 - connection still hangs at some time, now without anything in dmesg.
Comment 11 Aaron Barany 2013-03-21 04:08:04 UTC
I also still get hangs under 3.8.3, though it looks like it is a lot less frequent than before. I did have these messages in dmesg, which may or may not be related.

[  459.339747] brcmsmac bcma0:0: brcms_c_ampdu_dotxstatus_complete: Pkt tx suppressed, illegal channel possibly 1
[  459.340056] brcmsmac bcma0:0: brcms_c_ampdu_dotxstatus_complete: Pkt tx suppressed, illegal channel possibly 1
[  459.340167] brcmsmac bcma0:0: brcms_c_ampdu_dotxstatus_complete: Pkt tx suppressed, illegal channel possibly 1
Comment 12 Aleksandr Mezin 2013-03-21 04:22:28 UTC
I don't get hangs with these patches over 3.4-3.6 kernels: https://patchwork.kernel.org/patch/1651801/

But hangs happen with 3.8, which have "v2" of this patch-set.
I also get these "Pkt tx suppressed" messages, but I get them much earlier than the hang happens.
Comment 13 Aaron Barany 2013-03-23 21:54:36 UTC
I spoke to soon when I said it was a lot less frequent. That was based off transferring a large file from a computer on my local network, where it only stalled once. In a more real-world test of updating, it was as bad as before, or maybe even worse. On top of that, a couple times it deauthenticated from my network and would be unable to authenticate again until I restarted. (though I'm sure I could have reloaded the proper modules instead) That update included kernel 3.8.4, and after that update I can't authenticate at all.
Comment 14 headcrabextra 2013-05-04 21:34:21 UTC
I am using opensuse with Linux 3.7.10-1.1-desktop on lenovo y570 with BCM4313 (rev 1) and the connection brcmsmac is very bad. There are random disconnects, a lot of packet loss and overall connection is pretty bad.
Comment 15 Andrey Gusev 2014-08-06 20:35:51 UTC
I have similar hardware on my lenovo e135. Wifi have never worked good (3.14.* and 3.15.1). Signal was very weak and device was almost useless. I used wl driver, but it produces ops time to time and binary driver has known disadvantages.
I build the kernel 3.16.0. It looks like it works good! It need confirmation, because my access point is very close to notebook.
Wifi information:
root@debian:/home/andrey# lspci -s 02:00.0 -vvv
02:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)
	Subsystem: Broadcom Corporation Device 0608
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 17
	Region 0: Memory at f0a00000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=2 PME-
	Capabilities: [58] Vendor Specific Information: Len=78 <?>
	Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [d0] Express (v1) Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x1, ASPM L1, Latency L0 <4us, L1 <64us
			ClockPM+ Surprise- LLActRep+ BwNot-
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-
	Capabilities: [100 v1] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		AERCap:	First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
	Capabilities: [13c v1] Virtual Channel
		Caps:	LPEVC=0 RefClk=100ns PATEntryBits=1
		Arb:	Fixed- WRR32- WRR64- WRR128-
		Ctrl:	ArbSelect=Fixed
		Status:	InProgress-
		VC0:	Caps:	PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
			Arb:	Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
			Ctrl:	Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
			Status:	NegoPending- InProgress-
	Capabilities: [160 v1] Device Serial Number 00-00-3d-ff-ff-c1-c0-14
	Capabilities: [16c v1] Power Budgeting <?>
	Kernel driver in use: bcma-pci-bridge
root@debian:/home/andrey# lsmod | grep brc
brcmsmac              495082  0 
cordic                 12352  1 brcmsmac
brcmutil               13093  1 brcmsmac
bcma                   37206  1 brcmsmac
mac80211              477834  1 brcmsmac
cfg80211              414089  2 brcmsmac,mac80211

dmesg:
[  150.628120] cfg80211: Calling CRDA to update world regulatory domain
[  150.716239] bcma: bus0: Found chip with id 0x4313, rev 0x01 and package 0x08
[  150.716272] bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x24, class 0x0)
[  150.716293] bcma: bus0: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x18, class 0x0)
[  150.716330] bcma: bus0: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x11, class 0x0)
[  150.729390] bcma: bus0: Bus registered
[  150.736647] cfg80211: World regulatory domain updated:
[  150.736709] cfg80211:  DFS Master region: unset
[  150.736716] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[  150.736726] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[  150.736734] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[  150.736742] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[  150.736749] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[  150.736756] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[  150.736763] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[  150.763103] brcmsmac bcma0:0: mfg 4bf core 812 rev 24 class 0 irq 17
[  150.764078] cfg80211: Updating information on frequency 2412 MHz with regulatory rule:
[  150.764087] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764094] cfg80211: Updating information on frequency 2417 MHz with regulatory rule:
[  150.764101] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764106] cfg80211: Updating information on frequency 2422 MHz with regulatory rule:
[  150.764113] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764118] cfg80211: Updating information on frequency 2427 MHz with regulatory rule:
[  150.764124] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764129] cfg80211: Updating information on frequency 2432 MHz with regulatory rule:
[  150.764135] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764140] cfg80211: Updating information on frequency 2437 MHz with regulatory rule:
[  150.764146] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764151] cfg80211: Updating information on frequency 2442 MHz with regulatory rule:
[  150.764157] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764162] cfg80211: Updating information on frequency 2447 MHz with regulatory rule:
[  150.764168] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764173] cfg80211: Updating information on frequency 2452 MHz with regulatory rule:
[  150.764179] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764184] cfg80211: Updating information on frequency 2457 MHz with regulatory rule:
[  150.764189] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764194] cfg80211: Updating information on frequency 2462 MHz with regulatory rule:
[  150.764200] cfg80211: 2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A mBi, 1900 mBm)
[  150.764205] cfg80211: Updating information on frequency 2467 MHz with regulatory rule:
[  150.764211] cfg80211: 2457000 KHz - 2482000 KHz @ 20000 KHz), (N/A mBi, 1900 mBm)
[  150.764216] cfg80211: Updating information on frequency 2472 MHz with regulatory rule:
[  150.764222] cfg80211: 2457000 KHz - 2482000 KHz @ 20000 KHz), (N/A mBi, 1900 mBm)
[  150.764227] cfg80211: Disabling freq 2484 MHz as custom regd has no rule that fits it
[  150.764375] cfg80211: Ignoring regulatory request set by core since the driver uses its own custom regulatory domain
[  150.796370] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[  177.998704] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
[  177.998732] brcmsmac bcma0:0: brcms_ops_config: change power-save mode: false (implement)
[  177.999544] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  178.794701] cfg80211: Found new beacon on frequency: 2467 MHz (Ch 12) on phy0
[  186.516870] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
[  186.516898] brcmsmac bcma0:0: brcms_ops_config: change power-save mode: false (implement)
[  186.517613] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  186.984001] r8169 0000:03:00.0 eth0: link down
[  186.984090] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  187.385697] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
[  187.385725] brcmsmac bcma0:0: brcms_ops_config: change power-save mode: false (implement)
[  187.386332] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  190.573160] wlan0: authenticate with 00:13:10:f1:ed:d8
[  190.578512] wlan0: send auth to 00:13:10:f1:ed:d8 (try 1/3)
[  190.579977] wlan0: authenticated
[  190.580047] brcmsmac bcma0:0 wlan0: disabling HT/VHT due to WEP/TKIP use
[  190.580055] brcmsmac bcma0:0 wlan0: disabling HT as WMM/QoS is not supported by the AP
[  190.580059] brcmsmac bcma0:0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
[  190.581042] wlan0: associate with 00:13:10:f1:ed:d8 (try 1/3)
[  190.583574] wlan0: RX AssocResp from 00:13:10:f1:ed:d8 (capab=0x471 status=0 aid=1)
[  190.584136] brcmsmac bcma0:0: brcmsmac: brcms_ops_bss_info_changed: associated
[  190.584143] brcmsmac bcma0:0: brcms_ops_bss_info_changed: qos enabled: false (implement)
[  190.584156] wlan0: associated
[  190.584172] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  191.766557] brcmsmac bcma0:0: brcms_ops_bss_info_changed: arp filtering: 1 addresses (implement)
Comment 16 Andrey Gusev 2014-08-13 19:29:08 UTC
Unfortunately,my previous optimistic comment was wrong. Problem is still alive. One time card worked perfect, but it can not find all available wifi networks and can not find access point.