diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index bff603a..316fea8 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -554,6 +554,9 @@ _func_exit_; thread_exit(); +#ifdef PLATFORM_LINUX + return 0; +#endif } diff --git a/core/rtw_mp.c b/core/rtw_mp.c index 74069e4..a4b5362 100644 --- a/core/rtw_mp.c +++ b/core/rtw_mp.c @@ -1179,6 +1179,10 @@ exit: pmptx->stop = 1; thread_exit(); + +#ifdef PLATFORM_LINUX + return 0; +#endif } void fill_txdesc_for_mp(PADAPTER padapter, struct tx_desc *ptxdesc) diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h index 32a55b9..b8ab083 100644 --- a/include/osdep_service_linux.h +++ b/include/osdep_service_linux.h @@ -146,7 +146,11 @@ typedef int thread_return; typedef void* thread_context; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) #define thread_exit() kthread_complete_and_exit(NULL, 0) +#else + #define thread_exit() complete_and_exit(NULL, 0) +#endif typedef void timer_hdl_return; typedef void* timer_hdl_context;