diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2015-02-02 15:51:12 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-02-06 09:39:37 +0300 |
commit | 23ee7c33aa7caae5985a919e597ba2e355d540ea (patch) | |
tree | a17e78bdd62d3adbf6c9ef63c26f73605a55b560 /drivers/net/wireless/ath/ath9k/ar9003_wow.c | |
parent | b6f68b1ecbffc0aec1704c731c3b99acbe3becfd (diff) | |
download | linux-23ee7c33aa7caae5985a919e597ba2e355d540ea.tar.xz |
ath9k: Clear TSF2 properly
Chips in the AR9003 family have a second TSF, which
needs to be cleared when putting the card to
sleep.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_wow.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_wow.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_wow.c b/drivers/net/wireless/ath/ath9k/ar9003_wow.c index cf45b91f0a60..2dc50a0eedc4 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_wow.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_wow.c @@ -35,6 +35,15 @@ static void ath9k_hw_set_powermode_wow_sleep(struct ath_hw *ah) return; } + if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { + if (!REG_READ(ah, AR_MAC_PCU_GEN_TIMER_TSF_SEL)) + REG_CLR_BIT(ah, AR_DIRECT_CONNECT, AR_DC_TSF2_ENABLE); + } else if (AR_SREV_9485(ah)){ + if (!(REG_READ(ah, AR_NDP2_TIMER_MODE) & + AR_GEN_TIMERS2_MODE_ENABLE_MASK)) + REG_CLR_BIT(ah, AR_DIRECT_CONNECT, AR_DC_TSF2_ENABLE); + } + REG_WRITE(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_ON_INT); } |