14 #include <linux/kernel.h>
15 #include <linux/netdevice.h>
18 #include <linux/ethtool.h>
19 #include <linux/if_arp.h>
20 #include <linux/module.h>
22 #include <linux/rtnetlink.h>
23 #include <linux/if_ether.h>
24 #include <linux/slab.h>
40 switch (ethtool_cmd_speed(&ecmd)) {
69 if (netif_running(dev) && netif_carrier_ok(dev))
72 if (!netif_running(br->
dev))
75 spin_lock_bh(&br->
lock);
76 if (netif_running(dev) && netif_carrier_ok(dev)) {
83 spin_unlock_bh(&br->
lock);
86 static void release_nbp(
struct kobject *kobj)
97 .release = release_nbp,
136 spin_lock_bh(&br->
lock);
138 spin_unlock_bh(&br->
lock);
144 list_del_rcu(&p->
list);
158 br_netpoll_disable(p);
184 unsigned long *
inuse;
208 index = find_portno(br);
210 return ERR_PTR(index);
242 dev_net_set(dev, net);
290 if (!mtu || p->
dev->mtu < mtu)
314 p->
dev->features, mask);
330 !is_valid_ether_addr(dev->
dev_addr))
345 p = new_nbp(br, dev);
364 if (br_netpoll_info(br) && ((err = br_netpoll_enable(p,
GFP_KERNEL))))
383 spin_lock_bh(&br->
lock);
386 if ((dev->
flags &
IFF_UP) && netif_carrier_ok(dev) &&
389 spin_unlock_bh(&br->
lock);
399 netdev_err(dev,
"failed insert local address bridge forwarding table\n");
426 p = br_port_get_rtnl(dev);
427 if (!p || p->
br != br)
436 spin_lock_bh(&br->
lock);
438 spin_unlock_bh(&br->
lock);