From 408ac4abdd1e187624ebef9f6a45ecc437525de5 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Wed, 16 Apr 2025 17:34:54 +0200 Subject: [PATCH 1/2] Fix build with Linux 6.13 Commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9c4f830927750a2bf9fd9426a5257f0fdce3b662 adds struct net_device *dev as argument to set_monitor_channel(), so let's add it to cfg80211_rtw_set_monitor_channel() according to Linux version. Signed-off-by: Giulio Benetti --- ioctl_cfg80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ioctl_cfg80211.c b/ioctl_cfg80211.c index c6ae5aa..270cfce 100644 --- a/ioctl_cfg80211.c +++ b/ioctl_cfg80211.c @@ -4404,7 +4404,10 @@ static int cfg80211_rtw_set_channel(struct wiphy *wiphy } static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0)) + , struct net_device *dev + , struct cfg80211_chan_def *chandef +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) , struct cfg80211_chan_def *chandef #else , struct ieee80211_channel *chan From 0363681349f683050bc9a265db8310e8c4eb6534 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Thu, 15 May 2025 22:32:48 +0200 Subject: [PATCH 2/2] Fix build with Linux 6.14 Commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7a53af85d3bbdbe06cd47b81a6d99a04dc0a3963 adds argument "unsigned int link_id" to get_tx_power(), so let's add it to cfg80211_rtw_get_txpower() according to Linux version. Signed-off-by: Giulio Benetti --- ioctl_cfg80211.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ioctl_cfg80211.c b/ioctl_cfg80211.c index 270cfce..04434fa 100644 --- a/ioctl_cfg80211.c +++ b/ioctl_cfg80211.c @@ -3240,6 +3240,9 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy, 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, 14, 0)) + unsigned int link_id, #endif int *dbm) {