summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_if.c
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-05-10 09:31:08 +0000
committerDavid S. Miller <davem@davemloft.net>2010-05-15 23:10:01 -0700
commitcfb478da70f2213520866c84cb0aea0d7c0e1148 (patch)
treebc1a1ea16bbb2be0481d3231a2fbe5611437da55 /net/bridge/br_if.c
parentc17b274dc2aa538b68c1f02b01a3c4e124b435ba (diff)
downloadop-kernel-dev-cfb478da70f2213520866c84cb0aea0d7c0e1148.zip
op-kernel-dev-cfb478da70f2213520866c84cb0aea0d7c0e1148.tar.gz
bridge: netpoll cleanup
Move code around so that the ifdef for NETPOLL_CONTROLLER don't have to show up in main code path. The control functions should be in helpers that are only compiled if needed. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r--net/bridge/br_if.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 537bdd6..45f3f88 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -154,14 +154,7 @@ static void del_nbp(struct net_bridge_port *p)
kobject_uevent(&p->kobj, KOBJ_REMOVE);
kobject_del(&p->kobj);
-#ifdef CONFIG_NET_POLL_CONTROLLER
- if (br_devices_support_netpoll(br))
- br->dev->priv_flags &= ~IFF_DISABLE_NETPOLL;
- if (dev->netdev_ops->ndo_netpoll_cleanup)
- dev->netdev_ops->ndo_netpoll_cleanup(dev);
- else
- dev->npinfo = NULL;
-#endif
+ br_netpoll_disable(br, dev);
call_rcu(&p->rcu, destroy_nbp_rcu);
}
@@ -455,19 +448,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
kobject_uevent(&p->kobj, KOBJ_ADD);
-#ifdef CONFIG_NET_POLL_CONTROLLER
- if (br_devices_support_netpoll(br)) {
- br->dev->priv_flags &= ~IFF_DISABLE_NETPOLL;
- if (br->dev->npinfo)
- dev->npinfo = br->dev->npinfo;
- } else if (!(br->dev->priv_flags & IFF_DISABLE_NETPOLL)) {
- br->dev->priv_flags |= IFF_DISABLE_NETPOLL;
- printk(KERN_INFO "New device %s does not support netpoll\n",
- dev->name);
- printk(KERN_INFO "Disabling netpoll for %s\n",
- br->dev->name);
- }
-#endif
+ br_netpoll_enable(br, dev);
return 0;
err2:
OpenPOWER on IntegriCloud