mac80211: sync nl80211.h with upstream and backport a WPA3 related commit
[openwrt/staging/ynezz.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,10 @@
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_MAX: highest used command number
32 * @__NL80211_CMD_AFTER_LAST: internal use
33 */
34 @@ -1407,6 +1415,8 @@ enum nl80211_commands {
35
36 NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS,
37
38 + NL80211_CMD_SET_SAR_SPECS,
39 +
40 /* add new commands above here */
41
42 /* used to define NL80211_CMD_MAX below */
43 @@ -1750,8 +1760,9 @@ enum nl80211_commands {
44 * specify just a single bitrate, which is to be used for the beacon.
45 * The driver must also specify support for this with the extended
46 * features NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
47 - * NL80211_EXT_FEATURE_BEACON_RATE_HT and
48 - * NL80211_EXT_FEATURE_BEACON_RATE_VHT.
49 + * NL80211_EXT_FEATURE_BEACON_RATE_HT,
50 + * NL80211_EXT_FEATURE_BEACON_RATE_VHT and
51 + * NL80211_EXT_FEATURE_BEACON_RATE_HE.
52 *
53 * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
54 * at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.
55 @@ -1955,8 +1966,15 @@ enum nl80211_commands {
56 * @NL80211_ATTR_PROBE_RESP: Probe Response template data. Contains the entire
57 * probe-response frame. The DA field in the 802.11 header is zero-ed out,
58 * to be filled by the FW.
59 - * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable
60 - * this feature. Currently, only supported in mac80211 drivers.
61 + * @NL80211_ATTR_DISABLE_HT: Force HT capable interfaces to disable
62 + * this feature during association. This is a flag attribute.
63 + * Currently only supported in mac80211 drivers.
64 + * @NL80211_ATTR_DISABLE_VHT: Force VHT capable interfaces to disable
65 + * this feature during association. This is a flag attribute.
66 + * Currently only supported in mac80211 drivers.
67 + * @NL80211_ATTR_DISABLE_HE: Force HE capable interfaces to disable
68 + * this feature during association. This is a flag attribute.
69 + * Currently only supported in mac80211 drivers.
70 * @NL80211_ATTR_HT_CAPABILITY_MASK: Specify which bits of the
71 * ATTR_HT_CAPABILITY to which attention should be paid.
72 * Currently, only mac80211 NICs support this feature.
73 @@ -2077,7 +2095,8 @@ enum nl80211_commands {
74 * until the channel switch event.
75 * @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission
76 * must be blocked on the current channel (before the channel switch
77 - * operation).
78 + * operation). Also included in the channel switch started event if quiet
79 + * was requested by the AP.
80 * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
81 * for the time while performing a channel switch.
82 * @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel
83 @@ -2527,6 +2546,23 @@ enum nl80211_commands {
84 * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in
85 * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT.
86 *
87 + * @NL80211_ATTR_SAE_PWE: Indicates the mechanism(s) allowed for SAE PWE
88 + * derivation in WPA3-Personal networks which are using SAE authentication.
89 + * This is a u8 attribute that encapsulates one of the values from
90 + * &enum nl80211_sae_pwe_mechanism.
91 + *
92 + * @NL80211_ATTR_SAR_SPEC: SAR power limitation specification when
93 + * used with %NL80211_CMD_SET_SAR_SPECS. The message contains fields
94 + * of %nl80211_sar_attrs which specifies the sar type and related
95 + * sar specs. Sar specs contains array of %nl80211_sar_specs_attrs.
96 + *
97 + * @NL80211_ATTR_RECONNECT_REQUESTED: flag attribute, used with deauth and
98 + * disassoc events to indicate that an immediate reconnect to the AP
99 + * is desired.
100 + *
101 + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
102 + * transmit power to stay within regulatory limits. u32, dBi.
103 + *
104 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
105 * @NL80211_ATTR_MAX: highest attribute number currently defined
106 * @__NL80211_ATTR_AFTER_LAST: internal use
107 @@ -3016,6 +3052,16 @@ enum nl80211_attrs {
108 NL80211_ATTR_S1G_CAPABILITY,
109 NL80211_ATTR_S1G_CAPABILITY_MASK,
110
111 + NL80211_ATTR_SAE_PWE,
112 +
113 + NL80211_ATTR_RECONNECT_REQUESTED,
114 +
115 + NL80211_ATTR_SAR_SPEC,
116 +
117 + NL80211_ATTR_DISABLE_HE,
118 +
119 + NL80211_ATTR_WIPHY_ANTENNA_GAIN,
120 +
121 /* add attributes here, update the policy in nl80211.c */
122
123 __NL80211_ATTR_AFTER_LAST,
124 @@ -5896,6 +5942,19 @@ enum nl80211_feature_flags {
125 * @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports
126 * unsolicited broadcast probe response transmission
127 *
128 + * @NL80211_EXT_FEATURE_BEACON_RATE_HE: Driver supports beacon rate
129 + * configuration (AP/mesh) with HE rates.
130 + *
131 + * @NL80211_EXT_FEATURE_SECURE_LTF: Device supports secure LTF measurement
132 + * exchange protocol.
133 + *
134 + * @NL80211_EXT_FEATURE_SECURE_RTT: Device supports secure RTT measurement
135 + * exchange protocol.
136 + *
137 + * @NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE: Device supports management
138 + * frame protection for all management frames exchanged during the
139 + * negotiation and range measurement procedure.
140 + *
141 * @NUM_NL80211_EXT_FEATURES: number of extended features.
142 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
143 */
144 @@ -5956,6 +6015,10 @@ enum nl80211_ext_feature_index {
145 NL80211_EXT_FEATURE_SAE_OFFLOAD_AP,
146 NL80211_EXT_FEATURE_FILS_DISCOVERY,
147 NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
148 + NL80211_EXT_FEATURE_BEACON_RATE_HE,
149 + NL80211_EXT_FEATURE_SECURE_LTF,
150 + NL80211_EXT_FEATURE_SECURE_RTT,
151 + NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
152
153 /* add new features before the definition below */
154 NUM_NL80211_EXT_FEATURES,
155 @@ -6253,11 +6316,13 @@ struct nl80211_vendor_cmd_info {
156 * @NL80211_TDLS_PEER_HT: TDLS peer is HT capable.
157 * @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable.
158 * @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable.
159 + * @NL80211_TDLS_PEER_HE: TDLS peer is HE capable.
160 */
161 enum nl80211_tdls_peer_capability {
162 NL80211_TDLS_PEER_HT = 1<<0,
163 NL80211_TDLS_PEER_VHT = 1<<1,
164 NL80211_TDLS_PEER_WMM = 1<<2,
165 + NL80211_TDLS_PEER_HE = 1<<3,
166 };
167
168 /**
169 @@ -6849,6 +6914,9 @@ enum nl80211_peer_measurement_ftm_capa {
170 * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor
171 * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based
172 * ranging will be used.
173 + * @NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK: negotiate for LMR feedback. Only
174 + * valid if either %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED or
175 + * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set.
176 *
177 * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
178 * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
179 @@ -6867,6 +6935,7 @@ enum nl80211_peer_measurement_ftm_req {
180 NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,
181 NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED,
182 NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
183 + NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK,
184
185 /* keep last */
186 NUM_NL80211_PMSR_FTM_REQ_ATTR,
187 @@ -7124,4 +7193,115 @@ enum nl80211_unsol_bcast_probe_resp_attr
188 NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX =
189 __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1
190 };
191 +
192 +/**
193 + * enum nl80211_sae_pwe_mechanism - The mechanism(s) allowed for SAE PWE
194 + * derivation. Applicable only when WPA3-Personal SAE authentication is
195 + * used.
196 + *
197 + * @NL80211_SAE_PWE_UNSPECIFIED: not specified, used internally to indicate that
198 + * attribute is not present from userspace.
199 + * @NL80211_SAE_PWE_HUNT_AND_PECK: hunting-and-pecking loop only
200 + * @NL80211_SAE_PWE_HASH_TO_ELEMENT: hash-to-element only
201 + * @NL80211_SAE_PWE_BOTH: both hunting-and-pecking loop and hash-to-element
202 + * can be used.
203 + */
204 +enum nl80211_sae_pwe_mechanism {
205 + NL80211_SAE_PWE_UNSPECIFIED,
206 + NL80211_SAE_PWE_HUNT_AND_PECK,
207 + NL80211_SAE_PWE_HASH_TO_ELEMENT,
208 + NL80211_SAE_PWE_BOTH,
209 +};
210 +
211 +/**
212 + * enum nl80211_sar_type - type of SAR specs
213 + *
214 + * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit
215 + *
216 + */
217 +enum nl80211_sar_type {
218 + NL80211_SAR_TYPE_POWER,
219 +
220 + /* add new type here */
221 +
222 + /* Keep last */
223 + NUM_NL80211_SAR_TYPE,
224 +};
225 +
226 +/**
227 + * enum nl80211_sar_attrs - Attributes for SAR spec
228 + *
229 + * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type.
230 + *
231 + * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power
232 + * limit specifications. Each specification contains a set
233 + * of %nl80211_sar_specs_attrs.
234 + *
235 + * For SET operation, it contains array of %NL80211_SAR_ATTR_SPECS_POWER
236 + * and %NL80211_SAR_ATTR_SPECS_RANGE_INDEX.
237 + *
238 + * For sar_capa dump, it contains array of
239 + * %NL80211_SAR_ATTR_SPECS_START_FREQ
240 + * and %NL80211_SAR_ATTR_SPECS_END_FREQ.
241 + *
242 + * @__NL80211_SAR_ATTR_LAST: Internal
243 + * @NL80211_SAR_ATTR_MAX: highest sar attribute
244 + *
245 + * These attributes are used with %NL80211_CMD_SET_SAR_SPEC
246 + */
247 +enum nl80211_sar_attrs {
248 + __NL80211_SAR_ATTR_INVALID,
249 +
250 + NL80211_SAR_ATTR_TYPE,
251 + NL80211_SAR_ATTR_SPECS,
252 +
253 + __NL80211_SAR_ATTR_LAST,
254 + NL80211_SAR_ATTR_MAX = __NL80211_SAR_ATTR_LAST - 1,
255 +};
256 +
257 +/**
258 + * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs
259 + *
260 + * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual
261 + * power limit value in units of 0.25 dBm if type is
262 + * NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm).
263 + * 0 means userspace doesn't have SAR limitation on this associated range.
264 + *
265 + * @NL80211_SAR_ATTR_SPECS_RANGE_INDEX: Required (u32) value to specify the
266 + * index of exported freq range table and the associated power limitation
267 + * is applied to this range.
268 + *
269 + * Userspace isn't required to set all the ranges advertised by WLAN driver,
270 + * and userspace can skip some certain ranges. These skipped ranges don't
271 + * have SAR limitations, and they are same as setting the
272 + * %NL80211_SAR_ATTR_SPECS_POWER to any unreasonable high value because any
273 + * value higher than regulatory allowed value just means SAR power
274 + * limitation is removed, but it's required to set at least one range.
275 + * It's not allowed to set duplicated range in one SET operation.
276 + *
277 + * Every SET operation overwrites previous SET operation.
278 + *
279 + * @NL80211_SAR_ATTR_SPECS_START_FREQ: Required (u32) value to specify the start
280 + * frequency of this range edge when registering SAR capability to wiphy.
281 + * It's not a channel center frequency. The unit is kHz.
282 + *
283 + * @NL80211_SAR_ATTR_SPECS_END_FREQ: Required (u32) value to specify the end
284 + * frequency of this range edge when registering SAR capability to wiphy.
285 + * It's not a channel center frequency. The unit is kHz.
286 + *
287 + * @__NL80211_SAR_ATTR_SPECS_LAST: Internal
288 + * @NL80211_SAR_ATTR_SPECS_MAX: highest sar specs attribute
289 + */
290 +enum nl80211_sar_specs_attrs {
291 + __NL80211_SAR_ATTR_SPECS_INVALID,
292 +
293 + NL80211_SAR_ATTR_SPECS_POWER,
294 + NL80211_SAR_ATTR_SPECS_RANGE_INDEX,
295 + NL80211_SAR_ATTR_SPECS_START_FREQ,
296 + NL80211_SAR_ATTR_SPECS_END_FREQ,
297 +
298 + __NL80211_SAR_ATTR_SPECS_LAST,
299 + NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1,
300 +};
301 +
302 #endif /* __LINUX_NL80211_H */