diff options
author | Vivek Natarajan <vnatarajan@atheros.com> | 2011-04-06 11:41:11 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-12 16:57:34 -0400 |
commit | 15b91e830dbf300d653b3fe70f6ef71b568164a3 (patch) | |
tree | 4bc228b9becf6ef591a747d3fa05839b70b7c807 /drivers | |
parent | e8306f989483e4b97a8b37dd268de6c8c6f35e75 (diff) | |
download | blackbird-op-linux-15b91e830dbf300d653b3fe70f6ef71b568164a3.tar.gz blackbird-op-linux-15b91e830dbf300d653b3fe70f6ef71b568164a3.zip |
ath9k: Implement dev_tx_frames_pending callback.
This function returns true if there is atleast one frame
in any one of the tx queues.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index ba1c9a684eff..93b9fa2cbaf8 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -2201,6 +2201,21 @@ out: ath9k_ps_restore(sc); } +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; +} + struct ieee80211_ops ath9k_ops = { .tx = ath9k_tx, .start = ath9k_start, @@ -2223,4 +2238,5 @@ struct ieee80211_ops ath9k_ops = { .rfkill_poll = ath9k_rfkill_poll_state, .set_coverage_class = ath9k_set_coverage_class, .flush = ath9k_flush, + .tx_frames_pending = ath9k_tx_frames_pending, }; |