Message ID | 20230417192903.590077-1-vinschen@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 4e195166624851d1da1a4e42110e66ee4faca4a3 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] stmmac: fix changing mac address | expand |
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!
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);
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(+)