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

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: 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 6ec43904
...@@ -3440,10 +3440,10 @@ static int mlxsw_sp_netdevice_vport_event(struct net_device *dev, ...@@ -3440,10 +3440,10 @@ static int mlxsw_sp_netdevice_vport_event(struct net_device *dev,
switch (event) { switch (event) {
case NETDEV_PRECHANGEUPPER: case NETDEV_PRECHANGEUPPER:
upper_dev = info->upper_dev; upper_dev = info->upper_dev;
if (!info->master || !info->linking)
break;
if (!netif_is_bridge_master(upper_dev)) if (!netif_is_bridge_master(upper_dev))
return -EINVAL; return -EINVAL;
if (!info->linking)
break;
/* We can't have multiple VLAN interfaces configured on /* We can't have multiple VLAN interfaces configured on
* the same port and being members in the same bridge. * 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, ...@@ -3453,8 +3453,6 @@ static int mlxsw_sp_netdevice_vport_event(struct net_device *dev,
break; break;
case NETDEV_CHANGEUPPER: case NETDEV_CHANGEUPPER:
upper_dev = info->upper_dev; upper_dev = info->upper_dev;
if (!info->master)
break;
if (info->linking) { if (info->linking) {
if (!mlxsw_sp_vport) { if (!mlxsw_sp_vport) {
WARN_ON(!mlxsw_sp_vport); WARN_ON(!mlxsw_sp_vport);
......
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