diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-08-23 13:29:19 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-08-28 14:49:37 -0400 |
commit | 0e08b5fb81111662bf9fa5f67f8a412791923b6f (patch) | |
tree | c3956624a8dbf5633a5753b58cadcc3218ac0466 /drivers/net/wireless/ath/ath9k/channel.c | |
parent | 70b06dacfe8bd1f62de058e2116388b8f7c58531 (diff) | |
download | op-kernel-dev-0e08b5fb81111662bf9fa5f67f8a412791923b6f.zip op-kernel-dev-0e08b5fb81111662bf9fa5f67f8a412791923b6f.tar.gz |
ath9k: Add ath9k_chanctx_wake_queues
Introduce a function that handles queues in channel
context mode.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/channel.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/channel.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 39df24c..f719c36 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -196,6 +196,10 @@ void ath_chanctx_set_channel(struct ath_softc *sc, struct ath_chanctx *ctx, #ifdef CONFIG_ATH9K_CHANNEL_CONTEXT +/**********************************************************/ +/* Functions to handle the channel context state machine. */ +/**********************************************************/ + static const char *offchannel_state_string(enum ath_offchannel_state state) { #define case_rtn_string(val) case val: return #val @@ -958,6 +962,28 @@ bool ath9k_is_chanctx_enabled(void) return (ath9k_use_chanctx == 1); } +/********************/ +/* Queue management */ +/********************/ + +void ath9k_chanctx_wake_queues(struct ath_softc *sc) +{ + struct ath_hw *ah = sc->sc_ah; + int i; + + if (sc->cur_chan == &sc->offchannel.chan) { + ieee80211_wake_queue(sc->hw, + sc->hw->offchannel_tx_hw_queue); + } else { + for (i = 0; i < IEEE80211_NUM_ACS; i++) + ieee80211_wake_queue(sc->hw, + sc->cur_chan->hw_queue_base + i); + } + + if (ah->opmode == NL80211_IFTYPE_AP) + ieee80211_wake_queue(sc->hw, sc->hw->queues - 2); +} + /*****************/ /* P2P Powersave */ /*****************/ |