Skip to content

Commit

Permalink
staging: r8188eu: remove rtw_ioctl function
Browse files Browse the repository at this point in the history
Remove rtw_ioctl function from os_dep/ioctl_linux.c, its declaration
in include/osdep_intf.h, and finally its inclusion as the value of the
.ndo_do_ioctl member of struct net_device_ops rtw_netdev_ops in
os_dep/os_intfs.c.

The e-mail from Arnd Bergmann at:
https://lore.kernel.org/linux-next/CAK8P3a0WRMNmBmBDerZ0nWPdFZKALnxrj-uUFBkTP-MOtv48vg@mail.gmail.com
explains the justification for this approach. Essentially, changes from
net-next make the existing function and its use of SIOCDEVPRIVATE ioctls
unworkable without changes.

Functions called from rtw_ioctl that are now no longer accessible will
be cleaned up in further patches. Additionally, once these changes have
made their way downstream to the staging branch, we can modify and
reconnect rtw_android_priv_cmd via ndo_siocdevprivate in struct
net_device_ops.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210810074504.957-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Phillip Potter authored and Greg Kroah-Hartman committed Aug 10, 2021
1 parent 1c69b0a commit ae7471c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
2 changes: 0 additions & 2 deletions drivers/staging/r8188eu/include/osdep_intf.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ u32 rtw_start_drv_threads(struct adapter *padapter);
void rtw_stop_drv_threads (struct adapter *padapter);
void rtw_cancel_all_timer(struct adapter *padapter);

int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);

int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname);
struct net_device *rtw_init_netdev(struct adapter *padapter);
u16 rtw_recv_select_queue(struct sk_buff *skb);
Expand Down
28 changes: 0 additions & 28 deletions drivers/staging/r8188eu/os_dep/ioctl_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -8002,31 +8002,3 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
kfree(output);
return err;
}

#include "../include/rtw_android.h"
int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct iwreq *wrq = (struct iwreq *)rq;
int ret = 0;

switch (cmd) {
case RTL_IOCTL_WPA_SUPPLICANT:
ret = wpa_supplicant_ioctl(dev, &wrq->u.data);
break;
#ifdef CONFIG_88EU_AP_MODE
case RTL_IOCTL_HOSTAPD:
ret = rtw_hostapd_ioctl(dev, &wrq->u.data);
break;
#endif /* CONFIG_88EU_AP_MODE */
case SIOCDEVPRIVATE:
ret = rtw_ioctl_wext_private(dev, &wrq->u);
break;
case (SIOCDEVPRIVATE+1):
ret = rtw_android_priv_cmd(dev, rq, cmd);
break;
default:
ret = -EOPNOTSUPP;
break;
}
return ret;
}
1 change: 0 additions & 1 deletion drivers/staging/r8188eu/os_dep/os_intfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,6 @@ static const struct net_device_ops rtw_netdev_ops = {
.ndo_select_queue = rtw_select_queue,
.ndo_set_mac_address = rtw_net_set_mac_address,
.ndo_get_stats = rtw_net_get_stats,
.ndo_do_ioctl = rtw_ioctl,
};

int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname)
Expand Down

0 comments on commit ae7471c

Please sign in to comment.