From 0204991d019ccc6be17995efa3d69ad7ac4cdf64 Mon Sep 17 00:00:00 2001 From: Rajkumar Manoharan Date: Thu, 13 Oct 2011 11:00:36 +0530 Subject: [PATCH] --- yaml --- r: 266799 b: refs/heads/master c: 34013524a1644bbd00c592541f67c536a384e707 h: refs/heads/master i: 266797: 096373f60eeec1ff580688da5b94f50cae651e7c 266795: 565264a7fc83f531966be24b4dca847226b4510b 266791: 377fbcee107012e12c4de7c3a8d3e3c1a4c7f1a1 266783: a5cc8cbfa88d460756874522d89ee8d20ca0895d v: v3 --- [refs] | 2 +- .../drivers/net/wireless/ath/ath9k/ar9003_calib.c | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index c67155e24e2f..5102060c9cbd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5f0c04ea1e7394c2b28fa247c1722487f9a77523 +refs/heads/master: 34013524a1644bbd00c592541f67c536a384e707 diff --git a/trunk/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/trunk/drivers/net/wireless/ath/ath9k/ar9003_calib.c index 026aa5b833d2..6d685664f916 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/ar9003_calib.c +++ b/trunk/drivers/net/wireless/ath/ath9k/ar9003_calib.c @@ -659,7 +659,8 @@ static void ar9003_hw_detect_outlier(int *mp_coeff, int nmeasurement, static void ar9003_hw_tx_iqcal_load_avg_2_passes(struct ath_hw *ah, u8 num_chains, - struct coeff *coeff) + struct coeff *coeff, + bool is_reusable) { int i, im, nmeasurement; u32 tx_corr_coeff[MAX_MEASUREMENT][AR9300_MAX_CHAINS]; @@ -726,11 +727,11 @@ static void ar9003_hw_tx_iqcal_load_avg_2_passes(struct ath_hw *ah, AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN, 0x1); REG_RMW_FIELD(ah, AR_PHY_RX_IQCAL_CORR_B0, AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN, 0x1); + if (caldata) - caldata->done_txiqcal_once = true; + caldata->done_txiqcal_once = is_reusable; return; - } static bool ar9003_hw_tx_iq_cal_run(struct ath_hw *ah) @@ -757,7 +758,7 @@ static bool ar9003_hw_tx_iq_cal_run(struct ath_hw *ah) return true; } -static void ar9003_hw_tx_iq_cal_post_proc(struct ath_hw *ah) +static void ar9003_hw_tx_iq_cal_post_proc(struct ath_hw *ah, bool is_reusable) { struct ath_common *common = ath9k_hw_common(ah); const u32 txiqcal_status[AR9300_MAX_CHAINS] = { @@ -846,7 +847,8 @@ static void ar9003_hw_tx_iq_cal_post_proc(struct ath_hw *ah) coeff.phs_coeff[i][im] -= 128; } } - ar9003_hw_tx_iqcal_load_avg_2_passes(ah, num_chains, &coeff); + ar9003_hw_tx_iqcal_load_avg_2_passes(ah, num_chains, + &coeff, is_reusable); return; @@ -904,6 +906,7 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah, struct ath_common *common = ath9k_hw_common(ah); struct ath9k_hw_cal_data *caldata = ah->caldata; bool txiqcal_done = false; + bool is_reusable = true; /* Do Tx IQ Calibration */ REG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_1, @@ -943,7 +946,7 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah, } if (txiqcal_done) - ar9003_hw_tx_iq_cal_post_proc(ah); + ar9003_hw_tx_iq_cal_post_proc(ah, is_reusable); else if (caldata && caldata->done_txiqcal_once) ar9003_hw_tx_iq_cal_reload(ah);