Commit 3e3a78b4 authored by Scott Feldman's avatar Scott Feldman Committed by David S. Miller

switchdev: rename vlan vid_start to vid_begin

Use vid_begin/end to be consistent with BRIDGE_VLAN_INFO_RANGE_BEGIN/END.
Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e8e85cc5
...@@ -4295,7 +4295,7 @@ static int rocker_port_vlans_add(struct rocker_port *rocker_port, ...@@ -4295,7 +4295,7 @@ static int rocker_port_vlans_add(struct rocker_port *rocker_port,
u16 vid; u16 vid;
int err; int err;
for (vid = vlan->vid_start; vid <= vlan->vid_end; vid++) { for (vid = vlan->vid_begin; vid <= vlan->vid_end; vid++) {
err = rocker_port_vlan_add(rocker_port, trans, err = rocker_port_vlan_add(rocker_port, trans,
vid, vlan->flags); vid, vlan->flags);
if (err) if (err)
...@@ -4378,7 +4378,7 @@ static int rocker_port_vlans_del(struct rocker_port *rocker_port, ...@@ -4378,7 +4378,7 @@ static int rocker_port_vlans_del(struct rocker_port *rocker_port,
u16 vid; u16 vid;
int err; int err;
for (vid = vlan->vid_start; vid <= vlan->vid_end; vid++) { for (vid = vlan->vid_begin; vid <= vlan->vid_end; vid++) {
err = rocker_port_vlan_del(rocker_port, vid, vlan->flags); err = rocker_port_vlan_del(rocker_port, vid, vlan->flags);
if (err) if (err)
return err; return err;
......
...@@ -57,7 +57,7 @@ struct switchdev_obj { ...@@ -57,7 +57,7 @@ struct switchdev_obj {
union { union {
struct switchdev_obj_vlan { /* PORT_VLAN */ struct switchdev_obj_vlan { /* PORT_VLAN */
u16 flags; u16 flags;
u16 vid_start; u16 vid_begin;
u16 vid_end; u16 vid_end;
} vlan; } vlan;
struct switchdev_obj_ipv4_fib { /* IPV4_FIB */ struct switchdev_obj_ipv4_fib { /* IPV4_FIB */
......
...@@ -54,7 +54,7 @@ static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br, ...@@ -54,7 +54,7 @@ static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br,
.id = SWITCHDEV_OBJ_PORT_VLAN, .id = SWITCHDEV_OBJ_PORT_VLAN,
.u.vlan = { .u.vlan = {
.flags = flags, .flags = flags,
.vid_start = vid, .vid_begin = vid,
.vid_end = vid, .vid_end = vid,
}, },
}; };
...@@ -132,7 +132,7 @@ static void __vlan_vid_del(struct net_device *dev, struct net_bridge *br, ...@@ -132,7 +132,7 @@ static void __vlan_vid_del(struct net_device *dev, struct net_bridge *br,
struct switchdev_obj vlan_obj = { struct switchdev_obj vlan_obj = {
.id = SWITCHDEV_OBJ_PORT_VLAN, .id = SWITCHDEV_OBJ_PORT_VLAN,
.u.vlan = { .u.vlan = {
.vid_start = vid, .vid_begin = vid,
.vid_end = vid, .vid_end = vid,
}, },
}; };
......
...@@ -510,23 +510,23 @@ static int switchdev_port_br_afspec(struct net_device *dev, ...@@ -510,23 +510,23 @@ static int switchdev_port_br_afspec(struct net_device *dev,
vinfo = nla_data(attr); vinfo = nla_data(attr);
vlan->flags = vinfo->flags; vlan->flags = vinfo->flags;
if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_BEGIN) { if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_BEGIN) {
if (vlan->vid_start) if (vlan->vid_begin)
return -EINVAL; return -EINVAL;
vlan->vid_start = vinfo->vid; vlan->vid_begin = vinfo->vid;
} else if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_END) { } else if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_END) {
if (!vlan->vid_start) if (!vlan->vid_begin)
return -EINVAL; return -EINVAL;
vlan->vid_end = vinfo->vid; vlan->vid_end = vinfo->vid;
if (vlan->vid_end <= vlan->vid_start) if (vlan->vid_end <= vlan->vid_begin)
return -EINVAL; return -EINVAL;
err = f(dev, &obj); err = f(dev, &obj);
if (err) if (err)
return err; return err;
memset(vlan, 0, sizeof(*vlan)); memset(vlan, 0, sizeof(*vlan));
} else { } else {
if (vlan->vid_start) if (vlan->vid_begin)
return -EINVAL; return -EINVAL;
vlan->vid_start = vinfo->vid; vlan->vid_begin = vinfo->vid;
vlan->vid_end = vinfo->vid; vlan->vid_end = vinfo->vid;
err = f(dev, &obj); err = f(dev, &obj);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment