From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Cc: kvalo@codeaurora.org, Felix Fietkau <nbd@openwrt.org>
Subject: [PATCH 3/9] ath9k: force rx_clear when disabling rx
Date: Mon, 23 Jul 2018 18:02:54 +0200 [thread overview]
Message-ID: <20180723160300.58024-3-nbd@nbd.name> (raw)
In-Reply-To: <20180723160300.58024-1-nbd@nbd.name>
From: Felix Fietkau <nbd@openwrt.org>
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.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
drivers/net/wireless/ath/ath9k/mac.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 58d02c19b6d0..c9d2bf3fa135 100644
--- 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_hw *ah, bool is_scanning)
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);
}
--
2.17.0
next prev parent reply other threads:[~2018-07-23 17:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 16:02 [PATCH 1/9] ath9k_hw: set spectral scan enable bit on trigger for AR9003+ Felix Fietkau
2018-07-23 16:02 ` [PATCH 2/9] ath9k: don't run periodic and nf calibation at the same time Felix Fietkau
2018-07-23 16:02 ` Felix Fietkau [this message]
2018-07-30 18:07 ` [PATCH 3/9] ath9k: force rx_clear when disabling rx Kalle Valo
2018-07-23 16:02 ` [PATCH 4/9] ath9k: fix moredata bit in PS buffered frame release Felix Fietkau
2018-07-30 18:08 ` Kalle Valo
2018-07-23 16:02 ` [PATCH 5/9] ath9k: clear potentially stale EOSP status bit in intermediate queues Felix Fietkau
2018-07-23 16:02 ` [PATCH 6/9] ath9k: report tx status on EOSP Felix Fietkau
2018-07-23 16:02 ` [PATCH 7/9] ath9k: fix block-ack window tracking issues Felix Fietkau
2018-07-23 16:02 ` [PATCH 8/9] ath9k_hw: fix channel maximum power level test Felix Fietkau
2018-07-23 16:03 ` [PATCH 9/9] ath9k: fix more-data flag for buffered multicast packets Felix Fietkau
2018-07-31 7:55 ` [PATCH 1/9] ath9k_hw: set spectral scan enable bit on trigger for AR9003+ Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180723160300.58024-3-nbd@nbd.name \
--to=nbd@nbd.name \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@openwrt.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).