From: Felix Fietkau Date: Mon, 11 Nov 2013 21:23:34 +0000 (+0100) Subject: ath9k: optimize ath_drain_all_txq X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=10ffb6a77e617a8f5ded84b504550759ec4a8df0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ath9k: optimize ath_drain_all_txq If the software has processed all packets, checking the hardware queue is unnecessary. Signed-off-by: Felix Fietkau Signed-off-by: John W. Linville --- 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); }