diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2010-11-10 08:03:13 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-16 16:37:06 -0500 |
commit | 15cbbc44cc4abaaebc37caf0ec9410a3f83d1deb (patch) | |
tree | 6c0659c13c6c5e7c45d9b63b3f76319a002fb2b4 | |
parent | f4475a6e52fce8d951a96c763f36b835bf89fdec (diff) |
ath9k_hw: Improve power control accuracy for AR9003
It is done for 5Ghz by adding three temperature slopes.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | 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 da26d3704cb2..5ffeda25bf14 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, | |||
4062 | { | 4062 | { |
4063 | int tempSlope = 0; | 4063 | int tempSlope = 0; |
4064 | struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep; | 4064 | struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep; |
4065 | int f[3], t[3]; | ||
4065 | 4066 | ||
4066 | REG_RMW(ah, AR_PHY_TPC_11_B0, | 4067 | REG_RMW(ah, AR_PHY_TPC_11_B0, |
4067 | (correction[0] << AR_PHY_TPC_OLPC_GAIN_DELTA_S), | 4068 | (correction[0] << AR_PHY_TPC_OLPC_GAIN_DELTA_S), |
@@ -4090,7 +4091,16 @@ static int ar9003_hw_power_control_override(struct ath_hw *ah, | |||
4090 | */ | 4091 | */ |
4091 | if (frequency < 4000) | 4092 | if (frequency < 4000) |
4092 | tempSlope = eep->modalHeader2G.tempSlope; | 4093 | tempSlope = eep->modalHeader2G.tempSlope; |
4093 | else | 4094 | else if (eep->base_ext2.tempSlopeLow != 0) { |
4095 | t[0] = eep->base_ext2.tempSlopeLow; | ||
4096 | f[0] = 5180; | ||
4097 | t[1] = eep->modalHeader5G.tempSlope; | ||
4098 | f[1] = 5500; | ||
4099 | t[2] = eep->base_ext2.tempSlopeHigh; | ||
4100 | f[2] = 5785; | ||
4101 | tempSlope = ar9003_hw_power_interpolate((s32) frequency, | ||
4102 | f, t, 3); | ||
4103 | } else | ||
4094 | tempSlope = eep->modalHeader5G.tempSlope; | 4104 | tempSlope = eep->modalHeader5G.tempSlope; |
4095 | 4105 | ||
4096 | REG_RMW_FIELD(ah, AR_PHY_TPC_19, AR_PHY_TPC_19_ALPHA_THERM, tempSlope); | 4106 | REG_RMW_FIELD(ah, AR_PHY_TPC_19, AR_PHY_TPC_19_ALPHA_THERM, tempSlope); |