diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-10-02 01:03:18 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-10-02 18:26:32 (GMT) |
commit | a064eaa10ca4ec58d5a405c9a7f87efc6d2fa423 (patch) | |
tree | 890f97636a20bab2a6320865b32b633cd4120dea /drivers/net/wireless/ath/ath9k/channel.c | |
parent | b39031536aab9cb1324328cf46fa4ef940bd975f (diff) | |
download | linux-a064eaa10ca4ec58d5a405c9a7f87efc6d2fa423.tar.xz |
ath9k: Add ath9k_chanctx_stop_queues()
This can be used when the queues of a context
needs to be stopped.
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 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 96da03e..bf5ecd8 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c @@ -1177,6 +1177,25 @@ bool ath9k_is_chanctx_enabled(void) /* Queue management */ /********************/ +void ath9k_chanctx_stop_queues(struct ath_softc *sc, struct ath_chanctx *ctx) +{ + struct ath_hw *ah = sc->sc_ah; + int i; + + if (ctx == &sc->offchannel.chan) { + ieee80211_stop_queue(sc->hw, + sc->hw->offchannel_tx_hw_queue); + } else { + for (i = 0; i < IEEE80211_NUM_ACS; i++) + ieee80211_stop_queue(sc->hw, + ctx->hw_queue_base + i); + } + + if (ah->opmode == NL80211_IFTYPE_AP) + ieee80211_stop_queue(sc->hw, sc->hw->queues - 2); +} + + void ath9k_chanctx_wake_queues(struct ath_softc *sc, struct ath_chanctx *ctx) { struct ath_hw *ah = sc->sc_ah; |