[PATCH v2 3/6] realtek: actually remove port from multicast portmask

Jan Hoffmann jan at 3e8.eu
Sat May 6 16:05:32 PDT 2023


Fixes: 724e4af530cd ("realtek: Store and Restore MC memberships for port enable/disable")
Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
---
 target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c | 1 +
 target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c
index a9de70531237..79a5c5eea289 100644
--- a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c
@@ -1017,6 +1017,7 @@ static u64 rtl83xx_mc_group_del_port(struct rtl838x_switch_priv *priv, int mc_gr
 		pr_info("%s: %d is lag slave. ignore\n", __func__, port);
 		return portmask;
 	}
+	portmask &= ~BIT_ULL(port);
 	priv->r->write_mcast_pmask(mc_group, portmask);
 	if (portmask == BIT_ULL(priv->cpu_port)) {
 		portmask &= ~BIT_ULL(priv->cpu_port);
diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
index 90a6d6766051..f3b1cd08acb3 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
@@ -1004,6 +1004,7 @@ static u64 rtl83xx_mc_group_del_port(struct rtl838x_switch_priv *priv, int mc_gr
 		pr_info("%s: %d is lag slave. ignore\n", __func__, port);
 		return portmask;
 	}
+	portmask &= ~BIT_ULL(port);
 	priv->r->write_mcast_pmask(mc_group, portmask);
 	if (portmask == BIT_ULL(priv->cpu_port)) {
 		portmask &= ~BIT_ULL(priv->cpu_port);
-- 
2.40.0




More information about the openwrt-devel mailing list