Skip to content

Commit

Permalink
Added compatibility with backported kernels.
Browse files Browse the repository at this point in the history
  • Loading branch information
CGarces committed Jan 20, 2024
1 parent d3d9988 commit 86c4631
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/osdep_service_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,13 @@ typedef void *timer_hdl_context;

typedef unsigned long systime;

#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) && !((LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0) && LINUX_VERSION_CODE > KERNEL_VERSION(5, 10, 187) ) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0) && LINUX_VERSION_CODE > KERNEL_VERSION(5, 4, 250) ) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) && LINUX_VERSION_CODE > KERNEL_VERSION(4, 19, 290) )))
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
/* Porting from linux kernel v5.15-rc1 48eab831ae8b9f7002a533fa4235eed63ea1f1a3 */
static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr)
static inline void rtw_eth_hw_addr_set(struct net_device *dev, const u8 *addr)
{
memcpy(dev->dev_addr, addr, ETH_ALEN);
}
#define eth_hw_addr_set rtw_eth_hw_addr_set
#endif

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22))
Expand Down

0 comments on commit 86c4631

Please sign in to comment.