aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/pcu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath5k/pcu.c')
-rw-r--r--drivers/net/wireless/ath5k/pcu.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath5k/pcu.c b/drivers/net/wireless/ath5k/pcu.c
index c77cee2a5582..a47df9a24aa1 100644
--- a/drivers/net/wireless/ath5k/pcu.c
+++ b/drivers/net/wireless/ath5k/pcu.c
@@ -633,8 +633,20 @@ u64 ath5k_hw_get_tsf64(struct ath5k_hw *ah)
633 */ 633 */
634void ath5k_hw_reset_tsf(struct ath5k_hw *ah) 634void ath5k_hw_reset_tsf(struct ath5k_hw *ah)
635{ 635{
636 u32 val;
637
636 ATH5K_TRACE(ah->ah_sc); 638 ATH5K_TRACE(ah->ah_sc);
637 AR5K_REG_ENABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_RESET_TSF); 639
640 val = ath5k_hw_reg_read(ah, AR5K_BEACON) | AR5K_BEACON_RESET_TSF;
641
642 /*
643 * Each write to the RESET_TSF bit toggles a hardware internal
644 * signal to reset TSF, but if left high it will cause a TSF reset
645 * on the next chip reset as well. Thus we always write the value
646 * twice to clear the signal.
647 */
648 ath5k_hw_reg_write(ah, val, AR5K_BEACON);
649 ath5k_hw_reg_write(ah, val, AR5K_BEACON);
638} 650}
639 651
640/* 652/*