diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 6a9f28c..d0f32a4 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -596,7 +596,7 @@ _func_enter_; _func_exit_; } -u8 rtw_interface_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id,u8* val) +u8 rtw_interface_ps_func(_adapter *padapter,enum hal_intf_ps_func efunc_id,u8* val) { u8 bResult = true; rtw_hal_intf_ps_func(padapter,efunc_id,val); diff --git a/hal/hal_intf.c b/hal/hal_intf.c index 609f15b..76d8744 100644 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -143,25 +143,25 @@ void rtw_hal_get_hwreg(_adapter *padapter, u8 variable, u8 *val) padapter->HalFunc.GetHwRegHandler(padapter, variable, val); } -u8 rtw_hal_set_def_var(_adapter *padapter, HAL_DEF_VARIABLE eVariable, void * pValue) +u8 rtw_hal_set_def_var(_adapter *padapter, enum hal_def_variable eVariable, void * pValue) { if (padapter->HalFunc.SetHalDefVarHandler) return padapter->HalFunc.SetHalDefVarHandler(padapter,eVariable,pValue); return _FAIL; } -u8 rtw_hal_get_def_var(_adapter *padapter, HAL_DEF_VARIABLE eVariable, void * pValue) +u8 rtw_hal_get_def_var(_adapter *padapter, enum hal_def_variable eVariable, void * pValue) { if (padapter->HalFunc.GetHalDefVarHandler) return padapter->HalFunc.GetHalDefVarHandler(padapter,eVariable,pValue); return _FAIL; } -void rtw_hal_set_odm_var(_adapter *padapter, HAL_ODM_VARIABLE eVariable, void * pValue1,bool bSet) +void rtw_hal_set_odm_var(_adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet) { if (padapter->HalFunc.SetHalODMVarHandler) padapter->HalFunc.SetHalODMVarHandler(padapter,eVariable,pValue1,bSet); } -void rtw_hal_get_odm_var(_adapter *padapter, HAL_ODM_VARIABLE eVariable, void * pValue1,bool bSet) +void rtw_hal_get_odm_var(_adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet) { if (padapter->HalFunc.GetHalODMVarHandler) padapter->HalFunc.GetHalODMVarHandler(padapter,eVariable,pValue1,bSet); @@ -205,7 +205,7 @@ u32 rtw_hal_inirp_deinit(_adapter *padapter) } -u8 rtw_hal_intf_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id, u8* val) +u8 rtw_hal_intf_ps_func(_adapter *padapter,enum hal_intf_ps_func efunc_id, u8* val) { if (padapter->HalFunc.interface_ps_func) return padapter->HalFunc.interface_ps_func(padapter,efunc_id,val); diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index 1639f8a..196d992 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -2428,7 +2428,7 @@ static void rtl8188e_read_chip_version(PADAPTER padapter) static void rtl8188e_GetHalODMVar( PADAPTER Adapter, - HAL_ODM_VARIABLE eVariable, + enum hal_odm_variable eVariable, void * pValue1, bool bSet) { @@ -2443,7 +2443,7 @@ static void rtl8188e_GetHalODMVar( } static void rtl8188e_SetHalODMVar( PADAPTER Adapter, - HAL_ODM_VARIABLE eVariable, + enum hal_odm_variable eVariable, void * pValue1, bool bSet) { diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index c1a97ea..dc6c8a2 100644 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -2825,7 +2825,7 @@ _func_exit_; static u8 GetHalDefVar8188EUsb( PADAPTER Adapter, - HAL_DEF_VARIABLE eVariable, + enum hal_def_variable eVariable, void * pValue ) { @@ -2954,7 +2954,7 @@ GetHalDefVar8188EUsb( /* */ static u8 SetHalDefVar8188EUsb( PADAPTER Adapter, - HAL_DEF_VARIABLE eVariable, + enum hal_def_variable eVariable, void * pValue ) { @@ -3226,7 +3226,7 @@ static void rtl8188eu_init_default_value(_adapter * padapter) pHalData->odmpriv.RFCalibrateInfo.ThermalValue_HP[i] = 0; } -static u8 rtl8188eu_ps_func(PADAPTER Adapter,HAL_INTF_PS_FUNC efunc_id, u8 *val) +static u8 rtl8188eu_ps_func(PADAPTER Adapter,enum hal_intf_ps_func efunc_id, u8 *val) { u8 bResult = true; return bResult; diff --git a/include/hal_intf.h b/include/hal_intf.h index c834dc2..acd24de 100644 --- a/include/hal_intf.h +++ b/include/hal_intf.h @@ -43,7 +43,7 @@ enum _CHIP_TYPE { }; -typedef enum _HW_VARIABLES{ +enum hw_variables { HW_VAR_MEDIA_STATUS, HW_VAR_MEDIA_STATUS1, HW_VAR_SET_OPMODE, @@ -115,9 +115,9 @@ typedef enum _HW_VARIABLES{ HW_VAR_TX_RPT_MAX_MACID, HW_VAR_H2C_MEDIA_STATUS_RPT, HW_VAR_CHK_HI_QUEUE_EMPTY, -}HW_VARIABLES; +}; -typedef enum _HAL_DEF_VARIABLE{ +enum hal_def_variable { HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, HAL_DEF_IS_SUPPORT_ANT_DIV, HAL_DEF_CURRENT_ANTENNA, @@ -134,18 +134,18 @@ typedef enum _HAL_DEF_VARIABLE{ HAL_DEF_DBG_DUMP_TXPKT, HW_DEF_FA_CNT_DUMP, HW_DEF_ODM_DBG_FLAG, -}HAL_DEF_VARIABLE; +}; -typedef enum _HAL_ODM_VARIABLE{ +enum hal_odm_variable { HAL_ODM_STA_INFO, HAL_ODM_P2P_STATE, HAL_ODM_WIFI_DISPLAY_STATE, -}HAL_ODM_VARIABLE; +}; -typedef enum _HAL_INTF_PS_FUNC{ +enum hal_intf_ps_func { HAL_USB_SELECT_SUSPEND, HAL_MAX_ID, -}HAL_INTF_PS_FUNC; +}; typedef s32 (*c2h_id_filter)(u8 id); @@ -190,11 +190,11 @@ struct hal_ops { void (*SetHwRegHandler)(_adapter *padapter, u8 variable,u8* val); void (*GetHwRegHandler)(_adapter *padapter, u8 variable,u8* val); - u8 (*GetHalDefVarHandler)(_adapter *padapter, HAL_DEF_VARIABLE eVariable, void * pValue); - u8 (*SetHalDefVarHandler)(_adapter *padapter, HAL_DEF_VARIABLE eVariable, void * pValue); + u8 (*GetHalDefVarHandler)(_adapter *padapter, enum hal_def_variable eVariable, void * pValue); + u8 (*SetHalDefVarHandler)(_adapter *padapter, enum hal_def_variable eVariable, void * pValue); - void (*GetHalODMVarHandler)(_adapter *padapter, HAL_ODM_VARIABLE eVariable, void * pValue1,bool bSet); - void (*SetHalODMVarHandler)(_adapter *padapter, HAL_ODM_VARIABLE eVariable, void * pValue1,bool bSet); + void (*GetHalODMVarHandler)(_adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet); + void (*SetHalODMVarHandler)(_adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet); void (*UpdateRAMaskHandler)(_adapter *padapter, u32 mac_id, u8 rssi_level); void (*SetBeaconRelatedRegistersHandler)(_adapter *padapter); @@ -205,7 +205,7 @@ struct hal_ops { u8 (*AntDivBeforeLinkHandler)(_adapter *padapter); void (*AntDivCompareHandler)(_adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src); - u8 (*interface_ps_func)(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id, u8* val); + u8 (*interface_ps_func)(_adapter *padapter,enum hal_intf_ps_func efunc_id, u8* val); s32 (*hal_xmit)(_adapter *padapter, struct xmit_frame *pxmitframe); s32 (*mgnt_xmit)(_adapter *padapter, struct xmit_frame *pmgntframe); @@ -245,13 +245,11 @@ struct hal_ops { #endif }; -typedef enum _RT_EEPROM_TYPE{ +enum rt_eeprom_type { EEPROM_93C46, EEPROM_93C56, EEPROM_BOOT_EFUSE, -}RT_EEPROM_TYPE,*PRT_EEPROM_TYPE; - - +}; #define RF_CHANGE_BY_INIT 0 #define RF_CHANGE_BY_IPS BIT28 @@ -259,7 +257,7 @@ typedef enum _RT_EEPROM_TYPE{ #define RF_CHANGE_BY_HW BIT30 #define RF_CHANGE_BY_SW BIT31 -typedef enum _HARDWARE_TYPE{ +enum hardware_type { HARDWARE_TYPE_RTL8180, HARDWARE_TYPE_RTL8185, HARDWARE_TYPE_RTL8187, @@ -280,7 +278,7 @@ typedef enum _HARDWARE_TYPE{ HARDWARE_TYPE_RTL8188EU, HARDWARE_TYPE_RTL8188ES, HARDWARE_TYPE_MAX, -}HARDWARE_TYPE; +}; // // RTL8192C Series @@ -322,7 +320,7 @@ typedef struct eeprom_priv EEPROM_EFUSE_PRIV, *PEEPROM_EFUSE_PRIV; #define is_boot_from_eeprom(adapter) (adapter->eeprompriv.EepromOrEfuse) #ifdef CONFIG_WOWLAN -typedef enum _wowlan_subcode{ +enum wowlan_subcode { WOWLAN_PATTERN_MATCH = 1, WOWLAN_MAGIC_PACKET = 2, WOWLAN_UNICAST = 3, @@ -334,7 +332,7 @@ typedef enum _wowlan_subcode{ WOWLAN_DEBUG_RELOAD_FW = 9, WOWLAN_DEBUG_1 =10, WOWLAN_DEBUG_2 =11 -}wowlan_subcode; +}; struct wowlan_ioctl_param{ unsigned int subcode; @@ -374,11 +372,11 @@ void rtw_hal_chip_configure(_adapter *padapter); void rtw_hal_read_chip_info(_adapter *padapter); void rtw_hal_read_chip_version(_adapter *padapter); -u8 rtw_hal_set_def_var(_adapter *padapter, HAL_DEF_VARIABLE eVariable, void * pValue); -u8 rtw_hal_get_def_var(_adapter *padapter, HAL_DEF_VARIABLE eVariable, void * pValue); +u8 rtw_hal_set_def_var(_adapter *padapter, enum hal_def_variable eVariable, void * pValue); +u8 rtw_hal_get_def_var(_adapter *padapter, enum hal_def_variable eVariable, void * pValue); -void rtw_hal_set_odm_var(_adapter *padapter, HAL_ODM_VARIABLE eVariable, void * pValue1,bool bSet); -void rtw_hal_get_odm_var(_adapter *padapter, HAL_ODM_VARIABLE eVariable, void * pValue1,bool bSet); +void rtw_hal_set_odm_var(_adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet); +void rtw_hal_get_odm_var(_adapter *padapter, enum hal_odm_variable eVariable, void * pValue1,bool bSet); void rtw_hal_enable_interrupt(_adapter *padapter); void rtw_hal_disable_interrupt(_adapter *padapter); @@ -386,7 +384,7 @@ void rtw_hal_disable_interrupt(_adapter *padapter); u32 rtw_hal_inirp_init(_adapter *padapter); u32 rtw_hal_inirp_deinit(_adapter *padapter); -u8 rtw_hal_intf_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id, u8* val); +u8 rtw_hal_intf_ps_func(_adapter *padapter,enum hal_intf_ps_func efunc_id, u8* val); s32 rtw_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe); s32 rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe); diff --git a/include/rtw_pwrctrl.h b/include/rtw_pwrctrl.h index a17071b..4e32fe2 100644 --- a/include/rtw_pwrctrl.h +++ b/include/rtw_pwrctrl.h @@ -287,7 +287,7 @@ s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms); void LPS_Enter(PADAPTER padapter); void LPS_Leave(PADAPTER padapter); -u8 rtw_interface_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id,u8* val); +u8 rtw_interface_ps_func(_adapter *padapter,enum hal_intf_ps_func efunc_id,u8* val); void rtw_set_ips_deny(_adapter *padapter, u32 ms); int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller); #define rtw_pwr_wakeup(adapter) _rtw_pwr_wakeup(adapter, RTW_PWR_STATE_CHK_INTERVAL, __func__)