hc
2024-07-02 39af2116d7581c9a12be9e73bb6bdc31496495ef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 9421b0763e5f20babb2c0fd437979a71fbac1739 Mon Sep 17 00:00:00 2001
From: Christian Stewart <christian@paral.in>
Date: Tue, 8 Sep 2020 22:46:45 -0700
Subject: [PATCH] disable rtw_mgmt_frame_register on kernel 5.8.0
 
rtl8812au: fix build for kernel 5.8
 
[Source: https://github.com/lwfinger/rtl8812au/commit/ec1591b90dd323185717fa42887f96444cca5921.patch]
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Christian Stewart <christian@paral.in>
---
 os_dep/linux/ioctl_cfg80211.c | 4 ++++
 1 file changed, 4 insertions(+)
 
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index 019daf9..13238cb 100644
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -5177,6 +5177,7 @@ exit:
     return ret;
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
 static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
         struct wireless_dev *wdev,
@@ -5205,6 +5206,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
 exit:
     return;
 }
+#endif
 
 #if defined(CONFIG_TDLS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
 static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
@@ -6021,7 +6023,9 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
     .mgmt_tx = cfg80211_rtw_mgmt_tx,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
     .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
+#endif
 #elif  (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,34) && LINUX_VERSION_CODE<=KERNEL_VERSION(2,6,35))
     .action = cfg80211_rtw_mgmt_tx,
 #endif
-- 
2.28.0