]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/ath/ath9k/eeprom_4k.c
ath9k: replace eeprom_param EEP_MINOR_REV with get_eeprom_rev
[karo-tx-linux.git] / drivers / net / wireless / ath / ath9k / eeprom_4k.c
index 5da0826bf1be031472cb8c9a19743c7d2fe21154..d4668712f866e9446496b13088c6bd2f5d49ac68 100644 (file)
@@ -154,7 +154,7 @@ static u32 ath9k_hw_4k_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);
@@ -254,9 +254,6 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah,
        struct ar5416_eeprom_4k *eep = &ah->eeprom.map4k;
        struct modal_eep_4k_header *pModal = &eep->modalHeader;
        struct base_eep_header_4k *pBase = &eep->baseEepHeader;
-       u16 ver_minor;
-
-       ver_minor = pBase->version & AR5416_EEP_VER_MINOR_MASK;
 
        switch (param) {
        case EEP_NFTHRESH_2:
@@ -279,8 +276,6 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah,
                return pModal->ob_0;
        case EEP_DB_2:
                return pModal->db1_1;
-       case EEP_MINOR_REV:
-               return ver_minor;
        case EEP_TX_MASK:
                return pBase->txMask;
        case EEP_RX_MASK:
@@ -1064,6 +1059,11 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)
        return ah->eeprom.map4k.modalHeader.spurChans[i].spurChan;
 }
 
+static u8 ath9k_hw_4k_get_eepmisc(struct ath_hw *ah)
+{
+       return ah->eeprom.map4k.baseEepHeader.eepMisc;
+}
+
 const struct eeprom_ops eep_4k_ops = {
        .check_eeprom           = ath9k_hw_4k_check_eeprom,
        .get_eeprom             = ath9k_hw_4k_get_eeprom,
@@ -1073,5 +1073,6 @@ const struct eeprom_ops eep_4k_ops = {
        .get_eeprom_rev         = ath9k_hw_4k_get_eeprom_rev,
        .set_board_values       = ath9k_hw_4k_set_board_values,
        .set_txpower            = ath9k_hw_4k_set_txpower,
-       .get_spur_channel       = ath9k_hw_4k_get_spur_channel
+       .get_spur_channel       = ath9k_hw_4k_get_spur_channel,
+       .get_eepmisc            = ath9k_hw_4k_get_eepmisc
 };