Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9c5f7d7 authored by Jose Abreu's avatar Jose Abreu Committed by David S. Miller
Browse files

net: stmmac: dwmac4/5: Fix Hash Filter



In order for hash filter to work we need to set the HPF bit.

Fout out while running stmmac selftests

Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9463c445
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@
#define GMAC_PACKET_FILTER_HMC		BIT(2)
#define GMAC_PACKET_FILTER_PM		BIT(4)
#define GMAC_PACKET_FILTER_PCF		BIT(7)
#define GMAC_PACKET_FILTER_HPF		BIT(10)

#define GMAC_MAX_PERFECT_ADDRESSES	128

+2 −0
Original line number Diff line number Diff line
@@ -440,6 +440,8 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
		writel(mc_filter[1], ioaddr + GMAC_HASH_TAB_32_63);
	}

	value |= GMAC_PACKET_FILTER_HPF;

	/* Handle multiple unicast addresses */
	if (netdev_uc_count(dev) > GMAC_MAX_PERFECT_ADDRESSES) {
		/* Switch to promiscuous mode if more than 128 addrs