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>
This commit is contained in:
parent
41e48c3d80
commit
b4f7a6f964
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue