diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 257c581..3a68515 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1216,7 +1216,11 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr) } _rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) + eth_hw_addr_set(pnetdev, sa->sa_data); +#else _rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */ +#endif #if 0 if (rtw_is_hw_init_completed(padapter)) { diff --git a/os_dep/linux/rtw_proc.c b/os_dep/linux/rtw_proc.c index 370bd5a..245f3e4 100644 --- a/os_dep/linux/rtw_proc.c +++ b/os_dep/linux/rtw_proc.c @@ -30,6 +30,10 @@ inline struct proc_dir_entry *get_rtw_drv_proc(void) #define RTW_PROC_NAME DRV_NAME +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) +#define PDE_DATA(inode) pde_data(inode) +#endif + #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)) #define file_inode(file) ((file)->f_dentry->d_inode) #endif diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index fea029e..feb23aa 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -1294,8 +1294,12 @@ u32 _rtw_down_sema(_sema *sema) inline void thread_exit(_completion *comp) { #ifdef PLATFORM_LINUX +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) + kthread_complete_and_exit(comp, 0); +#else complete_and_exit(comp, 0); #endif +#endif #ifdef PLATFORM_FREEBSD printf("%s", "RTKTHREAD_exit");