Commit e21a1d8b authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville
Browse files

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: default avatarSujith Manoharan <>
Signed-off-by: default avatarJohn W. Linville <>
parent 89b6e35c
......@@ -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 {
sc->sched.offchannel_pending = false;
sc->sched.wait_switch = false;
ath_chanctx_switch(sc, ath_chanctx_get_oper_chan(sc, false),
sc->offchannel.state = ATH_OFFCHANNEL_IDLE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment