1 mac80211 from kernel 5.3 and later checks the new policy attribute.
2 As this driver does not define any policies and does strange things,
3 just tell mac80211 to ignore the policies.
5 --- a/os_dep/linux/rtw_cfgvendor.c
6 +++ b/os_dep/linux/rtw_cfgvendor.c
7 @@ -1173,7 +1173,8 @@ static const struct wiphy_vendor_command
8 .subcmd = BRCM_VENDOR_SCMD_PRIV_STR
10 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
11 - .doit = wl_cfgvendor_priv_string_handler
12 + .doit = wl_cfgvendor_priv_string_handler,
13 + .policy = VENDOR_CMD_RAW_DATA,
15 #if defined(GSCAN_SUPPORT) && 0
17 @@ -1182,7 +1183,8 @@ static const struct wiphy_vendor_command
18 .subcmd = GSCAN_SUBCMD_GET_CAPABILITIES
20 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
21 - .doit = wl_cfgvendor_gscan_get_capabilities
22 + .doit = wl_cfgvendor_gscan_get_capabilities,
23 + .policy = VENDOR_CMD_RAW_DATA,
27 @@ -1190,7 +1192,8 @@ static const struct wiphy_vendor_command
28 .subcmd = GSCAN_SUBCMD_SET_CONFIG
30 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
31 - .doit = wl_cfgvendor_set_scan_cfg
32 + .doit = wl_cfgvendor_set_scan_cfg,
33 + .policy = VENDOR_CMD_RAW_DATA,
37 @@ -1198,7 +1201,8 @@ static const struct wiphy_vendor_command
38 .subcmd = GSCAN_SUBCMD_SET_SCAN_CONFIG
40 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
41 - .doit = wl_cfgvendor_set_batch_scan_cfg
42 + .doit = wl_cfgvendor_set_batch_scan_cfg,
43 + .policy = VENDOR_CMD_RAW_DATA,
47 @@ -1206,7 +1210,8 @@ static const struct wiphy_vendor_command
48 .subcmd = GSCAN_SUBCMD_ENABLE_GSCAN
50 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
51 - .doit = wl_cfgvendor_initiate_gscan
52 + .doit = wl_cfgvendor_initiate_gscan,
53 + .policy = VENDOR_CMD_RAW_DATA,
57 @@ -1214,7 +1219,8 @@ static const struct wiphy_vendor_command
58 .subcmd = GSCAN_SUBCMD_ENABLE_FULL_SCAN_RESULTS
60 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
61 - .doit = wl_cfgvendor_enable_full_scan_result
62 + .doit = wl_cfgvendor_enable_full_scan_result,
63 + .policy = VENDOR_CMD_RAW_DATA,
67 @@ -1222,7 +1228,8 @@ static const struct wiphy_vendor_command
68 .subcmd = GSCAN_SUBCMD_SET_HOTLIST
70 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
71 - .doit = wl_cfgvendor_hotlist_cfg
72 + .doit = wl_cfgvendor_hotlist_cfg,
73 + .policy = VENDOR_CMD_RAW_DATA,
77 @@ -1230,7 +1237,8 @@ static const struct wiphy_vendor_command
78 .subcmd = GSCAN_SUBCMD_SET_SIGNIFICANT_CHANGE_CONFIG
80 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
81 - .doit = wl_cfgvendor_significant_change_cfg
82 + .doit = wl_cfgvendor_significant_change_cfg,
83 + .policy = VENDOR_CMD_RAW_DATA,
87 @@ -1238,7 +1246,8 @@ static const struct wiphy_vendor_command
88 .subcmd = GSCAN_SUBCMD_GET_SCAN_RESULTS
90 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
91 - .doit = wl_cfgvendor_gscan_get_batch_results
92 + .doit = wl_cfgvendor_gscan_get_batch_results,
93 + .policy = VENDOR_CMD_RAW_DATA,
97 @@ -1246,7 +1255,8 @@ static const struct wiphy_vendor_command
98 .subcmd = GSCAN_SUBCMD_GET_CHANNEL_LIST
100 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
101 - .doit = wl_cfgvendor_gscan_get_channel_list
102 + .doit = wl_cfgvendor_gscan_get_channel_list,
103 + .policy = VENDOR_CMD_RAW_DATA,
105 #endif /* GSCAN_SUPPORT */
106 #if defined(RTT_SUPPORT) && 0
107 @@ -1256,7 +1266,8 @@ static const struct wiphy_vendor_command
108 .subcmd = RTT_SUBCMD_SET_CONFIG
110 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
111 - .doit = wl_cfgvendor_rtt_set_config
112 + .doit = wl_cfgvendor_rtt_set_config,
113 + .policy = VENDOR_CMD_RAW_DATA,
117 @@ -1264,7 +1275,8 @@ static const struct wiphy_vendor_command
118 .subcmd = RTT_SUBCMD_CANCEL_CONFIG
120 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
121 - .doit = wl_cfgvendor_rtt_cancel_config
122 + .doit = wl_cfgvendor_rtt_cancel_config,
123 + .policy = VENDOR_CMD_RAW_DATA,
127 @@ -1272,7 +1284,8 @@ static const struct wiphy_vendor_command
128 .subcmd = RTT_SUBCMD_GETCAPABILITY
130 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
131 - .doit = wl_cfgvendor_rtt_get_capability
132 + .doit = wl_cfgvendor_rtt_get_capability,
133 + .policy = VENDOR_CMD_RAW_DATA,
135 #endif /* RTT_SUPPORT */
137 @@ -1281,7 +1294,8 @@ static const struct wiphy_vendor_command
138 .subcmd = ANDR_WIFI_SUBCMD_GET_FEATURE_SET
140 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
141 - .doit = rtw_cfgvendor_get_feature_set
142 + .doit = rtw_cfgvendor_get_feature_set,
143 + .policy = VENDOR_CMD_RAW_DATA,
147 @@ -1289,7 +1303,8 @@ static const struct wiphy_vendor_command
148 .subcmd = ANDR_WIFI_SUBCMD_GET_FEATURE_SET_MATRIX
150 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV,
151 - .doit = rtw_cfgvendor_get_feature_set_matrix
152 + .doit = rtw_cfgvendor_get_feature_set_matrix,
153 + .policy = VENDOR_CMD_RAW_DATA,