linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/14] ath9k_hw: simplify tx queue interrupt mask handling
@ 2012-03-14 15:40 Felix Fietkau
  2012-03-14 15:40 ` [PATCH 02/14] ath9k_hw: clean up tx completion interrupt handling Felix Fietkau
  0 siblings, 1 reply; 16+ messages in thread
From: Felix Fietkau @ 2012-03-14 15:40 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, mcgrof

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 drivers/net/wireless/ath/ath9k/mac.c |   26 +++++++++++---------------
 1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 5f4ae6c..13b6afd 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -340,6 +340,15 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type,
 }
 EXPORT_SYMBOL(ath9k_hw_setuptxqueue);
 
+static void ath9k_hw_clear_queue_interrupts(struct ath_hw *ah, u32 q)
+{
+	ah->txok_interrupt_mask &= ~(1 << q);
+	ah->txerr_interrupt_mask &= ~(1 << q);
+	ah->txdesc_interrupt_mask &= ~(1 << q);
+	ah->txeol_interrupt_mask &= ~(1 << q);
+	ah->txurn_interrupt_mask &= ~(1 << q);
+}
+
 bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q)
 {
 	struct ath_common *common = ath9k_hw_common(ah);
@@ -354,11 +363,7 @@ bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q)
 	ath_dbg(common, QUEUE, "Release TX queue: %u\n", q);
 
 	qi->tqi_type = ATH9K_TX_QUEUE_INACTIVE;
-	ah->txok_interrupt_mask &= ~(1 << q);
-	ah->txerr_interrupt_mask &= ~(1 << q);
-	ah->txdesc_interrupt_mask &= ~(1 << q);
-	ah->txeol_interrupt_mask &= ~(1 << q);
-	ah->txurn_interrupt_mask &= ~(1 << q);
+	ath9k_hw_clear_queue_interrupts(ah, q);
 	ath9k_hw_set_txq_interrupts(ah, qi);
 
 	return true;
@@ -510,26 +515,17 @@ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q)
 	if (AR_SREV_9300_20_OR_LATER(ah))
 		REG_WRITE(ah, AR_Q_DESC_CRCCHK, AR_Q_DESC_CRCCHK_EN);
 
+	ath9k_hw_clear_queue_interrupts(ah, q);
 	if (qi->tqi_qflags & TXQ_FLAG_TXOKINT_ENABLE)
 		ah->txok_interrupt_mask |= 1 << q;
-	else
-		ah->txok_interrupt_mask &= ~(1 << q);
 	if (qi->tqi_qflags & TXQ_FLAG_TXERRINT_ENABLE)
 		ah->txerr_interrupt_mask |= 1 << q;
-	else
-		ah->txerr_interrupt_mask &= ~(1 << q);
 	if (qi->tqi_qflags & TXQ_FLAG_TXDESCINT_ENABLE)
 		ah->txdesc_interrupt_mask |= 1 << q;
-	else
-		ah->txdesc_interrupt_mask &= ~(1 << q);
 	if (qi->tqi_qflags & TXQ_FLAG_TXEOLINT_ENABLE)
 		ah->txeol_interrupt_mask |= 1 << q;
-	else
-		ah->txeol_interrupt_mask &= ~(1 << q);
 	if (qi->tqi_qflags & TXQ_FLAG_TXURNINT_ENABLE)
 		ah->txurn_interrupt_mask |= 1 << q;
-	else
-		ah->txurn_interrupt_mask &= ~(1 << q);
 	ath9k_hw_set_txq_interrupts(ah, qi);
 
 	return true;
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-03-15  8:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-14 15:40 [PATCH 01/14] ath9k_hw: simplify tx queue interrupt mask handling Felix Fietkau
2012-03-14 15:40 ` [PATCH 02/14] ath9k_hw: clean up tx completion interrupt handling Felix Fietkau
2012-03-14 15:40   ` [PATCH 03/14] ath9k_hw: remove ath9k_hw_htc_resetinit Felix Fietkau
2012-03-14 15:40     ` [PATCH 04/14] ath9k_hw: remove ath9k_hw_getdefantenna Felix Fietkau
2012-03-14 15:40       ` [PATCH 05/14] ath9k: optimize register access functions Felix Fietkau
2012-03-14 15:40         ` [PATCH 06/14] ath9k_hw: remove ath9k_hw_gettxintrtxqs Felix Fietkau
2012-03-14 15:40           ` [PATCH 07/14] ath9k_hw: clean up ath9k_hw_setuprxdesc Felix Fietkau
2012-03-14 15:40             ` [PATCH 08/14] ath9k_hw: remove iniCommon_*_cck_fir_coeff_9271 Felix Fietkau
2012-03-14 15:40               ` [PATCH 09/14] ath9k_hw: fold ar9002_hw_cck_chan14_spread into mode regs initialization Felix Fietkau
2012-03-14 15:40                 ` [PATCH 10/14] ath9k_hw: fix AR9380 register settings for channel 14 Felix Fietkau
2012-03-14 15:40                   ` [PATCH 11/14] ath9k_hw: clean up iniModesAdditional Felix Fietkau
2012-03-14 15:40                     ` [PATCH 12/14] ath9k_hw: remove iniModes_*_tx_gain_9271 Felix Fietkau
2012-03-14 15:40                       ` [PATCH 13/14] ath9k: inline AR9271 1.0 INI overrides Felix Fietkau
2012-03-14 15:40                         ` [PATCH 14/14] ath9k_hw: remove unused initvals Felix Fietkau
2012-03-15  5:52     ` [PATCH 03/14] ath9k_hw: remove ath9k_hw_htc_resetinit Sujith Manoharan
2012-03-15  8:15       ` Felix Fietkau

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).