summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2015-09-24 10:02:40 +0200
committerDavid S. Miller <davem@davemloft.net>2015-09-25 07:59:21 +0200
commit69f5df491e0becb75d2d795add7481a35218d657 (patch)
tree3ed228b4acf8401be9203be33cc2448152d9267c /net
parentMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsh... (diff)
downloadlinux-69f5df491e0becb75d2d795add7481a35218d657.tar.xz
linux-69f5df491e0becb75d2d795add7481a35218d657.zip
switchdev: rename "trans" to "trans_ph".
This is temporary, name "trans" will be used for something else and "trans_ph" will eventually disappear. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/dsa/slave.c8
-rw-r--r--net/switchdev/switchdev.c12
2 files changed, 10 insertions, 10 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index cce97385f743..7f50b7443402 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -250,7 +250,7 @@ static int dsa_slave_port_vlan_add(struct net_device *dev,
u16 vid;
int err;
- switch (obj->trans) {
+ switch (obj->trans_ph) {
case SWITCHDEV_TRANS_PREPARE:
if (!ds->drv->port_vlan_add || !ds->drv->port_pvid_set)
return -EOPNOTSUPP;
@@ -354,9 +354,9 @@ static int dsa_slave_port_fdb_add(struct net_device *dev,
struct dsa_switch *ds = p->parent;
int ret = -EOPNOTSUPP;
- if (obj->trans == SWITCHDEV_TRANS_PREPARE)
+ if (obj->trans_ph == SWITCHDEV_TRANS_PREPARE)
ret = ds->drv->port_fdb_add ? 0 : -EOPNOTSUPP;
- else if (obj->trans == SWITCHDEV_TRANS_COMMIT)
+ else if (obj->trans_ph == SWITCHDEV_TRANS_COMMIT)
ret = ds->drv->port_fdb_add(ds, p->port, fdb->addr, fdb->vid);
return ret;
@@ -462,7 +462,7 @@ static int dsa_slave_port_attr_set(struct net_device *dev,
switch (attr->id) {
case SWITCHDEV_ATTR_PORT_STP_STATE:
- if (attr->trans == SWITCHDEV_TRANS_COMMIT)
+ if (attr->trans_ph == SWITCHDEV_TRANS_COMMIT)
ret = dsa_slave_stp_update(dev, attr->u.stp_state);
break;
default:
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index fda38f830a10..df5a5446ff4c 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -163,7 +163,7 @@ int switchdev_port_attr_set(struct net_device *dev, struct switchdev_attr *attr)
* but should not commit the attr.
*/
- attr->trans = SWITCHDEV_TRANS_PREPARE;
+ attr->trans_ph = SWITCHDEV_TRANS_PREPARE;
err = __switchdev_port_attr_set(dev, attr);
if (err) {
/* Prepare phase failed: abort the transaction. Any
@@ -172,7 +172,7 @@ int switchdev_port_attr_set(struct net_device *dev, struct switchdev_attr *attr)
*/
if (err != -EOPNOTSUPP) {
- attr->trans = SWITCHDEV_TRANS_ABORT;
+ attr->trans_ph = SWITCHDEV_TRANS_ABORT;
__switchdev_port_attr_set(dev, attr);
}
@@ -184,7 +184,7 @@ int switchdev_port_attr_set(struct net_device *dev, struct switchdev_attr *attr)
* because the driver said everythings was OK in phase I.
*/
- attr->trans = SWITCHDEV_TRANS_COMMIT;
+ attr->trans_ph = SWITCHDEV_TRANS_COMMIT;
err = __switchdev_port_attr_set(dev, attr);
WARN(err, "%s: Commit of attribute (id=%d) failed.\n",
dev->name, attr->id);
@@ -243,7 +243,7 @@ int switchdev_port_obj_add(struct net_device *dev, struct switchdev_obj *obj)
* but should not commit the obj.
*/
- obj->trans = SWITCHDEV_TRANS_PREPARE;
+ obj->trans_ph = SWITCHDEV_TRANS_PREPARE;
err = __switchdev_port_obj_add(dev, obj);
if (err) {
/* Prepare phase failed: abort the transaction. Any
@@ -252,7 +252,7 @@ int switchdev_port_obj_add(struct net_device *dev, struct switchdev_obj *obj)
*/
if (err != -EOPNOTSUPP) {
- obj->trans = SWITCHDEV_TRANS_ABORT;
+ obj->trans_ph = SWITCHDEV_TRANS_ABORT;
__switchdev_port_obj_add(dev, obj);
}
@@ -264,7 +264,7 @@ int switchdev_port_obj_add(struct net_device *dev, struct switchdev_obj *obj)
* because the driver said everythings was OK in phase I.
*/
- obj->trans = SWITCHDEV_TRANS_COMMIT;
+ obj->trans_ph = SWITCHDEV_TRANS_COMMIT;
err = __switchdev_port_obj_add(dev, obj);
WARN(err, "%s: Commit of object (id=%d) failed.\n", dev->name, obj->id);