ath9k_hw: remove antenna configuration eeprom ops and variables
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / net / wireless / ath / ath9k / eeprom_def.c
index ad3e234..088f141 100644 (file)
@@ -374,8 +374,7 @@ static void ath9k_hw_def_set_board_values(struct ath_hw *ah,
        pModal = &(eep->modalHeader[IS_CHAN_2GHZ(chan)]);
        txRxAttenLocal = IS_CHAN_2GHZ(chan) ? 23 : 44;
 
-       REG_WRITE(ah, AR_PHY_SWITCH_COM,
-                 ah->eep_ops->get_eeprom_antenna_cfg(ah, chan));
+       REG_WRITE(ah, AR_PHY_SWITCH_COM, pModal->antCtrlCommon & 0xffff);
 
        for (i = 0; i < AR5416_MAX_CHAINS; i++) {
                if (AR_SREV_9280(ah)) {
@@ -1264,34 +1263,6 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah,
                  | ATH9K_POW_SM(pModal->pwrDecreaseFor2Chain, 0));
 }
 
-static u8 ath9k_hw_def_get_num_ant_config(struct ath_hw *ah,
-                                         enum ath9k_hal_freq_band freq_band)
-{
-       struct ar5416_eeprom_def *eep = &ah->eeprom.def;
-       struct modal_eep_header *pModal =
-               &(eep->modalHeader[freq_band]);
-       struct base_eep_header *pBase = &eep->baseEepHeader;
-       u8 num_ant_config;
-
-       num_ant_config = 1;
-
-       if (pBase->version >= 0x0E0D &&
-           (pModal->lna_ctl & LNA_CTL_USE_ANT1))
-               num_ant_config += 1;
-
-       return num_ant_config;
-}
-
-static u32 ath9k_hw_def_get_eeprom_antenna_cfg(struct ath_hw *ah,
-                                              struct ath9k_channel *chan)
-{
-       struct ar5416_eeprom_def *eep = &ah->eeprom.def;
-       struct modal_eep_header *pModal =
-               &(eep->modalHeader[IS_CHAN_2GHZ(chan)]);
-
-       return pModal->antCtrlCommon;
-}
-
 static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)
 {
 #define EEP_DEF_SPURCHAN \
@@ -1328,8 +1299,6 @@ const struct eeprom_ops eep_def_ops = {
        .fill_eeprom            = ath9k_hw_def_fill_eeprom,
        .get_eeprom_ver         = ath9k_hw_def_get_eeprom_ver,
        .get_eeprom_rev         = ath9k_hw_def_get_eeprom_rev,
-       .get_num_ant_config     = ath9k_hw_def_get_num_ant_config,
-       .get_eeprom_antenna_cfg = ath9k_hw_def_get_eeprom_antenna_cfg,
        .set_board_values       = ath9k_hw_def_set_board_values,
        .set_addac              = ath9k_hw_def_set_addac,
        .set_txpower            = ath9k_hw_def_set_txpower,