summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
diff options
context:
space:
mode:
authorHoratiu Vultur <horatiu.vultur@microchip.com>2022-02-04 10:14:52 +0100
committerDavid S. Miller <davem@davemloft.net>2022-02-05 15:00:43 +0000
commitadd2c844db33d96d5431c864f1ee041d3c456a66 (patch)
tree6db3d48ce75cfa1a0997b5212cb769a3b1ca6be6 /drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
parent47aeea0d57e80c9449448802aede54526a3d6305 (diff)
downloadlinux-stable-add2c844db33d96d5431c864f1ee041d3c456a66.tar.gz
linux-stable-add2c844db33d96d5431c864f1ee041d3c456a66.tar.bz2
linux-stable-add2c844db33d96d5431c864f1ee041d3c456a66.zip
net: lan966x: Update mdb when enabling/disabling mcast_snooping
When the multicast snooping is disabled, the mdb entries should be removed from the HW, but they still need to be kept in memory for when the mcast_snooping will be enabled again. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c')
-rw-r--r--drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c b/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
index cf2535c18df8..9fce865287e7 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_switchdev.c
@@ -185,6 +185,10 @@ static void lan966x_port_mc_set(struct lan966x_port *port, bool mcast_ena)
struct lan966x *lan966x = port->lan966x;
port->mcast_ena = mcast_ena;
+ if (mcast_ena)
+ lan966x_mdb_restore_entries(lan966x);
+ else
+ lan966x_mdb_clear_entries(lan966x);
lan_rmw(ANA_CPU_FWD_CFG_IGMP_REDIR_ENA_SET(mcast_ena) |
ANA_CPU_FWD_CFG_MLD_REDIR_ENA_SET(mcast_ena) |