Implementing ks8995_port_pre_bridge_flags() and ks8995_port_bridge_flags() without port_bridge_join() is a no-op. This adds stubs for bridge join/leave callbacks following the pattern of drivers/net/dsa/microchip/ksz_common.c: as we have STP callbacks and these will be called right after bridge join/leave these will take care of the job of setting up the learning which is all we support. Fixes: a7fe8b266f65 ("net: dsa: ks8995: Add basic switch set-up") Reported-by: Vladimir Oltean Signed-off-by: Linus Walleij --- drivers/net/dsa/ks8995.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/dsa/ks8995.c b/drivers/net/dsa/ks8995.c index 5ad62fa4e52c..060bc8303a14 100644 --- a/drivers/net/dsa/ks8995.c +++ b/drivers/net/dsa/ks8995.c @@ -461,6 +461,26 @@ static void ks8995_port_disable(struct dsa_switch *ds, int port) dev_dbg(ks->dev, "disable port %d\n", port); } +static int ks8995_port_bridge_join(struct dsa_switch *ds, int port, + struct dsa_bridge bridge, + bool *tx_fwd_offload, + struct netlink_ext_ack *extack) +{ + /* port_stp_state_set() will be called after to put the port in + * appropriate state so there is no need to do anything. + */ + + return 0; +} + +static void ks8995_port_bridge_leave(struct dsa_switch *ds, int port, + struct dsa_bridge bridge) +{ + /* port_stp_state_set() will be called after to put the port in + * forwarding state so there is no need to do anything. + */ +} + static int ks8995_port_pre_bridge_flags(struct dsa_switch *ds, int port, struct switchdev_brport_flags flags, struct netlink_ext_ack *extack) @@ -635,6 +655,8 @@ static int ks8995_get_max_mtu(struct dsa_switch *ds, int port) static const struct dsa_switch_ops ks8995_ds_ops = { .get_tag_protocol = ks8995_get_tag_protocol, .setup = ks8995_setup, + .port_bridge_join = ks8995_port_bridge_join, + .port_bridge_leave = ks8995_port_bridge_leave, .port_pre_bridge_flags = ks8995_port_pre_bridge_flags, .port_bridge_flags = ks8995_port_bridge_flags, .port_enable = ks8995_port_enable, -- 2.52.0