Skip to content

Commit

Permalink
ath9k: Check pending frames properly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Oct 2, 2014
1 parent 4b60af4 commit b736728
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit b736728

Please sign in to comment.