mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-24 02:53:57 +08:00
Fix setting mac_address
eoe->dev->dev_addr is read_only in 5.17.0 using eth_hw_addr_set instead
This commit is contained in:
committed by
Florian Pose
parent
54814b770e
commit
d301cbb992
@@ -134,7 +134,11 @@ void ec_debug_register(
|
||||
ec_debug_unregister(dbg);
|
||||
|
||||
// use the Ethernet address of the physical device for the debug device
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||
eth_hw_addr_set(dbg->dev, net_dev->dev_addr);
|
||||
#else
|
||||
memcpy(dbg->dev->dev_addr, net_dev->dev_addr, ETH_ALEN);
|
||||
#endif
|
||||
|
||||
// connect the net_device to the kernel
|
||||
if ((result = register_netdev(dbg->dev))) {
|
||||
|
||||
Reference in New Issue
Block a user