diff mbox

ath9k: make npending frames check as bool

Message ID 1305300582-5723-1-git-send-email-mshajakhan@atheros.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Mohammed Shafi Shajakhan May 13, 2011, 3:29 p.m. UTC
From: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>

we are not doing anything by tracking the number of pending frames.
bail out when we first find a pending frame in any one of the 10 queues.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/main.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 4eec494..17ebdf1 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2284,7 +2284,7 @@  static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
 		timeout = 1;
 
 	for (j = 0; j < timeout; j++) {
-		int npend = 0;
+		bool npend = false;
 
 		if (j)
 			usleep_range(1000, 2000);
@@ -2293,7 +2293,10 @@  static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
 			if (!ATH_TXQ_SETUP(sc, i))
 				continue;
 
-			npend += ath9k_has_pending_frames(sc, &sc->tx.txq[i]);
+			npend = ath9k_has_pending_frames(sc, &sc->tx.txq[i]);
+
+			if (npend)
+				break;
 		}
 
 		if (!npend)