diff options
author | Peter Adam p.adam@cygnusnetworks.de <p.adam@cygnusnetworks.de> | 2022-05-05 10:17:02 +0200 |
---|---|---|
committer | Peter Adam <p.adam@cygnusnetworks.de> | 2022-05-05 15:27:57 +0200 |
commit | e2131adfd01a1993e895df8c51b740b790f087a1 (patch) | |
tree | c927e1a376646afe4497d61344cb8c2eb723a6ed /drivers | |
parent | 85beb6bf4f1df582d54f2d8d83b08d434a485f2e (diff) | |
download | accel-ppp-e2131adfd01a1993e895df8c51b740b790f087a1.tar.gz accel-ppp-e2131adfd01a1993e895df8c51b740b790f087a1.zip |
Use helper function to set device address
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ipoe/ipoe.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index 5e220e9..5a5f68b 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -1154,7 +1154,11 @@ static int ipoe_create(__be32 peer_addr, __be32 addr, __be32 gw, int ifindex, co if (link_dev) { dev->features = link_dev->features & ~(NETIF_F_HW_VLAN_FILTER | NETIF_F_LRO); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0) + dev_addr_mod(dev, 0, link_dev->dev_addr, ETH_ALEN); +#else memcpy(dev->dev_addr, link_dev->dev_addr, ETH_ALEN); +#endif memcpy(dev->broadcast, link_dev->broadcast, ETH_ALEN); } @@ -1446,7 +1450,11 @@ static int ipoe_nl_cmd_modify(struct sk_buff *skb, struct genl_info *info) if (link_dev) { ses->dev->features = link_dev->features & ~(NETIF_F_HW_VLAN_FILTER | NETIF_F_LRO); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0) + dev_addr_mod(dev, 0, link_dev->dev_addr, ETH_ALEN); +#else memcpy(dev->dev_addr, link_dev->dev_addr, ETH_ALEN); +#endif memcpy(dev->broadcast, link_dev->broadcast, ETH_ALEN); } } |