diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-03-26 22:43:33 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-03-26 22:43:33 +0000 |
commit | 5823bf90165faee604fbcdc23a53f745009ab763 (patch) | |
tree | 03f7da313d2b23052def69814dbfd47f0332e7ee | |
parent | ea1d2bae48c55b596796498785fc5a7cc0428dc0 (diff) |
ath9k: make sure that the rx path does not get stuck
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20499 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/mac80211/patches/550-ath9k_bb_fix.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/package/mac80211/patches/550-ath9k_bb_fix.patch b/package/mac80211/patches/550-ath9k_bb_fix.patch new file mode 100644 index 0000000000..17bee7c2c2 --- /dev/null +++ b/package/mac80211/patches/550-ath9k_bb_fix.patch @@ -0,0 +1,59 @@ +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -1911,6 +1911,34 @@ static void ath9k_enable_rfkill(struct a + REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB); + } + ++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) ++ return true; ++ ++ 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) + { +--- a/drivers/net/wireless/ath/ath9k/hw.h ++++ b/drivers/net/wireless/ath/ath9k/hw.h +@@ -679,6 +679,7 @@ void ath9k_hw_set11nmac2040(struct ath_h + void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period); + void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah, + const struct ath9k_beacon_state *bs); ++bool ath9k_hw_check_alive(struct ath_hw *ah); + + bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode); + +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -405,7 +405,8 @@ void ath9k_tasklet(unsigned long data) + + ath9k_ps_wakeup(sc); + +- if (status & ATH9K_INT_FATAL) { ++ if ((status & ATH9K_INT_FATAL) || ++ !ath9k_hw_check_alive(ah)) { + ath_reset(sc, false); + ath9k_ps_restore(sc); + return; |