From 349f631da4e1bdcb1b4a2a3ee630d689bfe6724d Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Tue, 19 Oct 2021 10:12:37 -0700 Subject: staging: use eth_hw_addr_set() instead of ether_addr_copy() 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 from ether_addr_copy() to eth_hw_addr_set(): @@ expression dev, np; @@ - ether_addr_copy(dev->dev_addr, np) + eth_hw_addr_set(dev, np) Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20211019171243.1412240-3-kuba@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/usb_intf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/staging/rtl8712') diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index 2d3233a650fc..beb9137c198c 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -166,7 +166,7 @@ static int r871x_net_set_mac_address(struct net_device *pnetdev, void *p) struct sockaddr *addr = p; if (!padapter->bup) - ether_addr_copy(pnetdev->dev_addr, addr->sa_data); + eth_hw_addr_set(pnetdev, addr->sa_data); return 0; } diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index 505ebeb643dc..17e705411e64 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -563,7 +563,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, dev_info(&udev->dev, "r8712u: MAC Address from efuse = %pM\n", mac); } - ether_addr_copy(pnetdev->dev_addr, mac); + eth_hw_addr_set(pnetdev, mac); } /* step 6. Load the firmware asynchronously */ if (rtl871x_load_fw(padapter)) -- cgit v1.2.3