From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
To: <linville@tuxdriver.com>
Cc: <linux-wireless@vger.kernel.org>,
Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Subject: [PATCH 05/14] ath9k_hw: Add support to reuse TxIQ cal measurements
Date: Fri, 7 Oct 2011 17:17:10 +0530 [thread overview]
Message-ID: <1317988039-28632-5-git-send-email-rmanohar@qca.qualcomm.com> (raw)
In-Reply-To: <1317988039-28632-1-git-send-email-rmanohar@qca.qualcomm.com>
Pass an argument to decide whether to reuse the Tx IQ
calibration measurements or not during fast channel change.
This will be later used by MCI support for AR9480.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_calib.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
index 026aa5b..6d68566 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+++ b/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);
--
1.7.7
next prev parent reply other threads:[~2011-10-07 11:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-07 11:47 [PATCH 01/14] ath9k_hw: Updated ar9003 initval table for AR9380 Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 02/14] ath9k_hw: Update AR9003 initval to improve phase noise Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 03/14] ath9k_hw: Updated AR9003 tx gain table for 5GHz Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 04/14] ath9k_hw: Improve fast channel change for AR9003 chips Rajkumar Manoharan
2011-10-07 11:47 ` Rajkumar Manoharan [this message]
2011-10-07 11:47 ` [PATCH 06/14] ath9k_hw: Add support to reuse Carrier leak calibration Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 07/14] ath9k_hw: Cleanup Tx calibrations for AR9003 chips Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 08/14] ath9k_hw: Support fast channel change on 5GHz " Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 09/14] ath9k_hw: Fix ASPM L1 issue for AR9480 Rajkumar Manoharan
2011-10-07 15:49 ` Luis R. Rodriguez
2011-10-07 16:27 ` Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 10/14] ath9k_hw: Update normal/min noise floor value " Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 11/14] ath9k_hw: Add radio retention support " Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 12/14] ath9k_hw: Do fast channel change based on reusable calibration results Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 13/14] ath9k_hw: Rename AR9480 -> AR9462 initvals Rajkumar Manoharan
2011-10-07 15:47 ` Luis R. Rodriguez
2011-10-07 16:25 ` Rajkumar Manoharan
2011-10-07 11:47 ` [PATCH 14/14] ath9k: Rename AR9480 into AR9462 Rajkumar Manoharan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317988039-28632-5-git-send-email-rmanohar@qca.qualcomm.com \
--to=rmanohar@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox