Commit 1b7e528b authored by Gabor Juhos's avatar Gabor Juhos Committed by John W. Linville

ath9k: wake up the chip for TSF reset

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: default avatarGabor Juhos <juhosg@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent da3c821f
...@@ -3842,6 +3842,7 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah) ...@@ -3842,6 +3842,7 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah)
{ {
int count; int count;
ath9k_ps_wakeup(ah->ah_sc);
count = 0; count = 0;
while (REG_READ(ah, AR_SLP32_MODE) & AR_SLP32_TSF_WRITE_STATUS) { while (REG_READ(ah, AR_SLP32_MODE) & AR_SLP32_TSF_WRITE_STATUS) {
count++; count++;
...@@ -3853,6 +3854,7 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah) ...@@ -3853,6 +3854,7 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah)
udelay(10); udelay(10);
} }
REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE); 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) bool ath9k_hw_set_tsfadjust(struct ath_hw *ah, u32 setting)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment