]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/ath/ath9k/eeprom_def.c
ath9k: replace eeprom_param EEP_MINOR_REV with get_eeprom_rev
[karo-tx-linux.git] / drivers / net / wireless / ath / ath9k / eeprom_def.c
index 959682f7909c0b52324ec9cde6063883a11b02af..e9af4a50234e169235f3898d955e89a4b891f936 100644 (file)
@@ -232,7 +232,7 @@ static u32 ath9k_hw_def_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);
@@ -380,8 +380,6 @@ static u32 ath9k_hw_def_get_eeprom(struct ath_hw *ah,
                return pModal[1].ob;
        case EEP_DB_2:
                return pModal[1].db;
-       case EEP_MINOR_REV:
-               return AR5416_VER_MASK;
        case EEP_TX_MASK:
                return pBase->txMask;
        case EEP_RX_MASK:
@@ -1317,6 +1315,11 @@ static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)
        return ah->eeprom.def.modalHeader[is2GHz].spurChans[i].spurChan;
 }
 
+static u8 ath9k_hw_def_get_eepmisc(struct ath_hw *ah)
+{
+       return ah->eeprom.def.baseEepHeader.eepMisc;
+}
+
 const struct eeprom_ops eep_def_ops = {
        .check_eeprom           = ath9k_hw_def_check_eeprom,
        .get_eeprom             = ath9k_hw_def_get_eeprom,
@@ -1327,5 +1330,6 @@ const struct eeprom_ops eep_def_ops = {
        .set_board_values       = ath9k_hw_def_set_board_values,
        .set_addac              = ath9k_hw_def_set_addac,
        .set_txpower            = ath9k_hw_def_set_txpower,
-       .get_spur_channel       = ath9k_hw_def_get_spur_channel
+       .get_spur_channel       = ath9k_hw_def_get_spur_channel,
+       .get_eepmisc            = ath9k_hw_def_get_eepmisc
 };