]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ath9k: wake up the chip for TSF reset
authorGabor Juhos <juhosg@openwrt.org>
Sat, 20 Jun 2009 22:02:14 +0000 (00:02 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 24 Jul 2009 19:05:26 +0000 (15:05 -0400)
If we are in NETWORK SLEEP state, AR_SLP32_TSF_WRITE_STATUS limit
always exceeds in 'ath9k_hw_reset_tsf', because reading of the
AR_SLP3 register always return with the magic 0xdeadbeef value.

Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c

index b9d1a13ba1647ce343a6d2f0b21d8adebe5300b8..98537698be227da172c2d456a53a5d8545361fb6 100644 (file)
@@ -3842,6 +3842,7 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah)
 {
        int count;
 
+       ath9k_ps_wakeup(ah->ah_sc);
        count = 0;
        while (REG_READ(ah, AR_SLP32_MODE) & AR_SLP32_TSF_WRITE_STATUS) {
                count++;
@@ -3853,6 +3854,7 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah)
                udelay(10);
        }
        REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE);
+       ath9k_ps_restore(ah->ah_sc);
 }
 
 bool ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting)