diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-04-19 19:57:29 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-20 11:50:52 -0400 |
commit | c9c99e5e440013c420fd8ec41ee83e89909d5186 (patch) | |
tree | 99bc6b0e758937c899d0ef4b28b6a30385d21139 /drivers/net/wireless/ath/ath9k/hw.c | |
parent | 80725f454e58937ad546103e6a141c46b0d65a1b (diff) | |
download | linux-stable-c9c99e5e440013c420fd8ec41ee83e89909d5186.tar.gz linux-stable-c9c99e5e440013c420fd8ec41ee83e89909d5186.tar.bz2 linux-stable-c9c99e5e440013c420fd8ec41ee83e89909d5186.zip |
ath9k: check for specific rx stuck conditions and recover from them
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 0b85f68d516f..11e6a897c21a 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -1159,6 +1159,34 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah, return true; } +bool ath9k_hw_check_alive(struct ath_hw *ah) +{ + int count = 50; + u32 reg; + + if (AR_SREV_9285_10_OR_LATER(ah)) + return true; + + do { + reg = REG_READ(ah, AR_OBS_BUS_1); + + if ((reg & 0x7E7FFFEF) == 0x00702400) + continue; + + switch (reg & 0x7E000B00) { + case 0x1E000000: + case 0x52000B00: + case 0x18000B00: + continue; + default: + return true; + } + } while (count-- > 0); + + return false; +} +EXPORT_SYMBOL(ath9k_hw_check_alive); + int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, bool bChannelChange) { |