Skip to content

Commit

Permalink
Add ifdefs for eth_hw_addr_set
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Forencich <[email protected]>
  • Loading branch information
alexforencich committed Apr 16, 2024
1 parent b6daefd commit b10d5d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/mqnic/mqnic_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,11 @@ static int mqnic_set_mac(struct net_device *ndev, void *addr)
return -EADDRNOTAVAIL;

netif_addr_lock_bh(ndev);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
eth_hw_addr_set(ndev, saddr->sa_data);
#else
memcpy(ndev->dev_addr, saddr->sa_data, ETH_ALEN);
#endif
netif_addr_unlock_bh(ndev);

return 0;
Expand Down

0 comments on commit b10d5d2

Please sign in to comment.