Skip to content

Commit

Permalink
ath9k: Remove duplicate code
Browse files Browse the repository at this point in the history
ath9k_has_tx_pending() can be used to
check if there are pending frames instead
of having duplicate code.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Oct 2, 2014
1 parent fc1314c commit 60913f4
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2039,16 +2039,8 @@ void __ath9k_flush(struct ieee80211_hw *hw, u32 queues, bool drop)
static bool ath9k_tx_frames_pending(struct ieee80211_hw *hw)
{
struct ath_softc *sc = hw->priv;
int i;

for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
if (!ATH_TXQ_SETUP(sc, i))
continue;

if (ath9k_has_pending_frames(sc, &sc->tx.txq[i]))
return true;
}
return false;
return ath9k_has_tx_pending(sc);
}

static int ath9k_tx_last_beacon(struct ieee80211_hw *hw)
Expand Down

0 comments on commit 60913f4

Please sign in to comment.