Quellcode durchsuchen

Fix build on Ubuntu 22.04 / 5.15 kernel

Signed-off-by: Andriy Tkachuk <andriy.tkachuk@gmail.com>
Andriy Tkachuk vor 2 Jahren
Ursprung
Commit
a1c01a72cc
3 geänderte Dateien mit 11 neuen und 0 gelöschten Zeilen
  1. 3 0
      core/rtw_cmd.c
  2. 4 0
      core/rtw_mp.c
  3. 4 0
      include/osdep_service_linux.h

+ 3 - 0
core/rtw_cmd.c

@@ -554,6 +554,9 @@ _func_exit_;
 
 	thread_exit();
 
+#ifdef PLATFORM_LINUX
+	return 0;
+#endif
 }
 
 

+ 4 - 0
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)

+ 4 - 0
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;