diff options
author | Senthil Balasubramanian <senthilkumar@atheros.com> | 2009-03-06 00:54:10 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-16 18:09:31 -0400 |
commit | 4e845168380a5954dd8702be5229e3e1b477ed81 (patch) | |
tree | de3f029f4ab97e2c7f7cf3693e3b08194d9f5b2a /drivers/net/wireless/ath9k/hw.c | |
parent | b03a9db95a285e13a5e4f2913e9d22a84bf50cc6 (diff) |
ath9k: INI update for AR9285 and periodic PA offset caliberation
This patch updates the initvalues for AR9285 chipset and also adds
periodic PA offset caliberation.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath9k/hw.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c index eb750a503999..cdc9d15e8419 100644 --- a/drivers/net/wireless/ath9k/hw.c +++ b/drivers/net/wireless/ath9k/hw.c | |||
@@ -678,6 +678,7 @@ static struct ath_hw *ath9k_hw_do_attach(u16 devid, struct ath_softc *sc, | |||
678 | ah->hw_version.macVersion, ah->hw_version.macRev); | 678 | ah->hw_version.macVersion, ah->hw_version.macRev); |
679 | 679 | ||
680 | if (AR_SREV_9285_12_OR_LATER(ah)) { | 680 | if (AR_SREV_9285_12_OR_LATER(ah)) { |
681 | |||
681 | INIT_INI_ARRAY(&ah->iniModes, ar9285Modes_9285_1_2, | 682 | INIT_INI_ARRAY(&ah->iniModes, ar9285Modes_9285_1_2, |
682 | ARRAY_SIZE(ar9285Modes_9285_1_2), 6); | 683 | ARRAY_SIZE(ar9285Modes_9285_1_2), 6); |
683 | INIT_INI_ARRAY(&ah->iniCommon, ar9285Common_9285_1_2, | 684 | INIT_INI_ARRAY(&ah->iniCommon, ar9285Common_9285_1_2, |
@@ -817,6 +818,22 @@ static struct ath_hw *ath9k_hw_do_attach(u16 devid, struct ath_softc *sc, | |||
817 | if (ecode != 0) | 818 | if (ecode != 0) |
818 | goto bad; | 819 | goto bad; |
819 | 820 | ||
821 | if (AR_SREV_9285_12_OR_LATER(ah)) { | ||
822 | u32 txgain_type = ah->eep_ops->get_eeprom(ah, EEP_TXGAIN_TYPE); | ||
823 | |||
824 | /* txgain table */ | ||
825 | if (txgain_type == AR5416_EEP_TXGAIN_HIGH_POWER) { | ||
826 | INIT_INI_ARRAY(&ah->iniModesTxGain, | ||
827 | ar9285Modes_high_power_tx_gain_9285_1_2, | ||
828 | ARRAY_SIZE(ar9285Modes_high_power_tx_gain_9285_1_2), 6); | ||
829 | } else { | ||
830 | INIT_INI_ARRAY(&ah->iniModesTxGain, | ||
831 | ar9285Modes_original_tx_gain_9285_1_2, | ||
832 | ARRAY_SIZE(ar9285Modes_original_tx_gain_9285_1_2), 6); | ||
833 | } | ||
834 | |||
835 | } | ||
836 | |||
820 | /* rxgain table */ | 837 | /* rxgain table */ |
821 | if (AR_SREV_9280_20(ah)) | 838 | if (AR_SREV_9280_20(ah)) |
822 | ath9k_hw_init_rxgain_ini(ah); | 839 | ath9k_hw_init_rxgain_ini(ah); |
@@ -1293,7 +1310,8 @@ static int ath9k_hw_process_ini(struct ath_hw *ah, | |||
1293 | if (AR_SREV_9280(ah)) | 1310 | if (AR_SREV_9280(ah)) |
1294 | REG_WRITE_ARRAY(&ah->iniModesRxGain, modesIndex, regWrites); | 1311 | REG_WRITE_ARRAY(&ah->iniModesRxGain, modesIndex, regWrites); |
1295 | 1312 | ||
1296 | if (AR_SREV_9280(ah)) | 1313 | if (AR_SREV_9280(ah) || (AR_SREV_9285(ah) && |
1314 | AR_SREV_9285_12_OR_LATER(ah))) | ||
1297 | REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites); | 1315 | REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites); |
1298 | 1316 | ||
1299 | for (i = 0; i < ah->iniCommon.ia_rows; i++) { | 1317 | for (i = 0; i < ah->iniCommon.ia_rows; i++) { |