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/cirrus | |
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/cirrus')
-rw-r--r-- | drivers/net/ethernet/cirrus/ep93xx_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/cirrus/mac89x0.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c index 072fac5f5d24..21ba6e893072 100644 --- a/drivers/net/ethernet/cirrus/ep93xx_eth.c +++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c @@ -746,7 +746,7 @@ static struct net_device *ep93xx_dev_alloc(struct ep93xx_eth_data *data) if (dev == NULL) return NULL; - memcpy(dev->dev_addr, data->dev_addr, ETH_ALEN); + eth_hw_addr_set(dev, data->dev_addr); dev->ethtool_ops = &ep93xx_ethtool_ops; dev->netdev_ops = &ep93xx_netdev_ops; diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c index 6324e80960c3..84251b85fc93 100644 --- a/drivers/net/ethernet/cirrus/mac89x0.c +++ b/drivers/net/ethernet/cirrus/mac89x0.c @@ -541,7 +541,7 @@ static int set_mac_address(struct net_device *dev, void *addr) if (!is_valid_ether_addr(saddr->sa_data)) return -EADDRNOTAVAIL; - memcpy(dev->dev_addr, saddr->sa_data, ETH_ALEN); + eth_hw_addr_set(dev, saddr->sa_data); netdev_info(dev, "Setting MAC address to %pM\n", dev->dev_addr); /* set the Ethernet address */ |