aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/556-ath9k_ar913x_external_reset.patch
blob: c95f391478e383e48107dd2d6716758f4731cedc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1374,7 +1374,10 @@ static bool ath9k_hw_set_reset(struct at
 
 	REGWRITE_BUFFER_FLUSH(ah);
 
-	udelay(50);
+	if (AR_SREV_9100(ah))
+		mdelay(10);
+	else
+		udelay(50);
 
 	REG_WRITE(ah, AR_RTC_RC, 0);
 	if (!ath9k_hw_wait(ah, AR_RTC_RC, AR_RTC_RC_M, 0, AH_WAIT_TIMEOUT)) {
@@ -1385,8 +1388,12 @@ static bool ath9k_hw_set_reset(struct at
 	if (!AR_SREV_9100(ah))
 		REG_WRITE(ah, AR_RC, 0);
 
-	if (AR_SREV_9100(ah))
+	if (AR_SREV_9100(ah) && type != ATH9K_RESET_WARM) {
+		if (ah->external_reset)
+			ah->external_reset();
+
 		udelay(50);
+	}
 
 	return true;
 }