2016-06-26 17:00:01 +00:00
|
|
|
From: Felix Fietkau <nbd@openwrt.org>
|
2015-10-30 15:18:03 +00:00
|
|
|
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
|
2016-05-18 04:09:59 +00:00
|
|
|
Rx related DMA stop warnings. Don't use rx_clear in TX99 mode.
|
2015-10-30 15:18:03 +00:00
|
|
|
|
|
|
|
Cc: stable@vger.kernel.org
|
2016-06-07 06:58:31 +00:00
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
2016-05-18 04:09:59 +00:00
|
|
|
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
|
2015-10-30 15:18:03 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/mac.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/mac.c
|
2016-05-18 04:09:59 +00:00
|
|
|
@@ -677,13 +677,18 @@ void ath9k_hw_startpcureceive(struct ath
|
2015-10-30 15:18:03 +00:00
|
|
|
|
|
|
|
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);
|
2016-05-18 04:09:59 +00:00
|
|
|
+ u32 reg = AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT;
|
|
|
|
+
|
2017-02-02 11:02:22 +00:00
|
|
|
+ if (!IS_ENABLED(CPTCFG_ATH9K_TX99))
|
2016-05-18 04:09:59 +00:00
|
|
|
+ reg |= AR_DIAG_FORCE_RX_CLEAR;
|
|
|
|
+ REG_SET_BIT(ah, AR_DIAG_SW, reg);
|
2015-10-30 15:18:03 +00:00
|
|
|
|
|
|
|
ath9k_hw_disable_mib_counters(ah);
|
|
|
|
}
|