From: Michael Straube Date: Fri, 17 Sep 2021 08:06:12 +0000 (+0200) Subject: staging: r8188eu: remove IS_1T1R, IS_1T2R, IS_2T2R macros X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=17a430a0f47ed14b8b3621fc74ab00df93498f57;p=linux.git staging: r8188eu: remove IS_1T1R, IS_1T2R, IS_2T2R macros In this driver RFType is RF_TYPE_1T1R, so only the macro IS_1T1R returns true. Remove the macros and adjust related code accordingly. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20210917080615.25819-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/hal/hal_com.c b/drivers/staging/r8188eu/hal/hal_com.c index eee57cbd6dd2b..6031c25177f97 100644 --- a/drivers/staging/r8188eu/hal/hal_com.c +++ b/drivers/staging/r8188eu/hal/hal_com.c @@ -34,15 +34,7 @@ void dump_chip_info(struct HAL_VERSION chip_vers) cnt += sprintf((buf + cnt), "UNKNOWN_CUT(%d)_", chip_vers.CUTVersion); - if (IS_1T1R(chip_vers)) - cnt += sprintf((buf + cnt), "1T1R_"); - else if (IS_1T2R(chip_vers)) - cnt += sprintf((buf + cnt), "1T2R_"); - else if (IS_2T2R(chip_vers)) - cnt += sprintf((buf + cnt), "2T2R_"); - else - cnt += sprintf((buf + cnt), "UNKNOWN_RFTYPE(%d)_", - chip_vers.RFType); + cnt += sprintf((buf + cnt), "1T1R_"); cnt += sprintf((buf + cnt), "RomVer(%d)\n", chip_vers.ROMVer); diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c index 5c6c62e3f6ede..6776e1d1c6d42 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c @@ -1690,16 +1690,8 @@ void rtl8188e_read_chip_version(struct adapter *padapter) pHalData->VersionID = ChipVersion; - if (IS_1T2R(ChipVersion)) { - pHalData->rf_type = RF_1T2R; - pHalData->NumTotalRFPath = 2; - } else if (IS_2T2R(ChipVersion)) { - pHalData->rf_type = RF_2T2R; - pHalData->NumTotalRFPath = 2; - } else { - pHalData->rf_type = RF_1T1R; - pHalData->NumTotalRFPath = 1; - } + pHalData->rf_type = RF_1T1R; + pHalData->NumTotalRFPath = 1; MSG_88E("RF_Type is %x!!\n", pHalData->rf_type); } diff --git a/drivers/staging/r8188eu/include/HalVerDef.h b/drivers/staging/r8188eu/include/HalVerDef.h index 3a687f7c5b82f..796a44a1e6972 100644 --- a/drivers/staging/r8188eu/include/HalVerDef.h +++ b/drivers/staging/r8188eu/include/HalVerDef.h @@ -45,7 +45,6 @@ struct HAL_VERSION { /* Get element */ #define GET_CVID_CHIP_TYPE(version) (((version).ChipType)) -#define GET_CVID_RF_TYPE(version) (((version).RFType)) #define GET_CVID_MANUFACTUER(version) (((version).VendorType)) #define GET_CVID_CUT_VERSION(version) (((version).CUTVersion)) #define GET_CVID_ROM_VERSION(version) (((version).ROMVer) & ROM_VERSION_MASK) @@ -77,12 +76,4 @@ struct HAL_VERSION { #define IS_CHIP_VENDOR_UMC(version) \ ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_UMC) ? true : false) -/* HAL_RF_TYPE_E */ -#define IS_1T1R(version) \ - ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T1R) ? true : false) -#define IS_1T2R(version) \ - ((GET_CVID_RF_TYPE(version) == RF_TYPE_1T2R) ? true : false) -#define IS_2T2R(version) \ - ((GET_CVID_RF_TYPE(version) == RF_TYPE_2T2R) ? true : false) - #endif