diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-19 10:12:36 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-20 19:33:58 +0200 |
commit | 6ed178cb23ec7503dd354c02c0c9ef97a6b8b22a (patch) | |
tree | a24ce83288441028e1fbd17660670872475457d8 /drivers/staging/rtl8192u | |
parent | 07e00148a2ee505205e239b7cf6fd103f0f87789 (diff) | |
download | lwn-6ed178cb23ec7503dd354c02c0c9ef97a6b8b22a.tar.gz lwn-6ed178cb23ec7503dd354c02c0c9ef97a6b8b22a.zip |
staging: use eth_hw_addr_set()
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.
Convert staging drivers from memcpy(... ETH_ADDR) to eth_hw_addr_set():
@@
expression dev, np;
@@
- memcpy(dev->dev_addr, np, ETH_ALEN)
+ eth_hw_addr_set(dev, np)
@@
- memcpy(dev->dev_addr, np, 6)
+ eth_hw_addr_set(dev, np)
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20211019171243.1412240-2-kuba@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 594239990455..2aaba44d84e2 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2307,7 +2307,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) *(u16 *)(&dev->dev_addr[i]) = (u16)ret; } } else { - memcpy(dev->dev_addr, bMac_Tmp_Addr, 6); + eth_hw_addr_set(dev, bMac_Tmp_Addr); /* should I set IDR0 here? */ } RT_TRACE(COMP_EPROM, "MAC addr:%pM\n", dev->dev_addr); |