ath9k: Move AR5416_VER_MASK to a common location
authorSujith <Sujith.Manoharan@atheros.com>
Fri, 13 Mar 2009 03:26:02 +0000 (08:56 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Sat, 28 Mar 2009 00:12:49 +0000 (20:12 -0400)
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/eeprom.c
drivers/net/wireless/ath9k/eeprom.h

index 6c9bc5fdb04a33e009473aaeea1446b9463c55d2..49dee238c683177a68bcc5c29735a86a2396124b 100644 (file)
@@ -1588,7 +1588,6 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)
 static u32 ath9k_hw_def_get_eeprom(struct ath_hw *ah,
                                   enum eeprom_param param)
 {
-#define AR5416_VER_MASK (pBase->version & AR5416_EEP_VER_MINOR_MASK)
        struct ar5416_eeprom_def *eep = &ah->eeprom.def;
        struct modal_eep_header *pModal = eep->modalHeader;
        struct base_eep_header *pBase = &eep->baseEepHeader;
@@ -1655,14 +1654,12 @@ static u32 ath9k_hw_def_get_eeprom(struct ath_hw *ah,
        default:
                return 0;
        }
-#undef AR5416_VER_MASK
 }
 
 /* XXX: Clean me up, make me more legible */
 static bool ath9k_hw_def_set_board_values(struct ath_hw *ah,
                                          struct ath9k_channel *chan)
 {
-#define AR5416_VER_MASK (eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK)
        struct modal_eep_header *pModal;
        struct ar5416_eeprom_def *eep = &ah->eeprom.def;
        int i, regChainOffset;
@@ -1910,7 +1907,6 @@ static bool ath9k_hw_def_set_board_values(struct ath_hw *ah,
        }
 
        return true;
-#undef AR5416_VER_MASK
 }
 
 static void ath9k_hw_def_set_addac(struct ath_hw *ah,
index d6f6108f63c7c7e2d6e6b60a17fa11d4aa731ee8..0a4b22a554d2f2cb3ccf0cf62b29295df9c6ee15 100644 (file)
@@ -95,6 +95,7 @@
 #define FREQ2FBIN(x, y)                ((y) ? ((x) - 2300) : (((x) - 4800) / 5))
 #define ath9k_hw_use_flash(_ah)        (!(_ah->ah_flags & AH_USE_EEPROM))
 
+#define AR5416_VER_MASK (eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK)
 #define OLC_FOR_AR9280_20_LATER (AR_SREV_9280_20_OR_LATER(ah) && \
                                 ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))