]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/ath/ath9k/eeprom_9287.c
ath9k: replace eeprom_param EEP_MINOR_REV with get_eeprom_rev
[karo-tx-linux.git] / drivers / net / wireless / ath / ath9k / eeprom_9287.c
index 1a019a39eda1048fdf07e969338de768616a97b9..7f85bd1435b294e316957d1f7928c5777a99fe81 100644 (file)
@@ -150,7 +150,7 @@ static u32 ath9k_hw_ar9287_dump_eeprom(struct ath_hw *ah, bool dump_base_hdr,
                                        AR5416_OPFLAGS_N_5G_HT20));
        PR_EEP("Disable 5Ghz HT40", !!(pBase->opCapFlags &
                                        AR5416_OPFLAGS_N_5G_HT40));
-       PR_EEP("Big Endian", !!(pBase->eepMisc & 0x01));
+       PR_EEP("Big Endian", !!(pBase->eepMisc & AR5416_EEPMISC_BIG_ENDIAN));
        PR_EEP("Cal Bin Major Ver", (pBase->binBuildNumber >> 24) & 0xFF);
        PR_EEP("Cal Bin Minor Ver", (pBase->binBuildNumber >> 16) & 0xFF);
        PR_EEP("Cal Bin Build", (pBase->binBuildNumber >> 8) & 0xFF);
@@ -250,9 +250,7 @@ static u32 ath9k_hw_ar9287_get_eeprom(struct ath_hw *ah,
        struct ar9287_eeprom *eep = &ah->eeprom.map9287;
        struct modal_eep_ar9287_header *pModal = &eep->modalHeader;
        struct base_eep_ar9287_header *pBase = &eep->baseEepHeader;
-       u16 ver_minor;
-
-       ver_minor = pBase->version & AR9287_EEP_VER_MINOR_MASK;
+       u16 ver_minor = ath9k_hw_ar9287_get_eeprom_rev(ah);
 
        switch (param) {
        case EEP_NFTHRESH_2:
@@ -271,8 +269,6 @@ static u32 ath9k_hw_ar9287_get_eeprom(struct ath_hw *ah,
                return pBase->opCapFlags;
        case EEP_RF_SILENT:
                return pBase->rfSilent;
-       case EEP_MINOR_REV:
-               return ver_minor;
        case EEP_TX_MASK:
                return pBase->txMask;
        case EEP_RX_MASK:
@@ -986,6 +982,11 @@ static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah,
        return ah->eeprom.map9287.modalHeader.spurChans[i].spurChan;
 }
 
+static u8 ath9k_hw_ar9287_get_eepmisc(struct ath_hw *ah)
+{
+       return ah->eeprom.map9287.baseEepHeader.eepMisc;
+}
+
 const struct eeprom_ops eep_ar9287_ops = {
        .check_eeprom           = ath9k_hw_ar9287_check_eeprom,
        .get_eeprom             = ath9k_hw_ar9287_get_eeprom,
@@ -995,5 +996,6 @@ const struct eeprom_ops eep_ar9287_ops = {
        .get_eeprom_rev         = ath9k_hw_ar9287_get_eeprom_rev,
        .set_board_values       = ath9k_hw_ar9287_set_board_values,
        .set_txpower            = ath9k_hw_ar9287_set_txpower,
-       .get_spur_channel       = ath9k_hw_ar9287_get_spur_channel
+       .get_spur_channel       = ath9k_hw_ar9287_get_spur_channel,
+       .get_eepmisc            = ath9k_hw_ar9287_get_eepmisc
 };