diff mbox

[net-next,RFC,07/12] net: dsa: Add support for querying supported bridge flags

Message ID 1499268990-19251-8-git-send-email-arkadis@mellanox.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Arkadi Sharshevsky July 5, 2017, 3:36 p.m. UTC
The DSA drivers do not support bridge flags offload. Yet, this attribute
should be added in order for the bridge to fail when one tries set a
flag on the port, as explained in commit dc0ecabd6231 ("net: switchdev:
Add support for querying supported bridge flags by hardware").

Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
---
 net/dsa/slave.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 7307195..53326ba 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -324,6 +324,9 @@  static int dsa_slave_port_attr_get(struct net_device *dev,
 		attr->u.ppid.id_len = sizeof(ds->index);
 		memcpy(&attr->u.ppid.id, &ds->index, attr->u.ppid.id_len);
 		break;
+	case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT:
+		attr->u.brport_flags_support = 0;
+		break;
 	default:
 		return -EOPNOTSUPP;
 	}