From: Arkadi Sharshevsky <[email protected]>

Add support for querying supported bridge flags.

Signed-off-by: Arkadi Sharshevsky <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Signed-off-by: Jiri Pirko <[email protected]>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index eb88b72..0333493 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -456,6 +456,9 @@ static int mlxsw_sp_port_attr_get(struct net_device *dev,
                mlxsw_sp_port_bridge_flags_get(mlxsw_sp->bridge, attr->orig_dev,
                                               &attr->u.brport_flags);
                break;
+       case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT:
+               attr->u.brport_flags_support = BR_LEARNING | BR_FLOOD;
+               break;
        default:
                return -EOPNOTSUPP;
        }
-- 
2.9.3

Reply via email to