]> git.baikalelectronics.ru Git - kernel.git/commit
brcmsmac: fix tx status processing
authorArend van Spriel <arend@broadcom.com>
Tue, 22 Jan 2013 21:47:40 +0000 (22:47 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 28 Jan 2013 19:48:52 +0000 (14:48 -0500)
commitb14e28ea658673c3aa5b0cba7ca29571c2012489
treee82d3c86f83bc771ceb078460bdcf18ba5755329
parentc68db5038b617a858757670a2ab68542d2830114
brcmsmac: fix tx status processing

This issue was reported on the wireless list (see [1]) in which
brcmsmac ran into a fatal error:

[  588.284074] brcmsmac bcma0:0: frameid != txh->TxFrameID
[  588.284098] brcmsmac bcma0:0: MI_TFS: fatal
[  588.284103] brcmsmac bcma0:0: wl0: fatal error, reinitializing
[  588.286208] ieee80211 phy0: Hardware restart was requested

The tx status feedback is processed in a loop limiting the number of
frames processed in one run. The code terminate processing when the
limit is reached regardless the txstatus value read from the device
register. When that status is is flagged as being valid it must be
processed as the hardware will clear it after is has been read.

Bisecting was done by Seth Forshee and showed following commit as the
culprit:

commit 67c2bf5b3f658626708d3647dd3612a0d3fd7e4c
Author: Piotr Haber <phaber@broadcom.com>
Date:   Wed Nov 28 21:44:07 2012 +0100

    brcmsmac: fix bounds checking in tx/rx

[1] http://www.spinics.net/lists/linux-wireless/msg101293.html

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmsmac/main.c