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>
This commit is contained in:
Felix Fietkau
2014-06-11 16:18:01 +05:30
committed by John W. Linville
parent 26f16c246c
commit 8d7e09dda8
5 changed files with 37 additions and 5 deletions

View File

@@ -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;