Commit 2b783e61 authored by Jose Abreu's avatar Jose Abreu Committed by David S. Miller

net: stmmac: dwmac4/5: Also pass control frames while in promisc mode

In order for the selftests to run the Flow Control selftest we need to
also pass pause frames to the stack.

Pass this type of frames while in promiscuous mode.
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 52ef6d92
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
#define GMAC_PACKET_FILTER_PR BIT(0) #define GMAC_PACKET_FILTER_PR BIT(0)
#define GMAC_PACKET_FILTER_HMC BIT(2) #define GMAC_PACKET_FILTER_HMC BIT(2)
#define GMAC_PACKET_FILTER_PM BIT(4) #define GMAC_PACKET_FILTER_PM BIT(4)
#define GMAC_PACKET_FILTER_PCF BIT(7)
#define GMAC_MAX_PERFECT_ADDRESSES 128 #define GMAC_MAX_PERFECT_ADDRESSES 128
......
...@@ -406,7 +406,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw, ...@@ -406,7 +406,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
unsigned int value = 0; unsigned int value = 0;
if (dev->flags & IFF_PROMISC) { if (dev->flags & IFF_PROMISC) {
value = GMAC_PACKET_FILTER_PR; value = GMAC_PACKET_FILTER_PR | GMAC_PACKET_FILTER_PCF;
} else if ((dev->flags & IFF_ALLMULTI) || } else if ((dev->flags & IFF_ALLMULTI) ||
(netdev_mc_count(dev) > HASH_TABLE_SIZE)) { (netdev_mc_count(dev) > HASH_TABLE_SIZE)) {
/* Pass all multi */ /* Pass all multi */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment