ppp: use ndo_siocdevprivate

ppp has a custom statistics interface using SIOCDEVPRIVATE
ioctl commands that works correctly in compat mode.

Convert it to use ndo_siocdevprivate as a cleanup.

Cc: Paul Mackerras <paulus@samba.org>
Cc: linux-ppp@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Arnd Bergmann 2021-07-27 15:45:09 +02:00 committed by David S. Miller
parent cc0aa831a0
commit 34f7cac07c
1 changed files with 3 additions and 3 deletions

View File

@ -1452,11 +1452,11 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev)
} }
static int static int
ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ppp_net_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
void __user *addr, int cmd)
{ {
struct ppp *ppp = netdev_priv(dev); struct ppp *ppp = netdev_priv(dev);
int err = -EFAULT; int err = -EFAULT;
void __user *addr = (void __user *) ifr->ifr_ifru.ifru_data;
struct ppp_stats stats; struct ppp_stats stats;
struct ppp_comp_stats cstats; struct ppp_comp_stats cstats;
char *vers; char *vers;
@ -1585,7 +1585,7 @@ static const struct net_device_ops ppp_netdev_ops = {
.ndo_init = ppp_dev_init, .ndo_init = ppp_dev_init,
.ndo_uninit = ppp_dev_uninit, .ndo_uninit = ppp_dev_uninit,
.ndo_start_xmit = ppp_start_xmit, .ndo_start_xmit = ppp_start_xmit,
.ndo_do_ioctl = ppp_net_ioctl, .ndo_siocdevprivate = ppp_net_siocdevprivate,
.ndo_get_stats64 = ppp_get_stats64, .ndo_get_stats64 = ppp_get_stats64,
.ndo_fill_forward_path = ppp_fill_forward_path, .ndo_fill_forward_path = ppp_fill_forward_path,
}; };