Skip to content

Commit

Permalink
ath9k: make npending frames check as bool
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mohammed Shafi Shajakhan authored and John W. Linville committed May 16, 2011
1 parent 21e8ee6 commit 108697c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit 108697c

Please sign in to comment.