X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=carlfw%2Fsrc%2Fwlan.c;h=03536e07b6eeb5f48d184dd4a810475951b745f8;hp=08836db4d9781afa7d9f192aa5c6a528c343b0ce;hb=01333d7d7a1ce6be94e5dad4112f573fda476efe;hpb=a1e6d6374b58cff51d566d6af1ebdc6eb3938cc4 diff --git a/carlfw/src/wlan.c b/carlfw/src/wlan.c index 08836db..03536e0 100644 --- a/carlfw/src/wlan.c +++ b/carlfw/src/wlan.c @@ -466,7 +466,7 @@ static void handle_tx_completion(void) 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. */ @@ -1098,9 +1098,9 @@ void handle_wlan(void) 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; @@ -1175,7 +1175,7 @@ static void wlan_mac_reset(void) 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; @@ -1251,7 +1251,7 @@ static void wlan_mac_reset(void) 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);