Skip to contentSkip to conversation

net: stmmac: Clear receive all(RA) bit when promiscuous mode is off

PATCH Applied Ramesh Babu B 2 participants 2 messages May 4, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: stmmac: Clear receive all(RA) bit when promiscuous mode is off

From: Ramesh Babu B <[email protected]>

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")
---
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +1 -0
index 95864f014ffa..f35c03c9f91e 100644
@@ -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) {
Signature · 1 line
2.17.1
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 8 lines · On Tue, 4 May 2021 21:12:41 +0530 you wrote:

From: Ramesh Babu B <[email protected]>

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.

[...]

Here is the summary with links:
- [net,1/1] net: stmmac: Clear receive all(RA) bit when promiscuous mode is off

    https://git.kernel.org/netdev/net/c/4c7a94286ef7

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html