diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-19 10:12:37 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-20 19:33:58 +0200 |
commit | 349f631da4e1bdcb1b4a2a3ee630d689bfe6724d (patch) | |
tree | de80a2fca63a5b7b35992b0db61f2d99cb41aef0 /drivers/staging/rtl8192e | |
parent | 6ed178cb23ec7503dd354c02c0c9ef97a6b8b22a (diff) | |
download | lwn-349f631da4e1bdcb1b4a2a3ee630d689bfe6724d.tar.gz lwn-349f631da4e1bdcb1b4a2a3ee630d689bfe6724d.zip |
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 <kuba@kernel.org>
Link: https://lore.kernel.org/r/20211019171243.1412240-3-kuba@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 358b629d2cc6..cfeaa9c1542f 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -366,7 +366,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) *(u16 *)(&dev->dev_addr[i]) = usValue; } } else { - ether_addr_copy(dev->dev_addr, bMac_Tmp_Addr); + eth_hw_addr_set(dev, bMac_Tmp_Addr); } RT_TRACE(COMP_INIT, "Permanent Address = %pM\n", diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index a7dd1578b2c6..d2e9df60e9ba 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -2235,7 +2235,7 @@ static int _rtl92e_set_mac_adr(struct net_device *dev, void *mac) mutex_lock(&priv->wx_mutex); - ether_addr_copy(dev->dev_addr, addr->sa_data); + eth_hw_addr_set(dev, addr->sa_data); schedule_work(&priv->reset_wq); mutex_unlock(&priv->wx_mutex); |