aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <[email protected]>2023-04-17 21:29:03 +0200
committerDavid S. Miller <[email protected]>2023-04-19 13:14:58 +0100
commit4e195166624851d1da1a4e42110e66ee4faca4a3 (patch)
tree094634bf478c6d8d534675e0e7503e079ef1ddb7
parentfbb192a836bee873e4e94c5deca19bf558ab7bb9 (diff)
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. Signed-off-by: Corinna Vinschen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 5280256a638f..47534310365a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7339,6 +7339,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);