summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2017-05-16 20:38:30 +0300
committerDavid S. Miller <davem@davemloft.net>2017-05-17 21:06:54 +0300
commitd341e2ce6bf77250096d568f65be04466ace5d0e (patch)
treefab9778daca58f69ac9f104d622b85d745dbb6ed
parent348b8fc3cf3059ac151c693dac992947a3daa437 (diff)
downloadlinux-d341e2ce6bf77250096d568f65be04466ace5d0e.tar.xz
mlxsw: spectrum_switchdev: Remove redundant check
Since commit 97c242902c20 ("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: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 85790d38d2f0..d9393f7ff79f 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -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;
int err;
- if (!mlxsw_sp_port->bridged)
- return -EINVAL;
-
if (switchdev_trans_ph_prepare(trans))
return 0;
@@ -796,9 +793,6 @@ static int __mlxsw_sp_port_vlans_add(struct mlxsw_sp_port *mlxsw_sp_port,
u16 vid, old_pvid;
int err;
- if (!mlxsw_sp_port->bridged)
- return -EINVAL;
-
err = mlxsw_sp_port_fid_join(mlxsw_sp_port, vid_begin, vid_end);
if (err) {
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,
{
u16 vid, pvid;
- if (!mlxsw_sp_port->bridged)
- return -EINVAL;
-
mlxsw_sp_port_vid_learning_set(mlxsw_sp_port, vid_begin, vid_end,
false);