diff options
author | Martin Kaiser <martin@kaiser.cx> | 2021-12-26 22:25:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-28 17:13:02 +0100 |
commit | 752925690005a723e57259e7f628fec93c298666 (patch) | |
tree | 4dde5a3a8f1ecbdd69838c9b0047c6b1370b4efc /drivers/staging/r8188eu/os_dep/ioctl_linux.c | |
parent | 649071f78ab2fc61e65bdced2c615876c23c7375 (diff) | |
download | linux-752925690005a723e57259e7f628fec93c298666.tar.bz2 |
staging: r8188eu: remove the private "test" ioctl
Remove the private "test" ioctl. It copies data from user space,
this data is not used.
We can now remove a number of NULL entries at the end of the private
ioctl list.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226212535.197989-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu/os_dep/ioctl_linux.c')
-rw-r--r-- | drivers/staging/r8188eu/os_dep/ioctl_linux.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c index 911f10627551..c08b60ec1e64 100644 --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c @@ -4178,43 +4178,6 @@ static int rtw_pm_set(struct net_device *dev, extern int wifirate2_ratetbl_inx(unsigned char rate); -static int rtw_test( - struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) -{ - u32 len; - u8 *pbuf, *pch; - char *ptmp; - u8 *delim = ","; - - DBG_88E("+%s\n", __func__); - len = wrqu->data.length; - - pbuf = kzalloc(len, GFP_KERNEL); - if (!pbuf) { - DBG_88E("%s: no memory!\n", __func__); - return -ENOMEM; - } - - if (copy_from_user(pbuf, wrqu->data.pointer, len)) { - kfree(pbuf); - DBG_88E("%s: copy from user fail!\n", __func__); - return -EFAULT; - } - DBG_88E("%s: string =\"%s\"\n", __func__, pbuf); - - ptmp = (char *)pbuf; - pch = strsep(&ptmp, delim); - if (!pch || strlen(pch) == 0) { - kfree(pbuf); - DBG_88E("%s: parameter error(level 1)!\n", __func__); - return -EFAULT; - } - kfree(pbuf); - return 0; -} - static iw_handler rtw_handlers[] = { IW_HANDLER(SIOCGIWNAME, rtw_wx_get_name), IW_HANDLER(SIOCGIWFREQ, rtw_wx_get_freq), @@ -4307,9 +4270,6 @@ static const struct iw_priv_args rtw_private_args[] = { }, {SIOCIWFIRSTPRIV + 0x18, IW_PRIV_TYPE_CHAR | IFNAMSIZ, 0, "rereg_nd_name"}, - - {SIOCIWFIRSTPRIV + 0x1D, IW_PRIV_TYPE_CHAR | 40, IW_PRIV_TYPE_CHAR | 0x7FF, "test" - }, }; static iw_handler rtw_private_handler[] = { @@ -4347,12 +4307,6 @@ NULL, /* 0x03 */ rtw_pm_set, /* 0x16 */ NULL, /* 0x17 */ rtw_rereg_nd_name, /* 0x18 */ - NULL, /* 0x19 */ - - NULL, /* 0x1A */ - NULL, /* 0x1B */ - NULL, /* 0x1C is reserved for hostapd */ - rtw_test, /* 0x1D */ }; static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev) |