WIP: rework image builder code for x86
[openwrt/staging/lynxis.git] / package / network / utils / iw / patches / 001-nl80211_h_sync.patch
1 diff --git a/nl80211.h b/nl80211.h
2 index 31ae5c7..9fb7370 100644
3 --- a/nl80211.h
4 +++ b/nl80211.h
5 @@ -11,7 +11,7 @@
6 * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
7 * Copyright 2008 Colin McCabe <colin@cozybit.com>
8 * Copyright 2015-2017 Intel Deutschland GmbH
9 - * Copyright (C) 2018 Intel Corporation
10 + * Copyright (C) 2018-2019 Intel Corporation
11 *
12 * Permission to use, copy, modify, and/or distribute this software for any
13 * purpose with or without fee is hereby granted, provided that the above
14 @@ -1065,6 +1065,26 @@
15 * indicated by %NL80211_ATTR_WIPHY_FREQ and other attributes
16 * determining the width and type.
17 *
18 + * @NL80211_CMD_UPDATE_OWE_INFO: This interface allows the host driver to
19 + * offload OWE processing to user space. This intends to support
20 + * OWE AKM by the host drivers that implement SME but rely
21 + * on the user space for the cryptographic/DH IE processing in AP mode.
22 + *
23 + * @NL80211_CMD_PROBE_MESH_LINK: The requirement for mesh link metric
24 + * refreshing, is that from one mesh point we be able to send some data
25 + * frames to other mesh points which are not currently selected as a
26 + * primary traffic path, but which are only 1 hop away. The absence of
27 + * the primary path to the chosen node makes it necessary to apply some
28 + * form of marking on a chosen packet stream so that the packets can be
29 + * properly steered to the selected node for testing, and not by the
30 + * regular mesh path lookup. Further, the packets must be of type data
31 + * so that the rate control (often embedded in firmware) is used for
32 + * rate selection.
33 + *
34 + * Here attribute %NL80211_ATTR_MAC is used to specify connected mesh
35 + * peer MAC address and %NL80211_ATTR_FRAME is used to specify the frame
36 + * content. The frame is ethernet data.
37 + *
38 * @NL80211_CMD_MAX: highest used command number
39 * @__NL80211_CMD_AFTER_LAST: internal use
40 */
41 @@ -1285,6 +1305,10 @@ enum nl80211_commands {
42
43 NL80211_CMD_NOTIFY_RADAR,
44
45 + NL80211_CMD_UPDATE_OWE_INFO,
46 +
47 + NL80211_CMD_PROBE_MESH_LINK,
48 +
49 /* add new commands above here */
50
51 /* used to define NL80211_CMD_MAX below */
52 @@ -1565,6 +1589,12 @@ enum nl80211_commands {
53 * (a u32 with flags from &enum nl80211_wpa_versions).
54 * @NL80211_ATTR_AKM_SUITES: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
55 * indicate which key management algorithm(s) to use (an array of u32).
56 + * This attribute is also sent in response to @NL80211_CMD_GET_WIPHY,
57 + * indicating the supported AKM suites, intended for specific drivers which
58 + * implement SME and have constraints on which AKMs are supported and also
59 + * the cases where an AKM support is offloaded to the driver/firmware.
60 + * If there is no such notification from the driver, user space should
61 + * assume the driver supports all the AKM suites.
62 *
63 * @NL80211_ATTR_REQ_IE: (Re)association request information elements as
64 * sent out by the card, for ROAM and successful CONNECT events.
65 @@ -2260,10 +2290,10 @@ enum nl80211_commands {
66 * &enum nl80211_external_auth_action value). This is used with the
67 * %NL80211_CMD_EXTERNAL_AUTH request event.
68 * @NL80211_ATTR_EXTERNAL_AUTH_SUPPORT: Flag attribute indicating that the user
69 - * space supports external authentication. This attribute shall be used
70 - * only with %NL80211_CMD_CONNECT request. The driver may offload
71 - * authentication processing to user space if this capability is indicated
72 - * in NL80211_CMD_CONNECT requests from the user space.
73 + * space supports external authentication. This attribute shall be used
74 + * with %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP request. The driver
75 + * may offload authentication processing to user space if this capability
76 + * is indicated in the respective requests from the user space.
77 *
78 * @NL80211_ATTR_NSS: Station's New/updated RX_NSS value notified using this
79 * u8 attribute. This is used with %NL80211_CMD_STA_OPMODE_CHANGED.
80 @@ -2299,6 +2329,21 @@ enum nl80211_commands {
81 * This is also used for capability advertisement in the wiphy information,
82 * with the appropriate sub-attributes.
83 *
84 + * @NL80211_ATTR_AIRTIME_WEIGHT: Station's weight when scheduled by the airtime
85 + * scheduler.
86 + *
87 + * @NL80211_ATTR_STA_TX_POWER_SETTING: Transmit power setting type (u8) for
88 + * station associated with the AP. See &enum nl80211_tx_power_setting for
89 + * possible values.
90 + * @NL80211_ATTR_STA_TX_POWER: Transmit power level (s16) in dBm units. This
91 + * allows to set Tx power for a station. If this attribute is not included,
92 + * the default per-interface tx power setting will be overriding. Driver
93 + * should be picking up the lowest tx power, either tx power per-interface
94 + * or per-station.
95 + *
96 + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
97 + * transmit power to stay within regulatory limits. u32, dBi.
98 + *
99 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
100 * @NL80211_ATTR_MAX: highest attribute number currently defined
101 * @__NL80211_ATTR_AFTER_LAST: internal use
102 @@ -2748,6 +2793,12 @@ enum nl80211_attrs {
103
104 NL80211_ATTR_PEER_MEASUREMENTS,
105
106 + NL80211_ATTR_AIRTIME_WEIGHT,
107 + NL80211_ATTR_STA_TX_POWER_SETTING,
108 + NL80211_ATTR_STA_TX_POWER,
109 +
110 + NL80211_ATTR_WIPHY_ANTENNA_GAIN,
111 +
112 /* add attributes here, update the policy in nl80211.c */
113
114 __NL80211_ATTR_AFTER_LAST,
115 @@ -2791,7 +2842,7 @@ enum nl80211_attrs {
116
117 #define NL80211_MAX_SUPP_RATES 32
118 #define NL80211_MAX_SUPP_HT_RATES 77
119 -#define NL80211_MAX_SUPP_REG_RULES 64
120 +#define NL80211_MAX_SUPP_REG_RULES 128
121 #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0
122 #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16
123 #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24
124 @@ -3125,6 +3176,10 @@ enum nl80211_sta_bss_param {
125 * might not be fully accurate.
126 * @NL80211_STA_INFO_CONNECTED_TO_GATE: set to true if STA has a path to a
127 * mesh gate (u8, 0 or 1)
128 + * @NL80211_STA_INFO_TX_DURATION: aggregate PPDU duration for all frames
129 + * sent to the station (u64, usec)
130 + * @NL80211_STA_INFO_AIRTIME_WEIGHT: current airtime weight for station (u16)
131 + * @NL80211_STA_INFO_AIRTIME_LINK_METRIC: airtime link metric for mesh station
132 * @__NL80211_STA_INFO_AFTER_LAST: internal
133 * @NL80211_STA_INFO_MAX: highest possible station info attribute
134 */
135 @@ -3168,6 +3223,9 @@ enum nl80211_sta_info {
136 NL80211_STA_INFO_RX_MPDUS,
137 NL80211_STA_INFO_FCS_ERROR_COUNT,
138 NL80211_STA_INFO_CONNECTED_TO_GATE,
139 + NL80211_STA_INFO_TX_DURATION,
140 + NL80211_STA_INFO_AIRTIME_WEIGHT,
141 + NL80211_STA_INFO_AIRTIME_LINK_METRIC,
142
143 /* keep last */
144 __NL80211_STA_INFO_AFTER_LAST,
145 @@ -3277,8 +3335,10 @@ enum nl80211_mpath_flags {
146 * &enum nl80211_mpath_flags;
147 * @NL80211_MPATH_INFO_DISCOVERY_TIMEOUT: total path discovery timeout, in msec
148 * @NL80211_MPATH_INFO_DISCOVERY_RETRIES: mesh path discovery retries
149 + * @NL80211_MPATH_INFO_HOP_COUNT: hop count to destination
150 + * @NL80211_MPATH_INFO_PATH_CHANGE: total number of path changes to destination
151 * @NL80211_MPATH_INFO_MAX: highest mesh path information attribute number
152 - * currently defind
153 + * currently defined
154 * @__NL80211_MPATH_INFO_AFTER_LAST: internal use
155 */
156 enum nl80211_mpath_info {
157 @@ -3290,6 +3350,8 @@ enum nl80211_mpath_info {
158 NL80211_MPATH_INFO_FLAGS,
159 NL80211_MPATH_INFO_DISCOVERY_TIMEOUT,
160 NL80211_MPATH_INFO_DISCOVERY_RETRIES,
161 + NL80211_MPATH_INFO_HOP_COUNT,
162 + NL80211_MPATH_INFO_PATH_CHANGE,
163
164 /* keep last */
165 __NL80211_MPATH_INFO_AFTER_LAST,
166 @@ -3618,6 +3680,14 @@ enum nl80211_reg_rule_attr {
167 * value as specified by &struct nl80211_bss_select_rssi_adjust.
168 * @NL80211_SCHED_SCAN_MATCH_ATTR_BSSID: BSSID to be used for matching
169 * (this cannot be used together with SSID).
170 + * @NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI: Nested attribute that carries the
171 + * band specific minimum rssi thresholds for the bands defined in
172 + * enum nl80211_band. The minimum rssi threshold value(s32) specific to a
173 + * band shall be encapsulated in attribute with type value equals to one
174 + * of the NL80211_BAND_* defined in enum nl80211_band. For example, the
175 + * minimum rssi threshold value for 2.4GHZ band shall be encapsulated
176 + * within an attribute of type NL80211_BAND_2GHZ. And one or more of such
177 + * attributes will be nested within this attribute.
178 * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
179 * attribute number currently defined
180 * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
181 @@ -3630,6 +3700,7 @@ enum nl80211_sched_scan_match_attr {
182 NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI,
183 NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST,
184 NL80211_SCHED_SCAN_MATCH_ATTR_BSSID,
185 + NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI,
186
187 /* keep last */
188 __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
189 @@ -4114,6 +4185,27 @@ enum nl80211_channel_type {
190 NL80211_CHAN_HT40PLUS
191 };
192
193 +/**
194 + * enum nl80211_key_mode - Key mode
195 + *
196 + * @NL80211_KEY_RX_TX: (Default)
197 + * Key can be used for Rx and Tx immediately
198 + *
199 + * The following modes can only be selected for unicast keys and when the
200 + * driver supports @NL80211_EXT_FEATURE_EXT_KEY_ID:
201 + *
202 + * @NL80211_KEY_NO_TX: Only allowed in combination with @NL80211_CMD_NEW_KEY:
203 + * Unicast key can only be used for Rx, Tx not allowed, yet
204 + * @NL80211_KEY_SET_TX: Only allowed in combination with @NL80211_CMD_SET_KEY:
205 + * The unicast key identified by idx and mac is cleared for Tx and becomes
206 + * the preferred Tx key for the station.
207 + */
208 +enum nl80211_key_mode {
209 + NL80211_KEY_RX_TX,
210 + NL80211_KEY_NO_TX,
211 + NL80211_KEY_SET_TX
212 +};
213 +
214 /**
215 * enum nl80211_chan_width - channel width definitions
216 *
217 @@ -4357,6 +4449,9 @@ enum nl80211_key_default_types {
218 * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags
219 * attributes, specifying what a key should be set as default as.
220 * See &enum nl80211_key_default_types.
221 + * @NL80211_KEY_MODE: the mode from enum nl80211_key_mode.
222 + * Defaults to @NL80211_KEY_RX_TX.
223 + *
224 * @__NL80211_KEY_AFTER_LAST: internal
225 * @NL80211_KEY_MAX: highest key attribute
226 */
227 @@ -4370,6 +4465,7 @@ enum nl80211_key_attributes {
228 NL80211_KEY_DEFAULT_MGMT,
229 NL80211_KEY_TYPE,
230 NL80211_KEY_DEFAULT_TYPES,
231 + NL80211_KEY_MODE,
232
233 /* keep last */
234 __NL80211_KEY_AFTER_LAST,
235 @@ -5315,6 +5411,21 @@ enum nl80211_feature_flags {
236 * able to rekey an in-use key correctly. Userspace must not rekey PTK keys
237 * if this flag is not set. Ignoring this can leak clear text packets and/or
238 * freeze the connection.
239 + * @NL80211_EXT_FEATURE_EXT_KEY_ID: Driver supports "Extended Key ID for
240 + * Individually Addressed Frames" from IEEE802.11-2016.
241 + *
242 + * @NL80211_EXT_FEATURE_AIRTIME_FAIRNESS: Driver supports getting airtime
243 + * fairness for transmitted packets and has enabled airtime fairness
244 + * scheduling.
245 + *
246 + * @NL80211_EXT_FEATURE_AP_PMKSA_CACHING: Driver/device supports PMKSA caching
247 + * (set/del PMKSA operations) in AP mode.
248 + *
249 + * @NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD: Driver supports
250 + * filtering of sched scan results using band specific RSSI thresholds.
251 + *
252 + * @NL80211_EXT_FEATURE_STA_TX_PWR: This driver supports controlling tx power
253 + * to a station.
254 *
255 * @NUM_NL80211_EXT_FEATURES: number of extended features.
256 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
257 @@ -5355,6 +5466,11 @@ enum nl80211_ext_feature_index {
258 NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT,
259 NL80211_EXT_FEATURE_CAN_REPLACE_PTK0,
260 NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER,
261 + NL80211_EXT_FEATURE_AIRTIME_FAIRNESS,
262 + NL80211_EXT_FEATURE_AP_PMKSA_CACHING,
263 + NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD,
264 + NL80211_EXT_FEATURE_EXT_KEY_ID,
265 + NL80211_EXT_FEATURE_STA_TX_PWR,
266
267 /* add new features before the definition below */
268 NUM_NL80211_EXT_FEATURES,
269 @@ -5606,9 +5722,14 @@ enum nl80211_crit_proto_id {
270 * Used by cfg80211_rx_mgmt()
271 *
272 * @NL80211_RXMGMT_FLAG_ANSWERED: frame was answered by device/driver.
273 + * @NL80211_RXMGMT_FLAG_EXTERNAL_AUTH: Host driver intends to offload
274 + * the authentication. Exclusively defined for host drivers that
275 + * advertises the SME functionality but would like the userspace
276 + * to handle certain authentication algorithms (e.g. SAE).
277 */
278 enum nl80211_rxmgmt_flags {
279 NL80211_RXMGMT_FLAG_ANSWERED = 1 << 0,
280 + NL80211_RXMGMT_FLAG_EXTERNAL_AUTH = 1 << 1,
281 };
282
283 /*