diff options
author | Tobias Waldekranz <tobias@waldekranz.com> | 2022-03-16 16:08:53 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-17 16:49:59 -0700 |
commit | 8e6598a7b0fa834a563392d30017eac1b0102fcd (patch) | |
tree | 0bf3a84b2b3a9d9d9d237cf4c6de942eeff8221b /net/dsa/port.c | |
parent | 332afc4c8c0da3a451745c5d809f908006745c0d (diff) | |
download | linux-8e6598a7b0fa834a563392d30017eac1b0102fcd.tar.gz linux-8e6598a7b0fa834a563392d30017eac1b0102fcd.tar.bz2 linux-8e6598a7b0fa834a563392d30017eac1b0102fcd.zip |
net: dsa: Pass VLAN MSTI migration notifications to driver
Add the usual trampoline functionality from the generic DSA layer down
to the drivers for VLAN MSTI migrations.
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa/port.c')
-rw-r--r-- | net/dsa/port.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/net/dsa/port.c b/net/dsa/port.c index 02214033cec0..3ac114f6fc22 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -323,7 +323,10 @@ static void dsa_port_bridge_destroy(struct dsa_port *dp, static bool dsa_port_supports_mst(struct dsa_port *dp) { - return dsa_port_can_configure_learning(dp); + struct dsa_switch *ds = dp->ds; + + return ds->ops->vlan_msti_set && + dsa_port_can_configure_learning(dp); } int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br, @@ -800,6 +803,17 @@ int dsa_port_bridge_flags(struct dsa_port *dp, return 0; } +int dsa_port_vlan_msti(struct dsa_port *dp, + const struct switchdev_vlan_msti *msti) +{ + struct dsa_switch *ds = dp->ds; + + if (!ds->ops->vlan_msti_set) + return -EOPNOTSUPP; + + return ds->ops->vlan_msti_set(ds, *dp->bridge, msti); +} + int dsa_port_mtu_change(struct dsa_port *dp, int new_mtu, bool targeted_match) { |