realtek: don't add CPU port to multicast portmasks
[openwrt/staging/hauke.git] / target / linux / realtek / files-5.15 / drivers / net / dsa / rtl83xx / dsa.c
index 811c897234cdb2794c0750e04abc3b581a50bed4..b4cb39ed5d8f0792eaa7a916d55a76f96636e6f5 100644 (file)
@@ -981,7 +981,7 @@ static int rtl83xx_mc_group_alloc(struct rtl838x_switch_priv *priv, int port)
        }
 
        set_bit(mc_group, priv->mc_group_bm);
-       portmask = BIT_ULL(port) | BIT_ULL(priv->cpu_port);
+       portmask = BIT_ULL(port);
        priv->r->write_mcast_pmask(mc_group, portmask);
 
        return mc_group;
@@ -1013,11 +1013,8 @@ static u64 rtl83xx_mc_group_del_port(struct rtl838x_switch_priv *priv, int mc_gr
        }
        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);
-               priv->r->write_mcast_pmask(mc_group, portmask);
+       if (!portmask)
                clear_bit(mc_group, priv->mc_group_bm);
-       }
 
        return portmask;
 }