ath5k: channel change fix
[openwrt/staging/yousong.git] / package / kernel / mac80211 / patches / 326-ath5k-fix-hardware-queue-index-assignment.patch
1 From: Felix Fietkau <nbd@openwrt.org>
2 Date: Sun, 30 Nov 2014 21:51:12 +0100
3 Subject: [PATCH] ath5k: fix hardware queue index assignment
4
5 Like with ath9k, ath5k queues also need to be ordered by priority.
6 queue_info->tqi_subtype already contains the correct index, so use it
7 instead of relying on the order of ath5k_hw_setup_tx_queue calls.
8
9 Cc: stable@vger.kernel.org
10 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 ---
12
13 --- a/drivers/net/wireless/ath/ath5k/qcu.c
14 +++ b/drivers/net/wireless/ath/ath5k/qcu.c
15 @@ -225,13 +225,7 @@ ath5k_hw_setup_tx_queue(struct ath5k_hw
16 } else {
17 switch (queue_type) {
18 case AR5K_TX_QUEUE_DATA:
19 - for (queue = AR5K_TX_QUEUE_ID_DATA_MIN;
20 - ah->ah_txq[queue].tqi_type !=
21 - AR5K_TX_QUEUE_INACTIVE; queue++) {
22 -
23 - if (queue > AR5K_TX_QUEUE_ID_DATA_MAX)
24 - return -EINVAL;
25 - }
26 + queue = queue_info->tqi_subtype;
27 break;
28 case AR5K_TX_QUEUE_UAPSD:
29 queue = AR5K_TX_QUEUE_ID_UAPSD;