diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-06-04 06:57:30 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-06 15:20:25 -0400 |
commit | 5955b2b0ef208e03188ef1c2810c004bde493253 (patch) | |
tree | e71d756ab768640a0771e98798d420b9af0c5a74 /drivers/net/wireless/ath/ath9k/ar9003_calib.c | |
parent | 83c7a52dcce256fc20cd43dbf6866e3e05f2bf71 (diff) |
ath9k_hw: Fix MCI usage
MCI has to be handled only when BTCOEX is actually enabled.
Check for this condition before calling MCI related functions
from various reset/calibration call-sites.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_calib.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_calib.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c index 9fdd70fcaf5..f83a4a2e1da 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c | |||
@@ -901,7 +901,6 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah, | |||
901 | bool is_reusable = true, status = true; | 901 | bool is_reusable = true, status = true; |
902 | bool run_rtt_cal = false, run_agc_cal; | 902 | bool run_rtt_cal = false, run_agc_cal; |
903 | bool rtt = !!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT); | 903 | bool rtt = !!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT); |
904 | bool mci = !!(ah->caps.hw_caps & ATH9K_HW_CAP_MCI); | ||
905 | u32 agc_ctrl = 0, agc_supp_cals = AR_PHY_AGC_CONTROL_OFFSET_CAL | | 904 | u32 agc_ctrl = 0, agc_supp_cals = AR_PHY_AGC_CONTROL_OFFSET_CAL | |
906 | AR_PHY_AGC_CONTROL_FLTR_CAL | | 905 | AR_PHY_AGC_CONTROL_FLTR_CAL | |
907 | AR_PHY_AGC_CONTROL_PKDET_CAL; | 906 | AR_PHY_AGC_CONTROL_PKDET_CAL; |
@@ -970,7 +969,7 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah, | |||
970 | } else if (caldata && !caldata->done_txiqcal_once) | 969 | } else if (caldata && !caldata->done_txiqcal_once) |
971 | run_agc_cal = true; | 970 | run_agc_cal = true; |
972 | 971 | ||
973 | if (mci && IS_CHAN_2GHZ(chan) && run_agc_cal) | 972 | if (ath9k_hw_mci_is_enabled(ah) && IS_CHAN_2GHZ(chan) && run_agc_cal) |
974 | ar9003_mci_init_cal_req(ah, &is_reusable); | 973 | ar9003_mci_init_cal_req(ah, &is_reusable); |
975 | 974 | ||
976 | if (!(IS_CHAN_HALF_RATE(chan) || IS_CHAN_QUARTER_RATE(chan))) { | 975 | if (!(IS_CHAN_HALF_RATE(chan) || IS_CHAN_QUARTER_RATE(chan))) { |
@@ -993,7 +992,7 @@ skip_tx_iqcal: | |||
993 | 0, AH_WAIT_TIMEOUT); | 992 | 0, AH_WAIT_TIMEOUT); |
994 | } | 993 | } |
995 | 994 | ||
996 | if (mci && IS_CHAN_2GHZ(chan) && run_agc_cal) | 995 | if (ath9k_hw_mci_is_enabled(ah) && IS_CHAN_2GHZ(chan) && run_agc_cal) |
997 | ar9003_mci_init_cal_done(ah); | 996 | ar9003_mci_init_cal_done(ah); |
998 | 997 | ||
999 | if (rtt && !run_rtt_cal) { | 998 | if (rtt && !run_rtt_cal) { |