realtek: actually remove port from multicast portmask
authorJan Hoffmann <jan@3e8.eu>
Sat, 6 May 2023 23:05:32 +0000 (01:05 +0200)
committerSander Vanheule <sander@svanheule.net>
Sun, 7 May 2023 17:09:01 +0000 (19:09 +0200)
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
target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c

index e45919d8b505f7f521fe7a5bd4c09e973e521ae4..bdcbb0a074360a98264c7353068d3544bde0d190 100644 (file)
@@ -1024,6 +1024,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);
index 43b6d502f7037f547b52fbbe83559810492f5a44..811c897234cdb2794c0750e04abc3b581a50bed4 100644 (file)
@@ -1011,6 +1011,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);