OpenWrt – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | From: Felix Fietkau <nbd@openwrt.org> |
2 | Date: Sun, 7 Jun 2015 13:53:35 +0200 |
||
3 | Subject: [PATCH] ath9k: force rx_clear when disabling rx |
||
4 | |||
5 | This makes stopping Rx more reliable and should reduce the frequency of |
||
6 | Rx related DMA stop warnings. Don't use rx_clear in TX99 mode. |
||
7 | |||
8 | Cc: stable@vger.kernel.org |
||
9 | Signed-off-by: Felix Fietkau <nbd@nbd.name> |
||
10 | Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> |
||
11 | --- |
||
12 | |||
13 | --- a/drivers/net/wireless/ath/ath9k/mac.c |
||
14 | +++ b/drivers/net/wireless/ath/ath9k/mac.c |
||
15 | @@ -678,13 +678,18 @@ void ath9k_hw_startpcureceive(struct ath |
||
16 | |||
17 | ath9k_ani_reset(ah, is_scanning); |
||
18 | |||
19 | - REG_CLR_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT)); |
||
20 | + REG_CLR_BIT(ah, AR_DIAG_SW, |
||
21 | + AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT | AR_DIAG_FORCE_RX_CLEAR); |
||
22 | } |
||
23 | EXPORT_SYMBOL(ath9k_hw_startpcureceive); |
||
24 | |||
25 | void ath9k_hw_abortpcurecv(struct ath_hw *ah) |
||
26 | { |
||
27 | - REG_SET_BIT(ah, AR_DIAG_SW, AR_DIAG_RX_ABORT | AR_DIAG_RX_DIS); |
||
28 | + u32 reg = AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT; |
||
29 | + |
||
30 | + if (!IS_ENABLED(CPTCFG_ATH9K_TX99)) |
||
31 | + reg |= AR_DIAG_FORCE_RX_CLEAR; |
||
32 | + REG_SET_BIT(ah, AR_DIAG_SW, reg); |
||
33 | |||
34 | ath9k_hw_disable_mib_counters(ah); |
||
35 | } |