From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, mcgrof@qca.qualcomm.com
Subject: [PATCH 02/14] ath9k_hw: clean up tx completion interrupt handling
Date: Wed, 14 Mar 2012 16:40:22 +0100 [thread overview]
Message-ID: <1331739634-22318-2-git-send-email-nbd@openwrt.org> (raw)
In-Reply-To: <1331739634-22318-1-git-send-email-nbd@openwrt.org>
TXQ_FLAG_TXOKINT_ENABLE and TXQ_FLAG_TXERRINT_ENABLE are always set and
used together, and they share the same bitmask in enum ath9k_tx_queue_flags.
Simplify the code that tests for these flags.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
drivers/net/wireless/ath/ath9k/mac.c | 7 +++----
drivers/net/wireless/ath/ath9k/mac.h | 3 +--
drivers/net/wireless/ath/ath9k/xmit.c | 3 +--
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 13b6afd..bfb95e5 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -516,10 +516,10 @@ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q)
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)
+ if (qi->tqi_qflags & TXQ_FLAG_TXINT_ENABLE) {
ah->txok_interrupt_mask |= 1 << q;
- if (qi->tqi_qflags & TXQ_FLAG_TXERRINT_ENABLE)
ah->txerr_interrupt_mask |= 1 << q;
+ }
if (qi->tqi_qflags & TXQ_FLAG_TXDESCINT_ENABLE)
ah->txdesc_interrupt_mask |= 1 << q;
if (qi->tqi_qflags & TXQ_FLAG_TXEOLINT_ENABLE)
@@ -743,8 +743,7 @@ int ath9k_hw_beaconq_setup(struct ath_hw *ah)
qi.tqi_cwmax = 0;
if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
- qi.tqi_qflags = TXQ_FLAG_TXOKINT_ENABLE |
- TXQ_FLAG_TXERRINT_ENABLE;
+ qi.tqi_qflags = TXQ_FLAG_TXINT_ENABLE;
return ath9k_hw_setuptxqueue(ah, ATH9K_TX_QUEUE_BEACON, &qi);
}
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index 11dbd14..6476d90 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -583,8 +583,7 @@ enum ath9k_tx_queue {
#define ATH9K_WME_UPSD 4
enum ath9k_tx_queue_flags {
- TXQ_FLAG_TXOKINT_ENABLE = 0x0001,
- TXQ_FLAG_TXERRINT_ENABLE = 0x0001,
+ TXQ_FLAG_TXINT_ENABLE = 0x0001,
TXQ_FLAG_TXDESCINT_ENABLE = 0x0002,
TXQ_FLAG_TXEOLINT_ENABLE = 0x0004,
TXQ_FLAG_TXURNINT_ENABLE = 0x0008,
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 9f78501..5de5199 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1356,8 +1356,7 @@ struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype)
* based intr on the EOSP frames.
*/
if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
- qi.tqi_qflags = TXQ_FLAG_TXOKINT_ENABLE |
- TXQ_FLAG_TXERRINT_ENABLE;
+ qi.tqi_qflags = TXQ_FLAG_TXINT_ENABLE;
} else {
if (qtype == ATH9K_TX_QUEUE_UAPSD)
qi.tqi_qflags = TXQ_FLAG_TXDESCINT_ENABLE;
--
1.7.3.2
next prev parent reply other threads:[~2012-03-14 15:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 15:40 [PATCH 01/14] ath9k_hw: simplify tx queue interrupt mask handling Felix Fietkau
2012-03-14 15:40 ` Felix Fietkau [this message]
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
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=1331739634-22318-2-git-send-email-nbd@openwrt.org \
--to=nbd@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@qca.qualcomm.com \
/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).