Josh Boyer 27e48a
--- a/drivers/net/wireless/ath/ath9k/mac.c
Josh Boyer 27e48a
+++ b/drivers/net/wireless/ath/ath9k/mac.c
Josh Boyer 27e48a
@@ -689,7 +689,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw 
Josh Boyer 27e48a
 {
Josh Boyer 27e48a
 #define AH_RX_STOP_DMA_TIMEOUT 10000   /* usec */
Josh Boyer 27e48a
 	struct ath_common *common = ath9k_hw_common(ah);
Josh Boyer 27e48a
-	u32 mac_status, last_mac_status = 0;
Josh Boyer 27e48a
+	u32 mac_status = 0, last_mac_status = 0;
Josh Boyer 27e48a
 	int i;
Josh Boyer 27e48a
 
Josh Boyer 27e48a
 	/* Enable access to the DMA observation bus */
Josh Boyer 27e48a
@@ -719,6 +719,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw 
Josh Boyer 27e48a
 	}
Josh Boyer 27e48a
 
Josh Boyer 27e48a
 	if (i == 0) {
Josh Boyer 27e48a
+		if (!AR_SREV_9300_20_OR_LATER(ah) &&
Josh Boyer 27e48a
+		    (mac_status & 0x700) == 0) {
Josh Boyer 27e48a
+			/*
Josh Boyer 27e48a
+			 * DMA is idle but the MAC is still stuck
Josh Boyer 27e48a
+			 * processing events
Josh Boyer 27e48a
+			 */
Josh Boyer 27e48a
+			*reset = true;
Josh Boyer 27e48a
+			return true;
Josh Boyer 27e48a
+		}
Josh Boyer 27e48a
+
Josh Boyer 27e48a
 		ath_err(common,
Josh Boyer 27e48a
 			"DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n",
Josh Boyer 27e48a
 			AH_RX_STOP_DMA_TIMEOUT / 1000,