Commit d341e2ce authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

mlxsw: spectrum_switchdev: Remove redundant check

Since commit 97c24290 ("switchdev: Execute bridge ndos only for
bridge ports") switchdev code checks that port is bridged, so no need to
perform the same check in the driver.
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 348b8fc3
...@@ -374,9 +374,6 @@ static int mlxsw_sp_port_attr_br_flags_set(struct mlxsw_sp_port *mlxsw_sp_port, ...@@ -374,9 +374,6 @@ static int mlxsw_sp_port_attr_br_flags_set(struct mlxsw_sp_port *mlxsw_sp_port,
unsigned long uc_flood = mlxsw_sp_port->uc_flood ? BR_FLOOD : 0; unsigned long uc_flood = mlxsw_sp_port->uc_flood ? BR_FLOOD : 0;
int err; int err;
if (!mlxsw_sp_port->bridged)
return -EINVAL;
if (switchdev_trans_ph_prepare(trans)) if (switchdev_trans_ph_prepare(trans))
return 0; return 0;
...@@ -796,9 +793,6 @@ static int __mlxsw_sp_port_vlans_add(struct mlxsw_sp_port *mlxsw_sp_port, ...@@ -796,9 +793,6 @@ static int __mlxsw_sp_port_vlans_add(struct mlxsw_sp_port *mlxsw_sp_port,
u16 vid, old_pvid; u16 vid, old_pvid;
int err; int err;
if (!mlxsw_sp_port->bridged)
return -EINVAL;
err = mlxsw_sp_port_fid_join(mlxsw_sp_port, vid_begin, vid_end); err = mlxsw_sp_port_fid_join(mlxsw_sp_port, vid_begin, vid_end);
if (err) { if (err) {
netdev_err(dev, "Failed to join FIDs\n"); netdev_err(dev, "Failed to join FIDs\n");
...@@ -1162,9 +1156,6 @@ static int __mlxsw_sp_port_vlans_del(struct mlxsw_sp_port *mlxsw_sp_port, ...@@ -1162,9 +1156,6 @@ static int __mlxsw_sp_port_vlans_del(struct mlxsw_sp_port *mlxsw_sp_port,
{ {
u16 vid, pvid; u16 vid, pvid;
if (!mlxsw_sp_port->bridged)
return -EINVAL;
mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid_begin, vid_end, mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid_begin, vid_end,
false); false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment