summaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2015-05-10 09:47:46 -0700
committerDavid S. Miller <davem@davemloft.net>2015-05-12 18:43:52 -0400
commitebb9a03a590e2325f747be43c8db450e92509501 (patch)
treef83107e8c5e623e5ae6a3461cdc19e387bc6dd0f /net/bridge
parenta3eb95f891d6130b1fc03dd07a8b54cf0a5c8ab8 (diff)
downloadlinux-stable-ebb9a03a590e2325f747be43c8db450e92509501.tar.gz
linux-stable-ebb9a03a590e2325f747be43c8db450e92509501.tar.bz2
linux-stable-ebb9a03a590e2325f747be43c8db450e92509501.zip
switchdev: s/netdev_switch_/switchdev_/ and s/NETDEV_SWITCH_/SWITCHDEV_/
Turned out that "switchdev" sticks. So just unify all related terms to use this prefix. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Scott Feldman <sfeldma@gmail.com> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br.c22
-rw-r--r--net/bridge/br_netlink.c6
-rw-r--r--net/bridge/br_stp.c2
3 files changed, 14 insertions, 16 deletions
diff --git a/net/bridge/br.c b/net/bridge/br.c
index 02c24cf63c34..a1abe4936fe1 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -121,13 +121,13 @@ static struct notifier_block br_device_notifier = {
.notifier_call = br_device_event
};
-static int br_netdev_switch_event(struct notifier_block *unused,
- unsigned long event, void *ptr)
+static int br_switchdev_event(struct notifier_block *unused,
+ unsigned long event, void *ptr)
{
- struct net_device *dev = netdev_switch_notifier_info_to_dev(ptr);
+ struct net_device *dev = switchdev_notifier_info_to_dev(ptr);
struct net_bridge_port *p;
struct net_bridge *br;
- struct netdev_switch_notifier_fdb_info *fdb_info;
+ struct switchdev_notifier_fdb_info *fdb_info;
int err = NOTIFY_DONE;
rtnl_lock();
@@ -138,14 +138,14 @@ static int br_netdev_switch_event(struct notifier_block *unused,
br = p->br;
switch (event) {
- case NETDEV_SWITCH_FDB_ADD:
+ case SWITCHDEV_FDB_ADD:
fdb_info = ptr;
err = br_fdb_external_learn_add(br, p, fdb_info->addr,
fdb_info->vid);
if (err)
err = notifier_from_errno(err);
break;
- case NETDEV_SWITCH_FDB_DEL:
+ case SWITCHDEV_FDB_DEL:
fdb_info = ptr;
err = br_fdb_external_learn_del(br, p, fdb_info->addr,
fdb_info->vid);
@@ -159,8 +159,8 @@ out:
return err;
}
-static struct notifier_block br_netdev_switch_notifier = {
- .notifier_call = br_netdev_switch_event,
+static struct notifier_block br_switchdev_notifier = {
+ .notifier_call = br_switchdev_event,
};
static void __net_exit br_net_exit(struct net *net)
@@ -214,7 +214,7 @@ static int __init br_init(void)
if (err)
goto err_out3;
- err = register_netdev_switch_notifier(&br_netdev_switch_notifier);
+ err = register_switchdev_notifier(&br_switchdev_notifier);
if (err)
goto err_out4;
@@ -235,7 +235,7 @@ static int __init br_init(void)
return 0;
err_out5:
- unregister_netdev_switch_notifier(&br_netdev_switch_notifier);
+ unregister_switchdev_notifier(&br_switchdev_notifier);
err_out4:
unregister_netdevice_notifier(&br_device_notifier);
err_out3:
@@ -253,7 +253,7 @@ static void __exit br_deinit(void)
{
stp_proto_unregister(&br_stp_proto);
br_netlink_fini();
- unregister_netdev_switch_notifier(&br_netdev_switch_notifier);
+ unregister_switchdev_notifier(&br_switchdev_notifier);
unregister_netdevice_notifier(&br_device_notifier);
brioctl_set(NULL);
unregister_pernet_subsys(&br_net_ops);
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 4b5c236998ff..dc234533e204 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -631,8 +631,7 @@ int br_setlink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags)
if (p && !(flags & BRIDGE_FLAGS_SELF)) {
/* set bridge attributes in hardware if supported
*/
- ret_offload = netdev_switch_port_bridge_setlink(dev, nlh,
- flags);
+ ret_offload = switchdev_port_bridge_setlink(dev, nlh, flags);
if (ret_offload && ret_offload != -EOPNOTSUPP)
br_warn(p->br, "error setting attrs on port %u(%s)\n",
(unsigned int)p->port_no, p->dev->name);
@@ -671,8 +670,7 @@ int br_dellink(struct net_device *dev, struct nlmsghdr *nlh, u16 flags)
if (p && !(flags & BRIDGE_FLAGS_SELF)) {
/* del bridge attributes in hardware
*/
- ret_offload = netdev_switch_port_bridge_dellink(dev, nlh,
- flags);
+ ret_offload = switchdev_port_bridge_dellink(dev, nlh, flags);
if (ret_offload && ret_offload != -EOPNOTSUPP)
br_warn(p->br, "error deleting attrs on port %u (%s)\n",
(unsigned int)p->port_no, p->dev->name);
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
index fb3ebe615513..28e3f4bc01e0 100644
--- a/net/bridge/br_stp.c
+++ b/net/bridge/br_stp.c
@@ -42,7 +42,7 @@ void br_set_state(struct net_bridge_port *p, unsigned int state)
int err;
p->state = state;
- err = netdev_switch_port_stp_update(p->dev, state);
+ err = switchdev_port_stp_update(p->dev, state);
if (err && err != -EOPNOTSUPP)
br_warn(p->br, "error setting offload STP state on port %u(%s)\n",
(unsigned int) p->port_no, p->dev->name);