netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ftmac100: handle netdev flags IFF_PROMISC and IFF_ALLMULTI
@ 2023-01-16 18:27 Sergei Antonov
  2023-01-18 13:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Sergei Antonov @ 2023-01-16 18:27 UTC (permalink / raw)
  To: netdev; +Cc: davem, edumazet, kuba, pabeni, vladimir.oltean, Sergei Antonov

When netdev->flags has IFF_PROMISC or IFF_ALLMULTI, set the
corresponding bits in the MAC Control Register (MACCR).

This change is based on code from the ftgmac100 driver, see
ftgmac100_start_hw() in ftgmac100.c

Signed-off-by: Sergei Antonov <saproj@gmail.com>
---
 drivers/net/ethernet/faraday/ftmac100.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/faraday/ftmac100.c b/drivers/net/ethernet/faraday/ftmac100.c
index 6c8c78018ce6..139fe66f8bcd 100644
--- a/drivers/net/ethernet/faraday/ftmac100.c
+++ b/drivers/net/ethernet/faraday/ftmac100.c
@@ -182,6 +182,12 @@ static int ftmac100_start_hw(struct ftmac100 *priv)
 	if (netdev->mtu > ETH_DATA_LEN)
 		maccr |= FTMAC100_MACCR_RX_FTL;
 
+	/* Add other bits as needed */
+	if (netdev->flags & IFF_PROMISC)
+		maccr |= FTMAC100_MACCR_RCV_ALL;
+	if (netdev->flags & IFF_ALLMULTI)
+		maccr |= FTMAC100_MACCR_RX_MULTIPKT;
+
 	iowrite32(maccr, priv->base + FTMAC100_OFFSET_MACCR);
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: ftmac100: handle netdev flags IFF_PROMISC and IFF_ALLMULTI
  2023-01-16 18:27 [PATCH net-next] net: ftmac100: handle netdev flags IFF_PROMISC and IFF_ALLMULTI Sergei Antonov
@ 2023-01-18 13:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-18 13:10 UTC (permalink / raw)
  To: Sergei Antonov; +Cc: netdev, davem, edumazet, kuba, pabeni, vladimir.oltean

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 16 Jan 2023 21:27:16 +0300 you wrote:
> When netdev->flags has IFF_PROMISC or IFF_ALLMULTI, set the
> corresponding bits in the MAC Control Register (MACCR).
> 
> This change is based on code from the ftgmac100 driver, see
> ftgmac100_start_hw() in ftgmac100.c
> 
> Signed-off-by: Sergei Antonov <saproj@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: ftmac100: handle netdev flags IFF_PROMISC and IFF_ALLMULTI
    https://git.kernel.org/netdev/net-next/c/75943bc9701b

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-18 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-16 18:27 [PATCH net-next] net: ftmac100: handle netdev flags IFF_PROMISC and IFF_ALLMULTI Sergei Antonov
2023-01-18 13:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).