1 From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
2 Date: Fri, 17 Oct 2014 07:40:10 +0530
3 Subject: [PATCH] ath9k: Process beacons properly
5 When the current operating channel context has
6 been marked as ATH_CHANCTX_STATE_FORCE_ACTIVE,
7 do not process beacons that might be received,
8 since we have to wait for the station to become
11 Also, since the cached TSF value will be zero
12 initially do not rearm the timer in this
13 case when a beacon is received, since it results
16 Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
19 --- a/drivers/net/wireless/ath/ath9k/channel.c
20 +++ b/drivers/net/wireless/ath/ath9k/channel.c
21 @@ -495,10 +495,15 @@ void ath_chanctx_event(struct ath_softc
22 sc->cur_chan == &sc->offchannel.chan)
25 - ath_chanctx_adjust_tbtt_delta(sc);
26 sc->sched.beacon_pending = false;
27 sc->sched.beacon_miss = 0;
29 + if (sc->sched.state == ATH_CHANCTX_STATE_FORCE_ACTIVE ||
30 + !sc->cur_chan->tsf_val)
33 + ath_chanctx_adjust_tbtt_delta(sc);
35 /* TSF time might have been updated by the incoming beacon,
36 * need update the channel switch timer to reflect the change.