wl3501_cs: use eth_hw_addr_set()
authorJakub Kicinski <kuba@kernel.org>
Mon, 18 Oct 2021 23:50:20 +0000 (16:50 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 20 Oct 2021 09:39:47 +0000 (12:39 +0300)
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.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211018235021.1279697-15-kuba@kernel.org
drivers/net/wireless/wl3501_cs.c

index 672f5d5f3f2c7fceaf4d9f2d2cc1bfa05f96eb68..dad38fc0424334372f3bbe248e2844ff8d997d4e 100644 (file)
@@ -1945,8 +1945,7 @@ static int wl3501_config(struct pcmcia_device *link)
                goto failed;
        }
 
-       for (i = 0; i < 6; i++)
-               dev->dev_addr[i] = ((char *)&this->mac_addr)[i];
+       eth_hw_addr_set(dev, this->mac_addr);
 
        /* print probe information */
        printk(KERN_INFO "%s: wl3501 @ 0x%3.3x, IRQ %d, "