summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/channel.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-10-17 02:10:10 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2014-10-27 18:16:14 (GMT)
commitbe247c1faeeead695378989a0806951ebf0403ae (patch)
treebfa5700d163dbe068214c89374664760a96ad9ff /drivers/net/wireless/ath/ath9k/channel.c
parentb8f9279be048677d6d8244dd91493f684ce5c7d0 (diff)
downloadlinux-be247c1faeeead695378989a0806951ebf0403ae.tar.xz
ath9k: Process beacons properly
When the current operating channel context has been marked as ATH_CHANCTX_STATE_FORCE_ACTIVE, do not process beacons that might be received, since we have to wait for the station to become authorized. Also, since the cached TSF value will be zero initially do not rearm the timer in this case when a beacon is received, since it results in spurious values. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/channel.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/channel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
index 16bed6a..135f74c 100644
--- a/drivers/net/wireless/ath/ath9k/channel.c
+++ b/drivers/net/wireless/ath/ath9k/channel.c
@@ -495,10 +495,15 @@ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif,
sc->cur_chan == &sc->offchannel.chan)
break;
- ath_chanctx_adjust_tbtt_delta(sc);
sc->sched.beacon_pending = false;
sc->sched.beacon_miss = 0;
+ if (sc->sched.state == ATH_CHANCTX_STATE_FORCE_ACTIVE ||
+ !sc->cur_chan->tsf_val)
+ break;
+
+ ath_chanctx_adjust_tbtt_delta(sc);
+
/* TSF time might have been updated by the incoming beacon,
* need update the channel switch timer to reflect the change.
*/