]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ath9k_hw: the eep_map is used only for AR9280 PCI card ini fixup
authorSenthil Balasubramanian <senthilkumar@atheros.com>
Thu, 15 Apr 2010 21:38:50 +0000 (17:38 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 Apr 2010 19:43:28 +0000 (15:43 -0400)
We can reorganize the code in such a way that eep_map can be removed,
which makes the code more clearer.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/eeprom.c
drivers/net/wireless/ath/ath9k/eeprom.h
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/hw.h

index dacaae9341480dc253d3c4a42bc00c508e431c05..1a48f43f653ed0f97b58d989d81bf5c9d059f4e1 100644 (file)
@@ -257,13 +257,10 @@ int ath9k_hw_eeprom_init(struct ath_hw *ah)
        int status;
 
        if (AR_SREV_9287(ah)) {
-               ah->eep_map = EEP_MAP_AR9287;
                ah->eep_ops = &eep_AR9287_ops;
        } else if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) {
-               ah->eep_map = EEP_MAP_4KBITS;
                ah->eep_ops = &eep_4k_ops;
        } else {
-               ah->eep_map = EEP_MAP_DEFAULT;
                ah->eep_ops = &eep_def_ops;
        }
 
index 2f2993b50e2ffb2159261ad97a4c4632ded5b31d..e087e2de6067439b58afa02bb224da27ca7b11af 100644 (file)
@@ -656,13 +656,6 @@ struct ath9k_country_entry {
        u8 iso[3];
 };
 
-enum ath9k_eep_map {
-       EEP_MAP_DEFAULT = 0x0,
-       EEP_MAP_4KBITS,
-       EEP_MAP_AR9287,
-       EEP_MAP_MAX
-};
-
 struct eeprom_ops {
        int (*check_eeprom)(struct ath_hw *hw);
        u32 (*get_eeprom)(struct ath_hw *hw, enum eeprom_param param);
index 6ee719e36798becc56af980546094acf7ad3cf01..e914d8f68fd8f967bb685aaafd191b17bada0f4a 100644 (file)
@@ -946,7 +946,7 @@ static void ath9k_hw_init_eeprom_fix(struct ath_hw *ah)
        struct ath_common *common = ath9k_hw_common(ah);
 
        ah->need_an_top2_fixup = (ah->hw_version.devid == AR9280_DEVID_PCI) &&
-                                (ah->eep_map != EEP_MAP_4KBITS) &&
+                                !AR_SREV_9285(ah) && !AR_SREV_9271(ah) &&
                                 ((pBase->version & 0xff) > 0x0a) &&
                                 (pBase->pwdclkind == 0);
 
index 7889ecbfeeeccec9251cbf19c50c14647f9a9765..48fb5ce8294b1a6acb8f26094e8e5c60d2f4d3c5 100644 (file)
@@ -548,7 +548,6 @@ struct ath_hw {
                struct ar9287_eeprom map9287;
        } eeprom;
        const struct eeprom_ops *eep_ops;
-       enum ath9k_eep_map eep_map;
 
        bool sw_mgmt_crypto;
        bool is_pciexpress;