From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
To: <linville@tuxdriver.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 08/11] ath9k_hw: Improve power control accuracy for AR9003
Date: Wed, 10 Nov 2010 05:03:13 -0800 [thread overview]
Message-ID: <1289394196-3465-8-git-send-email-vasanth@atheros.com> (raw)
In-Reply-To: <1289394196-3465-1-git-send-email-vasanth@atheros.com>
It is done for 5Ghz by adding three temperature slopes.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index da26d37..5ffeda2 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -4062,6 +4062,7 @@ static int ar9003_hw_power_control_override(struct ath_hw *ah,
{
int tempSlope = 0;
struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
+ int f[3], t[3];
REG_RMW(ah, AR_PHY_TPC_11_B0,
(correction[0] << AR_PHY_TPC_OLPC_GAIN_DELTA_S),
@@ -4090,7 +4091,16 @@ static int ar9003_hw_power_control_override(struct ath_hw *ah,
*/
if (frequency < 4000)
tempSlope = eep->modalHeader2G.tempSlope;
- else
+ else if (eep->base_ext2.tempSlopeLow != 0) {
+ t[0] = eep->base_ext2.tempSlopeLow;
+ f[0] = 5180;
+ t[1] = eep->modalHeader5G.tempSlope;
+ f[1] = 5500;
+ t[2] = eep->base_ext2.tempSlopeHigh;
+ f[2] = 5785;
+ tempSlope = ar9003_hw_power_interpolate((s32) frequency,
+ f, t, 3);
+ } else
tempSlope = eep->modalHeader5G.tempSlope;
REG_RMW_FIELD(ah, AR_PHY_TPC_19, AR_PHY_TPC_19_ALPHA_THERM, tempSlope);
--
1.7.0.4
next prev parent reply other threads:[~2010-11-10 13:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 13:03 [PATCH 01/11] ath9k_hw: Fix a reset failure on AR9382 (2x2) Vasanthakumar Thiagarajan
2010-11-10 13:03 ` [PATCH 02/11] ath9k_hw: Add new member into the eeprom structure Vasanthakumar Thiagarajan
2010-11-10 13:03 ` [PATCH 03/11] ath9k_hw: Initialize 2GHz CTL properly Vasanthakumar Thiagarajan
2010-11-10 13:03 ` [PATCH 04/11] ath9k_hw: Fix paprd training frame failure Vasanthakumar Thiagarajan
2010-11-10 13:03 ` [PATCH 05/11] ath9k_hw: add eeprom templates for ar9003 family chipsets Vasanthakumar Thiagarajan
2010-11-10 13:03 ` [PATCH 06/11] ath9k_hw: Fix XPABIAS level configuration for AR9003 Vasanthakumar Thiagarajan
2010-11-10 13:03 ` [PATCH 07/11] ath9k_hw: Enable strong signal detection " Vasanthakumar Thiagarajan
2010-11-10 13:03 ` Vasanthakumar Thiagarajan [this message]
2010-11-10 13:03 ` [PATCH 09/11] ath9k_hw: Add helper function for interpolation Vasanthakumar Thiagarajan
2010-11-10 13:03 ` [PATCH 10/11] ath9k: Fix bug in delimiter padding computation Vasanthakumar Thiagarajan
2010-11-10 13:03 ` [PATCH 11/11] ath9k_hw: Fix low throughput issue with AR93xx Vasanthakumar Thiagarajan
2010-11-10 16:23 ` [PATCH 01/11] ath9k_hw: Fix a reset failure on AR9382 (2x2) Felix Fietkau
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=1289394196-3465-8-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).