From 859b49c32feb990a50a80a3a93b99daeaa56ef46 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Fri, 19 Sep 2025 07:42:48 +0200 Subject: [PATCH] Bump mainline edge kernels to rc7 --- config/sources/mainline-kernel.conf.sh | 2 +- .../compilation/patch/drivers_network.sh | 5 +- ...-rtl8192eu-Fix-building-on-6.16-6.17.patch | 47 +++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 patch/misc/wireless-rtl8192eu-Fix-building-on-6.16-6.17.patch diff --git a/config/sources/mainline-kernel.conf.sh b/config/sources/mainline-kernel.conf.sh index 217eeab45..4cc4009c6 100644 --- a/config/sources/mainline-kernel.conf.sh +++ b/config/sources/mainline-kernel.conf.sh @@ -8,7 +8,7 @@ function mainline_kernel_decide_version__upstream_release_candidate_number() { [[ -n "${KERNELBRANCH}" ]] && return 0 # if already set, don't touch it; that way other hooks can run in any order if [[ "${KERNEL_MAJOR_MINOR}" == "6.17" ]]; then # @TODO: roll over to next MAJOR.MINOR and MAJOR.MINOR-rc1 when it is released - declare -g KERNELBRANCH="tag:v6.17-rc1" + declare -g KERNELBRANCH="tag:v6.17-rc5" display_alert "mainline-kernel: upstream release candidate" "Using KERNELBRANCH='${KERNELBRANCH}' for KERNEL_MAJOR_MINOR='${KERNEL_MAJOR_MINOR}'" "info" fi } diff --git a/lib/functions/compilation/patch/drivers_network.sh b/lib/functions/compilation/patch/drivers_network.sh index 3e184c2b3..7bc6617fb 100644 --- a/lib/functions/compilation/patch/drivers_network.sh +++ b/lib/functions/compilation/patch/drivers_network.sh @@ -38,7 +38,7 @@ driver_rtl8189ES() { # Wireless drivers for Realtek 8189ES chipsets - if linux-version compare "${version}" ge 3.14; then + if linux-version compare "${version}" ge 3.14 && linux-version compare "${version}" le 6.16; then # Attach to specific commit (was "branch:master") local rtl8189esver='commit:07f03cf721f5e0317012ece4159834327680ba8b' # Commit date: 2025-06-21 (please update when updating commit ref) @@ -160,6 +160,9 @@ driver_rtl8192EU() { process_patch_file "${SRC}/patch/misc/wireless-rtl8192eu-Fix-p2p-go-advertising.patch" "applying" + # fix compilation for kernels >= 6.17 + process_patch_file "${SRC}/patch/misc/wireless-rtl8192eu-Fix-building-on-6.16-6.17.patch" "applying" + # fix compilation for kernels >= 5.4 process_patch_file "${SRC}/patch/misc/wireless-rtl8192eu-Fix-VFS-import.patch" "applying" diff --git a/patch/misc/wireless-rtl8192eu-Fix-building-on-6.16-6.17.patch b/patch/misc/wireless-rtl8192eu-Fix-building-on-6.16-6.17.patch new file mode 100644 index 000000000..ebe2c66f4 --- /dev/null +++ b/patch/misc/wireless-rtl8192eu-Fix-building-on-6.16-6.17.patch @@ -0,0 +1,47 @@ +From 026fb2665d043788ff73e764350376828ba5f322 Mon Sep 17 00:00:00 2001 +From: Franz Eitzinger <43846023+etzngr@users.noreply.github.com> +Date: Tue, 12 Aug 2025 10:47:22 +0200 +Subject: [PATCH 2/2] Fix build with Kernel 6.17: Add support to get radio + index + +--- + os_dep/linux/ioctl_cfg80211.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c +index d641305..4ccad87 100644 +--- a/drivers/net/wireless/rtl8192eu/os_dep/linux/ioctl_cfg80211.c ++++ b/drivers/net/wireless/rtl8192eu/os_dep/linux/ioctl_cfg80211.c +@@ -3260,7 +3260,11 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy + return ret; + } + +-static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed) ++static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ int radio_idx, ++#endif ++ u32 changed) + { + #if 0 + struct iwm_priv *iwm = wiphy_to_iwm(wiphy); +@@ -4165,6 +4169,9 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy, + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) + struct wireless_dev *wdev, + #endif ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ int radio_idx, ++#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)) || defined(COMPAT_KERNEL_RELEASE) + enum nl80211_tx_power_setting type, int mbm) + #else +@@ -4205,6 +4212,9 @@ static int cfg80211_rtw_get_txpower(struct wiphy *wiphy, + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) + struct wireless_dev *wdev, + #endif ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++ int radio_idx, ++#endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)) + unsigned int link_id, + #endif