staging: r8188eu: interface type is always usb
authorMartin Kaiser <martin@kaiser.cx>
Sat, 16 Oct 2021 11:30:02 +0000 (13:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Oct 2021 14:40:15 +0000 (16:40 +0200)
SupportInterface in struct odm_dm_struct is always ODM_ITRF_USB.
Remove the variable and the code to configure the interface.

Acked-by: Michael Straube <straube.linux@gmail.com>
Acked-by: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211016113008.27549-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c
drivers/staging/r8188eu/hal/HalHWImg8188E_MAC.c
drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c
drivers/staging/r8188eu/hal/odm.c
drivers/staging/r8188eu/hal/rtl8188e_dm.c
drivers/staging/r8188eu/include/odm.h

index 17b55c31f6ebcfcad9d4480c0c75608f2d7b116a..a623e0aaa0d0cc903193baddb42227d9d99379a6 100644 (file)
@@ -176,7 +176,6 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *dm_odm)
 {
        u32     hex         = 0;
        u32     i           = 0;
-       u8     interfaceValue   = dm_odm->SupportInterface;
        u32     arraylen    = sizeof(array_agc_tab_1t_8188e) / sizeof(u32);
        u32    *array       = array_agc_tab_1t_8188e;
        bool            biol = false;
@@ -185,7 +184,7 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *dm_odm)
        u8 bndy_cnt = 1;
        enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
 
-       hex += interfaceValue << 8;
+       hex += ODM_ITRF_USB << 8;
        hex += ODM_CE << 16;
        hex += 0xFF000000;
        biol = rtw_IOL_applied(adapter);
@@ -453,7 +452,6 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
 {
        u32     hex         = 0;
        u32     i           = 0;
-       u8     interfaceValue   = dm_odm->SupportInterface;
        u32     arraylen    = sizeof(array_phy_reg_1t_8188e) / sizeof(u32);
        u32    *array       = array_phy_reg_1t_8188e;
        bool    biol = false;
@@ -461,7 +459,7 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
        struct xmit_frame *pxmit_frame = NULL;
        u8 bndy_cnt = 1;
        enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
-       hex += interfaceValue << 8;
+       hex += ODM_ITRF_USB << 8;
        hex += ODM_CE << 16;
        hex += 0xFF000000;
        biol = rtw_IOL_applied(adapter);
@@ -659,11 +657,10 @@ void ODM_ReadAndConfig_PHY_REG_PG_8188E(struct odm_dm_struct *dm_odm)
 {
        u32  hex;
        u32  i           = 0;
-       u8  interfaceValue   = dm_odm->SupportInterface;
        u32  arraylen    = sizeof(array_phy_reg_pg_8188e) / sizeof(u32);
        u32 *array       = array_phy_reg_pg_8188e;
 
-       hex = interfaceValue << 8;
+       hex = ODM_ITRF_USB << 8;
        hex += (ODM_CE << 16) + 0xFF000000;
 
        for (i = 0; i < arraylen; i += 3) {
index bb57e93eb9591d481276ef826017a8daec90765a..b4c55863d3fb6d911c9bc09edf810ec1de14e2f8 100644 (file)
@@ -133,7 +133,6 @@ enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E(struct odm_dm_struct *dm_odm)
 
        u32     hex         = 0;
        u32     i;
-       u8     interface_val   = dm_odm->SupportInterface;
        u32     array_len    = sizeof(array_MAC_REG_8188E) / sizeof(u32);
        u32    *array       = array_MAC_REG_8188E;
        bool    biol = false;
@@ -142,7 +141,7 @@ enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E(struct odm_dm_struct *dm_odm)
        struct xmit_frame       *pxmit_frame = NULL;
        u8 bndy_cnt = 1;
        enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
-       hex += interface_val << 8;
+       hex += ODM_ITRF_USB << 8;
        hex += ODM_CE << 16;
        hex += 0xFF000000;
 
index 7a8faa7885a1e65d35b7d15511eb79831eef3806..3e2a09fc261988aab665d1ca59e267d412f1ffb7 100644 (file)
@@ -144,7 +144,6 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm)
 
        u32     hex         = 0;
        u32     i           = 0;
-       u8     interfaceValue   = pDM_Odm->SupportInterface;
        u32     ArrayLen    = sizeof(Array_RadioA_1T_8188E) / sizeof(u32);
        u32    *Array       = Array_RadioA_1T_8188E;
        bool            biol = false;
@@ -153,7 +152,7 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm)
        u8 bndy_cnt = 1;
        enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
 
-       hex += interfaceValue << 8;
+       hex += ODM_ITRF_USB << 8;
        hex += ODM_CE << 16;
        hex += 0xFF000000;
        biol = rtw_IOL_applied(Adapter);
index fc425d359b15e32f156667784ee8e114f1254e12..ef29540983b154d086d87e9000568dd0af93a083 100644 (file)
@@ -199,9 +199,6 @@ void ODM_CmnInfoInit(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def Cmn
        case    ODM_CMNINFO_ABILITY:
                pDM_Odm->SupportAbility = (u32)Value;
                break;
-       case    ODM_CMNINFO_INTERFACE:
-               pDM_Odm->SupportInterface = (u8)Value;
-               break;
        case    ODM_CMNINFO_MP_TEST_CHIP:
                pDM_Odm->bIsMPChip = (u8)Value;
                break;
index f1a1015eedfb2dc3db8c0582bd4b127fadf08eac..d3292956d818d6da958ecbbe1dae9fcbc21484d7 100644 (file)
@@ -33,8 +33,6 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
 
        dm_odm->Adapter = Adapter;
 
-       ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_INTERFACE, ODM_ITRF_USB);
-
        ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_MP_TEST_CHIP, IS_NORMAL_CHIP(hal_data->VersionID));
 
        if (hal_data->rf_type == RF_1T1R)
index f1ea9fa89a262956c87092a2bb82751f52065943..3c08d33f0dd03fb847311110e90070e3cca0428d 100644 (file)
@@ -246,7 +246,6 @@ enum odm_common_info_def {
 
        /* HOOK BEFORE REG INIT----------- */
        ODM_CMNINFO_ABILITY,            /* ODM_ABILITY_E */
-       ODM_CMNINFO_INTERFACE,          /* ODM_INTERFACE_E */
        ODM_CMNINFO_MP_TEST_CHIP,
        ODM_CMNINFO_RF_TYPE,            /* RF_PATH_E or ODM_RF_TYPE_E? */
        /* HOOK BEFORE REG INIT-----------  */
@@ -319,13 +318,7 @@ enum odm_ability_def {
        ODM_RF_CALIBRATION              = BIT(26),
 };
 
-/*     ODM_CMNINFO_INTERFACE */
-enum odm_interface_def {
-       ODM_ITRF_PCIE   =       0x1,
-       ODM_ITRF_USB    =       0x2,
-       ODM_ITRF_SDIO   =       0x4,
-       ODM_ITRF_ALL    =       0x7,
-};
+# define ODM_ITRF_USB 0x2
 
 /*  ODM_CMNINFO_RF_TYPE */
 /*  For example 1T2R (A+AB = BIT(0)|BIT(4)|BIT(5)) */
@@ -581,8 +574,6 @@ struct odm_dm_struct {
 /* HOOK BEFORE REG INIT----------- */
        /*  ODM Support Ability DIG/RATR/TX_PWR_TRACK/ �K�K = 1/2/3/�K */
        u32     SupportAbility;
-       /*  ODM PCIE/USB/SDIO/GSPI = 0/1/2/3 */
-       u8      SupportInterface;
        /*  RF Type 4T4R/3T3R/2T2R/1T2R/1T1R/... */
        u8      RFType;