1 From: Felix Fietkau <nbd@openwrt.org>
2 Date: Sun, 30 Nov 2014 20:30:46 +0100
3 Subject: [PATCH] ath9k_hw: fix hardware queue allocation
5 The driver passes the desired hardware queue index for a WMM data queue
6 in qinfo->tqi_subtype. This was ignored in ath9k_hw_setuptxqueue, which
7 instead relied on the order in which the function is called.
9 Cc: stable@vger.kernel.org
10 Reported-by: Hubert Feurstein <h.feurstein@gmail.com>
11 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
14 --- a/drivers/net/wireless/ath/ath9k/mac.c
15 +++ b/drivers/net/wireless/ath/ath9k/mac.c
16 @@ -311,14 +311,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw
17 q = ATH9K_NUM_TX_QUEUES - 3;
19 case ATH9K_TX_QUEUE_DATA:
20 - for (q = 0; q < ATH9K_NUM_TX_QUEUES; q++)
21 - if (ah->txq[q].tqi_type ==
22 - ATH9K_TX_QUEUE_INACTIVE)
24 - if (q == ATH9K_NUM_TX_QUEUES) {
25 - ath_err(common, "No available TX queue\n");
28 + q = qinfo->tqi_subtype;
31 ath_err(common, "Invalid TX queue type: %u\n", type);