diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-04-16 16:46:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-17 14:57:13 -0400 |
commit | 8edb254c8c08dc2e6cb60e30da00a49f8b102c43 (patch) | |
tree | 297922bf653b0192ab612845a9dc13801eee914e /drivers/net/wireless/ath/ath9k | |
parent | 23bd7cedf1f1c97a5019de6f7736ab935d7cc6a3 (diff) |
ath9k: use ath9k_hw_fbin2freq instead of FBIN2FREQ
The FBIN2FREQ macro and the ath9k_hw_fbin2freq function
does the same thing. Remove the macro, and use the inline
function instead.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 10 |
3 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index f2333135738e..1188db205e32 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -4056,7 +4056,7 @@ static u8 ar9003_hw_eeprom_get_tgt_pwr(struct ath_hw *ah, | |||
4056 | * targetpower piers stored on eeprom | 4056 | * targetpower piers stored on eeprom |
4057 | */ | 4057 | */ |
4058 | for (i = 0; i < numPiers; i++) { | 4058 | for (i = 0; i < numPiers; i++) { |
4059 | freqArray[i] = FBIN2FREQ(pFreqBin[i], is2GHz); | 4059 | freqArray[i] = ath9k_hw_fbin2freq(pFreqBin[i], is2GHz); |
4060 | targetPowerArray[i] = pEepromTargetPwr[i].tPow2x[rateIndex]; | 4060 | targetPowerArray[i] = pEepromTargetPwr[i].tPow2x[rateIndex]; |
4061 | } | 4061 | } |
4062 | 4062 | ||
@@ -4092,7 +4092,7 @@ static u8 ar9003_hw_eeprom_get_ht20_tgt_pwr(struct ath_hw *ah, | |||
4092 | * from targetpower piers stored on eeprom | 4092 | * from targetpower piers stored on eeprom |
4093 | */ | 4093 | */ |
4094 | for (i = 0; i < numPiers; i++) { | 4094 | for (i = 0; i < numPiers; i++) { |
4095 | freqArray[i] = FBIN2FREQ(pFreqBin[i], is2GHz); | 4095 | freqArray[i] = ath9k_hw_fbin2freq(pFreqBin[i], is2GHz); |
4096 | targetPowerArray[i] = pEepromTargetPwr[i].tPow2x[rateIndex]; | 4096 | targetPowerArray[i] = pEepromTargetPwr[i].tPow2x[rateIndex]; |
4097 | } | 4097 | } |
4098 | 4098 | ||
@@ -4128,7 +4128,7 @@ static u8 ar9003_hw_eeprom_get_ht40_tgt_pwr(struct ath_hw *ah, | |||
4128 | * targetpower piers stored on eeprom | 4128 | * targetpower piers stored on eeprom |
4129 | */ | 4129 | */ |
4130 | for (i = 0; i < numPiers; i++) { | 4130 | for (i = 0; i < numPiers; i++) { |
4131 | freqArray[i] = FBIN2FREQ(pFreqBin[i], is2GHz); | 4131 | freqArray[i] = ath9k_hw_fbin2freq(pFreqBin[i], is2GHz); |
4132 | targetPowerArray[i] = pEepromTargetPwr[i].tPow2x[rateIndex]; | 4132 | targetPowerArray[i] = pEepromTargetPwr[i].tPow2x[rateIndex]; |
4133 | } | 4133 | } |
4134 | 4134 | ||
@@ -4153,7 +4153,7 @@ static u8 ar9003_hw_eeprom_get_cck_tgt_pwr(struct ath_hw *ah, | |||
4153 | * targetpower piers stored on eeprom | 4153 | * targetpower piers stored on eeprom |
4154 | */ | 4154 | */ |
4155 | for (i = 0; i < numPiers; i++) { | 4155 | for (i = 0; i < numPiers; i++) { |
4156 | freqArray[i] = FBIN2FREQ(pFreqBin[i], 1); | 4156 | freqArray[i] = ath9k_hw_fbin2freq(pFreqBin[i], 1); |
4157 | targetPowerArray[i] = pEepromTargetPwr[i].tPow2x[rateIndex]; | 4157 | targetPowerArray[i] = pEepromTargetPwr[i].tPow2x[rateIndex]; |
4158 | } | 4158 | } |
4159 | 4159 | ||
@@ -4450,7 +4450,7 @@ static int ar9003_hw_cal_pier_get(struct ath_hw *ah, | |||
4450 | is2GHz = 1; | 4450 | is2GHz = 1; |
4451 | } | 4451 | } |
4452 | 4452 | ||
4453 | *pfrequency = FBIN2FREQ(*pCalPier, is2GHz); | 4453 | *pfrequency = ath9k_hw_fbin2freq(*pCalPier, is2GHz); |
4454 | *pcorrection = pCalPierStruct->refPower; | 4454 | *pcorrection = pCalPierStruct->refPower; |
4455 | *ptemperature = pCalPierStruct->tempMeas; | 4455 | *ptemperature = pCalPierStruct->tempMeas; |
4456 | *pvoltage = pCalPierStruct->voltMeas; | 4456 | *pvoltage = pCalPierStruct->voltMeas; |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h index bb223fe82816..2505ac44f0c1 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | |||
@@ -42,7 +42,6 @@ | |||
42 | #define AR9300_EEPMISC_WOW 0x02 | 42 | #define AR9300_EEPMISC_WOW 0x02 |
43 | #define AR9300_CUSTOMER_DATA_SIZE 20 | 43 | #define AR9300_CUSTOMER_DATA_SIZE 20 |
44 | 44 | ||
45 | #define FBIN2FREQ(x, y) ((y) ? (2300 + x) : (4800 + 5 * x)) | ||
46 | #define AR9300_MAX_CHAINS 3 | 45 | #define AR9300_MAX_CHAINS 3 |
47 | #define AR9300_ANT_16S 25 | 46 | #define AR9300_ANT_16S 25 |
48 | #define AR9300_FUTURE_MODAL_SZ 6 | 47 | #define AR9300_FUTURE_MODAL_SZ 6 |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index 4c9bc9f14f79..bbda25f4e9f0 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -208,11 +208,12 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah, | |||
208 | continue; | 208 | continue; |
209 | negative = 0; | 209 | negative = 0; |
210 | if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah)) | 210 | if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah)) |
211 | cur_bb_spur = FBIN2FREQ(spur_fbin_ptr[i], | 211 | cur_bb_spur = ath9k_hw_fbin2freq(spur_fbin_ptr[i], |
212 | IS_CHAN_2GHZ(chan)) - synth_freq; | 212 | IS_CHAN_2GHZ(chan)); |
213 | else | 213 | else |
214 | cur_bb_spur = spur_freq[i] - synth_freq; | 214 | cur_bb_spur = spur_freq[i]; |
215 | 215 | ||
216 | cur_bb_spur -= synth_freq; | ||
216 | if (cur_bb_spur < 0) { | 217 | if (cur_bb_spur < 0) { |
217 | negative = 1; | 218 | negative = 1; |
218 | cur_bb_spur = -cur_bb_spur; | 219 | cur_bb_spur = -cur_bb_spur; |
@@ -442,7 +443,8 @@ static void ar9003_hw_spur_mitigate_ofdm(struct ath_hw *ah, | |||
442 | ar9003_hw_spur_ofdm_clear(ah); | 443 | ar9003_hw_spur_ofdm_clear(ah); |
443 | 444 | ||
444 | for (i = 0; i < AR_EEPROM_MODAL_SPURS && spurChansPtr[i]; i++) { | 445 | for (i = 0; i < AR_EEPROM_MODAL_SPURS && spurChansPtr[i]; i++) { |
445 | freq_offset = FBIN2FREQ(spurChansPtr[i], mode) - synth_freq; | 446 | freq_offset = ath9k_hw_fbin2freq(spurChansPtr[i], mode); |
447 | freq_offset -= synth_freq; | ||
446 | if (abs(freq_offset) < range) { | 448 | if (abs(freq_offset) < range) { |
447 | ar9003_hw_spur_ofdm_work(ah, chan, freq_offset); | 449 | ar9003_hw_spur_ofdm_work(ah, chan, freq_offset); |
448 | break; | 450 | break; |