Skip to contentSkip to conversation

ath5k: remove unused ah_txq_isr_qtrig member from struct ath5k_hw

PATCH In review Peter Seiderer 2 participants 6 messages Jan 10, 2022 – Jan 17, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 ath5k: remove unused ah_txq_isr_qtrig member from struct ath5k_hw

Remove unused ah_txq_isr_qtrig member from struct ath5k_hw (set in ath5k_hw_get_isr() but never used anywhere).

---
 drivers/net/wireless/ath/ath5k/ath5k.h | 1 -
 drivers/net/wireless/ath/ath5k/dma.c   | 5 +----
 2 files changed, 1 insertion(+), 5 deletions(-)
drivers/net/wireless/ath/ath5k/ath5k.h +0 -1
index 234ea939d316..db6ba433c05d 100644
@@ -1398,7 +1398,6 @@ struct ath5k_hw {
 	u32			ah_txq_isr_txurn;
 	u32			ah_txq_isr_qcborn;
 	u32			ah_txq_isr_qcburn;
-	u32			ah_txq_isr_qtrig;
 
 	u32			*ah_rf_banks;
 	size_t			ah_rf_banks_size;
drivers/net/wireless/ath/ath5k/dma.c +1 -4
index e6c52f7c26e7..78b87372da95 100644
@@ -723,11 +723,8 @@ ath5k_hw_get_isr(struct ath5k_hw *ah, enum ath5k_int *interrupt_mask)
 		}
 
 		/* A queue got triggered */
-		if (unlikely(pisr & (AR5K_ISR_QTRIG))) {
+		if (unlikely(pisr & (AR5K_ISR_QTRIG)))
 			*interrupt_mask |= AR5K_INT_QTRIG;
-			ah->ah_txq_isr_qtrig |= AR5K_REG_MS(sisr4,
-						AR5K_SISR4_QTRIG);
-		}
 
 		data = pisr;
 	}
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/5 ath5k: remove unused ah_txq_isr_qcburn member from struct ath5k_hw

Remove unused ah_txq_isr_qcburn member from struct ath5k_hw (set in ath5k_hw_get_isr() but never used anywhere).

---
 drivers/net/wireless/ath/ath5k/ath5k.h | 1 -
 drivers/net/wireless/ath/ath5k/dma.c   | 5 +----
 2 files changed, 1 insertion(+), 5 deletions(-)
drivers/net/wireless/ath/ath5k/ath5k.h +0 -1
index db6ba433c05d..72ba36a04837 100644
@@ -1397,7 +1397,6 @@ struct ath5k_hw {
 	u32			ah_txq_isr_txok_all;
 	u32			ah_txq_isr_txurn;
 	u32			ah_txq_isr_qcborn;
-	u32			ah_txq_isr_qcburn;
 
 	u32			*ah_rf_banks;
 	size_t			ah_rf_banks_size;
drivers/net/wireless/ath/ath5k/dma.c +1 -4
index 78b87372da95..faea3262368f 100644
@@ -716,11 +716,8 @@ ath5k_hw_get_isr(struct ath5k_hw *ah, enum ath5k_int *interrupt_mask)
 		}
 
 		/* A queue got CBR underrun */
-		if (unlikely(pisr & (AR5K_ISR_QCBRURN))) {
+		if (unlikely(pisr & (AR5K_ISR_QCBRURN)))
 			*interrupt_mask |= AR5K_INT_QCBRURN;
-			ah->ah_txq_isr_qcburn |= AR5K_REG_MS(sisr3,
-						AR5K_SISR3_QCBRURN);
-		}
 
 		/* A queue got triggered */
 		if (unlikely(pisr & (AR5K_ISR_QTRIG)))
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/5 ath5k: remove unused ah_txq_isr_qcborn member from struct ath5k_hw

In reply to Peter Seiderer

Remove unused ah_txq_isr_qcborn member from struct ath5k_hw (set in ath5k_hw_get_isr() but never used anywhere).

---
 drivers/net/wireless/ath/ath5k/ath5k.h | 1 -
 drivers/net/wireless/ath/ath5k/dma.c   | 5 +----
 2 files changed, 1 insertion(+), 5 deletions(-)
drivers/net/wireless/ath/ath5k/ath5k.h +0 -1
index 72ba36a04837..ac3211b1eb0c 100644
@@ -1396,7 +1396,6 @@ struct ath5k_hw {
 
 	u32			ah_txq_isr_txok_all;
 	u32			ah_txq_isr_txurn;
-	u32			ah_txq_isr_qcborn;
 
 	u32			*ah_rf_banks;
 	size_t			ah_rf_banks_size;
drivers/net/wireless/ath/ath5k/dma.c +1 -4
index faea3262368f..0ee46f8118bb 100644
@@ -709,11 +709,8 @@ ath5k_hw_get_isr(struct ath5k_hw *ah, enum ath5k_int *interrupt_mask)
 			*interrupt_mask |= AR5K_INT_BNR;
 
 		/* A queue got CBR overrun */
-		if (unlikely(pisr & (AR5K_ISR_QCBRORN))) {
+		if (unlikely(pisr & (AR5K_ISR_QCBRORN)))
 			*interrupt_mask |= AR5K_INT_QCBRORN;
-			ah->ah_txq_isr_qcborn |= AR5K_REG_MS(sisr3,
-						AR5K_SISR3_QCBRORN);
-		}
 
 		/* A queue got CBR underrun */
 		if (unlikely(pisr & (AR5K_ISR_QCBRURN)))
Signature · 1 line
2.34.1
#3 lore raw

PATCH 4/5 ath5k: remove unused ah_txq_isr_txurn member from struct ath5k_hw

In reply to Peter Seiderer

Remove unused ah_txq_isr_txurn member from struct ath5k_hw (set in ath5k_hw_get_isr() but never used anywhere).

---
 drivers/net/wireless/ath/ath5k/ath5k.h | 1 -
 drivers/net/wireless/ath/ath5k/dma.c   | 7 -------
 2 files changed, 8 deletions(-)
drivers/net/wireless/ath/ath5k/ath5k.h +0 -1
index ac3211b1eb0c..f595204f493d 100644
@@ -1395,7 +1395,6 @@ struct ath5k_hw {
 	u32			ah_txq_imr_nofrm;
 
 	u32			ah_txq_isr_txok_all;
-	u32			ah_txq_isr_txurn;
 
 	u32			*ah_rf_banks;
 	size_t			ah_rf_banks_size;
drivers/net/wireless/ath/ath5k/dma.c +0 -7
index 0ee46f8118bb..2b135a6284a0 100644
@@ -670,13 +670,6 @@ ath5k_hw_get_isr(struct ath5k_hw *ah, enum ath5k_int *interrupt_mask)
 			ah->ah_txq_isr_txok_all |= AR5K_REG_MS(sisr1,
 						AR5K_SISR1_QCU_TXEOL);
 
-		/* Currently this is not much useful since we treat
-		 * all queues the same way if we get a TXURN (update
-		 * tx trigger level) but we might need it later on*/
-		if (pisr & AR5K_ISR_TXURN)
-			ah->ah_txq_isr_txurn |= AR5K_REG_MS(sisr2,
-						AR5K_SISR2_QCU_TXURN);
-
 		/* Misc Beacon related interrupts */
 
 		/* For AR5211 */
Signature · 1 line
2.34.1
#4 lore raw

PATCH 5/5 ath5k: fix ah_txq_isr_txok_all setting

In reply to Peter Seiderer

The struct ath5k_hw member ah_txq_isr_txok_all is never reset/assigned outside of ath5k_hw_get_isr() and with the used bitwise-or in the interrupt handling accumulates all ever set interrupt flags.

Fix this by clearing ah_txq_isr_txok_all before assigning.

Patch tested with Senao NMP-8602 card

Qualcomm Atheros AR5413/AR5414 Wireless Network Adapter [AR5006X(S) 802.11abg] (rev 01)
ath5k: phy6: Atheros AR5413 chip found (MAC: 0xa4, PHY: 0x61)

running IBSS mode against Atheros (ath9k) card using ping and iperf traffic.

---
 drivers/net/wireless/ath/ath5k/dma.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath5k/dma.c +1 -0
index 2b135a6284a0..d9e376eb040e 100644
@@ -650,6 +650,7 @@ ath5k_hw_get_isr(struct ath5k_hw *ah, enum ath5k_int *interrupt_mask)
 		 */
 		*interrupt_mask = (pisr & AR5K_INT_COMMON) & ah->ah_imr;
 
+		ah->ah_txq_isr_txok_all = 0;
 
 		/* We treat TXOK,TXDESC, TXERR and TXEOL
 		 * the same way (schedule the tx tasklet)
Signature · 1 line
2.34.1
#5 lore raw
In reply to Peter Seiderer
Quoted 5 lines · Peter Seiderer

Remove unused ah_txq_isr_qtrig member from struct ath5k_hw (set in ath5k_hw_get_isr() but never used anywhere).

5 patches applied to ath-next branch of ath.git, thanks.

5b747459477b ath5k: remove unused ah_txq_isr_qtrig member from struct ath5k_hw bcc08e05041e ath5k: remove unused ah_txq_isr_qcburn member from struct ath5k_hw 0feb4052ad47 ath5k: remove unused ah_txq_isr_qcborn member from struct ath5k_hw 3296fe1a8339 ath5k: remove unused ah_txq_isr_txurn member from struct ath5k_hw dff39ad93de8 ath5k: fix ah_txq_isr_txok_all setting

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches