summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-11-16 01:41:06 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-11-17 21:32:16 +0100
commite21a1d8b2b92e78fca0b4ee48681aa03dd671f88 (patch)
tree80e336f2a4c87f12c84a2b77e67bc89d145b4c19 /drivers
parentath9k: Fix thermometer programming (diff)
downloadlinux-e21a1d8b2b92e78fca0b4ee48681aa03dd671f88.tar.xz
linux-e21a1d8b2b92e78fca0b4ee48681aa03dd671f88.zip
ath9k: Clear offchannel state properly
When a pending roc or scan operation is cancelled, the offchannel operation is cleared, but the offchannel state in the main scheduler is not cleared. This causes problems since an active GO will try to process a stale offchannel request that was deferred earlier. Fix this by clearing the state when there is no pending offchannel (roc/scan) operation. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/channel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
index 1dadf6d77a82..ee76682cc058 100644
--- a/drivers/net/wireless/ath/ath9k/channel.c
+++ b/drivers/net/wireless/ath/ath9k/channel.c
@@ -900,6 +900,11 @@ void ath_offchannel_next(struct ath_softc *sc)
sc->offchannel.state = ATH_OFFCHANNEL_ROC_START;
ath_chanctx_offchan_switch(sc, sc->offchannel.roc_chan);
} else {
+ spin_lock_bh(&sc->chan_lock);
+ sc->sched.offchannel_pending = false;
+ sc->sched.wait_switch = false;
+ spin_unlock_bh(&sc->chan_lock);
+
ath_chanctx_switch(sc, ath_chanctx_get_oper_chan(sc, false),
NULL);
sc->offchannel.state = ATH_OFFCHANNEL_IDLE;