summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-06-11 16:18:01 +0530
committerJohn W. Linville <linville@tuxdriver.com>2014-06-19 15:49:18 -0400
commit8d7e09dda8214e4154f45238b4c85ab1ecb5d89a (patch)
tree88de4d537ffdc6edefc9e3a4e486a7bbf3029239 /drivers/net/wireless/ath/ath9k/main.c
parent26f16c246cea41f30ab2f63214a5529678677d0d (diff)
downloadlwn-8d7e09dda8214e4154f45238b4c85ab1ecb5d89a.tar.gz
lwn-8d7e09dda8214e4154f45238b4c85ab1ecb5d89a.zip
ath9k: save tsf in channel context
Save TSF in channel context for multiple operating channels. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> 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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 85db24be8eec..6abdf99ffae4 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -240,6 +240,16 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
ath9k_hw_enable_interrupts(ah);
if (!sc->cur_chan->offchannel && start) {
+ /* restore per chanctx TSF timer */
+ if (sc->cur_chan->tsf_val) {
+ u32 offset;
+
+ offset = ath9k_hw_get_tsf_offset(&sc->cur_chan->tsf_ts,
+ NULL);
+ ath9k_hw_settsf64(ah, sc->cur_chan->tsf_val + offset);
+ }
+
+
if (!test_bit(ATH_OP_BEACONS, &common->op_flags))
goto work;