ath9k: Remove multiple macro occurrences
authorSujith <Sujith.Manoharan@atheros.com>
Fri, 20 Feb 2009 09:43:13 +0000 (15:13 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Feb 2009 19:52:48 +0000 (14:52 -0500)
OLC_FOR_AR9280_20_LATER is defined in multiple places,
move it to a common location.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/calib.c
drivers/net/wireless/ath9k/eeprom.c
drivers/net/wireless/ath9k/eeprom.h
drivers/net/wireless/ath9k/hw.c

index 93c6e1f72353ad89964874088e51367f703cfa1c..1c074c059b5c431155c48ed4b07f2222e01ec568 100644 (file)
@@ -749,8 +749,6 @@ bool ath9k_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
                        u8 rxchainmask, bool longcal,
                        bool *isCalDone)
 {
-#define OLC_FOR_AR9280_20_LATER        (AR_SREV_9280_20_OR_LATER(ah) && \
-                               ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
        struct hal_cal_list *currCal = ah->cal_list_curr;
 
        *isCalDone = true;
index fff7a1b6fbf2f4f57a0b491058b13dfb04cf9771..02d0b919ee3d3bd0904963b91b39bc242e1d33cc 100644 (file)
@@ -2164,8 +2164,6 @@ static bool ath9k_hw_set_def_power_cal_table(struct ath_hw *ah,
                                  struct ath9k_channel *chan,
                                  int16_t *pTxPowerIndexOffset)
 {
-#define OLC_FOR_AR9280_20_LATER        (AR_SREV_9280_20_OR_LATER(ah) && \
-                               ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
 #define SM_PD_GAIN(x) SM(0x38, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_##x)
 #define SM_PDGAIN_B(x, y) \
                SM((gainBoundaries[x]), AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_##y)
index 2cfea5d56d100cdf88f6cadbd6c0dd2c7d29106f..6296e3eff10b20e1e21a41eae884065e2cf02cba 100644 (file)
@@ -95,6 +95,9 @@
 #define FREQ2FBIN(x, y)                ((y) ? ((x) - 2300) : (((x) - 4800) / 5))
 #define ath9k_hw_use_flash(_ah)        (!(_ah->ah_flags & AH_USE_EEPROM))
 
+#define OLC_FOR_AR9280_20_LATER (AR_SREV_9280_20_OR_LATER(ah) && \
+                                ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
+
 #define AR_EEPROM_RFSILENT_GPIO_SEL     0x001c
 #define AR_EEPROM_RFSILENT_GPIO_SEL_S   2
 #define AR_EEPROM_RFSILENT_POLARITY     0x0002
index 2c0173a3cce0626b91644418faa5a8ac8707ea74..6f2e92ec77ae738f94b6d1df5445fec2bc564152 100644 (file)
@@ -1219,8 +1219,6 @@ static int ath9k_hw_process_ini(struct ath_hw *ah,
                                struct ath9k_channel *chan,
                                enum ath9k_ht_macmode macmode)
 {
-#define OLC_FOR_AR9280_20_LATER        (AR_SREV_9280_20_OR_LATER(ah) && \
-                               ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
        int i, regWrites = 0;
        struct ieee80211_channel *channel = chan->chan;
        u32 modesIndex, freqIndex;