aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/dsa/switch.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2020-06-30 11:32:02 +0200
committerJoerg Roedel <jroedel@suse.de>2020-06-30 11:32:02 +0200
commit77346a704c913268a2dad68d59523fd85dc74088 (patch)
tree62c66bcb163b0db42a1fd0a397a6973e52f4ddce /net/dsa/switch.c
parentiommu/qcom: add optional 'tbu' clock for TLB invalidate (diff)
parentLinux 5.8-rc3 (diff)
downloadwireguard-linux-77346a704c913268a2dad68d59523fd85dc74088.tar.xz
wireguard-linux-77346a704c913268a2dad68d59523fd85dc74088.zip
Merge tag 'v5.8-rc3' into arm/qcom
Linux 5.8-rc3
Diffstat (limited to '')
-rw-r--r--net/dsa/switch.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index f3c32ff552b3..86c8dc5c32a0 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -89,11 +89,16 @@ static int dsa_switch_mtu(struct dsa_switch *ds,
static int dsa_switch_bridge_join(struct dsa_switch *ds,
struct dsa_notifier_bridge_info *info)
{
- if (ds->index == info->sw_index && ds->ops->port_bridge_join)
+ struct dsa_switch_tree *dst = ds->dst;
+
+ if (dst->index == info->tree_index && ds->index == info->sw_index &&
+ ds->ops->port_bridge_join)
return ds->ops->port_bridge_join(ds, info->port, info->br);
- if (ds->index != info->sw_index && ds->ops->crosschip_bridge_join)
- return ds->ops->crosschip_bridge_join(ds, info->sw_index,
+ if ((dst->index != info->tree_index || ds->index != info->sw_index) &&
+ ds->ops->crosschip_bridge_join)
+ return ds->ops->crosschip_bridge_join(ds, info->tree_index,
+ info->sw_index,
info->port, info->br);
return 0;
@@ -103,13 +108,17 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
struct dsa_notifier_bridge_info *info)
{
bool unset_vlan_filtering = br_vlan_enabled(info->br);
+ struct dsa_switch_tree *dst = ds->dst;
int err, i;
- if (ds->index == info->sw_index && ds->ops->port_bridge_leave)
+ if (dst->index == info->tree_index && ds->index == info->sw_index &&
+ ds->ops->port_bridge_join)
ds->ops->port_bridge_leave(ds, info->port, info->br);
- if (ds->index != info->sw_index && ds->ops->crosschip_bridge_leave)
- ds->ops->crosschip_bridge_leave(ds, info->sw_index, info->port,
+ if ((dst->index != info->tree_index || ds->index != info->sw_index) &&
+ ds->ops->crosschip_bridge_join)
+ ds->ops->crosschip_bridge_leave(ds, info->tree_index,
+ info->sw_index, info->port,
info->br);
/* If the bridge was vlan_filtering, the bridge core doesn't trigger an