19 #include <linux/export.h>
21 static void ath9k_hw_set_txq_interrupts(
struct ath_hw *
ah,
25 "tx ok 0x%x err 0x%x desc 0x%x eol 0x%x urn 0x%x\n",
60 ath_dbg(ath9k_hw_common(ah),
QUEUE,
"Enable TXE on queue: %u\n", q);
118 if (curLevel < ah->
config.max_txtrig_level)
122 if (newLevel != curLevel)
130 return newLevel != curLevel;
153 for (i = 0; i < maxdelay; i++) {
172 #define ATH9K_TX_STOP_DMA_TIMEOUT 1000
173 #define ATH9K_TIME_QUANTUM 100
179 for (wait = wait_time; wait != 0; wait--) {
180 if (wait != wait_time)
191 #undef ATH9K_TX_STOP_DMA_TIMEOUT
192 #undef ATH9K_TIME_QUANTUM
206 "Set TXQ properties, inactive queue: %u\n", q);
210 ath_dbg(common,
QUEUE,
"Set queue properties for: %u\n", q);
270 "Get TXQ properties, inactive queue: %u\n", q);
315 if (ah->
txq[q].tqi_type ==
318 if (q == ATH9K_NUM_TX_QUEUES) {
319 ath_err(common,
"No available TX queue\n");
324 ath_err(common,
"Invalid TX queue type: %u\n", type);
332 ath_err(common,
"TX queue: %u already active\n", q);
344 static void ath9k_hw_clear_queue_interrupts(
struct ath_hw *ah,
u32 q)
360 ath_dbg(common,
QUEUE,
"Release TXQ, inactive queue: %u\n", q);
367 ath9k_hw_clear_queue_interrupts(ah, q);
368 ath9k_hw_set_txq_interrupts(ah, qi);
383 ath_dbg(common,
QUEUE,
"Reset TXQ, inactive queue: %u\n", q);
395 for (cwMin = 1; cwMin < chanCwMin; cwMin = (cwMin << 1) | 1);
487 (ah->
config.sw_beacon_response_time -
488 ah->
config.dma_beacon_response_time) -
489 ah->
config.additional_swba_backoff) * 1024;
519 ath9k_hw_clear_queue_interrupts(ah, q);
530 ath9k_hw_set_txq_interrupts(ah, qi);
543 if ((adsp->ds_rxstatus8 &
AR_RxDone) == 0)
650 "RX failed to go idle in 10 ms RXSM=0x%x\n",
690 #define AH_RX_STOP_DMA_TIMEOUT 10000
692 u32 mac_status, last_mac_status = 0;
710 if (mac_status == 0x1c0 && mac_status == last_mac_status) {
715 last_mac_status = mac_status;
723 "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n",
733 #undef AH_RX_STOP_DMA_TIMEOUT
741 memset(&qi, 0,
sizeof(qi));
857 if (ah->
config.tx_intr_mitigation)
873 if (ah->
config.rx_intr_mitigation) {
880 if (ah->
config.rx_intr_mitigation)