diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-06-12 00:33:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-14 15:39:30 -0400 |
commit | 293f2ba897183872c182a4a3cf1996a1f547d7ee (patch) | |
tree | c5b52863e47127c79a8fa1ef69462f1db5277f2d | |
parent | 1cc5c4b56ef684b89afa577f70675d9dd025fb0c (diff) |
ath9k: fix mac80211 queue lookup for waking up queues
ath_get_mac80211_qnum() expects the queue 'subtype'
(internal ID for the WMM AC) as argument when looking up
the mac80211 queue, however ath_wake_mac80211_queue provides
txq->axq_qnum instead, which contains the hardware queue
number. Fix this by keeping track of the WMM class ID in
the txq data structure.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index c00946ddd97e..c5c662957b0d 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -194,6 +194,7 @@ enum ATH_AGGR_STATUS { | |||
194 | 194 | ||
195 | #define ATH_TXFIFO_DEPTH 8 | 195 | #define ATH_TXFIFO_DEPTH 8 |
196 | struct ath_txq { | 196 | struct ath_txq { |
197 | int axq_class; | ||
197 | u32 axq_qnum; | 198 | u32 axq_qnum; |
198 | u32 *axq_link; | 199 | u32 *axq_link; |
199 | struct list_head axq_q; | 200 | struct list_head axq_q; |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 7547c8f9a584..ec124fbe8177 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -941,6 +941,7 @@ struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype) | |||
941 | if (!ATH_TXQ_SETUP(sc, qnum)) { | 941 | if (!ATH_TXQ_SETUP(sc, qnum)) { |
942 | struct ath_txq *txq = &sc->tx.txq[qnum]; | 942 | struct ath_txq *txq = &sc->tx.txq[qnum]; |
943 | 943 | ||
944 | txq->axq_class = subtype; | ||
944 | txq->axq_qnum = qnum; | 945 | txq->axq_qnum = qnum; |
945 | txq->axq_link = NULL; | 946 | txq->axq_link = NULL; |
946 | INIT_LIST_HEAD(&txq->axq_q); | 947 | INIT_LIST_HEAD(&txq->axq_q); |
@@ -2047,7 +2048,7 @@ static void ath_wake_mac80211_queue(struct ath_softc *sc, struct ath_txq *txq) | |||
2047 | 2048 | ||
2048 | spin_lock_bh(&txq->axq_lock); | 2049 | spin_lock_bh(&txq->axq_lock); |
2049 | if (txq->stopped && txq->pending_frames < ATH_MAX_QDEPTH) { | 2050 | if (txq->stopped && txq->pending_frames < ATH_MAX_QDEPTH) { |
2050 | qnum = ath_get_mac80211_qnum(txq->axq_qnum, sc); | 2051 | qnum = ath_get_mac80211_qnum(txq->axq_class, sc); |
2051 | if (qnum != -1) { | 2052 | if (qnum != -1) { |
2052 | ath_mac80211_start_queue(sc, qnum); | 2053 | ath_mac80211_start_queue(sc, qnum); |
2053 | txq->stopped = 0; | 2054 | txq->stopped = 0; |