diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-02 00:32:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-02 16:18:25 +0300 |
commit | a96d317fb1a30b9f323548eb2ff05d4e4600ead9 (patch) | |
tree | af0fc5c39eef0461e5e15a6cf2f5d9eac93fd101 /drivers/net/ethernet/8390 | |
parent | 2f23e5cef31414156c24b90e56dedc118feb9bf3 (diff) | |
download | linux-a96d317fb1a30b9f323548eb2ff05d4e4600ead9.tar.xz |
ethernet: use eth_hw_addr_set()
Convert all Ethernet 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)
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/8390')
-rw-r--r-- | drivers/net/ethernet/8390/ax88796.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c index 6c6bdd5913ec..b3e612b18abd 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c @@ -716,7 +716,7 @@ static int ax_init_dev(struct net_device *dev) for (i = 0; i < 16; i++) SA_prom[i] = SA_prom[i+i]; - memcpy(dev->dev_addr, SA_prom, ETH_ALEN); + eth_hw_addr_set(dev, SA_prom); } #ifdef CONFIG_AX88796_93CX6 @@ -733,7 +733,7 @@ static int ax_init_dev(struct net_device *dev) (__le16 __force *)mac_addr, sizeof(mac_addr) >> 1); - memcpy(dev->dev_addr, mac_addr, ETH_ALEN); + eth_hw_addr_set(dev, mac_addr); } #endif if (ax->plat->wordlength == 2) { @@ -757,7 +757,7 @@ static int ax_init_dev(struct net_device *dev) if ((ax->plat->flags & AXFLG_MAC_FROMPLATFORM) && ax->plat->mac_addr) - memcpy(dev->dev_addr, ax->plat->mac_addr, ETH_ALEN); + eth_hw_addr_set(dev, ax->plat->mac_addr); if (!is_valid_ether_addr(dev->dev_addr)) { eth_hw_addr_random(dev); |