netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] stmmac: fix changing mac address
@ 2023-04-17 19:29 Corinna Vinschen
  2023-04-19 12:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Corinna Vinschen @ 2023-04-17 19:29 UTC (permalink / raw)
  To: netdev, Giuseppe Cavallaro, alexandre.torgue, Jose Abreu,
	Jakub Kicinski

Without the IFF_LIVE_ADDR_CHANGE flag being set, the network code
disallows changing the mac address while the interface is UP.

Consequences are, for instance, that the interface can't be used
in a failover bond.

Add the missing flag to net_device priv_flags.

Tested on Intel Elkhart Lake with default settings, as well as with
failover and alb mode bonds.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 8ab67c020a08..02d0bf70c528 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7279,6 +7279,8 @@ int stmmac_dvr_probe(struct device *device,
 	if (flow_ctrl)
 		priv->flow_ctrl = FLOW_AUTO;	/* RX/TX pause on */
 
+	ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
+
 	/* Setup channels NAPI */
 	stmmac_napi_add(ndev);
 
-- 
2.31.1


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

* Re: [PATCH net-next] stmmac: fix changing mac address
  2023-04-17 19:29 [PATCH net-next] stmmac: fix changing mac address Corinna Vinschen
@ 2023-04-19 12:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-19 12:20 UTC (permalink / raw)
  To: Corinna Vinschen; +Cc: netdev, peppe.cavallaro, alexandre.torgue, joabreu, kuba

Hello:

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

On Mon, 17 Apr 2023 21:29:03 +0200 you wrote:
> Without the IFF_LIVE_ADDR_CHANGE flag being set, the network code
> disallows changing the mac address while the interface is UP.
> 
> Consequences are, for instance, that the interface can't be used
> in a failover bond.
> 
> Add the missing flag to net_device priv_flags.
> 
> [...]

Here is the summary with links:
  - [net-next] stmmac: fix changing mac address
    https://git.kernel.org/netdev/net-next/c/4e1951666248

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-04-19 12:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-17 19:29 [PATCH net-next] stmmac: fix changing mac address Corinna Vinschen
2023-04-19 12:20 ` 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).