OSDN Git Service

net: xtensa: use eth_hw_addr_set()
authorJakub Kicinski <kuba@kernel.org>
Fri, 29 Oct 2021 02:47:07 +0000 (19:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Oct 2021 12:17:21 +0000 (13:17 +0100)
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 go through appropriate helpers.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/xtensa/platforms/iss/network.c

index 8b806d3..962e5e1 100644 (file)
@@ -124,7 +124,7 @@ static char *split_if_spec(char *str, ...)
 
 static void setup_etheraddr(struct net_device *dev, char *str)
 {
-       unsigned char *addr = dev->dev_addr;
+       u8 addr[ETH_ALEN];
 
        if (str == NULL)
                goto random;
@@ -147,6 +147,7 @@ static void setup_etheraddr(struct net_device *dev, char *str)
        if (!is_local_ether_addr(addr))
                pr_warn("%s: assigning a globally valid ethernet address\n",
                        dev->name);
+       eth_hw_addr_set(dev, addr);
        return;
 
 random: