summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-12-14 18:03:45 +0100
committerJohn W. Linville <linville@tuxdriver.com>2013-12-18 15:23:34 -0500
commita35051ce1733f524c12a8246641ded5d0409817d (patch)
tree4a6f3b71e6a4f63191ef6b8c277f119900f44d7f /drivers/net/wireless/ath/ath9k/main.c
parent4ed15762dce67192d4662860470a8be1f6d5fd53 (diff)
downloadlwn-a35051ce1733f524c12a8246641ded5d0409817d.tar.gz
lwn-a35051ce1733f524c12a8246641ded5d0409817d.zip
ath9k: properly preserve TSF across reset
The beacon code previously reset TSF on every configuration call, as some of the code was not prepared to properly calculate nexttbtt based on current TSF. This patch adds a common function for calculating nexttbtt and moves the TSF reset to driver start. This should improve AP mode compatibility with various stations that expect the TSF to not randomly jump due to hardware resets. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 4798f6ae061e..6a231201c7dc 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -760,6 +760,8 @@ static int ath9k_start(struct ieee80211_hw *hw)
*/
ath9k_cmn_init_crypto(sc->sc_ah);
+ ath9k_hw_reset_tsf(ah);
+
spin_unlock_bh(&sc->sc_pcu_lock);
mutex_unlock(&sc->mutex);