summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRamesh Babu B <ramesh.babu.b@intel.com>2021-05-04 17:42:41 +0200
committerDavid S. Miller <davem@davemloft.net>2021-05-04 21:01:37 +0200
commit4c7a94286ef7ac7301d633f17519fb1bb89d7550 (patch)
tree82b2fe9cd0c6e69380bd7563b30166d78e70b506 /drivers
parentnet/nfc: fix use-after-free llcp_sock_bind/connect (diff)
downloadlinux-4c7a94286ef7ac7301d633f17519fb1bb89d7550.tar.xz
linux-4c7a94286ef7ac7301d633f17519fb1bb89d7550.zip
net: stmmac: Clear receive all(RA) bit when promiscuous mode is off
In promiscuous mode Receive All bit is set in GMAC packet filter register, but outside promiscuous mode Receive All bit is not cleared, which resulted in all network packets are received when toggle (ON/OFF) the promiscuous mode. Fixes: e0f9956a3862 ("net: stmmac: Add option for VLAN filter fail queue enable") Signed-off-by: Ramesh Babu B <ramesh.babu.b@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
index 95864f014ffa..f35c03c9f91e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
@@ -642,6 +642,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
value &= ~GMAC_PACKET_FILTER_PCF;
value &= ~GMAC_PACKET_FILTER_PM;
value &= ~GMAC_PACKET_FILTER_PR;
+ value &= ~GMAC_PACKET_FILTER_RA;
if (dev->flags & IFF_PROMISC) {
/* VLAN Tag Filter Fail Packets Queuing */
if (hw->vlan_fail_q_en) {