diff options
author | Bruno Randolf <br1@einfach.org> | 2010-03-09 08:56:10 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-10 22:16:57 +0100 |
commit | 5f13bfac0718ce6f83ecba3755f224c3790e8d66 (patch) | |
tree | 261dbdd87c8f7593d917a078ccdde8281ab31db9 /drivers/net/wireless/ath/ath5k/eeprom.c | |
parent | ath5k: fix I/Q calibration (for real) (diff) | |
download | linux-5f13bfac0718ce6f83ecba3755f224c3790e8d66.tar.xz linux-5f13bfac0718ce6f83ecba3755f224c3790e8d66.zip |
ath5k: read eeprom IQ calibration values correctly for G mode
we read the IQ correction values (i_cal and q_cal) for G mode from a wrong
location (the same shifts as for A mode is applied which is incorrect). use
correct locations, matching the docs and HAL sources.
also we should write IQ correction only when we have that information in the
EEPROM, starting from version 4. also write it in the same way as we do in the
periodic recalibration (enable last), just to be sure.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/eeprom.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/eeprom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c index 6a3f4da7fb48..10b52262b232 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c @@ -429,8 +429,8 @@ static int ath5k_eeprom_read_modes(struct ath5k_hw *ah, u32 *offset, ee->ee_margin_tx_rx[mode] = (val >> 8) & 0x3f; AR5K_EEPROM_READ(o++, val); - ee->ee_i_cal[mode] = (val >> 8) & 0x3f; - ee->ee_q_cal[mode] = (val >> 3) & 0x1f; + ee->ee_i_cal[mode] = (val >> 5) & 0x3f; + ee->ee_q_cal[mode] = val & 0x1f; if (ah->ah_ee_version >= AR5K_EEPROM_VERSION_4_2) { AR5K_EEPROM_READ(o++, val); |