Skip to content

Commit

Permalink
ath9k: Clear offchannel state properly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Nov 17, 2014
1 parent 89b6e35 commit e21a1d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/ath/ath9k/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e21a1d8

Please sign in to comment.