aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-04-19 13:57:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-20 11:50:52 -0400
commitc9c99e5e440013c420fd8ec41ee83e89909d5186 (patch)
tree99bc6b0e758937c899d0ef4b28b6a30385d21139 /drivers/net/wireless/ath/ath9k/hw.c
parent80725f454e58937ad546103e6a141c46b0d65a1b (diff)
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.c28
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,
1159 return true; 1159 return true;
1160} 1160}
1161 1161
1162bool ath9k_hw_check_alive(struct ath_hw *ah)
1163{
1164 int count = 50;
1165 u32 reg;
1166
1167 if (AR_SREV_9285_10_OR_LATER(ah))
1168 return true;
1169
1170 do {
1171 reg = REG_READ(ah, AR_OBS_BUS_1);
1172
1173 if ((reg & 0x7E7FFFEF) == 0x00702400)
1174 continue;
1175
1176 switch (reg & 0x7E000B00) {
1177 case 0x1E000000:
1178 case 0x52000B00:
1179 case 0x18000B00:
1180 continue;
1181 default:
1182 return true;
1183 }
1184 } while (count-- > 0);
1185
1186 return false;
1187}
1188EXPORT_SYMBOL(ath9k_hw_check_alive);
1189
1162int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, 1190int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
1163 bool bChannelChange) 1191 bool bChannelChange)
1164{ 1192{