Re: 3.1+ iwlwifi lockup

From: Emmanuel Grumbach
Date: Thu Nov 24 2011 - 10:00:19 EST


Hi,

can you please that one ?
it solves a race in mac80211 (thanks to Johannes) ?

It should solved the annoying WARN_ON about the bad shape of the AGG
state machine.

Thanks

Emmanuel Grumbach
egrumbach@xxxxxxxxx



On Wed, Nov 23, 2011 at 06:17, Dave Jones <davej@xxxxxxxxxx> wrote:
> On Tue, Nov 22, 2011 at 06:56:05PM -0800, Guy, Wey-Yi wrote:
>  > Agree, that is why I could not re-produce here after many try. Could you
>  > share your configuration, such as
>
>  > band/channel
>
> Channel:1
> Frequency:2.412 GHz (Channel 1)
>
>  > 32/64 bit system
>
> 64bit. It's a Dell Adamo laptop.
>
>  > 20/40 MHz
>
> not sure how to find out what you're looking for.
>
>  > traffic type
>
> last triggered it with just ssh.
>
>  > open/security
>
> IE: IEEE 802.11i/WPA2 Version 1
>    Group Cipher : CCMP
>    Pairwise Ciphers (1) : CCMP
>    Authentication Suites (1) : PSK
>
>  > power management
>
> nothing special. everything is default.
>
> all messages related to iwlwifi in dmesg are below..
>
>        Dave
>
> [   24.423300] Intel(R) Wireless WiFi Link AGN driver for Linux, in-tree:d
> [   24.425560] Copyright(c) 2003-2011 Intel Corporation
> [   24.428667] iwlwifi 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
> [   24.437959] iwlwifi 0000:04:00.0: setting latency timer to 64
> [   24.438108] iwlwifi 0000:04:00.0: pci_resource_len = 0x00002000
> [   24.444058] iwlwifi 0000:04:00.0: pci_resource_base = ffffc90011574000
> [   24.445823] iwlwifi 0000:04:00.0: HW Revision ID = 0x0
> [   24.447695] iwlwifi 0000:04:00.0: irq 46 for MSI/MSI-X
> [   24.447896] iwlwifi 0000:04:00.0: Detected Intel(R) Ultimate N WiFi Link 5300 AGN, REV=0x24
> [   24.453070] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S
> [   24.486217] iwlwifi 0000:04:00.0: device EEPROM VER=0x120, CALIB=0x4
> [   24.489176] iwlwifi 0000:04:00.0: Device SKU: 0Xf0
> [   24.490778] iwlwifi 0000:04:00.0: Tunable channels: 13 802.11bg, 24 802.11a channels
> [   24.520548] iwlwifi 0000:04:00.0: loaded firmware version 8.83.5.1 build 33692
> [   39.229498] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S
> [   39.240818] iwlwifi 0000:04:00.0: Radio type=0x0-0x2-0x0
> [   39.607327] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S
> [   39.613424] iwlwifi 0000:04:00.0: Radio type=0x0-0x2-0x0
> [  210.248807] iwlwifi 0000:04:00.0: Tx aggregation enabled on ra = b8:c7:5d:0c:39:87 tid = 6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 39d72cc..2dbed79 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -188,6 +188,8 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
*/
clear_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state);

+ synchronize_net();
+
tid_tx->stop_initiator = initiator;
tid_tx->tx_stop = tx;