aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorScott Feldman <sfeldma@gmail.com>2015-05-13 14:16:50 -0400
committerDavid S. Miller <davem@davemloft.net>2015-05-13 14:20:59 -0400
commit42275bd8fcb351f951781d8882f359d25976824b (patch)
tree9689357f34d19a10544b03047df26b2031364664 /net/dsa
parent1f7bd29bc0559aedae857639ca391c815e47f1d9 (diff)
switchdev: don't use anonymous union on switchdev attr/obj structs
Older gcc versions (e.g. gcc version 4.4.6) don't like anonymous unions which was causing build issues on the newly added switchdev attr/obj structs. Fix this by using named union on structs. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Reported-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/slave.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 3fb5210e318c..04ffad311704 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -353,7 +353,7 @@ static int dsa_slave_port_attr_set(struct net_device *dev,
353 switch (attr->id) { 353 switch (attr->id) {
354 case SWITCHDEV_ATTR_PORT_STP_STATE: 354 case SWITCHDEV_ATTR_PORT_STP_STATE:
355 if (attr->trans == SWITCHDEV_TRANS_COMMIT) 355 if (attr->trans == SWITCHDEV_TRANS_COMMIT)
356 ret = dsa_slave_stp_update(dev, attr->stp_state); 356 ret = dsa_slave_stp_update(dev, attr->u.stp_state);
357 break; 357 break;
358 default: 358 default:
359 ret = -EOPNOTSUPP; 359 ret = -EOPNOTSUPP;
@@ -408,8 +408,8 @@ static int dsa_slave_port_attr_get(struct net_device *dev,
408 408
409 switch (attr->id) { 409 switch (attr->id) {
410 case SWITCHDEV_ATTR_PORT_PARENT_ID: 410 case SWITCHDEV_ATTR_PORT_PARENT_ID:
411 attr->ppid.id_len = sizeof(ds->index); 411 attr->u.ppid.id_len = sizeof(ds->index);
412 memcpy(&attr->ppid.id, &ds->index, attr->ppid.id_len); 412 memcpy(&attr->u.ppid.id, &ds->index, attr->u.ppid.id_len);
413 break; 413 break;
414 default: 414 default:
415 return -EOPNOTSUPP; 415 return -EOPNOTSUPP;