From a1c01a72ccd0ec89598e94adaebff699bb058864 Mon Sep 17 00:00:00 2001 From: Andriy Tkachuk Date: Sun, 3 Jul 2022 17:53:09 +0100 Subject: [PATCH] Fix build on Ubuntu 22.04 / 5.15 kernel Signed-off-by: Andriy Tkachuk --- core/rtw_cmd.c | 3 +++ core/rtw_mp.c | 4 ++++ include/osdep_service_linux.h | 4 ++++ 3 files changed, 11 insertions(+) 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;