Skip to content

Commit

Permalink
ath9k: fix tx queue scheduling after channel changes
Browse files Browse the repository at this point in the history
Otherwise, if queues are full during a scan, tx scheduling does not
resume after switching back to the home channel.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Oct 7, 2013
1 parent c1a305a commit ec30326
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
unsigned long flags;
int i;

if (ath_startrecv(sc) != 0) {
ath_err(common, "Unable to restart recv logic\n");
Expand Down Expand Up @@ -235,6 +236,15 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
}
work:
ath_restart_work(sc);

for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
if (!ATH_TXQ_SETUP(sc, i))
continue;

spin_lock_bh(&sc->tx.txq[i].axq_lock);
ath_txq_schedule(sc, &sc->tx.txq[i]);
spin_unlock_bh(&sc->tx.txq[i].axq_lock);
}
}

ieee80211_wake_queues(sc->hw);
Expand Down Expand Up @@ -539,21 +549,10 @@ irqreturn_t ath_isr(int irq, void *dev)

static int ath_reset(struct ath_softc *sc)
{
int i, r;
int r;

ath9k_ps_wakeup(sc);

r = ath_reset_internal(sc, NULL);

for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
if (!ATH_TXQ_SETUP(sc, i))
continue;

spin_lock_bh(&sc->tx.txq[i].axq_lock);
ath_txq_schedule(sc, &sc->tx.txq[i]);
spin_unlock_bh(&sc->tx.txq[i].axq_lock);
}

ath9k_ps_restore(sc);

return r;
Expand Down

0 comments on commit ec30326

Please sign in to comment.