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>
This commit is contained in:
Martin Kaiser 2021-12-26 22:25:34 +01:00 committed by Greg Kroah-Hartman
parent 649071f78a
commit 7529256900

View File

@ -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)