diff options
author | Michael Straube <straube.linux@gmail.com> | 2022-04-05 12:49:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-05 16:11:32 +0200 |
commit | 09ff203cb0c5f66ed61db358496e82b8b91b117d (patch) | |
tree | 7e7cbc5354e0db571e69e3c7b048db14476087b8 | |
parent | 72b304d013e9f2b859c2a5795986018dd50d02c8 (diff) | |
download | linux-stable-09ff203cb0c5f66ed61db358496e82b8b91b117d.tar.gz linux-stable-09ff203cb0c5f66ed61db358496e82b8b91b117d.tar.bz2 linux-stable-09ff203cb0c5f66ed61db358496e82b8b91b117d.zip |
staging: r8188eu: remove GetHalDefVar8188EUsb()
The local variable odm_flag in rtw_dbg_port() is set but never used.
This are the last two remaining calls to GetHalDefVar8188EUsb(). Both
calls can be removed and we finally can remove GetHalDefVar8188EUsb()
itself. This is part of the ongoing effort to get rid of the unwanted
hal layer.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220405104910.9769-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/r8188eu/hal/usb_halinit.c | 14 | ||||
-rw-r--r-- | drivers/staging/r8188eu/include/hal_intf.h | 1 | ||||
-rw-r--r-- | drivers/staging/r8188eu/os_dep/ioctl_linux.c | 8 |
3 files changed, 1 insertions, 22 deletions
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 77580191d9db..285282b5fe35 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -1194,20 +1194,6 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val) } -/* Query setting of specified variable. */ -void GetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue) -{ - struct hal_data_8188e *haldata = &Adapter->haldata; - - switch (eVariable) { - case HAL_DEF_DBG_DM_FUNC: - *((u32 *)pValue) = haldata->odmpriv.SupportAbility; - break; - default: - break; - } -} - /* Change default setting of specified variable. */ void SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue) { diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h index 0bc274a695d9..ab6cab1281ab 100644 --- a/drivers/staging/r8188eu/include/hal_intf.h +++ b/drivers/staging/r8188eu/include/hal_intf.h @@ -52,7 +52,6 @@ int rtl8188e_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt); void SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue); -void GetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue); unsigned int rtl8188eu_inirp_init(struct adapter *Adapter); diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c index d127cebb6eae..b6851628e4d2 100644 --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c @@ -3675,22 +3675,16 @@ static int rtw_dbg_port(struct net_device *dev, break; case 0xee:/* turn on/off dynamic funcs */ { - u32 odm_flag; - - if (0xf == extra_arg) { - GetHalDefVar8188EUsb(padapter, HAL_DEF_DBG_DM_FUNC, &odm_flag); - } else { + if (extra_arg != 0xf) { /* extra_arg = 0 - disable all dynamic func extra_arg = 1 - disable DIG extra_arg = 2 - disable tx power tracking extra_arg = 3 - turn on all dynamic func */ SetHalDefVar8188EUsb(padapter, HAL_DEF_DBG_DM_FUNC, &extra_arg); - GetHalDefVar8188EUsb(padapter, HAL_DEF_DBG_DM_FUNC, &odm_flag); } } break; - case 0xfd: rtw_write8(padapter, 0xc50, arg); rtw_write8(padapter, 0xc58, arg); |