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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
From cde2dbf6e94e00fcf198422b03de01d3090675d9 Mon Sep 17 00:00:00 2001
From: Jesper Skov <jb1811@jyskebank.dk>
Date: Fri, 25 Oct 2019 10:10:29 +0200
Subject: [PATCH] Fix kernel 5.3 driver crashes, from aircrack-ng/rtl8812au#421
 
[Upstream: https://github.com/abperiasamy/rtl8812AU_8821AU_linux/commit/822b485d36d6f72304a219c3be228f40968b542b.patch]
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Christian Stewart <christian@paral.in>
---
 os_dep/linux/rtw_cfgvendor.c | 45 ++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 
diff --git a/os_dep/linux/rtw_cfgvendor.c b/os_dep/linux/rtw_cfgvendor.c
index e7ba90a..81fc8af 100644
--- a/os_dep/linux/rtw_cfgvendor.c
+++ b/os_dep/linux/rtw_cfgvendor.c
@@ -1173,6 +1173,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = BRCM_VENDOR_SCMD_PRIV_STR
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_priv_string_handler
     },
 #if defined(GSCAN_SUPPORT) && 0
@@ -1182,6 +1185,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = GSCAN_SUBCMD_GET_CAPABILITIES
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_gscan_get_capabilities
     },
     {
@@ -1190,6 +1196,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = GSCAN_SUBCMD_SET_CONFIG
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_set_scan_cfg
     },
     {
@@ -1198,6 +1207,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = GSCAN_SUBCMD_SET_SCAN_CONFIG
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_set_batch_scan_cfg
     },
     {
@@ -1206,6 +1218,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = GSCAN_SUBCMD_ENABLE_GSCAN
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_initiate_gscan
     },
     {
@@ -1214,6 +1229,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = GSCAN_SUBCMD_ENABLE_FULL_SCAN_RESULTS
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_enable_full_scan_result
     },
     {
@@ -1222,6 +1240,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = GSCAN_SUBCMD_SET_HOTLIST
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_hotlist_cfg
     },
     {
@@ -1230,6 +1251,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = GSCAN_SUBCMD_SET_SIGNIFICANT_CHANGE_CONFIG
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_significant_change_cfg
     },
     {
@@ -1238,6 +1262,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = GSCAN_SUBCMD_GET_SCAN_RESULTS
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_gscan_get_batch_results
     },
     {
@@ -1246,6 +1273,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = GSCAN_SUBCMD_GET_CHANNEL_LIST
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_gscan_get_channel_list
     },
 #endif /* GSCAN_SUPPORT */
@@ -1256,6 +1286,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = RTT_SUBCMD_SET_CONFIG
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_rtt_set_config
     },
     {
@@ -1264,6 +1297,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = RTT_SUBCMD_CANCEL_CONFIG
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_rtt_cancel_config
     },
     {
@@ -1272,6 +1308,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = RTT_SUBCMD_GETCAPABILITY
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = wl_cfgvendor_rtt_get_capability
     },
 #endif /* RTT_SUPPORT */
@@ -1281,6 +1320,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = ANDR_WIFI_SUBCMD_GET_FEATURE_SET
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = rtw_cfgvendor_get_feature_set
     },
     {
@@ -1289,6 +1331,9 @@ static const struct wiphy_vendor_command rtw_vendor_cmds [] = {
             .subcmd = ANDR_WIFI_SUBCMD_GET_FEATURE_SET_MATRIX
         },
         .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,3,0)
+        .policy = VENDOR_CMD_RAW_DATA,
+#endif
         .doit = rtw_cfgvendor_get_feature_set_matrix
     }
 };
-- 
2.28.0