From 7dc319400d9c496f0429cf8c660c2538753fdce1 Mon Sep 17 00:00:00 2001 From: Bob Copeland Date: Sun, 28 Sep 2008 12:09:43 -0400 Subject: [PATCH] --- yaml --- r: 111979 b: refs/heads/master c: 14be9947ef9843102b67d315c7483de112b5b2d7 h: refs/heads/master i: 111977: 50a80b849e05bdc7f58d2596b01497e13f01a8ba 111975: eb0461f343834ab2a2c4f33154a385577028c8b8 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath5k/pcu.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 6bb96f061e0d..7da4f5105fa7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b0dee5784dff3e2984510a7fe7a7e48109001f94 +refs/heads/master: 14be9947ef9843102b67d315c7483de112b5b2d7 diff --git a/trunk/drivers/net/wireless/ath5k/pcu.c b/trunk/drivers/net/wireless/ath5k/pcu.c index c77cee2a5582..a47df9a24aa1 100644 --- a/trunk/drivers/net/wireless/ath5k/pcu.c +++ b/trunk/drivers/net/wireless/ath5k/pcu.c @@ -633,8 +633,20 @@ u64 ath5k_hw_get_tsf64(struct ath5k_hw *ah) */ void ath5k_hw_reset_tsf(struct ath5k_hw *ah) { + u32 val; + ATH5K_TRACE(ah->ah_sc); - AR5K_REG_ENABLE_BITS(ah, AR5K_BEACON, AR5K_BEACON_RESET_TSF); + + val = ath5k_hw_reg_read(ah, AR5K_BEACON) | AR5K_BEACON_RESET_TSF; + + /* + * Each write to the RESET_TSF bit toggles a hardware internal + * signal to reset TSF, but if left high it will cause a TSF reset + * on the next chip reset as well. Thus we always write the value + * twice to clear the signal. + */ + ath5k_hw_reg_write(ah, val, AR5K_BEACON); + ath5k_hw_reg_write(ah, val, AR5K_BEACON); } /*