ath9k: Restart TSF2 timers on wakeup
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Thu, 5 Feb 2015 04:52:44 +0000 (10:22 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 26 Feb 2015 12:58:46 +0000 (14:58 +0200)
When coming out of WoW sleep, check and restart
timers based on TSF2.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/ar9003_wow.c

index efeb9d770899989d5fb7c0b37bb7bad83301ca74..bea41df9fbd7407575f79349ac7d4b68ed72d955 100644 (file)
@@ -252,6 +252,13 @@ u32 ath9k_hw_wow_wakeup(struct ath_hw *ah)
        if (ah->is_pciexpress)
                ath9k_hw_configpcipowersave(ah, false);
 
+       if (AR_SREV_9462(ah) || AR_SREV_9565(ah) || AR_SREV_9485(ah)) {
+               u32 dc = REG_READ(ah, AR_DIRECT_CONNECT);
+
+               if (!(dc & AR_DC_TSF2_ENABLE))
+                       ath9k_hw_gen_timer_start_tsf2(ah);
+       }
+
        ah->wow.wow_event_mask = 0;
        ah->wow.wow_event_mask2 = 0;