From 22afcbab09798068791688b27d84d262841632e2 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Tue, 17 Mar 2015 09:57:29 -0500 Subject: [PATCH] rtl8188eu: Remove typedef statements from include/HalVerDef.h Signed-off-by: Larry Finger --- hal/hal_com.c | 2 +- hal/rtl8188e_hal_init.c | 8 ++--- include/HalVerDef.h | 76 +++++++++++++++++------------------------ include/hal_com.h | 2 +- include/rtl8188e_hal.h | 5 ++- 5 files changed, 38 insertions(+), 55 deletions(-) diff --git a/hal/hal_com.c b/hal/hal_com.c index 858a99a..d2c8967 100644 --- a/hal/hal_com.c +++ b/hal/hal_com.c @@ -28,7 +28,7 @@ #define _HAL_INIT_C_ -void dump_chip_info(HAL_VERSION ChipVersion) +void dump_chip_info(struct hal_version ChipVersion) { int cnt = 0; u8 buf[128]; diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index afc5538..3ebaf58 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -2490,13 +2490,11 @@ rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, return ret; } -static HAL_VERSION -ReadChipVersion8188E( - struct adapter *padapter - ) +static struct hal_version +ReadChipVersion8188E(struct adapter *padapter) { u32 value32; - HAL_VERSION ChipVersion; + struct hal_version ChipVersion; HAL_DATA_TYPE *pHalData; diff --git a/include/HalVerDef.h b/include/HalVerDef.h index aaed9ca..5edeab4 100644 --- a/include/HalVerDef.h +++ b/include/HalVerDef.h @@ -23,33 +23,30 @@ #define true true #define false false -/* HAL_IC_TYPE_E */ -typedef enum tag_HAL_IC_Type_Definition -{ - CHIP_8192S = 0, +/* HAL_IC_TYPE */ +enum HAL_IC_TYPE { + CHIP_8192S = 0, CHIP_8188C = 1, CHIP_8192C = 2, CHIP_8192D = 3, CHIP_8723A = 4, - CHIP_8188E = 5, + CHIP_8188E = 5, CHIP_8881A = 6, CHIP_8812A = 7, CHIP_8821A = 8, CHIP_8723B = 9, - CHIP_8192E = 10, -}HAL_IC_TYPE_E; + CHIP_8192E = 10, +}; -/* HAL_CHIP_TYPE_E */ -typedef enum tag_HAL_CHIP_Type_Definition -{ - TEST_CHIP = 0, +/* HAL_CHIP_TYPE */ +enum HAL_CHIP_TYPE { + TEST_CHIP = 0, NORMAL_CHIP = 1, - FPGA = 2, -}HAL_CHIP_TYPE_E; + FPGA = 2, +}; -/* HAL_CUT_VERSION_E */ -typedef enum tag_HAL_Cut_Version_Definition -{ +/* HAL_CUT_VERSION */ +enum HAL_CUT_VERSION { A_CUT_VERSION = 0, B_CUT_VERSION = 1, C_CUT_VERSION = 2, @@ -61,17 +58,15 @@ typedef enum tag_HAL_Cut_Version_Definition I_CUT_VERSION = 8, J_CUT_VERSION = 9, K_CUT_VERSION = 10, -}HAL_CUT_VERSION_E; +}; /* HAL_Manufacturer */ -typedef enum tag_HAL_Manufacturer_Version_Definition -{ +enum HAL_VENDOR { CHIP_VENDOR_TSMC = 0, CHIP_VENDOR_UMC = 1, -}HAL_VENDOR_E; +}; -typedef enum tag_HAL_RF_Type_Definition -{ +enum HAL_RF_TYPE { RF_TYPE_1T1R = 0, RF_TYPE_1T2R = 1, RF_TYPE_2T2R = 2, @@ -80,20 +75,16 @@ typedef enum tag_HAL_RF_Type_Definition RF_TYPE_3T3R = 5, RF_TYPE_3T4R = 6, RF_TYPE_4T4R = 7, -}HAL_RF_TYPE_E; +}; -typedef struct tag_HAL_VERSION -{ - HAL_IC_TYPE_E ICType; - HAL_CHIP_TYPE_E ChipType; - HAL_CUT_VERSION_E CUTVersion; - HAL_VENDOR_E VendorType; - HAL_RF_TYPE_E RFType; - u8 ROMVer; -}HAL_VERSION,*PHAL_VERSION; - -/* VERSION_8192C VersionID; */ -/* HAL_VERSION VersionID; */ +struct hal_version { + enum HAL_IC_TYPE ICType; + 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_IC_TYPE(version) (((version).ICType)) @@ -103,22 +94,19 @@ typedef struct tag_HAL_VERSION #define GET_CVID_CUT_VERSION(version) (((version).CUTVersion)) #define GET_CVID_ROM_VERSION(version) (((version).ROMVer) & ROM_VERSION_MASK) -/* */ /* Common Macro. -- */ -/* */ -/* HAL_VERSION VersionID */ -/* HAL_IC_TYPE_E */ +/* HAL_IC_TYPE */ #define IS_81XXC(version) (((GET_CVID_IC_TYPE(version) == CHIP_8192C)||(GET_CVID_IC_TYPE(version) == CHIP_8188C))? true : false) #define IS_8723_SERIES(version) ((GET_CVID_IC_TYPE(version) == CHIP_8723A)? true : false) #define IS_92D(version) ((GET_CVID_IC_TYPE(version) == CHIP_8192D)? true : false) #define IS_8188E(version) ((GET_CVID_IC_TYPE(version) == CHIP_8188E)? true : false) -/* HAL_CHIP_TYPE_E */ +/* enum HAL_CHIP_TYPE */ #define IS_TEST_CHIP(version) ((GET_CVID_CHIP_TYPE(version)==TEST_CHIP)? true: false) #define IS_NORMAL_CHIP(version) ((GET_CVID_CHIP_TYPE(version)==NORMAL_CHIP)? true: false) -/* HAL_CUT_VERSION_E */ +/* HAL_CUT_VERSION */ #define IS_A_CUT(version) ((GET_CVID_CUT_VERSION(version) == A_CUT_VERSION) ? true : false) #define IS_B_CUT(version) ((GET_CVID_CUT_VERSION(version) == B_CUT_VERSION) ? true : false) #define IS_C_CUT(version) ((GET_CVID_CUT_VERSION(version) == C_CUT_VERSION) ? true : false) @@ -130,19 +118,17 @@ typedef struct tag_HAL_VERSION #define IS_VENDOR_8188E_I_CUT_SERIES(_Adapter) ((IS_8188E(GET_HAL_DATA(_Adapter)->VersionID)) ? ((GET_CVID_CUT_VERSION(GET_HAL_DATA(_Adapter)->VersionID) >= I_CUT_VERSION) ? true : false) : false) -/* HAL_VENDOR_E */ +/* HAL_VENDOR */ #define IS_CHIP_VENDOR_TSMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_TSMC)? true: false) #define IS_CHIP_VENDOR_UMC(version) ((GET_CVID_MANUFACTUER(version) == CHIP_VENDOR_UMC)? true: false) -/* HAL_RF_TYPE_E */ +/* HAL_RF_TYPE */ #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) -/* */ /* Chip version Macro. -- */ -/* */ #define IS_81XXC_TEST_CHIP(version) ((IS_81XXC(version) && (!IS_NORMAL_CHIP(version)))? true: false) #define IS_92C_SERIAL(version) ((IS_81XXC(version) && IS_2T2R(version)) ? true : false) diff --git a/include/hal_com.h b/include/hal_com.h index 21429e7..98cfd01 100644 --- a/include/hal_com.h +++ b/include/hal_com.h @@ -148,7 +148,7 @@ #define REG_NOA_DESC_COUNT 0x05EC #include "HalVerDef.h" -void dump_chip_info(HAL_VERSION ChipVersion); +void dump_chip_info(struct hal_version ChipVersion); u8 /* return the final channel plan decision */ diff --git a/include/rtl8188e_hal.h b/include/rtl8188e_hal.h index 57a375b..9cbc887 100644 --- a/include/rtl8188e_hal.h +++ b/include/rtl8188e_hal.h @@ -273,9 +273,8 @@ typedef enum _RT_REGULATOR_MODE { } RT_REGULATOR_MODE, *PRT_REGULATOR_MODE; -typedef struct hal_data_8188e -{ - HAL_VERSION VersionID; +typedef struct hal_data_8188e { + struct hal_version VersionID; RT_MULTI_FUNC MultiFunc; /* For multi-function consideration. */ RT_POLARITY_CTL PolarityCtl; /* For Wifi PDn Polarity control. */ RT_REGULATOR_MODE RegulatorMode; /* switching regulator or LDO */