diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-03-19 19:49:23 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-19 22:59:31 +0100 |
commit | b4f7a6f964fbef348e0e656e4b7d8488b217450f (patch) | |
tree | 46678de2cb18f66b85550f8b95e523beb8985cf3 /drivers/net/ethernet/microchip/enc28j60.c | |
parent | enc28j60: Switch to use module_spi_driver() macro (diff) | |
download | linux-b4f7a6f964fbef348e0e656e4b7d8488b217450f.tar.xz linux-b4f7a6f964fbef348e0e656e4b7d8488b217450f.zip |
enc28j60: Use ether_addr_copy() in enc28j60_set_mac_address()
Use ether_addr_copy() instead of memcpy() to copy the mac address.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/microchip/enc28j60.c')
-rw-r--r-- | drivers/net/ethernet/microchip/enc28j60.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c index 4cf4525260b7..273e69c84291 100644 --- a/drivers/net/ethernet/microchip/enc28j60.c +++ b/drivers/net/ethernet/microchip/enc28j60.c @@ -527,7 +527,7 @@ static int enc28j60_set_mac_address(struct net_device *dev, void *addr) if (!is_valid_ether_addr(address->sa_data)) return -EADDRNOTAVAIL; - memcpy(dev->dev_addr, address->sa_data, dev->addr_len); + ether_addr_copy(dev->dev_addr, address->sa_data); return enc28j60_set_hw_macaddr(dev); } |