diff --git a/include/kernel-6.6 b/include/kernel-6.6 index d096bfabd063f5..ee524ccdd65d43 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .53 -LINUX_KERNEL_HASH-6.6.53 = 285d181d1b252b0bf905f040d094215cf183ac98c31a17f9cce9f3537ef4d779 +LINUX_VERSION-6.6 = .54 +LINUX_KERNEL_HASH-6.6.54 = 5fae869d6a24055c16ffc2d92669e3fb2b258e34d36c850bb8cf9def417ecfa0 diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile index c4c395566b82a2..f418bea5a724c7 100644 --- a/package/devel/strace/Makefile +++ b/package/devel/strace/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=strace -PKG_VERSION:=6.7 +PKG_VERSION:=6.11 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION) -PKG_HASH:=2090201e1a3ff32846f4fe421c1163b15f440bb38e31355d09f82d3949922af7 +PKG_HASH:=83262583a3529f02c3501aa8b8ac772b4cbc03dc934e98bab6e4883626e283a5 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=LGPL-2.1-or-later diff --git a/package/devel/valgrind/Makefile b/package/devel/valgrind/Makefile index 9f8a2e9e79acb4..a8e47db7c883f3 100644 --- a/package/devel/valgrind/Makefile +++ b/package/devel/valgrind/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=valgrind -PKG_VERSION:=3.22.0 +PKG_VERSION:=3.23.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/pub/valgrind/ -PKG_HASH:=c811db5add2c5f729944caf47c4e7a65dcaabb9461e472b578765dd7bf6d2d4c +PKG_HASH:=c5c34a3380457b9b75606df890102e7df2c702b9420c2ebef9540f8b5d56264d PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0+ diff --git a/package/devel/valgrind/patches/010-486180-Valgrind-MIPS-VexGuestArchState-has-no-member.patch b/package/devel/valgrind/patches/010-486180-Valgrind-MIPS-VexGuestArchState-has-no-member.patch new file mode 100644 index 00000000000000..912ac38831294a --- /dev/null +++ b/package/devel/valgrind/patches/010-486180-Valgrind-MIPS-VexGuestArchState-has-no-member.patch @@ -0,0 +1,61 @@ +From 7214886886bce9029f325214156c02dcfff760d5 Mon Sep 17 00:00:00 2001 +From: Paul Floyd +Date: Sat, 27 Apr 2024 13:07:07 +0200 +Subject: 486180 - [Valgrind][MIPS] 'VexGuestArchState' has no member named + 'guest_IP_AT_SYSCALL' + +--- + NEWS | 34 ++++++++++++++++++++++++++++++++++ + VEX/priv/guest_mips_helpers.c | 4 ++++ + VEX/pub/libvex_guest_mips32.h | 6 +++--- + VEX/pub/libvex_guest_mips64.h | 2 ++ + configure.ac | 6 +++--- + 5 files changed, 46 insertions(+), 6 deletions(-) + +--- a/VEX/priv/guest_mips_helpers.c ++++ b/VEX/priv/guest_mips_helpers.c +@@ -187,6 +187,8 @@ void LibVEX_GuestMIPS32_initialise( /*OU + vex_state->guest_w1.w64[1] = 0; + vex_state->guest_w2.w64[0] = 0; + vex_state->guest_w2.w64[1] = 0; ++ ++ vex_state->guest_IP_AT_SYSCALL = 0; + } + + void LibVEX_GuestMIPS64_initialise ( /*OUT*/ VexGuestMIPS64State * vex_state ) +@@ -294,6 +296,8 @@ void LibVEX_GuestMIPS64_initialise ( /*O + vex_state->guest_LLaddr = 0xFFFFFFFFFFFFFFFFULL; + vex_state->guest_LLdata = 0; + ++ vex_state->guest_IP_AT_SYSCALL = 0; ++ + vex_state->guest_MSACSR = 0; + } + +--- a/VEX/pub/libvex_guest_mips32.h ++++ b/VEX/pub/libvex_guest_mips32.h +@@ -188,10 +188,10 @@ typedef + + /* 1016 */ UInt guest_MSACSR; + +- /* 1020 */ UInt _padding3; ++ /* 1020 */ UInt guest_IP_AT_SYSCALL; + +- /* 1020 */ ULong guest_LLdata64; +- /* 1028 */ ULong _padding4; ++ /* 1024 */ ULong guest_LLdata64; ++ /* 1032 */ ULong _padding3; + } VexGuestMIPS32State; + /*---------------------------------------------------------------*/ + /*--- Utility functions for MIPS32 guest stuff. ---*/ +--- a/VEX/pub/libvex_guest_mips64.h ++++ b/VEX/pub/libvex_guest_mips64.h +@@ -184,6 +184,8 @@ typedef + /* 1144 */ UInt guest_MSACSR; + + /* 1148 */ UInt _padding2; ++ /* 1152 */ ULong guest_IP_AT_SYSCALL; ++ /* 1160 */ ULong _padding3; + + } VexGuestMIPS64State; + diff --git a/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch b/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch deleted file mode 100644 index 5967b0cadac210..00000000000000 --- a/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 82e935c564699456a766044faa39367b47cce793 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Sun, 31 Oct 2021 23:11:11 +0100 -Subject: [PATCH] mips: Fix new syscall numbers - -The MIPS32 and MIPS64 O32 ABI are adding 4000 to all syscall numbers. -The MIPS64 N64 ABI adds 5000 to each syscall and the MIPS64 N32 ABI adds -6000 to each syscall number. We can not use the shared file for MIPS and -have to define this for each sycall separately. - -Without this change valgrind is not able to detect new syscalls like -clock_gettime64 correctly. - -Signed-off-by: Hauke Mehrtens ---- - include/pub_tool_vkiscnums_asm.h | 3 -- - include/vki/vki-scnums-mips32-linux.h | 40 +++++++++++++++++++++++++++ - include/vki/vki-scnums-mips64-linux.h | 40 +++++++++++++++++++++++++++ - 3 files changed, 80 insertions(+), 3 deletions(-) - ---- a/include/pub_tool_vkiscnums_asm.h -+++ b/include/pub_tool_vkiscnums_asm.h -@@ -63,15 +63,12 @@ - # include "vki/vki-scnums-arm64-linux.h" - - #elif defined(VGP_mips32_linux) --# include "vki/vki-scnums-shared-linux.h" --# include "vki/vki-scnums-32bit-linux.h" - # include "vki/vki-scnums-mips32-linux.h" - - #elif defined(VGP_nanomips_linux) - # include "vki/vki-scnums-nanomips-linux.h" - - #elif defined(VGP_mips64_linux) --# include "vki/vki-scnums-shared-linux.h" - # include "vki/vki-scnums-mips64-linux.h" - - #elif defined(VGP_x86_freebsd) || defined(VGP_amd64_freebsd) ---- a/include/vki/vki-scnums-mips32-linux.h -+++ b/include/vki/vki-scnums-mips32-linux.h -@@ -401,6 +401,46 @@ - #define __NR_pkey_free (__NR_Linux + 365) - #define __NR_statx (__NR_Linux + 366) - -+#define __NR_clock_gettime64 (__NR_Linux + 403) -+#define __NR_clock_settime64 (__NR_Linux + 404) -+#define __NR_clock_adjtime64 (__NR_Linux + 405) -+#define __NR_clock_getres_time64 (__NR_Linux + 406) -+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) -+#define __NR_timer_gettime64 (__NR_Linux + 408) -+#define __NR_timer_settime64 (__NR_Linux + 409) -+#define __NR_timerfd_gettime64 (__NR_Linux + 410) -+#define __NR_timerfd_settime64 (__NR_Linux + 411) -+#define __NR_utimensat_time64 (__NR_Linux + 412) -+#define __NR_pselect6_time64 (__NR_Linux + 413) -+#define __NR_ppoll_time64 (__NR_Linux + 414) -+#define __NR_io_pgetevents_time64 (__NR_Linux + 416) -+#define __NR_recvmmsg_time64 (__NR_Linux + 417) -+#define __NR_mq_timedsend_time64 (__NR_Linux + 418) -+#define __NR_mq_timedreceive_time64 (__NR_Linux + 419) -+#define __NR_semtimedop_time64 (__NR_Linux + 420) -+#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421) -+#define __NR_futex_time64 (__NR_Linux + 422) -+#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423) -+#define __NR_pidfd_send_signal (__NR_Linux + 424) -+#define __NR_io_uring_setup (__NR_Linux + 425) -+#define __NR_io_uring_enter (__NR_Linux + 426) -+#define __NR_io_uring_register (__NR_Linux + 427) -+#define __NR_open_tree (__NR_Linux + 428) -+#define __NR_move_mount (__NR_Linux + 429) -+#define __NR_fsopen (__NR_Linux + 430) -+#define __NR_fsconfig (__NR_Linux + 431) -+#define __NR_fsmount (__NR_Linux + 432) -+#define __NR_fspick (__NR_Linux + 433) -+ -+#define __NR_pidfd_open (__NR_Linux + 434) -+#define __NR_clone3 (__NR_Linux + 435) -+#define __NR_close_range (__NR_Linux + 436) -+#define __NR_openat2 (__NR_Linux + 437) -+ -+#define __NR_faccessat2 (__NR_Linux + 439) -+ -+#define __NR_epoll_pwait2 (__NR_Linux + 441) -+ - /* - * Offset of the last Linux o32 flavoured syscall - */ ---- a/include/vki/vki-scnums-mips64-linux.h -+++ b/include/vki/vki-scnums-mips64-linux.h -@@ -363,6 +363,26 @@ - #define __NR_pkey_free (__NR_Linux + 325) - #define __NR_statx (__NR_Linux + 326) - -+#define __NR_pidfd_send_signal (__NR_Linux + 424) -+#define __NR_io_uring_setup (__NR_Linux + 425) -+#define __NR_io_uring_enter (__NR_Linux + 426) -+#define __NR_io_uring_register (__NR_Linux + 427) -+#define __NR_open_tree (__NR_Linux + 428) -+#define __NR_move_mount (__NR_Linux + 429) -+#define __NR_fsopen (__NR_Linux + 430) -+#define __NR_fsconfig (__NR_Linux + 431) -+#define __NR_fsmount (__NR_Linux + 432) -+#define __NR_fspick (__NR_Linux + 433) -+ -+#define __NR_pidfd_open (__NR_Linux + 434) -+#define __NR_clone3 (__NR_Linux + 435) -+#define __NR_close_range (__NR_Linux + 436) -+#define __NR_openat2 (__NR_Linux + 437) -+ -+#define __NR_faccessat2 (__NR_Linux + 439) -+ -+#define __NR_epoll_pwait2 (__NR_Linux + 441) -+ - #elif defined(VGABI_N32) - - /* -@@ -702,6 +722,26 @@ - #define __NR_pkey_free (__NR_Linux + 329) - #define __NR_statx (__NR_Linux + 330) - -+#define __NR_pidfd_send_signal (__NR_Linux + 424) -+#define __NR_io_uring_setup (__NR_Linux + 425) -+#define __NR_io_uring_enter (__NR_Linux + 426) -+#define __NR_io_uring_register (__NR_Linux + 427) -+#define __NR_open_tree (__NR_Linux + 428) -+#define __NR_move_mount (__NR_Linux + 429) -+#define __NR_fsopen (__NR_Linux + 430) -+#define __NR_fsconfig (__NR_Linux + 431) -+#define __NR_fsmount (__NR_Linux + 432) -+#define __NR_fspick (__NR_Linux + 433) -+ -+#define __NR_pidfd_open (__NR_Linux + 434) -+#define __NR_clone3 (__NR_Linux + 435) -+#define __NR_close_range (__NR_Linux + 436) -+#define __NR_openat2 (__NR_Linux + 437) -+ -+#define __NR_faccessat2 (__NR_Linux + 439) -+ -+#define __NR_epoll_pwait2 (__NR_Linux + 441) -+ - #else - #error unknown mips64 abi - #endif diff --git a/package/devel/valgrind/patches/020-mips-skip-using-shared-syscall-numbers-for-mips32.patch b/package/devel/valgrind/patches/020-mips-skip-using-shared-syscall-numbers-for-mips32.patch new file mode 100644 index 00000000000000..a519341887c401 --- /dev/null +++ b/package/devel/valgrind/patches/020-mips-skip-using-shared-syscall-numbers-for-mips32.patch @@ -0,0 +1,159 @@ +From 54d6ad3348fb50f5b972fe9c05d0d8757bfe73ba Mon Sep 17 00:00:00 2001 +From: Aleksandar Rikalo +Date: Fri, 10 May 2024 17:59:28 +0200 +Subject: mips: skip using shared syscall numbers for mips32 + +mips does not use shared syscall numbers, so we can not use +vki-scnums-shared-linux.h. + +This partially fixes KDE #444781. + +Signed-off-by: Hauke Mehrtens +Signed-off-by: Aleksandar Rikalo +--- + coregrind/m_syswrap/syswrap-mips32-linux.c | 1 + + include/pub_tool_vkiscnums_asm.h | 2 - + include/vki/vki-scnums-mips32-linux.h | 105 ++++++++++++++++----- + 3 files changed, 83 insertions(+), 25 deletions(-) + +--- a/coregrind/m_syswrap/syswrap-mips32-linux.c ++++ b/coregrind/m_syswrap/syswrap-mips32-linux.c +@@ -1110,6 +1110,7 @@ static SyscallTableEntry syscall_main_ta + LINX_ (__NR_pwritev2, sys_pwritev2), // 362 + //.. + LINXY(__NR_statx, sys_statx), // 366 ++ GENX_(__NR_rseq, sys_ni_syscall), // 367 + + LINXY(__NR_clock_gettime64, sys_clock_gettime64), // 403 + LINX_(__NR_clock_settime64, sys_clock_settime64), // 404 +--- a/include/pub_tool_vkiscnums_asm.h ++++ b/include/pub_tool_vkiscnums_asm.h +@@ -63,8 +63,6 @@ + # include "vki/vki-scnums-arm64-linux.h" + + #elif defined(VGP_mips32_linux) +-# include "vki/vki-scnums-shared-linux.h" +-# include "vki/vki-scnums-32bit-linux.h" + # include "vki/vki-scnums-mips32-linux.h" + + #elif defined(VGP_nanomips_linux) +--- a/include/vki/vki-scnums-mips32-linux.h ++++ b/include/vki/vki-scnums-mips32-linux.h +@@ -380,35 +380,94 @@ + #define __NR_setns (__NR_Linux + 343) + #define __NR_process_vm_readv (__NR_Linux + 345) + #define __NR_process_vm_writev (__NR_Linux + 346) +-#define __NR_kcmp (__NR_Linux + 347) +-#define __NR_finit_module (__NR_Linux + 348) +-#define __NR_sched_setattr (__NR_Linux + 349) +-#define __NR_sched_getattr (__NR_Linux + 350) +-#define __NR_renameat2 (__NR_Linux + 351) +-#define __NR_seccomp (__NR_Linux + 352) +-#define __NR_getrandom (__NR_Linux + 353) +-#define __NR_memfd_create (__NR_Linux + 354) +-#define __NR_bpf (__NR_Linux + 355) +-#define __NR_execveat (__NR_Linux + 356) +-#define __NR_userfaultfd (__NR_Linux + 357) +-#define __NR_membarrier (__NR_Linux + 358) +-#define __NR_mlock2 (__NR_Linux + 359) +-#define __NR_copy_file_range (__NR_Linux + 360) +-#define __NR_preadv2 (__NR_Linux + 361) +-#define __NR_pwritev2 (__NR_Linux + 362) +-#define __NR_pkey_mprotect (__NR_Linux + 363) +-#define __NR_pkey_alloc (__NR_Linux + 364) +-#define __NR_pkey_free (__NR_Linux + 365) +-#define __NR_statx (__NR_Linux + 366) +- ++#define __NR_kcmp (__NR_Linux + 347) ++#define __NR_finit_module (__NR_Linux + 348) ++#define __NR_sched_setattr (__NR_Linux + 349) ++#define __NR_sched_getattr (__NR_Linux + 350) ++#define __NR_renameat2 (__NR_Linux + 351) ++#define __NR_seccomp (__NR_Linux + 352) ++#define __NR_getrandom (__NR_Linux + 353) ++#define __NR_memfd_create (__NR_Linux + 354) ++#define __NR_bpf (__NR_Linux + 355) ++#define __NR_execveat (__NR_Linux + 356) ++#define __NR_userfaultfd (__NR_Linux + 357) ++#define __NR_membarrier (__NR_Linux + 358) ++#define __NR_mlock2 (__NR_Linux + 359) ++#define __NR_copy_file_range (__NR_Linux + 360) ++#define __NR_preadv2 (__NR_Linux + 361) ++#define __NR_pwritev2 (__NR_Linux + 362) ++#define __NR_pkey_mprotect (__NR_Linux + 363) ++#define __NR_pkey_alloc (__NR_Linux + 364) ++#define __NR_pkey_free (__NR_Linux + 365) ++#define __NR_statx (__NR_Linux + 366) ++#define __NR_rseq (__NR_Linux + 367) ++#define __NR_io_pgetevents (__NR_Linux + 368) ++#define __NR_semget (__NR_Linux + 393) ++#define __NR_semctl (__NR_Linux + 394) ++#define __NR_shmget (__NR_Linux + 395) ++#define __NR_shmctl (__NR_Linux + 396) ++#define __NR_shmat (__NR_Linux + 397) ++#define __NR_shmdt (__NR_Linux + 398) ++#define __NR_msgget (__NR_Linux + 399) ++#define __NR_msgsnd (__NR_Linux + 400) ++#define __NR_msgrcv (__NR_Linux + 401) ++#define __NR_msgctl (__NR_Linux + 402) ++#define __NR_clock_gettime64 (__NR_Linux + 403) ++#define __NR_clock_settime64 (__NR_Linux + 404) ++#define __NR_clock_adjtime64 (__NR_Linux + 405) ++#define __NR_clock_getres_time64 (__NR_Linux + 406) ++#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) ++#define __NR_timer_gettime64 (__NR_Linux + 408) ++#define __NR_timer_settime64 (__NR_Linux + 409) ++#define __NR_timerfd_gettime64 (__NR_Linux + 410) ++#define __NR_timerfd_settime64 (__NR_Linux + 411) ++#define __NR_utimensat_time64 (__NR_Linux + 412) ++#define __NR_pselect6_time64 (__NR_Linux + 413) ++#define __NR_ppoll_time64 (__NR_Linux + 414) ++#define __NR_io_pgetevents_time64 (__NR_Linux + 416) ++#define __NR_recvmmsg_time64 (__NR_Linux + 417) ++#define __NR_mq_timedsend_time64 (__NR_Linux + 418) ++#define __NR_mq_timedreceive_time64 (__NR_Linux + 419) ++#define __NR_semtimedop_time64 (__NR_Linux + 420) ++#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421) ++#define __NR_futex_time64 (__NR_Linux + 422) ++#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423) ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++#define __NR_pidfd_open (__NR_Linux + 434) ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++#define __NR_openat2 (__NR_Linux + 437) ++#define __NR_pidfd_getfd (__NR_Linux + 438) ++#define __NR_faccessat2 (__NR_Linux + 439) ++#define __NR_process_madvise (__NR_Linux + 440) ++#define __NR_epoll_pwait2 (__NR_Linux + 441) ++#define __NR_mount_setattr (__NR_Linux + 442) ++#define __NR_quotactl_fd (__NR_Linux + 443) ++#define __NR_landlock_create_ruleset (__NR_Linux + 444) ++#define __NR_landlock_add_rule (__NR_Linux + 445) ++#define __NR_landlock_restrict_self (__NR_Linux + 446) ++#define __NR_process_mrelease (__NR_Linux + 448) ++#define __NR_futex_waitv (__NR_Linux + 449) ++#define __NR_set_mempolicy_home_node (__NR_Linux + 450) ++#define __NR_cachestat (__NR_Linux + 451) ++#define __NR_fchmodat2 (__NR_Linux + 452) + /* + * Offset of the last Linux o32 flavoured syscall + */ +-#define __NR_Linux_syscalls 366 ++#define __NR_Linux_syscalls 366 + + + #define __NR_O32_Linux 4000 +-#define __NR_O32_Linux_syscalls 366 ++#define __NR_O32_Linux_syscalls 366 + + + #endif /* __VKI_SCNUMS_MIPS32_LINUX_H */ diff --git a/package/devel/valgrind/patches/021-mips-skip-using-shared-syscall-numbers-for-mips64.patch b/package/devel/valgrind/patches/021-mips-skip-using-shared-syscall-numbers-for-mips64.patch new file mode 100644 index 00000000000000..759c5fdcd0b49a --- /dev/null +++ b/package/devel/valgrind/patches/021-mips-skip-using-shared-syscall-numbers-for-mips64.patch @@ -0,0 +1,152 @@ +From efaa17e53a750d5f0f4c138b507b1b104729ed67 Mon Sep 17 00:00:00 2001 +From: Petar Jovanovic +Date: Mon, 24 Jun 2024 10:33:46 +0000 +Subject: mips: skip using shared syscall numbers for mips64 + +mips does not use shared syscall numbers, so we can not use +vki-scnums-shared-linux.h. + +This fixes KDE #444781. + +Signed-off-by: Hauke Mehrtens +Signed-off-by: Aleksandar Rikalo +--- + coregrind/m_syswrap/syswrap-mips64-linux.c | 1 + + include/pub_tool_vkiscnums_asm.h | 1 - + include/vki/vki-scnums-mips64-linux.h | 98 ++++++++++++++++++++++ + 3 files changed, 99 insertions(+), 1 deletion(-) + +--- a/coregrind/m_syswrap/syswrap-mips64-linux.c ++++ b/coregrind/m_syswrap/syswrap-mips64-linux.c +@@ -813,6 +813,7 @@ static SyscallTableEntry syscall_main_ta + LINX_ (__NR_pwritev2, sys_pwritev2), + LINX_ (__NR_syncfs, sys_syncfs), + LINXY (__NR_statx, sys_statx), ++ GENX_ (__NR_rseq, sys_ni_syscall), + LINX_ (__NR_setns, sys_setns), + LINXY (__NR_io_uring_setup, sys_io_uring_setup), + LINXY (__NR_io_uring_enter, sys_io_uring_enter), +--- a/include/pub_tool_vkiscnums_asm.h ++++ b/include/pub_tool_vkiscnums_asm.h +@@ -70,7 +70,6 @@ + # include "vki/vki-scnums-shared-linux.h" + + #elif defined(VGP_mips64_linux) +-# include "vki/vki-scnums-shared-linux.h" + # include "vki/vki-scnums-mips64-linux.h" + + #elif defined(VGP_x86_freebsd) || defined(VGP_amd64_freebsd) || defined(VGP_arm64_freebsd) +--- a/include/vki/vki-scnums-mips64-linux.h ++++ b/include/vki/vki-scnums-mips64-linux.h +@@ -362,6 +362,45 @@ + #define __NR_pkey_alloc (__NR_Linux + 324) + #define __NR_pkey_free (__NR_Linux + 325) + #define __NR_statx (__NR_Linux + 326) ++#define __NR_rseq (__NR_Linux + 327) ++#define __NR_io_pgetevents (__NR_Linux + 328) ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++#define __NR_pidfd_open (__NR_Linux + 434) ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++#define __NR_openat2 (__NR_Linux + 437) ++#define __NR_pidfd_getfd (__NR_Linux + 438) ++#define __NR_faccessat2 (__NR_Linux + 439) ++#define __NR_process_madvise (__NR_Linux + 440) ++#define __NR_epoll_pwait2 (__NR_Linux + 441) ++#define __NR_mount_setattr (__NR_Linux + 442) ++#define __NR_quotactl_fd (__NR_Linux + 443) ++#define __NR_landlock_create_ruleset (__NR_Linux + 444) ++#define __NR_landlock_add_rule (__NR_Linux + 445) ++#define __NR_landlock_restrict_self (__NR_Linux + 446) ++#define __NR_process_mrelease (__NR_Linux + 448) ++#define __NR_futex_waitv (__NR_Linux + 449) ++#define __NR_set_mempolicy_home_node (__NR_Linux + 450) ++#define __NR_cachestat (__NR_Linux + 451) ++#define __NR_fchmodat2 (__NR_Linux + 452) ++#define __NR_map_shadow_stack (__NR_Linux + 453) ++#define __NR_futex_wake (__NR_Linux + 454) ++#define __NR_futex_wait (__NR_Linux + 455) ++#define __NR_futex_requeue (__NR_Linux + 456) ++#define __NR_statmount (__NR_Linux + 457) ++#define __NR_listmount (__NR_Linux + 458) ++#define __NR_lsm_get_self_attr (__NR_Linux + 459) ++#define __NR_lsm_set_self_attr (__NR_Linux + 460) ++#define __NR_lsm_list_modules (__NR_Linux + 461) + + #elif defined(VGABI_N32) + +@@ -701,6 +740,65 @@ + #define __NR_pkey_alloc (__NR_Linux + 328) + #define __NR_pkey_free (__NR_Linux + 329) + #define __NR_statx (__NR_Linux + 330) ++#define __NR_rseq (__NR_Linux + 331) ++#define __NR_io_pgetevents (__NR_Linux + 332) ++#define __NR_clock_gettime64 (__NR_Linux + 403) ++#define __NR_clock_settime64 (__NR_Linux + 404) ++#define __NR_clock_adjtime64 (__NR_Linux + 405) ++#define __NR_clock_getres_time64 (__NR_Linux + 406) ++#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) ++#define __NR_timer_gettime64 (__NR_Linux + 408) ++#define __NR_timer_settime64 (__NR_Linux + 409) ++#define __NR_timerfd_gettime64 (__NR_Linux + 410) ++#define __NR_timerfd_settime64 (__NR_Linux + 411) ++#define __NR_utimensat_time64 (__NR_Linux + 412) ++#define __NR_pselect6_time64 (__NR_Linux + 413) ++#define __NR_ppoll_time64 (__NR_Linux + 414) ++#define __NR_io_pgetevents_time64 (__NR_Linux + 416) ++#define __NR_recvmmsg_time64 (__NR_Linux + 417) ++#define __NR_mq_timedsend_time64 (__NR_Linux + 418) ++#define __NR_mq_timedreceive_time64 (__NR_Linux + 419) ++#define __NR_semtimedop_time64 (__NR_Linux + 420) ++#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421) ++#define __NR_futex_time64 (__NR_Linux + 422) ++#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423) ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++#define __NR_pidfd_open (__NR_Linux + 434) ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++#define __NR_openat2 (__NR_Linux + 437) ++#define __NR_pidfd_getfd (__NR_Linux + 438) ++#define __NR_faccessat2 (__NR_Linux + 439) ++#define __NR_process_madvise (__NR_Linux + 440) ++#define __NR_epoll_pwait2 (__NR_Linux + 441) ++#define __NR_mount_setattr (__NR_Linux + 442) ++#define __NR_quotactl_fd (__NR_Linux + 443) ++#define __NR_landlock_create_ruleset (__NR_Linux + 444) ++#define __NR_landlock_add_rule (__NR_Linux + 445) ++#define __NR_landlock_restrict_self (__NR_Linux + 446) ++#define __NR_process_mrelease (__NR_Linux + 448) ++#define __NR_futex_waitv (__NR_Linux + 449) ++#define __NR_set_mempolicy_home_node (__NR_Linux + 450) ++#define __NR_cachestat (__NR_Linux + 451) ++#define __NR_fchmodat2 (__NR_Linux + 452) ++#define __NR_map_shadow_stack (__NR_Linux + 453) ++#define __NR_futex_wake (__NR_Linux + 454) ++#define __NR_futex_wait (__NR_Linux + 455) ++#define __NR_futex_requeue (__NR_Linux + 456) ++#define __NR_statmount (__NR_Linux + 457) ++#define __NR_listmount (__NR_Linux + 458) ++#define __NR_lsm_get_self_attr (__NR_Linux + 459) ++#define __NR_lsm_set_self_attr (__NR_Linux + 460) ++#define __NR_lsm_list_modules (__NR_Linux + 461) + + #else + #error unknown mips64 abi diff --git a/package/devel/valgrind/patches/100-fix_configure_check.patch b/package/devel/valgrind/patches/100-fix_configure_check.patch index 5fa51977e7b754..d771943db8d6aa 100644 --- a/package/devel/valgrind/patches/100-fix_configure_check.patch +++ b/package/devel/valgrind/patches/100-fix_configure_check.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -364,7 +364,7 @@ case "${host_os}" in +@@ -381,7 +381,7 @@ case "${host_os}" in # Ok, this is linux. Check the kernel version AC_MSG_CHECKING([for the kernel version]) diff --git a/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch b/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch deleted file mode 100644 index 9a7b591e70794b..00000000000000 --- a/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Fix FTBFS on armhf by correctly detecting the architecture -Origin: vendor -Bug-Debian: http://bugs.debian.org/730844 -Author: Alessandro Ghedini -Last-Update: 2013-11-30 - ---- a/configure.ac -+++ b/configure.ac -@@ -271,7 +271,7 @@ case "${host_cpu}" in - ARCH_MAX="s390x" - ;; - -- armv7*) -+ arm*) - AC_MSG_RESULT([ok (${host_cpu})]) - ARCH_MAX="arm" - ;; diff --git a/package/devel/valgrind/patches/130-mips_fix_soft_float.patch b/package/devel/valgrind/patches/130-mips_fix_soft_float.patch index 7c7122ecac916e..f861646e80fc36 100644 --- a/package/devel/valgrind/patches/130-mips_fix_soft_float.patch +++ b/package/devel/valgrind/patches/130-mips_fix_soft_float.patch @@ -14,7 +14,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: --- a/VEX/priv/guest_mips_helpers.c +++ b/VEX/priv/guest_mips_helpers.c -@@ -616,6 +616,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -620,6 +620,7 @@ extern UInt mips_dirtyhelper_calculate_F flt_op inst ) { UInt ret = 0; @@ -22,7 +22,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: #if defined(__mips__) VexGuestMIPS32State* guest_state = (VexGuestMIPS32State*)gs; UInt loFsVal, hiFsVal, loFtVal, hiFtVal; -@@ -698,6 +699,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -702,6 +703,7 @@ extern UInt mips_dirtyhelper_calculate_F break; } #endif @@ -30,7 +30,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: return ret; } -@@ -707,6 +709,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -711,6 +713,7 @@ extern UInt mips_dirtyhelper_calculate_F flt_op inst ) { UInt ret = 0; @@ -38,7 +38,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: #if defined(__mips__) && ((__mips == 64) || \ (defined(__mips_isa_rev) && (__mips_isa_rev >= 2))) #if defined(VGA_mips32) -@@ -859,6 +862,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -863,6 +866,7 @@ extern UInt mips_dirtyhelper_calculate_F break; } #endif @@ -48,7 +48,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c -@@ -2109,6 +2109,7 @@ Bool VG_(machine_get_hwcaps)( void ) +@@ -2119,6 +2119,7 @@ Bool VG_(machine_get_hwcaps)( void ) we are using alternative way to determine FP mode */ ULong result = 0; @@ -56,7 +56,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: if (!VG_MINIMAL_SETJMP(env_unsup_insn)) { __asm__ volatile ( ".set push\n\t" -@@ -2126,6 +2127,9 @@ Bool VG_(machine_get_hwcaps)( void ) +@@ -2136,6 +2137,9 @@ Bool VG_(machine_get_hwcaps)( void ) fpmode = (result != 0x3FF0000000000000ull); } diff --git a/package/kernel/ath10k-ct/patches/010-api_update.patch b/package/kernel/ath10k-ct/patches/010-api_update.patch index c0d2574748b717..f70d8eb4609a09 100644 --- a/package/kernel/ath10k-ct/patches/010-api_update.patch +++ b/package/kernel/ath10k-ct/patches/010-api_update.patch @@ -1,5 +1,14 @@ --- a/ath10k-6.9/mac.c +++ b/ath10k-6.9/mac.c +@@ -1675,7 +1675,7 @@ static void ath10k_recalc_radar_detectio + * by indicating that radar was detected. + */ + ath10k_warn(ar, "failed to start CAC: %d\n", ret); +- ieee80211_radar_detected(ar->hw); ++ ieee80211_radar_detected(ar->hw, NULL); + } + } + @@ -6238,7 +6238,7 @@ err: return ret; } @@ -9,3 +18,25 @@ { struct ath10k *ar = hw->priv; u32 opt; +--- a/ath10k-6.9/debug.c ++++ b/ath10k-6.9/debug.c +@@ -3319,7 +3319,7 @@ static ssize_t ath10k_write_simulate_rad + if (!arvif->is_started) + return -EINVAL; + +- ieee80211_radar_detected(ar->hw); ++ ieee80211_radar_detected(ar->hw, NULL); + + return count; + } +--- a/ath10k-6.9/wmi.c ++++ b/ath10k-6.9/wmi.c +@@ -4402,7 +4402,7 @@ static void ath10k_radar_detected(struct + if (ar->dfs_block_radar_events) + ath10k_info(ar, "DFS Radar detected, but ignored as requested\n"); + else +- ieee80211_radar_detected(ar->hw); ++ ieee80211_radar_detected(ar->hw, NULL); + } + + static void ath10k_radar_confirmation_work(struct work_struct *work) diff --git a/package/kernel/mac80211/patches/subsys/332-wifi-cfg80211-Set-correct-chandef-when-starting-CAC.patch b/package/kernel/mac80211/patches/subsys/332-wifi-cfg80211-Set-correct-chandef-when-starting-CAC.patch new file mode 100644 index 00000000000000..72a3510aacfff1 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/332-wifi-cfg80211-Set-correct-chandef-when-starting-CAC.patch @@ -0,0 +1,64 @@ +From: Issam Hamdi +Date: Fri, 16 Aug 2024 16:24:18 +0200 +Subject: [PATCH] wifi: cfg80211: Set correct chandef when starting CAC + +When starting CAC in a mode other than AP mode, it return a +"WARNING: CPU: 0 PID: 63 at cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211]" +caused by the chandef.chan being null at the end of CAC. + +Solution: Ensure the channel definition is set for the different modes +when starting CAC to avoid getting a NULL 'chan' at the end of CAC. + + Call Trace: + ? show_regs.part.0+0x14/0x16 + ? __warn+0x67/0xc0 + ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211] + ? report_bug+0xa7/0x130 + ? exc_overflow+0x30/0x30 + ? handle_bug+0x27/0x50 + ? exc_invalid_op+0x18/0x60 + ? handle_exception+0xf6/0xf6 + ? exc_overflow+0x30/0x30 + ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211] + ? exc_overflow+0x30/0x30 + ? cfg80211_chandef_dfs_usable+0x20/0xaf [cfg80211] + ? regulatory_propagate_dfs_state.cold+0x1b/0x4c [cfg80211] + ? cfg80211_propagate_cac_done_wk+0x1a/0x30 [cfg80211] + ? process_one_work+0x165/0x280 + ? worker_thread+0x120/0x3f0 + ? kthread+0xc2/0xf0 + ? process_one_work+0x280/0x280 + ? kthread_complete_and_exit+0x20/0x20 + ? ret_from_fork+0x19/0x24 + +Reported-by: Kretschmer Mathias +Signed-off-by: Issam Hamdi +Link: https://patch.msgid.link/20240816142418.3381951-1-ih@simonwunderlich.de +[shorten subject, remove OCB, reorder cases to match previous list] +Signed-off-by: Johannes Berg +--- + +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -10144,7 +10144,20 @@ static int nl80211_start_radar_detection + + err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms); + if (!err) { +- wdev->links[0].ap.chandef = chandef; ++ switch (wdev->iftype) { ++ case NL80211_IFTYPE_AP: ++ case NL80211_IFTYPE_P2P_GO: ++ wdev->links[0].ap.chandef = chandef; ++ break; ++ case NL80211_IFTYPE_ADHOC: ++ wdev->u.ibss.chandef = chandef; ++ break; ++ case NL80211_IFTYPE_MESH_POINT: ++ wdev->u.mesh.chandef = chandef; ++ break; ++ default: ++ break; ++ } + wdev->cac_started = true; + wdev->cac_start_time = jiffies; + wdev->cac_time_ms = cac_time_ms; diff --git a/package/kernel/mac80211/patches/subsys/333-Revert-wifi-mac80211-move-radar-detect-work-to-sdata.patch b/package/kernel/mac80211/patches/subsys/333-Revert-wifi-mac80211-move-radar-detect-work-to-sdata.patch new file mode 100644 index 00000000000000..d12df8f53ea8b6 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/333-Revert-wifi-mac80211-move-radar-detect-work-to-sdata.patch @@ -0,0 +1,136 @@ +From: Aditya Kumar Singh +Date: Fri, 6 Sep 2024 12:14:19 +0530 +Subject: [PATCH] Revert "wifi: mac80211: move radar detect work to sdata" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This reverts commit ce9e660ef32e ("wifi: mac80211: move radar detect work to sdata"). + +To enable radar detection with MLO, it’s essential to handle it on a +per-link basis. This is because when using MLO, multiple links may already +be active and beaconing. In this scenario, another link should be able to +initiate a radar detection. Also, if underlying links are associated with +different hardware devices but grouped together for MLO, they could +potentially start radar detection simultaneously. Therefore, it makes +sense to manage radar detection settings separately for each link by moving +them back to a per-link data structure. + +Signed-off-by: Aditya Kumar Singh +Link: https://patch.msgid.link/20240906064426.2101315-2-quic_adisi@quicinc.com +Signed-off-by: Johannes Berg +--- + +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -1658,7 +1658,7 @@ static int ieee80211_stop_ap(struct wiph + + if (sdata->wdev.cac_started) { + chandef = link_conf->chanreq.oper; +- wiphy_delayed_work_cancel(wiphy, &sdata->dfs_cac_timer_work); ++ wiphy_delayed_work_cancel(wiphy, &link->dfs_cac_timer_work); + cfg80211_cac_event(sdata->dev, &chandef, + NL80211_RADAR_CAC_ABORTED, + GFP_KERNEL); +@@ -3482,7 +3482,7 @@ static int ieee80211_start_radar_detecti + if (err) + goto out_unlock; + +- wiphy_delayed_work_queue(wiphy, &sdata->dfs_cac_timer_work, ++ wiphy_delayed_work_queue(wiphy, &sdata->deflink.dfs_cac_timer_work, + msecs_to_jiffies(cac_time_ms)); + + out_unlock: +@@ -3499,7 +3499,7 @@ static void ieee80211_end_cac(struct wip + + list_for_each_entry(sdata, &local->interfaces, list) { + wiphy_delayed_work_cancel(wiphy, +- &sdata->dfs_cac_timer_work); ++ &sdata->deflink.dfs_cac_timer_work); + + if (sdata->wdev.cac_started) { + ieee80211_link_release_channel(&sdata->deflink); +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -1069,6 +1069,7 @@ struct ieee80211_link_data { + int ap_power_level; /* in dBm */ + + bool radar_required; ++ struct wiphy_delayed_work dfs_cac_timer_work; + + union { + struct ieee80211_link_data_managed mgd; +@@ -1167,8 +1168,6 @@ struct ieee80211_sub_if_data { + struct ieee80211_link_data deflink; + struct ieee80211_link_data __rcu *link[IEEE80211_MLD_MAX_NUM_LINKS]; + +- struct wiphy_delayed_work dfs_cac_timer_work; +- + /* for ieee80211_set_active_links_async() */ + struct wiphy_work activate_links_work; + u16 desired_active_links; +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -551,7 +551,7 @@ static void ieee80211_do_stop(struct iee + wiphy_work_cancel(local->hw.wiphy, + &sdata->deflink.color_change_finalize_work); + wiphy_delayed_work_cancel(local->hw.wiphy, +- &sdata->dfs_cac_timer_work); ++ &sdata->deflink.dfs_cac_timer_work); + + if (sdata->wdev.cac_started) { + chandef = sdata->vif.bss_conf.chanreq.oper; +@@ -1744,8 +1744,6 @@ static void ieee80211_setup_sdata(struct + wiphy_work_init(&sdata->work, ieee80211_iface_work); + wiphy_work_init(&sdata->activate_links_work, + ieee80211_activate_links_work); +- wiphy_delayed_work_init(&sdata->dfs_cac_timer_work, +- ieee80211_dfs_cac_timer_work); + + switch (type) { + case NL80211_IFTYPE_P2P_GO: +--- a/net/mac80211/link.c ++++ b/net/mac80211/link.c +@@ -45,6 +45,8 @@ void ieee80211_link_init(struct ieee8021 + ieee80211_color_collision_detection_work); + INIT_LIST_HEAD(&link->assigned_chanctx_list); + INIT_LIST_HEAD(&link->reserved_chanctx_list); ++ wiphy_delayed_work_init(&link->dfs_cac_timer_work, ++ ieee80211_dfs_cac_timer_work); + + if (!deflink) { + switch (sdata->vif.type) { +--- a/net/mac80211/mlme.c ++++ b/net/mac80211/mlme.c +@@ -3031,15 +3031,16 @@ void ieee80211_dynamic_ps_timer(struct t + + void ieee80211_dfs_cac_timer_work(struct wiphy *wiphy, struct wiphy_work *work) + { +- struct ieee80211_sub_if_data *sdata = +- container_of(work, struct ieee80211_sub_if_data, ++ struct ieee80211_link_data *link = ++ container_of(work, struct ieee80211_link_data, + dfs_cac_timer_work.work); +- struct cfg80211_chan_def chandef = sdata->vif.bss_conf.chanreq.oper; ++ struct cfg80211_chan_def chandef = link->conf->chanreq.oper; ++ struct ieee80211_sub_if_data *sdata = link->sdata; + + lockdep_assert_wiphy(sdata->local->hw.wiphy); + + if (sdata->wdev.cac_started) { +- ieee80211_link_release_channel(&sdata->deflink); ++ ieee80211_link_release_channel(link); + cfg80211_cac_event(sdata->dev, &chandef, + NL80211_RADAR_CAC_FINISHED, + GFP_KERNEL); +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c +@@ -3460,7 +3460,7 @@ void ieee80211_dfs_cac_cancel(struct iee + + list_for_each_entry(sdata, &local->interfaces, list) { + wiphy_delayed_work_cancel(local->hw.wiphy, +- &sdata->dfs_cac_timer_work); ++ &sdata->deflink.dfs_cac_timer_work); + + if (sdata->wdev.cac_started) { + chandef = sdata->vif.bss_conf.chanreq.oper; diff --git a/package/kernel/mac80211/patches/subsys/334-wifi-mac80211-remove-label-usage-in-ieee80211_start_.patch b/package/kernel/mac80211/patches/subsys/334-wifi-mac80211-remove-label-usage-in-ieee80211_start_.patch new file mode 100644 index 00000000000000..329b6454628073 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/334-wifi-mac80211-remove-label-usage-in-ieee80211_start_.patch @@ -0,0 +1,50 @@ +From: Aditya Kumar Singh +Date: Fri, 6 Sep 2024 12:14:20 +0530 +Subject: [PATCH] wifi: mac80211: remove label usage in + ieee80211_start_radar_detection() + +After locks rework [1], ieee80211_start_radar_detection() function is no +longer acquiring any lock as such explicitly. Hence, it is not unlocking +anything as well. However, label "out_unlock" is still used which creates +confusion. Also, now there is no need of goto label as such. + +Get rid of the goto logic and use direct return statements. + +[1]: https://lore.kernel.org/all/20230828135928.b1c6efffe9ad.I4aec875e25abc9ef0b5ad1e70b5747fd483fbd3c@changeid/ + +Signed-off-by: Aditya Kumar Singh +Link: https://patch.msgid.link/20240906064426.2101315-3-quic_adisi@quicinc.com +Signed-off-by: Johannes Berg +--- + +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -3468,10 +3468,8 @@ static int ieee80211_start_radar_detecti + + lockdep_assert_wiphy(local->hw.wiphy); + +- if (!list_empty(&local->roc_list) || local->scanning) { +- err = -EBUSY; +- goto out_unlock; +- } ++ if (!list_empty(&local->roc_list) || local->scanning) ++ return -EBUSY; + + /* whatever, but channel contexts should not complain about that one */ + sdata->deflink.smps_mode = IEEE80211_SMPS_OFF; +@@ -3480,13 +3478,12 @@ static int ieee80211_start_radar_detecti + err = ieee80211_link_use_channel(&sdata->deflink, &chanreq, + IEEE80211_CHANCTX_SHARED); + if (err) +- goto out_unlock; ++ return err; + + wiphy_delayed_work_queue(wiphy, &sdata->deflink.dfs_cac_timer_work, + msecs_to_jiffies(cac_time_ms)); + +- out_unlock: +- return err; ++ return 0; + } + + static void ieee80211_end_cac(struct wiphy *wiphy, diff --git a/package/kernel/mac80211/patches/subsys/335-wifi-trace-unlink-rdev_end_cac-trace-event-from-wiph.patch b/package/kernel/mac80211/patches/subsys/335-wifi-trace-unlink-rdev_end_cac-trace-event-from-wiph.patch new file mode 100644 index 00000000000000..98bc0c26fdb8f2 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/335-wifi-trace-unlink-rdev_end_cac-trace-event-from-wiph.patch @@ -0,0 +1,42 @@ +From: Aditya Kumar Singh +Date: Fri, 6 Sep 2024 12:14:21 +0530 +Subject: [PATCH] wifi: trace: unlink rdev_end_cac trace event from + wiphy_netdev_evt class + +rdev_end_cac trace event is linked with wiphy_netdev_evt event class. +There is no option to pass link ID currently to wiphy_netdev_evt class. +A subsequent change would pass link ID to rdev_end_cac event and hence +it can no longer derive the event class from wiphy_netdev_evt. + +Therefore, unlink rdev_end_cac event from wiphy_netdev_evt and define it's +own independent trace event. Link ID would be passed in subsequent change. + +Signed-off-by: Aditya Kumar Singh +Link: https://patch.msgid.link/20240906064426.2101315-4-quic_adisi@quicinc.com +Signed-off-by: Johannes Berg +--- + +--- a/net/wireless/trace.h ++++ b/net/wireless/trace.h +@@ -805,9 +805,18 @@ DEFINE_EVENT(wiphy_netdev_evt, rdev_flus + TP_ARGS(wiphy, netdev) + ); + +-DEFINE_EVENT(wiphy_netdev_evt, rdev_end_cac, +- TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), +- TP_ARGS(wiphy, netdev) ++TRACE_EVENT(rdev_end_cac, ++ TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), ++ TP_ARGS(wiphy, netdev), ++ TP_STRUCT__entry( ++ WIPHY_ENTRY ++ NETDEV_ENTRY ++ ), ++ TP_fast_assign( ++ WIPHY_ASSIGN; ++ NETDEV_ASSIGN; ++ ), ++ TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG) + ); + + DECLARE_EVENT_CLASS(station_add_change, diff --git a/package/kernel/mac80211/patches/subsys/336-wifi-cfg80211-move-DFS-related-members-to-links-in-w.patch b/package/kernel/mac80211/patches/subsys/336-wifi-cfg80211-move-DFS-related-members-to-links-in-w.patch new file mode 100644 index 00000000000000..95dac04de5e411 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/336-wifi-cfg80211-move-DFS-related-members-to-links-in-w.patch @@ -0,0 +1,309 @@ +From: Aditya Kumar Singh +Date: Fri, 6 Sep 2024 12:14:22 +0530 +Subject: [PATCH] wifi: cfg80211: move DFS related members to links[] in + wireless_dev + +A few members related to DFS handling are currently under per wireless +device data structure. However, in order to support DFS with MLO, there is +a need to have them on a per-link manner. + +Hence, as a preliminary step, move members cac_started, cac_start_time +and cac_time_ms to be on a per-link basis. + +Since currently, link ID is not known at all places, use default value of +0 for now. + +Signed-off-by: Aditya Kumar Singh +Link: https://patch.msgid.link/20240906064426.2101315-5-quic_adisi@quicinc.com +Signed-off-by: Johannes Berg +--- + +--- a/drivers/net/wireless/marvell/mwifiex/11h.c ++++ b/drivers/net/wireless/marvell/mwifiex/11h.c +@@ -117,7 +117,7 @@ void mwifiex_dfs_cac_work_queue(struct w + dfs_cac_work); + + chandef = priv->dfs_chandef; +- if (priv->wdev.cac_started) { ++ if (priv->wdev.links[0].cac_started) { + mwifiex_dbg(priv->adapter, MSG, + "CAC timer finished; No radar detected\n"); + cfg80211_cac_event(priv->netdev, &chandef, +@@ -174,7 +174,7 @@ int mwifiex_stop_radar_detection(struct + */ + void mwifiex_abort_cac(struct mwifiex_private *priv) + { +- if (priv->wdev.cac_started) { ++ if (priv->wdev.links[0].cac_started) { + if (mwifiex_stop_radar_detection(priv, &priv->dfs_chandef)) + mwifiex_dbg(priv->adapter, ERROR, + "failed to stop CAC in FW\n"); +--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +@@ -1880,7 +1880,7 @@ mwifiex_cfg80211_del_station(struct wiph + struct mwifiex_sta_node *sta_node; + u8 deauth_mac[ETH_ALEN]; + +- if (!priv->bss_started && priv->wdev.cac_started) { ++ if (!priv->bss_started && priv->wdev.links[0].cac_started) { + mwifiex_dbg(priv->adapter, INFO, "%s: abort CAC!\n", __func__); + mwifiex_abort_cac(priv); + } +@@ -3978,7 +3978,7 @@ mwifiex_cfg80211_channel_switch(struct w + return -EBUSY; + } + +- if (priv->wdev.cac_started) ++ if (priv->wdev.links[0].cac_started) + return -EBUSY; + + if (cfg80211_chandef_identical(¶ms->chandef, +--- a/drivers/net/wireless/quantenna/qtnfmac/event.c ++++ b/drivers/net/wireless/quantenna/qtnfmac/event.c +@@ -520,21 +520,21 @@ static int qtnf_event_handle_radar(struc + cfg80211_radar_event(wiphy, &chandef, GFP_KERNEL); + break; + case QLINK_RADAR_CAC_FINISHED: +- if (!vif->wdev.cac_started) ++ if (!vif->wdev.links[0].cac_started) + break; + + cfg80211_cac_event(vif->netdev, &chandef, + NL80211_RADAR_CAC_FINISHED, GFP_KERNEL); + break; + case QLINK_RADAR_CAC_ABORTED: +- if (!vif->wdev.cac_started) ++ if (!vif->wdev.links[0].cac_started) + break; + + cfg80211_cac_event(vif->netdev, &chandef, + NL80211_RADAR_CAC_ABORTED, GFP_KERNEL); + break; + case QLINK_RADAR_CAC_STARTED: +- if (vif->wdev.cac_started) ++ if (vif->wdev.links[0].cac_started) + break; + + if (!wiphy_ext_feature_isset(wiphy, +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -6198,9 +6198,6 @@ enum ieee80211_ap_reg_power { + * @address: The address for this device, valid only if @netdev is %NULL + * @is_running: true if this is a non-netdev device that has been started, e.g. + * the P2P Device. +- * @cac_started: true if DFS channel availability check has been started +- * @cac_start_time: timestamp (jiffies) when the dfs state was entered. +- * @cac_time_ms: CAC time in ms + * @ps: powersave mode is enabled + * @ps_timeout: dynamic powersave timeout + * @ap_unexpected_nlportid: (private) netlink port ID of application +@@ -6224,6 +6221,11 @@ enum ieee80211_ap_reg_power { + * unprotected beacon report + * @links: array of %IEEE80211_MLD_MAX_NUM_LINKS elements containing @addr + * @ap and @client for each link ++ * @links[].cac_started: true if DFS channel availability check has been ++ * started ++ * @links[].cac_start_time: timestamp (jiffies) when the dfs state was ++ * entered. ++ * @links[].cac_time_ms: CAC time in ms + * @valid_links: bitmap describing what elements of @links are valid + */ + struct wireless_dev { +@@ -6265,11 +6267,6 @@ struct wireless_dev { + u32 owner_nlportid; + bool nl_owner_dead; + +- /* FIXME: need to rework radar detection for MLO */ +- bool cac_started; +- unsigned long cac_start_time; +- unsigned int cac_time_ms; +- + #ifdef CPTCFG_CFG80211_WEXT + /* wext data */ + struct { +@@ -6336,6 +6333,10 @@ struct wireless_dev { + struct cfg80211_internal_bss *current_bss; + } client; + }; ++ ++ bool cac_started; ++ unsigned long cac_start_time; ++ unsigned int cac_time_ms; + } links[IEEE80211_MLD_MAX_NUM_LINKS]; + u16 valid_links; + }; +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -1656,7 +1656,7 @@ static int ieee80211_stop_ap(struct wiph + ieee80211_link_info_change_notify(sdata, link, + BSS_CHANGED_BEACON_ENABLED); + +- if (sdata->wdev.cac_started) { ++ if (sdata->wdev.links[0].cac_started) { + chandef = link_conf->chanreq.oper; + wiphy_delayed_work_cancel(wiphy, &link->dfs_cac_timer_work); + cfg80211_cac_event(sdata->dev, &chandef, +@@ -3498,9 +3498,9 @@ static void ieee80211_end_cac(struct wip + wiphy_delayed_work_cancel(wiphy, + &sdata->deflink.dfs_cac_timer_work); + +- if (sdata->wdev.cac_started) { ++ if (sdata->wdev.links[0].cac_started) { + ieee80211_link_release_channel(&sdata->deflink); +- sdata->wdev.cac_started = false; ++ sdata->wdev.links[0].cac_started = false; + } + } + } +@@ -3955,7 +3955,7 @@ __ieee80211_channel_switch(struct wiphy + if (!list_empty(&local->roc_list) || local->scanning) + return -EBUSY; + +- if (sdata->wdev.cac_started) ++ if (sdata->wdev.links[0].cac_started) + return -EBUSY; + + if (WARN_ON(link_id >= IEEE80211_MLD_MAX_NUM_LINKS)) +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -553,7 +553,7 @@ static void ieee80211_do_stop(struct iee + wiphy_delayed_work_cancel(local->hw.wiphy, + &sdata->deflink.dfs_cac_timer_work); + +- if (sdata->wdev.cac_started) { ++ if (sdata->wdev.links[0].cac_started) { + chandef = sdata->vif.bss_conf.chanreq.oper; + WARN_ON(local->suspended); + ieee80211_link_release_channel(&sdata->deflink); +--- a/net/mac80211/mlme.c ++++ b/net/mac80211/mlme.c +@@ -3039,7 +3039,7 @@ void ieee80211_dfs_cac_timer_work(struct + + lockdep_assert_wiphy(sdata->local->hw.wiphy); + +- if (sdata->wdev.cac_started) { ++ if (sdata->wdev.links[0].cac_started) { + ieee80211_link_release_channel(link); + cfg80211_cac_event(sdata->dev, &chandef, + NL80211_RADAR_CAC_FINISHED, +--- a/net/mac80211/scan.c ++++ b/net/mac80211/scan.c +@@ -585,7 +585,7 @@ static bool __ieee80211_can_leave_ch(str + return false; + + list_for_each_entry(sdata_iter, &local->interfaces, list) { +- if (sdata_iter->wdev.cac_started) ++ if (sdata_iter->wdev.links[0].cac_started) + return false; + } + +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c +@@ -3462,7 +3462,7 @@ void ieee80211_dfs_cac_cancel(struct iee + wiphy_delayed_work_cancel(local->hw.wiphy, + &sdata->deflink.dfs_cac_timer_work); + +- if (sdata->wdev.cac_started) { ++ if (sdata->wdev.links[0].cac_started) { + chandef = sdata->vif.bss_conf.chanreq.oper; + ieee80211_link_release_channel(&sdata->deflink); + cfg80211_cac_event(sdata->dev, +--- a/net/wireless/ibss.c ++++ b/net/wireless/ibss.c +@@ -94,7 +94,7 @@ int __cfg80211_join_ibss(struct cfg80211 + + lockdep_assert_held(&rdev->wiphy.mtx); + +- if (wdev->cac_started) ++ if (wdev->links[0].cac_started) + return -EBUSY; + + if (wdev->u.ibss.ssid_len) +--- a/net/wireless/mesh.c ++++ b/net/wireless/mesh.c +@@ -127,7 +127,7 @@ int __cfg80211_join_mesh(struct cfg80211 + if (!rdev->ops->join_mesh) + return -EOPNOTSUPP; + +- if (wdev->cac_started) ++ if (wdev->links[0].cac_started) + return -EBUSY; + + if (!setup->chandef.chan) { +--- a/net/wireless/mlme.c ++++ b/net/wireless/mlme.c +@@ -1124,13 +1124,14 @@ void cfg80211_cac_event(struct net_devic + + trace_cfg80211_cac_event(netdev, event); + +- if (WARN_ON(!wdev->cac_started && event != NL80211_RADAR_CAC_STARTED)) ++ if (WARN_ON(!wdev->links[0].cac_started && ++ event != NL80211_RADAR_CAC_STARTED)) + return; + + switch (event) { + case NL80211_RADAR_CAC_FINISHED: +- timeout = wdev->cac_start_time + +- msecs_to_jiffies(wdev->cac_time_ms); ++ timeout = wdev->links[0].cac_start_time + ++ msecs_to_jiffies(wdev->links[0].cac_time_ms); + WARN_ON(!time_after_eq(jiffies, timeout)); + cfg80211_set_dfs_state(wiphy, chandef, NL80211_DFS_AVAILABLE); + memcpy(&rdev->cac_done_chandef, chandef, +@@ -1139,10 +1140,10 @@ void cfg80211_cac_event(struct net_devic + cfg80211_sched_dfs_chan_update(rdev); + fallthrough; + case NL80211_RADAR_CAC_ABORTED: +- wdev->cac_started = false; ++ wdev->links[0].cac_started = false; + break; + case NL80211_RADAR_CAC_STARTED: +- wdev->cac_started = true; ++ wdev->links[0].cac_started = true; + break; + default: + WARN_ON(1); +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -6066,7 +6066,7 @@ static int nl80211_start_ap(struct sk_bu + if (!rdev->ops->start_ap) + return -EOPNOTSUPP; + +- if (wdev->cac_started) ++ if (wdev->links[0].cac_started) + return -EBUSY; + + if (wdev->links[link_id].ap.beacon_interval) +@@ -10122,7 +10122,7 @@ static int nl80211_start_radar_detection + goto unlock; + } + +- if (cfg80211_beaconing_iface_active(wdev) || wdev->cac_started) { ++ if (cfg80211_beaconing_iface_active(wdev) || wdev->links[0].cac_started) { + err = -EBUSY; + goto unlock; + } +@@ -10158,9 +10158,9 @@ static int nl80211_start_radar_detection + default: + break; + } +- wdev->cac_started = true; +- wdev->cac_start_time = jiffies; +- wdev->cac_time_ms = cac_time_ms; ++ wdev->links[0].cac_started = true; ++ wdev->links[0].cac_start_time = jiffies; ++ wdev->links[0].cac_time_ms = cac_time_ms; + } + unlock: + wiphy_unlock(wiphy); +--- a/net/wireless/reg.c ++++ b/net/wireless/reg.c +@@ -4241,7 +4241,7 @@ static void cfg80211_check_and_end_cac(s + list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { + struct cfg80211_chan_def *chandef; + +- if (!wdev->cac_started) ++ if (!wdev->links[0].cac_started) + continue; + + /* FIXME: radar detection is tied to link 0 for now */ diff --git a/package/kernel/mac80211/patches/subsys/337-wifi-cfg80211-handle-DFS-per-link.patch b/package/kernel/mac80211/patches/subsys/337-wifi-cfg80211-handle-DFS-per-link.patch new file mode 100644 index 00000000000000..a4e0333642ae5b --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/337-wifi-cfg80211-handle-DFS-per-link.patch @@ -0,0 +1,435 @@ +From: Aditya Kumar Singh +Date: Fri, 6 Sep 2024 12:14:23 +0530 +Subject: [PATCH] wifi: cfg80211: handle DFS per link + +Currently, during starting a radar detection, no link id information is +parsed and passed down. In order to support starting radar detection +during Multi Link Operation, it is required to pass link id as well. + +Add changes to first parse and then pass link id in the start radar +detection path. + +Additionally, update notification APIs to allow drivers/mac80211 to +pass the link ID. + +However, everything is handled at link 0 only until all API's are ready to +handle it per link. + +Signed-off-by: Aditya Kumar Singh +Link: https://patch.msgid.link/20240906064426.2101315-6-quic_adisi@quicinc.com +Signed-off-by: Johannes Berg +--- + +--- a/drivers/net/wireless/marvell/mwifiex/11h.c ++++ b/drivers/net/wireless/marvell/mwifiex/11h.c +@@ -122,7 +122,7 @@ void mwifiex_dfs_cac_work_queue(struct w + "CAC timer finished; No radar detected\n"); + cfg80211_cac_event(priv->netdev, &chandef, + NL80211_RADAR_CAC_FINISHED, +- GFP_KERNEL); ++ GFP_KERNEL, 0); + } + } + +@@ -182,7 +182,8 @@ void mwifiex_abort_cac(struct mwifiex_pr + "Aborting delayed work for CAC.\n"); + cancel_delayed_work_sync(&priv->dfs_cac_work); + cfg80211_cac_event(priv->netdev, &priv->dfs_chandef, +- NL80211_RADAR_CAC_ABORTED, GFP_KERNEL); ++ NL80211_RADAR_CAC_ABORTED, GFP_KERNEL, ++ 0); + } + } + +@@ -221,7 +222,7 @@ int mwifiex_11h_handle_chanrpt_ready(str + cfg80211_cac_event(priv->netdev, + &priv->dfs_chandef, + NL80211_RADAR_DETECTED, +- GFP_KERNEL); ++ GFP_KERNEL, 0); + } + break; + default: +--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +@@ -4145,7 +4145,7 @@ static int + mwifiex_cfg80211_start_radar_detection(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_chan_def *chandef, +- u32 cac_time_ms) ++ u32 cac_time_ms, int link_id) + { + struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); + struct mwifiex_radar_params radar_params; +--- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c ++++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +@@ -837,7 +837,7 @@ static int qtnf_channel_switch(struct wi + static int qtnf_start_radar_detection(struct wiphy *wiphy, + struct net_device *ndev, + struct cfg80211_chan_def *chandef, +- u32 cac_time_ms) ++ u32 cac_time_ms, int link_id) + { + struct qtnf_vif *vif = qtnf_netdev_get_priv(ndev); + int ret; +--- a/drivers/net/wireless/quantenna/qtnfmac/event.c ++++ b/drivers/net/wireless/quantenna/qtnfmac/event.c +@@ -524,14 +524,14 @@ static int qtnf_event_handle_radar(struc + break; + + cfg80211_cac_event(vif->netdev, &chandef, +- NL80211_RADAR_CAC_FINISHED, GFP_KERNEL); ++ NL80211_RADAR_CAC_FINISHED, GFP_KERNEL, 0); + break; + case QLINK_RADAR_CAC_ABORTED: + if (!vif->wdev.links[0].cac_started) + break; + + cfg80211_cac_event(vif->netdev, &chandef, +- NL80211_RADAR_CAC_ABORTED, GFP_KERNEL); ++ NL80211_RADAR_CAC_ABORTED, GFP_KERNEL, 0); + break; + case QLINK_RADAR_CAC_STARTED: + if (vif->wdev.links[0].cac_started) +@@ -542,7 +542,7 @@ static int qtnf_event_handle_radar(struc + break; + + cfg80211_cac_event(vif->netdev, &chandef, +- NL80211_RADAR_CAC_STARTED, GFP_KERNEL); ++ NL80211_RADAR_CAC_STARTED, GFP_KERNEL, 0); + break; + default: + pr_warn("%s: unhandled radar event %u\n", +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -4841,9 +4841,9 @@ struct cfg80211_ops { + int (*start_radar_detection)(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_chan_def *chandef, +- u32 cac_time_ms); ++ u32 cac_time_ms, int link_id); + void (*end_cac)(struct wiphy *wiphy, +- struct net_device *dev); ++ struct net_device *dev, unsigned int link_id); + int (*update_ft_ies)(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_update_ft_ies_params *ftie); + int (*crit_proto_start)(struct wiphy *wiphy, +@@ -8745,6 +8745,7 @@ void cfg80211_sta_opmode_change_notify(s + * @chandef: chandef for the current channel + * @event: type of event + * @gfp: context flags ++ * @link_id: valid link_id for MLO operation or 0 otherwise. + * + * This function is called when a Channel availability check (CAC) is finished + * or aborted. This must be called to notify the completion of a CAC process, +@@ -8752,7 +8753,8 @@ void cfg80211_sta_opmode_change_notify(s + */ + void cfg80211_cac_event(struct net_device *netdev, + const struct cfg80211_chan_def *chandef, +- enum nl80211_radar_event event, gfp_t gfp); ++ enum nl80211_radar_event event, gfp_t gfp, ++ unsigned int link_id); + + /** + * cfg80211_background_cac_abort - Channel Availability Check offchan abort event +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -1661,7 +1661,7 @@ static int ieee80211_stop_ap(struct wiph + wiphy_delayed_work_cancel(wiphy, &link->dfs_cac_timer_work); + cfg80211_cac_event(sdata->dev, &chandef, + NL80211_RADAR_CAC_ABORTED, +- GFP_KERNEL); ++ GFP_KERNEL, 0); + } + + drv_stop_ap(sdata->local, sdata, link_conf); +@@ -3459,7 +3459,7 @@ static int ieee80211_set_bitrate_mask(st + static int ieee80211_start_radar_detection(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_chan_def *chandef, +- u32 cac_time_ms) ++ u32 cac_time_ms, int link_id) + { + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); + struct ieee80211_chan_req chanreq = { .oper = *chandef }; +@@ -3487,7 +3487,7 @@ static int ieee80211_start_radar_detecti + } + + static void ieee80211_end_cac(struct wiphy *wiphy, +- struct net_device *dev) ++ struct net_device *dev, unsigned int link_id) + { + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); + struct ieee80211_local *local = sdata->local; +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -559,7 +559,7 @@ static void ieee80211_do_stop(struct iee + ieee80211_link_release_channel(&sdata->deflink); + cfg80211_cac_event(sdata->dev, &chandef, + NL80211_RADAR_CAC_ABORTED, +- GFP_KERNEL); ++ GFP_KERNEL, 0); + } + + if (sdata->vif.type == NL80211_IFTYPE_AP) { +--- a/net/mac80211/mlme.c ++++ b/net/mac80211/mlme.c +@@ -3043,7 +3043,7 @@ void ieee80211_dfs_cac_timer_work(struct + ieee80211_link_release_channel(link); + cfg80211_cac_event(sdata->dev, &chandef, + NL80211_RADAR_CAC_FINISHED, +- GFP_KERNEL); ++ GFP_KERNEL, 0); + } + } + +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c +@@ -3468,7 +3468,7 @@ void ieee80211_dfs_cac_cancel(struct iee + cfg80211_cac_event(sdata->dev, + &chandef, + NL80211_RADAR_CAC_ABORTED, +- GFP_KERNEL); ++ GFP_KERNEL, 0); + } + } + } +--- a/net/wireless/mlme.c ++++ b/net/wireless/mlme.c +@@ -1111,18 +1111,19 @@ EXPORT_SYMBOL(__cfg80211_radar_event); + + void cfg80211_cac_event(struct net_device *netdev, + const struct cfg80211_chan_def *chandef, +- enum nl80211_radar_event event, gfp_t gfp) ++ enum nl80211_radar_event event, gfp_t gfp, ++ unsigned int link_id) + { + struct wireless_dev *wdev = netdev->ieee80211_ptr; + struct wiphy *wiphy = wdev->wiphy; + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); + unsigned long timeout; + +- /* not yet supported */ +- if (wdev->valid_links) ++ if (WARN_ON(wdev->valid_links && ++ !(wdev->valid_links & BIT(link_id)))) + return; + +- trace_cfg80211_cac_event(netdev, event); ++ trace_cfg80211_cac_event(netdev, event, link_id); + + if (WARN_ON(!wdev->links[0].cac_started && + event != NL80211_RADAR_CAC_STARTED)) +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -10122,7 +10122,20 @@ static int nl80211_start_radar_detection + goto unlock; + } + +- if (cfg80211_beaconing_iface_active(wdev) || wdev->links[0].cac_started) { ++ if (cfg80211_beaconing_iface_active(wdev)) { ++ /* During MLO other link(s) can beacon, only the current link ++ * can not already beacon ++ */ ++ if (wdev->valid_links && ++ !wdev->links[0].ap.beacon_interval) { ++ /* nothing */ ++ } else { ++ err = -EBUSY; ++ goto unlock; ++ } ++ } ++ ++ if (wdev->links[0].cac_started) { + err = -EBUSY; + goto unlock; + } +@@ -10142,7 +10155,8 @@ static int nl80211_start_radar_detection + if (WARN_ON(!cac_time_ms)) + cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS; + +- err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms); ++ err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms, ++ 0); + if (!err) { + switch (wdev->iftype) { + case NL80211_IFTYPE_AP: +@@ -16512,10 +16526,10 @@ nl80211_set_ttlm(struct sk_buff *skb, st + SELECTOR(__sel, NETDEV_UP_NOTMX, \ + NL80211_FLAG_NEED_NETDEV_UP | \ + NL80211_FLAG_NO_WIPHY_MTX) \ +- SELECTOR(__sel, NETDEV_UP_NOTMX_NOMLO, \ ++ SELECTOR(__sel, NETDEV_UP_NOTMX_MLO, \ + NL80211_FLAG_NEED_NETDEV_UP | \ + NL80211_FLAG_NO_WIPHY_MTX | \ +- NL80211_FLAG_MLO_UNSUPPORTED) \ ++ NL80211_FLAG_MLO_VALID_LINK_ID) \ + SELECTOR(__sel, NETDEV_UP_CLEAR, \ + NL80211_FLAG_NEED_NETDEV_UP | \ + NL80211_FLAG_CLEAR_SKB) \ +@@ -17410,7 +17424,7 @@ static const struct genl_small_ops nl802 + .flags = GENL_UNS_ADMIN_PERM, + .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NO_WIPHY_MTX | +- NL80211_FLAG_MLO_UNSUPPORTED), ++ NL80211_FLAG_MLO_VALID_LINK_ID), + }, + { + .cmd = NL80211_CMD_GET_PROTOCOL_FEATURES, +--- a/net/wireless/rdev-ops.h ++++ b/net/wireless/rdev-ops.h +@@ -1200,26 +1200,27 @@ static inline int + rdev_start_radar_detection(struct cfg80211_registered_device *rdev, + struct net_device *dev, + struct cfg80211_chan_def *chandef, +- u32 cac_time_ms) ++ u32 cac_time_ms, int link_id) + { + int ret = -EOPNOTSUPP; + + trace_rdev_start_radar_detection(&rdev->wiphy, dev, chandef, +- cac_time_ms); ++ cac_time_ms, link_id); + if (rdev->ops->start_radar_detection) + ret = rdev->ops->start_radar_detection(&rdev->wiphy, dev, +- chandef, cac_time_ms); ++ chandef, cac_time_ms, ++ link_id); + trace_rdev_return_int(&rdev->wiphy, ret); + return ret; + } + + static inline void + rdev_end_cac(struct cfg80211_registered_device *rdev, +- struct net_device *dev) ++ struct net_device *dev, unsigned int link_id) + { +- trace_rdev_end_cac(&rdev->wiphy, dev); ++ trace_rdev_end_cac(&rdev->wiphy, dev, link_id); + if (rdev->ops->end_cac) +- rdev->ops->end_cac(&rdev->wiphy, dev); ++ rdev->ops->end_cac(&rdev->wiphy, dev, link_id); + trace_rdev_return_void(&rdev->wiphy); + } + +--- a/net/wireless/reg.c ++++ b/net/wireless/reg.c +@@ -4229,6 +4229,8 @@ EXPORT_SYMBOL(regulatory_pre_cac_allowed + static void cfg80211_check_and_end_cac(struct cfg80211_registered_device *rdev) + { + struct wireless_dev *wdev; ++ unsigned int link_id; ++ + /* If we finished CAC or received radar, we should end any + * CAC running on the same channels. + * the check !cfg80211_chandef_dfs_usable contain 2 options: +@@ -4241,16 +4243,17 @@ static void cfg80211_check_and_end_cac(s + list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { + struct cfg80211_chan_def *chandef; + +- if (!wdev->links[0].cac_started) +- continue; ++ for_each_valid_link(wdev, link_id) { ++ if (!wdev->links[link_id].cac_started) ++ continue; + +- /* FIXME: radar detection is tied to link 0 for now */ +- chandef = wdev_chandef(wdev, 0); +- if (!chandef) +- continue; ++ chandef = wdev_chandef(wdev, link_id); ++ if (!chandef) ++ continue; + +- if (!cfg80211_chandef_dfs_usable(&rdev->wiphy, chandef)) +- rdev_end_cac(rdev, wdev->netdev); ++ if (!cfg80211_chandef_dfs_usable(&rdev->wiphy, chandef)) ++ rdev_end_cac(rdev, wdev->netdev, link_id); ++ } + } + } + +--- a/net/wireless/trace.h ++++ b/net/wireless/trace.h +@@ -806,17 +806,21 @@ DEFINE_EVENT(wiphy_netdev_evt, rdev_flus + ); + + TRACE_EVENT(rdev_end_cac, +- TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), +- TP_ARGS(wiphy, netdev), ++ TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, ++ unsigned int link_id), ++ TP_ARGS(wiphy, netdev, link_id), + TP_STRUCT__entry( + WIPHY_ENTRY + NETDEV_ENTRY ++ __field(unsigned int, link_id) + ), + TP_fast_assign( + WIPHY_ASSIGN; + NETDEV_ASSIGN; ++ __entry->link_id = link_id; + ), +- TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG) ++ TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id: %d", ++ WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id) + ); + + DECLARE_EVENT_CLASS(station_add_change, +@@ -2661,24 +2665,26 @@ TRACE_EVENT(rdev_external_auth, + TRACE_EVENT(rdev_start_radar_detection, + TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, + struct cfg80211_chan_def *chandef, +- u32 cac_time_ms), +- TP_ARGS(wiphy, netdev, chandef, cac_time_ms), ++ u32 cac_time_ms, int link_id), ++ TP_ARGS(wiphy, netdev, chandef, cac_time_ms, link_id), + TP_STRUCT__entry( + WIPHY_ENTRY + NETDEV_ENTRY + CHAN_DEF_ENTRY + __field(u32, cac_time_ms) ++ __field(int, link_id) + ), + TP_fast_assign( + WIPHY_ASSIGN; + NETDEV_ASSIGN; + CHAN_DEF_ASSIGN(chandef); + __entry->cac_time_ms = cac_time_ms; ++ __entry->link_id = link_id; + ), + TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT +- ", cac_time_ms=%u", ++ ", cac_time_ms=%u, link_id=%d", + WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG, +- __entry->cac_time_ms) ++ __entry->cac_time_ms, __entry->link_id) + ); + + TRACE_EVENT(rdev_set_mcast_rate, +@@ -3492,18 +3498,21 @@ TRACE_EVENT(cfg80211_radar_event, + ); + + TRACE_EVENT(cfg80211_cac_event, +- TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt), +- TP_ARGS(netdev, evt), ++ TP_PROTO(struct net_device *netdev, enum nl80211_radar_event evt, ++ unsigned int link_id), ++ TP_ARGS(netdev, evt, link_id), + TP_STRUCT__entry( + NETDEV_ENTRY + __field(enum nl80211_radar_event, evt) ++ __field(unsigned int, link_id) + ), + TP_fast_assign( + NETDEV_ASSIGN; + __entry->evt = evt; ++ __entry->link_id = link_id; + ), +- TP_printk(NETDEV_PR_FMT ", event: %d", +- NETDEV_PR_ARG, __entry->evt) ++ TP_printk(NETDEV_PR_FMT ", event: %d, link_id=%u", ++ NETDEV_PR_ARG, __entry->evt, __entry->link_id) + ); + + DECLARE_EVENT_CLASS(cfg80211_rx_evt, diff --git a/package/kernel/mac80211/patches/subsys/338-wifi-mac80211-handle-DFS-per-link.patch b/package/kernel/mac80211/patches/subsys/338-wifi-mac80211-handle-DFS-per-link.patch new file mode 100644 index 00000000000000..388c0575c88582 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/338-wifi-mac80211-handle-DFS-per-link.patch @@ -0,0 +1,134 @@ +From: Aditya Kumar Singh +Date: Fri, 6 Sep 2024 12:14:24 +0530 +Subject: [PATCH] wifi: mac80211: handle DFS per link + +In order to support DFS with MLO, handle the link ID now passed from +cfg80211, adjust the code to do everything per link and call the +notifications to cfg80211 correctly. + +Signed-off-by: Aditya Kumar Singh +Link: https://patch.msgid.link/20240906064426.2101315-7-quic_adisi@quicinc.com +Signed-off-by: Johannes Berg +--- + +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -3464,6 +3464,7 @@ static int ieee80211_start_radar_detecti + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); + struct ieee80211_chan_req chanreq = { .oper = *chandef }; + struct ieee80211_local *local = sdata->local; ++ struct ieee80211_link_data *link_data; + int err; + + lockdep_assert_wiphy(local->hw.wiphy); +@@ -3471,16 +3472,20 @@ static int ieee80211_start_radar_detecti + if (!list_empty(&local->roc_list) || local->scanning) + return -EBUSY; + ++ link_data = sdata_dereference(sdata->link[link_id], sdata); ++ if (!link_data) ++ return -ENOLINK; ++ + /* whatever, but channel contexts should not complain about that one */ +- sdata->deflink.smps_mode = IEEE80211_SMPS_OFF; +- sdata->deflink.needed_rx_chains = local->rx_chains; ++ link_data->smps_mode = IEEE80211_SMPS_OFF; ++ link_data->needed_rx_chains = local->rx_chains; + +- err = ieee80211_link_use_channel(&sdata->deflink, &chanreq, ++ err = ieee80211_link_use_channel(link_data, &chanreq, + IEEE80211_CHANCTX_SHARED); + if (err) + return err; + +- wiphy_delayed_work_queue(wiphy, &sdata->deflink.dfs_cac_timer_work, ++ wiphy_delayed_work_queue(wiphy, &link_data->dfs_cac_timer_work, + msecs_to_jiffies(cac_time_ms)); + + return 0; +@@ -3491,16 +3496,21 @@ static void ieee80211_end_cac(struct wip + { + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); + struct ieee80211_local *local = sdata->local; ++ struct ieee80211_link_data *link_data; + + lockdep_assert_wiphy(local->hw.wiphy); + + list_for_each_entry(sdata, &local->interfaces, list) { ++ link_data = sdata_dereference(sdata->link[link_id], sdata); ++ if (!link_data) ++ continue; ++ + wiphy_delayed_work_cancel(wiphy, +- &sdata->deflink.dfs_cac_timer_work); ++ &link_data->dfs_cac_timer_work); + +- if (sdata->wdev.links[0].cac_started) { +- ieee80211_link_release_channel(&sdata->deflink); +- sdata->wdev.links[0].cac_started = false; ++ if (sdata->wdev.links[link_id].cac_started) { ++ ieee80211_link_release_channel(link_data); ++ sdata->wdev.links[link_id].cac_started = false; + } + } + } +--- a/net/mac80211/link.c ++++ b/net/mac80211/link.c +@@ -77,6 +77,16 @@ void ieee80211_link_stop(struct ieee8021 + &link->color_change_finalize_work); + wiphy_work_cancel(link->sdata->local->hw.wiphy, + &link->csa.finalize_work); ++ ++ if (link->sdata->wdev.links[link->link_id].cac_started) { ++ wiphy_delayed_work_cancel(link->sdata->local->hw.wiphy, ++ &link->dfs_cac_timer_work); ++ cfg80211_cac_event(link->sdata->dev, ++ &link->conf->chanreq.oper, ++ NL80211_RADAR_CAC_ABORTED, ++ GFP_KERNEL, link->link_id); ++ } ++ + ieee80211_link_release_channel(link); + } + +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c +@@ -3455,20 +3455,30 @@ void ieee80211_dfs_cac_cancel(struct iee + { + struct ieee80211_sub_if_data *sdata; + struct cfg80211_chan_def chandef; ++ struct ieee80211_link_data *link; ++ unsigned int link_id; + + lockdep_assert_wiphy(local->hw.wiphy); + + list_for_each_entry(sdata, &local->interfaces, list) { +- wiphy_delayed_work_cancel(local->hw.wiphy, +- &sdata->deflink.dfs_cac_timer_work); ++ for (link_id = 0; link_id < IEEE80211_MLD_MAX_NUM_LINKS; ++ link_id++) { ++ link = sdata_dereference(sdata->link[link_id], ++ sdata); ++ if (!link) ++ continue; + +- if (sdata->wdev.links[0].cac_started) { +- chandef = sdata->vif.bss_conf.chanreq.oper; +- ieee80211_link_release_channel(&sdata->deflink); +- cfg80211_cac_event(sdata->dev, +- &chandef, ++ wiphy_delayed_work_cancel(local->hw.wiphy, ++ &link->dfs_cac_timer_work); ++ ++ if (!sdata->wdev.links[link_id].cac_started) ++ continue; ++ ++ chandef = link->conf->chanreq.oper; ++ ieee80211_link_release_channel(link); ++ cfg80211_cac_event(sdata->dev, &chandef, + NL80211_RADAR_CAC_ABORTED, +- GFP_KERNEL, 0); ++ GFP_KERNEL, link_id); + } + } + } diff --git a/package/kernel/mac80211/patches/subsys/339-wifi-cfg80211-mac80211-use-proper-link-ID-for-DFS.patch b/package/kernel/mac80211/patches/subsys/339-wifi-cfg80211-mac80211-use-proper-link-ID-for-DFS.patch new file mode 100644 index 00000000000000..53079b6cf629e0 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/339-wifi-cfg80211-mac80211-use-proper-link-ID-for-DFS.patch @@ -0,0 +1,168 @@ +From: Aditya Kumar Singh +Date: Fri, 6 Sep 2024 12:14:25 +0530 +Subject: [PATCH] wifi: cfg80211/mac80211: use proper link ID for DFS + +Now that all APIs have support to handle DFS per link, use proper link ID +instead of 0. + +Signed-off-by: Aditya Kumar Singh +Link: https://patch.msgid.link/20240906064426.2101315-8-quic_adisi@quicinc.com +Signed-off-by: Johannes Berg +--- + +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -1656,12 +1656,12 @@ static int ieee80211_stop_ap(struct wiph + ieee80211_link_info_change_notify(sdata, link, + BSS_CHANGED_BEACON_ENABLED); + +- if (sdata->wdev.links[0].cac_started) { ++ if (sdata->wdev.links[link_id].cac_started) { + chandef = link_conf->chanreq.oper; + wiphy_delayed_work_cancel(wiphy, &link->dfs_cac_timer_work); + cfg80211_cac_event(sdata->dev, &chandef, + NL80211_RADAR_CAC_ABORTED, +- GFP_KERNEL, 0); ++ GFP_KERNEL, link_id); + } + + drv_stop_ap(sdata->local, sdata, link_conf); +@@ -3965,7 +3965,7 @@ __ieee80211_channel_switch(struct wiphy + if (!list_empty(&local->roc_list) || local->scanning) + return -EBUSY; + +- if (sdata->wdev.links[0].cac_started) ++ if (sdata->wdev.links[link_id].cac_started) + return -EBUSY; + + if (WARN_ON(link_id >= IEEE80211_MLD_MAX_NUM_LINKS)) +--- a/net/mac80211/mlme.c ++++ b/net/mac80211/mlme.c +@@ -3039,11 +3039,11 @@ void ieee80211_dfs_cac_timer_work(struct + + lockdep_assert_wiphy(sdata->local->hw.wiphy); + +- if (sdata->wdev.links[0].cac_started) { ++ if (sdata->wdev.links[link->link_id].cac_started) { + ieee80211_link_release_channel(link); + cfg80211_cac_event(sdata->dev, &chandef, + NL80211_RADAR_CAC_FINISHED, +- GFP_KERNEL, 0); ++ GFP_KERNEL, link->link_id); + } + } + +--- a/net/mac80211/scan.c ++++ b/net/mac80211/scan.c +@@ -575,6 +575,7 @@ static bool __ieee80211_can_leave_ch(str + { + struct ieee80211_local *local = sdata->local; + struct ieee80211_sub_if_data *sdata_iter; ++ unsigned int link_id; + + lockdep_assert_wiphy(local->hw.wiphy); + +@@ -585,8 +586,9 @@ static bool __ieee80211_can_leave_ch(str + return false; + + list_for_each_entry(sdata_iter, &local->interfaces, list) { +- if (sdata_iter->wdev.links[0].cac_started) +- return false; ++ for_each_valid_link(&sdata_iter->wdev, link_id) ++ if (sdata_iter->wdev.links[link_id].cac_started) ++ return false; + } + + return true; +--- a/net/wireless/mlme.c ++++ b/net/wireless/mlme.c +@@ -1125,14 +1125,14 @@ void cfg80211_cac_event(struct net_devic + + trace_cfg80211_cac_event(netdev, event, link_id); + +- if (WARN_ON(!wdev->links[0].cac_started && ++ if (WARN_ON(!wdev->links[link_id].cac_started && + event != NL80211_RADAR_CAC_STARTED)) + return; + + switch (event) { + case NL80211_RADAR_CAC_FINISHED: +- timeout = wdev->links[0].cac_start_time + +- msecs_to_jiffies(wdev->links[0].cac_time_ms); ++ timeout = wdev->links[link_id].cac_start_time + ++ msecs_to_jiffies(wdev->links[link_id].cac_time_ms); + WARN_ON(!time_after_eq(jiffies, timeout)); + cfg80211_set_dfs_state(wiphy, chandef, NL80211_DFS_AVAILABLE); + memcpy(&rdev->cac_done_chandef, chandef, +@@ -1141,10 +1141,10 @@ void cfg80211_cac_event(struct net_devic + cfg80211_sched_dfs_chan_update(rdev); + fallthrough; + case NL80211_RADAR_CAC_ABORTED: +- wdev->links[0].cac_started = false; ++ wdev->links[link_id].cac_started = false; + break; + case NL80211_RADAR_CAC_STARTED: +- wdev->links[0].cac_started = true; ++ wdev->links[link_id].cac_started = true; + break; + default: + WARN_ON(1); +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -6066,7 +6066,7 @@ static int nl80211_start_ap(struct sk_bu + if (!rdev->ops->start_ap) + return -EOPNOTSUPP; + +- if (wdev->links[0].cac_started) ++ if (wdev->links[link_id].cac_started) + return -EBUSY; + + if (wdev->links[link_id].ap.beacon_interval) +@@ -10073,6 +10073,7 @@ static int nl80211_start_radar_detection + struct cfg80211_registered_device *rdev = info->user_ptr[0]; + struct net_device *dev = info->user_ptr[1]; + struct wireless_dev *wdev = dev->ieee80211_ptr; ++ int link_id = nl80211_link_id(info->attrs); + struct wiphy *wiphy = wdev->wiphy; + struct cfg80211_chan_def chandef; + enum nl80211_dfs_regions dfs_region; +@@ -10127,7 +10128,7 @@ static int nl80211_start_radar_detection + * can not already beacon + */ + if (wdev->valid_links && +- !wdev->links[0].ap.beacon_interval) { ++ !wdev->links[link_id].ap.beacon_interval) { + /* nothing */ + } else { + err = -EBUSY; +@@ -10135,7 +10136,7 @@ static int nl80211_start_radar_detection + } + } + +- if (wdev->links[0].cac_started) { ++ if (wdev->links[link_id].cac_started) { + err = -EBUSY; + goto unlock; + } +@@ -10156,7 +10157,7 @@ static int nl80211_start_radar_detection + cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS; + + err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms, +- 0); ++ link_id); + if (!err) { + switch (wdev->iftype) { + case NL80211_IFTYPE_AP: +@@ -10172,9 +10173,9 @@ static int nl80211_start_radar_detection + default: + break; + } +- wdev->links[0].cac_started = true; +- wdev->links[0].cac_start_time = jiffies; +- wdev->links[0].cac_time_ms = cac_time_ms; ++ wdev->links[link_id].cac_started = true; ++ wdev->links[link_id].cac_start_time = jiffies; ++ wdev->links[link_id].cac_time_ms = cac_time_ms; + } + unlock: + wiphy_unlock(wiphy); diff --git a/package/kernel/mac80211/patches/subsys/340-wifi-mac80211-handle-ieee80211_radar_detected-for-ML.patch b/package/kernel/mac80211/patches/subsys/340-wifi-mac80211-handle-ieee80211_radar_detected-for-ML.patch new file mode 100644 index 00000000000000..3f64864bd41f2e --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/340-wifi-mac80211-handle-ieee80211_radar_detected-for-ML.patch @@ -0,0 +1,360 @@ +From: Aditya Kumar Singh +Date: Fri, 6 Sep 2024 12:14:26 +0530 +Subject: [PATCH] wifi: mac80211: handle ieee80211_radar_detected() for MLO + +Currently DFS works under assumption there could be only one channel +context in the hardware. Hence, drivers just calls the function +ieee80211_radar_detected() passing the hardware structure. However, with +MLO, this obviously will not work since number of channel contexts will be +more than one and hence drivers would need to pass the channel information +as well on which the radar is detected. + +Also, when radar is detected in one of the links, other link's CAC should +not be cancelled. + +Hence, in order to support DFS with MLO, do the following changes - + * Add channel context conf pointer as an argument to the function + ieee80211_radar_detected(). During MLO, drivers would have to pass on + which channel context conf radar is detected. Otherwise, drivers could + just pass NULL. + * ieee80211_radar_detected() will iterate over all channel contexts + present and + * if channel context conf is passed, only mark that as radar + detected + * if NULL is passed, then mark all channel contexts as radar + detected + * Then as usual, schedule the radar detected work. + * In the worker, go over all the contexts again and for all such context + which is marked with radar detected, cancel the ongoing CAC by calling + ieee80211_dfs_cac_cancel() and then notify cfg80211 via + cfg80211_radar_event(). + * To cancel the CAC, pass the channel context as well where radar is + detected to ieee80211_dfs_cac_cancel(). This ensures that CAC is + canceled only on the links using the provided context, leaving other + links unaffected. + +This would also help in scenarios where there is split phy 5 GHz radio, +which is capable of DFS channels in both lower and upper band. In this +case, simultaneous radars can be detected. + +Signed-off-by: Aditya Kumar Singh +Link: https://patch.msgid.link/20240906064426.2101315-9-quic_adisi@quicinc.com +Signed-off-by: Johannes Berg +--- + +--- a/drivers/net/wireless/ath/ath10k/debug.c ++++ b/drivers/net/wireless/ath/ath10k/debug.c +@@ -3,7 +3,7 @@ + * Copyright (c) 2005-2011 Atheros Communications Inc. + * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. + * Copyright (c) 2018, The Linux Foundation. All rights reserved. +- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. ++ * Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + + #include +@@ -1774,7 +1774,7 @@ static ssize_t ath10k_write_simulate_rad + if (!arvif->is_started) + return -EINVAL; + +- ieee80211_radar_detected(ar->hw); ++ ieee80211_radar_detected(ar->hw, NULL); + + return count; + } +--- a/drivers/net/wireless/ath/ath10k/mac.c ++++ b/drivers/net/wireless/ath/ath10k/mac.c +@@ -1437,7 +1437,7 @@ static void ath10k_recalc_radar_detectio + * by indicating that radar was detected. + */ + ath10k_warn(ar, "failed to start CAC: %d\n", ret); +- ieee80211_radar_detected(ar->hw); ++ ieee80211_radar_detected(ar->hw, NULL); + } + } + +--- a/drivers/net/wireless/ath/ath10k/wmi.c ++++ b/drivers/net/wireless/ath/ath10k/wmi.c +@@ -3990,7 +3990,7 @@ static void ath10k_radar_detected(struct + if (ar->dfs_block_radar_events) + ath10k_info(ar, "DFS Radar detected, but ignored as requested\n"); + else +- ieee80211_radar_detected(ar->hw); ++ ieee80211_radar_detected(ar->hw, NULL); + } + + static void ath10k_radar_confirmation_work(struct work_struct *work) +--- a/drivers/net/wireless/ath/ath11k/wmi.c ++++ b/drivers/net/wireless/ath/ath11k/wmi.c +@@ -8358,7 +8358,7 @@ ath11k_wmi_pdev_dfs_radar_detected_event + if (ar->dfs_block_radar_events) + ath11k_info(ab, "DFS Radar detected, but ignored as requested\n"); + else +- ieee80211_radar_detected(ar->hw); ++ ieee80211_radar_detected(ar->hw, NULL); + + exit: + rcu_read_unlock(); +--- a/drivers/net/wireless/ath/ath12k/wmi.c ++++ b/drivers/net/wireless/ath/ath12k/wmi.c +@@ -6789,7 +6789,7 @@ ath12k_wmi_pdev_dfs_radar_detected_event + if (ar->dfs_block_radar_events) + ath12k_info(ab, "DFS Radar detected, but ignored as requested\n"); + else +- ieee80211_radar_detected(ath12k_ar_to_hw(ar)); ++ ieee80211_radar_detected(ath12k_ar_to_hw(ar), NULL); + + exit: + rcu_read_unlock(); +--- a/drivers/net/wireless/ath/ath9k/dfs.c ++++ b/drivers/net/wireless/ath/ath9k/dfs.c +@@ -280,7 +280,7 @@ ath9k_dfs_process_radar_pulse(struct ath + if (!pd->add_pulse(pd, pe, NULL)) + return; + DFS_STAT_INC(sc, radar_detected); +- ieee80211_radar_detected(sc->hw); ++ ieee80211_radar_detected(sc->hw, NULL); + } + + /* +--- a/drivers/net/wireless/ath/ath9k/dfs_debug.c ++++ b/drivers/net/wireless/ath/ath9k/dfs_debug.c +@@ -116,7 +116,7 @@ static ssize_t write_file_simulate_radar + { + struct ath_softc *sc = file->private_data; + +- ieee80211_radar_detected(sc->hw); ++ ieee80211_radar_detected(sc->hw, NULL); + + return count; + } +--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c ++++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +@@ -394,7 +394,7 @@ mt7615_mcu_rx_radar_detected(struct mt76 + if (mt76_phy_dfs_state(mphy) < MT_DFS_STATE_CAC) + return; + +- ieee80211_radar_detected(mphy->hw); ++ ieee80211_radar_detected(mphy->hw, NULL); + dev->hw_pattern++; + } + +--- a/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c ++++ b/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c +@@ -630,7 +630,7 @@ static void mt76x02_dfs_tasklet(struct t + radar_detected = mt76x02_dfs_check_detection(dev); + if (radar_detected) { + /* sw detector rx radar pattern */ +- ieee80211_radar_detected(dev->mt76.hw); ++ ieee80211_radar_detected(dev->mt76.hw, NULL); + mt76x02_dfs_detector_reset(dev); + + return; +@@ -658,7 +658,7 @@ static void mt76x02_dfs_tasklet(struct t + + /* hw detector rx radar pattern */ + dfs_pd->stats[i].hw_pattern++; +- ieee80211_radar_detected(dev->mt76.hw); ++ ieee80211_radar_detected(dev->mt76.hw, NULL); + mt76x02_dfs_detector_reset(dev); + + return; +--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c ++++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +@@ -293,7 +293,7 @@ mt7915_mcu_rx_radar_detected(struct mt79 + &dev->rdd2_chandef, + GFP_ATOMIC); + else +- ieee80211_radar_detected(mphy->hw); ++ ieee80211_radar_detected(mphy->hw, NULL); + dev->hw_pattern++; + } + +--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c ++++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +@@ -371,7 +371,7 @@ mt7996_mcu_rx_radar_detected(struct mt79 + &dev->rdd2_chandef, + GFP_ATOMIC); + else +- ieee80211_radar_detected(mphy->hw); ++ ieee80211_radar_detected(mphy->hw, NULL); + dev->hw_pattern++; + } + +--- a/drivers/net/wireless/ti/wl18xx/event.c ++++ b/drivers/net/wireless/ti/wl18xx/event.c +@@ -142,7 +142,7 @@ int wl18xx_process_mailbox_events(struct + wl18xx_radar_type_decode(mbox->radar_type)); + + if (!wl->radar_debug_mode) +- ieee80211_radar_detected(wl->hw); ++ ieee80211_radar_detected(wl->hw, NULL); + } + + if (vector & PERIODIC_SCAN_REPORT_EVENT_ID) { +--- a/drivers/net/wireless/virtual/mac80211_hwsim.c ++++ b/drivers/net/wireless/virtual/mac80211_hwsim.c +@@ -1146,7 +1146,7 @@ static int hwsim_write_simulate_radar(vo + { + struct mac80211_hwsim_data *data = dat; + +- ieee80211_radar_detected(data->hw); ++ ieee80211_radar_detected(data->hw, NULL); + + return 0; + } +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -6717,8 +6717,11 @@ void ieee80211_cqm_beacon_loss_notify(st + * ieee80211_radar_detected - inform that a radar was detected + * + * @hw: pointer as obtained from ieee80211_alloc_hw() ++ * @chanctx_conf: Channel context on which radar is detected. Mandatory to ++ * pass a valid pointer during MLO. For non-MLO %NULL can be passed + */ +-void ieee80211_radar_detected(struct ieee80211_hw *hw); ++void ieee80211_radar_detected(struct ieee80211_hw *hw, ++ struct ieee80211_chanctx_conf *chanctx_conf); + + /** + * ieee80211_chswitch_done - Complete channel switch process +--- a/net/mac80211/chan.c ++++ b/net/mac80211/chan.c +@@ -681,6 +681,7 @@ ieee80211_alloc_chanctx(struct ieee80211 + ctx->mode = mode; + ctx->conf.radar_enabled = false; + ctx->conf.radio_idx = radio_idx; ++ ctx->radar_detected = false; + _ieee80211_recalc_chanctx_min_def(local, ctx, NULL, false); + + return ctx; +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -895,6 +895,8 @@ struct ieee80211_chanctx { + struct ieee80211_chan_req req; + + struct ieee80211_chanctx_conf conf; ++ ++ bool radar_detected; + }; + + struct mac80211_qos_map { +@@ -2632,7 +2634,8 @@ void ieee80211_recalc_chanctx_min_def(st + bool ieee80211_is_radar_required(struct ieee80211_local *local); + + void ieee80211_dfs_cac_timer_work(struct wiphy *wiphy, struct wiphy_work *work); +-void ieee80211_dfs_cac_cancel(struct ieee80211_local *local); ++void ieee80211_dfs_cac_cancel(struct ieee80211_local *local, ++ struct ieee80211_chanctx *chanctx); + void ieee80211_dfs_radar_detected_work(struct wiphy *wiphy, + struct wiphy_work *work); + int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata, +--- a/net/mac80211/pm.c ++++ b/net/mac80211/pm.c +@@ -32,7 +32,7 @@ int __ieee80211_suspend(struct ieee80211 + + ieee80211_scan_cancel(local); + +- ieee80211_dfs_cac_cancel(local); ++ ieee80211_dfs_cac_cancel(local, NULL); + + ieee80211_roc_purge(local, NULL); + +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c +@@ -3451,11 +3451,16 @@ u64 ieee80211_calculate_rx_timestamp(str + return ts; + } + +-void ieee80211_dfs_cac_cancel(struct ieee80211_local *local) ++/* Cancel CAC for the interfaces under the specified @local. If @ctx is ++ * also provided, only the interfaces using that ctx will be canceled. ++ */ ++void ieee80211_dfs_cac_cancel(struct ieee80211_local *local, ++ struct ieee80211_chanctx *ctx) + { + struct ieee80211_sub_if_data *sdata; + struct cfg80211_chan_def chandef; + struct ieee80211_link_data *link; ++ struct ieee80211_chanctx_conf *chanctx_conf; + unsigned int link_id; + + lockdep_assert_wiphy(local->hw.wiphy); +@@ -3468,6 +3473,11 @@ void ieee80211_dfs_cac_cancel(struct iee + if (!link) + continue; + ++ chanctx_conf = sdata_dereference(link->conf->chanctx_conf, ++ sdata); ++ if (ctx && &ctx->conf != chanctx_conf) ++ continue; ++ + wiphy_delayed_work_cancel(local->hw.wiphy, + &link->dfs_cac_timer_work); + +@@ -3488,9 +3498,8 @@ void ieee80211_dfs_radar_detected_work(s + { + struct ieee80211_local *local = + container_of(work, struct ieee80211_local, radar_detected_work); +- struct cfg80211_chan_def chandef = local->hw.conf.chandef; ++ struct cfg80211_chan_def chandef; + struct ieee80211_chanctx *ctx; +- int num_chanctx = 0; + + lockdep_assert_wiphy(local->hw.wiphy); + +@@ -3498,25 +3507,46 @@ void ieee80211_dfs_radar_detected_work(s + if (ctx->replace_state == IEEE80211_CHANCTX_REPLACES_OTHER) + continue; + +- num_chanctx++; ++ if (!ctx->radar_detected) ++ continue; ++ ++ ctx->radar_detected = false; ++ + chandef = ctx->conf.def; ++ ++ ieee80211_dfs_cac_cancel(local, ctx); ++ cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL); + } ++} + +- ieee80211_dfs_cac_cancel(local); ++static void ++ieee80211_radar_mark_chan_ctx_iterator(struct ieee80211_hw *hw, ++ struct ieee80211_chanctx_conf *chanctx_conf, ++ void *data) ++{ ++ struct ieee80211_chanctx *ctx = ++ container_of(chanctx_conf, struct ieee80211_chanctx, ++ conf); + +- if (num_chanctx > 1) +- /* XXX: multi-channel is not supported yet */ +- WARN_ON(1); +- else +- cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL); ++ if (ctx->replace_state == IEEE80211_CHANCTX_REPLACES_OTHER) ++ return; ++ ++ if (data && data != chanctx_conf) ++ return; ++ ++ ctx->radar_detected = true; + } + +-void ieee80211_radar_detected(struct ieee80211_hw *hw) ++void ieee80211_radar_detected(struct ieee80211_hw *hw, ++ struct ieee80211_chanctx_conf *chanctx_conf) + { + struct ieee80211_local *local = hw_to_local(hw); + + trace_api_radar_detected(local); + ++ ieee80211_iter_chan_contexts_atomic(hw, ieee80211_radar_mark_chan_ctx_iterator, ++ chanctx_conf); ++ + wiphy_work_queue(hw->wiphy, &local->radar_detected_work); + } + EXPORT_SYMBOL(ieee80211_radar_detected); diff --git a/package/kernel/mt76/patches/100-api_update.patch b/package/kernel/mt76/patches/100-api_update.patch index 8b528f05f72222..4cd19f65b24296 100644 --- a/package/kernel/mt76/patches/100-api_update.patch +++ b/package/kernel/mt76/patches/100-api_update.patch @@ -9,3 +9,56 @@ head = &wcid->tx_offchannel; else head = &wcid->tx_pending; +--- a/mt7615/mcu.c ++++ b/mt7615/mcu.c +@@ -394,7 +394,7 @@ mt7615_mcu_rx_radar_detected(struct mt76 + if (mt76_phy_dfs_state(mphy) < MT_DFS_STATE_CAC) + return; + +- ieee80211_radar_detected(mphy->hw); ++ ieee80211_radar_detected(mphy->hw, NULL); + dev->hw_pattern++; + } + +--- a/mt76x02_dfs.c ++++ b/mt76x02_dfs.c +@@ -630,7 +630,7 @@ static void mt76x02_dfs_tasklet(struct t + radar_detected = mt76x02_dfs_check_detection(dev); + if (radar_detected) { + /* sw detector rx radar pattern */ +- ieee80211_radar_detected(dev->mt76.hw); ++ ieee80211_radar_detected(dev->mt76.hw, NULL); + mt76x02_dfs_detector_reset(dev); + + return; +@@ -658,7 +658,7 @@ static void mt76x02_dfs_tasklet(struct t + + /* hw detector rx radar pattern */ + dfs_pd->stats[i].hw_pattern++; +- ieee80211_radar_detected(dev->mt76.hw); ++ ieee80211_radar_detected(dev->mt76.hw, NULL); + mt76x02_dfs_detector_reset(dev); + + return; +--- a/mt7915/mcu.c ++++ b/mt7915/mcu.c +@@ -297,7 +297,7 @@ mt7915_mcu_rx_radar_detected(struct mt79 + &dev->rdd2_chandef, + GFP_ATOMIC); + else +- ieee80211_radar_detected(mphy->hw); ++ ieee80211_radar_detected(mphy->hw, NULL); + dev->hw_pattern++; + } + +--- a/mt7996/mcu.c ++++ b/mt7996/mcu.c +@@ -383,7 +383,7 @@ mt7996_mcu_rx_radar_detected(struct mt79 + &dev->rdd2_chandef, + GFP_ATOMIC); + else +- ieee80211_radar_detected(mphy->hw); ++ ieee80211_radar_detected(mphy->hw, NULL); + dev->hw_pattern++; + } + diff --git a/package/kernel/mwlwifi/patches/005-mac80211_update.patch b/package/kernel/mwlwifi/patches/005-mac80211_update.patch index 54dc4db7838a7b..2ceee4732d5c34 100644 --- a/package/kernel/mwlwifi/patches/005-mac80211_update.patch +++ b/package/kernel/mwlwifi/patches/005-mac80211_update.patch @@ -68,6 +68,15 @@ sta->tdls, sta->tdls_initiator, sta->wme, +@@ -1158,7 +1158,7 @@ static ssize_t mwl_debugfs_dfs_radar_wri + struct mwl_priv *priv = (struct mwl_priv *)file->private_data; + + wiphy_info(priv->hw->wiphy, "simulate radar detected\n"); +- ieee80211_radar_detected(priv->hw); ++ ieee80211_radar_detected(priv->hw, NULL); + + return count; + } --- a/hif/fwcmd.c +++ b/hif/fwcmd.c @@ -633,11 +633,15 @@ einval: @@ -491,3 +500,32 @@ switch (format) { case TX_RATE_FORMAT_LEGACY: +--- a/hif/pcie/pcie.c ++++ b/hif/pcie/pcie.c +@@ -546,7 +546,7 @@ static irqreturn_t pcie_isr_8864(struct + + if (int_status & MACREG_A2HRIC_BIT_RADAR_DETECT) { + wiphy_info(hw->wiphy, "radar detected by firmware\n"); +- ieee80211_radar_detected(hw); ++ ieee80211_radar_detected(hw, NULL); + } + + if (int_status & MACREG_A2HRIC_BIT_CHAN_SWITCH) ieee80211_queue_work(hw, &priv->chnl_switch_handle); +@@ -593,7 +593,7 @@ static irqreturn_t pcie_isr_8997(struct + + if (int_status & MACREG_A2HRIC_BIT_RADAR_DETECT) { + wiphy_info(hw->wiphy, "radar detected by firmware\n"); +- ieee80211_radar_detected(hw); ++ ieee80211_radar_detected(hw, NULL); + } + + if (int_status & MACREG_A2HRIC_BIT_CHAN_SWITCH) +@@ -1071,7 +1071,7 @@ static irqreturn_t pcie_isr_ndp(struct i + + if (int_status & MACREG_A2HRIC_NEWDP_DFS) { + wiphy_info(hw->wiphy, "radar detected by firmware\n"); +- ieee80211_radar_detected(hw); ++ ieee80211_radar_detected(hw, NULL); + } + + if (int_status & MACREG_A2HRIC_NEWDP_CHANNEL_SWITCH) diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile index 88781469dc9f54..9c32ca500f0702 100644 --- a/package/libs/libjson-c/Makefile +++ b/package/libs/libjson-c/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=json-c -PKG_VERSION:=0.17 +PKG_VERSION:=0.18 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/ -PKG_HASH:=8df3b66597333dd365762cab2de2ff68e41e3808a04b692e696e0550648eefaa +PKG_HASH:=602cdefc1d2aab8318fc0814b7ce7d59e72514d4276ca3eff92f35f86cf1c160 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=MIT diff --git a/package/libs/libjson-c/patches/001-dont-build-docs.patch b/package/libs/libjson-c/patches/001-dont-build-docs.patch index 1de420f8b878bc..68fbc17fd578ef 100644 --- a/package/libs/libjson-c/patches/001-dont-build-docs.patch +++ b/package/libs/libjson-c/patches/001-dont-build-docs.patch @@ -1,6 +1,6 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -451,8 +451,6 @@ configure_file(json.h.cmakein ${PROJECT_ +@@ -449,8 +449,6 @@ configure_file(json.h.cmakein ${PROJECT_ include_directories(${PROJECT_SOURCE_DIR}) include_directories(${PROJECT_BINARY_DIR}) diff --git a/package/libs/libnl/Makefile b/package/libs/libnl/Makefile index 93817e5f4040f3..f8f45e0713e79f 100644 --- a/package/libs/libnl/Makefile +++ b/package/libs/libnl/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnl -PKG_VERSION:=3.9.0 +PKG_VERSION:=3.10.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/thom311/libnl/releases/download/libnl$(subst .,_,$(PKG_VERSION)) -PKG_HASH:=aed507004d728a5cf11eab48ca4bf9e6e1874444e33939b9d3dfed25018ee9bb +PKG_HASH:=49b3e2235fdb58f5910bbb3ed0de8143b71ffc220571540502eb6c2471f204f5 PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:=COPYING diff --git a/package/libs/libxml2/Makefile b/package/libs/libxml2/Makefile index 2be8026e89d841..c2a804b98f365e 100644 --- a/package/libs/libxml2/Makefile +++ b/package/libs/libxml2/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libxml2 -PKG_VERSION:=2.12.6 +PKG_VERSION:=2.13.4 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION)) -PKG_HASH:=889c593a881a3db5fdd96cc9318c87df34eb648edfc458272ad46fd607353fbb +PKG_HASH:=65d042e1c8010243e617efb02afda20b85c2160acdbfbcb5b26b80cec6515650 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile index bc2b13e42343a6..cfb4cfaeb947f2 100644 --- a/package/network/utils/ethtool/Makefile +++ b/package/network/utils/ethtool/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ethtool -PKG_VERSION:=6.6 +PKG_VERSION:=6.10 PKG_RELEASE:=1 PKG_MAINTAINER:=Felix Fietkau PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/ethtool -PKG_HASH:=833a8493cb9cd5809ab59743092d9a38742c282290800e9626407511bbcebf9e +PKG_HASH:=cc613fe8a2bcddee17a1e6e0d763c0f3ea33c7e930658d2d7f601aa65e426a1f PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index 85d9f437f63e6b..04a4df24c99045 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iproute2 -PKG_VERSION:=6.9.0 +PKG_VERSION:=6.11.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2 -PKG_HASH:=2f643d09ea11a4a2a043c92e2b469b5f73228cbf241ae806760296ed0ec413d0 +PKG_HASH:=1f795398a04aeaacd06a8f6ace2cfd913c33fa5953ca99daae83bb5c534611c3 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=iptables PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iproute2/patches/010-bridge-mst-fix-a-musl-build-issue.patch b/package/network/utils/iproute2/patches/010-bridge-mst-fix-a-musl-build-issue.patch new file mode 100644 index 00000000000000..1630415eb51e24 --- /dev/null +++ b/package/network/utils/iproute2/patches/010-bridge-mst-fix-a-musl-build-issue.patch @@ -0,0 +1,68 @@ +From 6a77abab92516e65f07f8657fc4e384c4541ce0e Mon Sep 17 00:00:00 2001 +From: Dario Binacchi +Date: Sun, 22 Sep 2024 16:50:10 +0200 +Subject: bridge: mst: fix a musl build issue + +This patch fixes a compilation error raised by the bump to version 6.11.0 +in Buildroot using musl as the C library for the cross-compilation +toolchain. + +After setting the CFLGAS + +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +IPROUTE2_CFLAGS += -D__UAPI_DEF_IN6_ADDR=0 -D__UAPI_DEF_SOCKADDR_IN6=0 \ + -D__UAPI_DEF_IPV6_MREQ=0 +endif + +to fix the following errors: + +In file included from ../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/arpa/inet.h:9, + from ../include/libnetlink.h:14, + from mst.c:10: +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:23:8: error: redefinition of 'struct in6_addr' + 23 | struct in6_addr { + | ^~~~~~~~ +In file included from ../include/uapi/linux/if_bridge.h:19, + from mst.c:7: +../include/uapi/linux/in6.h:33:8: note: originally defined here + 33 | struct in6_addr { + | ^~~~~~~~ +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:34:8: error: redefinition of 'struct sockaddr_in6' + 34 | struct sockaddr_in6 { + | ^~~~~~~~~~~~ +../include/uapi/linux/in6.h:50:8: note: originally defined here + 50 | struct sockaddr_in6 { + | ^~~~~~~~~~~~ +../../../host/mips64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:42:8: error: redefinition of 'struct ipv6_mreq' + 42 | struct ipv6_mreq { + | ^~~~~~~~~ +../include/uapi/linux/in6.h:60:8: note: originally defined here + 60 | struct ipv6_mreq { + +I got this further errors + +../include/uapi/linux/in6.h:72:25: error: field 'flr_dst' has incomplete type + 72 | struct in6_addr flr_dst; + | ^~~~~~~ +../include/uapi/linux/if_bridge.h:711:41: error: field 'ip6' has incomplete type + 711 | struct in6_addr ip6; + | ^~~ + +fixed by including the netinet/in.h header. + +Signed-off-by: Dario Binacchi +Signed-off-by: Stephen Hemminger +--- + bridge/mst.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/bridge/mst.c ++++ b/bridge/mst.c +@@ -4,6 +4,7 @@ + */ + + #include ++#include + #include + #include + diff --git a/package/network/utils/iproute2/patches/401-bridge-vlan.c-bridge-vlan.c-fix-build-with-gcc-14-on.patch b/package/network/utils/iproute2/patches/011-bridge-mst-fix-a-further-musl-build-issue.patch similarity index 57% rename from package/network/utils/iproute2/patches/401-bridge-vlan.c-bridge-vlan.c-fix-build-with-gcc-14-on.patch rename to package/network/utils/iproute2/patches/011-bridge-mst-fix-a-further-musl-build-issue.patch index a90c9fc80a3b1d..1bdab398f73740 100644 --- a/package/network/utils/iproute2/patches/401-bridge-vlan.c-bridge-vlan.c-fix-build-with-gcc-14-on.patch +++ b/package/network/utils/iproute2/patches/011-bridge-mst-fix-a-further-musl-build-issue.patch @@ -1,15 +1,11 @@ -From 53a89bfd86fff1a00cc77cabb8457a03eaa3bc7d Mon Sep 17 00:00:00 2001 -From: Gabi Falk -Date: Fri, 10 May 2024 14:36:12 +0000 -Subject: [PATCH] bridge/vlan.c: bridge/vlan.c: fix build with gcc 14 on musl - systems +From 043ef90e2fa94397eb5c85330889ca4146a6d58a Mon Sep 17 00:00:00 2001 +From: Dario Binacchi +Date: Sun, 22 Sep 2024 16:50:11 +0200 +Subject: bridge: mst: fix a further musl build issue -On glibc based systems the definition of 'struct timeval' is pulled in -with inclusion of header, but on musl based systems it -doesn't work this way. Missing definition triggers an -incompatible-pointer-types error with gcc 14 (warning on previous -versions of gcc): +This patch fixes the following build errors: +In file included from mst.c:11: ../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration 80 | _PRINT_FUNC(tv, const struct timeval *) | ^~~~~~~ @@ -28,42 +24,28 @@ versions of gcc): | ^~~~~ | | | const struct timeval * +../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC' + 80 | _PRINT_FUNC(tv, const struct timeval *) + | ^~~~~~~~~~~ +../include/json_print.h:50:42: note: expected 'const struct timeval *' but argument is of type 'const struct timeval *' + 50 | type value); \ + | ^ +../include/json_print.h:80:1: note: in expansion of macro '_PRINT_FUNC' + 80 | _PRINT_FUNC(tv, const struct timeval *) -Signed-off-by: Gabi Falk +Signed-off-by: Dario Binacchi Signed-off-by: Stephen Hemminger --- - bridge/vlan.c | 1 + - bridge/vni.c | 1 + - vdpa/vdpa.c | 1 + - 3 files changed, 3 insertions(+) + bridge/mst.c | 1 + + 1 file changed, 1 insertion(+) ---- a/bridge/vlan.c -+++ b/bridge/vlan.c +--- a/bridge/mst.c ++++ b/bridge/mst.c @@ -4,6 +4,7 @@ - #include - #include - #include + */ + + #include +#include - #include #include #include ---- a/bridge/vni.c -+++ b/bridge/vni.c -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include #include - #include - #include ---- a/vdpa/vdpa.c -+++ b/vdpa/vdpa.c -@@ -3,6 +3,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch index ee18f17d54f00e..48a4ae75196fe1 100644 --- a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch +++ b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -362,7 +362,7 @@ check_tirpc() +@@ -368,7 +368,7 @@ check_tirpc() check_mnl() { diff --git a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch index 767c968e74c289..49873f87b16e88 100644 --- a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch +++ b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -421,7 +421,7 @@ EOF +@@ -427,7 +427,7 @@ EOF check_cap() { diff --git a/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch index 011dd48f8e14f3..9e5e4330cf8707 100644 --- a/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch +++ b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -349,7 +349,7 @@ check_selinux() +@@ -355,7 +355,7 @@ check_selinux() check_tirpc() { diff --git a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch index e41be20f108f8e..38193be156bd02 100644 --- a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch +++ b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -407,14 +407,8 @@ EOF +@@ -413,14 +413,8 @@ EOF if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then echo "no" else diff --git a/package/network/utils/iproute2/patches/300-selinux-configurable.patch b/package/network/utils/iproute2/patches/300-selinux-configurable.patch index 36ecc735a74d4a..9f07d31768fdf6 100644 --- a/package/network/utils/iproute2/patches/300-selinux-configurable.patch +++ b/package/network/utils/iproute2/patches/300-selinux-configurable.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -336,7 +336,7 @@ check_libbpf() +@@ -342,7 +342,7 @@ check_libbpf() check_selinux() # SELinux is a compile time option in the ss utility { diff --git a/package/utils/mtd-utils/Makefile b/package/utils/mtd-utils/Makefile index a73f5e1eb1f1b1..046572e83b415b 100644 --- a/package/utils/mtd-utils/Makefile +++ b/package/utils/mtd-utils/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtd-utils -PKG_VERSION:=2.2.0 +PKG_VERSION:=2.2.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/ -PKG_HASH:=250d082f67375ca8451b5fcfc9a23a53ced3ebebd8312c288daf2507bbab1324 +PKG_HASH:=f7ae20b2eb79ee83441468f0b99d897024cd96ff853eea59106fb1952065c803 PKG_INSTALL:=1 diff --git a/target/linux/bcm27xx/patches-6.6/950-0028-drm-vc4_hdmi-Allow-hotplug-detect-to-be-forced.patch b/target/linux/bcm27xx/patches-6.6/950-0028-drm-vc4_hdmi-Allow-hotplug-detect-to-be-forced.patch index bcef11a2f8a1a6..95b3ec7a248de5 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0028-drm-vc4_hdmi-Allow-hotplug-detect-to-be-forced.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0028-drm-vc4_hdmi-Allow-hotplug-detect-to-be-forced.patch @@ -45,9 +45,9 @@ Signed-off-by: Dom Cobley static const char * const output_format_str[] = { [VC4_HDMI_OUTPUT_RGB] = "RGB", [VC4_HDMI_OUTPUT_YUV420] = "YUV 4:2:0", -@@ -472,7 +478,9 @@ static int vc4_hdmi_connector_detect_ctx - - WARN_ON(pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev)); +@@ -478,7 +484,9 @@ static int vc4_hdmi_connector_detect_ctx + return connector_status_unknown; + } - if (vc4_hdmi->hpd_gpio) { + if (force_hotplug & BIT(vc4_hdmi->encoder.type - VC4_ENCODER_TYPE_HDMI0)) diff --git a/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch b/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch index ab66e4f6e5aecc..0baf803edf8d5f 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch @@ -30,7 +30,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2394,7 +2394,7 @@ static int vc4_hdmi_audio_startup(struct +@@ -2400,7 +2400,7 @@ static int vc4_hdmi_audio_startup(struct } if (!vc4_hdmi_audio_can_stream(vc4_hdmi)) { diff --git a/target/linux/bcm27xx/patches-6.6/950-0035-drm-vc4-Calculate-bpc-based-on-max_requested_bpc.patch b/target/linux/bcm27xx/patches-6.6/950-0035-drm-vc4-Calculate-bpc-based-on-max_requested_bpc.patch index cdd85524389ab1..f0fb3eb7d47eee 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0035-drm-vc4-Calculate-bpc-based-on-max_requested_bpc.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0035-drm-vc4-Calculate-bpc-based-on-max_requested_bpc.patch @@ -18,7 +18,7 @@ Signed-off-by: Matthias Reichl --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2126,7 +2126,7 @@ vc4_hdmi_encoder_compute_config(const st +@@ -2132,7 +2132,7 @@ vc4_hdmi_encoder_compute_config(const st { struct drm_device *dev = vc4_hdmi->connector.dev; struct drm_connector_state *conn_state = &vc4_state->base; diff --git a/target/linux/bcm27xx/patches-6.6/950-0037-drm-vc4-drop-unnecessary-and-harmful-HDMI-RGB-format.patch b/target/linux/bcm27xx/patches-6.6/950-0037-drm-vc4-drop-unnecessary-and-harmful-HDMI-RGB-format.patch index b0b3080b7ffbc8..b9fba16f695737 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0037-drm-vc4-drop-unnecessary-and-harmful-HDMI-RGB-format.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0037-drm-vc4-drop-unnecessary-and-harmful-HDMI-RGB-format.patch @@ -25,7 +25,7 @@ Signed-off-by: Matthias Reichl --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1952,9 +1952,6 @@ vc4_hdmi_sink_supports_format_bpc(const +@@ -1958,9 +1958,6 @@ vc4_hdmi_sink_supports_format_bpc(const case VC4_HDMI_OUTPUT_RGB: drm_dbg(dev, "RGB Format, checking the constraints.\n"); diff --git a/target/linux/bcm27xx/patches-6.6/950-0038-drm-vc4-Limit-max_bpc-to-8-on-Pi0-3.patch b/target/linux/bcm27xx/patches-6.6/950-0038-drm-vc4-Limit-max_bpc-to-8-on-Pi0-3.patch index 96abd64f23f550..2b86f419529670 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0038-drm-vc4-Limit-max_bpc-to-8-on-Pi0-3.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0038-drm-vc4-Limit-max_bpc-to-8-on-Pi0-3.patch @@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -756,7 +756,6 @@ static int vc4_hdmi_connector_init(struc +@@ -762,7 +762,6 @@ static int vc4_hdmi_connector_init(struc drm_connector_attach_colorspace_property(connector); drm_connector_attach_tv_margin_properties(connector); @@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson connector->polled = (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT); -@@ -765,8 +764,12 @@ static int vc4_hdmi_connector_init(struc +@@ -771,8 +770,12 @@ static int vc4_hdmi_connector_init(struc connector->doublescan_allowed = 0; connector->stereo_allowed = 1; diff --git a/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch b/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch index cbaf6ac1e22f26..9470fb96943033 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch @@ -14,7 +14,7 @@ We don't agree with upstream revert so undo it. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -486,8 +486,10 @@ static void xhci_pci_quirks(struct devic +@@ -489,8 +489,10 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x3432) xhci->quirks |= XHCI_BROKEN_STREAMS; diff --git a/target/linux/bcm27xx/patches-6.6/950-0076-bcm2835-rng-Avoid-initialising-if-already-enabled.patch b/target/linux/bcm27xx/patches-6.6/950-0076-bcm2835-rng-Avoid-initialising-if-already-enabled.patch index dff9974049e49c..ae55925535626d 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0076-bcm2835-rng-Avoid-initialising-if-already-enabled.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0076-bcm2835-rng-Avoid-initialising-if-already-enabled.patch @@ -10,7 +10,7 @@ Avoids the 0x40000 cycles of warmup again if firmware has already used it --- a/drivers/char/hw_random/bcm2835-rng.c +++ b/drivers/char/hw_random/bcm2835-rng.c -@@ -105,8 +105,10 @@ static int bcm2835_rng_init(struct hwrng +@@ -107,8 +107,10 @@ static int bcm2835_rng_init(struct hwrng } /* set warm-up count & enable */ diff --git a/target/linux/bcm27xx/patches-6.6/950-0468-drm-vc4-hdmi-Increase-MAI-fifo-dreq-threshold.patch b/target/linux/bcm27xx/patches-6.6/950-0468-drm-vc4-hdmi-Increase-MAI-fifo-dreq-threshold.patch index f618bbeb8d5b30..a0c1eba931041b 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0468-drm-vc4-hdmi-Increase-MAI-fifo-dreq-threshold.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0468-drm-vc4-hdmi-Increase-MAI-fifo-dreq-threshold.patch @@ -16,7 +16,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2521,6 +2521,7 @@ static int vc4_hdmi_audio_prepare(struct +@@ -2527,6 +2527,7 @@ static int vc4_hdmi_audio_prepare(struct { struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); struct drm_device *drm = vc4_hdmi->connector.dev; @@ -24,7 +24,7 @@ Signed-off-by: Dom Cobley struct drm_encoder *encoder = &vc4_hdmi->encoder.base; unsigned int sample_rate = params->sample_rate; unsigned int channels = params->channels; -@@ -2579,11 +2580,18 @@ static int vc4_hdmi_audio_prepare(struct +@@ -2585,11 +2586,18 @@ static int vc4_hdmi_audio_prepare(struct VC4_HDMI_AUDIO_PACKET_CEA_MASK); /* Set the MAI threshold */ diff --git a/target/linux/bcm27xx/patches-6.6/950-0481-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-6.6/950-0481-xhci-Use-more-event-ring-segment-table-entries.patch index f9fa454aeb1287..27a43828dd4698 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0481-xhci-Use-more-event-ring-segment-table-entries.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0481-xhci-Use-more-event-ring-segment-table-entries.patch @@ -52,7 +52,7 @@ Signed-off-by: Jonathan Bell erst_base = xhci_read_64(xhci, &ir->ir_set->erst_base); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1680,8 +1680,9 @@ struct urb_priv { +@@ -1681,8 +1681,9 @@ struct urb_priv { * Each segment table entry is 4*32bits long. 1K seems like an ok size: * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table, * meaning 64 ring segments. diff --git a/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index 65d04a01ee7a08..948610d576365b 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0482-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -24,7 +24,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -489,6 +489,7 @@ static void xhci_pci_quirks(struct devic +@@ -492,6 +492,7 @@ static void xhci_pci_quirks(struct devic if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) { xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; @@ -52,9 +52,9 @@ Signed-off-by: Jonathan Bell addr = xhci_trb_virt_to_dma(new_seg, new_deq); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1915,6 +1915,9 @@ struct xhci_hcd { - #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) - #define XHCI_ZHAOXIN_HOST BIT_ULL(46) +@@ -1918,6 +1918,9 @@ struct xhci_hcd { + #define XHCI_WRITE_64_HI_LO BIT_ULL(47) + #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48) +/* Downstream VLI fixes */ +#define XHCI_AVOID_DQ_ON_LINK BIT_ULL(56) diff --git a/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch b/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch index fa7a10e31633c8..db805590694682 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -490,6 +490,7 @@ static void xhci_pci_quirks(struct devic +@@ -493,6 +493,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; diff --git a/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch b/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch index ef0ef47969349b..9af7fc81764f0b 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch @@ -90,7 +90,7 @@ Signed-off-by: Jonathan Bell /* Allow 3 retries for everything but isoc, set CErr = 3 */ --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -491,6 +491,7 @@ static void xhci_pci_quirks(struct devic +@@ -494,6 +494,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; @@ -100,7 +100,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1917,6 +1917,7 @@ struct xhci_hcd { +@@ -1920,6 +1920,7 @@ struct xhci_hcd { /* Downstream VLI fixes */ #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(56) diff --git a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch index e1846dc8f51da2..45cf1b57255a82 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch @@ -47,7 +47,7 @@ Signed-off-by: Jonathan Bell /* Device for a quirk */ #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73 #define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000 -@@ -291,6 +293,16 @@ static int xhci_pci_reinit(struct xhci_h +@@ -294,6 +296,16 @@ static int xhci_pci_reinit(struct xhci_h return 0; } @@ -64,7 +64,7 @@ Signed-off-by: Jonathan Bell static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) { struct pci_dev *pdev = to_pci_dev(dev); -@@ -492,6 +504,8 @@ static void xhci_pci_quirks(struct devic +@@ -495,6 +507,8 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; xhci->quirks |= XHCI_VLI_SS_BULK_OUT_BUG; @@ -75,7 +75,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3657,6 +3657,48 @@ static int xhci_align_td(struct xhci_hcd +@@ -3671,6 +3671,48 @@ static int xhci_align_td(struct xhci_hcd return 1; } @@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell /* This is very similar to what ehci-q.c qtd_fill() does */ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, int slot_id, unsigned int ep_index) -@@ -3813,6 +3855,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3827,6 +3869,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * } check_trb_math(urb, enqd_len); @@ -133,7 +133,7 @@ Signed-off-by: Jonathan Bell giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, start_cycle, start_trb); return 0; -@@ -3948,6 +3992,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3962,6 +4006,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * /* Event on completion */ field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state); @@ -144,7 +144,7 @@ Signed-off-by: Jonathan Bell return 0; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1918,6 +1918,7 @@ struct xhci_hcd { +@@ -1921,6 +1921,7 @@ struct xhci_hcd { /* Downstream VLI fixes */ #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(56) #define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(57) diff --git a/target/linux/bcm27xx/patches-6.6/950-0578-drm-vc4-hdmi-Enable-the-audio-clock.patch b/target/linux/bcm27xx/patches-6.6/950-0578-drm-vc4-hdmi-Enable-the-audio-clock.patch index c7d6fed16e7e99..79d040070f068d 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0578-drm-vc4-hdmi-Enable-the-audio-clock.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0578-drm-vc4-hdmi-Enable-the-audio-clock.patch @@ -18,7 +18,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -3589,6 +3589,7 @@ static int vc4_hdmi_runtime_suspend(stru +@@ -3595,6 +3595,7 @@ static int vc4_hdmi_runtime_suspend(stru { struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev); @@ -26,7 +26,7 @@ Signed-off-by: Maxime Ripard clk_disable_unprepare(vc4_hdmi->hsm_clock); return 0; -@@ -3621,6 +3622,10 @@ static int vc4_hdmi_runtime_resume(struc +@@ -3627,6 +3628,10 @@ static int vc4_hdmi_runtime_resume(struc goto err_disable_clk; } diff --git a/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch b/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch index fe6ecf9293fe57..ce5361905be915 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch @@ -470,7 +470,7 @@ Signed-off-by: Maxime Ripard switch (args->madv) { --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2580,7 +2580,7 @@ static int vc4_hdmi_audio_prepare(struct +@@ -2586,7 +2586,7 @@ static int vc4_hdmi_audio_prepare(struct VC4_HDMI_AUDIO_PACKET_CEA_MASK); /* Set the MAI threshold */ diff --git a/target/linux/bcm27xx/patches-6.6/950-0601-drm-vc4-hvs-Remove-ABORT_ON_EMPTY-flag.patch b/target/linux/bcm27xx/patches-6.6/950-0601-drm-vc4-hvs-Remove-ABORT_ON_EMPTY-flag.patch index 2ed6d7400b63bf..12a37f1d95a760 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0601-drm-vc4-hvs-Remove-ABORT_ON_EMPTY-flag.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0601-drm-vc4-hvs-Remove-ABORT_ON_EMPTY-flag.patch @@ -30,7 +30,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1862,6 +1862,7 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1868,6 +1868,7 @@ static void vc4_hdmi_encoder_post_crtc_e VC4_HD_VID_CTL_CLRRGB | VC4_HD_VID_CTL_UNDERFLOW_ENABLE | VC4_HD_VID_CTL_FRAME_COUNTER_RESET | diff --git a/target/linux/bcm27xx/patches-6.6/950-0612-drm-vc4-hdmi-Add-support-for-BCM2712-HDMI-controller.patch b/target/linux/bcm27xx/patches-6.6/950-0612-drm-vc4-hdmi-Add-support-for-BCM2712-HDMI-controller.patch index d34ead0f5eb534..20b24b1c443e79 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0612-drm-vc4-hdmi-Add-support-for-BCM2712-HDMI-controller.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0612-drm-vc4-hdmi-Add-support-for-BCM2712-HDMI-controller.patch @@ -20,7 +20,7 @@ Signed-off-by: Maxime Ripard --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1102,6 +1102,7 @@ static void vc4_hdmi_encoder_post_crtc_d +@@ -1108,6 +1108,7 @@ static void vc4_hdmi_encoder_post_crtc_d { struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); struct drm_device *drm = vc4_hdmi->connector.dev; @@ -28,7 +28,7 @@ Signed-off-by: Maxime Ripard unsigned long flags; int idx; -@@ -1118,14 +1119,25 @@ static void vc4_hdmi_encoder_post_crtc_d +@@ -1124,14 +1125,25 @@ static void vc4_hdmi_encoder_post_crtc_d HDMI_WRITE(HDMI_VID_CTL, HDMI_READ(HDMI_VID_CTL) | VC4_HD_VID_CTL_CLRRGB); @@ -58,7 +58,7 @@ Signed-off-by: Maxime Ripard vc4_hdmi_disable_scrambling(encoder); -@@ -1753,7 +1765,6 @@ static void vc4_hdmi_encoder_pre_crtc_co +@@ -1759,7 +1771,6 @@ static void vc4_hdmi_encoder_pre_crtc_co goto err_put_runtime_pm; } @@ -66,7 +66,7 @@ Signed-off-by: Maxime Ripard vc4_hdmi_cec_update_clk_div(vc4_hdmi); if (tmds_char_rate > 297000000) -@@ -1858,6 +1869,7 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1864,6 +1875,7 @@ static void vc4_hdmi_encoder_post_crtc_e spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); HDMI_WRITE(HDMI_VID_CTL, @@ -74,7 +74,7 @@ Signed-off-by: Maxime Ripard VC4_HD_VID_CTL_ENABLE | VC4_HD_VID_CTL_CLRRGB | VC4_HD_VID_CTL_UNDERFLOW_ENABLE | -@@ -3751,7 +3763,9 @@ static int vc4_hdmi_bind(struct device * +@@ -3757,7 +3769,9 @@ static int vc4_hdmi_bind(struct device * return ret; if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") || @@ -85,7 +85,7 @@ Signed-off-by: Maxime Ripard HDMI_READ(HDMI_VID_CTL) & VC4_HD_VID_CTL_ENABLE) { clk_prepare_enable(vc4_hdmi->pixel_clock); clk_prepare_enable(vc4_hdmi->hsm_clock); -@@ -3885,10 +3899,66 @@ static const struct vc4_hdmi_variant bcm +@@ -3891,10 +3905,66 @@ static const struct vc4_hdmi_variant bcm .hp_detect = vc5_hdmi_hp_detect, }; diff --git a/target/linux/bcm27xx/patches-6.6/950-0713-drm-vc4-crtc-Support-odd-horizontal-timings-on-BCM27.patch b/target/linux/bcm27xx/patches-6.6/950-0713-drm-vc4-crtc-Support-odd-horizontal-timings-on-BCM27.patch index be9fce689b3cca..26d2e50d03a0f3 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0713-drm-vc4-crtc-Support-odd-horizontal-timings-on-BCM27.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0713-drm-vc4-crtc-Support-odd-horizontal-timings-on-BCM27.patch @@ -75,7 +75,7 @@ Signed-off-by: Dom Cobley }, --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -3912,7 +3912,7 @@ static const struct vc4_hdmi_variant bcm +@@ -3918,7 +3918,7 @@ static const struct vc4_hdmi_variant bcm PHY_LANE_2, PHY_LANE_CK, }, @@ -84,7 +84,7 @@ Signed-off-by: Dom Cobley .external_irq_controller = true, .init_resources = vc5_hdmi_init_resources, -@@ -3939,7 +3939,7 @@ static const struct vc4_hdmi_variant bcm +@@ -3945,7 +3945,7 @@ static const struct vc4_hdmi_variant bcm PHY_LANE_2, PHY_LANE_CK, }, diff --git a/target/linux/bcm27xx/patches-6.6/950-0831-vc4-hdmi-Update-MAI_THR-for-D0.patch b/target/linux/bcm27xx/patches-6.6/950-0831-vc4-hdmi-Update-MAI_THR-for-D0.patch index c8d41311ada9c3..eaf2cb09516f38 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0831-vc4-hdmi-Update-MAI_THR-for-D0.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0831-vc4-hdmi-Update-MAI_THR-for-D0.patch @@ -14,7 +14,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2597,7 +2597,13 @@ static int vc4_hdmi_audio_prepare(struct +@@ -2603,7 +2603,13 @@ static int vc4_hdmi_audio_prepare(struct VC4_HDMI_AUDIO_PACKET_CEA_MASK); /* Set the MAI threshold */ diff --git a/target/linux/bcm27xx/patches-6.6/950-0930-vc4-Add-jack-detection-to-HDMI-audio-driver.patch b/target/linux/bcm27xx/patches-6.6/950-0930-vc4-Add-jack-detection-to-HDMI-audio-driver.patch index 465ae34ed7623b..325f0d61243743 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0930-vc4-Add-jack-detection-to-HDMI-audio-driver.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0930-vc4-Add-jack-detection-to-HDMI-audio-driver.patch @@ -58,7 +58,7 @@ Signed-off-by: David Turner if (!edid) return; -@@ -2691,8 +2705,23 @@ static int vc4_hdmi_audio_get_eld(struct +@@ -2697,8 +2711,23 @@ static int vc4_hdmi_audio_get_eld(struct return 0; } @@ -82,7 +82,7 @@ Signed-off-by: David Turner .prepare = vc4_hdmi_audio_prepare, .audio_shutdown = vc4_hdmi_audio_shutdown, .audio_startup = vc4_hdmi_audio_startup, -@@ -2712,6 +2741,22 @@ static void vc4_hdmi_audio_codec_release +@@ -2718,6 +2747,22 @@ static void vc4_hdmi_audio_codec_release vc4_hdmi->audio.codec_pdev = NULL; } @@ -105,7 +105,7 @@ Signed-off-by: David Turner static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi) { const struct vc4_hdmi_register *mai_data = -@@ -2841,6 +2886,8 @@ static int vc4_hdmi_audio_init(struct vc +@@ -2847,6 +2892,8 @@ static int vc4_hdmi_audio_init(struct vc dai_link->codecs->name = dev_name(&codec_pdev->dev); dai_link->platforms->name = dev_name(dev); @@ -114,7 +114,7 @@ Signed-off-by: David Turner card->dai_link = dai_link; card->num_links = 1; card->name = vc4_hdmi->variant->card_name; -@@ -3701,6 +3748,8 @@ static int vc4_hdmi_bind(struct device * +@@ -3707,6 +3754,8 @@ static int vc4_hdmi_bind(struct device * if (ret) return ret; @@ -123,7 +123,7 @@ Signed-off-by: David Turner spin_lock_init(&vc4_hdmi->hw_lock); INIT_DELAYED_WORK(&vc4_hdmi->scrambling_work, vc4_hdmi_scrambling_wq); -@@ -3813,8 +3862,16 @@ err_put_runtime_pm: +@@ -3819,8 +3868,16 @@ err_put_runtime_pm: return ret; } diff --git a/target/linux/bcm27xx/patches-6.6/950-1049-vc4-hdmi-Ignore-hotplug-interrupt-with-force_hotplug.patch b/target/linux/bcm27xx/patches-6.6/950-1049-vc4-hdmi-Ignore-hotplug-interrupt-with-force_hotplug.patch index 0aa56916b26efd..43226876434670 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1049-vc4-hdmi-Ignore-hotplug-interrupt-with-force_hotplug.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1049-vc4-hdmi-Ignore-hotplug-interrupt-with-force_hotplug.patch @@ -31,7 +31,7 @@ Signed-off-by: Dom Cobley --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2917,7 +2917,7 @@ static irqreturn_t vc4_hdmi_hpd_irq_thre +@@ -2923,7 +2923,7 @@ static irqreturn_t vc4_hdmi_hpd_irq_thre struct drm_connector *connector = &vc4_hdmi->connector; struct drm_device *dev = connector->dev; diff --git a/target/linux/bcm27xx/patches-6.6/950-1109-fix-Hsync-and-Vsync-polarity-can-t-change-from-negat.patch b/target/linux/bcm27xx/patches-6.6/950-1109-fix-Hsync-and-Vsync-polarity-can-t-change-from-negat.patch index c680279eabcff5..a55f6bab529fc1 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1109-fix-Hsync-and-Vsync-polarity-can-t-change-from-negat.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1109-fix-Hsync-and-Vsync-polarity-can-t-change-from-negat.patch @@ -20,7 +20,7 @@ Signed-off-by: Michiel Vanbiervliet --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -1883,14 +1883,15 @@ static void vc4_hdmi_encoder_post_crtc_e +@@ -1889,14 +1889,15 @@ static void vc4_hdmi_encoder_post_crtc_e spin_lock_irqsave(&vc4_hdmi->hw_lock, flags); HDMI_WRITE(HDMI_VID_CTL, diff --git a/target/linux/bcm27xx/patches-6.6/950-1117-drm-vc4-hdmi-Add-property-to-allow-manual-config-of-.patch b/target/linux/bcm27xx/patches-6.6/950-1117-drm-vc4-hdmi-Add-property-to-allow-manual-config-of-.patch index e8d0224ab1a46f..01437fa6d29f9c 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1117-drm-vc4-hdmi-Add-property-to-allow-manual-config-of-.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1117-drm-vc4-hdmi-Add-property-to-allow-manual-config-of-.patch @@ -20,7 +20,7 @@ Signed-off-by: Dave Stevenson --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -599,6 +599,7 @@ static int vc4_hdmi_connector_atomic_che +@@ -605,6 +605,7 @@ static int vc4_hdmi_connector_atomic_che if (old_state->colorspace != new_state->colorspace || old_vc4_state->broadcast_rgb != new_vc4_state->broadcast_rgb || @@ -28,7 +28,7 @@ Signed-off-by: Dave Stevenson !drm_connector_atomic_hdr_metadata_equal(old_state, new_state)) { struct drm_crtc_state *crtc_state; -@@ -625,6 +626,8 @@ static int vc4_hdmi_connector_get_proper +@@ -631,6 +632,8 @@ static int vc4_hdmi_connector_get_proper if (property == vc4_hdmi->broadcast_rgb_property) { *val = vc4_conn_state->broadcast_rgb; @@ -37,7 +37,7 @@ Signed-off-by: Dave Stevenson } else { drm_dbg(drm, "Unknown property [PROP:%d:%s]\n", property->base.id, property->name); -@@ -648,6 +651,9 @@ static int vc4_hdmi_connector_set_proper +@@ -654,6 +657,9 @@ static int vc4_hdmi_connector_set_proper if (property == vc4_hdmi->broadcast_rgb_property) { vc4_conn_state->broadcast_rgb = val; return 0; @@ -47,7 +47,7 @@ Signed-off-by: Dave Stevenson } drm_dbg(drm, "Unknown property [PROP:%d:%s]\n", -@@ -692,6 +698,7 @@ vc4_hdmi_connector_duplicate_state(struc +@@ -698,6 +704,7 @@ vc4_hdmi_connector_duplicate_state(struc new_state->tmds_char_rate = vc4_state->tmds_char_rate; new_state->output_bpc = vc4_state->output_bpc; new_state->output_format = vc4_state->output_format; @@ -55,7 +55,7 @@ Signed-off-by: Dave Stevenson new_state->broadcast_rgb = vc4_state->broadcast_rgb; __drm_atomic_helper_connector_duplicate_state(connector, &new_state->base); -@@ -740,6 +747,33 @@ vc4_hdmi_attach_broadcast_rgb_property(s +@@ -746,6 +753,33 @@ vc4_hdmi_attach_broadcast_rgb_property(s VC4_HDMI_BROADCAST_RGB_AUTO); } @@ -89,7 +89,7 @@ Signed-off-by: Dave Stevenson static int vc4_hdmi_connector_init(struct drm_device *dev, struct vc4_hdmi *vc4_hdmi) { -@@ -790,6 +824,7 @@ static int vc4_hdmi_connector_init(struc +@@ -796,6 +830,7 @@ static int vc4_hdmi_connector_init(struc } vc4_hdmi_attach_broadcast_rgb_property(dev, vc4_hdmi); @@ -97,7 +97,7 @@ Signed-off-by: Dave Stevenson drm_connector_attach_encoder(connector, encoder); -@@ -1960,6 +1995,10 @@ static void vc4_hdmi_encoder_atomic_mode +@@ -1966,6 +2001,10 @@ static void vc4_hdmi_encoder_atomic_mode &crtc_state->adjusted_mode); vc4_hdmi->output_bpc = vc4_state->output_bpc; vc4_hdmi->output_format = vc4_state->output_format; @@ -108,7 +108,7 @@ Signed-off-by: Dave Stevenson mutex_unlock(&vc4_hdmi->mutex); } -@@ -2118,6 +2157,26 @@ vc4_hdmi_encoder_compute_format(const st +@@ -2124,6 +2163,26 @@ vc4_hdmi_encoder_compute_format(const st const struct drm_display_info *info = &connector->display_info; unsigned int format; diff --git a/target/linux/bcm27xx/patches-6.6/950-1127-drm-vc4-Use-phys-addresses-for-slave-DMA-config.patch b/target/linux/bcm27xx/patches-6.6/950-1127-drm-vc4-Use-phys-addresses-for-slave-DMA-config.patch index 119a90ae126b79..32b2afb68dae4c 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1127-drm-vc4-Use-phys-addresses-for-slave-DMA-config.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1127-drm-vc4-Use-phys-addresses-for-slave-DMA-config.patch @@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2825,7 +2825,7 @@ static int vc4_hdmi_audio_init(struct vc +@@ -2831,7 +2831,7 @@ static int vc4_hdmi_audio_init(struct vc struct snd_soc_card *card = &vc4_hdmi->audio.card; struct device *dev = &vc4_hdmi->pdev->dev; struct platform_device *codec_pdev; @@ -22,7 +22,7 @@ Signed-off-by: Phil Elwell int index, len; int ret; -@@ -2861,22 +2861,18 @@ static int vc4_hdmi_audio_init(struct vc +@@ -2867,22 +2867,18 @@ static int vc4_hdmi_audio_init(struct vc } /* diff --git a/target/linux/bcm27xx/patches-6.6/950-1199-drm-vc4-Disable-the-2pixel-clock-odd-timings-workaro.patch b/target/linux/bcm27xx/patches-6.6/950-1199-drm-vc4-Disable-the-2pixel-clock-odd-timings-workaro.patch index 4c429e284d417a..78806c2b155bd7 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1199-drm-vc4-Disable-the-2pixel-clock-odd-timings-workaro.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1199-drm-vc4-Disable-the-2pixel-clock-odd-timings-workaro.patch @@ -146,7 +146,7 @@ Signed-off-by: Dave Stevenson }; --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c -@@ -2263,7 +2263,9 @@ static int vc4_hdmi_encoder_atomic_check +@@ -2269,7 +2269,9 @@ static int vc4_hdmi_encoder_atomic_check unsigned long long tmds_bit_rate; int ret; @@ -157,7 +157,7 @@ Signed-off-by: Dave Stevenson if (mode->flags & DRM_MODE_FLAG_DBLCLK) { /* Only try to fixup DBLCLK modes to get 480i and 576i * working. -@@ -3974,6 +3976,7 @@ static const struct vc4_hdmi_variant bcm +@@ -3980,6 +3982,7 @@ static const struct vc4_hdmi_variant bcm PHY_LANE_CK, }, .unsupported_odd_h_timings = true, @@ -165,7 +165,7 @@ Signed-off-by: Dave Stevenson .external_irq_controller = true, .init_resources = vc5_hdmi_init_resources, -@@ -4003,6 +4006,7 @@ static const struct vc4_hdmi_variant bcm +@@ -4009,6 +4012,7 @@ static const struct vc4_hdmi_variant bcm PHY_LANE_2, }, .unsupported_odd_h_timings = true, @@ -173,7 +173,7 @@ Signed-off-by: Dave Stevenson .external_irq_controller = true, .init_resources = vc5_hdmi_init_resources, -@@ -4032,6 +4036,7 @@ static const struct vc4_hdmi_variant bcm +@@ -4038,6 +4042,7 @@ static const struct vc4_hdmi_variant bcm PHY_LANE_CK, }, .unsupported_odd_h_timings = false, @@ -181,7 +181,7 @@ Signed-off-by: Dave Stevenson .external_irq_controller = true, .init_resources = vc5_hdmi_init_resources, -@@ -4059,6 +4064,7 @@ static const struct vc4_hdmi_variant bcm +@@ -4065,6 +4070,7 @@ static const struct vc4_hdmi_variant bcm PHY_LANE_CK, }, .unsupported_odd_h_timings = false, diff --git a/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index eb6317a2d130a4..efcda986796d27 100644 --- a/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -103,11 +103,11 @@ it on BCM4708 family. if (xhci->quirks & XHCI_NEC_HOST) --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1913,6 +1913,7 @@ struct xhci_hcd { - #define XHCI_RESET_TO_DEFAULT BIT_ULL(44) - #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) +@@ -1916,6 +1916,7 @@ struct xhci_hcd { #define XHCI_ZHAOXIN_HOST BIT_ULL(46) -+#define XHCI_FAKE_DOORBELL BIT_ULL(47) + #define XHCI_WRITE_64_HI_LO BIT_ULL(47) + #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48) ++#define XHCI_FAKE_DOORBELL BIT_ULL(49) unsigned int num_active_eps; unsigned int limit_active_eps; diff --git a/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch b/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch index 65aa5449ec6068..63f135e3935395 100644 --- a/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch +++ b/target/linux/generic/backport-6.6/780-08-v6.9-r8169-add-support-for-RTL8126A.patch @@ -332,7 +332,7 @@ Signed-off-by: David S. Miller default: --- a/drivers/net/ethernet/realtek/r8169_phy_config.c +++ b/drivers/net/ethernet/realtek/r8169_phy_config.c -@@ -1102,6 +1102,12 @@ static void rtl8125b_hw_phy_config(struc +@@ -1104,6 +1104,12 @@ static void rtl8125b_hw_phy_config(struc rtl8125b_config_eee_phy(phydev); } @@ -345,7 +345,7 @@ Signed-off-by: David S. Miller void r8169_hw_phy_config(struct rtl8169_private *tp, struct phy_device *phydev, enum mac_version ver) { -@@ -1152,6 +1158,7 @@ void r8169_hw_phy_config(struct rtl8169_ +@@ -1154,6 +1160,7 @@ void r8169_hw_phy_config(struct rtl8169_ [RTL_GIGA_MAC_VER_53] = rtl8117_hw_phy_config, [RTL_GIGA_MAC_VER_61] = rtl8125a_2_hw_phy_config, [RTL_GIGA_MAC_VER_63] = rtl8125b_hw_phy_config, diff --git a/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch b/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch index a8ba1a57194f8c..d15edf85e1a3a8 100644 --- a/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch +++ b/target/linux/generic/backport-6.6/780-22-v6.12-r8169-add-support-for-RTL8126A-rev.b.patch @@ -235,7 +235,7 @@ Signed-off-by: Jakub Kicinski default: --- a/drivers/net/ethernet/realtek/r8169_phy_config.c +++ b/drivers/net/ethernet/realtek/r8169_phy_config.c -@@ -1159,6 +1159,7 @@ void r8169_hw_phy_config(struct rtl8169_ +@@ -1161,6 +1161,7 @@ void r8169_hw_phy_config(struct rtl8169_ [RTL_GIGA_MAC_VER_61] = rtl8125a_2_hw_phy_config, [RTL_GIGA_MAC_VER_63] = rtl8125b_hw_phy_config, [RTL_GIGA_MAC_VER_65] = rtl8126a_hw_phy_config, diff --git a/target/linux/generic/backport-6.6/780-24-v6.12-r8169-disable-ALDPS-per-default-for-RTL8125.patch b/target/linux/generic/backport-6.6/780-24-v6.12-r8169-disable-ALDPS-per-default-for-RTL8125.patch deleted file mode 100644 index db37c484cff03a..00000000000000 --- a/target/linux/generic/backport-6.6/780-24-v6.12-r8169-disable-ALDPS-per-default-for-RTL8125.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b9c7ac4fe22c608acf6153a3329df2b6b6cd416c Mon Sep 17 00:00:00 2001 -From: Heiner Kallweit -Date: Wed, 11 Sep 2024 15:51:11 +0200 -Subject: [PATCH 45/47] r8169: disable ALDPS per default for RTL8125 - -En-Wei reported that traffic breaks if cable is unplugged for more -than 3s and then re-plugged. This was supposed to be fixed by -621735f59064 ("r8169: fix rare issue with broken rx after link-down on -RTL8125"). But apparently this didn't fix the issue for everybody. -The 3s threshold rang a bell, as this is the delay after which ALDPS -kicks in. And indeed disabling ALDPS fixes the issue for this user. -Maybe this fixes the issue in general. In a follow-up step we could -remove the first fix attempt and see whether anybody complains. - -Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125") -Tested-by: En-Wei WU -Signed-off-by: Heiner Kallweit -Link: https://patch.msgid.link/778b9d86-05c4-4856-be59-cde4487b9e52@gmail.com -Signed-off-by: Jakub Kicinski ---- - drivers/net/ethernet/realtek/r8169_phy_config.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/net/ethernet/realtek/r8169_phy_config.c -+++ b/drivers/net/ethernet/realtek/r8169_phy_config.c -@@ -1060,6 +1060,7 @@ static void rtl8125a_2_hw_phy_config(str - phy_modify_paged(phydev, 0xa86, 0x15, 0x0001, 0x0000); - rtl8168g_enable_gphy_10m(phydev); - -+ rtl8168g_disable_aldps(phydev); - rtl8125a_config_eee_phy(phydev); - } - -@@ -1099,6 +1100,7 @@ static void rtl8125b_hw_phy_config(struc - phy_modify_paged(phydev, 0xbf8, 0x12, 0xe000, 0xa000); - - rtl8125_legacy_force_mode(phydev); -+ rtl8168g_disable_aldps(phydev); - rtl8125b_config_eee_phy(phydev); - } - diff --git a/target/linux/generic/backport-6.6/851-v6.8-bus-mhi-host-pci_generic-Add-SDX75-based-modem-suppo.patch b/target/linux/generic/backport-6.6/851-v6.8-bus-mhi-host-pci_generic-Add-SDX75-based-modem-suppo.patch index d0f7df5007e70b..6a09e61974944a 100644 --- a/target/linux/generic/backport-6.6/851-v6.8-bus-mhi-host-pci_generic-Add-SDX75-based-modem-suppo.patch +++ b/target/linux/generic/backport-6.6/851-v6.8-bus-mhi-host-pci_generic-Add-SDX75-based-modem-suppo.patch @@ -51,8 +51,8 @@ Signed-off-by: Manivannan Sadhasivam static const struct mhi_pci_dev_info mhi_qcom_sdx65_info = { .name = "qcom-sdx65m", .fw = "qcom/sdx65m/xbl.elf", -@@ -600,6 +620,8 @@ static const struct pci_device_id mhi_pc - .driver_data = (kernel_ulong_t) &mhi_telit_fn990_info }, +@@ -609,6 +629,8 @@ static const struct pci_device_id mhi_pc + .driver_data = (kernel_ulong_t) &mhi_telit_fe990a_info }, { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308), .driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_info }, + { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0309), diff --git a/target/linux/generic/pending-6.6/360-selftests-bpf-portability-of-unprivileged-tests.patch b/target/linux/generic/pending-6.6/360-selftests-bpf-portability-of-unprivileged-tests.patch deleted file mode 100644 index 0f28834d48c0f3..00000000000000 --- a/target/linux/generic/pending-6.6/360-selftests-bpf-portability-of-unprivileged-tests.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ecb8f9a7d69698ce20fc6f4d107718d56fa861df Mon Sep 17 00:00:00 2001 -From: Tony Ambardar -Date: Sat, 9 Mar 2024 16:44:53 -0800 -Subject: [PATCH] selftests/bpf: Improve portability of unprivileged tests - -The addition of general support for unprivileged tests in test_loader.c -breaks building test_verifier on non-glibc (e.g. musl) systems, due to the -inclusion of glibc extension '' in 'unpriv_helpers.c'. However, -the header is actually not needed, so remove it to restore building. - -Fixes: 1d56ade032a4 ("selftests/bpf: Unprivileged tests for test_loader.c") -Signed-off-by: Tony Ambardar ---- - tools/testing/selftests/bpf/unpriv_helpers.c | 1 - - 1 file changed, 1 deletion(-) - ---- a/tools/testing/selftests/bpf/unpriv_helpers.c -+++ b/tools/testing/selftests/bpf/unpriv_helpers.c -@@ -2,7 +2,6 @@ - - #include - #include --#include - #include - - #include "unpriv_helpers.h" diff --git a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch index be7405c1a2dbaf..2b9543da6de2df 100644 --- a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch +++ b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c -@@ -8327,7 +8327,7 @@ static int nft_register_flowtable_net_ho +@@ -8333,7 +8333,7 @@ static int nft_register_flowtable_net_ho err = flowtable->data.type->setup(&flowtable->data, hook->ops.dev, FLOW_BLOCK_BIND); diff --git a/target/linux/generic/pending-6.6/810-pci_disable_common_quirks.patch b/target/linux/generic/pending-6.6/810-pci_disable_common_quirks.patch index 9bdfcc74866978..e4c8caff22f35b 100644 --- a/target/linux/generic/pending-6.6/810-pci_disable_common_quirks.patch +++ b/target/linux/generic/pending-6.6/810-pci_disable_common_quirks.patch @@ -25,7 +25,7 @@ Signed-off-by: Gabor Juhos --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c -@@ -300,6 +300,7 @@ static void quirk_mmio_always_on(struct +@@ -313,6 +313,7 @@ static void quirk_mmio_always_on(struct DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on); @@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos /* * The Mellanox Tavor device gives false positive parity errors. Disable * parity error reporting. -@@ -3488,6 +3489,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I +@@ -3501,6 +3502,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); @@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos /* * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum. * To work around this, query the size it should be configured to by the -@@ -3513,6 +3516,8 @@ static void quirk_intel_ntb(struct pci_d +@@ -3526,6 +3529,8 @@ static void quirk_intel_ntb(struct pci_d DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb); @@ -51,7 +51,7 @@ Signed-off-by: Gabor Juhos /* * Some BIOS implementations leave the Intel GPU interrupts enabled, even * though no one is handling them (e.g., if the i915 driver is never -@@ -3551,6 +3556,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN +@@ -3564,6 +3569,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq); diff --git a/target/linux/generic/pending-6.6/840-hwrng-bcm2835-set-quality-to-1000.patch b/target/linux/generic/pending-6.6/840-hwrng-bcm2835-set-quality-to-1000.patch index 3172ad5a167b0e..3d3b0341998147 100644 --- a/target/linux/generic/pending-6.6/840-hwrng-bcm2835-set-quality-to-1000.patch +++ b/target/linux/generic/pending-6.6/840-hwrng-bcm2835-set-quality-to-1000.patch @@ -16,7 +16,7 @@ Signed-off-by: Álvaro Fernández Rojas --- a/drivers/char/hw_random/bcm2835-rng.c +++ b/drivers/char/hw_random/bcm2835-rng.c -@@ -169,6 +169,7 @@ static int bcm2835_rng_probe(struct plat +@@ -171,6 +171,7 @@ static int bcm2835_rng_probe(struct plat priv->rng.init = bcm2835_rng_init; priv->rng.read = bcm2835_rng_read; priv->rng.cleanup = bcm2835_rng_cleanup; diff --git a/target/linux/rockchip/armv8/config-6.6 b/target/linux/rockchip/armv8/config-6.6 index c92f2b1c480d06..fddc85f9d723a1 100644 --- a/target/linux/rockchip/armv8/config-6.6 +++ b/target/linux/rockchip/armv8/config-6.6 @@ -251,7 +251,6 @@ CONFIG_FANOTIFY=y CONFIG_FHANDLE=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y -# CONFIG_FORTIFY_SOURCE is not set CONFIG_FRAME_POINTER=y CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y diff --git a/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch b/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch index 3f9499974cc720..2554e731987841 100644 --- a/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch +++ b/target/linux/starfive/patches-6.6/0109-usb-xhci-To-improve-performance-usb-using-lowmem-for.patch @@ -72,7 +72,7 @@ Signed-off-by: minda.chen if (xhci->dcbaa) dma_free_coherent(dev, sizeof(*xhci->dcbaa), xhci->dcbaa, xhci->dcbaa->dma); -@@ -2297,6 +2306,55 @@ xhci_add_interrupter(struct xhci_hcd *xh +@@ -2300,6 +2309,55 @@ xhci_add_interrupter(struct xhci_hcd *xh return 0; } @@ -128,7 +128,7 @@ Signed-off-by: minda.chen int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) { dma_addr_t dma; -@@ -2433,6 +2491,12 @@ int xhci_mem_init(struct xhci_hcd *xhci, +@@ -2436,6 +2494,12 @@ int xhci_mem_init(struct xhci_hcd *xhci, xhci->isoc_bei_interval = AVOID_BEI_INTERVAL_MAX; @@ -160,7 +160,7 @@ Signed-off-by: minda.chen } --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3650,7 +3650,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3664,7 +3664,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * full_len = urb->transfer_buffer_length; /* If we have scatter/gather list, we use it. */ @@ -263,7 +263,7 @@ Signed-off-by: minda.chen /** --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1763,6 +1763,13 @@ struct xhci_hub { +@@ -1764,6 +1764,13 @@ struct xhci_hub { u8 min_rev; }; @@ -277,16 +277,16 @@ Signed-off-by: minda.chen /* There is one xhci_hcd structure per controller */ struct xhci_hcd { struct usb_hcd *main_hcd; -@@ -1914,6 +1921,8 @@ struct xhci_hcd { - #define XHCI_ZHAOXIN_TRB_FETCH BIT_ULL(45) - #define XHCI_ZHAOXIN_HOST BIT_ULL(46) +@@ -1917,6 +1924,8 @@ struct xhci_hcd { + #define XHCI_WRITE_64_HI_LO BIT_ULL(47) + #define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48) +#define XHCI_LOCAL_BUFFER BIT_ULL(63) + unsigned int num_active_eps; unsigned int limit_active_eps; struct xhci_port *hw_ports; -@@ -1943,6 +1952,8 @@ struct xhci_hcd { +@@ -1946,6 +1955,8 @@ struct xhci_hcd { struct list_head regset_list; void *dbc; diff --git a/target/linux/starfive/patches-6.6/0110-usb-xhci-using-dma_alloc_noncoherent-to-alloc-low-me.patch b/target/linux/starfive/patches-6.6/0110-usb-xhci-using-dma_alloc_noncoherent-to-alloc-low-me.patch index 739bc76e718fdb..a9c03feecf684e 100644 --- a/target/linux/starfive/patches-6.6/0110-usb-xhci-using-dma_alloc_noncoherent-to-alloc-low-me.patch +++ b/target/linux/starfive/patches-6.6/0110-usb-xhci-using-dma_alloc_noncoherent-to-alloc-low-me.patch @@ -26,7 +26,7 @@ Signed-off-by: Minda Chen gen_pool_destroy(pool->pool); pool->pool = NULL; } -@@ -2317,15 +2318,15 @@ int xhci_setup_local_lowmem(struct xhci_ +@@ -2320,15 +2321,15 @@ int xhci_setup_local_lowmem(struct xhci_ if (!pool->pool) { /* minimal alloc one page */ pool->pool = gen_pool_create(PAGE_SHIFT, dev_to_node(hcd->self.sysdev)); @@ -48,7 +48,7 @@ Signed-off-by: Minda Chen goto destroy_pool; } -@@ -2335,11 +2336,11 @@ int xhci_setup_local_lowmem(struct xhci_ +@@ -2338,11 +2339,11 @@ int xhci_setup_local_lowmem(struct xhci_ * for it. */ err = gen_pool_add_virt(pool->pool, (unsigned long)buffer, @@ -62,7 +62,7 @@ Signed-off-by: Minda Chen goto destroy_pool; } -@@ -2362,7 +2363,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, +@@ -2365,7 +2366,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, unsigned int val, val2; u64 val_64; u32 page_size, temp; @@ -71,7 +71,7 @@ Signed-off-by: Minda Chen INIT_LIST_HEAD(&xhci->cmd_list); -@@ -2492,9 +2493,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, +@@ -2495,9 +2496,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, xhci->isoc_bei_interval = AVOID_BEI_INTERVAL_MAX; if (xhci->quirks & XHCI_LOCAL_BUFFER) { diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile index 3bcfabc3ad587c..cf7081fb5a9395 100644 --- a/tools/mtd-utils/Makefile +++ b/tools/mtd-utils/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtd-utils -PKG_VERSION:=2.2.0 -PKG_RELEASE:=2 +PKG_VERSION:=2.2.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/ -PKG_HASH:=250d082f67375ca8451b5fcfc9a23a53ced3ebebd8312c288daf2507bbab1324 +PKG_HASH:=f7ae20b2eb79ee83441468f0b99d897024cd96ff853eea59106fb1952065c803 PKG_CPE_ID:=cpe:/a:mtd-utils_project:mtd-utils PKG_FIXUP:=autoreconf diff --git a/tools/mtd-utils/patches/110-portability.patch b/tools/mtd-utils/patches/110-portability.patch index 7e17f807365a22..cf5f0c8d8e54f8 100644 --- a/tools/mtd-utils/patches/110-portability.patch +++ b/tools/mtd-utils/patches/110-portability.patch @@ -18,8 +18,8 @@ #include #include "common.h" #include "compr.h" ---- a/jffsX-utils/rbtree.h -+++ b/jffsX-utils/rbtree.h +--- a/include/rbtree.h ++++ b/include/rbtree.h @@ -94,8 +94,7 @@ static inline struct page * rb_insert_pa #ifndef _LINUX_RBTREE_H #define _LINUX_RBTREE_H @@ -70,7 +70,7 @@ #include --- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c +++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c -@@ -1554,6 +1554,7 @@ static int add_inode(struct stat *st, in +@@ -1568,6 +1568,7 @@ static int add_inode(struct stat *st, in if (c->default_compr != UBIFS_COMPR_NONE) use_flags |= UBIFS_COMPR_FL; @@ -78,7 +78,7 @@ if (flags & FS_COMPR_FL) use_flags |= UBIFS_COMPR_FL; if (flags & FS_SYNC_FL) -@@ -1566,6 +1567,7 @@ static int add_inode(struct stat *st, in +@@ -1580,6 +1581,7 @@ static int add_inode(struct stat *st, in use_flags |= UBIFS_DIRSYNC_FL; if (fctx) use_flags |= UBIFS_CRYPT_FL; @@ -86,7 +86,7 @@ memset(ino, 0, UBIFS_INO_NODE_SZ); ino_key_init(&key, inum); -@@ -1651,7 +1653,9 @@ static int add_dir_inode(const char *pat +@@ -1665,7 +1667,9 @@ static int add_dir_inode(const char *pat fd = dirfd(dir); if (fd == -1) return sys_err_msg("dirfd failed"); @@ -96,7 +96,7 @@ flags = 0; } -@@ -1862,6 +1866,7 @@ static int add_file(const char *path_nam +@@ -1878,6 +1882,7 @@ static int add_file(const char *path_nam dn->ch.node_type = UBIFS_DATA_NODE; key_write(&key, &dn->key); out_len = NODE_BUFFER_SIZE - UBIFS_DATA_NODE_SZ; @@ -104,7 +104,7 @@ if (c->default_compr == UBIFS_COMPR_NONE && !c->encrypted && (flags & FS_COMPR_FL)) #ifdef WITH_LZO -@@ -1872,6 +1877,7 @@ static int add_file(const char *path_nam +@@ -1888,6 +1893,7 @@ static int add_file(const char *path_nam use_compr = UBIFS_COMPR_NONE; #endif else @@ -112,7 +112,7 @@ use_compr = c->default_compr; compr_type = compress_data(buf, bytes_read, &dn->data, &out_len, use_compr); -@@ -1931,7 +1937,9 @@ static int add_non_dir(const char *path_ +@@ -1947,7 +1953,9 @@ static int add_non_dir(const char *path_ if (fd == -1) return sys_err_msg("failed to open file '%s'", path_name); diff --git a/tools/mtd-utils/patches/130-lzma_jffs2.patch b/tools/mtd-utils/patches/130-lzma_jffs2.patch index 32b7d6c7256804..b03265a3804755 100644 --- a/tools/mtd-utils/patches/130-lzma_jffs2.patch +++ b/tools/mtd-utils/patches/130-lzma_jffs2.patch @@ -1,9 +1,9 @@ --- a/jffsX-utils/Makemodule.am +++ b/jffsX-utils/Makemodule.am -@@ -10,8 +10,9 @@ mkfs_jffs2_SOURCES = \ - jffsX-utils/summary.h \ - include/linux/jffs2.h \ - include/mtd/jffs2-user.h +@@ -9,8 +9,9 @@ mkfs_jffs2_SOURCES = \ + include/mtd/jffs2-user.h \ + include/list.h \ + include/rbtree.h + mkfs_jffs2_LDADD = libmtd.a $(ZLIB_LIBS) $(LZO_LIBS) -mkfs_jffs2_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) @@ -11,7 +11,7 @@ jffs2reader_SOURCES = jffsX-utils/jffs2reader.c include/mtd/jffs2-user.h jffs2reader_LDADD = libmtd.a $(ZLIB_LIBS) $(LZO_LIBS) -@@ -33,6 +34,14 @@ if WITH_ZLIB +@@ -32,6 +33,14 @@ if WITH_ZLIB mkfs_jffs2_SOURCES += jffsX-utils/compr_zlib.c endif @@ -28,7 +28,7 @@ dist_man1_MANS += jffsX-utils/mkfs.jffs2.1 --- a/jffsX-utils/compr.c +++ b/jffsX-utils/compr.c -@@ -520,6 +520,9 @@ int jffs2_compressors_init(void) +@@ -471,6 +471,9 @@ int jffs2_compressors_init(void) #ifdef WITH_LZO jffs2_lzo_init(); #endif @@ -38,7 +38,7 @@ return 0; } -@@ -534,5 +537,8 @@ int jffs2_compressors_exit(void) +@@ -485,5 +488,8 @@ int jffs2_compressors_exit(void) #ifdef WITH_LZO jffs2_lzo_exit(); #endif @@ -49,7 +49,7 @@ } --- a/jffsX-utils/compr.h +++ b/jffsX-utils/compr.h -@@ -21,8 +21,9 @@ +@@ -22,8 +22,9 @@ #define JFFS2_RUBINMIPS_PRIORITY 10 #define JFFS2_DYNRUBIN_PRIORITY 20 #define JFFS2_RTIME_PRIORITY 50 @@ -61,7 +61,7 @@ #define JFFS2_COMPR_MODE_NONE 0 #define JFFS2_COMPR_MODE_PRIORITY 1 -@@ -113,5 +114,10 @@ void jffs2_rtime_exit(void); +@@ -110,5 +111,10 @@ void jffs2_rtime_exit(void); int jffs2_lzo_init(void); void jffs2_lzo_exit(void); #endif @@ -5055,7 +5055,7 @@ AC_ARG_WITH([selinux], [AS_HELP_STRING([--with-selinux], [Support for selinux extended attributes])], -@@ -268,6 +272,7 @@ fi +@@ -269,6 +273,7 @@ fi AM_CONDITIONAL([WITH_LZO], [test "x$with_lzo" = "xyes"]) AM_CONDITIONAL([WITH_ZLIB], [test "x$with_zlib" = "xyes"]) AM_CONDITIONAL([WITH_ZSTD], [test "x$with_zstd" = "xyes"]) @@ -5063,7 +5063,7 @@ AM_CONDITIONAL([WITH_XATTR], [test "x$with_xattr" = "xyes"]) AM_CONDITIONAL([WITH_SELINUX], [test "x$with_selinux" = "xyes"]) AM_CONDITIONAL([WITH_CRYPTO], [test "x$with_crypto" = "xyes"]) -@@ -312,6 +317,7 @@ AC_MSG_RESULT([ +@@ -313,6 +318,7 @@ AC_MSG_RESULT([ lzo support: ${with_lzo} zlib support: ${with_zlib} zstd support: ${with_zstd}