From 5f9c69c97f064f2a06d7318d61a77c82b02422b4 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Wed, 8 Oct 2025 18:23:26 +0200 Subject: [PATCH] package/rtl8812au-aircrack-ng: fix build with Linux 6.17 Add local patch pending upstream to fix build failure with Linux 6.17. Fixes: Still not occured Signed-off-by: Giulio Benetti Signed-off-by: Julien Olivain --- .../0003-Fix-build-for-kernel-6.17.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/rtl8812au-aircrack-ng/0003-Fix-build-for-kernel-6.17.patch diff --git a/package/rtl8812au-aircrack-ng/0003-Fix-build-for-kernel-6.17.patch b/package/rtl8812au-aircrack-ng/0003-Fix-build-for-kernel-6.17.patch new file mode 100644 index 0000000000..361615b945 --- /dev/null +++ b/package/rtl8812au-aircrack-ng/0003-Fix-build-for-kernel-6.17.patch @@ -0,0 +1,57 @@ +From dfbeaa319808624c367200739a9a6f7fbc4b8281 Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Wed, 8 Oct 2025 17:56:52 +0200 +Subject: [PATCH] Fix build for kernel 6.17 + +With commit: +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b74947b4f6ff7c122a1bb6eb38bb7ecfbb1d3820 +set_wiphy_params() and set/get_tx_power() gain argument radio_idx to get +radio index. So let's add that argument according to linux version >= +6.17. + +Upstream: https://github.com/aircrack-ng/rtl8812au/pull/1238 +Signed-off-by: Giulio Benetti +--- + os_dep/linux/ioctl_cfg80211.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c +index ec47e95..3d834a4 100644 +--- a/os_dep/linux/ioctl_cfg80211.c ++++ b/os_dep/linux/ioctl_cfg80211.c +@@ -3365,7 +3365,12 @@ exit: + return ret; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) ++static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, int radio_idx, ++ u32 changed) ++#else + static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed) ++#endif + { + #if 0 + struct iwm_priv *iwm = wiphy_to_iwm(wiphy); +@@ -4267,6 +4272,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 +@@ -4328,6 +4336,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 +-- +2.47.3 +