aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_device.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-02-13 04:33:42 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-13 19:58:40 -0500
commitafc6151a78a43bdca5f64a8bd3e3c13837580c54 (patch)
treeec95ce72f88991aeb28df160b4a0215b137b2844 /net/bridge/br_device.c
parent9232ecca3ecd2e32140118c8fdabd7f8fb9ef4d5 (diff)
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 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)
297 297
298#endif 298#endif
299 299
300static int br_add_slave(struct net_device *dev, struct net_device *slave_dev)
301
302{
303 struct net_bridge *br = netdev_priv(dev);
304
305 return br_add_if(br, slave_dev);
306}
307
308static int br_del_slave(struct net_device *dev, struct net_device *slave_dev)
309{
310 struct net_bridge *br = netdev_priv(dev);
311
312 return br_del_if(br, slave_dev);
313}
314
300static const struct ethtool_ops br_ethtool_ops = { 315static const struct ethtool_ops br_ethtool_ops = {
301 .get_drvinfo = br_getinfo, 316 .get_drvinfo = br_getinfo,
302 .get_link = ethtool_op_get_link, 317 .get_link = ethtool_op_get_link,
@@ -326,6 +341,8 @@ static const struct net_device_ops br_netdev_ops = {
326 .ndo_netpoll_cleanup = br_netpoll_cleanup, 341 .ndo_netpoll_cleanup = br_netpoll_cleanup,
327 .ndo_poll_controller = br_poll_controller, 342 .ndo_poll_controller = br_poll_controller,
328#endif 343#endif
344 .ndo_add_slave = br_add_slave,
345 .ndo_del_slave = br_del_slave,
329}; 346};
330 347
331static void br_dev_free(struct net_device *dev) 348static void br_dev_free(struct net_device *dev)