build/patch/misc/wireless-rtl88x2bu-wireless-ignore-stale-kickoff-removal.patch

44 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alban Browaeys <alban.browaeys@gmail.com>
Date: Sun, 16 Jul 2023 21:21:12 +0000
Subject: Fixup for stale kickoff removal in wireless regulator API
Cope with the fix in stable 6.3.13 bf353116d1bf and 6.5-rc1 e8c2af660ba0
"wifi: cfg80211: fix regulatory disconnect with OCB/NAN".
That is the removal of REGULATORY_IGNORE_STALE_KICKOFF
from the wireless regulator internal API to fix any driver
that allowed OCB/NAN.
Note this code will need to be expanded once and if 6.4 include the
above fixup.
---
drivers/net/wireless/rtl88x2bu/os_dep/linux/wifi_regd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rtl88x2bu/os_dep/linux/wifi_regd.c b/drivers/net/wireless/rtl88x2bu/os_dep/linux/wifi_regd.c
index 81e1dc75e5fb..04dc056f8d69 100644
--- a/drivers/net/wireless/rtl88x2bu/os_dep/linux/wifi_regd.c
+++ b/drivers/net/wireless/rtl88x2bu/os_dep/linux/wifi_regd.c
@@ -403,11 +403,16 @@ int rtw_regd_init(struct wiphy *wiphy)
#else
wiphy->regulatory_flags &= ~REGULATORY_STRICT_REG;
wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS;
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) \
+ && ((LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 39)) \
+ || (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0))) \
+ && ((LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 13)) \
+ || (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0))) \
+ && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 4))
wiphy->regulatory_flags |= REGULATORY_IGNORE_STALE_KICKOFF;
#endif
return 0;
}
--
Created with Armbian build tools https://github.com/armbian/build