linux-kernel-test/drivers/net/wireless
Luis R. Rodriguez 8ab2cd09fe ath9k: fix power save race conditions
ath9k has a race on putting the chip into network sleep and
having registers read from hardware. The race occurs because
although ath9k_ps_restore() locks its own callers it makes use
of some variables which get altered in the driver at different
code paths. The variables are the ps_enabled and ps_flags.

This is easily reprodicible in large network environments when
roaming with the wpa_supplicant simple bgscan. You'd get some
0xdeadbeef read out on certain registers such as:

ath: timeout (100000 us) on reg 0x806c: 0xdeadbeef & 0x01f00000 != 0x00000000
ath: RX failed to go idle in 10 ms RXSM=0xdeadbeef

ath: timeout (100000 us) on reg 0x7000: 0xdeadbeef & 0x00000003 != 0x00000000
ath: Chip reset failed

The fix is to protect the ath9k_config(hw, IEEE80211_CONF_CHANGE_PS)
calls with a spin_lock_irqsave() which will disable contendors for
these variables from interrupt context, timers, re-entry from mac80211
on the same callback, and most importantly from ath9k_ps_restore()
which is the only call which will put the device into network sleep.

There are quite a few threads and bug reports on these a few of them are:

https://bugs.launchpad.net/ubuntu/karmic/+source/linux/+bug/407040
http://code.google.com/p/chromium-os/issues/detail?id=5709
http://code.google.com/p/chromium-os/issues/detail?id=5943

Stable fixes apply to [2.6.32+]

Cc: stable@kernel.org
Cc: Paul Stewart <pstew@google.com>
Cc: Amod Bodas <amod.bodas@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-16 15:46:09 -04:00
..
ath ath9k: fix power save race conditions 2010-09-16 15:46:09 -04:00
b43 b43: N-PHY: add missing phyrxchain setting and fix warning in RX core function 2010-08-25 14:33:20 -04:00
b43legacy b43legacy: update hw/fw version info in wiphy struct 2010-08-16 14:39:45 -04:00
hostap Hostap: Fix "'ret' set but not used" warning message from GCC in hostap 2010-08-24 16:28:20 -04:00
ipw2x00 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-08-24 16:35:40 -04:00
iwlwifi iwlwifi: fix sparse warning about wrong enum for band parameter 2010-09-16 15:46:02 -04:00
iwmc3200wifi iwm3200wifi: remove comparison to WIFI_IF_NTFY_MAX in iwm_ntf_wifi_if_wrapper 2010-08-16 14:39:48 -04:00
libertas libertas: correct sparse warnings 2010-09-16 15:46:04 -04:00
libertas_tf libertas_tf: if_usb.c: Some more formatting fixes 2010-08-16 15:26:37 -04:00
orinoco orinoco: Fix walking past the end of the buffer 2010-08-25 14:33:17 -04:00
p54 p54spi: Add error message for eeprom failure 2010-09-07 13:54:34 -04:00
prism54 drivers/net/wireless/prism54: Adjust confusing if indentation 2010-08-16 15:26:41 -04:00
rt2x00 rt2x00: fix oops in rt2x00lib_txdone with rt61pci 2010-09-14 16:03:44 -04:00
rtl818x Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-08-24 16:35:40 -04:00
wl12xx wl1271: remove warnings in wl1271_sdio_set_power 2010-09-14 16:26:44 -04:00
zd1211rw zd1211rw: update fw version info in wiphy struct 2010-08-16 14:39:45 -04:00
adm8211.c drivers/net/wireless: Restore upper case words in wiphy_<level> messages 2010-08-18 16:37:44 -04:00
adm8211.h
airo_cs.c
airo.c airo: make strings const 2010-09-07 13:54:33 -04:00
airo.h
at76c50x-usb.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-08-24 16:35:40 -04:00
at76c50x-usb.h
atmel_cs.c
atmel_pci.c
atmel.c
atmel.h
Kconfig
mac80211_hwsim.c mac80211: add p2p device type support 2010-09-16 15:46:07 -04:00
Makefile
mwl8k.c drivers/net/wireless: Restore upper case words in wiphy_<level> messages 2010-08-18 16:37:44 -04:00
ray_cs.c ray_cs: make data const 2010-09-07 13:54:32 -04:00
ray_cs.h
rayctl.h
rndis_wlan.c
wl3501_cs.c
wl3501.h
zd1201.c
zd1201.h