aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/351-ath9k_hw-issue-external-reset-for-QCA955x.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2018-06-22 09:43:56 +0200
committerJohn Crispin <john@phrozen.org>2018-06-22 09:45:43 +0200
commit6e4fb77f9e3fb2a80759bdf987eadd2b1ffa84ad (patch)
tree22f87184fc1e9385e2af610bae20185b859a9433 /package/kernel/mac80211/patches/351-ath9k_hw-issue-external-reset-for-QCA955x.patch
parent642acc0fb072aacc039434e206627afc3b59c754 (diff)
downloadupstream-6e4fb77f9e3fb2a80759bdf987eadd2b1ffa84ad.tar.gz
upstream-6e4fb77f9e3fb2a80759bdf987eadd2b1ffa84ad.tar.bz2
upstream-6e4fb77f9e3fb2a80759bdf987eadd2b1ffa84ad.zip
mac80211: drop 355-ath9k-limit-retries-for-powersave-response-frames.patch
several people reported this bug to be causing drop out issues Signed-off-by: John Crispin <john@phrozen.org> (cherry picked from commit cac1a4be66f548735878beccc10dc4b1ec7ad364)
Diffstat (limited to 'package/kernel/mac80211/patches/351-ath9k_hw-issue-external-reset-for-QCA955x.patch')
-rw-r--r--package/kernel/mac80211/patches/351-ath9k_hw-issue-external-reset-for-QCA955x.patch51
1 files changed, 27 insertions, 24 deletions
diff --git a/package/kernel/mac80211/patches/351-ath9k_hw-issue-external-reset-for-QCA955x.patch b/package/kernel/mac80211/patches/351-ath9k_hw-issue-external-reset-for-QCA955x.patch
index 34d7d3b1cf..5eb69b898d 100644
--- a/package/kernel/mac80211/patches/351-ath9k_hw-issue-external-reset-for-QCA955x.patch
+++ b/package/kernel/mac80211/patches/351-ath9k_hw-issue-external-reset-for-QCA955x.patch
@@ -29,6 +29,21 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
- npend = ath9k_hw_numtxpending(ah, i);
- if (npend)
- break;
+- }
+-
+- if (ah->external_reset &&
+- (npend || type == ATH9K_RESET_COLD)) {
+- int reset_err = 0;
+-
+- ath_dbg(ath9k_hw_common(ah), RESET,
+- "reset MAC via external reset\n");
+-
+- reset_err = ah->external_reset();
+- if (reset_err) {
+- ath_err(ath9k_hw_common(ah),
+- "External reset failed, err=%d\n",
+- reset_err);
+- return false;
+ if (type == ATH9K_RESET_COLD)
+ return true;
+
@@ -44,47 +59,35 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ for (i = 0; i < AR_NUM_QCU; i++) {
+ if (ath9k_hw_numtxpending(ah, i))
+ return true;
-+ }
- }
-
-- if (ah->external_reset &&
-- (npend || type == ATH9K_RESET_COLD)) {
-- int reset_err = 0;
+ }
++ }
++
+ return false;
+}
-
-- ath_dbg(ath9k_hw_common(ah), RESET,
-- "reset MAC via external reset\n");
++
+static bool ath9k_hw_external_reset(struct ath_hw *ah, int type)
+{
+ int err;
-
-- reset_err = ah->external_reset();
-- if (reset_err) {
-- ath_err(ath9k_hw_common(ah),
-- "External reset failed, err=%d\n",
-- reset_err);
-- return false;
-- }
++
+ if (!ah->external_reset || !ath9k_hw_need_external_reset(ah, type))
+ return true;
-
-- REG_WRITE(ah, AR_RTC_RESET, 1);
++
+ ath_dbg(ath9k_hw_common(ah), RESET,
+ "reset MAC via external reset\n");
-+
+
+- REG_WRITE(ah, AR_RTC_RESET, 1);
+ err = ah->external_reset();
+ if (err) {
+ ath_err(ath9k_hw_common(ah),
+ "External reset failed, err=%d\n", err);
+ return false;
-+ }
-+
+ }
+
+ if (AR_SREV_9550(ah)) {
+ REG_WRITE(ah, AR_RTC_RESET, 0);
+ udelay(10);
- }
-
++ }
++
+ REG_WRITE(ah, AR_RTC_RESET, 1);
+ udelay(10);
+