staging: r8188eu: remove rf_type member of hal_data_8188e structure
authorIvan Safonov <insafonov@gmail.com>
Thu, 22 Sep 2016 14:58:43 +0000 (21:58 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2016 12:12:34 +0000 (14:12 +0200)
rf_type is always equal to RF_1T1R.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/hal/bb_cfg.c
drivers/staging/rtl8188eu/hal/phy.c
drivers/staging/rtl8188eu/hal/rf_cfg.c
drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
drivers/staging/rtl8188eu/hal/usb_halinit.c
drivers/staging/rtl8188eu/include/rtl8188e_hal.h

index c3499230c9633f786f40db7cff955cbd477fc28c..134fa6c595a8f3d7628d92ccf67b895069d7b32e 100644 (file)
@@ -518,8 +518,7 @@ static void store_pwrindex_offset(struct adapter *adapter,
                power_level_offset[4] = data;
        if (regaddr == rTxAGC_A_Mcs15_Mcs12) {
                power_level_offset[5] = data;
-               if (hal_data->rf_type == RF_1T1R)
-                       hal_data->pwrGroupCnt++;
+               hal_data->pwrGroupCnt++;
        }
        if (regaddr == rTxAGC_B_Rate18_06)
                power_level_offset[8] = data;
@@ -537,8 +536,6 @@ static void store_pwrindex_offset(struct adapter *adapter,
                power_level_offset[12] = data;
        if (regaddr == rTxAGC_B_Mcs15_Mcs12) {
                power_level_offset[13] = data;
-               if (hal_data->rf_type != RF_1T1R)
-                       hal_data->pwrGroupCnt++;
        }
 }
 
index 4e3c2e6f04f9b6a0bbf1e1e470acdec3df4f4f8a..aaf8c264c72bff21b4f018ff4c4b09578485ee89 100644 (file)
@@ -149,10 +149,7 @@ static void get_tx_power_index(struct adapter *adapt, u8 channel, u8 *cck_pwr,
        u8 index = (channel - 1);
        u8 TxCount = 0, path_nums;
 
-       if ((RF_1T2R == hal_data->rf_type) || (RF_1T1R == hal_data->rf_type))
-               path_nums = 1;
-       else
-               path_nums = 2;
+       path_nums = 1;
 
        for (TxCount = 0; TxCount < path_nums; TxCount++) {
                if (TxCount == RF_PATH_A) {
index dc26ad308fff314f3b11481c3f3dd12a8f52e971..dde64417e66a10d890ada7ec570918e1024993d8 100644 (file)
@@ -301,10 +301,7 @@ static bool rtl88e_phy_rf6052_config(struct adapter *adapt)
 {
        struct hal_data_8188e *hal_data = adapt->HalData;
 
-       if (hal_data->rf_type == RF_1T1R)
-               hal_data->NumTotalRFPath = 1;
-       else
-               hal_data->NumTotalRFPath = 2;
+       hal_data->NumTotalRFPath = 1;
 
        return rf6052_conf_para(adapt);
 }
index 964b169706288704d17166138ed0cfc51185ccf8..62c75cc63e8aa42b1666f760237295abd51ab08d 100644 (file)
@@ -57,12 +57,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
        dm_odm->PatchID = hal_data->CustomerID;
        dm_odm->bWIFITest = Adapter->registrypriv.wifi_spec;
 
-       if (hal_data->rf_type == RF_1T1R)
-               dm_odm->RFType = ODM_1T1R;
-       else if (hal_data->rf_type == RF_2T2R)
-               dm_odm->RFType = ODM_2T2R;
-       else if (hal_data->rf_type == RF_1T2R)
-               dm_odm->RFType = ODM_1T2R;
+       dm_odm->RFType = ODM_1T1R;
 
        dm_odm->AntDivType = hal_data->TRxAntDivType;
 
index a7b037564a50dcee55aa153f01ee82d3aa470c50..385bc2f56f2f07b6c146e070954f779761353c26 100644 (file)
@@ -135,10 +135,7 @@ void rtw_hal_read_chip_version(struct adapter *padapter)
        dump_chip_info(ChipVersion);
 
        pHalData->VersionID = ChipVersion;
-       pHalData->rf_type = RF_1T1R;
        pHalData->NumTotalRFPath = 1;
-
-       MSG_88E("RF_Type is %x!!\n", pHalData->rf_type);
 }
 
 void rtw_hal_set_odm_var(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
index 113bd0bcaf41a292bce896731c245cd9806d5a86..7692ca495ee5734f3e1c9a59ae046d304639a6bf 100644 (file)
@@ -1763,7 +1763,7 @@ void rtw_hal_get_hwreg(struct adapter *Adapter, u8 variable, u8 *val)
                val[0] = (BIT(0) & usb_read8(Adapter, REG_TDECTRL+2)) ? true : false;
                break;
        case HW_VAR_RF_TYPE:
-               val[0] = Adapter->HalData->rf_type;
+               val[0] = RF_1T1R;
                break;
        case HW_VAR_FWLPS_RF_ON:
                {
index 34268d99df676be7aacc881de75035cb92cb7e66..7c81e3f3d12e843515f4061d34f336cfc3199d94 100644 (file)
@@ -202,7 +202,6 @@ struct hal_data_8188e {
 
        /* rf_ctrl */
        u8      rf_chip;
-       u8      rf_type;
        u8      NumTotalRFPath;
 
        u8      BoardType;