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