summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/xmit.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-11-12 01:23:34 +0400
committerJohn W. Linville <linville@tuxdriver.com>2013-12-02 23:24:59 +0400
commit10ffb6a77e617a8f5ded84b504550759ec4a8df0 (patch)
tree6d0d2ed1a3ea82dda9367eb09b16119cc3747319 /drivers/net/wireless/ath/ath9k/xmit.c
parentbf3dac5a6fcf33a80c99e7b7406f8e5af99e2a70 (diff)
downloadlinux-10ffb6a77e617a8f5ded84b504550759ec4a8df0.tar.xz
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/ath/ath9k/xmit.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c3
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 95f6c5a8ee12..24846d91554b 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);
}