diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-11-22 17:24:47 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-23 12:18:48 +0000 |
commit | 2106efda785b55a8957efed9a52dfa28ee0d7280 (patch) | |
tree | 12e5c191146b24614bae365a3fd3bc414c485607 /net/core/net-sysfs.c | |
parent | c384cee14aa330ba2f5616fb821ba81f2ef42ccd (diff) |
net: remove .ndo_change_proto_down
.ndo_change_proto_down was added seemingly to enable out-of-tree
implementations. Over 2.5yrs later we still have no real users
upstream. Hardwire the generic implementation for now, we can
revert once real users materialize. (rocker is a test vehicle,
not a user.)
We need to drop the optimization on the sysfs side, because
unlike ndos priv_flags will be changed at runtime, so we'd
need READ_ONCE/WRITE_ONCE everywhere..
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 4edd58d34f16..affe34d71d31 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -488,14 +488,6 @@ static ssize_t proto_down_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { - struct net_device *netdev = to_net_dev(dev); - - /* The check is also done in change_proto_down; this helps returning - * early without hitting the trylock/restart in netdev_store. - */ - if (!netdev->netdev_ops->ndo_change_proto_down) - return -EOPNOTSUPP; - return netdev_store(dev, attr, buf, len, change_proto_down); } NETDEVICE_SHOW_RW(proto_down, fmt_dec); |