aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/eeprom_def.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2011-11-22 18:52:00 +0530
committerJohn W. Linville <linville@tuxdriver.com>2011-11-28 14:36:22 -0500
commita261f0e965b7e903873880cec1a70c9cbc776c76 (patch)
treea97b242f5c58bdd7be622ea72d21cbaa3fb2fa3f /drivers/net/wireless/ath/ath9k/eeprom_def.c
parent4eb287a4048e4a2cb0400a6d972d97739ec8c799 (diff)
ath9k_hw: Fix minimum CTL power for each runtime mode
The conformance test limits (CTL) for each regulatory domains (FCC/ETSI/MKK) are programmed for each runtime modes (11B,11G, HT20 and HT40) in EEPROM. The lowest ctledge power value of a particular running mode should not be used while computing ctledge power for a different running mode.(i.e 11G's min ctledge power should not be used while computing ctledge power for HT20). Currently, the code does not handle this properly which would result in incorrect txpowers in certain cases. So reset the twiceMaxEdgePower to the default while computing min ctlegepower for every mode. Cc: David Quan <dquan@qca.qualcomm.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom_def.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_def.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
index 81e62967167..55a21d39167 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
@@ -1000,7 +1000,7 @@ static void ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah,
#define REDUCE_SCALED_POWER_BY_THREE_CHAIN 9 /* 10*log10(3)*2 */
struct ar5416_eeprom_def *pEepData = &ah->eeprom.def;
- u16 twiceMaxEdgePower = MAX_RATE_POWER;
+ u16 twiceMaxEdgePower;
int i;
struct cal_ctl_data *rep;
struct cal_target_power_leg targetPowerOfdm, targetPowerCck = {
@@ -1121,9 +1121,7 @@ static void ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah,
else
freq = centers.ctl_center;
- if (ah->eep_ops->get_eeprom_ver(ah) == 14 &&
- ah->eep_ops->get_eeprom_rev(ah) <= 2)
- twiceMaxEdgePower = MAX_RATE_POWER;
+ twiceMaxEdgePower = MAX_RATE_POWER;
for (i = 0; (i < AR5416_NUM_CTLS) && pEepData->ctlIndex[i]; i++) {
if ((((cfgCtl & ~CTL_MODE_M) |