From b9f21a6ff209edc220b2fc4ca610eb54595f218d Mon Sep 17 00:00:00 2001
From: Franz Eitzinger <43846023+etzngr@users.noreply.github.com>
Date: Mon, 2 Dec 2024 22:51:54 +0100
Subject: [PATCH 1/2] Adapt to Kernel 6.13.0

Pass net_device to .set_monitor_channel
---
 os_dep/linux/ioctl_cfg80211.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index c1c75ba..5078cbe 100644
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -6000,7 +6000,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 d3aecb606d6fe9ca98c71dadab823ead2a6b0cfb Mon Sep 17 00:00:00 2001
From: Franz Eitzinger <43846023+etzngr@users.noreply.github.com>
Date: Mon, 17 Feb 2025 18:19:46 +0100
Subject: [PATCH 2/2] Fix build with Kernel 6.14

---
 os_dep/linux/ioctl_cfg80211.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index 5078cbe..d641305 100644
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -4204,6 +4204,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)
 {