summaryrefslogtreecommitdiff
path: root/package/kernel/mac80211/patches/354-ath9k-force-rx_clear-when-disabling-rx.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-03-01 14:46:34 +0100
committerRafał Miłecki <rafal@milecki.pl>2018-03-01 15:14:11 +0100
commit81542331cb1827650f3abd69375d964d0ce2d050 (patch)
tree7b2c6fd517d3f32ab5c9a4542fb0ff6d9dd5e274 /package/kernel/mac80211/patches/354-ath9k-force-rx_clear-when-disabling-rx.patch
parent1f427bd6166afa2aa11384fa559be9459397a0fe (diff)
downloadmtk-20170518-81542331cb1827650f3abd69375d964d0ce2d050.zip
mtk-20170518-81542331cb1827650f3abd69375d964d0ce2d050.tar.gz
mtk-20170518-81542331cb1827650f3abd69375d964d0ce2d050.tar.bz2
mac80211: reorder patches putting backports first
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/kernel/mac80211/patches/354-ath9k-force-rx_clear-when-disabling-rx.patch')
-rw-r--r--package/kernel/mac80211/patches/354-ath9k-force-rx_clear-when-disabling-rx.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/354-ath9k-force-rx_clear-when-disabling-rx.patch b/package/kernel/mac80211/patches/354-ath9k-force-rx_clear-when-disabling-rx.patch
new file mode 100644
index 0000000..8aaccf4
--- /dev/null
+++ b/package/kernel/mac80211/patches/354-ath9k-force-rx_clear-when-disabling-rx.patch
@@ -0,0 +1,35 @@
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Sun, 7 Jun 2015 13:53:35 +0200
+Subject: [PATCH] ath9k: force rx_clear when disabling rx
+
+This makes stopping Rx more reliable and should reduce the frequency of
+Rx related DMA stop warnings. Don't use rx_clear in TX99 mode.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/mac.c
++++ b/drivers/net/wireless/ath/ath9k/mac.c
+@@ -678,13 +678,18 @@ void ath9k_hw_startpcureceive(struct ath
+
+ ath9k_ani_reset(ah, is_scanning);
+
+- REG_CLR_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT));
++ REG_CLR_BIT(ah, AR_DIAG_SW,
++ AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT | AR_DIAG_FORCE_RX_CLEAR);
+ }
+ EXPORT_SYMBOL(ath9k_hw_startpcureceive);
+
+ void ath9k_hw_abortpcurecv(struct ath_hw *ah)
+ {
+- REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_RX_ABORT | AR_DIAG_RX_DIS);
++ u32 reg = AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT;
++
++ if (!IS_ENABLED(CPTCFG_ATH9K_TX99))
++ reg |= AR_DIAG_FORCE_RX_CLEAR;
++ REG_SET_BIT(ah, AR_DIAG_SW, reg);
+
+ ath9k_hw_disable_mib_counters(ah);
+ }