net: hldc_fr: use dev_addr_set()
authorJakub Kicinski <kuba@kernel.org>
Thu, 21 Oct 2021 13:12:14 +0000 (06:12 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 22 Oct 2021 17:16:18 +0000 (10:16 -0700)
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.

Acked-by: Krzysztof HaƂasa <khalasa@piap.pl>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wan/hdlc_fr.c

index 7637edce443ef9d46750688e60a481169677c292..81e72bc1891fa46e0489a7dc4a1c99c41aeaa9db 100644 (file)
@@ -1093,7 +1093,9 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
                dev->priv_flags &= ~IFF_TX_SKB_SHARING;
                eth_hw_addr_random(dev);
        } else {
-               *(__be16 *)dev->dev_addr = htons(dlci);
+               __be16 addr = htons(dlci);
+
+               dev_addr_set(dev, (u8 *)&addr);
                dlci_to_q922(dev->broadcast, dlci);
        }
        dev->netdev_ops = &pvc_ops;