summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mshajakhan@atheros.com>2011-05-13 20:59:42 +0530
committerJohn W. Linville <linville@tuxdriver.com>2011-05-16 14:10:48 -0400
commit108697c44b8e50bea3505c6bf9667da4627cb2d5 (patch)
treeb98016826c33e5a2cc5950bccc8f84f223fb0bc9
parent21e8ee6d207f6d384689571101436eb9070c22ca (diff)
downloadop-kernel-dev-108697c44b8e50bea3505c6bf9667da4627cb2d5.zip
op-kernel-dev-108697c44b8e50bea3505c6bf9667da4627cb2d5.tar.gz
ath9k: make npending frames check as bool
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3381609..45303bdb 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2276,7 +2276,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);
@@ -2285,7 +2285,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)
OpenPOWER on IntegriCloud