summaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/300-pending_work.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-05-03 09:12:19 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-05-03 09:12:19 +0000
commitb3a9a944217e7257ac80c58f3c4f9c4e8cc7529a (patch)
tree4c705058a2d569113e9bca8a398de249ce66e5b9 /package/mac80211/patches/300-pending_work.patch
parenta4d2403e7e7b19ca0f9214cfc1f25a2afcfda10b (diff)
ar71xx: add an external reset callback for ar913x and use it in ath9k - should reduce the frequency of DMA stop failures
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36530 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/300-pending_work.patch')
-rw-r--r--package/mac80211/patches/300-pending_work.patch38
1 files changed, 37 insertions, 1 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index 92bf897b2..379e8f47e 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -25,7 +25,43 @@
int nstations; /* number of station vifs */
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1698,12 +1698,11 @@ static void ath9k_hw_reset_opmode(struct
+@@ -1366,7 +1366,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)) {
+@@ -1377,8 +1380,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;
+ }
+@@ -1464,7 +1471,8 @@ static bool ath9k_hw_chip_reset(struct a
+ reset_type = ATH9K_RESET_POWER_ON;
+ else
+ reset_type = ATH9K_RESET_COLD;
+- } else if (ah->chip_fullsleep || REG_READ(ah, AR_Q_TXE) ||
++ } else if (ah->chip_fullsleep ||
++ REG_READ(ah, AR_Q_TXE) ||
+ (REG_READ(ah, AR_CR) & AR_CR_RXE))
+ reset_type = ATH9K_RESET_COLD;
+
+@@ -1698,12 +1706,11 @@ static void ath9k_hw_reset_opmode(struct
ENABLE_REGWRITE_BUFFER(ah);