switchdev: rename vlan vid_start to vid_begin
authorScott Feldman <sfeldma@gmail.com>
Mon, 22 Jun 2015 07:27:16 +0000 (00:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jun 2015 13:56:18 +0000 (06:56 -0700)
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>
drivers/net/ethernet/rocker/rocker.c
include/net/switchdev.h
net/bridge/br_vlan.c
net/switchdev/switchdev.c

index d4ec660bb3b70a4f792a4509d500046801673633..7d5d92a10284f6e52ec74f440fe18b3bf062a074 100644 (file)
@@ -4295,7 +4295,7 @@ static int rocker_port_vlans_add(struct rocker_port *rocker_port,
        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 @@ static int rocker_port_vlans_del(struct rocker_port *rocker_port,
        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;
index 437f8fe75705baf56df2886748d8e49a2e00ffd5..d5671f118bfc54566a34d48708e35b69af19b417 100644 (file)
@@ -57,7 +57,7 @@ struct switchdev_obj {
        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 */
index 17fc358a543253254b6f2ec7856c3daffcc8ec1d..574feea6a8cca6fbc9ee65f7663fcece2b2fce87 100644 (file)
@@ -54,7 +54,7 @@ static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br,
                        .id = SWITCHDEV_OBJ_PORT_VLAN,
                        .u.vlan = {
                                .flags = flags,
-                               .vid_start = vid,
+                               .vid_begin = vid,
                                .vid_end = vid,
                        },
                };
@@ -132,7 +132,7 @@ static void __vlan_vid_del(struct net_device *dev, struct net_bridge *br,
                struct switchdev_obj vlan_obj = {
                        .id = SWITCHDEV_OBJ_PORT_VLAN,
                        .u.vlan = {
-                               .vid_start = vid,
+                               .vid_begin = vid,
                                .vid_end = vid,
                        },
                };
index c29f2327f2e613070883e806c8ff0b0ad80a474a..448d9199cea2718e0d4b57aa19debd93ae2ed684 100644 (file)
@@ -510,23 +510,23 @@ static int switchdev_port_br_afspec(struct net_device *dev,
                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)