]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ath9k: Clear offchannel state properly
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Sun, 16 Nov 2014 00:41:06 +0000 (06:11 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 17 Nov 2014 20:32:16 +0000 (15:32 -0500)
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>
drivers/net/wireless/ath/ath9k/channel.c

index 1dadf6d77a8237de72d1f0d2abfd2ef94a2f1b41..ee76682cc0584ab4c19f263cb7f233959123ed9c 100644 (file)
@@ -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;