aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-10-01 21:03:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-10-02 14:26:32 -0400
commita064eaa10ca4ec58d5a405c9a7f87efc6d2fa423 (patch)
tree890f97636a20bab2a6320865b32b633cd4120dea
parentb39031536aab9cb1324328cf46fa4ef940bd975f (diff)
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>
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h5
-rw-r--r--drivers/net/wireless/ath/ath9k/channel.c19
2 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 4f94d3190867..bfa0b1518da1 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -456,6 +456,7 @@ void ath9k_beacon_add_noa(struct ath_softc *sc, struct ath_vif *avp,
456 struct sk_buff *skb); 456 struct sk_buff *skb);
457void ath9k_p2p_ps_timer(void *priv); 457void ath9k_p2p_ps_timer(void *priv);
458void ath9k_chanctx_wake_queues(struct ath_softc *sc, struct ath_chanctx *ctx); 458void ath9k_chanctx_wake_queues(struct ath_softc *sc, struct ath_chanctx *ctx);
459void ath9k_chanctx_stop_queues(struct ath_softc *sc, struct ath_chanctx *ctx);
459void ath_chanctx_check_active(struct ath_softc *sc, struct ath_chanctx *ctx); 460void ath_chanctx_check_active(struct ath_softc *sc, struct ath_chanctx *ctx);
460 461
461void ath_chanctx_beacon_recv_ev(struct ath_softc *sc, 462void ath_chanctx_beacon_recv_ev(struct ath_softc *sc,
@@ -529,6 +530,10 @@ static inline void ath9k_chanctx_wake_queues(struct ath_softc *sc,
529 struct ath_chanctx *ctx) 530 struct ath_chanctx *ctx)
530{ 531{
531} 532}
533static inline void ath9k_chanctx_stop_queues(struct ath_softc *sc,
534 struct ath_chanctx *ctx)
535{
536}
532static inline void ath_chanctx_check_active(struct ath_softc *sc, 537static inline void ath_chanctx_check_active(struct ath_softc *sc,
533 struct ath_chanctx *ctx) 538 struct ath_chanctx *ctx)
534{ 539{
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
index 96da03e5f534..bf5ecd8da2f1 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)
1177/* Queue management */ 1177/* Queue management */
1178/********************/ 1178/********************/
1179 1179
1180void ath9k_chanctx_stop_queues(struct ath_softc *sc, struct ath_chanctx *ctx)
1181{
1182 struct ath_hw *ah = sc->sc_ah;
1183 int i;
1184
1185 if (ctx == &sc->offchannel.chan) {
1186 ieee80211_stop_queue(sc->hw,
1187 sc->hw->offchannel_tx_hw_queue);
1188 } else {
1189 for (i = 0; i < IEEE80211_NUM_ACS; i++)
1190 ieee80211_stop_queue(sc->hw,
1191 ctx->hw_queue_base + i);
1192 }
1193
1194 if (ah->opmode == NL80211_IFTYPE_AP)
1195 ieee80211_stop_queue(sc->hw, sc->hw->queues - 2);
1196}
1197
1198
1180void ath9k_chanctx_wake_queues(struct ath_softc *sc, struct ath_chanctx *ctx) 1199void ath9k_chanctx_wake_queues(struct ath_softc *sc, struct ath_chanctx *ctx)
1181{ 1200{
1182 struct ath_hw *ah = sc->sc_ah; 1201 struct ath_hw *ah = sc->sc_ah;