summaryrefslogtreecommitdiffstats
path: root/net/core/dev_ioctl.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2020-07-19 20:49:53 -0700
committerDavid S. Miller <davem@davemloft.net>2020-07-20 16:48:22 -0700
commit3369afba1e46b0f7f33b4853a9d06616be6e22d5 (patch)
tree92c32ae2d7ed308bf798105a21357bda4f5c2e20 /net/core/dev_ioctl.c
parent4cfab3566710826e62adbf100875d2dca32434b6 (diff)
downloadlinux-3369afba1e46b0f7f33b4853a9d06616be6e22d5.tar.gz
linux-3369afba1e46b0f7f33b4853a9d06616be6e22d5.tar.bz2
linux-3369afba1e46b0f7f33b4853a9d06616be6e22d5.zip
net: Call into DSA netdevice_ops wrappers
Make the core net_device code call into our ndo_do_ioctl() and ndo_get_phys_port_name() functions via the wrappers defined previously Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev_ioctl.c')
-rw-r--r--net/core/dev_ioctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index a213c703c90a..b2cf9b7bb7b8 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -5,6 +5,7 @@
#include <linux/rtnetlink.h>
#include <linux/net_tstamp.h>
#include <linux/wireless.h>
+#include <net/dsa.h>
#include <net/wext.h>
/*
@@ -231,6 +232,10 @@ static int dev_do_ioctl(struct net_device *dev,
const struct net_device_ops *ops = dev->netdev_ops;
int err = -EOPNOTSUPP;
+ err = dsa_ndo_do_ioctl(dev, ifr, cmd);
+ if (err == 0 || err != -EOPNOTSUPP)
+ return err;
+
if (ops->ndo_do_ioctl) {
if (netif_device_present(dev))
err = ops->ndo_do_ioctl(dev, ifr, cmd);