diff mbox series

[net-next] net: ftmac100: handle netdev flags IFF_PROMISC and IFF_ALLMULTI

Message ID 20230116182716.302246-1-saproj@gmail.com (mailing list archive)
State Accepted
Commit 75943bc9701bdd438aa0513c4fcb51923e020289
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: ftmac100: handle netdev flags IFF_PROMISC and IFF_ALLMULTI | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: andrew@lunn.ch
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 12 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sergei Antonov Jan. 16, 2023, 6:27 p.m. UTC
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(+)

Comments

patchwork-bot+netdevbpf@kernel.org Jan. 18, 2023, 1:10 p.m. UTC | #1
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!
diff mbox series

Patch

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;
 }