From 3c71dd6c5609285b122a50ebc2d59ebafdac595f Mon Sep 17 00:00:00 2001 From: Jakub Sitnicki Date: Fri, 10 Jul 2015 18:52:19 +0200 Subject: [PATCH] staging: rtl8188eu: remove RFtype from struct HAL_VERSION RFtype in struct HAL_VERSION duplicates rf_type in struct hal_data_8188e, and does not change. Remove it and the macros that test it. Signed-off-by: Jakub Sitnicki Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/hal/hal_com.c | 12 +---------- .../staging/rtl8188eu/hal/rtl8188e_hal_init.c | 15 ++----------- drivers/staging/rtl8188eu/include/HalVerDef.h | 21 ------------------- 3 files changed, 3 insertions(+), 45 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal_com.c b/drivers/staging/rtl8188eu/hal/hal_com.c index 62ffa7c73c89..a296648a4dd1 100644 --- a/drivers/staging/rtl8188eu/hal/hal_com.c +++ b/drivers/staging/rtl8188eu/hal/hal_com.c @@ -49,17 +49,7 @@ void dump_chip_info(struct HAL_VERSION chip_vers) else 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); pr_info("%s", buf); diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index af757ffd535f..ea9703095196 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -138,8 +138,6 @@ static struct HAL_VERSION ReadChipVersion8188E(struct adapter *padapter) value32 = usb_read32(padapter, REG_SYS_CFG); ChipVersion.ChipType = ((value32 & RTL_ID) ? TEST_CHIP : NORMAL_CHIP); - - ChipVersion.RFType = RF_TYPE_1T1R; ChipVersion.VendorType = ((value32 & VENDOR_ID) ? CHIP_VENDOR_UMC : CHIP_VENDOR_TSMC); ChipVersion.CUTVersion = (value32 & CHIP_VER_RTL_MASK)>>CHIP_VER_RTL_SHIFT; /* IC version (CUT) */ @@ -148,17 +146,8 @@ static struct HAL_VERSION ReadChipVersion8188E(struct adapter *padapter) dump_chip_info(ChipVersion); 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/rtl8188eu/include/HalVerDef.h b/drivers/staging/rtl8188eu/include/HalVerDef.h index c542f7e04f5b..2c24814d9793 100644 --- a/drivers/staging/rtl8188eu/include/HalVerDef.h +++ b/drivers/staging/rtl8188eu/include/HalVerDef.h @@ -41,28 +41,15 @@ enum HAL_VENDOR { CHIP_VENDOR_UMC = 1, }; -enum HAL_RF_TYPE { - RF_TYPE_1T1R = 0, - RF_TYPE_1T2R = 1, - RF_TYPE_2T2R = 2, - RF_TYPE_2T3R = 3, - RF_TYPE_2T4R = 4, - RF_TYPE_3T3R = 5, - RF_TYPE_3T4R = 6, - RF_TYPE_4T4R = 7, -}; - struct HAL_VERSION { enum HAL_CHIP_TYPE ChipType; enum HAL_CUT_VERSION CUTVersion; enum HAL_VENDOR VendorType; - enum HAL_RF_TYPE RFType; u8 ROMVer; }; /* 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) @@ -95,12 +82,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 -- 2.30.2