Skip to content

Commit 2f633d5

Browse files
teemintadavem330
authored andcommitted
net: stmmac: xgmac: fix missing IFF_MULTICAST checki in dwxgmac2_set_filter
Without checking for IFF_MULTICAST flag, it is wrong to assume multicast filtering is always enabled. By checking against IFF_MULTICAST, now the driver behaves correctly when the multicast support is toggled by below command:- ip link set <devname> multicast off|on Fixes: 0efedbf ("net: stmmac: xgmac: Fix XGMAC selftests") Signed-off-by: Tan, Tee Min <[email protected]> Signed-off-by: Ong Boon Leong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2ba31cd commit 2f633d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ static void dwxgmac2_set_filter(struct mac_device_info *hw,
458458

459459
for (i = 0; i < XGMAC_MAX_HASH_TABLE; i++)
460460
writel(~0x0, ioaddr + XGMAC_HASH_TABLE(i));
461-
} else if (!netdev_mc_empty(dev)) {
461+
} else if (!netdev_mc_empty(dev) && (dev->flags & IFF_MULTICAST)) {
462462
struct netdev_hw_addr *ha;
463463

464464
value |= XGMAC_FILTER_HMC;

0 commit comments

Comments
 (0)