Root/package/mac80211/patches/552-ath9k_rx_dma_stop_check.patch

1--- a/drivers/net/wireless/ath/ath9k/mac.c
2+++ b/drivers/net/wireless/ath/ath9k/mac.c
3@@ -689,7 +689,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
4 {
5 #define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */
6     struct ath_common *common = ath9k_hw_common(ah);
7- u32 mac_status, last_mac_status = 0;
8+ u32 mac_status = 0, last_mac_status = 0;
9     int i;
10 
11     /* Enable access to the DMA observation bus */
12@@ -719,6 +719,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
13     }
14 
15     if (i == 0) {
16+ if (!AR_SREV_9300_20_OR_LATER(ah) &&
17+ (mac_status & 0x700) == 0) {
18+ /*
19+ * DMA is idle but the MAC is still stuck
20+ * processing events
21+ */
22+ *reset = true;
23+ return true;
24+ }
25+
26         ath_err(common,
27             "DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n",
28             AH_RX_STOP_DMA_TIMEOUT / 1000,
29

Archive Download this file



interactive