staging: r8188eu: remove some pointers from struct hal_ops
cover staging: r8188eu: remove some pointers from struct hal_ops
This series removes some more pointers from struct hal_ops.
Tested on x86_64 with Inter-Tech DMG-02.
Michael Straube (7):
staging: r8188eu: remove SetHalDefVarHandler from struct hal_ops
staging: r8188eu: remove GetHalDefVarHandler from struct hal_ops
staging: r8188eu: remove init_xmit_priv from struct hal_ops
staging: r8188eu: remove init_recv_priv from struct hal_ops
staging: r8188eu: remove free_recv_priv from struct hal_ops
staging: r8188eu: remove inirp_init from struct hal_ops
staging: r8188eu: remove inirp_deinit from struct hal_ops
drivers/staging/r8188eu/core/rtw_cmd.c | 2 +- drivers/staging/r8188eu/core/rtw_mlme.c | 14 ++--- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 +-- drivers/staging/r8188eu/core/rtw_recv.c | 7 +-- drivers/staging/r8188eu/core/rtw_xmit.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 56 -------------------- drivers/staging/r8188eu/hal/usb_halinit.c | 38 ++----------- drivers/staging/r8188eu/include/hal_intf.h | 33 ++---------- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 10 ++-- drivers/staging/r8188eu/os_dep/usb_intf.c | 4 +- 10 files changed, 34 insertions(+), 140 deletions(-)
Signature · 1 line
2.33.0
PATCH 1/7 staging: r8188eu: remove SetHalDefVarHandler from struct hal_ops
Remove SetHalDefVarHandler from struct hal_ops and remove its wrapper rtw_hal_set_def_var(). Call SetHalDefVar8188EUsb() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 8 -------- drivers/staging/r8188eu/hal/usb_halinit.c | 8 ++------ drivers/staging/r8188eu/include/hal_intf.h | 7 ++----- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 6 +++--- 4 files changed, 7 insertions(+), 22 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -8
@@ -53,14 +53,6 @@ void rtw_hal_get_hwreg(struct adapter *adapt, u8 variable, u8 *val) adapt->HalFunc.GetHwRegHandler (adapt, variable, val); } -u8 rtw_hal_set_def_var (struct adapter *adapt,enum hal_def_variable var, -void *val) -{ -if (adapt->HalFunc.SetHalDefVarHandler) -return adapt->HalFunc.SetHalDefVarHandler (adapt, var, val); -return _FAIL; -} -u8 rtw_hal_get_def_var (struct adapter *adapt,enum hal_def_variable var,void *val) {
drivers/staging/r8188eu/hal/usb_halinit.c +2 -6
@@ -1956,11 +1956,8 @@ GetHalDefVar8188EUsb(return bResult; } -/* */ -/* Description: */ -/* Change default setting of specified variable. */ -/* */ -static u8 SetHalDefVar8188EUsb (struct adapter *Adapter,enum hal_def_variable eVariable,void *pValue) +/* Change default setting of specified variable. */ +u8 SetHalDefVar8188EUsb (struct adapter *Adapter,enum hal_def_variable eVariable,void *pValue) {struct hal_data_8188e *haldata =GET_HAL_DATA (Adapter);u8 bResult = _SUCCESS;
@@ -2172,5 +2169,4 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->SetHwRegHandler = &SetHwReg8188EU; halfunc->GetHwRegHandler = &GetHwReg8188EU; halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb; - halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb; }
drivers/staging/r8188eu/include/hal_intf.h +2 -5
@@ -141,9 +141,6 @@ struct hal_ops {u8 (*GetHalDefVarHandler)(struct adapter *padapter,enum hal_def_variable eVariable,void *pValue); -u8 (*SetHalDefVarHandler)(struct adapter *padapter, -enum hal_def_variable eVariable, -void *pValue); };#define RF_CHANGE_BY_INIT 0
@@ -183,14 +180,14 @@ void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level);int rtl8188e_IOL_exec_cmds_sync (struct adapter *adapter,struct xmit_frame *xmit_frame,u32 max_wating_ms,u32 bndy_cnt); +u8 SetHalDefVar8188EUsb (struct adapter *Adapter,enum hal_def_variable eVariable,void *pValue); +uint rtw_hal_init (struct adapter *padapter);uint rtw_hal_deinit (struct adapter *padapter);void rtw_hal_stop (struct adapter *padapter);void rtw_hal_set_hwreg (struct adapter *padapter,u8 variable,u8 *val);void rtw_hal_get_hwreg (struct adapter *padapter,u8 variable,u8 *val); -u8 rtw_hal_set_def_var (struct adapter *padapter, -enum hal_def_variable eVariable,void *pValue);u8 rtw_hal_get_def_var (struct adapter *padapter,enum hal_def_variable eVariable,void *pValue);
drivers/staging/r8188eu/os_dep/ioctl_linux.c +3 -3
@@ -3996,10 +3996,10 @@ static int rtw_dbg_port(struct net_device *dev,case 0x0c :/* dump rx/tx packet */ if (arg ==0 ) {DBG_88E ("dump rx packet (%d)\n" , extra_arg); -rtw_hal_set_def_var (padapter,HAL_DEF_DBG_DUMP_RXPKT , &(extra_arg)); +SetHalDefVar8188EUsb (padapter,HAL_DEF_DBG_DUMP_RXPKT , &extra_arg); }else if (arg ==1 ) {DBG_88E ("dump tx packet (%d)\n" , extra_arg); -rtw_hal_set_def_var (padapter,HAL_DEF_DBG_DUMP_TXPKT , &(extra_arg)); +SetHalDefVar8188EUsb (padapter,HAL_DEF_DBG_DUMP_TXPKT , &extra_arg); }break ;case 0x0f :
@@ -4097,7 +4097,7 @@ static int rtw_dbg_port(struct net_device *dev,extra_arg = 2 - disable tx power tracking extra_arg = 3 - turn on all dynamic func */ -rtw_hal_set_def_var (padapter,HAL_DEF_DBG_DM_FUNC , &(extra_arg)); +SetHalDefVar8188EUsb (padapter,HAL_DEF_DBG_DM_FUNC , &extra_arg);rtw_hal_get_def_var (padapter,HAL_DEF_DBG_DM_FUNC , &odm_flag);DBG_88E (" === DMFlag(0x%08x) ===\n" , odm_flag); }
Signature · 1 line
2.33.0
PATCH 2/7 staging: r8188eu: remove GetHalDefVarHandler from struct hal_ops
In reply to Michael StraubeRemove GetHalDefVarHandler from struct hal_ops and remove its wrapper rtw_hal_get_def_var(). Call GetHalDefVar8188EUsb() directly instead.
--- drivers/staging/r8188eu/core/rtw_cmd.c | 2 +- drivers/staging/r8188eu/core/rtw_mlme.c | 14 +++++++------- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 ++++---- drivers/staging/r8188eu/core/rtw_recv.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 8 -------- drivers/staging/r8188eu/hal/usb_halinit.c | 13 ++----------- drivers/staging/r8188eu/include/hal_intf.h | 8 +------- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 4 ++-- 8 files changed, 18 insertions(+), 41 deletions(-)
drivers/staging/r8188eu/core/rtw_cmd.c +1 -1
@@ -1116,7 +1116,7 @@ u8 rtw_antenna_select_cmd(struct adapter *padapter, u8 antenna, u8 enqueue)u8 support_ant_div;u8 res = _SUCCESS; -rtw_hal_get_def_var (padapter,HAL_DEF_IS_SUPPORT_ANT_DIV , &support_ant_div); +GetHalDefVar8188EUsb (padapter,HAL_DEF_IS_SUPPORT_ANT_DIV , &support_ant_div);if (!support_ant_div)return res;
drivers/staging/r8188eu/core/rtw_mlme.c +7 -7
@@ -504,7 +504,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t/* If there are no more slots, expire the oldest */ pnetwork = oldest; -rtw_hal_get_def_var (adapter,HAL_DEF_CURRENT_ANTENNA , &target->PhyInfo.Optimum_antenna); +GetHalDefVar8188EUsb (adapter,HAL_DEF_CURRENT_ANTENNA , &target->PhyInfo.Optimum_antenna);memcpy (&pnetwork->network, target,get_wlan_bssid_ex_sz (target));/* variable initialize */ pnetwork->fixed = false;
@@ -527,7 +527,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t bssid_ex_sz =get_wlan_bssid_ex_sz (target); target->Length = bssid_ex_sz; -rtw_hal_get_def_var (adapter,HAL_DEF_CURRENT_ANTENNA , &target->PhyInfo.Optimum_antenna); +GetHalDefVar8188EUsb (adapter,HAL_DEF_CURRENT_ANTENNA , &target->PhyInfo.Optimum_antenna);memcpy (&pnetwork->network, target, bssid_ex_sz); pnetwork->last_scanned = jiffies;
@@ -1539,10 +1539,10 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)rtw_free_assoc_resources (adapter,0 ); } -rtw_hal_get_def_var (adapter,HAL_DEF_IS_SUPPORT_ANT_DIV , &(supp_ant_div)); +GetHalDefVar8188EUsb (adapter,HAL_DEF_IS_SUPPORT_ANT_DIV , &supp_ant_div);if (supp_ant_div) {u8 cur_ant; -rtw_hal_get_def_var (adapter,HAL_DEF_CURRENT_ANTENNA , &(cur_ant)); +GetHalDefVar8188EUsb (adapter,HAL_DEF_CURRENT_ANTENNA , &cur_ant);DBG_88E ("#### Opt_Ant_(%s), cur_Ant(%s)\n" , (2 == candidate->network.PhyInfo.Optimum_antenna) ?"A" :"B" , (2 == cur_ant) ? "A" : "B"
@@ -1923,15 +1923,15 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_IEEE80211_HT_CAP_TX_STBC | IEEE80211_HT_CAP_DSSSCCK40); -rtw_hal_get_def_var (padapter,HAL_DEF_RX_PACKET_OFFSET , &rx_packet_offset); -rtw_hal_get_def_var (padapter,HAL_DEF_MAX_RECVBUF_SZ , &max_recvbuf_sz); +GetHalDefVar8188EUsb (padapter,HAL_DEF_RX_PACKET_OFFSET , &rx_packet_offset); +GetHalDefVar8188EUsb (padapter,HAL_DEF_MAX_RECVBUF_SZ , &max_recvbuf_sz);/* AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k AMPDU_para [4:2]:Min MPDU Start Spacing */ -rtw_hal_get_def_var (padapter,HW_VAR_MAX_RX_AMPDU_FACTOR , &max_rx_ampdu_factor); +GetHalDefVar8188EUsb (padapter,HW_VAR_MAX_RX_AMPDU_FACTOR , &max_rx_ampdu_factor); ht_capie.ampdu_params_info = (max_rx_ampdu_factor &0x03 );if (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)
drivers/staging/r8188eu/core/rtw_mlme_ext.c +4 -4
@@ -5807,7 +5807,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch pframe =rtw_set_fixed_ie (pframe,1 , &pmlmeinfo->ADDBA_req.dialog_token, &pattrib->pktlen); pframe =rtw_set_fixed_ie (pframe,2 , (unsigned char *)&status, &pattrib->pktlen); BA_para_set =le16_to_cpu (pmlmeinfo->ADDBA_req.BA_para_set) &0x3f ; -rtw_hal_get_def_var (padapter,HW_VAR_MAX_RX_AMPDU_FACTOR , &max_rx_ampdu_factor); +GetHalDefVar8188EUsb (padapter,HW_VAR_MAX_RX_AMPDU_FACTOR , &max_rx_ampdu_factor);switch (max_rx_ampdu_factor) {case MAX_AMPDU_FACTOR_64K : BA_para_set |=0x1000 ;/* 64 buffer size */
@@ -6263,7 +6263,7 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, st bssid->Rssi = precv_frame->attrib.phy_info.recvpower;/* in dBM.raw data */ bssid->PhyInfo.SignalQuality = precv_frame->attrib.phy_info.SignalQuality;/* in percentage */ bssid->PhyInfo.SignalStrength = precv_frame->attrib.phy_info.SignalStrength;/* in percentage */ -rtw_hal_get_def_var (padapter,HAL_DEF_CURRENT_ANTENNA , &bssid->PhyInfo.Optimum_antenna); +GetHalDefVar8188EUsb (padapter,HAL_DEF_CURRENT_ANTENNA , &bssid->PhyInfo.Optimum_antenna);/* checking SSID */ p =rtw_get_ie (bssid->IEs + ie_offset, _SSID_IE_, &len, bssid->IELength - ie_offset);
@@ -7154,9 +7154,9 @@ void _linked_rx_signal_strehgth_display(struct adapter *padapter)else if ((pmlmeinfo->state &0x03 ) == _HW_STATE_AP_) mac_id =2 ; -rtw_hal_get_def_var (padapter,HW_DEF_RA_INFO_DUMP , &mac_id); +GetHalDefVar8188EUsb (padapter,HW_DEF_RA_INFO_DUMP , &mac_id); -rtw_hal_get_def_var (padapter,HAL_DEF_UNDERCORATEDSMOOTHEDPWDB , &UndecoratedSmoothedPWDB); +GetHalDefVar8188EUsb (padapter,HAL_DEF_UNDERCORATEDSMOOTHEDPWDB , &UndecoratedSmoothedPWDB);DBG_88E ("UndecoratedSmoothedPWDB:%d\n" , UndecoratedSmoothedPWDB); }
drivers/staging/r8188eu/core/rtw_recv.c +1 -1
@@ -1114,7 +1114,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv pattrib->order =GetOrder (ptr);/* Dump rx packets */ -rtw_hal_get_def_var (adapter,HAL_DEF_DBG_DUMP_RXPKT , &(bDumpRxPkt)); +GetHalDefVar8188EUsb (adapter,HAL_DEF_DBG_DUMP_RXPKT , &bDumpRxPkt);if (bDumpRxPkt ==1 ) {/* dump all rx packets */ int i;DBG_88E ("#############################\n" );
drivers/staging/r8188eu/hal/hal_intf.c +0 -8
@@ -53,14 +53,6 @@ void rtw_hal_get_hwreg(struct adapter *adapt, u8 variable, u8 *val) adapt->HalFunc.GetHwRegHandler (adapt, variable, val); } -u8 rtw_hal_get_def_var (struct adapter *adapt, -enum hal_def_variable var,void *val) -{ -if (adapt->HalFunc.GetHalDefVarHandler) -return adapt->HalFunc.GetHalDefVarHandler (adapt, var, val); -return _FAIL; -} -u32 rtw_hal_inirp_init (struct adapter *adapt) {u32 rst = _FAIL;
drivers/staging/r8188eu/hal/usb_halinit.c +2 -11
@@ -1863,16 +1863,8 @@ static void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) } -/* */ -/* Description: */ -/* Query setting of specified variable. */ -/* */ -static u8 -GetHalDefVar8188EUsb ( -struct adapter *Adapter, -enum hal_def_variable eVariable, -void *pValue - ) +/* Query setting of specified variable. */ +u8 GetHalDefVar8188EUsb (struct adapter *Adapter,enum hal_def_variable eVariable,void *pValue) {struct hal_data_8188e *haldata =GET_HAL_DATA (Adapter);u8 bResult = _SUCCESS;
@@ -2168,5 +2160,4 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->SetHwRegHandler = &SetHwReg8188EU; halfunc->GetHwRegHandler = &GetHwReg8188EU; - halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb; }
drivers/staging/r8188eu/include/hal_intf.h +1 -7
@@ -137,10 +137,6 @@ struct hal_ops { u8 *val);void (*GetHwRegHandler)(struct adapter *padapter,u8 variable,u8 *val); - -u8 (*GetHalDefVarHandler)(struct adapter *padapter, -enum hal_def_variable eVariable, -void *pValue); };#define RF_CHANGE_BY_INIT 0
@@ -181,6 +177,7 @@ int rtl8188e_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt);u8 SetHalDefVar8188EUsb (struct adapter *Adapter,enum hal_def_variable eVariable,void *pValue); +u8 GetHalDefVar8188EUsb (struct adapter *Adapter,enum hal_def_variable eVariable,void *pValue);uint rtw_hal_init (struct adapter *padapter);uint rtw_hal_deinit (struct adapter *padapter);
@@ -188,9 +185,6 @@ void rtw_hal_stop(struct adapter *padapter);void rtw_hal_set_hwreg (struct adapter *padapter,u8 variable,u8 *val);void rtw_hal_get_hwreg (struct adapter *padapter,u8 variable,u8 *val); -u8 rtw_hal_get_def_var (struct adapter *padapter, -enum hal_def_variable eVariable,void *pValue); -u32 rtw_hal_inirp_init (struct adapter *padapter);u32 rtw_hal_inirp_deinit (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/ioctl_linux.c +2 -2
@@ -4082,7 +4082,7 @@ static int rtw_dbg_port(struct net_device *dev,u32 odm_flag;if (0xf == extra_arg) { -rtw_hal_get_def_var (padapter,HAL_DEF_DBG_DM_FUNC , &odm_flag); +GetHalDefVar8188EUsb (padapter,HAL_DEF_DBG_DM_FUNC , &odm_flag);DBG_88E (" === DMFlag(0x%08x) ===\n" , odm_flag);DBG_88E ("extra_arg = 0 - disable all dynamic func\n" );DBG_88E ("extra_arg = 1 - disable DIG- BIT(0)\n" );
@@ -4098,7 +4098,7 @@ static int rtw_dbg_port(struct net_device *dev,extra_arg = 3 - turn on all dynamic func */ SetHalDefVar8188EUsb (padapter,HAL_DEF_DBG_DM_FUNC , &extra_arg); -rtw_hal_get_def_var (padapter,HAL_DEF_DBG_DM_FUNC , &odm_flag); +GetHalDefVar8188EUsb (padapter,HAL_DEF_DBG_DM_FUNC , &odm_flag);DBG_88E (" === DMFlag(0x%08x) ===\n" , odm_flag); } }
Signature · 1 line
2.33.0
PATCH 3/7 staging: r8188eu: remove init_xmit_priv from struct hal_ops
In reply to Michael StraubeRemove init_xmit_priv from struct hal_ops an remove its wrapper rtw_hal_init_xmit_priv(). Call rtl8188eu_init_xmit_priv() directly instead.
--- drivers/staging/r8188eu/core/rtw_xmit.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 7 ------- drivers/staging/r8188eu/hal/usb_halinit.c | 2 -- drivers/staging/r8188eu/include/hal_intf.h | 4 ---- 4 files changed, 1 insertion(+), 14 deletions(-)
drivers/staging/r8188eu/core/rtw_xmit.c +1 -1
@@ -200,7 +200,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)mutex_init (&pxmitpriv->ack_tx_mutex);rtw_sctx_init (&pxmitpriv->ack_tx_ops,0 ); -rtw_hal_init_xmit_priv (padapter); +rtl8188eu_init_xmit_priv (padapter); exit:
drivers/staging/r8188eu/hal/hal_intf.c +0 -7
@@ -72,13 +72,6 @@ u32 rtw_hal_inirp_deinit(struct adapter *adapt)return _FAIL; } -s32 rtw_hal_init_xmit_priv (struct adapter *adapt) -{ -if (adapt->HalFunc.init_xmit_priv) -return adapt->HalFunc.init_xmit_priv (adapt); -return _FAIL; -} -s32 rtw_hal_init_recv_priv (struct adapter *adapt) {if (adapt->HalFunc.init_recv_priv)
drivers/staging/r8188eu/hal/usb_halinit.c +0 -2
@@ -2153,8 +2153,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->inirp_init = &rtl8188eu_inirp_init; halfunc->inirp_deinit = &rtl8188eu_inirp_deinit; - halfunc->init_xmit_priv = &rtl8188eu_init_xmit_priv; - halfunc->init_recv_priv = &rtl8188eu_init_recv_priv; halfunc->free_recv_priv = &rtl8188eu_free_recv_priv;
drivers/staging/r8188eu/include/hal_intf.h +0 -4
@@ -128,8 +128,6 @@ struct hal_ops {u32 (*inirp_init)(struct adapter *padapter);u32 (*inirp_deinit)(struct adapter *padapter); -s32 (*init_xmit_priv)(struct adapter *padapter); -s32 (*init_recv_priv)(struct adapter *padapter);void (*free_recv_priv)(struct adapter *padapter);
@@ -188,8 +186,6 @@ void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val);u32 rtw_hal_inirp_init (struct adapter *padapter);u32 rtw_hal_inirp_deinit (struct adapter *padapter); -s32 rtw_hal_init_xmit_priv (struct adapter *padapter); -s32 rtw_hal_init_recv_priv (struct adapter *padapter);void rtw_hal_free_recv_priv (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH 4/7 staging: r8188eu: remove init_recv_priv from struct hal_ops
In reply to Michael StraubeRemove init_recv_priv from struct hal_ops and remove its wrapper rtw_hal_init_recv_priv(). Call rtl8188eu_init_recv_priv() directly instead.
--- drivers/staging/r8188eu/core/rtw_recv.c | 3 ++- drivers/staging/r8188eu/hal/hal_intf.c | 8 -------- drivers/staging/r8188eu/hal/usb_halinit.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 2 -- 4 files changed, 2 insertions(+), 12 deletions(-)
drivers/staging/r8188eu/core/rtw_recv.c +2 -1
@@ -9,6 +9,7 @@#include "../include/mlme_osdep.h" #include "../include/usb_ops.h" #include "../include/wifi.h" +#include "../include/rtl8188e_recv.h" static u8 SNAP_ETH_TYPE_IPX [2 ] = {0x81 ,0x37 };static u8 SNAP_ETH_TYPE_APPLETALK_AARP [2 ] = {0x80 ,0xf3 };
@@ -82,7 +83,7 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)sema_init (&precvpriv->allrxreturnevt,0 ); - res =rtw_hal_init_recv_priv (padapter); + res =rtl8188eu_init_recv_priv (padapter);timer_setup (&precvpriv->signal_stat_timer, rtw_signal_stat_timer_hdl,0 ); precvpriv->signal_stat_sampling_interval =1000 ;/* ms */
drivers/staging/r8188eu/hal/hal_intf.c +0 -8
@@ -72,14 +72,6 @@ u32 rtw_hal_inirp_deinit(struct adapter *adapt)return _FAIL; } -s32 rtw_hal_init_recv_priv (struct adapter *adapt) -{ -if (adapt->HalFunc.init_recv_priv) -return adapt->HalFunc.init_recv_priv (adapt); - -return _FAIL; -} -void rtw_hal_free_recv_priv (struct adapter *adapt) {if (adapt->HalFunc.free_recv_priv)
drivers/staging/r8188eu/hal/usb_halinit.c +0 -1
@@ -2153,7 +2153,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->inirp_init = &rtl8188eu_inirp_init; halfunc->inirp_deinit = &rtl8188eu_inirp_deinit; - halfunc->init_recv_priv = &rtl8188eu_init_recv_priv; halfunc->free_recv_priv = &rtl8188eu_free_recv_priv; halfunc->SetHwRegHandler = &SetHwReg8188EU;
drivers/staging/r8188eu/include/hal_intf.h +0 -2
@@ -128,7 +128,6 @@ struct hal_ops {u32 (*inirp_init)(struct adapter *padapter);u32 (*inirp_deinit)(struct adapter *padapter); -s32 (*init_recv_priv)(struct adapter *padapter);void (*free_recv_priv)(struct adapter *padapter); void (*SetHwRegHandler)(struct adapter *padapter, u8 variable,
@@ -186,7 +185,6 @@ void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val);u32 rtw_hal_inirp_init (struct adapter *padapter);u32 rtw_hal_inirp_deinit (struct adapter *padapter); -s32 rtw_hal_init_recv_priv (struct adapter *padapter);void rtw_hal_free_recv_priv (struct adapter *padapter);void rtw_hal_update_ra_mask (struct adapter *padapter,u32 mac_id,u8 level);
Signature · 1 line
2.33.0
PATCH 5/7 staging: r8188eu: remove free_recv_priv from struct hal_ops
In reply to Michael StraubeRemove free_recv_priv from struct hal_ops and remove its wrapper rtw_hal_free_recv_priv(). Call rtl8188eu_free_recv_priv() directly instead.
--- drivers/staging/r8188eu/core/rtw_recv.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/usb_halinit.c | 2 -- drivers/staging/r8188eu/include/hal_intf.h | 4 ---- 4 files changed, 1 insertion(+), 13 deletions(-)
drivers/staging/r8188eu/core/rtw_recv.c +1 -1
@@ -104,7 +104,7 @@ void _rtw_free_recv_priv(struct recv_priv *precvpriv)vfree (precvpriv->pallocated_frame_buf); -rtw_hal_free_recv_priv (padapter); +rtl8188eu_free_recv_priv (padapter); }struct recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -72,12 +72,6 @@ u32 rtw_hal_inirp_deinit(struct adapter *adapt)return _FAIL; } -void rtw_hal_free_recv_priv (struct adapter *adapt) -{ -if (adapt->HalFunc.free_recv_priv) - adapt->HalFunc.free_recv_priv (adapt); -} -void rtw_hal_update_ra_mask (struct adapter *adapt,u32 mac_id,u8 rssi_level) {struct mlme_priv *pmlmepriv = &adapt->mlmepriv;
drivers/staging/r8188eu/hal/usb_halinit.c +0 -2
@@ -2153,8 +2153,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->inirp_init = &rtl8188eu_inirp_init; halfunc->inirp_deinit = &rtl8188eu_inirp_deinit; - halfunc->free_recv_priv = &rtl8188eu_free_recv_priv; - halfunc->SetHwRegHandler = &SetHwReg8188EU; halfunc->GetHwRegHandler = &GetHwReg8188EU; }
drivers/staging/r8188eu/include/hal_intf.h +0 -4
@@ -128,8 +128,6 @@ struct hal_ops {u32 (*inirp_init)(struct adapter *padapter);u32 (*inirp_deinit)(struct adapter *padapter); -void (*free_recv_priv)(struct adapter *padapter); -void (*SetHwRegHandler)(struct adapter *padapter,u8 variable,u8 *val); void (*GetHwRegHandler)(struct adapter *padapter, u8 variable,
@@ -185,8 +183,6 @@ void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val);u32 rtw_hal_inirp_init (struct adapter *padapter);u32 rtw_hal_inirp_deinit (struct adapter *padapter); -void rtw_hal_free_recv_priv (struct adapter *padapter); -void rtw_hal_update_ra_mask (struct adapter *padapter,u32 mac_id,u8 level);void rtw_hal_clone_data (struct adapter *dst_adapt,struct adapter *src_adapt);
Signature · 1 line
2.33.0
PATCH 6/7 staging: r8188eu: remove inirp_init from struct hal_ops
In reply to Michael StraubeRemove inirp_init from struct hal_ops and remove its wrapper rtw_hal_inirp_init(). Call rtl8188eu_inirp_init() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 11 ----------- drivers/staging/r8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/r8188eu/include/hal_intf.h | 4 ++-- drivers/staging/r8188eu/os_dep/usb_intf.c | 2 +- 4 files changed, 4 insertions(+), 16 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -11
@@ -53,17 +53,6 @@ void rtw_hal_get_hwreg(struct adapter *adapt, u8 variable, u8 *val) adapt->HalFunc.GetHwRegHandler (adapt, variable, val); } -u32 rtw_hal_inirp_init (struct adapter *adapt) -{ -u32 rst = _FAIL; - -if (adapt->HalFunc.inirp_init) - rst = adapt->HalFunc.inirp_init (adapt); -else -DBG_88E (" %s HalFunc.inirp_init is NULL!!!\n" , __func__); -return rst; -} -u32 rtw_hal_inirp_deinit (struct adapter *adapt) {if (adapt->HalFunc.inirp_deinit)
drivers/staging/r8188eu/hal/usb_halinit.c +1 -2
@@ -997,7 +997,7 @@ static u32 rtl8188eu_hal_deinit(struct adapter *Adapter)return _SUCCESS; } -static unsigned int rtl8188eu_inirp_init (struct adapter *Adapter) +unsigned int rtl8188eu_inirp_init (struct adapter *Adapter) {u8 i;struct recv_buf *precvbuf;
@@ -2150,7 +2150,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->hal_init = &rtl8188eu_hal_init; halfunc->hal_deinit = &rtl8188eu_hal_deinit; - halfunc->inirp_init = &rtl8188eu_inirp_init; halfunc->inirp_deinit = &rtl8188eu_inirp_deinit; halfunc->SetHwRegHandler = &SetHwReg8188EU;
drivers/staging/r8188eu/include/hal_intf.h +2 -2
@@ -125,7 +125,6 @@ struct hal_ops {u32 (*hal_init)(struct adapter *padapter);u32 (*hal_deinit)(struct adapter *padapter); -u32 (*inirp_init)(struct adapter *padapter);u32 (*inirp_deinit)(struct adapter *padapter); void (*SetHwRegHandler)(struct adapter *padapter, u8 variable,
@@ -174,13 +173,14 @@ int rtl8188e_IOL_exec_cmds_sync(struct adapter *adapter,u8 SetHalDefVar8188EUsb (struct adapter *Adapter,enum hal_def_variable eVariable,void *pValue);u8 GetHalDefVar8188EUsb (struct adapter *Adapter,enum hal_def_variable eVariable,void *pValue); +unsigned int rtl8188eu_inirp_init (struct adapter *Adapter); +uint rtw_hal_init (struct adapter *padapter);uint rtw_hal_deinit (struct adapter *padapter);void rtw_hal_stop (struct adapter *padapter);void rtw_hal_set_hwreg (struct adapter *padapter,u8 variable,u8 *val);void rtw_hal_get_hwreg (struct adapter *padapter,u8 variable,u8 *val); -u32 rtw_hal_inirp_init (struct adapter *padapter);u32 rtw_hal_inirp_deinit (struct adapter *padapter);void rtw_hal_update_ra_mask (struct adapter *padapter,u32 mac_id,u8 level);
drivers/staging/r8188eu/os_dep/usb_intf.c +1 -1
@@ -180,7 +180,7 @@ static void chip_by_usb_id(struct adapter *padapter)static void usb_intf_start (struct adapter *padapter) { -rtw_hal_inirp_init (padapter); +rtl8188eu_inirp_init (padapter); }static void usb_intf_stop (struct adapter *padapter)
Signature · 1 line
2.33.0
PATCH 7/7 staging: r8188eu: remove inirp_deinit from struct hal_ops
In reply to Michael StraubeRemove inirp_deinit from struct hal_ops and remove the wrappers rtw_hal_inirp_deinit() and rtl8188eu_inirp_deinit(). Call rtw_read_port_cancel() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 8 -------- drivers/staging/r8188eu/hal/usb_halinit.c | 9 --------- drivers/staging/r8188eu/include/hal_intf.h | 4 ---- drivers/staging/r8188eu/os_dep/usb_intf.c | 2 +- 4 files changed, 1 insertion(+), 22 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -8
@@ -53,14 +53,6 @@ void rtw_hal_get_hwreg(struct adapter *adapt, u8 variable, u8 *val) adapt->HalFunc.GetHwRegHandler (adapt, variable, val); } -u32 rtw_hal_inirp_deinit (struct adapter *adapt) -{ -if (adapt->HalFunc.inirp_deinit) -return adapt->HalFunc.inirp_deinit (adapt); - -return _FAIL; -} -void rtw_hal_update_ra_mask (struct adapter *adapt,u32 mac_id,u8 rssi_level) {struct mlme_priv *pmlmepriv = &adapt->mlmepriv;
drivers/staging/r8188eu/hal/usb_halinit.c +0 -9
@@ -1024,13 +1024,6 @@ unsigned int rtl8188eu_inirp_init(struct adapter *Adapter)return status; } -static unsigned int rtl8188eu_inirp_deinit (struct adapter *Adapter) -{ -rtw_read_port_cancel (Adapter); - -return _SUCCESS; -} -/* */ /* */ /* EEPROM/EFUSE Content Parsing */
@@ -2150,8 +2143,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->hal_init = &rtl8188eu_hal_init; halfunc->hal_deinit = &rtl8188eu_hal_deinit; - halfunc->inirp_deinit = &rtl8188eu_inirp_deinit; - halfunc->SetHwRegHandler = &SetHwReg8188EU; halfunc->GetHwRegHandler = &GetHwReg8188EU; }
drivers/staging/r8188eu/include/hal_intf.h +0 -4
@@ -125,8 +125,6 @@ struct hal_ops {u32 (*hal_init)(struct adapter *padapter);u32 (*hal_deinit)(struct adapter *padapter); -u32 (*inirp_deinit)(struct adapter *padapter); -void (*SetHwRegHandler)(struct adapter *padapter,u8 variable,u8 *val); void (*GetHwRegHandler)(struct adapter *padapter, u8 variable,
@@ -181,8 +179,6 @@ void rtw_hal_stop(struct adapter *padapter);void rtw_hal_set_hwreg (struct adapter *padapter,u8 variable,u8 *val);void rtw_hal_get_hwreg (struct adapter *padapter,u8 variable,u8 *val); -u32 rtw_hal_inirp_deinit (struct adapter *padapter); -void rtw_hal_update_ra_mask (struct adapter *padapter,u32 mac_id,u8 level);void rtw_hal_clone_data (struct adapter *dst_adapt,struct adapter *src_adapt);
drivers/staging/r8188eu/os_dep/usb_intf.c +1 -1
@@ -186,7 +186,7 @@ static void usb_intf_start(struct adapter *padapter)static void usb_intf_stop (struct adapter *padapter) {/* cancel in irp */ -rtw_hal_inirp_deinit (padapter); +rtw_read_port_cancel (padapter);/* cancel out irp */ rtw_write_port_cancel (padapter);
Signature · 1 line
2.33.0