diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-10-01 21:03:15 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-10-02 14:26:31 -0400 |
commit | 60913f4d2951f6410eed969aae4717c7ced37044 (patch) | |
tree | 5230fed3edaf8ababea7708e447a94988c6139a4 | |
parent | fc1314c75e0558c03cb434e2af2c257caa201e76 (diff) |
ath9k: Remove duplicate code
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>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 0b24e62f620d..b200e11e44fb 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2039,16 +2039,8 @@ void __ath9k_flush(struct ieee80211_hw *hw, u32 queues, bool drop) | |||
2039 | static bool ath9k_tx_frames_pending(struct ieee80211_hw *hw) | 2039 | static bool ath9k_tx_frames_pending(struct ieee80211_hw *hw) |
2040 | { | 2040 | { |
2041 | struct ath_softc *sc = hw->priv; | 2041 | struct ath_softc *sc = hw->priv; |
2042 | int i; | ||
2043 | |||
2044 | for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { | ||
2045 | if (!ATH_TXQ_SETUP(sc, i)) | ||
2046 | continue; | ||
2047 | 2042 | ||
2048 | if (ath9k_has_pending_frames(sc, &sc->tx.txq[i])) | 2043 | return ath9k_has_tx_pending(sc); |
2049 | return true; | ||
2050 | } | ||
2051 | return false; | ||
2052 | } | 2044 | } |
2053 | 2045 | ||
2054 | static int ath9k_tx_last_beacon(struct ieee80211_hw *hw) | 2046 | static int ath9k_tx_last_beacon(struct ieee80211_hw *hw) |