From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH V2 18/22] ath9k_hw: Read iq calibration data only for active chains
Date: Tue, 19 Apr 2011 19:29:16 +0530 [thread overview]
Message-ID: <1303221560-25139-19-git-send-email-vasanth@atheros.com> (raw)
In-Reply-To: <1303221560-25139-1-git-send-email-vasanth@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
drivers/net/wireless/ath/ath9k/ar9003_calib.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_calib.c b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
index 09f3aa7..bceff49 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
@@ -185,17 +185,19 @@ static void ar9003_hw_iqcal_collect(struct ath_hw *ah)
/* Accumulate IQ cal measures for active chains */
for (i = 0; i < AR5416_MAX_CHAINS; i++) {
- ah->totalPowerMeasI[i] +=
- REG_READ(ah, AR_PHY_CAL_MEAS_0(i));
- ah->totalPowerMeasQ[i] +=
- REG_READ(ah, AR_PHY_CAL_MEAS_1(i));
- ah->totalIqCorrMeas[i] +=
- (int32_t) REG_READ(ah, AR_PHY_CAL_MEAS_2(i));
- ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE,
- "%d: Chn %d pmi=0x%08x;pmq=0x%08x;iqcm=0x%08x;\n",
- ah->cal_samples, i, ah->totalPowerMeasI[i],
- ah->totalPowerMeasQ[i],
- ah->totalIqCorrMeas[i]);
+ if (ah->txchainmask & BIT(i)) {
+ ah->totalPowerMeasI[i] +=
+ REG_READ(ah, AR_PHY_CAL_MEAS_0(i));
+ ah->totalPowerMeasQ[i] +=
+ REG_READ(ah, AR_PHY_CAL_MEAS_1(i));
+ ah->totalIqCorrMeas[i] +=
+ (int32_t) REG_READ(ah, AR_PHY_CAL_MEAS_2(i));
+ ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE,
+ "%d: Chn %d pmi=0x%08x;pmq=0x%08x;iqcm=0x%08x;\n",
+ ah->cal_samples, i, ah->totalPowerMeasI[i],
+ ah->totalPowerMeasQ[i],
+ ah->totalIqCorrMeas[i]);
+ }
}
}
--
1.7.0.4
next prev parent reply other threads:[~2011-04-19 13:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 13:58 [PATCH V2 00/22] Add support for AR9340 Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 02/22] ath9k_hw: Take care of few host interface register changes " Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 03/22] ath9k_hw: Get AHB clock information from ath9k_platform_data Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 04/22] ath9k_hw: Configure pll control register accordingly for AR9340 Vasanthakumar Thiagarajan
2011-04-19 14:13 ` Sujith
2011-04-20 4:35 ` Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 05/22] ath9k_hw: Add initvals.h for ar9340 Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 08/22] ath9k_hw: Initialize tx and rx gain table from " Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 09/22] ath9k_hw: Read spur frequency information from eeprom for AR9340 Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 10/22] ath9k_hw: Configure RF channel freqency " Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 11/22] ath9k_hw: Clean up rx/tx chain configuration before AGC/IQ cal Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 13/22] ath9k_hw: Don't configure AR_CH0_THERM for AR9340 Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 14/22] ath9k_hw: Skip internal regulator configuration " Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 15/22] ath9k_hw: Configure tuning capacitance value for AR9340 as well Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 16/22] ath9k_hw: Enable byte Tx/Rx data swap for AR9340 Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 17/22] ath9k_hw: Configure chain switch table and attenuation control only for active chains Vasanthakumar Thiagarajan
2011-04-19 13:59 ` Vasanthakumar Thiagarajan [this message]
2011-04-19 13:59 ` [PATCH V2 19/22] ath9k: Add AR9340 platform id to id table Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 21/22] ath9k_hw: Disable INTR_HOST1_FATAL to avoid interrupt strom with ar9430 Vasanthakumar Thiagarajan
2011-04-19 13:59 ` [PATCH V2 22/22] ath9k_hw: Enable AR9340 support Vasanthakumar Thiagarajan
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=1303221560-25139-19-git-send-email-vasanth@atheros.com \
--to=vasanth@atheros.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;
as well as URLs for NNTP newsgroup(s).