staging: rtl8723bs: get rid of struct hal_ops
cover staging: rtl8723bs: get rid of struct hal_ops
This series removes the remaining function pointers from the hal_ops structure, and finally removes the structure itself. This reduces code complexity and thereby improves readability, as the hal_ops structure is just an unnecessary layer of abstraction.
The patches have been compile-tested only, due to lack of hardware.
Michael Straube (11):
staging: rtl8723bs: remove function pointer SetHalODMVarHandler
staging: rtl8723bs: remove wrapper rtl8723b_SetHalODMVar
staging: rtl8723bs: remove function pointer hal_notch_filter
staging: rtl8723bs: remove function pointer c2h_handler
staging: rtl8723bs: remove macro FillH2CCmd
staging: rtl8723bs: remove function pointer fill_h2c_cmd
staging: rtl8723bs: remove macro hal_xmit_handler
staging: rtl8723bs: remove function pointer xmit_thread_handler
staging: rtl8723bs: remove function pointer hal_reset_security_engine
staging: rtl8723bs: remove function pointer c2h_id_filter
staging: rtl8723bs: remove struct hal_ops
drivers/staging/rtl8723bs/hal/hal_intf.c | 33 ++++--------------- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 26 +-------------- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 8 ----- drivers/staging/rtl8723bs/include/drv_types.h | 1 - drivers/staging/rtl8723bs/include/hal_intf.h | 13 +------- .../staging/rtl8723bs/include/rtl8723b_cmd.h | 1 - .../staging/rtl8723bs/include/rtl8723b_hal.h | 1 - .../staging/rtl8723bs/include/rtl8723b_xmit.h | 1 - drivers/staging/rtl8723bs/include/sdio_hal.h | 2 -- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 -- 10 files changed, 8 insertions(+), 80 deletions(-)
Signature · 1 line
2.50.1
PATCH 1/11 staging: rtl8723bs: remove function pointer SetHalODMVarHandler
Remove function pointer SetHalODMVarHandler and use rtl8723b_SetHalODMVar directly to reduce code complexity.
--- drivers/staging/rtl8723bs/hal/hal_intf.c | 3 +-- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 9 +-------- drivers/staging/rtl8723bs/include/hal_intf.h | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -2
@@ -129,8 +129,7 @@ u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariablevoid rtw_hal_set_odm_var (struct adapter *padapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet) { -if (padapter->HalFunc.SetHalODMVarHandler) - padapter->HalFunc.SetHalODMVarHandler (padapter, eVariable, pValue1, bSet); +rtl8723b_SetHalODMVar (padapter, eVariable, pValue1, bSet); }void rtw_hal_enable_interrupt (struct adapter *padapter)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +1 -8
@@ -1267,12 +1267,7 @@ void rtl8723b_SetBeaconRelatedRegisters(struct adapter *padapter)rtw_write8 (padapter, bcn_ctrl_reg, val8); } -static void rtl8723b_SetHalODMVar ( -struct adapter *Adapter, -enum hal_odm_variable eVariable, -void *pValue1, -bool bSet -) +void rtl8723b_SetHalODMVar (struct adapter *Adapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet) {SetHalODMVar (Adapter, eVariable, pValue1, bSet); }
@@ -1325,8 +1320,6 @@ void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level)void rtl8723b_set_hal_ops (struct hal_ops *pHalFunc) { - pHalFunc->SetHalODMVarHandler = &rtl8723b_SetHalODMVar; - pHalFunc->xmit_thread_handler = &hal_xmit_handler; pHalFunc->hal_notch_filter = &hal_notch_filter_8723b;
drivers/staging/rtl8723bs/include/hal_intf.h +1 -1
@@ -161,7 +161,6 @@ enum hal_intf_ps_func {typedef s32 (*c2h_id_filter )(u8 *c2h_evt);struct hal_ops { -void (*SetHalODMVarHandler)(struct adapter *padapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet);s32 (*xmit_thread_handler)(struct adapter *padapter);void (*hal_notch_filter)(struct adapter *adapter,bool enable);void (*hal_reset_security_engine)(struct adapter *adapter);
@@ -277,6 +276,7 @@ u8 GetHalDefVar8723BSDIO(struct adapter *Adapter, enum hal_def_variable eVariablu8 SetHalDefVar8723BSDIO (struct adapter *Adapter,enum hal_def_variable eVariable,void *pValue);void UpdateHalRAMask8723B (struct adapter *padapter,u32 mac_id,u8 rssi_level);void rtl8723b_SetBeaconRelatedRegisters (struct adapter *padapter); +void rtl8723b_SetHalODMVar (struct adapter *Adapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet);void Hal_EfusePowerSwitch (struct adapter *padapter,u8 bWrite,u8 PwrState);void Hal_ReadEFuse (struct adapter *padapter,u8 efuseType,u16 _offset,u16 _size_byte,u8 *pbuf,bool bPseudoTest);
Signature · 1 line
2.50.1
PATCH 2/11 staging: rtl8723bs: remove wrapper rtl8723b_SetHalODMVar
In reply to Michael StraubeRemove the wrapper function rtl8723b_SetHalODMVar and use SetHalODMVar directly to reduce code complexity.
--- drivers/staging/rtl8723bs/hal/hal_intf.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 5 ----- drivers/staging/rtl8723bs/include/hal_intf.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -1
@@ -129,7 +129,7 @@ u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariablevoid rtw_hal_set_odm_var (struct adapter *padapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet) { -rtl8723b_SetHalODMVar (padapter, eVariable, pValue1, bSet); +SetHalODMVar (padapter, eVariable, pValue1, bSet); }void rtw_hal_enable_interrupt (struct adapter *padapter)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -5
@@ -1267,11 +1267,6 @@ void rtl8723b_SetBeaconRelatedRegisters(struct adapter *padapter)rtw_write8 (padapter, bcn_ctrl_reg, val8); } -void rtl8723b_SetHalODMVar (struct adapter *Adapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet) -{ -SetHalODMVar (Adapter, eVariable, pValue1, bSet); -} -static void hal_notch_filter_8723b (struct adapter *adapter,bool enable) {if (enable)
drivers/staging/rtl8723bs/include/hal_intf.h +0 -1
@@ -276,7 +276,6 @@ u8 GetHalDefVar8723BSDIO(struct adapter *Adapter, enum hal_def_variable eVariablu8 SetHalDefVar8723BSDIO (struct adapter *Adapter,enum hal_def_variable eVariable,void *pValue);void UpdateHalRAMask8723B (struct adapter *padapter,u32 mac_id,u8 rssi_level);void rtl8723b_SetBeaconRelatedRegisters (struct adapter *padapter); -void rtl8723b_SetHalODMVar (struct adapter *Adapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet);void Hal_EfusePowerSwitch (struct adapter *padapter,u8 bWrite,u8 PwrState);void Hal_ReadEFuse (struct adapter *padapter,u8 efuseType,u16 _offset,u16 _size_byte,u8 *pbuf,bool bPseudoTest);
Signature · 1 line
2.50.1
PATCH 3/11 staging: rtl8723bs: remove function pointer hal_notch_filter
In reply to Michael StraubeRemove function pointer hal_notch_filter and use hal_notch_filter_8723b directly to reduce code complexity.
--- drivers/staging/rtl8723bs/hal/hal_intf.c | 3 +-- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 3 +-- drivers/staging/rtl8723bs/include/hal_intf.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -2
@@ -292,8 +292,7 @@ s32 rtw_hal_xmit_thread_handler(struct adapter *padapter)void rtw_hal_notch_filter (struct adapter *adapter,bool enable) { -if (adapter->HalFunc.hal_notch_filter) - adapter->HalFunc.hal_notch_filter (adapter, enable); +hal_notch_filter_8723b (adapter, enable); }void rtw_hal_reset_security_engine (struct adapter *adapter)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +1 -2
@@ -1267,7 +1267,7 @@ void rtl8723b_SetBeaconRelatedRegisters(struct adapter *padapter)rtw_write8 (padapter, bcn_ctrl_reg, val8); } -static void hal_notch_filter_8723b (struct adapter *adapter,bool enable) +void hal_notch_filter_8723b (struct adapter *adapter,bool enable) {if (enable)rtw_write8 (adapter, rOFDM0_RxDSP+1 ,rtw_read8 (adapter, rOFDM0_RxDSP+1 ) |BIT1 );
@@ -1316,7 +1316,6 @@ void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level)void rtl8723b_set_hal_ops (struct hal_ops *pHalFunc) { pHalFunc->xmit_thread_handler = &hal_xmit_handler; - pHalFunc->hal_notch_filter = &hal_notch_filter_8723b; pHalFunc->c2h_handler = c2h_handler_8723b; pHalFunc->c2h_id_filter_ccx = c2h_id_filter_ccx_8723b;
drivers/staging/rtl8723bs/include/hal_intf.h +1 -1
@@ -162,7 +162,6 @@ typedef s32 (*c2h_id_filter)(u8 *c2h_evt);struct hal_ops {s32 (*xmit_thread_handler)(struct adapter *padapter); -void (*hal_notch_filter)(struct adapter *adapter,bool enable);void (*hal_reset_security_engine)(struct adapter *adapter);s32 (*c2h_handler)(struct adapter *padapter,u8 *c2h_evt);c2h_id_filter c2h_id_filter_ccx;
@@ -282,4 +281,5 @@ void Hal_ReadEFuse(struct adapter *padapter, u8 efuseType, u16 _offset,void Hal_GetEfuseDefinition (struct adapter *padapter,u8 efuseType,u8 type,void *pOut,bool bPseudoTest);u16 Hal_EfuseGetCurrentSize (struct adapter *padapter,u8 efuseType,bool bPseudoTest); +void hal_notch_filter_8723b (struct adapter *adapter,bool enable);#endif /* __HAL_INTF_H__ */
Signature · 1 line
2.50.1
PATCH 4/11 staging: rtl8723bs: remove function pointer c2h_handler
In reply to Michael StraubeRemove function pointer c2h_handler and use c2h_handler_8723b directly to reduce code complexity.
--- drivers/staging/rtl8723bs/hal/hal_intf.c | 6 +----- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 1 - drivers/staging/rtl8723bs/include/hal_intf.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -5
@@ -308,11 +308,7 @@ bool rtw_hal_c2h_valid(struct adapter *adapter, u8 *buf)s32 rtw_hal_c2h_handler (struct adapter *adapter,u8 *c2h_evt) { -s32 ret = _FAIL; - -if (adapter->HalFunc.c2h_handler) - ret = adapter->HalFunc.c2h_handler (adapter, c2h_evt); -return ret; +return c2h_handler_8723b (adapter, c2h_evt); }c2h_id_filter rtw_hal_c2h_id_filter_ccx (struct adapter *adapter)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -1
@@ -1317,7 +1317,6 @@ void rtl8723b_set_hal_ops(struct hal_ops *pHalFunc) { pHalFunc->xmit_thread_handler = &hal_xmit_handler; - pHalFunc->c2h_handler = c2h_handler_8723b; pHalFunc->c2h_id_filter_ccx = c2h_id_filter_ccx_8723b; pHalFunc->fill_h2c_cmd = &FillH2CCmd8723B;
drivers/staging/rtl8723bs/include/hal_intf.h +0 -1
@@ -163,7 +163,6 @@ typedef s32 (*c2h_id_filter)(u8 *c2h_evt);struct hal_ops {s32 (*xmit_thread_handler)(struct adapter *padapter);void (*hal_reset_security_engine)(struct adapter *adapter); -s32 (*c2h_handler)(struct adapter *padapter,u8 *c2h_evt);c2h_id_filter c2h_id_filter_ccx;s32 (*fill_h2c_cmd)(struct adapter *,u8 ElementID,u32 CmdLen,u8 *pCmdBuffer);
Signature · 1 line
2.50.1
PATCH 5/11 staging: rtl8723bs: remove macro FillH2CCmd
In reply to Michael StraubeThe macro FillH2CCmd is not used, remove it.
--- drivers/staging/rtl8723bs/include/rtl8723b_cmd.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8723bs/include/rtl8723b_cmd.h +0 -1
@@ -181,5 +181,4 @@ void rtl8723b_set_FwPwrModeInIPS_cmd(struct adapter *padapter, u8 cmd_param);s32 FillH2CCmd8723B (struct adapter *padapter,u8 ElementID,u32 CmdLen,u8 *pCmdBuffer); -#define FillH2CCmd FillH2CCmd8723B#endif
Signature · 1 line
2.50.1
PATCH 6/11 staging: rtl8723bs: remove function pointer fill_h2c_cmd
In reply to Michael StraubeRemove function pointer fill_h2c_cmd and use FillH2CCmd8723B directly to reduce code complexity.
--- drivers/staging/rtl8723bs/hal/hal_intf.c | 7 +------ drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 -- drivers/staging/rtl8723bs/include/hal_intf.h | 2 -- 3 files changed, 1 insertion(+), 10 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -6
@@ -346,10 +346,5 @@ s32 rtw_hal_macid_wakeup(struct adapter *padapter, u32 macid)s32 rtw_hal_fill_h2c_cmd (struct adapter *padapter,u8 ElementID,u32 CmdLen,u8 *pCmdBuffer) { -s32 ret = _FAIL; - -if (padapter->HalFunc.fill_h2c_cmd) - ret = padapter->HalFunc.fill_h2c_cmd (padapter, ElementID, CmdLen, pCmdBuffer); - -return ret; +return FillH2CCmd8723B (padapter, ElementID, CmdLen, pCmdBuffer); }
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -2
@@ -1318,8 +1318,6 @@ void rtl8723b_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->xmit_thread_handler = &hal_xmit_handler; pHalFunc->c2h_id_filter_ccx = c2h_id_filter_ccx_8723b; - - pHalFunc->fill_h2c_cmd = &FillH2CCmd8723B; }void rtl8723b_InitAntenna_Selection (struct adapter *padapter)
drivers/staging/rtl8723bs/include/hal_intf.h +0 -2
@@ -164,8 +164,6 @@ struct hal_ops {s32 (*xmit_thread_handler)(struct adapter *padapter);void (*hal_reset_security_engine)(struct adapter *adapter);c2h_id_filter c2h_id_filter_ccx; - -s32 (*fill_h2c_cmd)(struct adapter *,u8 ElementID,u32 CmdLen,u8 *pCmdBuffer); };#define RF_CHANGE_BY_INIT 0
Signature · 1 line
2.50.1
PATCH 7/11 staging: rtl8723bs: remove macro hal_xmit_handler
In reply to Michael StraubeRemove the macro hal_xmit_handler and use rtl8723bs_xmit_buf_handler directly to reduce code complexity.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- drivers/staging/rtl8723bs/include/rtl8723b_xmit.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +1 -1
@@ -1315,7 +1315,7 @@ void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level)void rtl8723b_set_hal_ops (struct hal_ops *pHalFunc) { - pHalFunc->xmit_thread_handler = &hal_xmit_handler; + pHalFunc->xmit_thread_handler = &rtl8723bs_xmit_buf_handler; pHalFunc->c2h_id_filter_ccx = c2h_id_filter_ccx_8723b; }
drivers/staging/rtl8723bs/include/rtl8723b_xmit.h +0 -1
@@ -414,7 +414,6 @@ s32 rtl8723bs_mgnt_xmit(struct adapter *padapter, struct xmit_frame *pmgntframe)s32 rtl8723bs_hal_xmitframe_enqueue (struct adapter *padapter,struct xmit_frame *pxmitframe);s32 rtl8723bs_xmit_buf_handler (struct adapter *padapter);int rtl8723bs_xmit_thread (void *context); -#define hal_xmit_handler rtl8723bs_xmit_buf_handleru8 BWMapping_8723B (struct adapter *Adapter,struct pkt_attrib *pattrib);u8 SCMapping_8723B (struct adapter *Adapter,struct pkt_attrib *pattrib);
Signature · 1 line
2.50.1
PATCH 8/11 staging: rtl8723bs: remove function pointer xmit_thread_handler
In reply to Michael StraubeRemove function pointer xmit_thread_handler and use rtl8723bs_xmit_buf_handler directly to reduce code complexity.
--- drivers/staging/rtl8723bs/hal/hal_intf.c | 4 +--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 -- drivers/staging/rtl8723bs/include/hal_intf.h | 1 - 3 files changed, 1 insertion(+), 6 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -3
@@ -285,9 +285,7 @@ void beacon_timing_control(struct adapter *padapter)s32 rtw_hal_xmit_thread_handler (struct adapter *padapter) { -if (padapter->HalFunc.xmit_thread_handler) -return padapter->HalFunc.xmit_thread_handler (padapter); -return _FAIL; +return rtl8723bs_xmit_buf_handler (padapter); }void rtw_hal_notch_filter (struct adapter *adapter,bool enable)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -2
@@ -1315,8 +1315,6 @@ void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level)void rtl8723b_set_hal_ops (struct hal_ops *pHalFunc) { - pHalFunc->xmit_thread_handler = &rtl8723bs_xmit_buf_handler; - pHalFunc->c2h_id_filter_ccx = c2h_id_filter_ccx_8723b; }
drivers/staging/rtl8723bs/include/hal_intf.h +0 -1
@@ -161,7 +161,6 @@ enum hal_intf_ps_func {typedef s32 (*c2h_id_filter )(u8 *c2h_evt);struct hal_ops { -s32 (*xmit_thread_handler)(struct adapter *padapter);void (*hal_reset_security_engine)(struct adapter *adapter);c2h_id_filter c2h_id_filter_ccx; };
Signature · 1 line
2.50.1
PATCH 9/11 staging: rtl8723bs: remove function pointer hal_reset_security_engine
In reply to Michael StraubeThe function pointer hal_reset_security_engine is never set. As a consequence, the function rtw_hal_reset_security_engine does nothing. Remove both to reduce dead code.
--- drivers/staging/rtl8723bs/hal/hal_intf.c | 8 -------- drivers/staging/rtl8723bs/include/hal_intf.h | 2 -- 2 files changed, 10 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -8
@@ -73,8 +73,6 @@ uint rtw_hal_init(struct adapter *padapter)if (padapter->registrypriv.notch_filter ==1 )rtw_hal_notch_filter (padapter,1 ); -rtw_hal_reset_security_engine (padapter); -rtw_sec_restore_wep_key (dvobj->padapters);init_hw_mlme_ext (padapter);
@@ -293,12 +291,6 @@ void rtw_hal_notch_filter(struct adapter *adapter, bool enable)hal_notch_filter_8723b (adapter, enable); } -void rtw_hal_reset_security_engine (struct adapter *adapter) -{ -if (adapter->HalFunc.hal_reset_security_engine) - adapter->HalFunc.hal_reset_security_engine (adapter); -} -bool rtw_hal_c2h_valid (struct adapter *adapter,u8 *buf) {return c2h_evt_valid ((struct c2h_evt_hdr_88xx *)buf);
drivers/staging/rtl8723bs/include/hal_intf.h +0 -2
@@ -161,7 +161,6 @@ enum hal_intf_ps_func {typedef s32 (*c2h_id_filter )(u8 *c2h_evt);struct hal_ops { -void (*hal_reset_security_engine)(struct adapter *adapter);c2h_id_filter c2h_id_filter_ccx; };
@@ -253,7 +252,6 @@ void rtw_hal_dm_watchdog_in_lps(struct adapter *padapter);s32 rtw_hal_xmit_thread_handler (struct adapter *padapter);void rtw_hal_notch_filter (struct adapter *adapter,bool enable); -void rtw_hal_reset_security_engine (struct adapter *adapter);bool rtw_hal_c2h_valid (struct adapter *adapter,u8 *buf);s32 rtw_hal_c2h_handler (struct adapter *adapter,u8 *c2h_evt);
Signature · 1 line
2.50.1
PATCH 10/11 staging: rtl8723bs: remove function pointer c2h_id_filter
In reply to Michael StraubeRemove function pointer c2h_id_filter from struct hal_ops and use c2h_id_filter_ccx_8723b directly to reduce code complexity.
--- drivers/staging/rtl8723bs/hal/hal_intf.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 1 - drivers/staging/rtl8723bs/include/hal_intf.h | 1 - 3 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -1
@@ -303,7 +303,7 @@ s32 rtw_hal_c2h_handler(struct adapter *adapter, u8 *c2h_evt)c2h_id_filter rtw_hal_c2h_id_filter_ccx (struct adapter *adapter) { -return adapter->HalFunc.c2h_id_filter_ccx; +return c2h_id_filter_ccx_8723b; }s32 rtw_hal_macid_sleep (struct adapter *padapter,u32 macid)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -1
@@ -1315,7 +1315,6 @@ void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level)void rtl8723b_set_hal_ops (struct hal_ops *pHalFunc) { - pHalFunc->c2h_id_filter_ccx = c2h_id_filter_ccx_8723b; }void rtl8723b_InitAntenna_Selection (struct adapter *padapter)
drivers/staging/rtl8723bs/include/hal_intf.h +0 -1
@@ -161,7 +161,6 @@ enum hal_intf_ps_func {typedef s32 (*c2h_id_filter )(u8 *c2h_evt);struct hal_ops { -c2h_id_filter c2h_id_filter_ccx; };#define RF_CHANGE_BY_INIT 0
Signature · 1 line
2.50.1
PATCH 11/11 staging: rtl8723bs: remove struct hal_ops
In reply to Michael StraubeAfter previous patches, struct hal_ops is finally empty now. Remove the structure and related initialization functions.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 5 ----- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 8 -------- drivers/staging/rtl8723bs/include/drv_types.h | 1 - drivers/staging/rtl8723bs/include/hal_intf.h | 3 --- drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 1 - drivers/staging/rtl8723bs/include/sdio_hal.h | 2 -- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 -- 7 files changed, 22 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -5
@@ -1312,11 +1312,6 @@ void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level) pdmpriv->INIDATA_RATE[mac_id] = psta->init_rate; } - -void rtl8723b_set_hal_ops (struct hal_ops *pHalFunc) -{ -} -void rtl8723b_InitAntenna_Selection (struct adapter *padapter) {u8 val;
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -8
@@ -1251,11 +1251,3 @@ u8 SetHalDefVar8723BSDIO(struct adapter *Adapter, enum hal_def_variable eVariabl {return SetHalDefVar8723B (Adapter, eVariable, pValue); } - -void rtl8723bs_set_hal_ops (struct adapter *padapter) -{ -struct hal_ops *pHalFunc = &padapter->HalFunc; - -rtl8723b_set_hal_ops (pHalFunc); - -}
drivers/staging/rtl8723bs/include/drv_types.h +0 -1
@@ -350,7 +350,6 @@ struct adapter {void *HalData;u32 hal_data_sz; -struct hal_ops HalFunc;s32 bDriverStopped;s32 bSurpriseRemoved;
drivers/staging/rtl8723bs/include/hal_intf.h +0 -3
@@ -160,9 +160,6 @@ enum hal_intf_ps_func {typedef s32 (*c2h_id_filter )(u8 *c2h_evt); -struct hal_ops { -}; -#define RF_CHANGE_BY_INIT 0#define RF_CHANGE_BY_IPS BIT28#define RF_CHANGE_BY_PS BIT29
drivers/staging/rtl8723bs/include/rtl8723b_hal.h +0 -1
@@ -223,7 +223,6 @@ void Hal_EfuseParseVoltage_8723B(struct adapter *padapter, u8 *hwinfo,void C2HPacketHandler_8723B (struct adapter *padapter,u8 *pbuffer,u16 length); -void rtl8723b_set_hal_ops (struct hal_ops *pHalFunc);void SetHwReg8723B (struct adapter *padapter,u8 variable,u8 *val);void GetHwReg8723B (struct adapter *padapter,u8 variable,u8 *val); u8 SetHalDefVar8723B(struct adapter *padapter, enum hal_def_variable variable,
drivers/staging/rtl8723bs/include/sdio_hal.h +0 -2
@@ -11,6 +11,4 @@ u8 sd_int_isr(struct adapter *padapter);void sd_int_dpc (struct adapter *padapter);void rtw_set_hal_ops (struct adapter *padapter); -void rtl8723bs_set_hal_ops (struct adapter *padapter); -#endif /* __SDIO_HAL_H__ */
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +0 -2
@@ -216,8 +216,6 @@ void rtw_set_hal_ops(struct adapter *padapter) {/* alloc memory for HAL DATA */ rtw_hal_data_init (padapter); - -rtl8723bs_set_hal_ops (padapter); }static void sd_intf_start (struct adapter *padapter)
Signature · 1 line
2.50.1