diff options
author | Nick Kossifidis <mickflemm@gmail.com> | 2011-11-25 13:40:30 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-28 14:44:22 -0500 |
commit | b4cfb5d574cd9e23e41462061941f6ac68a41c80 (patch) | |
tree | 807ba6d504c9132c02f4d96304d9bfc8f59e6f04 | |
parent | 29355a4877d7b3219318f0be5b3af55128a4f0ce (diff) |
ath5k: Renumber hw queue ids
According to documentation higher DCUs have higher priority and should
be used for beacons and CAB traffic. More specifically DCU 9 should be
used for beacons and DCU 8 for CAB traffic, I assumed DCU 7 should be
OK for UAPSD traffic.
Note that DCU 8 and 9 are special because they can only be mapped to a single
QCU each but since we use a 1:1 mapping between QCUs and DCUs anyway we don't
have to change much.
P.S. I also did a few related cleanups on qcu.c and ath5k.h
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ath5k.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/qcu.c | 14 |
2 files changed, 11 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index c3815f708382..e564e585b221 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h | |||
@@ -571,20 +571,18 @@ enum ath5k_tx_queue_subtype { | |||
571 | * @AR5K_TX_QUEUE_ID_CAB: Content after beacon queue | 571 | * @AR5K_TX_QUEUE_ID_CAB: Content after beacon queue |
572 | * @AR5K_TX_QUEUE_ID_BEACON: Beacon queue | 572 | * @AR5K_TX_QUEUE_ID_BEACON: Beacon queue |
573 | * @AR5K_TX_QUEUE_ID_UAPSD: Urgent Automatic Power Save Delivery, | 573 | * @AR5K_TX_QUEUE_ID_UAPSD: Urgent Automatic Power Save Delivery, |
574 | * @AR5K_TX_QUEUE_ID_XR_DATA: XR Data queue | ||
575 | * | 574 | * |
576 | * Each number represents a hw queue. If hw does not support hw queues | 575 | * Each number represents a hw queue. If hw does not support hw queues |
577 | * (eg 5210) all data goes in one queue. These match | 576 | * (eg 5210) all data goes in one queue. |
578 | * mac80211 definitions. | ||
579 | */ | 577 | */ |
580 | enum ath5k_tx_queue_id { | 578 | enum ath5k_tx_queue_id { |
581 | AR5K_TX_QUEUE_ID_NOQCU_DATA = 0, | 579 | AR5K_TX_QUEUE_ID_NOQCU_DATA = 0, |
582 | AR5K_TX_QUEUE_ID_NOQCU_BEACON = 1, | 580 | AR5K_TX_QUEUE_ID_NOQCU_BEACON = 1, |
583 | AR5K_TX_QUEUE_ID_DATA_MIN = 0, | 581 | AR5K_TX_QUEUE_ID_DATA_MIN = 0, |
584 | AR5K_TX_QUEUE_ID_DATA_MAX = 3, | 582 | AR5K_TX_QUEUE_ID_DATA_MAX = 3, |
585 | AR5K_TX_QUEUE_ID_CAB = 6, | 583 | AR5K_TX_QUEUE_ID_UAPSD = 7, |
586 | AR5K_TX_QUEUE_ID_BEACON = 7, | 584 | AR5K_TX_QUEUE_ID_CAB = 8, |
587 | AR5K_TX_QUEUE_ID_UAPSD = 8, | 585 | AR5K_TX_QUEUE_ID_BEACON = 9, |
588 | }; | 586 | }; |
589 | 587 | ||
590 | /* | 588 | /* |
diff --git a/drivers/net/wireless/ath/ath5k/qcu.c b/drivers/net/wireless/ath/ath5k/qcu.c index 31924c319152..e50e64d2a876 100644 --- a/drivers/net/wireless/ath/ath5k/qcu.c +++ b/drivers/net/wireless/ath/ath5k/qcu.c | |||
@@ -54,7 +54,7 @@ Queue Control Unit, DCF Control Unit Functions | |||
54 | /** | 54 | /** |
55 | * ath5k_hw_num_tx_pending() - Get number of pending frames for a given queue | 55 | * ath5k_hw_num_tx_pending() - Get number of pending frames for a given queue |
56 | * @ah: The &struct ath5k_hw | 56 | * @ah: The &struct ath5k_hw |
57 | * @queue: The hw queue number | 57 | * @queue: One of enum ath5k_tx_queue_id |
58 | */ | 58 | */ |
59 | u32 | 59 | u32 |
60 | ath5k_hw_num_tx_pending(struct ath5k_hw *ah, unsigned int queue) | 60 | ath5k_hw_num_tx_pending(struct ath5k_hw *ah, unsigned int queue) |
@@ -85,7 +85,7 @@ ath5k_hw_num_tx_pending(struct ath5k_hw *ah, unsigned int queue) | |||
85 | /** | 85 | /** |
86 | * ath5k_hw_release_tx_queue() - Set a transmit queue inactive | 86 | * ath5k_hw_release_tx_queue() - Set a transmit queue inactive |
87 | * @ah: The &struct ath5k_hw | 87 | * @ah: The &struct ath5k_hw |
88 | * @queue: The hw queue number | 88 | * @queue: One of enum ath5k_tx_queue_id |
89 | */ | 89 | */ |
90 | void | 90 | void |
91 | ath5k_hw_release_tx_queue(struct ath5k_hw *ah, unsigned int queue) | 91 | ath5k_hw_release_tx_queue(struct ath5k_hw *ah, unsigned int queue) |
@@ -120,7 +120,7 @@ ath5k_cw_validate(u16 cw_req) | |||
120 | /** | 120 | /** |
121 | * ath5k_hw_get_tx_queueprops() - Get properties for a transmit queue | 121 | * ath5k_hw_get_tx_queueprops() - Get properties for a transmit queue |
122 | * @ah: The &struct ath5k_hw | 122 | * @ah: The &struct ath5k_hw |
123 | * @queue: The hw queue number | 123 | * @queue: One of enum ath5k_tx_queue_id |
124 | * @queue_info: The &struct ath5k_txq_info to fill | 124 | * @queue_info: The &struct ath5k_txq_info to fill |
125 | */ | 125 | */ |
126 | int | 126 | int |
@@ -134,7 +134,7 @@ ath5k_hw_get_tx_queueprops(struct ath5k_hw *ah, int queue, | |||
134 | /** | 134 | /** |
135 | * ath5k_hw_set_tx_queueprops() - Set properties for a transmit queue | 135 | * ath5k_hw_set_tx_queueprops() - Set properties for a transmit queue |
136 | * @ah: The &struct ath5k_hw | 136 | * @ah: The &struct ath5k_hw |
137 | * @queue: The hw queue number | 137 | * @queue: One of enum ath5k_tx_queue_id |
138 | * @qinfo: The &struct ath5k_txq_info to use | 138 | * @qinfo: The &struct ath5k_txq_info to use |
139 | * | 139 | * |
140 | * Returns 0 on success or -EIO if queue is inactive | 140 | * Returns 0 on success or -EIO if queue is inactive |
@@ -267,7 +267,7 @@ ath5k_hw_setup_tx_queue(struct ath5k_hw *ah, enum ath5k_tx_queue queue_type, | |||
267 | /** | 267 | /** |
268 | * ath5k_hw_set_tx_retry_limits() - Set tx retry limits on DCU | 268 | * ath5k_hw_set_tx_retry_limits() - Set tx retry limits on DCU |
269 | * @ah: The &struct ath5k_hw | 269 | * @ah: The &struct ath5k_hw |
270 | * @queue: The hw queue number | 270 | * @queue: One of enum ath5k_tx_queue_id |
271 | * | 271 | * |
272 | * This function is used when initializing a queue, to set | 272 | * This function is used when initializing a queue, to set |
273 | * retry limits based on ah->ah_retry_* and the chipset used. | 273 | * retry limits based on ah->ah_retry_* and the chipset used. |
@@ -310,9 +310,9 @@ ath5k_hw_set_tx_retry_limits(struct ath5k_hw *ah, | |||
310 | /** | 310 | /** |
311 | * ath5k_hw_reset_tx_queue() - Initialize a single hw queue | 311 | * ath5k_hw_reset_tx_queue() - Initialize a single hw queue |
312 | * @ah: The &struct ath5k_hw | 312 | * @ah: The &struct ath5k_hw |
313 | * @queue: The hw queue number | 313 | * @queue: One of enum ath5k_tx_queue_id |
314 | * | 314 | * |
315 | * Set DFS properties for the given transmit queue on DCU | 315 | * Set DCF properties for the given transmit queue on DCU |
316 | * and configures all queue-specific parameters. | 316 | * and configures all queue-specific parameters. |
317 | */ | 317 | */ |
318 | int | 318 | int |