summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/xmit.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-06-11 12:47:52 +0200
committerJohn W. Linville <linville@tuxdriver.com>2014-06-19 21:49:17 +0200
commitbff117669841c04d08bd1d23617818e0030b3299 (patch)
treee5a578e0570ae672bd7afc09afe5e79cd1739c70 /drivers/net/wireless/ath/ath9k/xmit.c
parentath9k: Move acq to channel context (diff)
downloadlinux-bff117669841c04d08bd1d23617818e0030b3299.tar.xz
linux-bff117669841c04d08bd1d23617818e0030b3299.zip
ath9k: Add channel context worker thread
The channel context worker is used to switch to next requested channel context. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index b2e66d21af1c..5aaed39459d2 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1826,18 +1826,24 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
if (txq->mac80211_qnum < 0)
return;
+ spin_lock_bh(&sc->chan_lock);
ac_list = &sc->cur_chan->acq[txq->mac80211_qnum];
+ spin_unlock_bh(&sc->chan_lock);
if (test_bit(ATH_OP_HW_RESET, &common->op_flags) ||
list_empty(ac_list))
return;
+ spin_lock_bh(&sc->chan_lock);
rcu_read_lock();
last_ac = list_entry(ac_list->prev, struct ath_atx_ac, list);
while (!list_empty(ac_list)) {
bool stop = false;
+ if (sc->cur_chan->stopped)
+ break;
+
ac = list_first_entry(ac_list, struct ath_atx_ac, list);
last_tid = list_entry(ac->tid_q.prev, struct ath_atx_tid, list);
list_del(&ac->list);
@@ -1883,6 +1889,7 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
}
rcu_read_unlock();
+ spin_unlock_bh(&sc->chan_lock);
}
void ath_txq_schedule_all(struct ath_softc *sc)