summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_vlan.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2015-10-01 11:03:46 +0200
committerDavid S. Miller <davem@davemloft.net>2015-10-03 04:49:40 -0700
commit9e8f4a548ab4710002c23c94c4b1bbde91b5e335 (patch)
treec2fe29079ccd3dd3a5218ad966ed0bab047d5e69 /net/bridge/br_vlan.c
parent648b4a995a057187ddd77cdb181e6a0b24ab2959 (diff)
downloadop-kernel-dev-9e8f4a548ab4710002c23c94c4b1bbde91b5e335.zip
op-kernel-dev-9e8f4a548ab4710002c23c94c4b1bbde91b5e335.tar.gz
switchdev: push object ID back to object structure
Suggested-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_vlan.c')
-rw-r--r--net/bridge/br_vlan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index 0b87cf6..1a79e19 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -83,13 +83,13 @@ static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br,
err = vlan_vid_add(dev, br->vlan_proto, vid);
} else {
struct switchdev_obj_port_vlan v = {
+ .obj.id = SWITCHDEV_OBJ_ID_PORT_VLAN,
.flags = flags,
.vid_begin = vid,
.vid_end = vid,
};
- err = switchdev_port_obj_add(dev, SWITCHDEV_OBJ_ID_PORT_VLAN,
- &v.obj);
+ err = switchdev_port_obj_add(dev, &v.obj);
if (err == -EOPNOTSUPP)
err = 0;
}
@@ -133,12 +133,12 @@ static int __vlan_vid_del(struct net_device *dev, struct net_bridge *br,
vlan_vid_del(dev, br->vlan_proto, vid);
} else {
struct switchdev_obj_port_vlan v = {
+ .obj.id = SWITCHDEV_OBJ_ID_PORT_VLAN,
.vid_begin = vid,
.vid_end = vid,
};
- err = switchdev_port_obj_del(dev, SWITCHDEV_OBJ_ID_PORT_VLAN,
- &v.obj);
+ err = switchdev_port_obj_del(dev, &v.obj);
if (err == -EOPNOTSUPP)
err = 0;
}
OpenPOWER on IntegriCloud