aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 33816091b439..45303bdbc465 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)
2276 timeout = 1; 2276 timeout = 1;
2277 2277
2278 for (j = 0; j < timeout; j++) { 2278 for (j = 0; j < timeout; j++) {
2279 int npend = 0; 2279 bool npend = false;
2280 2280
2281 if (j) 2281 if (j)
2282 usleep_range(1000, 2000); 2282 usleep_range(1000, 2000);
@@ -2285,7 +2285,10 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
2285 if (!ATH_TXQ_SETUP(sc, i)) 2285 if (!ATH_TXQ_SETUP(sc, i))
2286 continue; 2286 continue;
2287 2287
2288 npend += ath9k_has_pending_frames(sc, &sc->tx.txq[i]); 2288 npend = ath9k_has_pending_frames(sc, &sc->tx.txq[i]);
2289
2290 if (npend)
2291 break;
2289 } 2292 }
2290 2293
2291 if (!npend) 2294 if (!npend)