]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
stmmac: fix changing mac address
authorCorinna Vinschen <vinschen@redhat.com>
Mon, 17 Apr 2023 19:29:03 +0000 (21:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Apr 2023 12:14:58 +0000 (13:14 +0100)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 5280256a638f1064d73e74cbc231d5e7642d8259..47534310365a7150f08365c959a3f6e37dc29440 100644 (file)
@@ -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);