]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: r8188eu: remove the private "test" ioctl
authorMartin Kaiser <martin@kaiser.cx>
Sun, 26 Dec 2021 21:25:34 +0000 (22:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Dec 2021 16:13:02 +0000 (17:13 +0100)
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>
drivers/staging/r8188eu/os_dep/ioctl_linux.c

index 911f1062755126d065d7b927208b74635c54b5a2..c08b60ec1e64a647bbceebc4bba3a795b7bc33b7 100644 (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)