iw: sync nl80211.h with mac80211 package
[openwrt/staging/yousong.git] / package / network / utils / iw / patches / 001-nl80211_h_sync.patch
1 --- a/nl80211.h
2 +++ b/nl80211.h
3 @@ -323,7 +323,7 @@
4 * @NL80211_CMD_GET_SCAN: get scan results
5 * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
6 * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
7 - * probe requests at CCK rate or not. %NL80211_ATTR_MAC can be used to
8 + * probe requests at CCK rate or not. %NL80211_ATTR_BSSID can be used to
9 * specify a BSSID to scan for; if not included, the wildcard BSSID will
10 * be used.
11 * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
12 @@ -600,6 +600,20 @@
13 *
14 * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface.
15 *
16 + * @NL80211_CMD_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform
17 + * multicast to unicast conversion. When enabled, all multicast packets
18 + * with ethertype ARP, IPv4 or IPv6 (possibly within an 802.1Q header)
19 + * will be sent out to each station once with the destination (multicast)
20 + * MAC address replaced by the station's MAC address. Note that this may
21 + * break certain expectations of the receiver, e.g. the ability to drop
22 + * unicast IP packets encapsulated in multicast L2 frames, or the ability
23 + * to not send destination unreachable messages in such cases.
24 + * This can only be toggled per BSS. Configure this on an interface of
25 + * type %NL80211_IFTYPE_AP. It applies to all its VLAN interfaces
26 + * (%NL80211_IFTYPE_AP_VLAN), except for those in 4addr (WDS) mode.
27 + * If %NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED is not present with this
28 + * command, the feature is disabled.
29 + *
30 * @NL80211_CMD_JOIN_MESH: Join a mesh. The mesh ID must be given, and initial
31 * mesh config parameters may be given.
32 * @NL80211_CMD_LEAVE_MESH: Leave the mesh network -- no special arguments, the
33 @@ -874,6 +888,12 @@
34 * This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and
35 * %NL80211_ATTR_COOKIE.
36 *
37 + * @NL80211_CMD_UPDATE_CONNECT_PARAMS: Update one or more connect parameters
38 + * for subsequent roaming cases if the driver or firmware uses internal
39 + * BSS selection. This command can be issued only while connected and it
40 + * does not result in a change for the current association. Currently,
41 + * only the %NL80211_ATTR_IE data is used and updated with this command.
42 + *
43 * @NL80211_CMD_MAX: highest used command number
44 * @__NL80211_CMD_AFTER_LAST: internal use
45 */
46 @@ -1069,6 +1089,10 @@ enum nl80211_commands {
47 NL80211_CMD_CHANGE_NAN_CONFIG,
48 NL80211_CMD_NAN_MATCH,
49
50 + NL80211_CMD_SET_MULTICAST_TO_UNICAST,
51 +
52 + NL80211_CMD_UPDATE_CONNECT_PARAMS,
53 +
54 /* add new commands above here */
55
56 /* used to define NL80211_CMD_MAX below */
57 @@ -1638,8 +1662,16 @@ enum nl80211_commands {
58 * the connection request from a station. nl80211_connect_failed_reason
59 * enum has different reasons of connection failure.
60 *
61 - * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts
62 - * with the Authentication transaction sequence number field.
63 + * @NL80211_ATTR_AUTH_DATA: Fields and elements in Authentication frames.
64 + * This contains the authentication frame body (non-IE and IE data),
65 + * excluding the Authentication algorithm number, i.e., starting at the
66 + * Authentication transaction sequence number field. It is used with
67 + * authentication algorithms that need special fields to be added into
68 + * the frames (SAE and FILS). Currently, only the SAE cases use the
69 + * initial two fields (Authentication transaction sequence number and
70 + * Status code). However, those fields are included in the attribute data
71 + * for all authentication algorithms to keep the attribute definition
72 + * consistent.
73 *
74 * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from
75 * association request when used with NL80211_CMD_NEW_STATION)
76 @@ -1740,7 +1772,9 @@ enum nl80211_commands {
77 *
78 * @NL80211_ATTR_OPMODE_NOTIF: Operating mode field from Operating Mode
79 * Notification Element based on association request when used with
80 - * %NL80211_CMD_NEW_STATION; u8 attribute.
81 + * %NL80211_CMD_NEW_STATION or %NL80211_CMD_SET_STATION (only when
82 + * %NL80211_FEATURE_FULL_AP_CLIENT_STATE is supported, or with TDLS);
83 + * u8 attribute.
84 *
85 * @NL80211_ATTR_VENDOR_ID: The vendor ID, either a 24-bit OUI or, if
86 * %NL80211_VENDOR_ID_IS_LINUX is set, a special Linux ID (not used yet)
87 @@ -1788,6 +1822,8 @@ enum nl80211_commands {
88 * and remove functions. NAN notifications will be sent in unicast to that
89 * socket. Without this attribute, any socket can add functions and the
90 * notifications will be sent to the %NL80211_MCGRP_NAN multicast group.
91 + * If set during %NL80211_CMD_ASSOCIATE or %NL80211_CMD_CONNECT the
92 + * station will deauthenticate when the socket is closed.
93 *
94 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
95 * the TDLS link initiator.
96 @@ -1936,6 +1972,38 @@ enum nl80211_commands {
97 * attribute.
98 * @NL80211_ATTR_NAN_MATCH: used to report a match. This is a nested attribute.
99 * See &enum nl80211_nan_match_attributes.
100 + * @NL80211_ATTR_FILS_KEK: KEK for FILS (Re)Association Request/Response frame
101 + * protection.
102 + * @NL80211_ATTR_FILS_NONCES: Nonces (part of AAD) for FILS (Re)Association
103 + * Request/Response frame protection. This attribute contains the 16 octet
104 + * STA Nonce followed by 16 octets of AP Nonce.
105 + *
106 + * @NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED: Indicates whether or not multicast
107 + * packets should be send out as unicast to all stations (flag attribute).
108 + *
109 + * @NL80211_ATTR_BSSID: The BSSID of the AP. Note that %NL80211_ATTR_MAC is also
110 + * used in various commands/events for specifying the BSSID.
111 + *
112 + * @NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI: Relative RSSI threshold by which
113 + * other BSSs has to be better or slightly worse than the current
114 + * connected BSS so that they get reported to user space.
115 + * This will give an opportunity to userspace to consider connecting to
116 + * other matching BSSs which have better or slightly worse RSSI than
117 + * the current connected BSS by using an offloaded operation to avoid
118 + * unnecessary wakeups.
119 + *
120 + * @NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST: When present the RSSI level for BSSs in
121 + * the specified band is to be adjusted before doing
122 + * %NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI based comparision to figure out
123 + * better BSSs. The attribute value is a packed structure
124 + * value as specified by &struct nl80211_bss_select_rssi_adjust.
125 + *
126 + * @NL80211_ATTR_TIMEOUT_REASON: The reason for which an operation timed out.
127 + * u32 attribute with an &enum nl80211_timeout_reason value. This is used,
128 + * e.g., with %NL80211_CMD_CONNECT event.
129 + *
130 + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
131 + * transmit power to stay within regulatory limits. u32, dBi.
132 *
133 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
134 * @NL80211_ATTR_MAX: highest attribute number currently defined
135 @@ -2195,7 +2263,7 @@ enum nl80211_attrs {
136
137 NL80211_ATTR_CONN_FAILED_REASON,
138
139 - NL80211_ATTR_SAE_DATA,
140 + NL80211_ATTR_AUTH_DATA,
141
142 NL80211_ATTR_VHT_CAPABILITY,
143
144 @@ -2336,6 +2404,20 @@ enum nl80211_attrs {
145 NL80211_ATTR_NAN_FUNC,
146 NL80211_ATTR_NAN_MATCH,
147
148 + NL80211_ATTR_FILS_KEK,
149 + NL80211_ATTR_FILS_NONCES,
150 +
151 + NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED,
152 +
153 + NL80211_ATTR_BSSID,
154 +
155 + NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI,
156 + NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST,
157 +
158 + NL80211_ATTR_TIMEOUT_REASON,
159 +
160 + NL80211_ATTR_WIPHY_ANTENNA_GAIN,
161 +
162 /* add attributes here, update the policy in nl80211.c */
163
164 __NL80211_ATTR_AFTER_LAST,
165 @@ -2347,6 +2429,7 @@ enum nl80211_attrs {
166 #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION
167 #define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
168 #define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER
169 +#define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
170
171 /*
172 * Allow user space programs to use #ifdef on new attributes by defining them
173 @@ -3027,6 +3110,13 @@ enum nl80211_reg_rule_attr {
174 * how this API was implemented in the past. Also, due to the same problem,
175 * the only way to create a matchset with only an RSSI filter (with this
176 * attribute) is if there's only a single matchset with the RSSI attribute.
177 + * @NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI: Flag indicating whether
178 + * %NL80211_SCHED_SCAN_MATCH_ATTR_RSSI to be used as absolute RSSI or
179 + * relative to current bss's RSSI.
180 + * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST: When present the RSSI level for
181 + * BSS-es in the specified band is to be adjusted before doing
182 + * RSSI-based BSS selection. The attribute value is a packed structure
183 + * value as specified by &struct nl80211_bss_select_rssi_adjust.
184 * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
185 * attribute number currently defined
186 * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
187 @@ -3036,6 +3126,8 @@ enum nl80211_sched_scan_match_attr {
188
189 NL80211_SCHED_SCAN_MATCH_ATTR_SSID,
190 NL80211_SCHED_SCAN_MATCH_ATTR_RSSI,
191 + NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI,
192 + NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST,
193
194 /* keep last */
195 __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
196 @@ -3660,6 +3752,9 @@ enum nl80211_bss_status {
197 * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r)
198 * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP)
199 * @NL80211_AUTHTYPE_SAE: Simultaneous authentication of equals
200 + * @NL80211_AUTHTYPE_FILS_SK: Fast Initial Link Setup shared key
201 + * @NL80211_AUTHTYPE_FILS_SK_PFS: Fast Initial Link Setup shared key with PFS
202 + * @NL80211_AUTHTYPE_FILS_PK: Fast Initial Link Setup public key
203 * @__NL80211_AUTHTYPE_NUM: internal
204 * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm
205 * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by
206 @@ -3672,6 +3767,9 @@ enum nl80211_auth_type {
207 NL80211_AUTHTYPE_FT,
208 NL80211_AUTHTYPE_NETWORK_EAP,
209 NL80211_AUTHTYPE_SAE,
210 + NL80211_AUTHTYPE_FILS_SK,
211 + NL80211_AUTHTYPE_FILS_SK_PFS,
212 + NL80211_AUTHTYPE_FILS_PK,
213
214 /* keep last */
215 __NL80211_AUTHTYPE_NUM,
216 @@ -4280,6 +4378,9 @@ enum nl80211_iface_limit_attrs {
217 * of supported channel widths for radar detection.
218 * @NL80211_IFACE_COMB_RADAR_DETECT_REGIONS: u32 attribute containing the bitmap
219 * of supported regulatory regions for radar detection.
220 + * @NL80211_IFACE_COMB_BI_MIN_GCD: u32 attribute specifying the minimum GCD of
221 + * different beacon intervals supported by all the interface combinations
222 + * in this group (if not present, all beacon intervals be identical).
223 * @NUM_NL80211_IFACE_COMB: number of attributes
224 * @MAX_NL80211_IFACE_COMB: highest attribute number
225 *
226 @@ -4287,8 +4388,8 @@ enum nl80211_iface_limit_attrs {
227 * limits = [ #{STA} <= 1, #{AP} <= 1 ], matching BI, channels = 1, max = 2
228 * => allows an AP and a STA that must match BIs
229 *
230 - * numbers = [ #{AP, P2P-GO} <= 8 ], channels = 1, max = 8
231 - * => allows 8 of AP/GO
232 + * numbers = [ #{AP, P2P-GO} <= 8 ], BI min gcd, channels = 1, max = 8,
233 + * => allows 8 of AP/GO that can have BI gcd >= min gcd
234 *
235 * numbers = [ #{STA} <= 2 ], channels = 2, max = 2
236 * => allows two STAs on different channels
237 @@ -4314,6 +4415,7 @@ enum nl80211_if_combination_attrs {
238 NL80211_IFACE_COMB_NUM_CHANNELS,
239 NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
240 NL80211_IFACE_COMB_RADAR_DETECT_REGIONS,
241 + NL80211_IFACE_COMB_BI_MIN_GCD,
242
243 /* keep last */
244 NUM_NL80211_IFACE_COMB,
245 @@ -4634,6 +4736,15 @@ enum nl80211_feature_flags {
246 * configuration (AP/mesh) with HT rates.
247 * @NL80211_EXT_FEATURE_BEACON_RATE_VHT: Driver supports beacon rate
248 * configuration (AP/mesh) with VHT rates.
249 + * @NL80211_EXT_FEATURE_FILS_STA: This driver supports Fast Initial Link Setup
250 + * with user space SME (NL80211_CMD_AUTHENTICATE) in station mode.
251 + * @NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA: This driver supports randomized TA
252 + * in @NL80211_CMD_FRAME while not associated.
253 + * @NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED: This driver supports
254 + * randomized TA in @NL80211_CMD_FRAME while associated.
255 + * @NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI: The driver supports sched_scan
256 + * for reporting BSSs with better RSSI than the current connected BSS
257 + * (%NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI).
258 *
259 * @NUM_NL80211_EXT_FEATURES: number of extended features.
260 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
261 @@ -4648,6 +4759,10 @@ enum nl80211_ext_feature_index {
262 NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
263 NL80211_EXT_FEATURE_BEACON_RATE_HT,
264 NL80211_EXT_FEATURE_BEACON_RATE_VHT,
265 + NL80211_EXT_FEATURE_FILS_STA,
266 + NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA,
267 + NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED,
268 + NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI,
269
270 /* add new features before the definition below */
271 NUM_NL80211_EXT_FEATURES,
272 @@ -4687,6 +4802,21 @@ enum nl80211_connect_failed_reason {
273 };
274
275 /**
276 + * enum nl80211_timeout_reason - timeout reasons
277 + *
278 + * @NL80211_TIMEOUT_UNSPECIFIED: Timeout reason unspecified.
279 + * @NL80211_TIMEOUT_SCAN: Scan (AP discovery) timed out.
280 + * @NL80211_TIMEOUT_AUTH: Authentication timed out.
281 + * @NL80211_TIMEOUT_ASSOC: Association timed out.
282 + */
283 +enum nl80211_timeout_reason {
284 + NL80211_TIMEOUT_UNSPECIFIED,
285 + NL80211_TIMEOUT_SCAN,
286 + NL80211_TIMEOUT_AUTH,
287 + NL80211_TIMEOUT_ASSOC,
288 +};
289 +
290 +/**
291 * enum nl80211_scan_flags - scan request control flags
292 *
293 * Scan request control flags are used to control the handling
294 @@ -4900,8 +5030,9 @@ enum nl80211_sched_scan_plan {
295 /**
296 * struct nl80211_bss_select_rssi_adjust - RSSI adjustment parameters.
297 *
298 - * @band: band of BSS that must match for RSSI value adjustment.
299 - * @delta: value used to adjust the RSSI value of matching BSS.
300 + * @band: band of BSS that must match for RSSI value adjustment. The value
301 + * of this field is according to &enum nl80211_band.
302 + * @delta: value used to adjust the RSSI value of matching BSS in dB.
303 */
304 struct nl80211_bss_select_rssi_adjust {
305 __u8 band;