staging: r8188eu: odm BoardType is never set
authorMartin Kaiser <martin@kaiser.cx>
Mon, 11 Oct 2021 20:11:58 +0000 (22:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Oct 2021 12:27:14 +0000 (14:27 +0200)
odm BoardType is never set, so it's always 0 (ODM_BOARD_NORMAL).
Remove dead code and the BoardType itself.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211011201159.10252-8-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/odm_HWConfig.c
drivers/staging/r8188eu/include/odm.h

index 86e92552dfb007fba80d59af174a55cc709cdca6..78c93e87edb303de47046c8280c3fbaf233d5d9a 100644 (file)
@@ -178,7 +178,6 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *dm_odm)
        u32     i           = 0;
        u8     platform    = dm_odm->SupportPlatform;
        u8     interfaceValue   = dm_odm->SupportInterface;
-       u8     board       = dm_odm->BoardType;
        u32     arraylen    = sizeof(array_agc_tab_1t_8188e) / sizeof(u32);
        u32    *array       = array_agc_tab_1t_8188e;
        bool            biol = false;
@@ -187,7 +186,6 @@ 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 += board;
        hex += interfaceValue << 8;
        hex += platform << 16;
        hex += 0xFF000000;
@@ -458,7 +456,6 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
        u32     i           = 0;
        u8     platform    = dm_odm->SupportPlatform;
        u8     interfaceValue   = dm_odm->SupportInterface;
-       u8     board       = dm_odm->BoardType;
        u32     arraylen    = sizeof(array_phy_reg_1t_8188e) / sizeof(u32);
        u32    *array       = array_phy_reg_1t_8188e;
        bool    biol = false;
@@ -466,7 +463,6 @@ 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 += board;
        hex += interfaceValue << 8;
        hex += platform << 16;
        hex += 0xFF000000;
@@ -667,11 +663,10 @@ void ODM_ReadAndConfig_PHY_REG_PG_8188E(struct odm_dm_struct *dm_odm)
        u32  i           = 0;
        u8  platform    = dm_odm->SupportPlatform;
        u8  interfaceValue   = dm_odm->SupportInterface;
-       u8  board       = dm_odm->BoardType;
        u32  arraylen    = sizeof(array_phy_reg_pg_8188e) / sizeof(u32);
        u32 *array       = array_phy_reg_pg_8188e;
 
-       hex = board + (interfaceValue << 8);
+       hex = interfaceValue << 8;
        hex += (platform << 16) + 0xFF000000;
 
        for (i = 0; i < arraylen; i += 3) {
index 0aab0eb8768268474038e73df537e93cbe5efb35..2fd86c660b8292ea20b2320f6b12a60a63e21ee1 100644 (file)
@@ -135,7 +135,6 @@ enum HAL_STATUS ODM_ReadAndConfig_MAC_REG_8188E(struct odm_dm_struct *dm_odm)
        u32     i;
        u8     platform    = dm_odm->SupportPlatform;
        u8     interface_val   = dm_odm->SupportInterface;
-       u8     board       = dm_odm->BoardType;
        u32     array_len    = sizeof(array_MAC_REG_8188E) / sizeof(u32);
        u32    *array       = array_MAC_REG_8188E;
        bool    biol = false;
@@ -144,7 +143,6 @@ 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 += board;
        hex += interface_val << 8;
        hex += platform << 16;
        hex += 0xFF000000;
index b4269ad56ede525eda0ec9d49dff21e600560b58..d41f65a2a82998d84b7f8860d84c15398510bc82 100644 (file)
@@ -146,7 +146,6 @@ enum HAL_STATUS ODM_ReadAndConfig_RadioA_1T_8188E(struct odm_dm_struct *pDM_Odm)
        u32     i           = 0;
        u8     platform    = pDM_Odm->SupportPlatform;
        u8     interfaceValue   = pDM_Odm->SupportInterface;
-       u8     board       = pDM_Odm->BoardType;
        u32     ArrayLen    = sizeof(Array_RadioA_1T_8188E) / sizeof(u32);
        u32    *Array       = Array_RadioA_1T_8188E;
        bool            biol = false;
@@ -155,7 +154,6 @@ 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 += board;
        hex += interfaceValue << 8;
        hex += platform << 16;
        hex += 0xFF000000;
index 6f0bd678edf6a5cf78d972ac6901083317cf05ae..712ec380a90dfa89e76489453d4be04567f62d65 100644 (file)
@@ -229,9 +229,6 @@ void ODM_CmnInfoInit(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def Cmn
        case    ODM_CMNINFO_RF_ANTENNA_TYPE:
                pDM_Odm->AntDivType = (u8)Value;
                break;
-       case    ODM_CMNINFO_BOARD_TYPE:
-               pDM_Odm->BoardType = (u8)Value;
-               break;
        /* To remove the compiler warning, must add an empty default statement to handle the other values. */
        default:
                /* do nothing */
index c36b4beeb2169fe34b892fa6224cf2eb9f1fa4bb..b76aa93573dc2e8e90e9e4760c5fcee61215dcb2 100644 (file)
@@ -179,17 +179,6 @@ static void odm_RxPhyStatus92CSeries_Parsing(struct odm_dm_struct *dm_odm,
                        RSSI = odm_QueryRxPwrPercentage(rx_pwr[i]);
                        total_rssi += RSSI;
 
-                       /* Modification for ext-LNA board */
-                       if (dm_odm->BoardType == ODM_BOARD_HIGHPWR) {
-                               if ((pPhyStaRpt->path_agc[i].trsw) == 1)
-                                       RSSI = (RSSI > 94) ? 100 : (RSSI + 6);
-                               else
-                                       RSSI = (RSSI <= 16) ? (RSSI >> 3) : (RSSI - 16);
-
-                               if ((RSSI <= 34) && (RSSI >= 4))
-                                       RSSI -= 4;
-                       }
-
                        pPhyInfo->RxMIMOSignalStrength[i] = (u8)RSSI;
 
                        /* Get Rx snr value in DB */
index 7097d1b495fbf96d45f42033d0ec669c7294cb0c..ef859bab7489f57329a7f8aa85ea8cfa1862ad10 100644 (file)
@@ -266,7 +266,6 @@ enum odm_common_info_def {
        ODM_CMNINFO_INTERFACE,          /* ODM_INTERFACE_E */
        ODM_CMNINFO_MP_TEST_CHIP,
        ODM_CMNINFO_RF_TYPE,            /* RF_PATH_E or ODM_RF_TYPE_E? */
-       ODM_CMNINFO_BOARD_TYPE,         /* ODM_BOARD_TYPE_E */
        /* HOOK BEFORE REG INIT-----------  */
 
        /*  Dynamic value: */
@@ -437,15 +436,6 @@ enum odm_bw {
        ODM_BW40M               = 1,
 };
 
-/*  ODM_CMNINFO_BOARD_TYPE */
-enum odm_board_type {
-       ODM_BOARD_NORMAL        = 0,
-       ODM_BOARD_HIGHPWR       = 1,
-       ODM_BOARD_MINICARD      = 2,
-       ODM_BOARD_SLIM          = 3,
-       ODM_BOARD_COMBO         = 4,
-};
-
 /*  ODM_CMNINFO_ONE_PATH_CCA */
 enum odm_cca_path {
        ODM_CCA_2R              = 0,
@@ -628,8 +618,6 @@ struct odm_dm_struct {
        u8      SupportInterface;
        /*  RF Type 4T4R/3T3R/2T2R/1T2R/1T1R/... */
        u8      RFType;
-       /*  Board Type Normal/HighPower/MiniCard/SLIM/Combo/. = 0/1/2/3/4/. */
-       u8      BoardType;
 
        u32     BK_SupportAbility;
        u8      AntDivType;