staging: r8188eu: remove function pointers from struct hal_ops
v3 cover staging: r8188eu: remove function pointers from struct hal_ops
In order to get rid of the HAL layer this series removes the next bunch of function pointers from struct hal_ops.
Also it removes some empty functions and cleans up some minor style issues I stumbled upon.
Tested on x86_64 with Inter-Tech DMG-02.
v1 -> v2
Fixed typos in commit messages.
v2 -> v3
Added this missing patchset version changelog.
Michael Straube (40):
staging: r8188eu: remove InitSwLeds from hal_ops
staging: r8188eu: remove DeInitSwLeds from hal_ops
staging: r8188eu: remove dm_init from hal_ops
staging: r8188eu: remove dm_deinit from hal_ops
staging: r8188eu: remove SetHalODMVarHandler from hal_ops
staging: r8188eu: remove empty functions
staging: r8188eu: remove unused function rtw_interface_ps_func()
staging: r8188eu: remove interface_ps_func from hal_ops
staging: r8188eu: remove hal_dm_watchdog from hal_ops
staging: r8188eu: remove set_bwmode_handler from hal_ops
staging: r8188eu: remove set_channel_handler from hal_ops
staging: r8188eu: remove unused enum hal_intf_ps_func
staging: r8188eu: remove Add_RateATid from hal_ops
staging: r8188eu: remove hal_power_on from hal_ops
staging: r8188eu: remove sreset_init_value from hal_ops
staging: r8188eu: remove sreset_reset_value from hal_ops
staging: r8188eu: remove silentreset from hal_ops
staging: r8188eu: remove sreset_xmit_status_check from hal_ops
staging: r8188eu: remove sreset_linked_status_check from hal_ops
staging: r8188eu: remove sreset_get_wifi_status from hal_ops
staging: r8188eu: remove EfusePowerSwitch from hal_ops
staging: r8188eu: rename hal_EfusePowerSwitch_RTL8188E()
staging: r8188eu: remove wrapper Efuse_PowerSwitch()
staging: r8188eu: remove ReadEFuse from hal_ops
staging: r8188eu: remove EFUSEGetEfuseDefinition from hal_ops
staging: r8188eu: remove EfuseGetCurrentSize from hal_ops
staging: r8188eu: remove empty comments
staging: r8188eu: remove Efuse_PgPacketRead from hal_ops
staging: r8188eu: remove Efuse_PgPacketWrite from hal_ops
staging: r8188eu: remove Efuse_WordEnableDataWrite from hal_ops
staging: r8188eu: remove useless assignment
staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops
staging: r8188eu: remove AntDivCompareHandler from hal_ops
staging: r8188eu: remove empty function rtl8188e_start_thread()
staging: r8188eu: remove empty function rtl8188e_stop_thread()
staging: r8188eu: remove hal_notch_filter from hal_ops
staging: r8188eu: remove free_hal_data from hal_ops
staging: r8188eu: remove unused function rtl8188e_clone_haldata()
staging: r8188eu: remove SetBeaconRelatedRegistersHandler from hal_ops
staging: r8188eu: remove UpdateHalRAMask8188EUsb from hal_ops
drivers/staging/r8188eu/core/rtw_ap.c | 9 +- drivers/staging/r8188eu/core/rtw_cmd.c | 6 +- drivers/staging/r8188eu/core/rtw_efuse.c | 182 ++++-------------- drivers/staging/r8188eu/core/rtw_mlme.c | 7 +- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 5 +- drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 18 +- drivers/staging/r8188eu/core/rtw_p2p.c | 4 +- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 8 - drivers/staging/r8188eu/core/rtw_sta_mgt.c | 2 +- drivers/staging/r8188eu/core/rtw_wlan_util.c | 8 +- drivers/staging/r8188eu/hal/hal_intf.c | 170 +--------------- .../staging/r8188eu/hal/rtl8188e_hal_init.c | 123 +++--------- drivers/staging/r8188eu/hal/usb_halinit.c | 36 +--- drivers/staging/r8188eu/include/hal_intf.h | 123 ++---------- .../staging/r8188eu/include/rtl8188e_hal.h | 5 - drivers/staging/r8188eu/include/rtw_efuse.h | 9 - drivers/staging/r8188eu/include/rtw_pwrctrl.h | 2 - drivers/staging/r8188eu/os_dep/ioctl_linux.c | 31 +-- drivers/staging/r8188eu/os_dep/os_intfs.c | 21 +- 19 files changed, 142 insertions(+), 627 deletions(-)
Signature · 1 line
2.33.0
PATCH v3 1/40 staging: r8188eu: remove InitSwLeds from hal_ops
Remove InitSwLeds from hal_ops and remove its wrapper rtw_hal_sw_led_init(). Call rtl8188eu_InitSwLeds() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/usb_halinit.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 2 -- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 3 ++- drivers/staging/r8188eu/os_dep/os_intfs.c | 4 ++-- 5 files changed, 4 insertions(+), 12 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -25,12 +25,6 @@ void rtw_hal_dm_deinit(struct adapter *adapt) adapt->HalFunc.dm_deinit (adapt); } -void rtw_hal_sw_led_init (struct adapter *adapt) -{ -if (adapt->HalFunc.InitSwLeds) - adapt->HalFunc.InitSwLeds (adapt); -} -void rtw_hal_sw_led_deinit (struct adapter *adapt) {if (adapt->HalFunc.DeInitSwLeds)
drivers/staging/r8188eu/hal/usb_halinit.c +0 -1
@@ -2246,7 +2246,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->init_recv_priv = &rtl8188eu_init_recv_priv; halfunc->free_recv_priv = &rtl8188eu_free_recv_priv; - halfunc->InitSwLeds = &rtl8188eu_InitSwLeds; halfunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds; halfunc->SetHwRegHandler = &SetHwReg8188EU;
drivers/staging/r8188eu/include/hal_intf.h +0 -2
@@ -143,7 +143,6 @@ struct hal_ops {s32 (*init_recv_priv)(struct adapter *padapter);void (*free_recv_priv)(struct adapter *padapter); -void (*InitSwLeds)(struct adapter *padapter);void (*DeInitSwLeds)(struct adapter *padapter);void (*dm_init)(struct adapter *padapter);
@@ -256,7 +255,6 @@ void rtw_hal_free_data(struct adapter *padapter);void rtw_hal_dm_init (struct adapter *padapter);void rtw_hal_dm_deinit (struct adapter *padapter); -void rtw_hal_sw_led_init (struct adapter *padapter);void rtw_hal_sw_led_deinit (struct adapter *padapter);u32 rtw_hal_power_on (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/ioctl_linux.c +2 -1
@@ -15,6 +15,7 @@#include "../include/rtw_mp_ioctl.h" #include "../include/usb_ops.h" #include "../include/rtl8188e_hal.h" +#include "../include/rtl8188e_led.h" #include "../include/rtw_mp.h" #include "../include/rtw_iol.h"
@@ -3845,7 +3846,7 @@ static int rtw_rereg_nd_name(struct net_device *dev,if (!memcmp (rereg_priv->old_ifname,"disable%d" ,9 )) { padapter->ledpriv.bRegUseLed = rereg_priv->old_bRegUseLed; -rtw_hal_sw_led_init (padapter); +rtl8188eu_InitSwLeds (padapter);rtw_ips_mode_req (&padapter->pwrctrlpriv, rereg_priv->old_ips_mode); }
drivers/staging/r8188eu/os_dep/os_intfs.c +2 -2
@@ -9,9 +9,9 @@#include "../include/recv_osdep.h" #include "../include/hal_intf.h" #include "../include/rtw_ioctl.h" -#include "../include/usb_osintf.h" #include "../include/rtw_br_ext.h" +#include "../include/rtl8188e_led.h" MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Realtek Wireless Lan Driver" );
@@ -887,7 +887,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter) ret8 =rtw_init_default_value (padapter);rtw_hal_dm_init (padapter); -rtw_hal_sw_led_init (padapter); +rtl8188eu_InitSwLeds (padapter);rtw_hal_sreset_init (padapter);
Signature · 1 line
2.33.0
PATCH v3 2/40 staging: r8188eu: remove DeInitSwLeds from hal_ops
In reply to Michael StraubeRemove DeInitSwLeds from hal_ops and remove its wrapper rtw_hal_sw_led_deinit(). Call rtl8188eu_DeInitSwLeds() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/usb_halinit.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 3 --- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 +- drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 5 files changed, 2 insertions(+), 12 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -25,12 +25,6 @@ void rtw_hal_dm_deinit(struct adapter *adapt) adapt->HalFunc.dm_deinit (adapt); } -void rtw_hal_sw_led_deinit (struct adapter *adapt) -{ -if (adapt->HalFunc.DeInitSwLeds) - adapt->HalFunc.DeInitSwLeds (adapt); -} -u32 rtw_hal_power_on (struct adapter *adapt) {if (adapt->HalFunc.hal_power_on)
drivers/staging/r8188eu/hal/usb_halinit.c +0 -1
@@ -2246,7 +2246,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->init_recv_priv = &rtl8188eu_init_recv_priv; halfunc->free_recv_priv = &rtl8188eu_free_recv_priv; - halfunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds; halfunc->SetHwRegHandler = &SetHwReg8188EU; halfunc->GetHwRegHandler = &GetHwReg8188EU;
drivers/staging/r8188eu/include/hal_intf.h +0 -3
@@ -143,8 +143,6 @@ struct hal_ops {s32 (*init_recv_priv)(struct adapter *padapter);void (*free_recv_priv)(struct adapter *padapter); -void (*DeInitSwLeds)(struct adapter *padapter); -void (*dm_init)(struct adapter *padapter);void (*dm_deinit)(struct adapter *padapter);
@@ -255,7 +253,6 @@ void rtw_hal_free_data(struct adapter *padapter);void rtw_hal_dm_init (struct adapter *padapter);void rtw_hal_dm_deinit (struct adapter *padapter); -void rtw_hal_sw_led_deinit (struct adapter *padapter);u32 rtw_hal_power_on (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/ioctl_linux.c +1 -1
@@ -3862,7 +3862,7 @@ static int rtw_rereg_nd_name(struct net_device *dev,rtw_led_control (padapter,LED_CTL_POWER_OFF ); rereg_priv->old_bRegUseLed = padapter->ledpriv.bRegUseLed; padapter->ledpriv.bRegUseLed = false; -rtw_hal_sw_led_deinit (padapter); +rtl8188eu_DeInitSwLeds (padapter);/* the interface is being "disabled", we can do deeper IPS */ rereg_priv->old_ips_mode =rtw_get_ips_mode_req (&padapter->pwrctrlpriv);
drivers/staging/r8188eu/os_dep/os_intfs.c +1 -1
@@ -906,7 +906,7 @@ void rtw_cancel_all_timer(struct adapter *padapter)_cancel_timer_ex (&padapter->mlmepriv.dynamic_chk_timer);/* cancel sw led timer */ -rtw_hal_sw_led_deinit (padapter); +rtl8188eu_DeInitSwLeds (padapter);_cancel_timer_ex (&padapter->pwrctrlpriv.pwr_state_check_timer);
Signature · 1 line
2.33.0
PATCH v3 3/40 staging: r8188eu: remove dm_init from hal_ops
In reply to Michael StraubeRemove dm_init from hal_ops and remove its wrapper rtw_hal_dm_init(). Call rtl8188e_init_dm_priv() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 2 -- drivers/staging/r8188eu/os_dep/os_intfs.c | 3 ++- 4 files changed, 2 insertions(+), 10 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -12,12 +12,6 @@ void rtw_hal_free_data(struct adapter *adapt) adapt->HalFunc.free_hal_data (adapt); } -void rtw_hal_dm_init (struct adapter *adapt) -{ -if (adapt->HalFunc.dm_init) - adapt->HalFunc.dm_init (adapt); -} -void rtw_hal_dm_deinit (struct adapter *adapt) {/* cancel dm timer */
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1784,7 +1784,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) { pHalFunc->free_hal_data = &rtl8188e_free_hal_data; - pHalFunc->dm_init = &rtl8188e_init_dm_priv; pHalFunc->dm_deinit = &rtl8188e_deinit_dm_priv; pHalFunc->set_bwmode_handler = &PHY_SetBWMode8188E;
drivers/staging/r8188eu/include/hal_intf.h +0 -2
@@ -143,7 +143,6 @@ struct hal_ops {s32 (*init_recv_priv)(struct adapter *padapter);void (*free_recv_priv)(struct adapter *padapter); -void (*dm_init)(struct adapter *padapter);void (*dm_deinit)(struct adapter *padapter); void (*set_bwmode_handler)(struct adapter *padapter,
@@ -251,7 +250,6 @@ void rtl8188eu_init_default_value(struct adapter *adapt);void rtw_hal_free_data (struct adapter *padapter); -void rtw_hal_dm_init (struct adapter *padapter);void rtw_hal_dm_deinit (struct adapter *padapter);u32 rtw_hal_power_on (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/os_intfs.c +2 -1
@@ -12,6 +12,7 @@#include "../include/usb_osintf.h" #include "../include/rtw_br_ext.h" #include "../include/rtl8188e_led.h" +#include "../include/rtl8188e_dm.h" MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Realtek Wireless Lan Driver" );
@@ -886,7 +887,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter) ret8 =rtw_init_default_value (padapter); -rtw_hal_dm_init (padapter); +rtl8188e_init_dm_priv (padapter);rtl8188eu_InitSwLeds (padapter);rtw_hal_sreset_init (padapter);
Signature · 1 line
2.33.0
PATCH v3 4/40 staging: r8188eu: remove dm_deinit from hal_ops
In reply to Michael StraubeRemove dm_deinit from hal_ops and remove its wrapper rtw_hal_dm_deinit(). Call rtl8188e_deinit_dm_priv() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 7 ------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/r8188eu/include/hal_intf.h | 4 ---- drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 4 files changed, 1 insertion(+), 14 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -7
@@ -12,13 +12,6 @@ void rtw_hal_free_data(struct adapter *adapt) adapt->HalFunc.free_hal_data (adapt); } -void rtw_hal_dm_deinit (struct adapter *adapt) -{ -/* cancel dm timer */ -if (adapt->HalFunc.dm_deinit) - adapt->HalFunc.dm_deinit (adapt); -} -u32 rtw_hal_power_on (struct adapter *adapt) {if (adapt->HalFunc.hal_power_on)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -2
@@ -1784,8 +1784,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) { pHalFunc->free_hal_data = &rtl8188e_free_hal_data; - pHalFunc->dm_deinit = &rtl8188e_deinit_dm_priv; - pHalFunc->set_bwmode_handler = &PHY_SetBWMode8188E; pHalFunc->set_channel_handler = &PHY_SwChnl8188E;
drivers/staging/r8188eu/include/hal_intf.h +0 -4
@@ -143,8 +143,6 @@ struct hal_ops {s32 (*init_recv_priv)(struct adapter *padapter);void (*free_recv_priv)(struct adapter *padapter); -void (*dm_deinit)(struct adapter *padapter); -void (*set_bwmode_handler)(struct adapter *padapter,enum ht_channel_width Bandwidth,u8 Offset);
@@ -250,8 +248,6 @@ void rtl8188eu_init_default_value(struct adapter *adapt);void rtw_hal_free_data (struct adapter *padapter); -void rtw_hal_dm_deinit (struct adapter *padapter); -u32 rtw_hal_power_on (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);uint rtw_hal_deinit (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/os_intfs.c +1 -1
@@ -913,7 +913,7 @@ void rtw_cancel_all_timer(struct adapter *padapter)_cancel_timer_ex (&padapter->recvpriv.signal_stat_timer);/* cancel dm timer */ -rtw_hal_dm_deinit (padapter); +rtl8188e_deinit_dm_priv (padapter); }u8 rtw_free_drv_sw (struct adapter *padapter)
Signature · 1 line
2.33.0
PATCH v3 5/40 staging: r8188eu: remove SetHalODMVarHandler from hal_ops
In reply to Michael StraubeRemove SetHalODMVarHandler from hal_ops and remove its wrapper rtw_hal_set_odm_var(). Call rtl8188e_SetHalODMVar() directly instead.
--- drivers/staging/r8188eu/core/rtw_ap.c | 4 ++-- drivers/staging/r8188eu/core/rtw_mlme.c | 4 ++-- drivers/staging/r8188eu/core/rtw_p2p.c | 4 ++-- drivers/staging/r8188eu/core/rtw_sta_mgt.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 9 --------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 +--- drivers/staging/r8188eu/include/hal_intf.h | 10 ++-------- 7 files changed, 10 insertions(+), 27 deletions(-)
drivers/staging/r8188eu/core/rtw_ap.c +2 -2
@@ -453,7 +453,7 @@ void update_bmc_sta(struct adapter *padapter) init_rate =get_highest_rate_idx (tx_ra_bitmap &0x0fffffff ) &0x3f ;/* ap mode */ -rtw_hal_set_odm_var (padapter,HAL_ODM_STA_INFO , psta, true); +rtl8188e_SetHalODMVar (padapter,HAL_ODM_STA_INFO , psta, true); {u8 arg =0 ;
@@ -505,7 +505,7 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)DBG_88E ("%s\n" , __func__);/* ap mode */ -rtw_hal_set_odm_var (padapter,HAL_ODM_STA_INFO , psta, true); +rtl8188e_SetHalODMVar (padapter,HAL_ODM_STA_INFO , psta, true);if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) psta->ieee8021x_blocked = true;
drivers/staging/r8188eu/core/rtw_mlme.c +2 -2
@@ -984,7 +984,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str psta->aid = pnetwork->join_res; psta->mac_id =0 ;/* sta mode */ -rtw_hal_set_odm_var (padapter,HAL_ODM_STA_INFO , psta, true); +rtl8188e_SetHalODMVar (padapter,HAL_ODM_STA_INFO , psta, true);/* security related */ if (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) { padapter->securitypriv.binstallGrpkey = false;
@@ -1276,7 +1276,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf) psta->mac_id = (uint )pstassoc->cam_id;DBG_88E ("%s\n" , __func__);/* for ad-hoc mode */ -rtw_hal_set_odm_var (adapter,HAL_ODM_STA_INFO , psta, true); +rtl8188e_SetHalODMVar (adapter,HAL_ODM_STA_INFO , psta, true);rtw_sta_media_status_rpt (adapter, psta,1 );if (adapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) psta->dot118021XPrivacy = adapter->securitypriv.dot11PrivacyAlgrthm;
drivers/staging/r8188eu/core/rtw_p2p.c +2 -2
@@ -1955,7 +1955,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)/* Enable P2P function */ init_wifidirect_info (padapter, role); -rtw_hal_set_odm_var (padapter,HAL_ODM_P2P_STATE ,NULL , true); +rtl8188e_SetHalODMVar (padapter,HAL_ODM_P2P_STATE ,NULL , true); }else if (role ==P2P_ROLE_DISABLE ) {if (_FAIL ==rtw_pwr_wakeup (padapter)) { ret = _FAIL;
@@ -1974,7 +1974,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)memset (&pwdinfo->rx_prov_disc_info,0x00 ,sizeof (struct rx_provdisc_req_info )); } -rtw_hal_set_odm_var (padapter,HAL_ODM_P2P_STATE ,NULL , false); +rtl8188e_SetHalODMVar (padapter,HAL_ODM_P2P_STATE ,NULL , false);/* Restore to initial setting. */ update_tx_basic_rate (padapter, padapter->registrypriv.wireless_mode);
drivers/staging/r8188eu/core/rtw_sta_mgt.c +1 -1
@@ -320,7 +320,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta) }if (!(psta->state &WIFI_AP_STATE )) -rtw_hal_set_odm_var (padapter,HAL_ODM_STA_INFO , psta, false); +rtl8188e_SetHalODMVar (padapter,HAL_ODM_STA_INFO , psta, false);#ifdef CONFIG_88EU_AP_MODE
drivers/staging/r8188eu/hal/hal_intf.c +0 -9
@@ -82,15 +82,6 @@ u8 rtw_hal_get_def_var(struct adapter *adapt,return _FAIL; } -void rtw_hal_set_odm_var (struct adapter *adapt, -enum hal_odm_variable var,void *val1, -bool set) -{ -if (adapt->HalFunc.SetHalODMVarHandler) - adapt->HalFunc.SetHalODMVarHandler (adapt, var, - val1, set); -} -u32 rtw_hal_inirp_init (struct adapter *adapt) {u32 rst = _FAIL;
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +1 -3
@@ -1728,7 +1728,7 @@ void rtl8188e_read_chip_version(struct adapter *padapter)MSG_88E ("RF_Type is %x!!\n" , pHalData->rf_type); } -static void rtl8188e_SetHalODMVar (struct adapter *Adapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet) +void rtl8188e_SetHalODMVar (struct adapter *Adapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet) {struct hal_data_8188e *pHalData =GET_HAL_DATA (Adapter);struct odm_dm_struct *podmpriv = &pHalData->odmpriv;
@@ -1816,8 +1816,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->sreset_linked_status_check = &rtl8188e_sreset_linked_status_check; pHalFunc->sreset_get_wifi_status = &sreset_get_wifi_status; - pHalFunc->SetHalODMVarHandler = &rtl8188e_SetHalODMVar; - pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync; pHalFunc->hal_notch_filter = &hal_notch_filter_8188e;
drivers/staging/r8188eu/include/hal_intf.h +2 -8
@@ -162,10 +162,6 @@ struct hal_ops {enum hal_def_variable eVariable, void *pValue); -void (*SetHalODMVarHandler)(struct adapter *padapter, -enum hal_odm_variable eVariable, -void *pValue1,bool bSet); -void (*UpdateRAMaskHandler)(struct adapter *padapter,u32 mac_id,u8 rssi_level);void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter);
@@ -245,6 +241,8 @@ void rtl8188eu_set_hal_ops(struct adapter *padapter);void rtl8188eu_interface_configure (struct adapter *adapt);void ReadAdapterInfo8188EU (struct adapter *Adapter);void rtl8188eu_init_default_value (struct adapter *adapt); +void rtl8188e_SetHalODMVar (struct adapter *Adapter, +enum hal_odm_variable eVariable,void *pValue1,bool bSet);void rtw_hal_free_data (struct adapter *padapter);
@@ -260,10 +258,6 @@ u8 rtw_hal_set_def_var(struct adapter *padapter,u8 rtw_hal_get_def_var (struct adapter *padapter,enum hal_def_variable eVariable,void *pValue); -void rtw_hal_set_odm_var (struct adapter *padapter, -enum hal_odm_variable eVariable,void *pValue1, -bool bSet); -u32 rtw_hal_inirp_init (struct adapter *padapter);u32 rtw_hal_inirp_deinit (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v3 6/40 staging: r8188eu: remove empty functions
In reply to Michael StraubeRemove the following empty functions.
Hal_InitChannelPlan()Hal_CustomizeByCustomerID_8188EU()_InitBeaconMaxError()
--- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 ---- drivers/staging/r8188eu/hal/usb_halinit.c | 15 --------------- drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 - 3 files changed, 20 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -4
@@ -2242,10 +2242,6 @@ void Hal_ReadThermalMeter_88E(struct adapter *Adapter, u8 *PROMContent, bool AutDBG_88E ("ThermalMeter = 0x%x\n" , pHalData->EEPROMThermalMeter); } -void Hal_InitChannelPlan (struct adapter *padapter) -{ -} -bool HalDetectPwrDownMode88E (struct adapter *Adapter) {u8 tmpvalue =0 ;
drivers/staging/r8188eu/hal/usb_halinit.c +0 -15
@@ -403,10 +403,6 @@ static void _InitEDCA(struct adapter *Adapter)rtw_write32 (Adapter,REG_EDCA_VO_PARAM ,0x002FA226 ); } -static void _InitBeaconMaxError (struct adapter *Adapter,bool InfraMode) -{ -} -static void _InitHWLed (struct adapter *Adapter) {struct led_priv *pledpriv = &Adapter->ledpriv;
@@ -819,7 +815,6 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)InitUsbAggregationSetting (Adapter);_InitOperationMode (Adapter);/* todo */ _InitBeaconParameters (Adapter); -_InitBeaconMaxError (Adapter, true);/* */ /* Init CR MACTXEN, MACRXEN after setting RxFF boundary REG_TRXFF_BNDY to patch */
@@ -1140,10 +1135,6 @@ static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool } } -static void Hal_CustomizeByCustomerID_8188EU (struct adapter *adapt) -{ -} -static void readAdapterInfo_8188EU ( struct adapter *adapt
@@ -1166,12 +1157,6 @@ readAdapterInfo_8188EU(Hal_EfuseParseBoardType88E (adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag);Hal_ReadThermalMeter_88E (adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag); -/* */ -/* The following part initialize some vars by PG info. */ -/* */ -Hal_InitChannelPlan (adapt); -Hal_CustomizeByCustomerID_8188EU (adapt); -_ReadLEDSetting (adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag); }
drivers/staging/r8188eu/include/rtl8188e_hal.h +0 -1
@@ -434,7 +434,6 @@ void Hal_ReadPowerSavingMode88E(struct adapter *pAdapter, u8 *hwinfo,bool HalDetectPwrDownMode88E (struct adapter *Adapter); -void Hal_InitChannelPlan (struct adapter *padapter);void rtl8188e_set_hal_ops (struct hal_ops *pHalFunc);void rtl8188e_read_chip_version (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v3 7/40 staging: r8188eu: remove unused function rtw_interface_ps_func()
In reply to Michael StraubeRemove unused function rtw_interface_ps_func().
--- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 8 -------- drivers/staging/r8188eu/include/rtw_pwrctrl.h | 2 -- 2 files changed, 10 deletions(-)
drivers/staging/r8188eu/core/rtw_pwrctrl.c +0 -8
@@ -473,14 +473,6 @@ void rtw_free_pwrctrl_priv(struct adapter *adapter) } -u8 rtw_interface_ps_func (struct adapter *padapter,enum hal_intf_ps_func efunc_id,u8 *val) -{ -u8 bResult = true; -rtw_hal_intf_ps_func (padapter, efunc_id, val); - -return bResult; -} -inline void rtw_set_ips_deny (struct adapter *padapter,u32 ms) {struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
drivers/staging/r8188eu/include/rtw_pwrctrl.h +0 -2
@@ -251,8 +251,6 @@ s32 LPS_RF_ON_check(struct adapter *adapter, u32 delay_ms);void LPS_Enter (struct adapter *adapter);void LPS_Leave (struct adapter *adapter); -u8 rtw_interface_ps_func (struct adapter *adapter, -enum hal_intf_ps_func efunc_id,u8 *val);void rtw_set_ips_deny (struct adapter *adapter,u32 ms);int _rtw_pwr_wakeup (struct adapter *adapter,u32 ips_defer_ms,const char *caller);
Signature · 1 line
2.33.0
PATCH v3 8/40 staging: r8188eu: remove interface_ps_func from hal_ops
In reply to Michael StraubeRemove interface_ps_func from hal_ops from hal_ops and remove its wrapper rtw_hal_intf_ps_func() and the unused rtl8188eu_ps_func().
--- drivers/staging/r8188eu/hal/hal_intf.c | 9 --------- drivers/staging/r8188eu/hal/usb_halinit.c | 9 --------- drivers/staging/r8188eu/include/hal_intf.h | 5 ----- 3 files changed, 23 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -9
@@ -101,15 +101,6 @@ u32 rtw_hal_inirp_deinit(struct adapter *adapt)return _FAIL; } -u8 rtw_hal_intf_ps_func (struct adapter *adapt, -enum hal_intf_ps_func efunc_id,u8 *val) -{ -if (adapt->HalFunc.interface_ps_func) -return adapt->HalFunc.interface_ps_func (adapt, efunc_id, - val); -return _FAIL; -} -s32 rtw_hal_xmit (struct adapter *adapt,struct xmit_frame *pxmitframe) {if (adapt->HalFunc.hal_xmit)
drivers/staging/r8188eu/hal/usb_halinit.c +0 -9
@@ -2205,12 +2205,6 @@ void rtl8188eu_init_default_value(struct adapter *adapt) haldata->odmpriv.RFCalibrateInfo.ThermalValue_HP[i] =0 ; } -static u8 rtl8188eu_ps_func (struct adapter *Adapter,enum hal_intf_ps_func efunc_id,u8 *val) -{ -u8 bResult = true; -return bResult; -} -void rtl8188eu_set_hal_ops (struct adapter *adapt) {struct hal_ops *halfunc = &adapt->HalFunc;
@@ -2243,8 +2237,5 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->hal_xmit = &rtl8188eu_hal_xmit; halfunc->mgnt_xmit = &rtl8188eu_mgnt_xmit; - halfunc->interface_ps_func = &rtl8188eu_ps_func; -rtl8188e_set_hal_ops (halfunc); - }
drivers/staging/r8188eu/include/hal_intf.h +0 -5
@@ -175,8 +175,6 @@ struct hal_ops {void (*AntDivCompareHandler)(struct adapter *adapter,struct wlan_bssid_ex *dst,struct wlan_bssid_ex *src); -u8 (*interface_ps_func)(struct adapter *padapter, -enum hal_intf_ps_func efunc_id,u8 *val);s32 (*hal_xmit)(struct adapter *padapter,struct xmit_frame *pxmitframe);
@@ -261,9 +259,6 @@ u8 rtw_hal_get_def_var(struct adapter *padapter,u32 rtw_hal_inirp_init (struct adapter *padapter);u32 rtw_hal_inirp_deinit (struct adapter *padapter); -u8 rtw_hal_intf_ps_func (struct adapter *padapter, -enum hal_intf_ps_func efunc_id,u8 *val); -s32 rtw_hal_xmit (struct adapter *padapter,struct xmit_frame *pxmitframe);s32 rtw_hal_mgnt_xmit (struct adapter *padapter,struct xmit_frame *pmgntframe);
Signature · 1 line
2.33.0
PATCH v3 9/40 staging: r8188eu: remove hal_dm_watchdog from hal_ops
In reply to Michael StraubeRemove hal_dm_watchdog from hal_ops and remove its wrapper rtw_hal_dm_watchdog(). Call rtl8188e_HalDmWatchDog directly instead.
--- drivers/staging/r8188eu/core/rtw_cmd.c | 3 ++- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/r8188eu/include/hal_intf.h | 3 --- 4 files changed, 2 insertions(+), 12 deletions(-)
drivers/staging/r8188eu/core/rtw_cmd.c +2 -1
@@ -9,6 +9,7 @@#include "../include/mlme_osdep.h" #include "../include/rtw_br_ext.h" #include "../include/rtw_mlme_ext.h" +#include "../include/rtl8188e_dm.h" /* Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
@@ -1496,7 +1497,7 @@ static void dynamic_chk_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz)linked_status_chk (padapter);traffic_status_watchdog (padapter); -rtw_hal_dm_watchdog (padapter); +rtl8188e_HalDmWatchDog (padapter); }static void lps_ctrl_wk_hdl (struct adapter *padapter,u8 lps_ctrl_type)
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -229,12 +229,6 @@ void rtw_hal_set_chan(struct adapter *adapt, u8 channel) adapt->HalFunc.set_channel_handler (adapt, channel); } -void rtw_hal_dm_watchdog (struct adapter *adapt) -{ -if (adapt->HalFunc.hal_dm_watchdog) - adapt->HalFunc.hal_dm_watchdog (adapt); -} -void rtw_hal_bcn_related_reg_setting (struct adapter *adapt) {if (adapt->HalFunc.SetBeaconRelatedRegistersHandler)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -2
@@ -1787,8 +1787,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->set_bwmode_handler = &PHY_SetBWMode8188E; pHalFunc->set_channel_handler = &PHY_SwChnl8188E; - pHalFunc->hal_dm_watchdog = &rtl8188e_HalDmWatchDog; - pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid; pHalFunc->run_thread = &rtl8188e_start_thread; pHalFunc->cancel_thread = &rtl8188e_stop_thread;
drivers/staging/r8188eu/include/hal_intf.h +0 -3
@@ -148,8 +148,6 @@ struct hal_ops { u8 Offset);void (*set_channel_handler)(struct adapter *padapter,u8 channel); -void (*hal_dm_watchdog)(struct adapter *padapter); -void (*SetHwRegHandler)(struct adapter *padapter,u8 variable,u8 *val); void (*GetHwRegHandler)(struct adapter *padapter, u8 variable,
@@ -289,7 +287,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter,void rtw_hal_set_bwmode (struct adapter *padapter,enum ht_channel_width Bandwidth,u8 Offset);void rtw_hal_set_chan (struct adapter *padapter,u8 channel); -void rtw_hal_dm_watchdog (struct adapter *padapter);u8 rtw_hal_antdiv_before_linked (struct adapter *padapter); void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
Signature · 1 line
2.33.0
PATCH v3 10/40 staging: r8188eu: remove set_bwmode_handler from hal_ops
In reply to Michael StraubeRemove set_bwmode_handler from hal_ops and remove its wrapper rtw_hal_set_bwmode(). Call PHY_SetBWMode8188E() directly instead.
--- drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 8 -------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 5 ----- 4 files changed, 1 insertion(+), 15 deletions(-)
drivers/staging/r8188eu/core/rtw_wlan_util.c +1 -1
@@ -328,7 +328,7 @@ void SetBWMode(struct adapter *padapter, unsigned short bwmode,rtw_set_oper_bw (padapter, bwmode);rtw_set_oper_choffset (padapter, channel_offset); -rtw_hal_set_bwmode (padapter, (enum ht_channel_width )bwmode, channel_offset); +PHY_SetBWMode8188E (padapter, (enum ht_channel_width )bwmode, channel_offset); }void set_channel_bwmode (struct adapter *padapter,unsigned char channel,unsigned char channel_offset,unsigned short bwmode)
drivers/staging/r8188eu/hal/hal_intf.c +0 -8
@@ -215,14 +215,6 @@ void rtw_hal_write_rfreg(struct adapter *adapt, enum rf_radio_path rfpath, bitmask, data); } -void rtw_hal_set_bwmode (struct adapter *adapt, -enum ht_channel_width bandwidth,u8 offset) -{ -if (adapt->HalFunc.set_bwmode_handler) - adapt->HalFunc.set_bwmode_handler (adapt, bandwidth, - offset); -} -void rtw_hal_set_chan (struct adapter *adapt,u8 channel) {if (adapt->HalFunc.set_channel_handler)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1784,7 +1784,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) { pHalFunc->free_hal_data = &rtl8188e_free_hal_data; - pHalFunc->set_bwmode_handler = &PHY_SetBWMode8188E; pHalFunc->set_channel_handler = &PHY_SwChnl8188E; pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid;
drivers/staging/r8188eu/include/hal_intf.h +0 -5
@@ -143,9 +143,6 @@ struct hal_ops {s32 (*init_recv_priv)(struct adapter *padapter);void (*free_recv_priv)(struct adapter *padapter); -void (*set_bwmode_handler)(struct adapter *padapter, -enum ht_channel_width Bandwidth, -u8 Offset);void (*set_channel_handler)(struct adapter *padapter,u8 channel); void (*SetHwRegHandler)(struct adapter *padapter, u8 variable,
@@ -284,8 +281,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter, enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -void rtw_hal_set_bwmode (struct adapter *padapter, -enum ht_channel_width Bandwidth,u8 Offset);void rtw_hal_set_chan (struct adapter *padapter,u8 channel);u8 rtw_hal_antdiv_before_linked (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v3 11/40 staging: r8188eu: remove set_channel_handler from hal_ops
In reply to Michael StraubeRemove set_channel_handler from hal_ops and remove its wrapper rtw_hal_set_chan(). Call PHY_SwChnl8188E() directly instead.
--- drivers/staging/r8188eu/core/rtw_wlan_util.c | 4 ++-- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/r8188eu/include/hal_intf.h | 4 ---- 4 files changed, 2 insertions(+), 14 deletions(-)
drivers/staging/r8188eu/core/rtw_wlan_util.c +2 -2
@@ -318,7 +318,7 @@ void SelectChannel(struct adapter *padapter, unsigned char channel) {/* saved channel info */ rtw_set_oper_ch (padapter, channel); -rtw_hal_set_chan (padapter, channel); +PHY_SwChnl8188E (padapter, channel); } void SetBWMode(struct adapter *padapter, unsigned short bwmode,
@@ -359,7 +359,7 @@ void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsignertw_set_oper_bw (padapter, bwmode);rtw_set_oper_choffset (padapter, channel_offset); -rtw_hal_set_chan (padapter, center_ch);/* set center channel */ +PHY_SwChnl8188E (padapter, center_ch);/* set center channel */ SetBWMode (padapter, bwmode, channel_offset); }
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -215,12 +215,6 @@ void rtw_hal_write_rfreg(struct adapter *adapt, enum rf_radio_path rfpath, bitmask, data); } -void rtw_hal_set_chan (struct adapter *adapt,u8 channel) -{ -if (adapt->HalFunc.set_channel_handler) - adapt->HalFunc.set_channel_handler (adapt, channel); -} -void rtw_hal_bcn_related_reg_setting (struct adapter *adapt) {if (adapt->HalFunc.SetBeaconRelatedRegistersHandler)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -2
@@ -1784,8 +1784,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) { pHalFunc->free_hal_data = &rtl8188e_free_hal_data; - pHalFunc->set_channel_handler = &PHY_SwChnl8188E; - pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid; pHalFunc->run_thread = &rtl8188e_start_thread; pHalFunc->cancel_thread = &rtl8188e_stop_thread;
drivers/staging/r8188eu/include/hal_intf.h +0 -4
@@ -143,8 +143,6 @@ struct hal_ops {s32 (*init_recv_priv)(struct adapter *padapter);void (*free_recv_priv)(struct adapter *padapter); -void (*set_channel_handler)(struct adapter *padapter,u8 channel); -void (*SetHwRegHandler)(struct adapter *padapter,u8 variable,u8 *val); void (*GetHwRegHandler)(struct adapter *padapter, u8 variable,
@@ -281,8 +279,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter, enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -void rtw_hal_set_chan (struct adapter *padapter,u8 channel); -u8 rtw_hal_antdiv_before_linked (struct adapter *padapter); void rtw_hal_antdiv_rssi_compared(struct adapter *padapter, struct wlan_bssid_ex *dst,
Signature · 1 line
2.33.0
PATCH v3 12/40 staging: r8188eu: remove unused enum hal_intf_ps_func
In reply to Michael StraubeHAL_USB_SELECT_SUSPEND and HAL_MAX_ID are both unused, so enum hal_intf_ps_func can be removed.
--- drivers/staging/r8188eu/include/hal_intf.h | 5 ----- 1 file changed, 5 deletions(-)
drivers/staging/r8188eu/include/hal_intf.h +0 -5
@@ -121,11 +121,6 @@ enum hal_odm_variable { HAL_ODM_WIFI_DISPLAY_STATE, }; -enum hal_intf_ps_func { -HAL_USB_SELECT_SUSPEND , -HAL_MAX_ID , -}; -typedef s32 (*c2h_id_filter )(u8 id);struct hal_ops {
Signature · 1 line
2.33.0
PATCH v3 13/40 staging: r8188eu: remove Add_RateATid from hal_ops
In reply to Michael StraubeRemove Add_RateATid from hal_ops and remove its wrapper rtw_hal_add_ra_tid(). Call rtl8188e_Add_RateATid() directly instead.
--- drivers/staging/r8188eu/core/rtw_ap.c | 5 +++-- drivers/staging/r8188eu/hal/hal_intf.c | 8 -------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 3 --- 4 files changed, 3 insertions(+), 14 deletions(-)
drivers/staging/r8188eu/core/rtw_ap.c +3 -2
@@ -7,6 +7,7 @@#include "../include/drv_types.h" #include "../include/wifi.h" #include "../include/ieee80211.h" +#include "../include/rtl8188e_cmd.h" #ifdef CONFIG_88EU_AP_MODE
@@ -393,7 +394,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)/* bitmap[28:31]= Rate Adaptive id */ /* arg[0:4] = macid */ /* arg[5] = Short GI */ -rtw_hal_add_ra_tid (padapter, tx_ra_bitmap, arg, rssi_level); +rtl8188e_Add_RateATid (padapter, tx_ra_bitmap, arg, rssi_level);if (shortGIrate) init_rate |=BIT (6 );
@@ -467,7 +468,7 @@ void update_bmc_sta(struct adapter *padapter)/* bitmap[28:31]= Rate Adaptive id */ /* arg[0:4] = macid */ /* arg[5] = Short GI */ -rtw_hal_add_ra_tid (padapter, tx_ra_bitmap, arg,0 ); +rtl8188e_Add_RateATid (padapter, tx_ra_bitmap, arg,0 ); }/* set ra_id, init_rate */ psta->raid = raid;
drivers/staging/r8188eu/hal/hal_intf.c +0 -8
@@ -158,14 +158,6 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level) } } -void rtw_hal_add_ra_tid (struct adapter *adapt,u32 bitmap,u8 arg, -u8 rssi_level) -{ -if (adapt->HalFunc.Add_RateATid) - adapt->HalFunc.Add_RateATid (adapt, bitmap, arg, - rssi_level); -} -/* Start specifical interface thread */ void rtw_hal_start_thread (struct adapter *adapt) {
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1784,7 +1784,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) { pHalFunc->free_hal_data = &rtl8188e_free_hal_data; - pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid; pHalFunc->run_thread = &rtl8188e_start_thread; pHalFunc->cancel_thread = &rtl8188e_stop_thread;
drivers/staging/r8188eu/include/hal_intf.h +0 -3
@@ -154,8 +154,6 @@ struct hal_ops { u32 mac_id, u8 rssi_level);void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter); -void (*Add_RateATid)(struct adapter *adapter,u32 bitmap,u8 arg, -u8 rssi_level);void (*run_thread)(struct adapter *adapter);void (*cancel_thread)(struct adapter *adapter);
@@ -257,7 +255,6 @@ 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); -void rtw_hal_add_ra_tid (struct adapter *adapt,u32 bitmap,u8 arg,u8 level);void rtw_hal_clone_data (struct adapter *dst_adapt,struct adapter *src_adapt);void rtw_hal_start_thread (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v3 14/40 staging: r8188eu: remove hal_power_on from hal_ops
In reply to Michael StraubeRemove hal_power_on from hal_ops and remove its wrapper rtw_hal_power_on(). Call rtl8188eu_InitPowerOn() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 7 ------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 +- drivers/staging/r8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/r8188eu/include/hal_intf.h | 4 +--- 4 files changed, 3 insertions(+), 13 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -7
@@ -12,13 +12,6 @@ void rtw_hal_free_data(struct adapter *adapt) adapt->HalFunc.free_hal_data (adapt); } -u32 rtw_hal_power_on (struct adapter *adapt) -{ -if (adapt->HalFunc.hal_power_on) -return adapt->HalFunc.hal_power_on (adapt); -return _FAIL; -} -uint rtw_hal_init (struct adapter *adapt) {uint status = _SUCCESS;
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +1 -1
@@ -904,7 +904,7 @@ static void ReadEFuseByIC(struct adapter *Adapter, u8 efuseType, u16 _offset, u1if (!bPseudoTest) {int ret = _FAIL;if (rtw_IOL_applied (Adapter)) { -rtw_hal_power_on (Adapter); +rtl8188eu_InitPowerOn (Adapter);iol_mode_enable (Adapter,1 ); ret =iol_read_efuse (Adapter,0 , _offset, _size_byte, pbuf);
drivers/staging/r8188eu/hal/usb_halinit.c +1 -2
@@ -85,7 +85,7 @@ void rtl8188eu_interface_configure(struct adapter *adapt) pdvobjpriv->RtNumInPipes, pdvobjpriv->RtNumOutPipes); } -static u32 rtl8188eu_InitPowerOn (struct adapter *adapt) +u32 rtl8188eu_InitPowerOn (struct adapter *adapt) {u16 value16;/* HW Power on sequence */
@@ -2214,7 +2214,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)DBG_88E ("cant not alloc memory for HAL DATA\n" ); adapt->hal_data_sz =sizeof (struct hal_data_8188e ); - halfunc->hal_power_on = rtl8188eu_InitPowerOn; halfunc->hal_init = &rtl8188eu_hal_init; halfunc->hal_deinit = &rtl8188eu_hal_deinit;
drivers/staging/r8188eu/include/hal_intf.h +1 -3
@@ -124,7 +124,6 @@ enum hal_odm_variable {typedef s32 (*c2h_id_filter )(u8 id);struct hal_ops { -u32 (*hal_power_on)(struct adapter *padapter);u32 (*hal_init)(struct adapter *padapter);u32 (*hal_deinit)(struct adapter *padapter);
@@ -227,10 +226,9 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter);void rtl8188eu_init_default_value (struct adapter *adapt);void rtl8188e_SetHalODMVar (struct adapter *Adapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet); +u32 rtl8188eu_InitPowerOn (struct adapter *adapt);void rtw_hal_free_data (struct adapter *padapter); - -u32 rtw_hal_power_on (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);uint rtw_hal_deinit (struct adapter *padapter);void rtw_hal_stop (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v3 15/40 staging: r8188eu: remove sreset_init_value from hal_ops
In reply to Michael StraubeRemove sreset_init_value from hal_ops and remove its wrapper rtw_hal_sreset_init(). Call sreset_init_value() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 2 -- drivers/staging/r8188eu/os_dep/os_intfs.c | 3 ++- 4 files changed, 2 insertions(+), 10 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -221,12 +221,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *adapt, adapt->HalFunc.AntDivCompareHandler (adapt, dst, src); } -void rtw_hal_sreset_init (struct adapter *adapt) -{ -if (adapt->HalFunc.sreset_init_value) - adapt->HalFunc.sreset_init_value (adapt); -} -void rtw_hal_sreset_reset (struct adapter *adapt) {if (adapt->HalFunc.silentreset)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1803,7 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite; pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite; - pHalFunc->sreset_init_value = &sreset_init_value; pHalFunc->sreset_reset_value = &sreset_reset_value; pHalFunc->silentreset = &rtl8188e_silentreset_for_specific_platform; pHalFunc->sreset_xmit_status_check = &rtl8188e_sreset_xmit_status_check;
drivers/staging/r8188eu/include/hal_intf.h +0 -2
@@ -193,7 +193,6 @@ struct hal_ops { u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest); -void (*sreset_init_value)(struct adapter *padapter);void (*sreset_reset_value)(struct adapter *padapter);void (*silentreset)(struct adapter *padapter);void (*sreset_xmit_status_check)(struct adapter *padapter);
@@ -274,7 +273,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src); -void rtw_hal_sreset_init (struct adapter *padapter);void rtw_hal_sreset_reset (struct adapter *padapter);void rtw_hal_sreset_reset_value (struct adapter *padapter);void rtw_hal_sreset_xmit_status_check (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/os_intfs.c +2 -1
@@ -13,6 +13,7 @@#include "../include/rtw_br_ext.h" #include "../include/rtl8188e_led.h" #include "../include/rtl8188e_dm.h" +#include "../include/rtw_sreset.h" MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Realtek Wireless Lan Driver" );
@@ -890,7 +891,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)rtl8188e_init_dm_priv (padapter);rtl8188eu_InitSwLeds (padapter); -rtw_hal_sreset_init (padapter); +sreset_init_value (padapter);spin_lock_init (&padapter->br_ext_lock);
Signature · 1 line
2.33.0
PATCH v3 16/40 staging: r8188eu: remove sreset_reset_value from hal_ops
In reply to Michael StraubeRemove sreset_reset_value from hal_ops and remove its wrapper rtw_hal_sreset_reset_value(). Call sreset_reset_value() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 2 -- drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 4 files changed, 1 insertion(+), 10 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -227,12 +227,6 @@ void rtw_hal_sreset_reset(struct adapter *adapt) adapt->HalFunc.silentreset (adapt); } -void rtw_hal_sreset_reset_value (struct adapter *adapt) -{ -if (adapt->HalFunc.sreset_reset_value) - adapt->HalFunc.sreset_reset_value (adapt); -} -void rtw_hal_sreset_xmit_status_check (struct adapter *adapt) {if (adapt->HalFunc.sreset_xmit_status_check)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1803,7 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite; pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite; - pHalFunc->sreset_reset_value = &sreset_reset_value; pHalFunc->silentreset = &rtl8188e_silentreset_for_specific_platform; pHalFunc->sreset_xmit_status_check = &rtl8188e_sreset_xmit_status_check; pHalFunc->sreset_linked_status_check = &rtl8188e_sreset_linked_status_check;
drivers/staging/r8188eu/include/hal_intf.h +0 -2
@@ -193,7 +193,6 @@ struct hal_ops { u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest); -void (*sreset_reset_value)(struct adapter *padapter);void (*silentreset)(struct adapter *padapter);void (*sreset_xmit_status_check)(struct adapter *padapter);void (*sreset_linked_status_check) (struct adapter *padapter);
@@ -274,7 +273,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter, struct wlan_bssid_ex *src);void rtw_hal_sreset_reset (struct adapter *padapter); -void rtw_hal_sreset_reset_value (struct adapter *padapter);void rtw_hal_sreset_xmit_status_check (struct adapter *padapter);void rtw_hal_sreset_linked_status_check (struct adapter *padapter);u8 rtw_hal_sreset_get_wifi_status (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/os_intfs.c +1 -1
@@ -816,7 +816,7 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)_clr_fwstate_ (pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING); -rtw_hal_sreset_reset_value (padapter); +sreset_reset_value (padapter); pwrctrlpriv->pwr_state_check_cnts =0 ;/* mlmeextpriv */
Signature · 1 line
2.33.0
PATCH v3 17/40 staging: r8188eu: remove silentreset from hal_ops
In reply to Michael StraubeRemove silentreset from hal_ops and remove its wrapper rtw_hal_sreset_reset().
Call rtl8188e_silentreset_for_specific_platform() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 2 -- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 +- 4 files changed, 1 insertion(+), 10 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -221,12 +221,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *adapt, adapt->HalFunc.AntDivCompareHandler (adapt, dst, src); } -void rtw_hal_sreset_reset (struct adapter *adapt) -{ -if (adapt->HalFunc.silentreset) - adapt->HalFunc.silentreset (adapt); -} -void rtw_hal_sreset_xmit_status_check (struct adapter *adapt) {if (adapt->HalFunc.sreset_xmit_status_check)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1803,7 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite; pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite; - pHalFunc->silentreset = &rtl8188e_silentreset_for_specific_platform; pHalFunc->sreset_xmit_status_check = &rtl8188e_sreset_xmit_status_check; pHalFunc->sreset_linked_status_check = &rtl8188e_sreset_linked_status_check; pHalFunc->sreset_get_wifi_status = &sreset_get_wifi_status;
drivers/staging/r8188eu/include/hal_intf.h +0 -2
@@ -193,7 +193,6 @@ struct hal_ops { u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest); -void (*silentreset)(struct adapter *padapter);void (*sreset_xmit_status_check)(struct adapter *padapter);void (*sreset_linked_status_check) (struct adapter *padapter);u8 (*sreset_get_wifi_status)(struct adapter *padapter);
@@ -272,7 +271,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src); -void rtw_hal_sreset_reset (struct adapter *padapter);void rtw_hal_sreset_xmit_status_check (struct adapter *padapter);void rtw_hal_sreset_linked_status_check (struct adapter *padapter);u8 rtw_hal_sreset_get_wifi_status (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/ioctl_linux.c +1 -1
@@ -4304,7 +4304,7 @@ static int rtw_dbg_port(struct net_device *dev,case 0x0f :if (extra_arg ==0 ) {DBG_88E ("###### silent reset test.......#####\n" ); -rtw_hal_sreset_reset (padapter); +rtl8188e_silentreset_for_specific_platform (padapter); }break ;case 0x15 :
Signature · 1 line
2.33.0
PATCH v3 18/40 staging: r8188eu: remove sreset_xmit_status_check from hal_ops
In reply to Michael StraubeRemove sreset_xmit_status_check from hal_ops and remove its wrapper rtw_hal_sreset_xmit_status_check().
Call rtl8188e_sreset_xmit_status_check() directly instead.
--- drivers/staging/r8188eu/core/rtw_cmd.c | 3 ++- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 2 -- 4 files changed, 2 insertions(+), 10 deletions(-)
drivers/staging/r8188eu/core/rtw_cmd.c +2 -1
@@ -10,6 +10,7 @@#include "../include/rtw_br_ext.h" #include "../include/rtw_mlme_ext.h" #include "../include/rtl8188e_dm.h" +#include "../include/rtl8188e_sreset.h" /* Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
@@ -1492,7 +1493,7 @@ static void dynamic_chk_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz)expire_timeout_chk (padapter);#endif -rtw_hal_sreset_xmit_status_check (padapter); +rtl8188e_sreset_xmit_status_check (padapter);linked_status_chk (padapter);traffic_status_watchdog (padapter);
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -221,12 +221,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *adapt, adapt->HalFunc.AntDivCompareHandler (adapt, dst, src); } -void rtw_hal_sreset_xmit_status_check (struct adapter *adapt) -{ -if (adapt->HalFunc.sreset_xmit_status_check) - adapt->HalFunc.sreset_xmit_status_check (adapt); -} -void rtw_hal_sreset_linked_status_check (struct adapter *adapt) {if (adapt->HalFunc.sreset_linked_status_check)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1803,7 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite; pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite; - pHalFunc->sreset_xmit_status_check = &rtl8188e_sreset_xmit_status_check; pHalFunc->sreset_linked_status_check = &rtl8188e_sreset_linked_status_check; pHalFunc->sreset_get_wifi_status = &sreset_get_wifi_status;
drivers/staging/r8188eu/include/hal_intf.h +0 -2
@@ -193,7 +193,6 @@ struct hal_ops { u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest); -void (*sreset_xmit_status_check)(struct adapter *padapter);void (*sreset_linked_status_check) (struct adapter *padapter);u8 (*sreset_get_wifi_status)(struct adapter *padapter);
@@ -271,7 +270,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src); -void rtw_hal_sreset_xmit_status_check (struct adapter *padapter);void rtw_hal_sreset_linked_status_check (struct adapter *padapter);u8 rtw_hal_sreset_get_wifi_status (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v3 19/40 staging: r8188eu: remove sreset_linked_status_check from hal_ops
In reply to Michael StraubeRemove sreset_linked_status_check from hal_ops and remove its wrapper rtw_hal_sreset_linked_status_check().
Call rtl8188e_sreset_linked_status_check() directly instead.
--- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 ++- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 2 -- 4 files changed, 2 insertions(+), 10 deletions(-)
drivers/staging/r8188eu/core/rtw_mlme_ext.c +2 -1
@@ -10,6 +10,7 @@#include "../include/wlan_bssdef.h" #include "../include/mlme_osdep.h" #include "../include/recv_osdep.h" +#include "../include/rtl8188e_sreset.h" static struct mlme_handler mlme_sta_tbl[] = { {WIFI_ASSOCREQ ,"OnAssocReq" , &OnAssocReq},
@@ -7400,7 +7401,7 @@ void linked_status_chk(struct adapter *padapter)if (padapter->bRxRSSIDisplay)_linked_rx_signal_strehgth_display (padapter); -rtw_hal_sreset_linked_status_check (padapter); +rtl8188e_sreset_linked_status_check (padapter);if (is_client_associated_to_ap (padapter)) {/* linked infrastructure client mode */
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -221,12 +221,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *adapt, adapt->HalFunc.AntDivCompareHandler (adapt, dst, src); } -void rtw_hal_sreset_linked_status_check (struct adapter *adapt) -{ -if (adapt->HalFunc.sreset_linked_status_check) - adapt->HalFunc.sreset_linked_status_check (adapt); -} -u8 rtw_hal_sreset_get_wifi_status (struct adapter *adapt) {u8 status =0 ;
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1803,7 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite; pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite; - pHalFunc->sreset_linked_status_check = &rtl8188e_sreset_linked_status_check; pHalFunc->sreset_get_wifi_status = &sreset_get_wifi_status; pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
drivers/staging/r8188eu/include/hal_intf.h +0 -2
@@ -193,7 +193,6 @@ struct hal_ops { u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest); -void (*sreset_linked_status_check) (struct adapter *padapter);u8 (*sreset_get_wifi_status)(struct adapter *padapter); int (*IOL_exec_cmds_sync)(struct adapter *padapter,
@@ -270,7 +269,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src); -void rtw_hal_sreset_linked_status_check (struct adapter *padapter);u8 rtw_hal_sreset_get_wifi_status (struct adapter *padapter); int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
Signature · 1 line
2.33.0
PATCH v3 20/40 staging: r8188eu: remove sreset_get_wifi_status from hal_ops
In reply to Michael StraubeRemove sreset_get_wifi_status from hal_ops and remove its wrapper rtw_hal_sreset_get_wifi_status(). Call sreset_get_wifi_status() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 9 --------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 -- drivers/staging/r8188eu/include/hal_intf.h | 4 ---- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 +- 4 files changed, 1 insertion(+), 16 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -9
@@ -221,15 +221,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *adapt, adapt->HalFunc.AntDivCompareHandler (adapt, dst, src); } -u8 rtw_hal_sreset_get_wifi_status (struct adapter *adapt) -{ -u8 status =0 ; - -if (adapt->HalFunc.sreset_get_wifi_status) - status = adapt->HalFunc.sreset_get_wifi_status (adapt); -return status; -} -int rtw_hal_iol_cmd (struct adapter *adapter,struct xmit_frame *xmit_frame,u32 max_wating_ms,u32 bndy_cnt) {
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -2
@@ -1803,8 +1803,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite; pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite; - pHalFunc->sreset_get_wifi_status = &sreset_get_wifi_status; - pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync; pHalFunc->hal_notch_filter = &hal_notch_filter_8188e;
drivers/staging/r8188eu/include/hal_intf.h +0 -4
@@ -193,8 +193,6 @@ struct hal_ops { u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest); -u8 (*sreset_get_wifi_status)(struct adapter *padapter); -int (*IOL_exec_cmds_sync)(struct adapter *padapter,struct xmit_frame *frame,u32 max_wait,u32 bndy_cnt);
@@ -269,8 +267,6 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src); -u8 rtw_hal_sreset_get_wifi_status (struct adapter *padapter); -int rtw_hal_iol_cmd (struct adapter *adapter,struct xmit_frame *xmit_frame,u32 max_wating_ms,u32 bndy_cnt);
drivers/staging/r8188eu/os_dep/ioctl_linux.c +1 -1
@@ -2305,7 +2305,7 @@ static void rtw_dbg_mode_hdl(struct adapter *padapter, u32 id, u8 *pdata, u32 lertw_hal_set_hwreg (padapter,HW_VAR_TRIGGER_GPIO_0 ,NULL );break ;case GEN_MP_IOCTL_SUBCODE (GET_WIFI_STATUS ): - *pdata =rtw_hal_sreset_get_wifi_status (padapter); + *pdata =sreset_get_wifi_status (padapter);break ;default :break ;
Signature · 1 line
2.33.0
PATCH v3 21/40 staging: r8188eu: remove EfusePowerSwitch from hal_ops
In reply to Michael StraubeRemove EfusePowerSwitch from hal_ops and callrtl8188e_EfusePowerSwitch() directly instead.
--- drivers/staging/r8188eu/core/rtw_efuse.c | 2 +- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 7 +------ drivers/staging/r8188eu/include/hal_intf.h | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-)
drivers/staging/r8188eu/core/rtw_efuse.c +1 -1
@@ -82,7 +82,7 @@ Efuse_PowerSwitch(u8 write, u8 PwrState) { - pAdapter->HalFunc.EfusePowerSwitch (pAdapter, write, PwrState); +rtl8188e_EfusePowerSwitch (pAdapter ,write ,PwrState ); }/*-----------------------------------------------------------------------------
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +1 -6
@@ -757,11 +757,7 @@ hal_EfusePowerSwitch_RTL8188E( } } -static void -rtl8188e_EfusePowerSwitch ( -struct adapter *pAdapter, -u8 bWrite, -u8 PwrState) +void rtl8188e_EfusePowerSwitch (struct adapter *pAdapter,u8 bWrite,u8 PwrState) {hal_EfusePowerSwitch_RTL8188E (pAdapter, bWrite, PwrState); }
@@ -1795,7 +1791,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;/* Efuse related function */ - pHalFunc->EfusePowerSwitch = &rtl8188e_EfusePowerSwitch; pHalFunc->ReadEFuse = &rtl8188e_ReadEFuse; pHalFunc->EFUSEGetEfuseDefinition = &rtl8188e_EFUSE_GetEfuseDefinition; pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize;
drivers/staging/r8188eu/include/hal_intf.h +2 -2
@@ -177,8 +177,6 @@ struct hal_ops { enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -void (*EfusePowerSwitch)(struct adapter *padapter,u8 bWrite, -u8 PwrState);void (*ReadEFuse)(struct adapter *padapter,u8 efuseType,u16 _offset,u16 _size_byte,u8 *pbuf,bool bPseudoTest); void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType,
@@ -221,6 +219,8 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet);u32 rtl8188eu_InitPowerOn (struct adapter *adapt); +void rtl8188e_EfusePowerSwitch (struct adapter *pAdapter,u8 bWrite,u8 PwrState); +void rtw_hal_free_data (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);uint rtw_hal_deinit (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v3 22/40 staging: r8188eu: rename hal_EfusePowerSwitch_RTL8188E()
In reply to Michael StraubeRename hal_EfusePowerSwitch_RTL8188E() to get rid of a wrapper.
hal_EfusePowerSwitch_RTL8188E() -> rtl8188e_EfusePowerSwitch().
--- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +1 -10
@@ -707,11 +707,7 @@ hal_EfusePgPacketWriteData(struct pgpkt *pTargetPkt, bool bPseudoTest); -static void -hal_EfusePowerSwitch_RTL8188E ( -struct adapter *pAdapter, -u8 bWrite, -u8 PwrState) +void rtl8188e_EfusePowerSwitch (struct adapter *pAdapter,u8 bWrite,u8 PwrState) {u8 tempval;u16 tmpV16;
@@ -757,11 +753,6 @@ hal_EfusePowerSwitch_RTL8188E( } } -void rtl8188e_EfusePowerSwitch (struct adapter *pAdapter,u8 bWrite,u8 PwrState) -{ -hal_EfusePowerSwitch_RTL8188E (pAdapter, bWrite, PwrState); -} - static void Hal_EfuseReadEFuse88E(struct adapter *Adapter, u16 _offset, u16 _size_byte,
Signature · 1 line
2.33.0
PATCH v3 23/40 staging: r8188eu: remove wrapper Efuse_PowerSwitch()
In reply to Michael StraubeRemove wrapper Efuse_PowerSwitch() and call rtl8188e_EfusePowerSwitch() directly.
--- drivers/staging/r8188eu/core/rtw_efuse.c | 55 ++++++--------------- drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 8 +-- drivers/staging/r8188eu/include/rtw_efuse.h | 1 - 3 files changed, 18 insertions(+), 46 deletions(-)
drivers/staging/r8188eu/core/rtw_efuse.c +14 -41
@@ -58,33 +58,6 @@ Efuse_Write1ByteToFakeContent(return true; } -/*----------------------------------------------------------------------------- -* Function: Efuse_PowerSwitch -* -* Overview: When we want to enable write operation, we should change to -* pwr on state. When we stop write, we should switch to 500k mode -* and disable LDO 2.5V. -* -* Input: NONE -* -* Output: NONE -* -* Return: NONE -* -* Revised History: -* When Who Remark -* 11/17/2008 MHC Create Version 0. -* -*---------------------------------------------------------------------------*/ -void -Efuse_PowerSwitch ( -struct adapter *pAdapter, -u8 write, -u8 PwrState) -{ -rtl8188e_EfusePowerSwitch (pAdapter, write, PwrState); -} -/*----------------------------------------------------------------------------- * Function: efuse_GetCurrentSize *
@@ -431,7 +404,7 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts rw8 = &efuse_read8; } -Efuse_PowerSwitch (padapter, write, true); +rtl8188e_EfusePowerSwitch (padapter, write, true);/* e-fuse one byte read / write */ for (i =0 ; i < cnts; i++) {
@@ -445,7 +418,7 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cntsbreak ; } -Efuse_PowerSwitch (padapter, write, false); +rtl8188e_EfusePowerSwitch (padapter, write, false);return res; }
@@ -459,9 +432,9 @@ u16 efuse_GetMaxSize(struct adapter *padapter)/* */ u8 efuse_GetCurrentSize (struct adapter *padapter,u16 *size) { -Efuse_PowerSwitch (padapter, false, true); +rtl8188e_EfusePowerSwitch (padapter, false, true); *size =Efuse_GetCurrentSize (padapter,EFUSE_WIFI , false); -Efuse_PowerSwitch (padapter, false, false); +rtl8188e_EfusePowerSwitch (padapter, false, false);return _SUCCESS; }
@@ -475,11 +448,11 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)if ((addr + cnts) > mapLen)return _FAIL; -Efuse_PowerSwitch (padapter, false, true); +rtl8188e_EfusePowerSwitch (padapter, false, true);efuse_ReadEFuse (padapter,EFUSE_WIFI , addr, cnts, data, false); -Efuse_PowerSwitch (padapter, false, false); +rtl8188e_EfusePowerSwitch (padapter, false, false);return _SUCCESS; }
@@ -493,11 +466,11 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)if ((addr + cnts) > mapLen)return _FAIL; -Efuse_PowerSwitch (padapter, false, true); +rtl8188e_EfusePowerSwitch (padapter, false, true);efuse_ReadEFuse (padapter,EFUSE_BT , addr, cnts, data, false); -Efuse_PowerSwitch (padapter, false, false); +rtl8188e_EfusePowerSwitch (padapter, false, false);return _SUCCESS; }
@@ -524,7 +497,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)if (ret == _FAIL) goto exit; -Efuse_PowerSwitch (padapter, true, true); +rtl8188e_EfusePowerSwitch (padapter, true, true); offset = (addr >>3 ); word_en =0xF ;
@@ -587,7 +560,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)memset (newdata,0xFF ,PGPKT_DATA_SIZE ); }while (1 ); -Efuse_PowerSwitch (padapter, true, false); +rtl8188e_EfusePowerSwitch (padapter, true, false); exit:kfree (map);return ret;
@@ -616,7 +589,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *dataif (ret == _FAIL) goto exit; -Efuse_PowerSwitch (padapter, true, true); +rtl8188e_EfusePowerSwitch (padapter, true, true); offset = (addr >>3 ); word_en =0xF ;
@@ -679,7 +652,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *datamemset (newdata,0xFF ,PGPKT_DATA_SIZE ); }while (1 ); -Efuse_PowerSwitch (padapter, true, false); +rtl8188e_EfusePowerSwitch (padapter, true, false); exit:
@@ -768,13 +741,13 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse, {u16 mapLen =0 ; -Efuse_PowerSwitch (pAdapter, false, true); +rtl8188e_EfusePowerSwitch (pAdapter, false, true);EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, pseudo);efuse_ReadEFuse (pAdapter, efuseType,0 , mapLen, Efuse, pseudo); -Efuse_PowerSwitch (pAdapter, false, false); +rtl8188e_EfusePowerSwitch (pAdapter, false, false); }/*-----------------------------------------------------------------------------
drivers/staging/r8188eu/core/rtw_mp_ioctl.c +4 -4
@@ -973,19 +973,19 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)_irqlevel_changed_ (&oldirql,LOWER );if (poid_par_priv->type_of_oid ==QUERY_OID ) { -Efuse_PowerSwitch (Adapter, false, true); +rtl8188e_EfusePowerSwitch (Adapter, false, true);if (Efuse_PgPacketRead (Adapter, ppgpkt->offset, ppgpkt->data, false)) *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;else status =NDIS_STATUS_FAILURE ; -Efuse_PowerSwitch (Adapter, false, false); +rtl8188e_EfusePowerSwitch (Adapter, false, false); }else { -Efuse_PowerSwitch (Adapter, true, true); +rtl8188e_EfusePowerSwitch (Adapter, true, true);if (Efuse_PgPacketWrite (Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false)) *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;else status =NDIS_STATUS_FAILURE ; -Efuse_PowerSwitch (Adapter, true, false); +rtl8188e_EfusePowerSwitch (Adapter, true, false); }_irqlevel_changed_ (&oldirql,RAISE );
drivers/staging/r8188eu/include/rtw_efuse.h +0 -1
@@ -119,7 +119,6 @@ void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1,u8 efuse_OneByteRead (struct adapter *adapter,u16 addr,u8 *data,bool test);u8 efuse_OneByteWrite (struct adapter *adapter,u16 addr,u8 data,bool test); -void Efuse_PowerSwitch (struct adapter *adapt,u8 bWrite,u8 PwrState);int Efuse_PgPacketRead (struct adapter *adapt,u8 offset,u8 *data,bool test);int Efuse_PgPacketWrite (struct adapter *adapter,u8 offset,u8 word,u8 *data,bool test);
Signature · 1 line
2.33.0
PATCH v3 24/40 staging: r8188eu: remove ReadEFuse from hal_ops
In reply to Michael StraubeRemove ReadEFuse from hal_ops and remove its wrapper efuse_ReadEFuse(). Call rtl8188e_ReadEFuse() directly instead.
--- drivers/staging/r8188eu/core/rtw_efuse.c | 11 +++-------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 7 +++---- drivers/staging/r8188eu/include/hal_intf.h | 5 +++-- 3 files changed, 9 insertions(+), 14 deletions(-)
drivers/staging/r8188eu/core/rtw_efuse.c +3 -8
@@ -175,11 +175,6 @@ ReadEFuseByte(/* write addr must be after sec5. */ /* */ -static void efuse_ReadEFuse (struct adapter *Adapter,u8 efuseType,u16 _offset,u16 _size_byte,u8 *pbuf,bool pseudo) -{ - Adapter->HalFunc.ReadEFuse (Adapter, efuseType, _offset, _size_byte, pbuf, pseudo); -} -void EFUSE_GetEfuseDefinition (struct adapter *pAdapter,u8 efuseType,u8 type,void *pOut,bool pseudo ) {
@@ -450,7 +445,7 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)rtl8188e_EfusePowerSwitch (padapter, false, true); -efuse_ReadEFuse (padapter,EFUSE_WIFI , addr, cnts, data, false); +rtl8188e_ReadEFuse (padapter,EFUSE_WIFI , addr, cnts, data, false);rtl8188e_EfusePowerSwitch (padapter, false, false);
@@ -468,7 +463,7 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)rtl8188e_EfusePowerSwitch (padapter, false, true); -efuse_ReadEFuse (padapter,EFUSE_BT , addr, cnts, data, false); +rtl8188e_ReadEFuse (padapter,EFUSE_BT , addr, cnts, data, false);rtl8188e_EfusePowerSwitch (padapter, false, false);
@@ -745,7 +740,7 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse,EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, pseudo); -efuse_ReadEFuse (pAdapter, efuseType,0 , mapLen, Efuse, pseudo); +rtl8188e_ReadEFuse (pAdapter, efuseType,0 , mapLen, Efuse, pseudo);rtl8188e_EfusePowerSwitch (pAdapter, false, false); }
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +3 -4
@@ -912,9 +912,9 @@ static void ReadEFuse_Pseudo(struct adapter *Adapter, u8 efuseType, u16 _offset,Hal_EfuseReadEFuse88E (Adapter, _offset, _size_byte, pbuf, bPseudoTest); } -static void rtl8188e_ReadEFuse (struct adapter *Adapter,u8 efuseType, -u16 _offset,u16 _size_byte,u8 *pbuf, -bool bPseudoTest) +void rtl8188e_ReadEFuse (struct adapter *Adapter,u8 efuseType, +u16 _offset,u16 _size_byte,u8 *pbuf, +bool bPseudoTest) {if (bPseudoTest)ReadEFuse_Pseudo (Adapter, efuseType, _offset, _size_byte, pbuf, bPseudoTest);
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;/* Efuse related function */ - pHalFunc->ReadEFuse = &rtl8188e_ReadEFuse; pHalFunc->EFUSEGetEfuseDefinition = &rtl8188e_EFUSE_GetEfuseDefinition; pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize; pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead;
drivers/staging/r8188eu/include/hal_intf.h +3 -2
@@ -177,8 +177,6 @@ struct hal_ops { enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -void (*ReadEFuse)(struct adapter *padapter,u8 efuseType,u16 _offset, -u16 _size_byte,u8 *pbuf,bool bPseudoTest);void (*EFUSEGetEfuseDefinition)(struct adapter *padapter,u8 efuseType,u8 type,void *pOut,bool bPseudoTest); u16 (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
@@ -220,6 +218,9 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter,u32 rtl8188eu_InitPowerOn (struct adapter *adapt);void rtl8188e_EfusePowerSwitch (struct adapter *pAdapter,u8 bWrite,u8 PwrState); +void rtl8188e_ReadEFuse (struct adapter *Adapter,u8 efuseType, +u16 _offset,u16 _size_byte,u8 *pbuf, +bool bPseudoTest);void rtw_hal_free_data (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v3 25/40 staging: r8188eu: remove EFUSEGetEfuseDefinition from hal_ops
In reply to Michael StraubeRemove EFUSEGetEfuseDefinition from hal_ops and remove its wrapper EFUSE_GetEfuseDefinition(). Call rtl8188e_EFUSE_GetEfuseDefinition() directly instead.
--- drivers/staging/r8188eu/core/rtw_efuse.c | 44 +++++-------------- drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 6 +-- .../staging/r8188eu/hal/rtl8188e_hal_init.c | 13 +++--- drivers/staging/r8188eu/include/hal_intf.h | 4 +- drivers/staging/r8188eu/include/rtw_efuse.h | 2 - drivers/staging/r8188eu/os_dep/ioctl_linux.c | 22 +++++----- 6 files changed, 32 insertions(+), 59 deletions(-)
drivers/staging/r8188eu/core/rtw_efuse.c +10 -34
@@ -157,30 +157,6 @@ ReadEFuseByte( *pbuf = (u8)(value32 &0xff ); } -/* */ -/* Description: */ -/* 1. Execute E-Fuse read byte operation according as map offset and */ -/* save to E-Fuse table. */ -/* 2. Referred from SD1 Richard. */ -/* */ -/* Assumption: */ -/* 1. Boot from E-Fuse and successfully auto-load. */ -/* 2. PASSIVE_LEVEL (USB interface) */ -/* */ -/* Created by Roger, 2008.10.21. */ -/* */ -/* 2008/12/12 MH 1. Reorganize code flow and reserve bytes. and add description. */ -/* 2. Add efuse utilization collect. */ -/* 2008/12/22 MH Read Efuse must check if we write section 1 data again!!! Sec1 */ -/* write addr must be after sec5. */ -/* */ - -void EFUSE_GetEfuseDefinition (struct adapter *pAdapter,u8 efuseType,u8 type,void *pOut,bool pseudo - ) -{ - pAdapter->HalFunc.EFUSEGetEfuseDefinition (pAdapter, efuseType, type, pOut, pseudo); -} -/*----------------------------------------------------------------------------- * Function: EFUSE_Read1Byte *
@@ -205,7 +181,7 @@ u8 EFUSE_Read1Byte(struct adapter *Adapter, u16 Address)u32 k =0 ;u16 contentLen =0 ; -EFUSE_GetEfuseDefinition (Adapter,EFUSE_WIFI ,TYPE_EFUSE_REAL_CONTENT_LEN , (void *)&contentLen, false); +rtl8188e_EFUSE_GetEfuseDefinition (Adapter,EFUSE_WIFI ,TYPE_EFUSE_REAL_CONTENT_LEN , (void *)&contentLen, false);if (Address < contentLen) {/* E-fuse 512Byte */ /* Write E-fuse Register address bit0~7 */
@@ -385,8 +361,8 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cntsu8 res = _FAIL;u8 (*rw8)(struct adapter *,u16 ,u8 *); -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_EFUSE_REAL_CONTENT_LEN , (void *)&real_content_len, false); -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_EFUSE_REAL_CONTENT_LEN , (void *)&real_content_len, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if (start_addr > real_content_len)return _FAIL;
@@ -421,7 +397,7 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cntsu16 efuse_GetMaxSize (struct adapter *padapter) {u16 max_size; -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_size, false);return max_size; }/* */
@@ -438,7 +414,7 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) {u16 mapLen =0 ; -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, false);if ((addr + cnts) > mapLen)return _FAIL;
@@ -456,7 +432,7 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) {u16 mapLen =0 ; -EFUSE_GetEfuseDefinition (padapter,EFUSE_BT ,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_BT ,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, false);if ((addr + cnts) > mapLen)return _FAIL;
@@ -479,7 +455,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)u8 ret = _SUCCESS;u16 mapLen =0 ; -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, false);if ((addr + cnts) > mapLen)return _FAIL;
@@ -571,7 +547,7 @@ u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *datau8 ret = _SUCCESS;u16 mapLen =0 ; -EFUSE_GetEfuseDefinition (padapter,EFUSE_BT ,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_BT ,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, false);if ((addr + cnts) > mapLen)return _FAIL;
@@ -738,7 +714,7 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse,rtl8188e_EfusePowerSwitch (pAdapter, false, true); -EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, pseudo); +rtl8188e_EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, pseudo);rtl8188e_ReadEFuse (pAdapter, efuseType,0 , mapLen, Efuse, pseudo);
@@ -769,7 +745,7 @@ void EFUSE_ShadowMapUpdate(struct eeprom_priv *pEEPROM =GET_EEPROM_EFUSE_PRIV (pAdapter);u16 mapLen =0 ; -EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, pseudo); +rtl8188e_EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_EFUSE_MAP_LEN , (void *)&mapLen, pseudo);if (pEEPROM->bautoload_fail_flag)memset (pEEPROM->efuse_eeprom_data,0xFF , mapLen);
drivers/staging/r8188eu/core/rtw_mp_ioctl.c +3 -3
@@ -913,7 +913,7 @@ int rtl8188eu_oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv) cnts = pefuse->cnts; data = pefuse->data; -EFUSE_GetEfuseDefinition (Adapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (Adapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if ((addr + cnts) > max_available_size)return NDIS_STATUS_NOT_ACCEPTED ;
@@ -944,7 +944,7 @@ int rtl8188eu_oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv) cnts = pefuse->cnts; data = pefuse->data; -EFUSE_GetEfuseDefinition (Adapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (Adapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if ((addr + cnts) > max_available_size)return NDIS_STATUS_NOT_ACCEPTED ;
@@ -1055,7 +1055,7 @@ int rtl8188eu_oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv)struct adapter *Adapter = (struct adapter *)(poid_par_priv->adapter_context);u16 maplen =0 ; -EFUSE_GetEfuseDefinition (Adapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&maplen, false); +rtl8188e_EFUSE_GetEfuseDefinition (Adapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&maplen, false); *poid_par_priv->bytes_rw =0 ;
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +6 -7
@@ -1047,7 +1047,7 @@ static void Hal_EFUSEGetEfuseDefinition_Pseudo88E(struct adapter *pAdapter, u8 e } } -static void rtl8188e_EFUSE_GetEfuseDefinition (struct adapter *pAdapter,u8 efuseType,u8 type,void *pOut,bool bPseudoTest) +void rtl8188e_EFUSE_GetEfuseDefinition (struct adapter *pAdapter,u8 efuseType,u8 type,void *pOut,bool bPseudoTest) {if (bPseudoTest)Hal_EFUSEGetEfuseDefinition_Pseudo88E (pAdapter, efuseType, type, pOut);
@@ -1205,7 +1205,7 @@ static int hal_EfusePgPacketRead_8188e(struct adapter *pAdapter, u8 offset, u8 *u8 max_section =0 ;u8 tmp_header =0 ; -EFUSE_GetEfuseDefinition (pAdapter,EFUSE_WIFI ,TYPE_EFUSE_MAX_SECTION , (void *)&max_section, bPseudoTest); +rtl8188e_EFUSE_GetEfuseDefinition (pAdapter,EFUSE_WIFI ,TYPE_EFUSE_MAX_SECTION , (void *)&max_section, bPseudoTest);if (!data)return false;
@@ -1341,7 +1341,7 @@ static bool hal_EfusePgPacketWrite2ByteHeader(struct adapter *pAdapter, u8 efuseu8 pg_header =0 , tmp_header =0 , pg_header_temp =0 ;u8 repeatcnt =0 ; -EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_AVAILABLE_EFUSE_BYTES_BANK , (void *)&efuse_max_available_len, bPseudoTest); +rtl8188e_EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_AVAILABLE_EFUSE_BYTES_BANK , (void *)&efuse_max_available_len, bPseudoTest);while (efuse_addr < efuse_max_available_len) { pg_header = ((pTargetPkt->offset &0x07 ) <<5 ) |0x0F ;
@@ -1521,8 +1521,8 @@ static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, uu16 startAddr =0 , efuse_max_available_len =0 , efuse_max =0 ;struct pgpkt curPkt; -EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_AVAILABLE_EFUSE_BYTES_BANK , (void *)&efuse_max_available_len, bPseudoTest); -EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_EFUSE_REAL_CONTENT_LEN , (void *)&efuse_max, bPseudoTest); +rtl8188e_EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_AVAILABLE_EFUSE_BYTES_BANK , (void *)&efuse_max_available_len, bPseudoTest); +rtl8188e_EFUSE_GetEfuseDefinition (pAdapter, efuseType,TYPE_EFUSE_REAL_CONTENT_LEN , (void *)&efuse_max, bPseudoTest);if (efuseType ==EFUSE_WIFI ) {if (bPseudoTest) {
@@ -1610,7 +1610,7 @@ hal_EfusePgCheckAvailableAddr(u16 efuse_max_available_len =0 ;/* Change to check TYPE_EFUSE_MAP_LEN , because 8188E raw 256, logic map over 256. */ -EFUSE_GetEfuseDefinition (pAdapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&efuse_max_available_len, false); +rtl8188e_EFUSE_GetEfuseDefinition (pAdapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&efuse_max_available_len, false);if (Efuse_GetCurrentSize (pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len)return false;
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;/* Efuse related function */ - pHalFunc->EFUSEGetEfuseDefinition = &rtl8188e_EFUSE_GetEfuseDefinition; pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize; pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead; pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
drivers/staging/r8188eu/include/hal_intf.h +2 -2
@@ -177,8 +177,6 @@ struct hal_ops { enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -void (*EFUSEGetEfuseDefinition)(struct adapter *padapter,u8 efuseType, -u8 type,void *pOut,bool bPseudoTest);u16 (*EfuseGetCurrentSize)(struct adapter *padapter,u8 efuseType,bool bPseudoTest); int (*Efuse_PgPacketRead)(struct adapter *adapter, u8 offset,
@@ -221,6 +219,8 @@ void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState)void rtl8188e_ReadEFuse (struct adapter *Adapter,u8 efuseType,u16 _offset,u16 _size_byte,u8 *pbuf,bool bPseudoTest); +void rtl8188e_EFUSE_GetEfuseDefinition (struct adapter *pAdapter,u8 efuseType, +u8 type,void *pOut,bool bPseudoTest);void rtw_hal_free_data (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);
drivers/staging/r8188eu/include/rtw_efuse.h +0 -2
@@ -114,8 +114,6 @@ u8 rtw_BT_efuse_map_write(struct adapter *adapter, u16 addr,u16 Efuse_GetCurrentSize (struct adapter *adapter,u8 efusetype,bool test);u8 Efuse_CalculateWordCnts (u8 word_en);void ReadEFuseByte (struct adapter *adapter,u16 _offset,u8 *pbuf,bool test); -void EFUSE_GetEfuseDefinition (struct adapter *adapt,u8 type,u8 type1, -void *out,bool bPseudoTest);u8 efuse_OneByteRead (struct adapter *adapter,u16 addr,u8 *data,bool test);u8 efuse_OneByteWrite (struct adapter *adapter,u16 addr,u8 data,bool test);
drivers/staging/r8188eu/os_dep/ioctl_linux.c +11 -11
@@ -4651,7 +4651,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, }DBG_88E ("%s: cnts =%d\n" , __func__, cnts); -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if ((addr + cnts) > max_available_size) {DBG_88E ("%s: addr(0x%X)+cnts(%d) parameter error!\n" , __func__, addr, cnts); err = -EINVAL ;
@@ -4690,7 +4690,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, }else if (strcmp (tmp[0 ],"mac" ) ==0 ) { cnts =6 ; -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if ((addr + cnts) > max_available_size) {DBG_88E ("%s: addr(0x%02x)+cnts(%d) parameter error!\n" , __func__, addr, cnts); err = -EFAULT ;
@@ -4712,7 +4712,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, }else if (strcmp (tmp[0 ],"vidpid" ) ==0 ) { cnts =4 ; -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if ((addr + cnts) > max_available_size) {DBG_88E ("%s: addr(0x%02x)+cnts(%d) parameter error!\n" , __func__, addr, cnts); err = -EFAULT ;
@@ -4789,7 +4789,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, }DBG_88E ("%s: cnts =%d\n" , __func__, cnts); -EFUSE_GetEfuseDefinition (padapter,EFUSE_BT ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_BT ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if ((addr + cnts) > max_available_size) {DBG_88E ("%s: addr(0x%X)+cnts(%d) parameter error!\n" , __func__, addr, cnts); err = -EFAULT ;
@@ -4945,7 +4945,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,for (jj =0 , kk =0 ; jj < cnts; jj++, kk +=2 ) setdata[jj] =key_2char2num (tmp[2 ][kk], tmp[2 ][kk +1 ]);/* Change to check TYPE_EFUSE_MAP_LEN, because 8188E raw 256, logic map over 256. */ -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&max_available_size, false);if ((addr + cnts) > max_available_size) {DBG_88E ("%s: addr(0x%X)+cnts(%d) parameter error!\n" , __func__, addr, cnts); err = -EFAULT ;
@@ -5020,7 +5020,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,for (jj =0 , kk =0 ; jj < cnts; jj++, kk +=2 ) setdata[jj] =key_2char2num (tmp[1 ][kk], tmp[1 ][kk +1 ]);/* Change to check TYPE_EFUSE_MAP_LEN, because 8188E raw 256, logic map over 256. */ -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&max_available_size, false);if ((addr + cnts) > max_available_size) {DBG_88E ("%s: addr(0x%X)+cnts(%d) parameter error!\n" , __func__, addr, cnts); err = -EFAULT ;
@@ -5058,7 +5058,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,for (jj =0 , kk =0 ; jj < cnts; jj++, kk +=2 ) setdata[jj] =key_2char2num (tmp[1 ][kk], tmp[1 ][kk +1 ]); -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if ((addr + cnts) > max_available_size) {DBG_88E ("%s: addr(0x%X)+cnts(%d) parameter error!\n" , __func__, addr, cnts); err = -EFAULT ;
@@ -5097,7 +5097,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,for (jj =0 , kk =0 ; jj < cnts; jj++, kk +=2 ) setdata[jj] =key_2char2num (tmp[2 ][kk], tmp[2 ][kk +1 ]); -EFUSE_GetEfuseDefinition (padapter,EFUSE_BT ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_BT ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if ((addr + cnts) > max_available_size) {DBG_88E ("%s: addr(0x%X)+cnts(%d) parameter error!\n" , __func__, addr, cnts); err = -EFAULT ;
@@ -5152,7 +5152,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, }else if (strcmp (tmp[0 ],"btfk2map" ) ==0 ) {memcpy (pEfuseHal->BTEfuseModifiedMap, pEfuseHal->fakeBTEfuseModifiedMap,EFUSE_BT_MAX_MAP_LEN ); -EFUSE_GetEfuseDefinition (padapter,EFUSE_BT ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_BT ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if (max_available_size <1 ) { err = -EFAULT ; goto exit;
@@ -5164,7 +5164,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, goto exit; } }else if (strcmp (tmp[0 ],"wlfk2map" ) ==0 ) { -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if (max_available_size <1 ) { err = -EFAULT ; goto exit;
@@ -6032,7 +6032,7 @@ static int rtw_mp_thermal(struct net_device *dev,Hal_GetThermalMeter (padapter, &val);if (bwrite ==0 ) { -EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false); +rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_available_size, false);if (2 > max_available_size) {DBG_88E ("no available efuse!\n" );return -EFAULT ;
Signature · 1 line
2.33.0
PATCH v3 26/40 staging: r8188eu: remove EfuseGetCurrentSize from hal_ops
In reply to Michael StraubeRemove EfuseGetCurrentSize from hal_ops and remove its wrapper Efuse_GetCurrentSize(). Call rtl8188e_EfuseGetCurrentSize() directly instead.
--- drivers/staging/r8188eu/core/rtw_efuse.c | 31 +------------------ .../staging/r8188eu/hal/rtl8188e_hal_init.c | 7 ++--- drivers/staging/r8188eu/include/hal_intf.h | 3 +- drivers/staging/r8188eu/include/rtw_efuse.h | 1 - 4 files changed, 5 insertions(+), 37 deletions(-)
drivers/staging/r8188eu/core/rtw_efuse.c +1 -30
@@ -58,35 +58,6 @@ Efuse_Write1ByteToFakeContent(return true; } -/*----------------------------------------------------------------------------- -* Function: efuse_GetCurrentSize -* -* Overview: Get current efuse size!!! -* -* Input: NONE -* -* Output: NONE -* -* Return: NONE -* -* Revised History: -* When Who Remark -* 11/16/2008 MHC Create Version 0. -* -*---------------------------------------------------------------------------*/ -u16 -Efuse_GetCurrentSize ( -struct adapter *pAdapter, -u8 efuseType, -bool pseudo) -{ -u16 ret =0 ; - - ret = pAdapter->HalFunc.EfuseGetCurrentSize (pAdapter, efuseType, pseudo); - -return ret; -} -/* 11/16/2008 MH Add description. Get current efuse area enabled word!!. */ u8 Efuse_CalculateWordCnts (u8 word_en)
@@ -404,7 +375,7 @@ u16 efuse_GetMaxSize(struct adapter *padapter)u8 efuse_GetCurrentSize (struct adapter *padapter,u16 *size) {rtl8188e_EfusePowerSwitch (padapter, false, true); - *size =Efuse_GetCurrentSize (padapter,EFUSE_WIFI , false); + *size =rtl8188e_EfuseGetCurrentSize (padapter,EFUSE_WIFI , false);rtl8188e_EfusePowerSwitch (padapter, false, false);return _SUCCESS;
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +3 -4
@@ -1181,7 +1181,7 @@ static u16 Hal_EfuseGetCurrentSize_Pseudo(struct adapter *pAdapter, bool bPseudoreturn ret; } -static u16 rtl8188e_EfuseGetCurrentSize (struct adapter *pAdapter,u8 efuseType,bool bPseudoTest) +u16 rtl8188e_EfuseGetCurrentSize (struct adapter *pAdapter,u8 efuseType,bool bPseudoTest) {u16 ret =0 ;
@@ -1323,7 +1323,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, stif (!PgWriteSuccess)return false;else - efuse_addr =Efuse_GetCurrentSize (pAdapter, efuseType, bPseudoTest); + efuse_addr =rtl8188e_EfuseGetCurrentSize (pAdapter, efuseType, bPseudoTest); }else { efuse_addr = efuse_addr + (pFixPkt->word_cnts *2 ) +1 ; }
@@ -1612,7 +1612,7 @@ hal_EfusePgCheckAvailableAddr(/* Change to check TYPE_EFUSE_MAP_LEN , because 8188E raw 256, logic map over 256. */ rtl8188e_EFUSE_GetEfuseDefinition (pAdapter,EFUSE_WIFI ,TYPE_EFUSE_MAP_LEN , (void *)&efuse_max_available_len, false); -if (Efuse_GetCurrentSize (pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len) +if (rtl8188e_EfuseGetCurrentSize (pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len)return false;return true; }
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;/* Efuse related function */ - pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize; pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead; pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite; pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
drivers/staging/r8188eu/include/hal_intf.h +1 -2
@@ -177,8 +177,6 @@ struct hal_ops { enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -u16 (*EfuseGetCurrentSize)(struct adapter *padapter,u8 efuseType, -bool bPseudoTest);int (*Efuse_PgPacketRead)(struct adapter *adapter,u8 offset,u8 *data,bool bPseudoTest); int (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset,
@@ -221,6 +219,7 @@ void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType, bool bPseudoTest);void rtl8188e_EFUSE_GetEfuseDefinition (struct adapter *pAdapter,u8 efuseType,u8 type,void *pOut,bool bPseudoTest); +u16 rtl8188e_EfuseGetCurrentSize (struct adapter *pAdapter,u8 efuseType,bool bPseudoTest);void rtw_hal_free_data (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);
drivers/staging/r8188eu/include/rtw_efuse.h +0 -1
@@ -111,7 +111,6 @@ u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);u8 rtw_BT_efuse_map_write (struct adapter *adapter,u16 addr,u16 cnts,u8 *data); -u16 Efuse_GetCurrentSize (struct adapter *adapter,u8 efusetype,bool test);u8 Efuse_CalculateWordCnts (u8 word_en);void ReadEFuseByte (struct adapter *adapter,u16 _offset,u8 *pbuf,bool test);u8 efuse_OneByteRead (struct adapter *adapter,u16 addr,u8 *data,bool test);
Signature · 1 line
2.33.0
PATCH v3 27/40 staging: r8188eu: remove empty comments
In reply to Michael StraubeRemove empty comments.
--- drivers/staging/r8188eu/core/rtw_efuse.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/staging/r8188eu/core/rtw_efuse.c +5 -7
@@ -25,10 +25,9 @@ u8 fakeBTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN] = {0};u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN ] = {0 };/*------------------------Define local variable------------------------------*/ -/* */ #define REG_EFUSE_CTRL 0x0030#define EFUSE_CTRL REG_EFUSE_CTRL/* E-Fuse Control. */ -/* */ +static bool Efuse_Read1ByteFromFakeContent (struct adapter *pAdapter,u16 Offset,u8 *Value)
@@ -364,14 +363,14 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cntsreturn res; } -/* */ +u16 efuse_GetMaxSize (struct adapter *padapter) {u16 max_size;rtl8188e_EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , (void *)&max_size, false);return max_size; } -/* */ +u8 efuse_GetCurrentSize (struct adapter *padapter,u16 *size) {rtl8188e_EfusePowerSwitch (padapter, false, true);
@@ -380,7 +379,7 @@ u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)return _SUCCESS; } -/* */ +u8 rtw_efuse_map_read (struct adapter *padapter,u16 addr,u16 cnts,u8 *data) {u16 mapLen =0 ;
@@ -416,7 +415,7 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)return _SUCCESS; } -/* */ +u8 rtw_efuse_map_write (struct adapter *padapter,u16 addr,u16 cnts,u8 *data) {u8 offset, word_en;
@@ -508,7 +507,6 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)return ret; } -/* */ u8 rtw_BT_efuse_map_write (struct adapter *padapter,u16 addr,u16 cnts,u8 *data) {u8 offset, word_en;
Signature · 1 line
2.33.0
PATCH v3 28/40 staging: r8188eu: remove Efuse_PgPacketRead from hal_ops
In reply to Michael StraubeRemove Efuse_PgPacketRead from hal_ops and remove its wrapper Efuse_PgPacketRead(). Call rtl8188e_Efuse_PgPacketRead() directly instead.
--- drivers/staging/r8188eu/core/rtw_efuse.c | 9 --------- drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 2 +- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 5 ++--- drivers/staging/r8188eu/include/hal_intf.h | 3 +-- drivers/staging/r8188eu/include/rtw_efuse.h | 1 - 5 files changed, 4 insertions(+), 16 deletions(-)
drivers/staging/r8188eu/core/rtw_efuse.c +0 -9
@@ -247,15 +247,6 @@ u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data, bool pseudo)return result; } -int Efuse_PgPacketRead (struct adapter *pAdapter,u8 offset,u8 *data,bool pseudo) -{ -int ret =0 ; - - ret = pAdapter->HalFunc.Efuse_PgPacketRead (pAdapter, offset, data, pseudo); - -return ret; -} -int Efuse_PgPacketWrite (struct adapter *pAdapter,u8 offset,u8 word_en,u8 *data,bool pseudo) {int ret;
drivers/staging/r8188eu/core/rtw_mp_ioctl.c +1 -1
@@ -974,7 +974,7 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)if (poid_par_priv->type_of_oid ==QUERY_OID ) {rtl8188e_EfusePowerSwitch (Adapter, false, true); -if (Efuse_PgPacketRead (Adapter, ppgpkt->offset, ppgpkt->data, false)) +if (rtl8188e_Efuse_PgPacketRead (Adapter, ppgpkt->offset, ppgpkt->data, false)) *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;else status =NDIS_STATUS_FAILURE ;
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +2 -3
@@ -1294,7 +1294,7 @@ static int Hal_EfusePgPacketRead_Pseudo(struct adapter *pAdapter, u8 offset, u8return ret; } -static int rtl8188e_Efuse_PgPacketRead (struct adapter *pAdapter,u8 offset,u8 *data,bool bPseudoTest) +int rtl8188e_Efuse_PgPacketRead (struct adapter *pAdapter,u8 offset,u8 *data,bool bPseudoTest) {int ret;
@@ -1313,7 +1313,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, stmemset ((void *)originaldata,0xff ,8 ); -if (Efuse_PgPacketRead (pAdapter, pFixPkt->offset, originaldata, bPseudoTest)) { +if (rtl8188e_Efuse_PgPacketRead (pAdapter, pFixPkt->offset, originaldata, bPseudoTest)) {/* check if data exist */ badworden =Efuse_WordEnableDataWrite (pAdapter, efuse_addr +1 , pFixPkt->word_en, originaldata, bPseudoTest);
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;/* Efuse related function */ - pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead; pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite; pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
drivers/staging/r8188eu/include/hal_intf.h +1 -2
@@ -177,8 +177,6 @@ struct hal_ops { enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -int (*Efuse_PgPacketRead)(struct adapter *adapter,u8 offset, -u8 *data,bool bPseudoTest);int (*Efuse_PgPacketWrite)(struct adapter *padapter,u8 offset,u8 word_en,u8 *data,bool bPseudoTest); u8 (*Efuse_WordEnableDataWrite)(struct adapter *padapter,
@@ -220,6 +218,7 @@ void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,void rtl8188e_EFUSE_GetEfuseDefinition (struct adapter *pAdapter,u8 efuseType,u8 type,void *pOut,bool bPseudoTest);u16 rtl8188e_EfuseGetCurrentSize (struct adapter *pAdapter,u8 efuseType,bool bPseudoTest); +int rtl8188e_Efuse_PgPacketRead (struct adapter *pAdapter,u8 offset,u8 *data,bool bPseudoTest);void rtw_hal_free_data (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);
drivers/staging/r8188eu/include/rtw_efuse.h +0 -1
@@ -116,7 +116,6 @@ void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);u8 efuse_OneByteRead (struct adapter *adapter,u16 addr,u8 *data,bool test);u8 efuse_OneByteWrite (struct adapter *adapter,u16 addr,u8 data,bool test); -int Efuse_PgPacketRead (struct adapter *adapt,u8 offset,u8 *data,bool test);int Efuse_PgPacketWrite (struct adapter *adapter,u8 offset,u8 word,u8 *data,bool test);void efuse_WordEnableDataRead (u8 word_en,u8 *sourdata,u8 *targetdata);
Signature · 1 line
2.33.0
PATCH v3 29/40 staging: r8188eu: remove Efuse_PgPacketWrite from hal_ops
In reply to Michael StraubeRemove Efuse_PgPacketWrite from hal_ops and remove its wrapper Efuse_PgPacketWrite(). Call rtl8188e_Efuse_PgPacketWrite() directly instead.
--- drivers/staging/r8188eu/core/rtw_efuse.c | 11 +---------- drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 2 +- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 9 ++++----- drivers/staging/r8188eu/include/hal_intf.h | 3 +-- drivers/staging/r8188eu/include/rtw_efuse.h | 2 -- 5 files changed, 7 insertions(+), 20 deletions(-)
drivers/staging/r8188eu/core/rtw_efuse.c +1 -10
@@ -247,15 +247,6 @@ u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data, bool pseudo)return result; } -int Efuse_PgPacketWrite (struct adapter *pAdapter,u8 offset,u8 word_en,u8 *data,bool pseudo) -{ -int ret; - - ret = pAdapter->HalFunc.Efuse_PgPacketWrite (pAdapter, offset, word_en, data, pseudo); - -return ret; -} -/*----------------------------------------------------------------------------- * Function: efuse_WordEnableDataRead *
@@ -473,7 +464,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) }if (word_en !=0xF ) { - ret =Efuse_PgPacketWrite (padapter, offset, word_en, newdata, false); + ret =rtl8188e_Efuse_PgPacketWrite (padapter, offset, word_en, newdata, false);DBG_88E ("offset=%x\n" , offset);DBG_88E ("word_en=%x\n" , word_en);
drivers/staging/r8188eu/core/rtw_mp_ioctl.c +1 -1
@@ -981,7 +981,7 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)rtl8188e_EfusePowerSwitch (Adapter, false, false); }else {rtl8188e_EfusePowerSwitch (Adapter, true, true); -if (Efuse_PgPacketWrite (Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false)) +if (rtl8188e_Efuse_PgPacketWrite (Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false)) *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;else status =NDIS_STATUS_FAILURE ;
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +4 -5
@@ -1318,7 +1318,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st badworden =Efuse_WordEnableDataWrite (pAdapter, efuse_addr +1 , pFixPkt->word_en, originaldata, bPseudoTest);if (badworden !=0xf ) {/* write fail */ - PgWriteSuccess =Efuse_PgPacketWrite (pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest); + PgWriteSuccess =rtl8188e_Efuse_PgPacketWrite (pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest);if (!PgWriteSuccess)return false;
@@ -1448,7 +1448,7 @@ static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, ureturn true; }else {/* reorganize other pg packet */ - PgWriteSuccess =Efuse_PgPacketWrite (pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest); + PgWriteSuccess =rtl8188e_Efuse_PgPacketWrite (pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);if (!PgWriteSuccess)return false;else
@@ -1574,7 +1574,7 @@ static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, uu32 PgWriteSuccess =0 ;/* if write fail on some words, write these bad words again */ - PgWriteSuccess =Efuse_PgPacketWrite (pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest); + PgWriteSuccess =rtl8188e_Efuse_PgPacketWrite (pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);if (!PgWriteSuccess) { bRet = false;/* write fail, return */
@@ -1665,7 +1665,7 @@ static int Hal_EfusePgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_ereturn ret; } -static int rtl8188e_Efuse_PgPacketWrite (struct adapter *pAdapter,u8 offset,u8 word_en,u8 *data,bool bPseudoTest) +int rtl8188e_Efuse_PgPacketWrite (struct adapter *pAdapter,u8 offset,u8 word_en,u8 *data,bool bPseudoTest) {int ret;
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;/* Efuse related function */ - pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite; pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite; pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
drivers/staging/r8188eu/include/hal_intf.h +1 -2
@@ -177,8 +177,6 @@ struct hal_ops { enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -int (*Efuse_PgPacketWrite)(struct adapter *padapter,u8 offset, -u8 word_en,u8 *data,bool bPseudoTest);u8 (*Efuse_WordEnableDataWrite)(struct adapter *padapter,u16 efuse_addr,u8 word_en,u8 *data,bool bPseudoTest);
@@ -219,6 +217,7 @@ void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut, bool bPseudoTest);u16 rtl8188e_EfuseGetCurrentSize (struct adapter *pAdapter,u8 efuseType,bool bPseudoTest);int rtl8188e_Efuse_PgPacketRead (struct adapter *pAdapter,u8 offset,u8 *data,bool bPseudoTest); +int rtl8188e_Efuse_PgPacketWrite (struct adapter *pAdapter,u8 offset,u8 word_en,u8 *data,bool bPseudoTest);void rtw_hal_free_data (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);
drivers/staging/r8188eu/include/rtw_efuse.h +0 -2
@@ -116,8 +116,6 @@ void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);u8 efuse_OneByteRead (struct adapter *adapter,u16 addr,u8 *data,bool test);u8 efuse_OneByteWrite (struct adapter *adapter,u16 addr,u8 data,bool test); -int Efuse_PgPacketWrite (struct adapter *adapter,u8 offset,u8 word,u8 *data, -bool test);void efuse_WordEnableDataRead (u8 word_en,u8 *sourdata,u8 *targetdata);u8 Efuse_WordEnableDataWrite (struct adapter *adapter,u16 efuse_addr,u8 word_en,u8 *data,bool test);
Signature · 1 line
2.33.0
PATCH v3 30/40 staging: r8188eu: remove Efuse_WordEnableDataWrite from hal_ops
In reply to Michael StraubeRemove Efuse_WordEnableDataWrite from hal_ops and remove its wrapper Efuse_WordEnableDataWrite(). Call rtl8188e_Efuse_WordEnableDataWrite() directly instead.
--- drivers/staging/r8188eu/core/rtw_efuse.c | 9 --------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 9 +++------ drivers/staging/r8188eu/include/hal_intf.h | 4 ---- drivers/staging/r8188eu/include/rtw_efuse.h | 2 -- 4 files changed, 3 insertions(+), 21 deletions(-)
drivers/staging/r8188eu/core/rtw_efuse.c +0 -9
@@ -284,15 +284,6 @@ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata) } } -u8 Efuse_WordEnableDataWrite (struct adapter *pAdapter,u16 efuse_addr,u8 word_en,u8 *data,bool pseudo) -{ -u8 ret =0 ; - - ret = pAdapter->HalFunc.Efuse_WordEnableDataWrite (pAdapter, efuse_addr, word_en, data, pseudo); - -return ret; -} -static u8 efuse_read8 (struct adapter *padapter,u16 address,u8 *value) {return efuse_OneByteRead (padapter, address, value, false);
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +3 -6
@@ -1315,7 +1315,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, stif (rtl8188e_Efuse_PgPacketRead (pAdapter, pFixPkt->offset, originaldata, bPseudoTest)) {/* check if data exist */ - badworden =Efuse_WordEnableDataWrite (pAdapter, efuse_addr +1 , pFixPkt->word_en, originaldata, bPseudoTest); + badworden =rtl8188e_Efuse_WordEnableDataWrite (pAdapter, efuse_addr +1 , pFixPkt->word_en, originaldata, bPseudoTest);if (badworden !=0xf ) {/* write fail */ PgWriteSuccess =rtl8188e_Efuse_PgPacketWrite (pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest);
@@ -1442,7 +1442,7 @@ static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, uu32 PgWriteSuccess =0 ; badworden =0x0f ; - badworden =Efuse_WordEnableDataWrite (pAdapter, efuse_addr +1 , pTargetPkt->word_en, pTargetPkt->data, bPseudoTest); + badworden =rtl8188e_Efuse_WordEnableDataWrite (pAdapter, efuse_addr +1 , pTargetPkt->word_en, pTargetPkt->data, bPseudoTest);if (badworden ==0x0F ) {/* write ok */ return true;
@@ -1569,7 +1569,7 @@ static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, u (!hal_EfuseCheckIfDatafollowed(pAdapter, curPkt.word_cnts, startAddr + 1, bPseudoTest)) && wordEnMatched(pTargetPkt, &curPkt, &matched_wden)) {/* Here to write partial data */ - badworden =Efuse_WordEnableDataWrite (pAdapter, startAddr +1 , matched_wden, pTargetPkt->data, bPseudoTest); + badworden =rtl8188e_Efuse_WordEnableDataWrite (pAdapter, startAddr +1 , matched_wden, pTargetPkt->data, bPseudoTest);if (badworden !=0x0F ) {u32 PgWriteSuccess =0 ;/* if write fail on some words, write these bad words again */
@@ -1781,9 +1781,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg; pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg; -/* Efuse related function */ - pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite; - pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync; pHalFunc->hal_notch_filter = &hal_notch_filter_8188e;
drivers/staging/r8188eu/include/hal_intf.h +0 -4
@@ -177,10 +177,6 @@ struct hal_ops { enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -u8 (*Efuse_WordEnableDataWrite)(struct adapter *padapter, -u16 efuse_addr,u8 word_en, -u8 *data,bool bPseudoTest); -int (*IOL_exec_cmds_sync)(struct adapter *padapter,struct xmit_frame *frame,u32 max_wait,u32 bndy_cnt);
drivers/staging/r8188eu/include/rtw_efuse.h +0 -2
@@ -117,8 +117,6 @@ u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);u8 efuse_OneByteWrite (struct adapter *adapter,u16 addr,u8 data,bool test);void efuse_WordEnableDataRead (u8 word_en,u8 *sourdata,u8 *targetdata); -u8 Efuse_WordEnableDataWrite (struct adapter *adapter,u16 efuse_addr, -u8 word_en,u8 *data,bool test);u8 EFUSE_Read1Byte (struct adapter *adapter,u16 address);void EFUSE_ShadowMapUpdate (struct adapter *adapter,u8 efusetype,bool test);
Signature · 1 line
2.33.0
PATCH v3 31/40 staging: r8188eu: remove useless assignment
In reply to Michael StraubeThe local variable badworden is set to a new value immediately after an assignment. Remove the useless assignment and initialization.
--- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +1 -2
@@ -1438,10 +1438,9 @@ static bool hal_EfusePgPacketWrite1ByteHeader(struct adapter *pAdapter, u8 efusestatic bool hal_EfusePgPacketWriteData (struct adapter *pAdapter,u8 efuseType,u16 *pAddr,struct pgpkt *pTargetPkt,bool bPseudoTest) {u16 efuse_addr = *pAddr; -u8 badworden =0 ; +u8 badworden;u32 PgWriteSuccess =0 ; - badworden =0x0f ; badworden =rtl8188e_Efuse_WordEnableDataWrite (pAdapter, efuse_addr +1 , pTargetPkt->word_en, pTargetPkt->data, bPseudoTest);if (badworden ==0x0F ) {/* write ok */
Signature · 1 line
2.33.0
PATCH v3 32/40 staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops
In reply to Michael StraubeRemove AntDivBeforeLinkHandler from hal_ops and remove its wrapper rtw_hal_antdiv_before_linked(). Call AntDivBeforeLink8188E() directly instead.
--- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 7 ------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 2 -- 4 files changed, 1 insertion(+), 11 deletions(-)
drivers/staging/r8188eu/core/rtw_mlme_ext.c +1 -1
@@ -6370,7 +6370,7 @@ void site_survey(struct adapter *padapter)/* 20100721:Interrupt scan operation here. */ /* For SW antenna diversity before link, it needs to switch to another antenna and scan again. */ /* It compares the scan result and select beter one to do connection. */ -if (rtw_hal_antdiv_before_linked (padapter)) { +if (AntDivBeforeLink8188E (padapter)) { pmlmeext->sitesurvey_res.bss_cnt =0 ; pmlmeext->sitesurvey_res.channel_idx =-1 ; pmlmeext->chan_scan_time =SURVEY_TO /2 ;
drivers/staging/r8188eu/hal/hal_intf.c +0 -7
@@ -206,13 +206,6 @@ void rtw_hal_bcn_related_reg_setting(struct adapter *adapt) adapt->HalFunc.SetBeaconRelatedRegistersHandler (adapt); } -u8 rtw_hal_antdiv_before_linked (struct adapter *adapt) -{ -if (adapt->HalFunc.AntDivBeforeLinkHandler) -return adapt->HalFunc.AntDivBeforeLinkHandler (adapt); -return false; -} -void rtw_hal_antdiv_rssi_compared (struct adapter *adapt,struct wlan_bssid_ex *dst,struct wlan_bssid_ex *src)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1773,7 +1773,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->run_thread = &rtl8188e_start_thread; pHalFunc->cancel_thread = &rtl8188e_stop_thread; - pHalFunc->AntDivBeforeLinkHandler = &AntDivBeforeLink8188E; pHalFunc->AntDivCompareHandler = &AntDivCompare8188E; pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg; pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg;
drivers/staging/r8188eu/include/hal_intf.h +0 -2
@@ -156,7 +156,6 @@ struct hal_ops {void (*run_thread)(struct adapter *adapter);void (*cancel_thread)(struct adapter *adapter); -u8 (*AntDivBeforeLinkHandler)(struct adapter *adapter);void (*AntDivCompareHandler)(struct adapter *adapter,struct wlan_bssid_ex *dst,struct wlan_bssid_ex *src);
@@ -256,7 +255,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter, enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -u8 rtw_hal_antdiv_before_linked (struct adapter *padapter);void rtw_hal_antdiv_rssi_compared (struct adapter *padapter,struct wlan_bssid_ex *dst,struct wlan_bssid_ex *src);
Signature · 1 line
2.33.0
PATCH v3 33/40 staging: r8188eu: remove AntDivCompareHandler from hal_ops
In reply to Michael StraubeRemove AntDivCompareHandler from hal_ops and remove its wrapper rtw_hal_antdiv_rssi_compared(). Call AntDivCompare8188E() directly instead.
--- drivers/staging/r8188eu/core/rtw_mlme.c | 3 ++- drivers/staging/r8188eu/hal/hal_intf.c | 8 -------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 8 -------- 4 files changed, 2 insertions(+), 18 deletions(-)
drivers/staging/r8188eu/core/rtw_mlme.c +2 -1
@@ -14,6 +14,7 @@#include "../include/wlan_bssdef.h" #include "../include/rtw_ioctl_set.h" #include "../include/usb_osintf.h" +#include "../include/rtl8188e_dm.h" extern unsigned char MCS_rate_2R[16 ];extern unsigned char MCS_rate_1R[16 ];
@@ -469,7 +470,7 @@ void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,u8 sq_final;long rssi_final; -rtw_hal_antdiv_rssi_compared (padapter, dst, src);/* this will update src.Rssi, need consider again */ +AntDivCompare8188E (padapter, dst, src);/* this will update src.Rssi, need consider again */ /* The rule below is 1/5 for sample value, 4/5 for history value */ if (check_fwstate (&padapter->mlmepriv, _FW_LINKED) &&is_same_network (&padapter->mlmepriv.cur_network.network, src)) {
drivers/staging/r8188eu/hal/hal_intf.c +0 -8
@@ -206,14 +206,6 @@ void rtw_hal_bcn_related_reg_setting(struct adapter *adapt) adapt->HalFunc.SetBeaconRelatedRegistersHandler (adapt); } -void rtw_hal_antdiv_rssi_compared (struct adapter *adapt, -struct wlan_bssid_ex *dst, -struct wlan_bssid_ex *src) -{ -if (adapt->HalFunc.AntDivCompareHandler) - adapt->HalFunc.AntDivCompareHandler (adapt, dst, src); -} -int rtw_hal_iol_cmd (struct adapter *adapter,struct xmit_frame *xmit_frame,u32 max_wating_ms,u32 bndy_cnt) {
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1773,7 +1773,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->run_thread = &rtl8188e_start_thread; pHalFunc->cancel_thread = &rtl8188e_stop_thread; - pHalFunc->AntDivCompareHandler = &AntDivCompare8188E; pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg; pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg; pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
drivers/staging/r8188eu/include/hal_intf.h +0 -8
@@ -156,10 +156,6 @@ struct hal_ops {void (*run_thread)(struct adapter *adapter);void (*cancel_thread)(struct adapter *adapter); -void (*AntDivCompareHandler)(struct adapter *adapter, -struct wlan_bssid_ex *dst, -struct wlan_bssid_ex *src); -s32 (*hal_xmit)(struct adapter *padapter,struct xmit_frame *pxmitframe); s32 (*mgnt_xmit)(struct adapter *padapter,
@@ -255,10 +251,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter, enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); -void rtw_hal_antdiv_rssi_compared (struct adapter *padapter, -struct wlan_bssid_ex *dst, -struct wlan_bssid_ex *src); -int rtw_hal_iol_cmd (struct adapter *adapter,struct xmit_frame *xmit_frame,u32 max_wating_ms,u32 bndy_cnt);
Signature · 1 line
2.33.0
PATCH v3 34/40 staging: r8188eu: remove empty function rtl8188e_start_thread()
In reply to Michael StraubeRemove empty function rtl8188e_start_thread() and related code.
--- drivers/staging/r8188eu/hal/hal_intf.c | 7 ------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 5 ----- drivers/staging/r8188eu/include/hal_intf.h | 2 -- drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 - drivers/staging/r8188eu/os_dep/os_intfs.c | 1 - 5 files changed, 16 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -7
@@ -151,13 +151,6 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level) } } -/* Start specifical interface thread */ -void rtw_hal_start_thread (struct adapter *adapt) -{ -if (adapt->HalFunc.run_thread) - adapt->HalFunc.run_thread (adapt); -} -/* Start specifical interface thread */ void rtw_hal_stop_thread (struct adapter *adapt) {
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -5
@@ -1748,10 +1748,6 @@ void rtl8188e_clone_haldata(struct adapter *dst_adapter, struct adapter *src_adamemcpy (dst_adapter->HalData, src_adapter->HalData, dst_adapter->hal_data_sz); } -void rtl8188e_start_thread (struct adapter *padapter) -{ -} -void rtl8188e_stop_thread (struct adapter *padapter) { }
@@ -1770,7 +1766,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) { pHalFunc->free_hal_data = &rtl8188e_free_hal_data; - pHalFunc->run_thread = &rtl8188e_start_thread; pHalFunc->cancel_thread = &rtl8188e_stop_thread; pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg;
drivers/staging/r8188eu/include/hal_intf.h +0 -2
@@ -153,7 +153,6 @@ struct hal_ops { u32 mac_id, u8 rssi_level);void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter); -void (*run_thread)(struct adapter *adapter);void (*cancel_thread)(struct adapter *adapter); s32 (*hal_xmit)(struct adapter *padapter,
@@ -237,7 +236,6 @@ 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); -void rtw_hal_start_thread (struct adapter *padapter);void rtw_hal_stop_thread (struct adapter *padapter);void rtw_hal_bcn_related_reg_setting (struct adapter *padapter);
drivers/staging/r8188eu/include/rtl8188e_hal.h +0 -1
@@ -439,7 +439,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc);void rtl8188e_read_chip_version (struct adapter *padapter);void rtl8188e_clone_haldata (struct adapter *dst,struct adapter *src); -void rtl8188e_start_thread (struct adapter *padapter);void rtl8188e_stop_thread (struct adapter *padapter);void rtw_IOL_cmd_tx_pkt_buf_dump (struct adapter *Adapter,int len);
drivers/staging/r8188eu/os_dep/os_intfs.c +0 -1
@@ -733,7 +733,6 @@ u32 rtw_start_drv_threads(struct adapter *padapter)else _rtw_down_sema (&padapter->cmdpriv.terminate_cmdthread_sema);/* wait for cmd_thread to run */ -rtw_hal_start_thread (padapter);return _status; }
Signature · 1 line
2.33.0
PATCH v3 35/40 staging: r8188eu: remove empty function rtl8188e_stop_thread()
In reply to Michael StraubeRemove empty function rtl8188e_stop_thread() and related code.
--- drivers/staging/r8188eu/hal/hal_intf.c | 7 ------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 6 ------ drivers/staging/r8188eu/include/hal_intf.h | 3 --- drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 - drivers/staging/r8188eu/os_dep/os_intfs.c | 2 -- 5 files changed, 19 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -7
@@ -151,13 +151,6 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level) } } -/* Start specifical interface thread */ -void rtw_hal_stop_thread (struct adapter *adapt) -{ -if (adapt->HalFunc.cancel_thread) - adapt->HalFunc.cancel_thread (adapt); -} -u32 rtw_hal_read_bbreg (struct adapter *adapt,u32 regaddr,u32 bitmask) {u32 data =0 ;
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -6
@@ -1748,10 +1748,6 @@ void rtl8188e_clone_haldata(struct adapter *dst_adapter, struct adapter *src_adamemcpy (dst_adapter->HalData, src_adapter->HalData, dst_adapter->hal_data_sz); } -void rtl8188e_stop_thread (struct adapter *padapter) -{ -} -static void hal_notch_filter_8188e (struct adapter *adapter,bool enable) {if (enable) {
@@ -1766,8 +1762,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) { pHalFunc->free_hal_data = &rtl8188e_free_hal_data; - pHalFunc->cancel_thread = &rtl8188e_stop_thread; - pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg; pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg; pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
drivers/staging/r8188eu/include/hal_intf.h +0 -3
@@ -153,8 +153,6 @@ struct hal_ops { u32 mac_id, u8 rssi_level);void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter); -void (*cancel_thread)(struct adapter *adapter); -s32 (*hal_xmit)(struct adapter *padapter,struct xmit_frame *pxmitframe); s32 (*mgnt_xmit)(struct adapter *padapter,
@@ -236,7 +234,6 @@ 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); -void rtw_hal_stop_thread (struct adapter *padapter);void rtw_hal_bcn_related_reg_setting (struct adapter *padapter);
drivers/staging/r8188eu/include/rtl8188e_hal.h +0 -1
@@ -439,7 +439,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc);void rtl8188e_read_chip_version (struct adapter *padapter);void rtl8188e_clone_haldata (struct adapter *dst,struct adapter *src); -void rtl8188e_stop_thread (struct adapter *padapter);void rtw_IOL_cmd_tx_pkt_buf_dump (struct adapter *Adapter,int len);s32 rtl8188e_iol_efuse_patch (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/os_intfs.c +0 -2
@@ -742,8 +742,6 @@ void rtw_stop_drv_threads(struct adapter *padapter)up (&padapter->cmdpriv.cmd_queue_sema);if (padapter->cmdThread)_rtw_down_sema (&padapter->cmdpriv.terminate_cmdthread_sema); - -rtw_hal_stop_thread (padapter); }static u8 rtw_init_default_value (struct adapter *padapter)
Signature · 1 line
2.33.0
PATCH v3 36/40 staging: r8188eu: remove hal_notch_filter from hal_ops
In reply to Michael StraubeRemove hal_notch_filter from hal_ops and remove its wrapper rtw_hal_notch_filter(). Call hal_notch_filter_8188e() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 8 +------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 4 +--- drivers/staging/r8188eu/include/hal_intf.h | 6 ++---- 3 files changed, 4 insertions(+), 14 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +1 -7
@@ -24,7 +24,7 @@ uint rtw_hal_init(struct adapter *adapt) adapt->hw_init_completed = true;if (adapt->registrypriv.notch_filter ==1 ) -rtw_hal_notch_filter (adapt,1 ); +hal_notch_filter_8188e (adapt,1 ); }else { adapt->hw_init_completed = false;DBG_88E ("rtw_hal_init: hal__init fail\n" );
@@ -201,9 +201,3 @@ int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame, bndy_cnt);return _FAIL; } - -void rtw_hal_notch_filter (struct adapter *adapter,bool enable) -{ -if (adapter->HalFunc.hal_notch_filter) - adapter->HalFunc.hal_notch_filter (adapter, enable); -}
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +1 -3
@@ -1748,7 +1748,7 @@ void rtl8188e_clone_haldata(struct adapter *dst_adapter, struct adapter *src_adamemcpy (dst_adapter->HalData, src_adapter->HalData, dst_adapter->hal_data_sz); } -static void hal_notch_filter_8188e (struct adapter *adapter,bool enable) +void hal_notch_filter_8188e (struct adapter *adapter,bool enable) {if (enable) {DBG_88E ("Enable notch filter\n" );
@@ -1768,8 +1768,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg; pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync; - - pHalFunc->hal_notch_filter = &hal_notch_filter_8188e; }u8 GetEEPROMSize8188E (struct adapter *padapter)
drivers/staging/r8188eu/include/hal_intf.h +2 -4
@@ -172,8 +172,6 @@ struct hal_ops {int (*IOL_exec_cmds_sync)(struct adapter *padapter,struct xmit_frame *frame,u32 max_wait,u32 bndy_cnt); - -void (*hal_notch_filter)(struct adapter *adapter,bool enable); };#define RF_CHANGE_BY_INIT 0
@@ -207,6 +205,8 @@ u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPint rtl8188e_Efuse_PgPacketRead (struct adapter *pAdapter,u8 offset,u8 *data,bool bPseudoTest);int rtl8188e_Efuse_PgPacketWrite (struct adapter *pAdapter,u8 offset,u8 word_en,u8 *data,bool bPseudoTest); +void hal_notch_filter_8188e (struct adapter *adapter,bool enable); +void rtw_hal_free_data (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);uint rtw_hal_deinit (struct adapter *padapter);
@@ -249,8 +249,6 @@ void rtw_hal_write_rfreg(struct adapter *padapter,int rtw_hal_iol_cmd (struct adapter *adapter,struct xmit_frame *xmit_frame,u32 max_wating_ms,u32 bndy_cnt); -void rtw_hal_notch_filter (struct adapter *adapter,bool enable); -void indicate_wx_scan_complete_event (struct adapter *padapter);u8 rtw_do_join (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v3 37/40 staging: r8188eu: remove free_hal_data from hal_ops
In reply to Michael StraubeRemove free_hal_data from hal_ops and remove its wrapper rtw_hal_free_data(). Call rtl8188e_free_hal_data() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 6 +----- drivers/staging/r8188eu/include/hal_intf.h | 5 +---- drivers/staging/r8188eu/os_dep/os_intfs.c | 2 +- 4 files changed, 3 insertions(+), 16 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -6,12 +6,6 @@#include "../include/drv_types.h" #include "../include/hal_intf.h" -void rtw_hal_free_data (struct adapter *adapt) -{ -if (adapt->HalFunc.free_hal_data) - adapt->HalFunc.free_hal_data (adapt); -} -uint rtw_hal_init (struct adapter *adapt) {uint status = _SUCCESS;
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +1 -5
@@ -669,12 +669,10 @@ void rtl8188e_InitializeFirmwareVars(struct adapter *padapter) pHalData->LastHMEBoxNum =0 ; } -static void rtl8188e_free_hal_data (struct adapter *padapter) +void rtl8188e_free_hal_data (struct adapter *padapter) { -kfree (padapter->HalData); padapter->HalData =NULL ; - }/* */
@@ -1760,8 +1758,6 @@ void hal_notch_filter_8188e(struct adapter *adapter, bool enable) }void rtl8188e_set_hal_ops (struct hal_ops *pHalFunc) { - pHalFunc->free_hal_data = &rtl8188e_free_hal_data; - pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg; pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg; pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
drivers/staging/r8188eu/include/hal_intf.h +1 -4
@@ -127,8 +127,6 @@ struct hal_ops {u32 (*hal_init)(struct adapter *padapter);u32 (*hal_deinit)(struct adapter *padapter); -void (*free_hal_data)(struct adapter *padapter); -u32 (*inirp_init)(struct adapter *padapter);u32 (*inirp_deinit)(struct adapter *padapter);
@@ -194,7 +192,7 @@ void rtl8188eu_init_default_value(struct adapter *adapt);void rtl8188e_SetHalODMVar (struct adapter *Adapter,enum hal_odm_variable eVariable,void *pValue1,bool bSet);u32 rtl8188eu_InitPowerOn (struct adapter *adapt); - +void rtl8188e_free_hal_data (struct adapter *padapter);void rtl8188e_EfusePowerSwitch (struct adapter *pAdapter,u8 bWrite,u8 PwrState); void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf,
@@ -207,7 +205,6 @@ int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_envoid hal_notch_filter_8188e (struct adapter *adapter,bool enable); -void rtw_hal_free_data (struct adapter *padapter);uint rtw_hal_init (struct adapter *padapter);uint rtw_hal_deinit (struct adapter *padapter);void rtw_hal_stop (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/os_intfs.c +1 -1
@@ -946,7 +946,7 @@ u8 rtw_free_drv_sw(struct adapter *padapter)rtw_free_pwrctrl_priv (padapter); -rtw_hal_free_data (padapter); +rtl8188e_free_hal_data (padapter);/* free the old_pnetdev */ if (padapter->rereg_nd_name_priv.old_pnetdev) {
Signature · 1 line
2.33.0
PATCH v3 38/40 staging: r8188eu: remove unused function rtl8188e_clone_haldata()
In reply to Michael StraubeRemove unused function rtl8188e_clone_haldata().
--- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 5 ----- drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 -- 2 files changed, 7 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -5
@@ -1741,11 +1741,6 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVaria } } -void rtl8188e_clone_haldata (struct adapter *dst_adapter,struct adapter *src_adapter) -{ -memcpy (dst_adapter->HalData, src_adapter->HalData, dst_adapter->hal_data_sz); -} -void hal_notch_filter_8188e (struct adapter *adapter,bool enable) {if (enable) {
drivers/staging/r8188eu/include/rtl8188e_hal.h +0 -2
@@ -438,8 +438,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc);void rtl8188e_read_chip_version (struct adapter *padapter); -void rtl8188e_clone_haldata (struct adapter *dst,struct adapter *src); -void rtw_IOL_cmd_tx_pkt_buf_dump (struct adapter *Adapter,int len);s32 rtl8188e_iol_efuse_patch (struct adapter *padapter);void rtw_cancel_all_timer (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH v3 39/40 staging: r8188eu: remove SetBeaconRelatedRegistersHandler from hal_ops
In reply to Michael StraubeRemove SetBeaconRelatedRegistersHandler from hal_ops and remove its wrapper rtw_hal_bcn_related_reg_setting().
Call SetBeaconRelatedRegisters8188EUsb() directly instead.
--- drivers/staging/r8188eu/core/rtw_wlan_util.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/r8188eu/include/hal_intf.h | 5 ++--- 4 files changed, 4 insertions(+), 12 deletions(-)
drivers/staging/r8188eu/core/rtw_wlan_util.c +1 -1
@@ -1525,7 +1525,7 @@ void correct_TSF(struct adapter *padapter, struct mlme_ext_priv *pmlmeext)void beacon_timing_control (struct adapter *padapter) { -rtw_hal_bcn_related_reg_setting (padapter); +SetBeaconRelatedRegisters8188EUsb (padapter); }static struct adapter *pbuddy_padapter;
drivers/staging/r8188eu/hal/hal_intf.c +0 -6
@@ -180,12 +180,6 @@ void rtw_hal_write_rfreg(struct adapter *adapt, enum rf_radio_path rfpath, bitmask, data); } -void rtw_hal_bcn_related_reg_setting (struct adapter *adapt) -{ -if (adapt->HalFunc.SetBeaconRelatedRegistersHandler) - adapt->HalFunc.SetBeaconRelatedRegistersHandler (adapt); -} -int rtw_hal_iol_cmd (struct adapter *adapter,struct xmit_frame *xmit_frame,u32 max_wating_ms,u32 bndy_cnt) {
drivers/staging/r8188eu/hal/usb_halinit.c +1 -2
@@ -2147,7 +2147,7 @@ static void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_l psta->init_rate = init_rate; } -static void SetBeaconRelatedRegisters8188EUsb (struct adapter *adapt) +void SetBeaconRelatedRegisters8188EUsb (struct adapter *adapt) {u32 value32;struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv;
@@ -2231,7 +2231,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb; halfunc->UpdateRAMaskHandler = &UpdateHalRAMask8188EUsb; - halfunc->SetBeaconRelatedRegistersHandler = &SetBeaconRelatedRegisters8188EUsb; halfunc->hal_xmit = &rtl8188eu_hal_xmit; halfunc->mgnt_xmit = &rtl8188eu_mgnt_xmit;
drivers/staging/r8188eu/include/hal_intf.h +2 -3
@@ -149,7 +149,6 @@ struct hal_ops {void (*UpdateRAMaskHandler)(struct adapter *padapter,u32 mac_id,u8 rssi_level); -void (*SetBeaconRelatedRegistersHandler)(struct adapter *padapter);s32 (*hal_xmit)(struct adapter *padapter,struct xmit_frame *pxmitframe);
@@ -205,6 +204,8 @@ int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_envoid hal_notch_filter_8188e (struct adapter *adapter,bool enable); +void SetBeaconRelatedRegisters8188EUsb (struct adapter *adapt); +uint rtw_hal_init (struct adapter *padapter);uint rtw_hal_deinit (struct adapter *padapter);void rtw_hal_stop (struct adapter *padapter);
@@ -232,8 +233,6 @@ 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); -void rtw_hal_bcn_related_reg_setting (struct adapter *padapter); -u32 rtw_hal_read_bbreg (struct adapter *padapter,u32 RegAddr,u32 BitMask);void rtw_hal_write_bbreg (struct adapter *padapter,u32 RegAddr,u32 BitMask,u32 Data);
Signature · 1 line
2.33.0
PATCH v3 40/40 staging: r8188eu: remove UpdateHalRAMask8188EUsb from hal_ops
In reply to Michael StraubeRemove UpdateHalRAMask8188EUsb from hal_ops and call UpdateHalRAMask8188EUsb() directly instead.
--- drivers/staging/r8188eu/hal/hal_intf.c | 4 +--- drivers/staging/r8188eu/hal/usb_halinit.c | 4 +--- drivers/staging/r8188eu/include/hal_intf.h | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-)
drivers/staging/r8188eu/hal/hal_intf.c +1 -3
@@ -139,9 +139,7 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level)add_RATid (adapt, psta,0 );/* todo: based on rssi_level*/ #endif }else { -if (adapt->HalFunc.UpdateRAMaskHandler) - adapt->HalFunc.UpdateRAMaskHandler (adapt, mac_id, - rssi_level); +UpdateHalRAMask8188EUsb (adapt, mac_id, rssi_level); } }
drivers/staging/r8188eu/hal/usb_halinit.c +1 -3
@@ -2064,7 +2064,7 @@ static u8 SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVreturn bResult; } -static void UpdateHalRAMask8188EUsb (struct adapter *adapt,u32 mac_id,u8 rssi_level) +void UpdateHalRAMask8188EUsb (struct adapter *adapt,u32 mac_id,u8 rssi_level) {u8 init_rate =0 ;u8 networkType, raid;
@@ -2230,8 +2230,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb; halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb; - halfunc->UpdateRAMaskHandler = &UpdateHalRAMask8188EUsb; - halfunc->hal_xmit = &rtl8188eu_hal_xmit; halfunc->mgnt_xmit = &rtl8188eu_mgnt_xmit;
drivers/staging/r8188eu/include/hal_intf.h +1 -3
@@ -147,9 +147,6 @@ struct hal_ops {enum hal_def_variable eVariable, void *pValue); -void (*UpdateRAMaskHandler)(struct adapter *padapter, -u32 mac_id,u8 rssi_level); -s32 (*hal_xmit)(struct adapter *padapter,struct xmit_frame *pxmitframe); s32 (*mgnt_xmit)(struct adapter *padapter,
@@ -205,6 +202,7 @@ int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_envoid hal_notch_filter_8188e (struct adapter *adapter,bool enable);void SetBeaconRelatedRegisters8188EUsb (struct adapter *adapt); +void UpdateHalRAMask8188EUsb (struct adapter *adapt,u32 mac_id,u8 rssi_level);uint rtw_hal_init (struct adapter *padapter);uint rtw_hal_deinit (struct adapter *padapter);
Signature · 1 line
2.33.0
Quoted 6 lines · Michael Straube
In order to get rid of the HAL layer this series removes the next bunch of function pointers from struct
hal_ops.Also it removes some empty functions and cleans up some minor style issues I stumbled upon.
Quoted 8 lines
Tested on
x86_64with Inter-Tech DMG-02.v1 -> v2
Fixed typos in commit messages.v2 -> v3
Added this missing patchset version changelog.
Can you please hold on litle bit longer before you send next patch series. This will make quite bit traffic on the lists and it does not add value. Wait for bit for reviewers and after that make new series. You can even post below yours own messages if you found some mistake and point out that you will change it when you send next series. Good hold on time would be 3-7 days with series this big imo.
Quoted 67 lines
Michael Straube (40):
staging: r8188eu: remove InitSwLeds fromhal_ops
staging: r8188eu: remove DeInitSwLeds fromhal_ops
staging: r8188eu: removedm_initfromhal_ops
staging: r8188eu: removedm_deinitfromhal_ops
staging: r8188eu: remove SetHalODMVarHandler fromhal_ops
staging: r8188eu: remove empty functions
staging: r8188eu: remove unused functionrtw_interface_ps_func()
staging: r8188eu: removeinterface_ps_funcfromhal_ops
staging: r8188eu: removehal_dm_watchdogfromhal_ops
staging: r8188eu: removeset_bwmode_handlerfromhal_ops
staging: r8188eu: removeset_channel_handlerfromhal_ops
staging: r8188eu: remove unused enumhal_intf_ps_func
staging: r8188eu: removeAdd_RateATidfromhal_ops
staging: r8188eu: removehal_power_onfromhal_ops
staging: r8188eu: removesreset_init_valuefromhal_ops
staging: r8188eu: removesreset_reset_valuefromhal_ops
staging: r8188eu: remove silentreset fromhal_ops
staging: r8188eu: removesreset_xmit_status_checkfromhal_ops
staging: r8188eu: removesreset_linked_status_checkfromhal_ops
staging: r8188eu: removesreset_get_wifi_statusfromhal_ops
staging: r8188eu: remove EfusePowerSwitch fromhal_ops
staging: r8188eu: renamehal_EfusePowerSwitch_RTL8188E()
staging: r8188eu: remove wrapperEfuse_PowerSwitch()
staging: r8188eu: remove ReadEFuse fromhal_ops
staging: r8188eu: remove EFUSEGetEfuseDefinition fromhal_ops
staging: r8188eu: remove EfuseGetCurrentSize fromhal_ops
staging: r8188eu: remove empty comments
staging: r8188eu: removeEfuse_PgPacketReadfromhal_ops
staging: r8188eu: removeEfuse_PgPacketWritefromhal_ops
staging: r8188eu: removeEfuse_WordEnableDataWritefromhal_ops
staging: r8188eu: remove useless assignment
staging: r8188eu: remove AntDivBeforeLinkHandler fromhal_ops
staging: r8188eu: remove AntDivCompareHandler fromhal_ops
staging: r8188eu: remove empty functionrtl8188e_start_thread()
staging: r8188eu: remove empty functionrtl8188e_stop_thread()
staging: r8188eu: removehal_notch_filterfromhal_ops
staging: r8188eu: removefree_hal_datafromhal_ops
staging: r8188eu: remove unused functionrtl8188e_clone_haldata()
staging: r8188eu: remove SetBeaconRelatedRegistersHandler fromhal_ops
staging: r8188eu: remove UpdateHalRAMask8188EUsb fromhal_opsdrivers/staging/r8188eu/core/rtw_ap.c | 9 +- drivers/staging/r8188eu/core/rtw_cmd.c | 6 +- drivers/staging/r8188eu/core/rtw_efuse.c | 182 ++++-------------- drivers/staging/r8188eu/core/rtw_mlme.c | 7 +- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 5 +- drivers/staging/r8188eu/core/rtw_mp_ioctl.c | 18 +- drivers/staging/r8188eu/core/rtw_p2p.c | 4 +- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 8 - drivers/staging/r8188eu/core/rtw_sta_mgt.c | 2 +- drivers/staging/r8188eu/core/rtw_wlan_util.c | 8 +- drivers/staging/r8188eu/hal/hal_intf.c | 170 +--------------- .../staging/r8188eu/hal/rtl8188e_hal_init.c | 123 +++--------- drivers/staging/r8188eu/hal/usb_halinit.c | 36 +--- drivers/staging/r8188eu/include/hal_intf.h | 123 ++---------- .../staging/r8188eu/include/rtl8188e_hal.h | 5 - drivers/staging/r8188eu/include/rtw_efuse.h | 9 - drivers/staging/r8188eu/include/rtw_pwrctrl.h | 2 - drivers/staging/r8188eu/os_dep/ioctl_linux.c | 31 +-- drivers/staging/r8188eu/os_dep/os_intfs.c | 21 +- 19 files changed, 142 insertions(+), 627 deletions(-)Signature · 1 line
2.33.0
Greg KH
maintainerQuoted 16 lines · Kari Argillander
Quoted 6 lines · Michael Straube
In order to get rid of the HAL layer this series removes the next bunch of function pointers from struct
hal_ops.Also it removes some empty functions and cleans up some minor style issues I stumbled upon.
Quoted 8 lines
Tested on
x86_64with Inter-Tech DMG-02.v1 -> v2
Fixed typos in commit messages.v2 -> v3
Added this missing patchset version changelog.
Quoted 6 lines
Can you please hold on litle bit longer before you send next patch series. This will make quite bit traffic on the lists and it does not add value. Wait for bit for reviewers and after that make new series. You can even post below yours own messages if you found some mistake and point out that you will change it when you send next series. Good hold on time would be 3-7 days with series this big imo.
No need to wait that long, if you know you messed up, sending it again is just fine so that maintainers and reviewers do not start looking at things that you know is incorrect.
But you can just send a response saying "oops, this is wrong, I will resend this in a day".
thanks
greg k-h