From db69d76619bdb3b0fc4fe0f903b7124a4267068c Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Sun, 16 Jul 2023 21:21:12 +0000 Subject: [PATCH] Fixup for stale kickoff removal in wireless regulator API Cope with the fix in stable 6.3.13 commit bf353116d1bf, 6.5-rc1 commte8c2af660ba0 and and 6.1.39 commit 132b7129c5fe LTS "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. --- os_dep/linux/wifi_regd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c index 0b5c46a..5acdf3b 100644 --- a/os_dep/linux/wifi_regd.c +++ b/os_dep/linux/wifi_regd.c @@ -405,7 +405,12 @@ int rtw_regd_init(struct wiphy *wiphy) wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS; #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 39)) && !defined(RHEL94) +#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))) && !defined(RHEL94) wiphy->regulatory_flags |= REGULATORY_IGNORE_STALE_KICKOFF; #endif