ath9k: optimize ath_drain_all_txq

If the software has processed all packets, checking the hardware queue
is unnecessary.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Felix Fietkau 2013-11-11 22:23:34 +01:00 committed by John W. Linville
parent bf3dac5a6f
commit 10ffb6a77e
1 changed files with 3 additions and 0 deletions

View File

@ -1786,6 +1786,9 @@ bool ath_drain_all_txq(struct ath_softc *sc)
if (!ATH_TXQ_SETUP(sc, i))
continue;
if (!sc->tx.txq[i].axq_depth)
continue;
if (ath9k_hw_numtxpending(ah, sc->tx.txq[i].axq_qnum))
npend |= BIT(i);
}