Commit 108697c4 authored by Mohammed Shafi Shajakhan's avatar Mohammed Shafi Shajakhan Committed by John W. Linville

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: default avatarMohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 21e8ee6d
...@@ -2276,7 +2276,7 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop) ...@@ -2276,7 +2276,7 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
timeout = 1; timeout = 1;
for (j = 0; j < timeout; j++) { for (j = 0; j < timeout; j++) {
int npend = 0; bool npend = false;
if (j) if (j)
usleep_range(1000, 2000); usleep_range(1000, 2000);
...@@ -2285,7 +2285,10 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop) ...@@ -2285,7 +2285,10 @@ static void ath9k_flush(struct ieee80211_hw *hw, bool drop)
if (!ATH_TXQ_SETUP(sc, i)) if (!ATH_TXQ_SETUP(sc, i))
continue; 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) if (!npend)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment