Search Linux Wireless

[PATCH 066/102] ath9k_hw: add a helper for changing the TX/RX masks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
---
 drivers/net/wireless/ath/ath9k/ar9003_phy.c |   14 ++++++++------
 drivers/net/wireless/ath/ath9k/ar9003_phy.h |    4 ++++
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index e73b07a..faa7d0f 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -247,13 +247,10 @@ static void ar9003_hw_init_bb(struct ath_hw *ah,
 	udelay(synthDelay + BASE_ACTIVATE_DELAY);
 }
 
-static void ar9003_hw_init_chain_masks(struct ath_hw *ah)
+void ar9003_hw_modify_chain_masks(struct ath_hw *ah,
+				  u8 rx_chainmask,
+				  u8 tx_chainmask)
 {
-	int rx_chainmask, tx_chainmask;
-
-	rx_chainmask = ah->rxchainmask;
-	tx_chainmask = ah->txchainmask;
-
 	switch (rx_chainmask) {
 	case 0x5:
 		REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
@@ -276,6 +273,11 @@ static void ar9003_hw_init_chain_masks(struct ath_hw *ah)
 	}
 }
 
+static void ar9003_hw_init_chain_masks(struct ath_hw *ah)
+{
+	ar9003_hw_modify_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
+}
+
 /*
  * Override INI values with chip specific configuration.
  */
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
index b9a76d3..1aeeba3 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
@@ -788,4 +788,8 @@
 
 #define AR_PHY_BB_WD_STATUS_CLR         0x00000008
 
+void ar9003_hw_modify_chain_masks(struct ath_hw *ah,
+				  u8 rx_chainmask,
+				  u8 tx_chainmask);
+
 #endif  /* AR9003_PHY_H */
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux