net: stmmac: xgmac: fix missing IFF_MULTICAST checki in dwxgmac2_set_filter
Subsystems (4)
PATCH v5 4/5 net: stmmac: xgmac: fix missing IFF_MULTICAST checki in dwxgmac2_set_filter
From: "Tan, Tee Min" <[email protected]>
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 0efedbf11f07a ("net: stmmac: xgmac: Fix XGMAC selftests")
Signed-off-by Tan, Tee Min <[email protected]>
Signed-off-by Ong Boon Leong <[email protected]>
--- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c +1 -1
@@ -458,7 +458,7 @@ static void dwxgmac2_set_filter(struct mac_device_info *hw,for (i =0 ; i <XGMAC_MAX_HASH_TABLE ; i++)writel (~0x0 , ioaddr +XGMAC_HASH_TABLE (i)); - }else if (!netdev_mc_empty (dev)) { + }else if (!netdev_mc_empty (dev) && (dev->flags &IFF_MULTICAST )) {struct netdev_hw_addr *ha; value |=XGMAC_FILTER_HMC ;
Signature · 1 line
2.17.1