Skip to content

Commit 2ba31cd

Browse files
Verma, Aashishdavem330
authored andcommitted
net: stmmac: fix missing IFF_MULTICAST check in dwmac4_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: 477286b ("stmmac: add GMAC4 core support") Signed-off-by: Verma, Aashish <[email protected]> Tested-by: Tan, Tee Min <[email protected]> Signed-off-by: Ong Boon Leong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 907a076 commit 2ba31cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
420420
value |= GMAC_PACKET_FILTER_PM;
421421
/* Set all the bits of the HASH tab */
422422
memset(mc_filter, 0xff, sizeof(mc_filter));
423-
} else if (!netdev_mc_empty(dev)) {
423+
} else if (!netdev_mc_empty(dev) && (dev->flags & IFF_MULTICAST)) {
424424
struct netdev_hw_addr *ha;
425425

426426
/* Hash filter for multicast */

0 commit comments

Comments
 (0)