From a68dc7b938fbbf3d4d74b81a9b5d0d6fdd78566c Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Wed, 5 Jan 2022 15:18:13 +0200 Subject: net: dsa: remove cross-chip support for HSR The cross-chip notifiers for HSR are bypass operations, meaning that even though all switches in a tree are notified, only the switch specified in the info structure is targeted. We can eliminate the unnecessary complexity by deleting the cross-chip notifier logic and calling the ds->ops straight from port.c. Cc: George McCollister Signed-off-by: Vladimir Oltean Reviewed-by: George McCollister Signed-off-by: David S. Miller --- net/dsa/switch.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'net/dsa/switch.c') diff --git a/net/dsa/switch.c b/net/dsa/switch.c index a164ec02b4e9..e3c7d2627a61 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -437,24 +437,6 @@ static int dsa_switch_fdb_del(struct dsa_switch *ds, return dsa_port_do_fdb_del(dp, info->addr, info->vid); } -static int dsa_switch_hsr_join(struct dsa_switch *ds, - struct dsa_notifier_hsr_info *info) -{ - if (ds->index == info->sw_index && ds->ops->port_hsr_join) - return ds->ops->port_hsr_join(ds, info->port, info->hsr); - - return -EOPNOTSUPP; -} - -static int dsa_switch_hsr_leave(struct dsa_switch *ds, - struct dsa_notifier_hsr_info *info) -{ - if (ds->index == info->sw_index && ds->ops->port_hsr_leave) - return ds->ops->port_hsr_leave(ds, info->port, info->hsr); - - return -EOPNOTSUPP; -} - static int dsa_switch_lag_change(struct dsa_switch *ds, struct dsa_notifier_lag_info *info) { @@ -729,12 +711,6 @@ static int dsa_switch_event(struct notifier_block *nb, case DSA_NOTIFIER_HOST_FDB_DEL: err = dsa_switch_host_fdb_del(ds, info); break; - case DSA_NOTIFIER_HSR_JOIN: - err = dsa_switch_hsr_join(ds, info); - break; - case DSA_NOTIFIER_HSR_LEAVE: - err = dsa_switch_hsr_leave(ds, info); - break; case DSA_NOTIFIER_LAG_CHANGE: err = dsa_switch_lag_change(ds, info); break; -- cgit