diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-08-07 00:15:19 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:13:34 -0400 |
commit | a37414a220990614de376a155e23dfed471efbdc (patch) | |
tree | cd1851ae56c208bf225e3273a7060e12ec8e41ed /drivers | |
parent | b5aec950eeb433d4850c1e5fcf14b666048e647d (diff) |
ath9k: Cleanup ath9k_hw_4k_set_gain() interface
regChainOffset is always zero, remove it.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_4k.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c index 111f4d72092b..aafc6d33da75 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c | |||
@@ -844,13 +844,13 @@ static void ath9k_hw_4k_set_addac(struct ath_hw *ah, | |||
844 | static void ath9k_hw_4k_set_gain(struct ath_hw *ah, | 844 | static void ath9k_hw_4k_set_gain(struct ath_hw *ah, |
845 | struct modal_eep_4k_header *pModal, | 845 | struct modal_eep_4k_header *pModal, |
846 | struct ar5416_eeprom_4k *eep, | 846 | struct ar5416_eeprom_4k *eep, |
847 | u8 txRxAttenLocal, int regChainOffset) | 847 | u8 txRxAttenLocal) |
848 | { | 848 | { |
849 | REG_WRITE(ah, AR_PHY_SWITCH_CHAIN_0 + regChainOffset, | 849 | REG_WRITE(ah, AR_PHY_SWITCH_CHAIN_0, |
850 | pModal->antCtrlChain[0]); | 850 | pModal->antCtrlChain[0]); |
851 | 851 | ||
852 | REG_WRITE(ah, AR_PHY_TIMING_CTRL4(0) + regChainOffset, | 852 | REG_WRITE(ah, AR_PHY_TIMING_CTRL4(0), |
853 | (REG_READ(ah, AR_PHY_TIMING_CTRL4(0) + regChainOffset) & | 853 | (REG_READ(ah, AR_PHY_TIMING_CTRL4(0)) & |
854 | ~(AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF | | 854 | ~(AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF | |
855 | AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF)) | | 855 | AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF)) | |
856 | SM(pModal->iqCalICh[0], AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF) | | 856 | SM(pModal->iqCalICh[0], AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF) | |
@@ -860,14 +860,14 @@ static void ath9k_hw_4k_set_gain(struct ath_hw *ah, | |||
860 | AR5416_EEP_MINOR_VER_3) { | 860 | AR5416_EEP_MINOR_VER_3) { |
861 | txRxAttenLocal = pModal->txRxAttenCh[0]; | 861 | txRxAttenLocal = pModal->txRxAttenCh[0]; |
862 | 862 | ||
863 | REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, | 863 | REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, |
864 | AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN, pModal->bswMargin[0]); | 864 | AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN, pModal->bswMargin[0]); |
865 | REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, | 865 | REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, |
866 | AR_PHY_GAIN_2GHZ_XATTEN1_DB, pModal->bswAtten[0]); | 866 | AR_PHY_GAIN_2GHZ_XATTEN1_DB, pModal->bswAtten[0]); |
867 | REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, | 867 | REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, |
868 | AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN, | 868 | AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN, |
869 | pModal->xatten2Margin[0]); | 869 | pModal->xatten2Margin[0]); |
870 | REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset, | 870 | REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ, |
871 | AR_PHY_GAIN_2GHZ_XATTEN2_DB, pModal->xatten2Db[0]); | 871 | AR_PHY_GAIN_2GHZ_XATTEN2_DB, pModal->xatten2Db[0]); |
872 | 872 | ||
873 | /* Set the block 1 value to block 0 value */ | 873 | /* Set the block 1 value to block 0 value */ |
@@ -884,9 +884,9 @@ static void ath9k_hw_4k_set_gain(struct ath_hw *ah, | |||
884 | pModal->xatten2Db[0]); | 884 | pModal->xatten2Db[0]); |
885 | } | 885 | } |
886 | 886 | ||
887 | REG_RMW_FIELD(ah, AR_PHY_RXGAIN + regChainOffset, | 887 | REG_RMW_FIELD(ah, AR_PHY_RXGAIN, |
888 | AR9280_PHY_RXGAIN_TXRX_ATTEN, txRxAttenLocal); | 888 | AR9280_PHY_RXGAIN_TXRX_ATTEN, txRxAttenLocal); |
889 | REG_RMW_FIELD(ah, AR_PHY_RXGAIN + regChainOffset, | 889 | REG_RMW_FIELD(ah, AR_PHY_RXGAIN, |
890 | AR9280_PHY_RXGAIN_TXRX_MARGIN, pModal->rxTxMarginCh[0]); | 890 | AR9280_PHY_RXGAIN_TXRX_MARGIN, pModal->rxTxMarginCh[0]); |
891 | 891 | ||
892 | REG_RMW_FIELD(ah, AR_PHY_RXGAIN + 0x1000, | 892 | REG_RMW_FIELD(ah, AR_PHY_RXGAIN + 0x1000, |
@@ -919,7 +919,7 @@ static void ath9k_hw_4k_set_board_values(struct ath_hw *ah, | |||
919 | ah->eep_ops->get_eeprom_antenna_cfg(ah, chan)); | 919 | ah->eep_ops->get_eeprom_antenna_cfg(ah, chan)); |
920 | 920 | ||
921 | /* Single chain for 4K EEPROM*/ | 921 | /* Single chain for 4K EEPROM*/ |
922 | ath9k_hw_4k_set_gain(ah, pModal, eep, txRxAttenLocal, 0); | 922 | ath9k_hw_4k_set_gain(ah, pModal, eep, txRxAttenLocal); |
923 | 923 | ||
924 | /* Initialize Ant Diversity settings from EEPROM */ | 924 | /* Initialize Ant Diversity settings from EEPROM */ |
925 | if (pModal->version >= 3) { | 925 | if (pModal->version >= 3) { |