unsigned int map = 0;
int i;
- for (i = 0; i < __AR9170_NUM_TX_QUEUES; i++) {
+ for (i = AR9170_TXQ_SPECIAL; i >= AR9170_TXQ0; i--) {
__while_desc_bits(desc, &fw.wlan.tx_queue[i], AR9170_OWN_BITS_SW) {
if (!wlan_tx_status(&fw.wlan.tx_queue[i], desc)) {
/* termination requested. */
static void wlan_check_hang(void)
{
struct dma_desc *desc;
- unsigned int i;
+ int i;
- for (i = 0; i < __AR9170_NUM_TX_QUEUES; i++) {
+ for (i = AR9170_TXQ_SPECIAL; i >= AR9170_TXQ0; i--) {
if (queue_empty(&fw.wlan.tx_queue[i])) {
/* Nothing to do here... move along */
continue;
uint32_t ack_power;
uint32_t rts_cts_tpc;
uint32_t rts_cts_rate;
- unsigned int i;
+ int i;
#ifdef CONFIG_CARL9170FW_RADIO_FUNCTIONS
uint32_t rx_BB;
val = AR9170_DMA_TRIGGER_RXQ;
/* Reinitialize all WLAN TX DMA queues. */
- for (i = 0; i < __AR9170_NUM_TX_QUEUES; i++) {
+ for (i = AR9170_TXQ_SPECIAL; i >= AR9170_TXQ0; i--) {
struct dma_desc *iter;
__for_each_desc_bits(iter, &fw.wlan.tx_queue[i], AR9170_OWN_BITS_SW);
(t->DAidx & 0xc0) >> 6;
}
-enum ar9170_txq {
- AR9170_TXQ_BE,
-
- AR9170_TXQ_VI,
- AR9170_TXQ_VO,
- AR9170_TXQ_BK,
-
- __AR9170_NUM_TXQ,
-};
-
/*
* This is an workaround for several undocumented bugs.
* Don't mess with the QoS/AC <-> HW Queue map, if you don't
* result, this makes the device pretty much useless
* for any serious 802.11n setup.
*/
-static const u8 ar9170_qmap[__AR9170_NUM_TXQ] = { 2, 1, 0, 3 };
+enum ar9170_txq {
+ AR9170_TXQ_BK = 0, /* TXQ0 */
+ AR9170_TXQ_BE, /* TXQ1 */
+ AR9170_TXQ_VI, /* TXQ2 */
+ AR9170_TXQ_VO, /* TXQ3 */
+
+ __AR9170_NUM_TXQ,
+};
#define AR9170_TXQ_DEPTH 32
txp->s.len = cpu_to_le16(frame->len);
- queue = ar9170_qmap[frame->queue % ARRAY_SIZE(ar9170_qmap)];
+ queue = (frame->queue % __AR9170_NUM_TXQ);
SET_VAL(CARL9170_TX_SUPER_MISC_QUEUE, txp->s.misc, queue);