aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_device.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-02-13 09:33:42 +0000
committerDavid S. Miller <davem@davemloft.net>2011-02-13 16:58:40 -0800
commitafc6151a78a43bdca5f64a8bd3e3c13837580c54 (patch)
treeec95ce72f88991aeb28df160b4a0215b137b2844 /net/bridge/br_device.c
parent9232ecca3ecd2e32140118c8fdabd7f8fb9ef4d5 (diff)
downloadkernel_samsung_smdk4412-afc6151a78a43bdca5f64a8bd3e3c13837580c54.zip
kernel_samsung_smdk4412-afc6151a78a43bdca5f64a8bd3e3c13837580c54.tar.gz
kernel_samsung_smdk4412-afc6151a78a43bdca5f64a8bd3e3c13837580c54.tar.bz2
bridge: implement [add/del]_slave ops
add possibility to addif/delif via rtnetlink Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r--net/bridge/br_device.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 5564435..1461b19 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -297,6 +297,21 @@ void br_netpoll_disable(struct net_bridge_port *p)
#endif
+static int br_add_slave(struct net_device *dev, struct net_device *slave_dev)
+
+{
+ struct net_bridge *br = netdev_priv(dev);
+
+ return br_add_if(br, slave_dev);
+}
+
+static int br_del_slave(struct net_device *dev, struct net_device *slave_dev)
+{
+ struct net_bridge *br = netdev_priv(dev);
+
+ return br_del_if(br, slave_dev);
+}
+
static const struct ethtool_ops br_ethtool_ops = {
.get_drvinfo = br_getinfo,
.get_link = ethtool_op_get_link,
@@ -326,6 +341,8 @@ static const struct net_device_ops br_netdev_ops = {
.ndo_netpoll_cleanup = br_netpoll_cleanup,
.ndo_poll_controller = br_poll_controller,
#endif
+ .ndo_add_slave = br_add_slave,
+ .ndo_del_slave = br_del_slave,
};
static void br_dev_free(struct net_device *dev)