projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b44d52a
)
etherdevice: use __dev_addr_set()
author
Jakub Kicinski
<kuba@kernel.org>
Mon, 4 Oct 2021 23:01:40 +0000
(16:01 -0700)
committer
David S. Miller
<davem@davemloft.net>
Tue, 5 Oct 2021 11:38:39 +0000
(12:38 +0100)
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>
include/linux/etherdevice.h
patch
|
blob
|
history
diff --git
a/include/linux/etherdevice.h
b/include/linux/etherdevice.h
index 928c411bd50963278407ad317b22db4eaaed0895..c58d5045148547a136a523669b0f1007342ea56d 100644
(file)
--- 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
);
}
/**