diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c index 2726a3ca20..fd2710f039 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c @@ -445,6 +445,16 @@ static void rtldsa_vlan_set_pvid(struct rtl838x_switch_priv *priv, priv->ports[port].pvid = pvid; } +static void rtldsa_83xx_mc_pmasks_setup(struct rtl838x_switch_priv *priv) +{ + /* RTL8380 and RTL8390 use an index into the portmask table to set the + * unknown multicast portmask, setup a default at a safe location + * On RTL93XX, the portmask is directly set in the profile, + * see e.g. rtl9300_vlan_profile_setup + */ + priv->r->write_mcast_pmask(MC_PMASK_ALL_PORTS_IDX, ~0); +} + /* Initialize all VLANS */ static void rtldsa_vlan_setup(struct rtl838x_switch_priv *priv) { @@ -547,6 +557,7 @@ static int rtldsa_83xx_setup(struct dsa_switch *ds) rtldsa_83xx_init_stats(priv); rtldsa_init_counters(priv); + rtldsa_83xx_mc_pmasks_setup(priv); rtldsa_vlan_setup(priv); rtldsa_setup_bpdu_traps(priv); diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c index 8c20c04083..8c408e5608 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c @@ -521,13 +521,6 @@ static void rtl838x_vlan_profile_setup(int profile) RTL838X_VLAN_IP6_UNKN_MC_FLD(MC_PMASK_ALL_PORTS_IDX); sw_w32(p, RTL838X_VLAN_PROFILE(profile)); - - /* RTL8380 and RTL8390 use an index into the portmask table to set the - * unknown multicast portmask, setup a default at a safe location - * On RTL93XX, the portmask is directly set in the profile, - * see e.g. rtl9300_vlan_profile_setup - */ - rtl838x_write_mcast_pmask(MC_PMASK_ALL_PORTS_IDX, RTL838X_MC_PMASK_ALL_PORTS); } static void rtl838x_l2_learning_setup(void) diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c index a60a406f81..72185d3e89 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c @@ -554,8 +554,6 @@ static void rtl839x_vlan_profile_setup(int profile) sw_w32(p[0], RTL839X_VLAN_PROFILE(profile)); sw_w32(p[1], RTL839X_VLAN_PROFILE(profile) + 4); - - rtl839x_write_mcast_pmask(MC_PMASK_ALL_PORTS_IDX, RTL839X_MC_PMASK_ALL_PORTS); } static void rtl839x_traffic_set(int source, u64 dest_matrix)