summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorScott Feldman <sfeldma@gmail.com>2015-03-15 21:07:15 -0700
committerDavid S. Miller <davem@davemloft.net>2015-03-16 00:14:43 -0400
commit98237d433b98d27fdffb09e4a1a510e9f00c6f31 (patch)
treeefc630334478604131b99cf849273082387d76d7 /net/dsa
parent4170604feec780d00e7511c24fa0f6e5c2e4ed75 (diff)
downloadlinux-98237d433b98d27fdffb09e4a1a510e9f00c6f31.tar.bz2
switchdev: use new swdev ops
Move swdev wrappers over to new swdev ops (from previous ndo ops). No functional changes to the implementation. Signed-off-by: Scott Feldman <sfeldma@gmail.com> rocker: move to new swdev ops Signed-off-by: Scott Feldman <sfeldma@gmail.com> dsa: move to new swdev ops Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/slave.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 6511552039d6..f0af7aa331c1 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -16,6 +16,7 @@
#include <linux/of_net.h>
#include <linux/of_mdio.h>
#include <net/rtnetlink.h>
+#include <net/switchdev.h>
#include <linux/if_bridge.h>
#include "dsa_priv.h"
@@ -572,8 +573,11 @@ static const struct net_device_ops dsa_slave_netdev_ops = {
.ndo_set_rx_mode = dsa_slave_set_rx_mode,
.ndo_set_mac_address = dsa_slave_set_mac_address,
.ndo_do_ioctl = dsa_slave_ioctl,
- .ndo_switch_parent_id_get = dsa_slave_parent_id_get,
- .ndo_switch_port_stp_update = dsa_slave_stp_update,
+};
+
+static const struct swdev_ops dsa_slave_swdev_ops = {
+ .swdev_parent_id_get = dsa_slave_parent_id_get,
+ .swdev_port_stp_update = dsa_slave_stp_update,
};
static void dsa_slave_adjust_link(struct net_device *dev)
@@ -755,6 +759,7 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent,
eth_hw_addr_inherit(slave_dev, master);
slave_dev->tx_queue_len = 0;
slave_dev->netdev_ops = &dsa_slave_netdev_ops;
+ slave_dev->swdev_ops = &dsa_slave_swdev_ops;
SET_NETDEV_DEV(slave_dev, parent);
slave_dev->dev.of_node = ds->pd->port_dn[port];