diff options
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_device.c | 1 | ||||
-rw-r--r-- | net/bridge/br_if.c | 19 | ||||
-rw-r--r-- | net/bridge/br_ioctl.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 07a07770c8b..1a99c4e04e8 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c | |||
@@ -157,6 +157,7 @@ static const struct ethtool_ops br_ethtool_ops = { | |||
157 | .get_tso = ethtool_op_get_tso, | 157 | .get_tso = ethtool_op_get_tso, |
158 | .set_tso = br_set_tso, | 158 | .set_tso = br_set_tso, |
159 | .get_ufo = ethtool_op_get_ufo, | 159 | .get_ufo = ethtool_op_get_ufo, |
160 | .set_ufo = ethtool_op_set_ufo, | ||
160 | .get_flags = ethtool_op_get_flags, | 161 | .get_flags = ethtool_op_get_flags, |
161 | }; | 162 | }; |
162 | 163 | ||
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 4a9f5273265..a6f74b2b957 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -154,7 +154,7 @@ static void del_nbp(struct net_bridge_port *p) | |||
154 | } | 154 | } |
155 | 155 | ||
156 | /* called with RTNL */ | 156 | /* called with RTNL */ |
157 | static void del_br(struct net_bridge *br) | 157 | static void del_br(struct net_bridge *br, struct list_head *head) |
158 | { | 158 | { |
159 | struct net_bridge_port *p, *n; | 159 | struct net_bridge_port *p, *n; |
160 | 160 | ||
@@ -165,7 +165,7 @@ static void del_br(struct net_bridge *br) | |||
165 | del_timer_sync(&br->gc_timer); | 165 | del_timer_sync(&br->gc_timer); |
166 | 166 | ||
167 | br_sysfs_delbr(br->dev); | 167 | br_sysfs_delbr(br->dev); |
168 | unregister_netdevice(br->dev); | 168 | unregister_netdevice_queue(br->dev, head); |
169 | } | 169 | } |
170 | 170 | ||
171 | static struct net_device *new_bridge_dev(struct net *net, const char *name) | 171 | static struct net_device *new_bridge_dev(struct net *net, const char *name) |
@@ -323,7 +323,7 @@ int br_del_bridge(struct net *net, const char *name) | |||
323 | } | 323 | } |
324 | 324 | ||
325 | else | 325 | else |
326 | del_br(netdev_priv(dev)); | 326 | del_br(netdev_priv(dev), NULL); |
327 | 327 | ||
328 | rtnl_unlock(); | 328 | rtnl_unlock(); |
329 | return ret; | 329 | return ret; |
@@ -466,15 +466,14 @@ int br_del_if(struct net_bridge *br, struct net_device *dev) | |||
466 | void br_net_exit(struct net *net) | 466 | void br_net_exit(struct net *net) |
467 | { | 467 | { |
468 | struct net_device *dev; | 468 | struct net_device *dev; |
469 | LIST_HEAD(list); | ||
469 | 470 | ||
470 | rtnl_lock(); | 471 | rtnl_lock(); |
471 | restart: | 472 | for_each_netdev(net, dev) |
472 | for_each_netdev(net, dev) { | 473 | if (dev->priv_flags & IFF_EBRIDGE) |
473 | if (dev->priv_flags & IFF_EBRIDGE) { | 474 | del_br(netdev_priv(dev), &list); |
474 | del_br(netdev_priv(dev)); | 475 | |
475 | goto restart; | 476 | unregister_netdevice_many(&list); |
476 | } | ||
477 | } | ||
478 | rtnl_unlock(); | 477 | rtnl_unlock(); |
479 | 478 | ||
480 | } | 479 | } |
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index 6a6433daaf2..2af6e4a9026 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c | |||
@@ -81,6 +81,7 @@ static int get_fdb_entries(struct net_bridge *br, void __user *userbuf, | |||
81 | return num; | 81 | return num; |
82 | } | 82 | } |
83 | 83 | ||
84 | /* called with RTNL */ | ||
84 | static int add_del_if(struct net_bridge *br, int ifindex, int isadd) | 85 | static int add_del_if(struct net_bridge *br, int ifindex, int isadd) |
85 | { | 86 | { |
86 | struct net_device *dev; | 87 | struct net_device *dev; |
@@ -89,7 +90,7 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd) | |||
89 | if (!capable(CAP_NET_ADMIN)) | 90 | if (!capable(CAP_NET_ADMIN)) |
90 | return -EPERM; | 91 | return -EPERM; |
91 | 92 | ||
92 | dev = dev_get_by_index(dev_net(br->dev), ifindex); | 93 | dev = __dev_get_by_index(dev_net(br->dev), ifindex); |
93 | if (dev == NULL) | 94 | if (dev == NULL) |
94 | return -EINVAL; | 95 | return -EINVAL; |
95 | 96 | ||
@@ -98,7 +99,6 @@ static int add_del_if(struct net_bridge *br, int ifindex, int isadd) | |||
98 | else | 99 | else |
99 | ret = br_del_if(br, dev); | 100 | ret = br_del_if(br, dev); |
100 | 101 | ||
101 | dev_put(dev); | ||
102 | return ret; | 102 | return ret; |
103 | } | 103 | } |
104 | 104 | ||