summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-19 10:12:36 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-20 19:33:58 +0200
commit6ed178cb23ec7503dd354c02c0c9ef97a6b8b22a (patch)
treea24ce83288441028e1fbd17660670872475457d8 /drivers/staging/rtl8712
parent07e00148a2ee505205e239b7cf6fd103f0f87789 (diff)
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/rtl8712')
-rw-r--r--drivers/staging/rtl8712/os_intfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
index 9502f6aa5306..2d3233a650fc 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -381,8 +381,8 @@ static int netdev_open(struct net_device *pnetdev)
goto netdev_open_error;
if (!r8712_initmac) {
/* Use the mac address stored in the Efuse */
- memcpy(pnetdev->dev_addr,
- padapter->eeprompriv.mac_addr, ETH_ALEN);
+ eth_hw_addr_set(pnetdev,
+ padapter->eeprompriv.mac_addr);
} else {
/* We have to inform f/w to use user-supplied MAC
* address.