diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-02-13 10:33:42 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-14 01:58:40 +0100 |
commit | afc6151a78a43bdca5f64a8bd3e3c13837580c54 (patch) | |
tree | ec95ce72f88991aeb28df160b4a0215b137b2844 /net/bridge/br_device.c | |
parent | bond: implement [add/del]_slave ops (diff) | |
download | linux-afc6151a78a43bdca5f64a8bd3e3c13837580c54.tar.xz linux-afc6151a78a43bdca5f64a8bd3e3c13837580c54.zip |
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.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 556443566e9c..1461b19efd38 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) |