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: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index d4ec660..7d5d92a 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -4295,7 +4295,7 @@
u16 vid;
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,
vid, vlan->flags);
if (err)
@@ -4378,7 +4378,7 @@
u16 vid;
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);
if (err)
return err;
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 437f8fe..d5671f1 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -57,7 +57,7 @@
union {
struct switchdev_obj_vlan { /* PORT_VLAN */
u16 flags;
- u16 vid_start;
+ u16 vid_begin;
u16 vid_end;
} vlan;
struct switchdev_obj_ipv4_fib { /* IPV4_FIB */
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index 17fc358..574feea 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -54,7 +54,7 @@
.id = SWITCHDEV_OBJ_PORT_VLAN,
.u.vlan = {
.flags = flags,
- .vid_start = vid,
+ .vid_begin = vid,
.vid_end = vid,
},
};
@@ -132,7 +132,7 @@
struct switchdev_obj vlan_obj = {
.id = SWITCHDEV_OBJ_PORT_VLAN,
.u.vlan = {
- .vid_start = vid,
+ .vid_begin = vid,
.vid_end = vid,
},
};
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index c29f232..448d919 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -510,23 +510,23 @@
vinfo = nla_data(attr);
vlan->flags = vinfo->flags;
if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_BEGIN) {
- if (vlan->vid_start)
+ if (vlan->vid_begin)
return -EINVAL;
- vlan->vid_start = vinfo->vid;
+ vlan->vid_begin = vinfo->vid;
} else if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_END) {
- if (!vlan->vid_start)
+ if (!vlan->vid_begin)
return -EINVAL;
vlan->vid_end = vinfo->vid;
- if (vlan->vid_end <= vlan->vid_start)
+ if (vlan->vid_end <= vlan->vid_begin)
return -EINVAL;
err = f(dev, &obj);
if (err)
return err;
memset(vlan, 0, sizeof(*vlan));
} else {
- if (vlan->vid_start)
+ if (vlan->vid_begin)
return -EINVAL;
- vlan->vid_start = vinfo->vid;
+ vlan->vid_begin = vinfo->vid;
vlan->vid_end = vinfo->vid;
err = f(dev, &obj);
if (err)