diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-01-03 01:51:21 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-07 15:16:59 -0500 |
commit | b686929c544be6d2d30b82dfb7a61a7766885177 (patch) | |
tree | b98f6676d01c7ecfa5af0e2ec674b4c6c1c8c194 /drivers/net | |
parent | 54428c57b6d7a9dc172ecfa80b07f17431015d09 (diff) |
ath9k_hw: Enable calibration types in init_cal_settings
Doing this in ath9k_hw_fill_cap_info() is odd and it's
cleaner to do this in the init function for calibration.
Also, setup the supported calibration type in init_cal_settings.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.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.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 7 |
2 files changed, 11 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c index 8b0d8dcd7625..598b847e4e5a 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c | |||
@@ -323,6 +323,14 @@ static const struct ath9k_percal_data iq_cal_single_sample = { | |||
323 | static void ar9003_hw_init_cal_settings(struct ath_hw *ah) | 323 | static void ar9003_hw_init_cal_settings(struct ath_hw *ah) |
324 | { | 324 | { |
325 | ah->iq_caldata.calData = &iq_cal_single_sample; | 325 | ah->iq_caldata.calData = &iq_cal_single_sample; |
326 | |||
327 | if (AR_SREV_9300_20_OR_LATER(ah)) { | ||
328 | ah->enabled_cals |= TX_IQ_CAL; | ||
329 | if (AR_SREV_9485_OR_LATER(ah)) | ||
330 | ah->enabled_cals |= TX_IQ_ON_AGC_CAL; | ||
331 | } | ||
332 | |||
333 | ah->supp_cals = IQ_MISMATCH_CAL; | ||
326 | } | 334 | } |
327 | 335 | ||
328 | /* | 336 | /* |
@@ -1131,13 +1139,10 @@ skip_tx_iqcal: | |||
1131 | 1139 | ||
1132 | /* Initialize list pointers */ | 1140 | /* Initialize list pointers */ |
1133 | ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL; | 1141 | ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL; |
1134 | ah->supp_cals = IQ_MISMATCH_CAL; | ||
1135 | 1142 | ||
1136 | if (ah->supp_cals & IQ_MISMATCH_CAL) { | 1143 | INIT_CAL(&ah->iq_caldata); |
1137 | INIT_CAL(&ah->iq_caldata); | 1144 | INSERT_CAL(ah, &ah->iq_caldata); |
1138 | INSERT_CAL(ah, &ah->iq_caldata); | 1145 | ath_dbg(common, CALIBRATE, "enabling IQ Calibration\n"); |
1139 | ath_dbg(common, CALIBRATE, "enabling IQ Calibration\n"); | ||
1140 | } | ||
1141 | 1146 | ||
1142 | if (ah->supp_cals & TEMP_COMP_CAL) { | 1147 | if (ah->supp_cals & TEMP_COMP_CAL) { |
1143 | INIT_CAL(&ah->tempCompCalData); | 1148 | INIT_CAL(&ah->tempCompCalData); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index ecf1c08a03c1..caf0626eeaa5 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -2568,12 +2568,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) | |||
2568 | rx_chainmask >>= 1; | 2568 | rx_chainmask >>= 1; |
2569 | } | 2569 | } |
2570 | 2570 | ||
2571 | if (AR_SREV_9300_20_OR_LATER(ah)) { | ||
2572 | ah->enabled_cals |= TX_IQ_CAL; | ||
2573 | if (AR_SREV_9485_OR_LATER(ah)) | ||
2574 | ah->enabled_cals |= TX_IQ_ON_AGC_CAL; | ||
2575 | } | ||
2576 | |||
2577 | if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { | 2571 | if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { |
2578 | if (!(ah->ent_mode & AR_ENT_OTP_49GHZ_DISABLE)) | 2572 | if (!(ah->ent_mode & AR_ENT_OTP_49GHZ_DISABLE)) |
2579 | pCap->hw_caps |= ATH9K_HW_CAP_MCI; | 2573 | pCap->hw_caps |= ATH9K_HW_CAP_MCI; |
@@ -2582,7 +2576,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) | |||
2582 | pCap->hw_caps |= ATH9K_HW_CAP_RTT; | 2576 | pCap->hw_caps |= ATH9K_HW_CAP_RTT; |
2583 | } | 2577 | } |
2584 | 2578 | ||
2585 | |||
2586 | if (AR_SREV_9280_20_OR_LATER(ah)) { | 2579 | if (AR_SREV_9280_20_OR_LATER(ah)) { |
2587 | pCap->hw_caps |= ATH9K_HW_WOW_DEVICE_CAPABLE | | 2580 | pCap->hw_caps |= ATH9K_HW_WOW_DEVICE_CAPABLE | |
2588 | ATH9K_HW_WOW_PATTERN_MATCH_EXACT; | 2581 | ATH9K_HW_WOW_PATTERN_MATCH_EXACT; |