diff --git a/target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/vlan.c b/target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/vlan.c index 65ff34f23f9..936a4a25fd6 100644 --- a/target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/vlan.c +++ b/target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/vlan.c @@ -469,6 +469,9 @@ void rtl930x_vlan_tables_read(u32 vlan, struct rtldsa_vlan_info *info) info->untagged_ports = v >> 3; } +/* Group mask bits for the IGMP and MLD actions of VLAN_APP_PKT_CTRL */ +#define RTLDSA_93XX_VLAN_GROUP_IGMP_MLD (BIT(2) | BIT(3)) + void rtl930x_vlan_set_tagged(u32 vlan, struct rtldsa_vlan_info *info) { u32 v, w; @@ -481,6 +484,7 @@ void rtl930x_vlan_set_tagged(u32 vlan, struct rtldsa_vlan_info *info) w |= info->hash_mc_fid ? BIT(27) : 0; w |= info->hash_uc_fid ? BIT(28) : 0; w |= info->profile_id << 24; + w |= RTLDSA_93XX_VLAN_GROUP_IGMP_MLD << 16; buf[0] = v; buf[1] = w; @@ -688,7 +692,7 @@ void rtl931x_vlan_set_tagged(u32 vlan, struct rtldsa_vlan_info *info) x |= info->hash_mc_fid ? BIT(30) : 0; x |= ((u32)info->if_id & 0x3ff) << 20; x |= (info->profile_id & 0xf) << 16; - x |= info->multicast_grp_mask & 0xffff; + x |= (info->multicast_grp_mask | RTLDSA_93XX_VLAN_GROUP_IGMP_MLD) & 0xffff; if (info->l2_tunnel_list_id >= 0) { y = info->l2_tunnel_list_id << 18; y |= BIT(31); diff --git a/target/linux/realtek/files-6.18/drivers/net/ethernet/realtek/rtl838x_eth.c b/target/linux/realtek/files-6.18/drivers/net/ethernet/realtek/rtl838x_eth.c index a9f4599d550..78a2b97f7e7 100644 --- a/target/linux/realtek/files-6.18/drivers/net/ethernet/realtek/rtl838x_eth.c +++ b/target/linux/realtek/files-6.18/drivers/net/ethernet/realtek/rtl838x_eth.c @@ -231,7 +231,7 @@ static bool rteth_93xx_decode_tag(struct rteth_frag *frag, struct rteth_dsa_tag t->queue = (frag->cpu_tag[2] >> 11) & 0x1f; t->reason = frag->cpu_tag[7] & 0x3f; t->crc_error = frag->cpu_tag[1] & BIT(6); - t->l2_offloaded = (t->reason >= 19 && t->reason <= 28) ? 0 : 1; + t->l2_offloaded = (t->reason >= 19 && t->reason <= 28) || t->reason == 55 ? 0 : 1; if (t->reason != 63) pr_debug("%s: Reason %d, port %d, queue %d\n", __func__, t->reason, t->port, t->queue); @@ -778,16 +778,20 @@ static void rteth_839x_hw_init(struct rteth_ctrl *ctrl) static void rteth_930x_hw_init(struct rteth_ctrl *ctrl) { - /* Trap MLD and IGMP messages to CPU_PORT */ - regmap_write(ctrl->map, RTETH_930X_VLAN_APP_PKT_CTRL, 0x12); + /* Trap IGMP and MLD to the CPU (IGMP_ACT = MLD_ACT = 1) in every VLAN + * whose group mask selects them + */ + regmap_write(ctrl->map, RTETH_930X_VLAN_APP_PKT_CTRL, 0x9); /* Flush learned FDB entries on link down of a port */ regmap_set_bits(ctrl->map, RTETH_930X_L2_CTRL, BIT(7)); } static void rteth_931x_hw_init(struct rteth_ctrl *ctrl) { - /* Trap MLD and IGMP messages to CPU_PORT */ - regmap_write(ctrl->map, RTETH_931X_VLAN_APP_PKT_CTRL, 0x12); + /* Trap IGMP and MLD to the CPU (IGMP_ACT = MLD_ACT = 1) in every VLAN + * whose group mask selects them + */ + regmap_write(ctrl->map, RTETH_931X_VLAN_APP_PKT_CTRL, 0x9); /* Set PCIE_PWR_DOWN */ regmap_set_bits(ctrl->map, RTETH_931X_PS_SOC_CTRL, BIT(1)); }