]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ath9k: Check pending frames properly
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Thu, 2 Oct 2014 01:03:13 +0000 (06:33 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 2 Oct 2014 18:26:31 +0000 (14:26 -0400)
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_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/main.c

index 32f9db9bd53c4b80d04a4bbd97d5e32ce227f885..4466de0740f955dc41aca9a68e978de8561db366 100644 (file)
@@ -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;
 }