Skip to contentSkip to conversation

stmmac: fix changing mac address

PATCH Applied Corinna Vinschen 2 participants 2 messages Apr 17, 2023 – Apr 19, 2023

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

PATCH 1/1 stmmac: fix changing mac address

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.

---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +2 -0
index 8ab67c020a08..02d0bf70c528 100644
@@ -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);
 
Signature · 1 line
2.31.1
#1 lore raw
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Quoted 9 lines · 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html