From: Christian Marangi Date: Sun, 23 Jul 2023 12:41:35 +0000 (+0200) Subject: rtl8812au-ct: fix compilation error with kernel 6.1 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9a5b1af670185f07a797920f861a6033e61c5c61;p=openwrt%2Fstaging%2Fsvanheule.git 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 --- diff --git a/package/kernel/rtl8812au-ct/patches/005-kernel-6.1.patch b/package/kernel/rtl8812au-ct/patches/005-kernel-6.1.patch new file mode 100644 index 0000000000..98aa678491 --- /dev/null +++ b/package/kernel/rtl8812au-ct/patches/005-kernel-6.1.patch @@ -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;