diff mbox series

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

Message ID 20230506230535.1150881-4-jan@3e8.eu
State Accepted
Delegated to: Sander Vanheule
Headers show
Series realtek: fix management of mdb entries | expand

Commit Message

Jan Hoffmann May 6, 2023, 11:05 p.m. UTC
Fixes: 724e4af530cd ("realtek: Store and Restore MC memberships for port enable/disable")
Signed-off-by: Jan Hoffmann <jan@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 mbox series

Patch

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);