Added compatibility with backported kernels. (#327)

This commit is contained in:
Carlos Garcés 2024-01-20 14:30:39 +01:00 committed by GitHub
parent 8668e7cfbd
commit 3cffd844ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -219,10 +219,11 @@ typedef unsigned long systime;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
/* Porting from linux kernel v5.15-rc1 48eab831ae8b9f7002a533fa4235eed63ea1f1a3 */ /* 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); memcpy(dev->dev_addr, addr, ETH_ALEN);
} }
#define eth_hw_addr_set rtw_eth_hw_addr_set
#endif #endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22))