summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-04 16:01:40 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-05 12:38:39 +0100
commit3f6cffb8604b537e3d7ea040d7f4368689638eaf (patch)
tree4d820d2f07d0a55702e5f31e0ca31f14e8da7052 /include
parentb44d52a50bc6f191f0ae03f65de8401f3ef039b3 (diff)
etherdevice: use __dev_addr_set()
Andrew points out that eth_hw_addr_set() replaces memcpy() calls so we can't use ether_addr_copy() which assumes both arguments are 2-bytes aligned. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/etherdevice.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 928c411bd509..c58d50451485 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -308,7 +308,7 @@ static inline void ether_addr_copy(u8 *dst, const u8 *src)
*/
static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
{
- ether_addr_copy(dev->dev_addr, addr);
+ __dev_addr_set(dev, addr, ETH_ALEN);
}
/**