aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2011-04-19 09:59:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-25 14:50:10 -0400
commite758ff8f7fc9ce96e94131b13e70af2c197fa05e (patch)
tree13ebb37aadd983a960b4d757a37409058eaf3e76 /drivers/net
parent17869f4fe940407b5b80039110c0257c90e18a99 (diff)
ath9k_hw: Clean up rx/tx chain configuration before AGC/IQ cal
Use hw supported chains instead of hard coded values. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_calib.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
index 4a4cd88429c0..09f3aa7f82f5 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
@@ -940,21 +940,18 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,
940 struct ath9k_channel *chan) 940 struct ath9k_channel *chan)
941{ 941{
942 struct ath_common *common = ath9k_hw_common(ah); 942 struct ath_common *common = ath9k_hw_common(ah);
943 struct ath9k_hw_capabilities *pCap = &ah->caps;
943 int val; 944 int val;
944 945
945 val = REG_READ(ah, AR_ENT_OTP); 946 val = REG_READ(ah, AR_ENT_OTP);
946 ath_dbg(common, ATH_DBG_CALIBRATE, "ath9k: AR_ENT_OTP 0x%x\n", val); 947 ath_dbg(common, ATH_DBG_CALIBRATE, "ath9k: AR_ENT_OTP 0x%x\n", val);
947 948
948 if (AR_SREV_9485(ah)) 949 /* Configure rx/tx chains before running AGC/TxiQ cals */
949 ar9003_hw_set_chain_masks(ah, 0x1, 0x1); 950 if (val & AR_ENT_OTP_CHAIN2_DISABLE)
950 else if (val & AR_ENT_OTP_CHAIN2_DISABLE)
951 ar9003_hw_set_chain_masks(ah, 0x3, 0x3); 951 ar9003_hw_set_chain_masks(ah, 0x3, 0x3);
952 else 952 else
953 /* 953 ar9003_hw_set_chain_masks(ah, pCap->rx_chainmask,
954 * 0x7 = 0b111 , AR9003 needs to be configured for 3-chain 954 pCap->tx_chainmask);
955 * mode before running AGC/TxIQ cals
956 */
957 ar9003_hw_set_chain_masks(ah, 0x7, 0x7);
958 955
959 /* Do Tx IQ Calibration */ 956 /* Do Tx IQ Calibration */
960 if (AR_SREV_9485(ah)) 957 if (AR_SREV_9485(ah))