ath9k: fix intr_txqs setting
Subsystems (3)
PATCH 1/1 ath9k: fix intr_txqs setting
The struct ath_hw member intr_txqs is never reset/assigned outside of ath9k_hw_init_queues() and with the used bitwise-or in the interrupt handling ar9002_hw_get_isr() accumulates all ever set interrupt flags.
Fix this by using a pure assign instead of bitwise-or for the first line (note: intr_txqs is only evaluated in case ATH9K_INT_TX bit is set).
---
Note:
- the ath5k_hw member ah_txq_isr_txok_all in ath5k_hw_get_isr() (see drivers/net/wireless/ath/ath5k/dma.c) sufferes from the same problem and can be fixed by an assignment to zero before furhter usage (but I lack suitable hardware for testing)
--- drivers/net/wireless/ath/ath9k/ar9002_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/ar9002_mac.c +1 -1
@@ -120,7 +120,7 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked, AR_ISR_TXEOL); } - ah->intr_txqs |=MS (s0_s,AR_ISR_S0_QCU_TXOK ); + ah->intr_txqs =MS (s0_s,AR_ISR_S0_QCU_TXOK ); ah->intr_txqs |=MS (s0_s,AR_ISR_S0_QCU_TXDESC ); ah->intr_txqs |=MS (s1_s,AR_ISR_S1_QCU_TXERR ); ah->intr_txqs |=MS (s1_s,AR_ISR_S1_QCU_TXEOL );
Signature · 1 line
2.33.1
Quoted 10 lines · Peter Seiderer
The struct
ath_hwmemberintr_txqsis never reset/assigned outside ofath9k_hw_init_queues()and with the used bitwise-or in the interrupt handlingar9002_hw_get_isr()accumulates all ever set interrupt flags.Fix this by using a pure assign instead of bitwise-or for the first line (note:
intr_txqsis only evaluated in caseATH9K_INT_TXbit is set).Signed-off-by Peter Seiderer <[email protected]>Signed-off-by Kalle Valo <[email protected]>
How did you test this? I'm getting way too many ath9k patches which have not been tested on a real device.
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Hello Kalle,
Quoted 10 lines · Kalle Valo
Quoted 8 lines · Peter Seiderer
The struct
ath_hwmemberintr_txqsis never reset/assigned outside ofath9k_hw_init_queues()and with the used bitwise-or in the interrupt handlingar9002_hw_get_isr()accumulates all ever set interrupt flags.Fix this by using a pure assign instead of bitwise-or for the first line (note:
intr_txqsis only evaluated in caseATH9K_INT_TXbit is set).
Quoted 6 lines
Quoted 2 lines
Signed-off-by Peter Seiderer <[email protected]>Signed-off-by Kalle Valo <[email protected]>How did you test this? I'm getting way too many ath9k patches which have not been tested on a real device.
Did test it with an Compex WLE200NX 7A card (AR9280) running IBSS mode against one older (madwifi) and one newer (ath10k) Atheros card using ping and iperf traffic (investigating some performance degradation compared to two older cards...., but getting better with the latest rc80211_minstrel/rc80211_minstrel_ht changes), checked via printk debugging intr_txqs is not cleared when entering ar9002_hw_get_isr(), and checked wifi is still working after the change...., can provide more info and/or debug traces if needed...
Regards,
Peter
Quoted 19 lines · Peter Seiderer
Quoted 10 lines · Kalle Valo
Quoted 8 lines · Peter Seiderer
The struct
ath_hwmemberintr_txqsis never reset/assigned outside ofath9k_hw_init_queues()and with the used bitwise-or in the interrupt handlingar9002_hw_get_isr()accumulates all ever set interrupt flags.Fix this by using a pure assign instead of bitwise-or for the first line (note:
intr_txqsis only evaluated in caseATH9K_INT_TXbit is set).Quoted 6 lines
Quoted 2 lines
Signed-off-by Peter Seiderer <[email protected]>Signed-off-by Kalle Valo <[email protected]>How did you test this? I'm getting way too many ath9k patches which have not been tested on a real device.
Quoted 8 lines
Did test it with an Compex WLE200NX 7A card (AR9280) running IBSS mode against one older (madwifi) and one newer (ath10k) Atheros card using ping and iperf traffic (investigating some performance degradation compared to two older cards...., but getting better with the latest rc80211_minstrel/rc80211_minstrel_ht changes), checked via printk debugging
intr_txqsis not cleared when enteringar9002_hw_get_isr(), and checked wifi is still working after the change...., can provide more info and/or debug traces if needed...
Perfect, thanks!
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 10 lines · Peter Seiderer
The struct
ath_hwmemberintr_txqsis never reset/assigned outside ofath9k_hw_init_queues()and with the used bitwise-or in the interrupt handlingar9002_hw_get_isr()accumulates all ever set interrupt flags.Fix this by using a pure assign instead of bitwise-or for the first line (note:
intr_txqsis only evaluated in caseATH9K_INT_TXbit is set).Signed-off-by Peter Seiderer <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
5125b9a9c420 ath9k: fix intr_txqs setting
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches