ath9k: Adjust tbtt delta properly
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Sun, 16 Nov 2014 00:41:09 +0000 (06:11 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 17 Nov 2014 20:32:17 +0000 (15:32 -0500)
commitd9092c9873739429c9e97c4bc21ead9af2fb6aa1
tree892ed9aef936090da516a01ca6a8703821e82301
parent2c3634a8d4c66f743d11dab03d0e66d77b6aac05
ath9k: Adjust tbtt delta properly

In a GO/STA setup, when we switch to the STA context,
the channel context timer is scheduled with a period of
half the beacon interval. If a beacon is received in
this duration, the timer is adjusted to accommodate
TSF sync done by the HW.

But, if the actual channel switch is delayed for some
reason, we end up rearming the timer every time a new
beacon is received. Avoid this by doing the adjustment
only once.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/channel.c