summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-09-10 19:15:58 +0530
committerJohn W. Linville <linville@tuxdriver.com>2014-09-11 15:27:39 -0400
commit124130d766cefe8e6578695bc33bdc121c8cfaf3 (patch)
tree0ff2fbdf74c9cfa1384e176de78c35d86bb41e1b /drivers/net/wireless/ath/ath9k
parentd0975edd59b94d8906008cf3c68020a44cc198c5 (diff)
downloadlwn-124130d766cefe8e6578695bc33bdc121c8cfaf3.tar.gz
lwn-124130d766cefe8e6578695bc33bdc121c8cfaf3.zip
ath9k: Clear offchannel duration properly
Clearing the offchannel duration value in the scheduler unconditionally breaks NoA when multiple contexts are active and an offchannel request is deferred, for example, in a scan run. Fix this by clearing the duration only if there is no pending offchannel request. 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')
-rw-r--r--drivers/net/wireless/ath/ath9k/channel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
index ab3d29d2ee9f..09ff8a6e8966 100644
--- a/drivers/net/wireless/ath/ath9k/channel.c
+++ b/drivers/net/wireless/ath/ath9k/channel.c
@@ -1065,7 +1065,10 @@ void ath_chanctx_set_next(struct ath_softc *sc, bool force)
sc->cur_chan = sc->next_chan;
sc->cur_chan->stopped = false;
sc->next_chan = NULL;
- sc->sched.offchannel_duration = 0;
+
+ if (!sc->sched.offchannel_pending)
+ sc->sched.offchannel_duration = 0;
+
if (sc->sched.state != ATH_CHANCTX_STATE_FORCE_ACTIVE)
sc->sched.state = ATH_CHANCTX_STATE_IDLE;