blob: afe27d6f238f155ecf747f1953ffd6b69ae6fe12 [file] [log] [blame]
developer2e1f7802022-06-15 19:48:25 +08001--- a/nl80211.h
2+++ b/nl80211.h
developer2458e702022-12-13 15:52:04 +08003@@ -324,6 +324,17 @@
developer2e1f7802022-06-15 19:48:25 +08004 */
5
6 /**
developer2458e702022-12-13 15:52:04 +08007+ * DOC: Multi-Link Operation
8+ *
9+ * In Multi-Link Operation, a connection between to MLDs utilizes multiple
10+ * links. To use this in nl80211, various commands and responses now need
11+ * to or will include the new %NL80211_ATTR_MLO_LINKS attribute.
12+ * Additionally, various commands that need to operate on a specific link
13+ * now need to be given the %NL80211_ATTR_MLO_LINK_ID attribute, e.g. to
14+ * use %NL80211_CMD_START_AP or similar functions.
15+ */
16+
17+/**
developer2e1f7802022-06-15 19:48:25 +080018 * enum nl80211_commands - supported nl80211 commands
19 *
20 * @NL80211_CMD_UNSPEC: unspecified command to catch errors
developer2458e702022-12-13 15:52:04 +080021@@ -366,14 +377,22 @@
22 * the non-transmitting interfaces are deleted as well.
23 *
24 * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified
25- * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC.
26+ * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. %NL80211_ATTR_MAC
27+ * represents peer's MLD address for MLO pairwise key. For MLO group key,
28+ * the link is identified by %NL80211_ATTR_MLO_LINK_ID.
29 * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT,
30 * %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD.
31+ * For MLO connection, the link to set default key is identified by
32+ * %NL80211_ATTR_MLO_LINK_ID.
33 * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA,
34 * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC, %NL80211_ATTR_KEY_CIPHER,
35- * and %NL80211_ATTR_KEY_SEQ attributes.
36+ * and %NL80211_ATTR_KEY_SEQ attributes. %NL80211_ATTR_MAC represents
37+ * peer's MLD address for MLO pairwise key. The link to add MLO
38+ * group key is identified by %NL80211_ATTR_MLO_LINK_ID.
39 * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX
40- * or %NL80211_ATTR_MAC.
41+ * or %NL80211_ATTR_MAC. %NL80211_ATTR_MAC represents peer's MLD address
42+ * for MLO pairwise key. The link to delete group key is identified by
43+ * %NL80211_ATTR_MLO_LINK_ID.
developer2e1f7802022-06-15 19:48:25 +080044 *
developer2458e702022-12-13 15:52:04 +080045 * @NL80211_CMD_GET_BEACON: (not used)
46 * @NL80211_CMD_SET_BEACON: change the beacon on an access point interface
47@@ -753,6 +772,13 @@
48 * %NL80211_ATTR_CSA_C_OFFSETS_TX is an array of offsets to CSA
49 * counters which will be updated to the current value. This attribute
50 * is used during CSA period.
51+ * For TX on an MLD, the frequency can be omitted and the link ID be
52+ * specified, or if transmitting to a known peer MLD (with MLD addresses
53+ * in the frame) both can be omitted and the link will be selected by
54+ * lower layers.
55+ * For RX notification, %NL80211_ATTR_RX_HW_TIMESTAMP may be included to
56+ * indicate the frame RX timestamp and %NL80211_ATTR_TX_HW_TIMESTAMP may
57+ * be included to indicate the ack TX timestamp.
58 * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this
59 * command may be used with the corresponding cookie to cancel the wait
60 * time if it is known that it is no longer necessary. This command is
61@@ -763,7 +789,9 @@
62 * transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies
63 * the TX command and %NL80211_ATTR_FRAME includes the contents of the
64 * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged
65- * the frame.
66+ * the frame. %NL80211_ATTR_TX_HW_TIMESTAMP may be included to indicate the
67+ * tx timestamp and %NL80211_ATTR_RX_HW_TIMESTAMP may be included to
68+ * indicate the ack RX timestamp.
69 * @NL80211_CMD_ACTION_TX_STATUS: Alias for @NL80211_CMD_FRAME_TX_STATUS for
70 * backward compatibility.
71 *
72@@ -1108,6 +1136,12 @@
73 * has been received. %NL80211_ATTR_FRAME is used to specify the
74 * frame contents. The frame is the raw EAPoL data, without ethernet or
75 * 802.11 headers.
76+ * For an MLD transmitter, the %NL80211_ATTR_MLO_LINK_ID may be given and
77+ * its effect will depend on the destination: If the destination is known
78+ * to be an MLD, this will be used as a hint to select the link to transmit
79+ * the frame on. If the destination is not an MLD, this will select both
80+ * the link to transmit on and the source address will be set to the link
81+ * address of that link.
82 * When used as an event indication %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
83 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT and %NL80211_ATTR_MAC are added
84 * indicating the protocol type of the received frame; whether the frame
85@@ -1237,6 +1271,16 @@
86 * to describe the BSSID address of the AP and %NL80211_ATTR_TIMEOUT to
87 * specify the timeout value.
88 *
89+ * @NL80211_CMD_ADD_LINK: Add a new link to an interface. The
90+ * %NL80211_ATTR_MLO_LINK_ID attribute is used for the new link.
91+ * @NL80211_CMD_REMOVE_LINK: Remove a link from an interface. This may come
92+ * without %NL80211_ATTR_MLO_LINK_ID as an easy way to remove all links
93+ * in preparation for e.g. roaming to a regular (non-MLO) AP.
94+ *
95+ * @NL80211_CMD_ADD_LINK_STA: Add a link to an MLD station
96+ * @NL80211_CMD_MODIFY_LINK_STA: Modify a link of an MLD station
97+ * @NL80211_CMD_REMOVE_LINK_STA: Remove a link of an MLD station
98+ *
developer2e1f7802022-06-15 19:48:25 +080099 * @NL80211_CMD_MAX: highest used command number
100 * @__NL80211_CMD_AFTER_LAST: internal use
101 */
developer2458e702022-12-13 15:52:04 +0800102@@ -1481,6 +1525,13 @@ enum nl80211_commands {
103
104 NL80211_CMD_ASSOC_COMEBACK,
developer2e1f7802022-06-15 19:48:25 +0800105
developer2458e702022-12-13 15:52:04 +0800106+ NL80211_CMD_ADD_LINK,
107+ NL80211_CMD_REMOVE_LINK,
108+
109+ NL80211_CMD_ADD_LINK_STA,
110+ NL80211_CMD_MODIFY_LINK_STA,
111+ NL80211_CMD_REMOVE_LINK_STA,
112+
developer2e1f7802022-06-15 19:48:25 +0800113 /* add new commands above here */
114
115 /* used to define NL80211_CMD_MAX below */
developer2458e702022-12-13 15:52:04 +0800116@@ -2340,8 +2391,10 @@ enum nl80211_commands {
developer2e1f7802022-06-15 19:48:25 +0800117 *
developer2458e702022-12-13 15:52:04 +0800118 * @NL80211_ATTR_IFTYPE_EXT_CAPA: Nested attribute of the following attributes:
119 * %NL80211_ATTR_IFTYPE, %NL80211_ATTR_EXT_CAPA,
120- * %NL80211_ATTR_EXT_CAPA_MASK, to specify the extended capabilities per
121- * interface type.
122+ * %NL80211_ATTR_EXT_CAPA_MASK, to specify the extended capabilities and
123+ * other interface-type specific capabilities per interface type. For MLO,
124+ * %NL80211_ATTR_EML_CAPABILITY and %NL80211_ATTR_MLD_CAPA_AND_OPS are
125+ * present.
developer2e1f7802022-06-15 19:48:25 +0800126 *
developer2458e702022-12-13 15:52:04 +0800127 * @NL80211_ATTR_MU_MIMO_GROUP_DATA: array of 24 bytes that defines a MU-MIMO
128 * groupID for monitor mode.
129@@ -2663,6 +2716,44 @@ enum nl80211_commands {
130 * association request when used with NL80211_CMD_NEW_STATION). Can be set
131 * only if %NL80211_STA_FLAG_WME is set.
132 *
133+ * @NL80211_ATTR_MLO_LINK_ID: A (u8) link ID for use with MLO, to be used with
134+ * various commands that need a link ID to operate.
135+ * @NL80211_ATTR_MLO_LINKS: A nested array of links, each containing some
136+ * per-link information and a link ID.
137+ * @NL80211_ATTR_MLD_ADDR: An MLD address, used with various commands such as
138+ * authenticate/associate.
139+ *
140+ * @NL80211_ATTR_MLO_SUPPORT: Flag attribute to indicate user space supports MLO
141+ * connection. Used with %NL80211_CMD_CONNECT. If this attribute is not
142+ * included in NL80211_CMD_CONNECT drivers must not perform MLO connection.
143+ *
144+ * @NL80211_ATTR_MAX_NUM_AKM_SUITES: U16 attribute. Indicates maximum number of
145+ * AKM suites allowed for %NL80211_CMD_CONNECT, %NL80211_CMD_ASSOCIATE and
146+ * %NL80211_CMD_START_AP in %NL80211_CMD_GET_WIPHY response. If this
147+ * attribute is not present userspace shall consider maximum number of AKM
148+ * suites allowed as %NL80211_MAX_NR_AKM_SUITES which is the legacy maximum
149+ * number prior to the introduction of this attribute.
150+ *
151+ * @NL80211_ATTR_EML_CAPABILITY: EML Capability information (u16)
152+ * @NL80211_ATTR_MLD_CAPA_AND_OPS: MLD Capabilities and Operations (u16)
153+ *
154+ * @NL80211_ATTR_TX_HW_TIMESTAMP: Hardware timestamp for TX operation in
155+ * nanoseconds (u64). This is the device clock timestamp so it will
156+ * probably reset when the device is stopped or the firmware is reset.
157+ * When used with %NL80211_CMD_FRAME_TX_STATUS, indicates the frame TX
158+ * timestamp. When used with %NL80211_CMD_FRAME RX notification, indicates
159+ * the ack TX timestamp.
160+ * @NL80211_ATTR_RX_HW_TIMESTAMP: Hardware timestamp for RX operation in
161+ * nanoseconds (u64). This is the device clock timestamp so it will
162+ * probably reset when the device is stopped or the firmware is reset.
163+ * When used with %NL80211_CMD_FRAME_TX_STATUS, indicates the ack RX
164+ * timestamp. When used with %NL80211_CMD_FRAME RX notification, indicates
165+ * the incoming frame RX timestamp.
166+ * @NL80211_ATTR_TD_BITMAP: Transition Disable bitmap, for subsequent
167+ * (re)associations.
developer2e1f7802022-06-15 19:48:25 +0800168+ * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
169+ * transmit power to stay within regulatory limits. u32, dBi.
developer2458e702022-12-13 15:52:04 +0800170+ *
developer2e1f7802022-06-15 19:48:25 +0800171 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
172 * @NL80211_ATTR_MAX: highest attribute number currently defined
developer2458e702022-12-13 15:52:04 +0800173 * @__NL80211_ATTR_AFTER_LAST: internal use
174@@ -3177,6 +3268,23 @@ enum nl80211_attrs {
developer2e1f7802022-06-15 19:48:25 +0800175
developer2458e702022-12-13 15:52:04 +0800176 NL80211_ATTR_DISABLE_EHT,
developer2e1f7802022-06-15 19:48:25 +0800177
developer2458e702022-12-13 15:52:04 +0800178+ NL80211_ATTR_MLO_LINKS,
179+ NL80211_ATTR_MLO_LINK_ID,
180+ NL80211_ATTR_MLD_ADDR,
181+
182+ NL80211_ATTR_MLO_SUPPORT,
183+
184+ NL80211_ATTR_MAX_NUM_AKM_SUITES,
185+
186+ NL80211_ATTR_EML_CAPABILITY,
187+ NL80211_ATTR_MLD_CAPA_AND_OPS,
188+
189+ NL80211_ATTR_TX_HW_TIMESTAMP,
190+ NL80211_ATTR_RX_HW_TIMESTAMP,
191+ NL80211_ATTR_TD_BITMAP,
192+
developer2e1f7802022-06-15 19:48:25 +0800193+ NL80211_ATTR_WIPHY_ANTENNA_GAIN,
developer2458e702022-12-13 15:52:04 +0800194+
developer2e1f7802022-06-15 19:48:25 +0800195 /* add attributes here, update the policy in nl80211.c */
196
developer2458e702022-12-13 15:52:04 +0800197 __NL80211_ATTR_AFTER_LAST,
198@@ -3231,6 +3339,11 @@ enum nl80211_attrs {
199 #define NL80211_HE_MIN_CAPABILITY_LEN 16
developer2e1f7802022-06-15 19:48:25 +0800200 #define NL80211_HE_MAX_CAPABILITY_LEN 54
201 #define NL80211_MAX_NR_CIPHER_SUITES 5
developer2458e702022-12-13 15:52:04 +0800202+
203+/*
204+ * NL80211_MAX_NR_AKM_SUITES is obsolete when %NL80211_ATTR_MAX_NUM_AKM_SUITES
205+ * present in %NL80211_CMD_GET_WIPHY response.
206+ */
developer2e1f7802022-06-15 19:48:25 +0800207 #define NL80211_MAX_NR_AKM_SUITES 2
developer2458e702022-12-13 15:52:04 +0800208 #define NL80211_EHT_MIN_CAPABILITY_LEN 13
209 #define NL80211_EHT_MAX_CAPABILITY_LEN 51
210@@ -4853,6 +4966,8 @@ enum nl80211_bss_scan_width {
211 * Contains a nested array of signal strength attributes (u8, dBm),
212 * using the nesting index as the antenna number.
213 * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz
214+ * @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8).
215+ * @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it.
216 * @__NL80211_BSS_AFTER_LAST: internal
217 * @NL80211_BSS_MAX: highest BSS attribute
developer2e1f7802022-06-15 19:48:25 +0800218 */
developer2458e702022-12-13 15:52:04 +0800219@@ -4878,6 +4993,8 @@ enum nl80211_bss {
220 NL80211_BSS_PARENT_BSSID,
221 NL80211_BSS_CHAIN_SIGNAL,
222 NL80211_BSS_FREQUENCY_OFFSET,
223+ NL80211_BSS_MLO_LINK_ID,
224+ NL80211_BSS_MLD_ADDR,
developer2e1f7802022-06-15 19:48:25 +0800225
226 /* keep last */
developer2458e702022-12-13 15:52:04 +0800227 __NL80211_BSS_AFTER_LAST,
228@@ -5874,7 +5991,7 @@ enum nl80211_ap_sme_features {
229 * @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up
230 * the connected inactive stations in AP mode.
231 * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested
232- * to work properly to suppport receiving regulatory hints from
233+ * to work properly to support receiving regulatory hints from
234 * cellular base stations.
235 * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: (no longer available, only
236 * here to reserve the value for API/ABI compatibility)
237@@ -6174,6 +6291,14 @@ enum nl80211_feature_flags {
developer2e1f7802022-06-15 19:48:25 +0800238 * @NL80211_EXT_FEATURE_RADAR_BACKGROUND: Device supports background radar/CAC
239 * detection.
240 *
developer2458e702022-12-13 15:52:04 +0800241+ * @NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE: Device can perform a MAC address
242+ * change without having to bring the underlying network device down
243+ * first. For example, in station mode this can be used to vary the
244+ * origin MAC address prior to a connection to a new AP for privacy
245+ * or other reasons. Note that certain driver specific restrictions
246+ * might apply, e.g. no scans in progress, no offchannel operations
247+ * in progress, and no active connections.
248+ *
249 * @NUM_NL80211_EXT_FEATURES: number of extended features.
250 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
251 */
252@@ -6241,6 +6366,7 @@ enum nl80211_ext_feature_index {
developer2e1f7802022-06-15 19:48:25 +0800253 NL80211_EXT_FEATURE_BSS_COLOR,
developer2458e702022-12-13 15:52:04 +0800254 NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD,
developer2e1f7802022-06-15 19:48:25 +0800255 NL80211_EXT_FEATURE_RADAR_BACKGROUND,
developer2458e702022-12-13 15:52:04 +0800256+ NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE,
developer2e1f7802022-06-15 19:48:25 +0800257
258 /* add new features before the definition below */
developer2458e702022-12-13 15:52:04 +0800259 NUM_NL80211_EXT_FEATURES,