summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2016-06-20 23:04:02 +0200
committerDavid S. Miller <davem@davemloft.net>2016-06-21 05:02:49 -0400
commitddbe993dbe4d832a6ea31e4359150fbc5a4b93d4 (patch)
tree28a587170819c920418fd20275d93a58c14f8ee1 /drivers/net/ethernet/mellanox/mlxsw/spectrum.c
parent6ec439043b0dcbd7845b9e268a12daac92ebd190 (diff)
downloadlwn-ddbe993dbe4d832a6ea31e4359150fbc5a4b93d4.tar.gz
lwn-ddbe993dbe4d832a6ea31e4359150fbc5a4b93d4.zip
mlxsw: spectrum: Remove unnecessary checks from event processing
When upper device of a VLAN device changes we already made sure it's a bridge device in PRECHANGEUPPER, so no need to check it's a master device in CHANGEUPPER. 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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 46c867f3f261..e55c685ee4f3 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -3440,10 +3440,10 @@ static int mlxsw_sp_netdevice_vport_event(struct net_device *dev,
switch (event) {
case NETDEV_PRECHANGEUPPER:
upper_dev = info->upper_dev;
- if (!info->master || !info->linking)
- break;
if (!netif_is_bridge_master(upper_dev))
return -EINVAL;
+ if (!info->linking)
+ break;
/* We can't have multiple VLAN interfaces configured on
* the same port and being members in the same bridge.
*/
@@ -3453,8 +3453,6 @@ static int mlxsw_sp_netdevice_vport_event(struct net_device *dev,
break;
case NETDEV_CHANGEUPPER:
upper_dev = info->upper_dev;
- if (!info->master)
- break;
if (info->linking) {
if (!mlxsw_sp_vport) {
WARN_ON(!mlxsw_sp_vport);