From: Sujith Manoharan <c_man...@qca.qualcomm.com>

There is no need to check if the current
channel context has active ACs queued up
if the TX queue is not empty.

Signed-off-by: Sujith Manoharan <c_man...@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c 
b/drivers/net/wireless/ath/ath9k/main.c
index ae7c6ee..84c0cd4 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -60,8 +60,10 @@ static bool ath9k_has_pending_frames(struct ath_softc *sc, 
struct ath_txq *txq)
 
        spin_lock_bh(&txq->axq_lock);
 
-       if (txq->axq_depth)
+       if (txq->axq_depth) {
                pending = true;
+               goto out;
+       }
 
        if (txq->mac80211_qnum >= 0) {
                struct list_head *list;
@@ -70,6 +72,7 @@ static bool ath9k_has_pending_frames(struct ath_softc *sc, 
struct ath_txq *txq)
                if (!list_empty(list))
                        pending = true;
        }
+out:
        spin_unlock_bh(&txq->axq_lock);
        return pending;
 }
-- 
2.1.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to