From 526acb9ad9e2c9d091578a979ae6785cb5726207 Mon Sep 17 00:00:00 2001 From: marcomole00 Date: Thu, 29 Aug 2024 17:01:20 +0200 Subject: [PATCH] missing def of eth_hw_addr_set --- onic_netdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/onic_netdev.c b/onic_netdev.c index e477cf5..705a986 100644 --- a/onic_netdev.c +++ b/onic_netdev.c @@ -25,6 +25,14 @@ #define ONIC_RX_DESC_STEP 256 + +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0) +static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr) +{ + memcpy(dev->dev_addr, addr, ETH_ALEN); +} +#endif + inline static u16 onic_ring_get_real_count(struct onic_ring *ring) { /* Valid writeback entry means one less count of descriptor entries */