diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-10-07 12:52:56 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-10-13 11:45:57 +0200 |
commit | 609208597b6d18b0c1730f34685db73c859aa492 (patch) | |
tree | e18dd39c7c691c8cacedd589a33fcd7a034dab03 /package/kernel/mac80211/patches/301-ath9k_hw-issue-external-reset-for-QCA955x.patch | |
parent | efbd4e721d0bc6aa99614ef9d893f9cfe2264907 (diff) | |
download | mtk-20170518-609208597b6d18b0c1730f34685db73c859aa492.zip mtk-20170518-609208597b6d18b0c1730f34685db73c859aa492.tar.gz mtk-20170518-609208597b6d18b0c1730f34685db73c859aa492.tar.bz2 |
mac80211: update to wireless-testing 2017-10-06
Rework the code to get rid of some extra kernel module dependencies
introduced in the last update.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/301-ath9k_hw-issue-external-reset-for-QCA955x.patch')
-rw-r--r-- | package/kernel/mac80211/patches/301-ath9k_hw-issue-external-reset-for-QCA955x.patch | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/package/kernel/mac80211/patches/301-ath9k_hw-issue-external-reset-for-QCA955x.patch b/package/kernel/mac80211/patches/301-ath9k_hw-issue-external-reset-for-QCA955x.patch index 5eb69b8..34d7d3b 100644 --- a/package/kernel/mac80211/patches/301-ath9k_hw-issue-external-reset-for-QCA955x.patch +++ b/package/kernel/mac80211/patches/301-ath9k_hw-issue-external-reset-for-QCA955x.patch @@ -29,21 +29,6 @@ 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; + @@ -59,35 +44,47 @@ 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; -+ -+ ath_dbg(ath9k_hw_common(ah), RESET, -+ "reset MAC via external reset\n"); - REG_WRITE(ah, AR_RTC_RESET, 1); ++ ath_dbg(ath9k_hw_common(ah), RESET, ++ "reset MAC via external reset\n"); ++ + 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); + |