rtl8812au-ct: fix compilation error with kernel 6.1

Kernel 6.1 have renamed complete_and_exit to kthread_complete_and_exit.
This was just a rename and nothing is changed implementation wise.

Fix compilation error by using the new symbol name.

Fix compilation error:
In file included from /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/include/osdep_service.h:41,
                 from /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/include/drv_types.h:32,
                 from /builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/core/rtw_cmd.c:22:
/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/core/rtw_cmd.c: In function 'rtw_cmd_thread':
/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/include/osdep_service_linux.h:166:23: error: implicit declaration of function 'complete_and_exit' [-Werror=implicit-function-declaration]
  166 | #define thread_exit() complete_and_exit(NULL, 0)
      |                       ^~~~~~~~~~~~~~~~~
/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/core/rtw_cmd.c:706:9: note: in expansion of macro 'thread_exit'
  706 |         thread_exit();
      |         ^~~~~~~~~~~
/builder/shared-workdir/build/sdk/build_dir/target-aarch64_cortex-a53_musl/linux-bcm27xx_bcm2710/rtl8812au-ct-2021-11-07-39df5596/core/rtw_cmd.c:708:1: error: control reaches end of non-void function [-Werror=return-type]
  708 | }
      | ^
cc1: all warnings being treated as errors

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2023-07-23 14:41:35 +02:00
parent 8912e386e3
commit 9a5b1af670
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
--- a/include/osdep_service_linux.h
+++ b/include/osdep_service_linux.h
@@ -163,7 +163,11 @@ typedef void* _thread_hdl_;
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;