diff options
author | Senthil Balasubramanian <senthilkumar@atheros.com> | 2009-09-18 15:08:20 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:40 -0400 |
commit | e41f0bfcb130d9f17cf5ee8e46d739c1bebda963 (patch) | |
tree | d8a81b3e0cb3bb0b48ce711ae7684312ae69991a /drivers/net/wireless/ath/ath9k/eeprom_4k.c | |
parent | ebb90cfc32f0d7ee55be7787ce7d88e521e9ed01 (diff) | |
download | lwn-e41f0bfcb130d9f17cf5ee8e46d739c1bebda963.tar.gz lwn-e41f0bfcb130d9f17cf5ee8e46d739c1bebda963.zip |
ath9k: Fix bugs in handling TX power
* Get power table offset from the EEPROM instead of using
a hardcoded value of -5 if the EEPROM rev is >= 21.
* Add support in the 4k eeprom code for tx power offset
in case we have a 4k AR9280 implementation.
* Fix tx power accuracy at high powers.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom_4k.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_4k.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c index 2a27b1d51a1b..58167d861dc6 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c @@ -210,6 +210,8 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah, return pBase->rxMask; case EEP_FRAC_N_5G: return 0; + case EEP_PWR_TABLE_OFFSET: + return AR5416_PWR_TABLE_OFFSET_DB; default: return 0; } @@ -753,7 +755,7 @@ static void ath9k_hw_4k_set_txpower(struct ath_hw *ah, if (AR_SREV_9280_10_OR_LATER(ah)) { for (i = 0; i < Ar5416RateSize; i++) - ratesArray[i] -= AR5416_PWR_TABLE_OFFSET * 2; + ratesArray[i] -= AR5416_PWR_TABLE_OFFSET_DB * 2; } /* OFDM power per rate */ |