mac80211: Update to version 5.14.13-1
[openwrt/staging/mkresin.git] / package / network / utils / iw / patches / 001-nl80211_h_sync.patch
1 --- a/nl80211.h
2 +++ b/nl80211.h
3 @@ -11,7 +11,7 @@
4 * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
5 * Copyright 2008 Colin McCabe <colin@cozybit.com>
6 * Copyright 2015-2017 Intel Deutschland GmbH
7 - * Copyright (C) 2018-2020 Intel Corporation
8 + * Copyright (C) 2018-2021 Intel Corporation
9 *
10 * Permission to use, copy, modify, and/or distribute this software for any
11 * purpose with or without fee is hereby granted, provided that the above
12 @@ -655,6 +655,9 @@
13 * When a security association was established on an 802.1X network using
14 * fast transition, this event should be followed by an
15 * %NL80211_CMD_PORT_AUTHORIZED event.
16 + * Following a %NL80211_CMD_ROAM event userspace can issue
17 + * %NL80211_CMD_GET_SCAN in order to obtain the scan information for the
18 + * new BSS the card/driver roamed to.
19 * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
20 * userspace that a connection was dropped by the AP or due to other
21 * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and
22 @@ -757,7 +760,8 @@
23 * of any other interfaces, and other interfaces will again take
24 * precedence when they are used.
25 *
26 - * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface.
27 + * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface
28 + * (no longer supported).
29 *
30 * @NL80211_CMD_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform
31 * multicast to unicast conversion. When enabled, all multicast packets
32 @@ -1177,6 +1181,25 @@
33 * includes the contents of the frame. %NL80211_ATTR_ACK flag is included
34 * if the recipient acknowledged the frame.
35 *
36 + * @NL80211_CMD_SET_SAR_SPECS: SAR power limitation configuration is
37 + * passed using %NL80211_ATTR_SAR_SPEC. %NL80211_ATTR_WIPHY is used to
38 + * specify the wiphy index to be applied to.
39 + *
40 + * @NL80211_CMD_OBSS_COLOR_COLLISION: This notification is sent out whenever
41 + * mac80211/drv detects a bss color collision.
42 + *
43 + * @NL80211_CMD_COLOR_CHANGE_REQUEST: This command is used to indicate that
44 + * userspace wants to change the BSS color.
45 + *
46 + * @NL80211_CMD_COLOR_CHANGE_STARTED: Notify userland, that a color change has
47 + * started
48 + *
49 + * @NL80211_CMD_COLOR_CHANGE_ABORTED: Notify userland, that the color change has
50 + * been aborted
51 + *
52 + * @NL80211_CMD_COLOR_CHANGE_COMPLETED: Notify userland that the color change
53 + * has completed
54 + *
55 * @NL80211_CMD_MAX: highest used command number
56 * @__NL80211_CMD_AFTER_LAST: internal use
57 */
58 @@ -1407,6 +1430,16 @@ enum nl80211_commands {
59
60 NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS,
61
62 + NL80211_CMD_SET_SAR_SPECS,
63 +
64 + NL80211_CMD_OBSS_COLOR_COLLISION,
65 +
66 + NL80211_CMD_COLOR_CHANGE_REQUEST,
67 +
68 + NL80211_CMD_COLOR_CHANGE_STARTED,
69 + NL80211_CMD_COLOR_CHANGE_ABORTED,
70 + NL80211_CMD_COLOR_CHANGE_COMPLETED,
71 +
72 /* add new commands above here */
73
74 /* used to define NL80211_CMD_MAX below */
75 @@ -1750,8 +1783,9 @@ enum nl80211_commands {
76 * specify just a single bitrate, which is to be used for the beacon.
77 * The driver must also specify support for this with the extended
78 * features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
79 - * NL80211_EXT_FEATURE_BEACON_RATE_HT and
80 - * NL80211_EXT_FEATURE_BEACON_RATE_VHT.
81 + * NL80211_EXT_FEATURE_BEACON_RATE_HT,
82 + * NL80211_EXT_FEATURE_BEACON_RATE_VHT and
83 + * NL80211_EXT_FEATURE_BEACON_RATE_HE.
84 *
85 * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
86 * at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.
87 @@ -1955,8 +1989,15 @@ enum nl80211_commands {
88 * @NL80211_ATTR_PROBE_RESP: Probe Response template data. Contains the entire
89 * probe-response frame. The DA field in the 802.11 header is zero-ed out,
90 * to be filled by the FW.
91 - * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable
92 - * this feature. Currently, only supported in mac80211 drivers.
93 + * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable
94 + * this feature during association. This is a flag attribute.
95 + * Currently only supported in mac80211 drivers.
96 + * @NL80211_ATTR_DISABLE_VHT: Force VHT capable interfaces to disable
97 + * this feature during association. This is a flag attribute.
98 + * Currently only supported in mac80211 drivers.
99 + * @NL80211_ATTR_DISABLE_HE: Force HE capable interfaces to disable
100 + * this feature during association. This is a flag attribute.
101 + * Currently only supported in mac80211 drivers.
102 * @NL80211_ATTR_HT_CAPABILITY_MASK: Specify which bits of the
103 * ATTR_HT_CAPABILITY to which attention should be paid.
104 * Currently, only mac80211 NICs support this feature.
105 @@ -2077,7 +2118,8 @@ enum nl80211_commands {
106 * until the channel switch event.
107 * @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission
108 * must be blocked on the current channel (before the channel switch
109 - * operation).
110 + * operation). Also included in the channel switch started event if quiet
111 + * was requested by the AP.
112 * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
113 * for the time while performing a channel switch.
114 * @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel
115 @@ -2527,6 +2569,33 @@ enum nl80211_commands {
116 * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in
117 * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT.
118 *
119 + * @NL80211_ATTR_SAE_PWE: Indicates the mechanism(s) allowed for SAE PWE
120 + * derivation in WPA3-Personal networks which are using SAE authentication.
121 + * This is a u8 attribute that encapsulates one of the values from
122 + * &enum nl80211_sae_pwe_mechanism.
123 + *
124 + * @NL80211_ATTR_SAR_SPEC: SAR power limitation specification when
125 + * used with %NL80211_CMD_SET_SAR_SPECS. The message contains fields
126 + * of %nl80211_sar_attrs which specifies the sar type and related
127 + * sar specs. Sar specs contains array of %nl80211_sar_specs_attrs.
128 + *
129 + * @NL80211_ATTR_RECONNECT_REQUESTED: flag attribute, used with deauth and
130 + * disassoc events to indicate that an immediate reconnect to the AP
131 + * is desired.
132 + *
133 + * @NL80211_ATTR_OBSS_COLOR_BITMAP: bitmap of the u64 BSS colors for the
134 + * %NL80211_CMD_OBSS_COLOR_COLLISION event.
135 + *
136 + * @NL80211_ATTR_COLOR_CHANGE_COUNT: u8 attribute specifying the number of TBTT's
137 + * until the color switch event.
138 + * @NL80211_ATTR_COLOR_CHANGE_COLOR: u8 attribute specifying the color that we are
139 + * switching to
140 + * @NL80211_ATTR_COLOR_CHANGE_ELEMS: Nested set of attributes containing the IE
141 + * information for the time while performing a color switch.
142 + *
143 + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
144 + * transmit power to stay within regulatory limits. u32, dBi.
145 + *
146 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
147 * @NL80211_ATTR_MAX: highest attribute number currently defined
148 * @__NL80211_ATTR_AFTER_LAST: internal use
149 @@ -3016,6 +3085,22 @@ enum nl80211_attrs {
150 NL80211_ATTR_S1G_CAPABILITY,
151 NL80211_ATTR_S1G_CAPABILITY_MASK,
152
153 + NL80211_ATTR_SAE_PWE,
154 +
155 + NL80211_ATTR_RECONNECT_REQUESTED,
156 +
157 + NL80211_ATTR_SAR_SPEC,
158 +
159 + NL80211_ATTR_DISABLE_HE,
160 +
161 + NL80211_ATTR_OBSS_COLOR_BITMAP,
162 +
163 + NL80211_ATTR_COLOR_CHANGE_COUNT,
164 + NL80211_ATTR_COLOR_CHANGE_COLOR,
165 + NL80211_ATTR_COLOR_CHANGE_ELEMS,
166 +
167 + NL80211_ATTR_WIPHY_ANTENNA_GAIN,
168 +
169 /* add attributes here, update the policy in nl80211.c */
170
171 __NL80211_ATTR_AFTER_LAST,
172 @@ -3613,6 +3698,8 @@ enum nl80211_mpath_info {
173 * defined
174 * @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities (__le16),
175 * given for all 6 GHz band channels
176 + * @NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS: vendor element capabilities that are
177 + * advertised on this band/for this iftype (binary)
178 * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
179 */
180 enum nl80211_band_iftype_attr {
181 @@ -3624,6 +3711,7 @@ enum nl80211_band_iftype_attr {
182 NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,
183 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
184 NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA,
185 + NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS,
186
187 /* keep last */
188 __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
189 @@ -5896,6 +5984,22 @@ enum nl80211_feature_flags {
190 * @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports
191 * unsolicited broadcast probe response transmission
192 *
193 + * @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate
194 + * configuration (AP/mesh) with HE rates.
195 + *
196 + * @NL80211_EXT_FEATURE_SECURE_LTF: Device supports secure LTF measurement
197 + * exchange protocol.
198 + *
199 + * @NL80211_EXT_FEATURE_SECURE_RTT: Device supports secure RTT measurement
200 + * exchange protocol.
201 + *
202 + * @NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE: Device supports management
203 + * frame protection for all management frames exchanged during the
204 + * negotiation and range measurement procedure.
205 + *
206 + * @NL80211_EXT_FEATURE_BSS_COLOR: The driver supports BSS color collision
207 + * detection and change announcemnts.
208 + *
209 * @NUM_NL80211_EXT_FEATURES: number of extended features.
210 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
211 */
212 @@ -5956,6 +6060,11 @@ enum nl80211_ext_feature_index {
213 NL80211_EXT_FEATURE_SAE_OFFLOAD_AP,
214 NL80211_EXT_FEATURE_FILS_DISCOVERY,
215 NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
216 + NL80211_EXT_FEATURE_BEACON_RATE_HE,
217 + NL80211_EXT_FEATURE_SECURE_LTF,
218 + NL80211_EXT_FEATURE_SECURE_RTT,
219 + NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
220 + NL80211_EXT_FEATURE_BSS_COLOR,
221
222 /* add new features before the definition below */
223 NUM_NL80211_EXT_FEATURES,
224 @@ -6253,11 +6362,13 @@ struct nl80211_vendor_cmd_info {
225 * @NL80211_TDLS_PEER_HT: TDLS peer is HT capable.
226 * @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable.
227 * @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable.
228 + * @NL80211_TDLS_PEER_HE: TDLS peer is HE capable.
229 */
230 enum nl80211_tdls_peer_capability {
231 NL80211_TDLS_PEER_HT = 1<<0,
232 NL80211_TDLS_PEER_VHT = 1<<1,
233 NL80211_TDLS_PEER_WMM = 1<<2,
234 + NL80211_TDLS_PEER_HE = 1<<3,
235 };
236
237 /**
238 @@ -6849,6 +6960,12 @@ enum nl80211_peer_measurement_ftm_capa {
239 * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor
240 * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based
241 * ranging will be used.
242 + * @NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK: negotiate for LMR feedback. Only
243 + * valid if either %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED or
244 + * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
245 + * @NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR: optional. The BSS color of the
246 + * responder. Only valid if %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED
247 + * or %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED is set.
248 *
249 * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
250 * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
251 @@ -6867,6 +6984,8 @@ enum nl80211_peer_measurement_ftm_req {
252 NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,
253 NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED,
254 NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
255 + NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
256 + NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR,
257
258 /* keep last */
259 NUM_NL80211_PMSR_FTM_REQ_ATTR,
260 @@ -7124,4 +7243,115 @@ enum nl80211_unsol_bcast_probe_resp_attr
261 NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX =
262 __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1
263 };
264 +
265 +/**
266 + * enum nl80211_sae_pwe_mechanism - The mechanism(s) allowed for SAE PWE
267 + * derivation. Applicable only when WPA3-Personal SAE authentication is
268 + * used.
269 + *
270 + * @NL80211_SAE_PWE_UNSPECIFIED: not specified, used internally to indicate that
271 + * attribute is not present from userspace.
272 + * @NL80211_SAE_PWE_HUNT_AND_PECK: hunting-and-pecking loop only
273 + * @NL80211_SAE_PWE_HASH_TO_ELEMENT: hash-to-element only
274 + * @NL80211_SAE_PWE_BOTH: both hunting-and-pecking loop and hash-to-element
275 + * can be used.
276 + */
277 +enum nl80211_sae_pwe_mechanism {
278 + NL80211_SAE_PWE_UNSPECIFIED,
279 + NL80211_SAE_PWE_HUNT_AND_PECK,
280 + NL80211_SAE_PWE_HASH_TO_ELEMENT,
281 + NL80211_SAE_PWE_BOTH,
282 +};
283 +
284 +/**
285 + * enum nl80211_sar_type - type of SAR specs
286 + *
287 + * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit
288 + *
289 + */
290 +enum nl80211_sar_type {
291 + NL80211_SAR_TYPE_POWER,
292 +
293 + /* add new type here */
294 +
295 + /* Keep last */
296 + NUM_NL80211_SAR_TYPE,
297 +};
298 +
299 +/**
300 + * enum nl80211_sar_attrs - Attributes for SAR spec
301 + *
302 + * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type.
303 + *
304 + * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power
305 + * limit specifications. Each specification contains a set
306 + * of %nl80211_sar_specs_attrs.
307 + *
308 + * For SET operation, it contains array of %NL80211_SAR_ATTR_SPECS_POWER
309 + * and %NL80211_SAR_ATTR_SPECS_RANGE_INDEX.
310 + *
311 + * For sar_capa dump, it contains array of
312 + * %NL80211_SAR_ATTR_SPECS_START_FREQ
313 + * and %NL80211_SAR_ATTR_SPECS_END_FREQ.
314 + *
315 + * @__NL80211_SAR_ATTR_LAST: Internal
316 + * @NL80211_SAR_ATTR_MAX: highest sar attribute
317 + *
318 + * These attributes are used with %NL80211_CMD_SET_SAR_SPEC
319 + */
320 +enum nl80211_sar_attrs {
321 + __NL80211_SAR_ATTR_INVALID,
322 +
323 + NL80211_SAR_ATTR_TYPE,
324 + NL80211_SAR_ATTR_SPECS,
325 +
326 + __NL80211_SAR_ATTR_LAST,
327 + NL80211_SAR_ATTR_MAX = __NL80211_SAR_ATTR_LAST - 1,
328 +};
329 +
330 +/**
331 + * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs
332 + *
333 + * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual
334 + * power limit value in units of 0.25 dBm if type is
335 + * NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm).
336 + * 0 means userspace doesn't have SAR limitation on this associated range.
337 + *
338 + * @NL80211_SAR_ATTR_SPECS_RANGE_INDEX: Required (u32) value to specify the
339 + * index of exported freq range table and the associated power limitation
340 + * is applied to this range.
341 + *
342 + * Userspace isn't required to set all the ranges advertised by WLAN driver,
343 + * and userspace can skip some certain ranges. These skipped ranges don't
344 + * have SAR limitations, and they are same as setting the
345 + * %NL80211_SAR_ATTR_SPECS_POWER to any unreasonable high value because any
346 + * value higher than regulatory allowed value just means SAR power
347 + * limitation is removed, but it's required to set at least one range.
348 + * It's not allowed to set duplicated range in one SET operation.
349 + *
350 + * Every SET operation overwrites previous SET operation.
351 + *
352 + * @NL80211_SAR_ATTR_SPECS_START_FREQ: Required (u32) value to specify the start
353 + * frequency of this range edge when registering SAR capability to wiphy.
354 + * It's not a channel center frequency. The unit is kHz.
355 + *
356 + * @NL80211_SAR_ATTR_SPECS_END_FREQ: Required (u32) value to specify the end
357 + * frequency of this range edge when registering SAR capability to wiphy.
358 + * It's not a channel center frequency. The unit is kHz.
359 + *
360 + * @__NL80211_SAR_ATTR_SPECS_LAST: Internal
361 + * @NL80211_SAR_ATTR_SPECS_MAX: highest sar specs attribute
362 + */
363 +enum nl80211_sar_specs_attrs {
364 + __NL80211_SAR_ATTR_SPECS_INVALID,
365 +
366 + NL80211_SAR_ATTR_SPECS_POWER,
367 + NL80211_SAR_ATTR_SPECS_RANGE_INDEX,
368 + NL80211_SAR_ATTR_SPECS_START_FREQ,
369 + NL80211_SAR_ATTR_SPECS_END_FREQ,
370 +
371 + __NL80211_SAR_ATTR_SPECS_LAST,
372 + NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1,
373 +};
374 +
375 #endif /* __LINUX_NL80211_H */