diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-11-11 22:23:34 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-12-02 14:24:59 -0500 |
commit | 10ffb6a77e617a8f5ded84b504550759ec4a8df0 (patch) | |
tree | 6d0d2ed1a3ea82dda9367eb09b16119cc3747319 /drivers/net/wireless | |
parent | bf3dac5a6fcf33a80c99e7b7406f8e5af99e2a70 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 95f6c5a8ee1..24846d91554 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -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); } |