aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nl80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nl80211.h')
-rw-r--r--include/linux/nl80211.h788
1 files changed, 734 insertions, 54 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 2c8701687336..c7ccaae15af6 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -40,6 +40,76 @@
40 */ 40 */
41 41
42/** 42/**
43 * DOC: Frame transmission/registration support
44 *
45 * Frame transmission and registration support exists to allow userspace
46 * management entities such as wpa_supplicant react to management frames
47 * that are not being handled by the kernel. This includes, for example,
48 * certain classes of action frames that cannot be handled in the kernel
49 * for various reasons.
50 *
51 * Frame registration is done on a per-interface basis and registrations
52 * cannot be removed other than by closing the socket. It is possible to
53 * specify a registration filter to register, for example, only for a
54 * certain type of action frame. In particular with action frames, those
55 * that userspace registers for will not be returned as unhandled by the
56 * driver, so that the registered application has to take responsibility
57 * for doing that.
58 *
59 * The type of frame that can be registered for is also dependent on the
60 * driver and interface type. The frame types are advertised in wiphy
61 * attributes so applications know what to expect.
62 *
63 * NOTE: When an interface changes type while registrations are active,
64 * these registrations are ignored until the interface type is
65 * changed again. This means that changing the interface type can
66 * lead to a situation that couldn't otherwise be produced, but
67 * any such registrations will be dormant in the sense that they
68 * will not be serviced, i.e. they will not receive any frames.
69 *
70 * Frame transmission allows userspace to send for example the required
71 * responses to action frames. It is subject to some sanity checking,
72 * but many frames can be transmitted. When a frame was transmitted, its
73 * status is indicated to the sending socket.
74 *
75 * For more technical details, see the corresponding command descriptions
76 * below.
77 */
78
79/**
80 * DOC: Virtual interface / concurrency capabilities
81 *
82 * Some devices are able to operate with virtual MACs, they can have
83 * more than one virtual interface. The capability handling for this
84 * is a bit complex though, as there may be a number of restrictions
85 * on the types of concurrency that are supported.
86 *
87 * To start with, each device supports the interface types listed in
88 * the %NL80211_ATTR_SUPPORTED_IFTYPES attribute, but by listing the
89 * types there no concurrency is implied.
90 *
91 * Once concurrency is desired, more attributes must be observed:
92 * To start with, since some interface types are purely managed in
93 * software, like the AP-VLAN type in mac80211 for example, there's
94 * an additional list of these, they can be added at any time and
95 * are only restricted by some semantic restrictions (e.g. AP-VLAN
96 * cannot be added without a corresponding AP interface). This list
97 * is exported in the %NL80211_ATTR_SOFTWARE_IFTYPES attribute.
98 *
99 * Further, the list of supported combinations is exported. This is
100 * in the %NL80211_ATTR_INTERFACE_COMBINATIONS attribute. Basically,
101 * it exports a list of "groups", and at any point in time the
102 * interfaces that are currently active must fall into any one of
103 * the advertised groups. Within each group, there are restrictions
104 * on the number of interfaces of different types that are supported
105 * and also the number of different channels, along with potentially
106 * some other restrictions. See &enum nl80211_if_combination_attrs.
107 *
108 * All together, these attributes define the concurrency of virtual
109 * interfaces that a given device supports.
110 */
111
112/**
43 * enum nl80211_commands - supported nl80211 commands 113 * enum nl80211_commands - supported nl80211 commands
44 * 114 *
45 * @NL80211_CMD_UNSPEC: unspecified command to catch errors 115 * @NL80211_CMD_UNSPEC: unspecified command to catch errors
@@ -111,6 +181,10 @@
111 * @NL80211_CMD_SET_MPATH: Set mesh path attributes for mesh path to 181 * @NL80211_CMD_SET_MPATH: Set mesh path attributes for mesh path to
112 * destination %NL80211_ATTR_MAC on the interface identified by 182 * destination %NL80211_ATTR_MAC on the interface identified by
113 * %NL80211_ATTR_IFINDEX. 183 * %NL80211_ATTR_IFINDEX.
184 * @NL80211_CMD_NEW_MPATH: Create a new mesh path for the destination given by
185 * %NL80211_ATTR_MAC via %NL80211_ATTR_MPATH_NEXT_HOP.
186 * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by
187 * %NL80211_ATTR_MAC.
114 * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the 188 * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the
115 * the interface identified by %NL80211_ATTR_IFINDEX. 189 * the interface identified by %NL80211_ATTR_IFINDEX.
116 * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC 190 * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC
@@ -135,10 +209,10 @@
135 * to the specified ISO/IEC 3166-1 alpha2 country code. The core will 209 * to the specified ISO/IEC 3166-1 alpha2 country code. The core will
136 * store this as a valid request and then query userspace for it. 210 * store this as a valid request and then query userspace for it.
137 * 211 *
138 * @NL80211_CMD_GET_MESH_PARAMS: Get mesh networking properties for the 212 * @NL80211_CMD_GET_MESH_CONFIG: Get mesh networking properties for the
139 * interface identified by %NL80211_ATTR_IFINDEX 213 * interface identified by %NL80211_ATTR_IFINDEX
140 * 214 *
141 * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the 215 * @NL80211_CMD_SET_MESH_CONFIG: Set mesh networking properties for the
142 * interface identified by %NL80211_ATTR_IFINDEX 216 * interface identified by %NL80211_ATTR_IFINDEX
143 * 217 *
144 * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The 218 * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The
@@ -162,6 +236,28 @@
162 * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, 236 * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
163 * partial scan results may be available 237 * partial scan results may be available
164 * 238 *
239 * @NL80211_CMD_START_SCHED_SCAN: start a scheduled scan at certain
240 * intervals, as specified by %NL80211_ATTR_SCHED_SCAN_INTERVAL.
241 * Like with normal scans, if SSIDs (%NL80211_ATTR_SCAN_SSIDS)
242 * are passed, they are used in the probe requests. For
243 * broadcast, a broadcast SSID must be passed (ie. an empty
244 * string). If no SSID is passed, no probe requests are sent and
245 * a passive scan is performed. %NL80211_ATTR_SCAN_FREQUENCIES,
246 * if passed, define which channels should be scanned; if not
247 * passed, all channels allowed for the current regulatory domain
248 * are used. Extra IEs can also be passed from the userspace by
249 * using the %NL80211_ATTR_IE attribute.
250 * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan
251 * @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan
252 * results available.
253 * @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has
254 * stopped. The driver may issue this event at any time during a
255 * scheduled scan. One reason for stopping the scan is if the hardware
256 * does not support starting an association or a normal scan while running
257 * a scheduled scan. This event is also sent when the
258 * %NL80211_CMD_STOP_SCHED_SCAN command is received or when the interface
259 * is brought down while a scheduled scan was running.
260 *
165 * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation 261 * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation
166 * or noise level 262 * or noise level
167 * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to 263 * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to
@@ -258,7 +354,9 @@
258 * auth and assoc steps. For this, you need to specify the SSID in a 354 * auth and assoc steps. For this, you need to specify the SSID in a
259 * %NL80211_ATTR_SSID attribute, and can optionally specify the association 355 * %NL80211_ATTR_SSID attribute, and can optionally specify the association
260 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC, 356 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC,
261 * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_CONTROL_PORT. 357 * %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
358 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
359 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
262 * It is also sent as an event, with the BSSID and response IEs when the 360 * It is also sent as an event, with the BSSID and response IEs when the
263 * connection is established or failed to be established. This can be 361 * connection is established or failed to be established. This can be
264 * determined by the STATUS_CODE attribute. 362 * determined by the STATUS_CODE attribute.
@@ -276,8 +374,8 @@
276 * channel for the specified amount of time. This can be used to do 374 * channel for the specified amount of time. This can be used to do
277 * off-channel operations like transmit a Public Action frame and wait for 375 * off-channel operations like transmit a Public Action frame and wait for
278 * a response while being associated to an AP on another channel. 376 * a response while being associated to an AP on another channel.
279 * %NL80211_ATTR_WIPHY or %NL80211_ATTR_IFINDEX is used to specify which 377 * %NL80211_ATTR_IFINDEX is used to specify which interface (and thus
280 * radio is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the 378 * radio) is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the
281 * frequency for the operation and %NL80211_ATTR_WIPHY_CHANNEL_TYPE may be 379 * frequency for the operation and %NL80211_ATTR_WIPHY_CHANNEL_TYPE may be
282 * optionally used to specify additional channel parameters. 380 * optionally used to specify additional channel parameters.
283 * %NL80211_ATTR_DURATION is used to specify the duration in milliseconds 381 * %NL80211_ATTR_DURATION is used to specify the duration in milliseconds
@@ -301,30 +399,42 @@
301 * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface 399 * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface
302 * and @NL80211_ATTR_TX_RATES the set of allowed rates. 400 * and @NL80211_ATTR_TX_RATES the set of allowed rates.
303 * 401 *
304 * @NL80211_CMD_REGISTER_ACTION: Register for receiving certain action frames 402 * @NL80211_CMD_REGISTER_FRAME: Register for receiving certain mgmt frames
305 * (via @NL80211_CMD_ACTION) for processing in userspace. This command 403 * (via @NL80211_CMD_FRAME) for processing in userspace. This command
306 * requires an interface index and a match attribute containing the first 404 * requires an interface index, a frame type attribute (optional for
307 * few bytes of the frame that should match, e.g. a single byte for only 405 * backward compatibility reasons, if not given assumes action frames)
308 * a category match or four bytes for vendor frames including the OUI. 406 * and a match attribute containing the first few bytes of the frame
309 * The registration cannot be dropped, but is removed automatically 407 * that should match, e.g. a single byte for only a category match or
310 * when the netlink socket is closed. Multiple registrations can be made. 408 * four bytes for vendor frames including the OUI. The registration
311 * @NL80211_CMD_ACTION: Action frame TX request and RX notification. This 409 * cannot be dropped, but is removed automatically when the netlink
312 * command is used both as a request to transmit an Action frame and as an 410 * socket is closed. Multiple registrations can be made.
313 * event indicating reception of an Action frame that was not processed in 411 * @NL80211_CMD_REGISTER_ACTION: Alias for @NL80211_CMD_REGISTER_FRAME for
412 * backward compatibility
413 * @NL80211_CMD_FRAME: Management frame TX request and RX notification. This
414 * command is used both as a request to transmit a management frame and
415 * as an event indicating reception of a frame that was not processed in
314 * kernel code, but is for us (i.e., which may need to be processed in a 416 * kernel code, but is for us (i.e., which may need to be processed in a
315 * user space application). %NL80211_ATTR_FRAME is used to specify the 417 * user space application). %NL80211_ATTR_FRAME is used to specify the
316 * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and 418 * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and
317 * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on 419 * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on
318 * which channel the frame is to be transmitted or was received. This 420 * which channel the frame is to be transmitted or was received. If this
319 * channel has to be the current channel (remain-on-channel or the 421 * channel is not the current channel (remain-on-channel or the
320 * operational channel). When called, this operation returns a cookie 422 * operational channel) the device will switch to the given channel and
321 * (%NL80211_ATTR_COOKIE) that will be included with the TX status event 423 * transmit the frame, optionally waiting for a response for the time
322 * pertaining to the TX request. 424 * specified using %NL80211_ATTR_DURATION. When called, this operation
323 * @NL80211_CMD_ACTION_TX_STATUS: Report TX status of an Action frame 425 * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the
324 * transmitted with %NL80211_CMD_ACTION. %NL80211_ATTR_COOKIE identifies 426 * TX status event pertaining to the TX request.
427 * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this
428 * command may be used with the corresponding cookie to cancel the wait
429 * time if it is known that it is no longer necessary.
430 * @NL80211_CMD_ACTION: Alias for @NL80211_CMD_FRAME for backward compatibility.
431 * @NL80211_CMD_FRAME_TX_STATUS: Report TX status of a management frame
432 * transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies
325 * the TX command and %NL80211_ATTR_FRAME includes the contents of the 433 * the TX command and %NL80211_ATTR_FRAME includes the contents of the
326 * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged 434 * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged
327 * the frame. 435 * the frame.
436 * @NL80211_CMD_ACTION_TX_STATUS: Alias for @NL80211_CMD_FRAME_TX_STATUS for
437 * backward compatibility.
328 * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command 438 * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command
329 * is used to configure connection quality monitoring notification trigger 439 * is used to configure connection quality monitoring notification trigger
330 * levels. 440 * levels.
@@ -341,11 +451,43 @@
341 * of any other interfaces, and other interfaces will again take 451 * of any other interfaces, and other interfaces will again take
342 * precedence when they are used. 452 * precedence when they are used.
343 * 453 *
454 * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface.
455 *
456 * @NL80211_CMD_JOIN_MESH: Join a mesh. The mesh ID must be given, and initial
457 * mesh config parameters may be given.
458 * @NL80211_CMD_LEAVE_MESH: Leave the mesh network -- no special arguments, the
459 * network is determined by the network interface.
460 *
461 * @NL80211_CMD_UNPROT_DEAUTHENTICATE: Unprotected deauthentication frame
462 * notification. This event is used to indicate that an unprotected
463 * deauthentication frame was dropped when MFP is in use.
464 * @NL80211_CMD_UNPROT_DISASSOCIATE: Unprotected disassociation frame
465 * notification. This event is used to indicate that an unprotected
466 * disassociation frame was dropped when MFP is in use.
467 *
468 * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a
469 * beacon or probe response from a compatible mesh peer. This is only
470 * sent while no station information (sta_info) exists for the new peer
471 * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set. On
472 * reception of this notification, userspace may decide to create a new
473 * station (@NL80211_CMD_NEW_STATION). To stop this notification from
474 * reoccurring, the userspace authentication daemon may want to create the
475 * new station with the AUTHENTICATED flag unset and maybe change it later
476 * depending on the authentication result.
477 *
478 * @NL80211_CMD_GET_WOWLAN: get Wake-on-Wireless-LAN (WoWLAN) settings.
479 * @NL80211_CMD_SET_WOWLAN: set Wake-on-Wireless-LAN (WoWLAN) settings.
480 * Since wireless is more complex than wired ethernet, it supports
481 * various triggers. These triggers can be configured through this
482 * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For
483 * more background information, see
484 * http://wireless.kernel.org/en/users/Documentation/WoWLAN.
485 *
344 * @NL80211_CMD_MAX: highest used command number 486 * @NL80211_CMD_MAX: highest used command number
345 * @__NL80211_CMD_AFTER_LAST: internal use 487 * @__NL80211_CMD_AFTER_LAST: internal use
346 */ 488 */
347enum nl80211_commands { 489enum nl80211_commands {
348/* don't change the order or add anything inbetween, this is ABI! */ 490/* don't change the order or add anything between, this is ABI! */
349 NL80211_CMD_UNSPEC, 491 NL80211_CMD_UNSPEC,
350 492
351 NL80211_CMD_GET_WIPHY, /* can dump */ 493 NL80211_CMD_GET_WIPHY, /* can dump */
@@ -383,8 +525,8 @@ enum nl80211_commands {
383 NL80211_CMD_SET_REG, 525 NL80211_CMD_SET_REG,
384 NL80211_CMD_REQ_SET_REG, 526 NL80211_CMD_REQ_SET_REG,
385 527
386 NL80211_CMD_GET_MESH_PARAMS, 528 NL80211_CMD_GET_MESH_CONFIG,
387 NL80211_CMD_SET_MESH_PARAMS, 529 NL80211_CMD_SET_MESH_CONFIG,
388 530
389 NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */, 531 NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */,
390 532
@@ -429,9 +571,12 @@ enum nl80211_commands {
429 571
430 NL80211_CMD_SET_TX_BITRATE_MASK, 572 NL80211_CMD_SET_TX_BITRATE_MASK,
431 573
432 NL80211_CMD_REGISTER_ACTION, 574 NL80211_CMD_REGISTER_FRAME,
433 NL80211_CMD_ACTION, 575 NL80211_CMD_REGISTER_ACTION = NL80211_CMD_REGISTER_FRAME,
434 NL80211_CMD_ACTION_TX_STATUS, 576 NL80211_CMD_FRAME,
577 NL80211_CMD_ACTION = NL80211_CMD_FRAME,
578 NL80211_CMD_FRAME_TX_STATUS,
579 NL80211_CMD_ACTION_TX_STATUS = NL80211_CMD_FRAME_TX_STATUS,
435 580
436 NL80211_CMD_SET_POWER_SAVE, 581 NL80211_CMD_SET_POWER_SAVE,
437 NL80211_CMD_GET_POWER_SAVE, 582 NL80211_CMD_GET_POWER_SAVE,
@@ -440,6 +585,25 @@ enum nl80211_commands {
440 NL80211_CMD_NOTIFY_CQM, 585 NL80211_CMD_NOTIFY_CQM,
441 586
442 NL80211_CMD_SET_CHANNEL, 587 NL80211_CMD_SET_CHANNEL,
588 NL80211_CMD_SET_WDS_PEER,
589
590 NL80211_CMD_FRAME_WAIT_CANCEL,
591
592 NL80211_CMD_JOIN_MESH,
593 NL80211_CMD_LEAVE_MESH,
594
595 NL80211_CMD_UNPROT_DEAUTHENTICATE,
596 NL80211_CMD_UNPROT_DISASSOCIATE,
597
598 NL80211_CMD_NEW_PEER_CANDIDATE,
599
600 NL80211_CMD_GET_WOWLAN,
601 NL80211_CMD_SET_WOWLAN,
602
603 NL80211_CMD_START_SCHED_SCAN,
604 NL80211_CMD_STOP_SCHED_SCAN,
605 NL80211_CMD_SCHED_SCAN_RESULTS,
606 NL80211_CMD_SCHED_SCAN_STOPPED,
443 607
444 /* add new commands above here */ 608 /* add new commands above here */
445 609
@@ -461,6 +625,11 @@ enum nl80211_commands {
461#define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE 625#define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE
462#define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT 626#define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT
463 627
628/* source-level API compatibility */
629#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG
630#define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG
631#define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE
632
464/** 633/**
465 * enum nl80211_attrs - nl80211 netlink attributes 634 * enum nl80211_attrs - nl80211 netlink attributes
466 * 635 *
@@ -531,7 +700,7 @@ enum nl80211_commands {
531 * consisting of a nested array. 700 * consisting of a nested array.
532 * 701 *
533 * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes). 702 * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes).
534 * @NL80211_ATTR_PLINK_ACTION: action to perform on the mesh peer link. 703 * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link.
535 * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. 704 * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path.
536 * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path 705 * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path
537 * info given for %NL80211_CMD_GET_MPATH, nested attribute described at 706 * info given for %NL80211_CMD_GET_MPATH, nested attribute described at
@@ -639,6 +808,15 @@ enum nl80211_commands {
639 * request, the driver will assume that the port is unauthorized until 808 * request, the driver will assume that the port is unauthorized until
640 * authorized by user space. Otherwise, port is marked authorized by 809 * authorized by user space. Otherwise, port is marked authorized by
641 * default in station mode. 810 * default in station mode.
811 * @NL80211_ATTR_CONTROL_PORT_ETHERTYPE: A 16-bit value indicating the
812 * ethertype that will be used for key negotiation. It can be
813 * specified with the associate and connect commands. If it is not
814 * specified, the value defaults to 0x888E (PAE, 802.1X). This
815 * attribute is also used as a flag in the wiphy information to
816 * indicate that protocols other than PAE are supported.
817 * @NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT: When included along with
818 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, indicates that the custom
819 * ethertype frames used for key negotiation must not be encrypted.
642 * 820 *
643 * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. 821 * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver.
644 * We recommend using nested, driver-specific attributes within this. 822 * We recommend using nested, driver-specific attributes within this.
@@ -697,6 +875,9 @@ enum nl80211_commands {
697 * cache, a wiphy attribute. 875 * cache, a wiphy attribute.
698 * 876 *
699 * @NL80211_ATTR_DURATION: Duration of an operation in milliseconds, u32. 877 * @NL80211_ATTR_DURATION: Duration of an operation in milliseconds, u32.
878 * @NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION: Device attribute that
879 * specifies the maximum duration that can be requested with the
880 * remain-on-channel operation, in milliseconds, u32.
700 * 881 *
701 * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects. 882 * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects.
702 * 883 *
@@ -708,7 +889,16 @@ enum nl80211_commands {
708 * is used with %NL80211_CMD_SET_TX_BITRATE_MASK. 889 * is used with %NL80211_CMD_SET_TX_BITRATE_MASK.
709 * 890 *
710 * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain 891 * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
711 * at least one byte, currently used with @NL80211_CMD_REGISTER_ACTION. 892 * at least one byte, currently used with @NL80211_CMD_REGISTER_FRAME.
893 * @NL80211_ATTR_FRAME_TYPE: A u16 indicating the frame type/subtype for the
894 * @NL80211_CMD_REGISTER_FRAME command.
895 * @NL80211_ATTR_TX_FRAME_TYPES: wiphy capability attribute, which is a
896 * nested attribute of %NL80211_ATTR_FRAME_TYPE attributes, containing
897 * information about which frame types can be transmitted with
898 * %NL80211_CMD_FRAME.
899 * @NL80211_ATTR_RX_FRAME_TYPES: wiphy capability attribute, which is a
900 * nested attribute of %NL80211_ATTR_FRAME_TYPE attributes, containing
901 * information about which frame types can be registered for RX.
712 * 902 *
713 * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was 903 * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was
714 * acknowledged by the recipient. 904 * acknowledged by the recipient.
@@ -731,11 +921,86 @@ enum nl80211_commands {
731 * This is used in association with @NL80211_ATTR_WIPHY_TX_POWER_SETTING 921 * This is used in association with @NL80211_ATTR_WIPHY_TX_POWER_SETTING
732 * for non-automatic settings. 922 * for non-automatic settings.
733 * 923 *
924 * @NL80211_ATTR_SUPPORT_IBSS_RSN: The device supports IBSS RSN, which mostly
925 * means support for per-station GTKs.
926 *
927 * @NL80211_ATTR_WIPHY_ANTENNA_TX: Bitmap of allowed antennas for transmitting.
928 * This can be used to mask out antennas which are not attached or should
929 * not be used for transmitting. If an antenna is not selected in this
930 * bitmap the hardware is not allowed to transmit on this antenna.
931 *
932 * Each bit represents one antenna, starting with antenna 1 at the first
933 * bit. Depending on which antennas are selected in the bitmap, 802.11n
934 * drivers can derive which chainmasks to use (if all antennas belonging to
935 * a particular chain are disabled this chain should be disabled) and if
936 * a chain has diversity antennas wether diversity should be used or not.
937 * HT capabilities (STBC, TX Beamforming, Antenna selection) can be
938 * derived from the available chains after applying the antenna mask.
939 * Non-802.11n drivers can derive wether to use diversity or not.
940 * Drivers may reject configurations or RX/TX mask combinations they cannot
941 * support by returning -EINVAL.
942 *
943 * @NL80211_ATTR_WIPHY_ANTENNA_RX: Bitmap of allowed antennas for receiving.
944 * This can be used to mask out antennas which are not attached or should
945 * not be used for receiving. If an antenna is not selected in this bitmap
946 * the hardware should not be configured to receive on this antenna.
947 * For a more detailed description see @NL80211_ATTR_WIPHY_ANTENNA_TX.
948 *
949 * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX: Bitmap of antennas which are available
950 * for configuration as TX antennas via the above parameters.
951 *
952 * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX: Bitmap of antennas which are available
953 * for configuration as RX antennas via the above parameters.
954 *
955 * @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS
956 *
957 * @NL80211_ATTR_OFFCHANNEL_TX_OK: For management frame TX, the frame may be
958 * transmitted on another channel when the channel given doesn't match
959 * the current channel. If the current channel doesn't match and this
960 * flag isn't set, the frame will be rejected. This is also used as an
961 * nl80211 capability flag.
962 *
963 * @NL80211_ATTR_BSS_HTOPMODE: HT operation mode (u16)
964 *
965 * @NL80211_ATTR_KEY_DEFAULT_TYPES: A nested attribute containing flags
966 * attributes, specifying what a key should be set as default as.
967 * See &enum nl80211_key_default_types.
968 *
969 * @NL80211_ATTR_MESH_SETUP: Optional mesh setup parameters. These cannot be
970 * changed once the mesh is active.
971 * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute
972 * containing attributes from &enum nl80211_meshconf_params.
973 * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver
974 * allows auth frames in a mesh to be passed to userspace for processing via
975 * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag.
976 * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as
977 * defined in &enum nl80211_plink_state. Used when userspace is
978 * driving the peer link management state machine.
979 * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled.
980 *
981 * @NL80211_ATTR_WOWLAN_SUPPORTED: indicates, as part of the wiphy capabilities,
982 * the supported WoWLAN triggers
983 * @NL80211_ATTR_WOWLAN_TRIGGERS: used by %NL80211_CMD_SET_WOWLAN to
984 * indicate which WoW triggers should be enabled. This is also
985 * used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN
986 * triggers.
987
988 * @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan
989 * cycles, in msecs.
990 *
991 * @NL80211_ATTR_INTERFACE_COMBINATIONS: Nested attribute listing the supported
992 * interface combinations. In each nested item, it contains attributes
993 * defined in &enum nl80211_if_combination_attrs.
994 * @NL80211_ATTR_SOFTWARE_IFTYPES: Nested attribute (just like
995 * %NL80211_ATTR_SUPPORTED_IFTYPES) containing the interface types that
996 * are managed in software: interfaces of these types aren't subject to
997 * any restrictions in their number or combinations.
998 *
734 * @NL80211_ATTR_MAX: highest attribute number currently defined 999 * @NL80211_ATTR_MAX: highest attribute number currently defined
735 * @__NL80211_ATTR_AFTER_LAST: internal use 1000 * @__NL80211_ATTR_AFTER_LAST: internal use
736 */ 1001 */
737enum nl80211_attrs { 1002enum nl80211_attrs {
738/* don't change the order or add anything inbetween, this is ABI! */ 1003/* don't change the order or add anything between, this is ABI! */
739 NL80211_ATTR_UNSPEC, 1004 NL80211_ATTR_UNSPEC,
740 1005
741 NL80211_ATTR_WIPHY, 1006 NL80211_ATTR_WIPHY,
@@ -785,7 +1050,7 @@ enum nl80211_attrs {
785 NL80211_ATTR_REG_ALPHA2, 1050 NL80211_ATTR_REG_ALPHA2,
786 NL80211_ATTR_REG_RULES, 1051 NL80211_ATTR_REG_RULES,
787 1052
788 NL80211_ATTR_MESH_PARAMS, 1053 NL80211_ATTR_MESH_CONFIG,
789 1054
790 NL80211_ATTR_BSS_BASIC_RATES, 1055 NL80211_ATTR_BSS_BASIC_RATES,
791 1056
@@ -891,6 +1156,44 @@ enum nl80211_attrs {
891 NL80211_ATTR_WIPHY_TX_POWER_SETTING, 1156 NL80211_ATTR_WIPHY_TX_POWER_SETTING,
892 NL80211_ATTR_WIPHY_TX_POWER_LEVEL, 1157 NL80211_ATTR_WIPHY_TX_POWER_LEVEL,
893 1158
1159 NL80211_ATTR_TX_FRAME_TYPES,
1160 NL80211_ATTR_RX_FRAME_TYPES,
1161 NL80211_ATTR_FRAME_TYPE,
1162
1163 NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
1164 NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,
1165
1166 NL80211_ATTR_SUPPORT_IBSS_RSN,
1167
1168 NL80211_ATTR_WIPHY_ANTENNA_TX,
1169 NL80211_ATTR_WIPHY_ANTENNA_RX,
1170
1171 NL80211_ATTR_MCAST_RATE,
1172
1173 NL80211_ATTR_OFFCHANNEL_TX_OK,
1174
1175 NL80211_ATTR_BSS_HT_OPMODE,
1176
1177 NL80211_ATTR_KEY_DEFAULT_TYPES,
1178
1179 NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION,
1180
1181 NL80211_ATTR_MESH_SETUP,
1182
1183 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX,
1184 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX,
1185
1186 NL80211_ATTR_SUPPORT_MESH_AUTH,
1187 NL80211_ATTR_STA_PLINK_STATE,
1188
1189 NL80211_ATTR_WOWLAN_TRIGGERS,
1190 NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED,
1191
1192 NL80211_ATTR_SCHED_SCAN_INTERVAL,
1193
1194 NL80211_ATTR_INTERFACE_COMBINATIONS,
1195 NL80211_ATTR_SOFTWARE_IFTYPES,
1196
894 /* add attributes here, update the policy in nl80211.c */ 1197 /* add attributes here, update the policy in nl80211.c */
895 1198
896 __NL80211_ATTR_AFTER_LAST, 1199 __NL80211_ATTR_AFTER_LAST,
@@ -899,6 +1202,7 @@ enum nl80211_attrs {
899 1202
900/* source-level API compatibility */ 1203/* source-level API compatibility */
901#define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION 1204#define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION
1205#define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
902 1206
903/* 1207/*
904 * Allow user space programs to use #ifdef on new attributes by defining them 1208 * Allow user space programs to use #ifdef on new attributes by defining them
@@ -942,12 +1246,16 @@ enum nl80211_attrs {
942 * @NL80211_IFTYPE_ADHOC: independent BSS member 1246 * @NL80211_IFTYPE_ADHOC: independent BSS member
943 * @NL80211_IFTYPE_STATION: managed BSS member 1247 * @NL80211_IFTYPE_STATION: managed BSS member
944 * @NL80211_IFTYPE_AP: access point 1248 * @NL80211_IFTYPE_AP: access point
945 * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points 1249 * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points; VLAN interfaces
1250 * are a bit special in that they must always be tied to a pre-existing
1251 * AP type interface.
946 * @NL80211_IFTYPE_WDS: wireless distribution interface 1252 * @NL80211_IFTYPE_WDS: wireless distribution interface
947 * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames 1253 * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames
948 * @NL80211_IFTYPE_MESH_POINT: mesh point 1254 * @NL80211_IFTYPE_MESH_POINT: mesh point
1255 * @NL80211_IFTYPE_P2P_CLIENT: P2P client
1256 * @NL80211_IFTYPE_P2P_GO: P2P group owner
949 * @NL80211_IFTYPE_MAX: highest interface type number currently defined 1257 * @NL80211_IFTYPE_MAX: highest interface type number currently defined
950 * @__NL80211_IFTYPE_AFTER_LAST: internal use 1258 * @NUM_NL80211_IFTYPES: number of defined interface types
951 * 1259 *
952 * These values are used with the %NL80211_ATTR_IFTYPE 1260 * These values are used with the %NL80211_ATTR_IFTYPE
953 * to set the type of an interface. 1261 * to set the type of an interface.
@@ -962,10 +1270,12 @@ enum nl80211_iftype {
962 NL80211_IFTYPE_WDS, 1270 NL80211_IFTYPE_WDS,
963 NL80211_IFTYPE_MONITOR, 1271 NL80211_IFTYPE_MONITOR,
964 NL80211_IFTYPE_MESH_POINT, 1272 NL80211_IFTYPE_MESH_POINT,
1273 NL80211_IFTYPE_P2P_CLIENT,
1274 NL80211_IFTYPE_P2P_GO,
965 1275
966 /* keep last */ 1276 /* keep last */
967 __NL80211_IFTYPE_AFTER_LAST, 1277 NUM_NL80211_IFTYPES,
968 NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1 1278 NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
969}; 1279};
970 1280
971/** 1281/**
@@ -974,11 +1284,15 @@ enum nl80211_iftype {
974 * Station flags. When a station is added to an AP interface, it is 1284 * Station flags. When a station is added to an AP interface, it is
975 * assumed to be already associated (and hence authenticated.) 1285 * assumed to be already associated (and hence authenticated.)
976 * 1286 *
1287 * @__NL80211_STA_FLAG_INVALID: attribute number 0 is reserved
977 * @NL80211_STA_FLAG_AUTHORIZED: station is authorized (802.1X) 1288 * @NL80211_STA_FLAG_AUTHORIZED: station is authorized (802.1X)
978 * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames 1289 * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames
979 * with short barker preamble 1290 * with short barker preamble
980 * @NL80211_STA_FLAG_WME: station is WME/QoS capable 1291 * @NL80211_STA_FLAG_WME: station is WME/QoS capable
981 * @NL80211_STA_FLAG_MFP: station uses management frame protection 1292 * @NL80211_STA_FLAG_MFP: station uses management frame protection
1293 * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated
1294 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
1295 * @__NL80211_STA_FLAG_AFTER_LAST: internal use
982 */ 1296 */
983enum nl80211_sta_flags { 1297enum nl80211_sta_flags {
984 __NL80211_STA_FLAG_INVALID, 1298 __NL80211_STA_FLAG_INVALID,
@@ -986,6 +1300,7 @@ enum nl80211_sta_flags {
986 NL80211_STA_FLAG_SHORT_PREAMBLE, 1300 NL80211_STA_FLAG_SHORT_PREAMBLE,
987 NL80211_STA_FLAG_WME, 1301 NL80211_STA_FLAG_WME,
988 NL80211_STA_FLAG_MFP, 1302 NL80211_STA_FLAG_MFP,
1303 NL80211_STA_FLAG_AUTHENTICATED,
989 1304
990 /* keep last */ 1305 /* keep last */
991 __NL80211_STA_FLAG_AFTER_LAST, 1306 __NL80211_STA_FLAG_AFTER_LAST,
@@ -1031,6 +1346,36 @@ enum nl80211_rate_info {
1031}; 1346};
1032 1347
1033/** 1348/**
1349 * enum nl80211_sta_bss_param - BSS information collected by STA
1350 *
1351 * These attribute types are used with %NL80211_STA_INFO_BSS_PARAM
1352 * when getting information about the bitrate of a station.
1353 *
1354 * @__NL80211_STA_BSS_PARAM_INVALID: attribute number 0 is reserved
1355 * @NL80211_STA_BSS_PARAM_CTS_PROT: whether CTS protection is enabled (flag)
1356 * @NL80211_STA_BSS_PARAM_SHORT_PREAMBLE: whether short preamble is enabled
1357 * (flag)
1358 * @NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME: whether short slot time is enabled
1359 * (flag)
1360 * @NL80211_STA_BSS_PARAM_DTIM_PERIOD: DTIM period for beaconing (u8)
1361 * @NL80211_STA_BSS_PARAM_BEACON_INTERVAL: Beacon interval (u16)
1362 * @NL80211_STA_BSS_PARAM_MAX: highest sta_bss_param number currently defined
1363 * @__NL80211_STA_BSS_PARAM_AFTER_LAST: internal use
1364 */
1365enum nl80211_sta_bss_param {
1366 __NL80211_STA_BSS_PARAM_INVALID,
1367 NL80211_STA_BSS_PARAM_CTS_PROT,
1368 NL80211_STA_BSS_PARAM_SHORT_PREAMBLE,
1369 NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME,
1370 NL80211_STA_BSS_PARAM_DTIM_PERIOD,
1371 NL80211_STA_BSS_PARAM_BEACON_INTERVAL,
1372
1373 /* keep last */
1374 __NL80211_STA_BSS_PARAM_AFTER_LAST,
1375 NL80211_STA_BSS_PARAM_MAX = __NL80211_STA_BSS_PARAM_AFTER_LAST - 1
1376};
1377
1378/**
1034 * enum nl80211_sta_info - station information 1379 * enum nl80211_sta_info - station information
1035 * 1380 *
1036 * These attribute types are used with %NL80211_ATTR_STA_INFO 1381 * These attribute types are used with %NL80211_ATTR_STA_INFO
@@ -1040,14 +1385,26 @@ enum nl80211_rate_info {
1040 * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) 1385 * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs)
1041 * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) 1386 * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station)
1042 * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) 1387 * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station)
1043 * @__NL80211_STA_INFO_AFTER_LAST: internal
1044 * @NL80211_STA_INFO_MAX: highest possible station info attribute
1045 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) 1388 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
1046 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute 1389 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
1047 * containing info as possible, see &enum nl80211_sta_info_txrate. 1390 * containing info as possible, see &enum nl80211_rate_info
1048 * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) 1391 * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station)
1049 * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this 1392 * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this
1050 * station) 1393 * station)
1394 * @NL80211_STA_INFO_TX_RETRIES: total retries (u32, to this station)
1395 * @NL80211_STA_INFO_TX_FAILED: total failed packets (u32, to this station)
1396 * @NL80211_STA_INFO_SIGNAL_AVG: signal strength average (u8, dBm)
1397 * @NL80211_STA_INFO_LLID: the station's mesh LLID
1398 * @NL80211_STA_INFO_PLID: the station's mesh PLID
1399 * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station
1400 * (see %enum nl80211_plink_state)
1401 * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested
1402 * attribute, like NL80211_STA_INFO_TX_BITRATE.
1403 * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute
1404 * containing info as possible, see &enum nl80211_sta_bss_param
1405 * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected
1406 * @__NL80211_STA_INFO_AFTER_LAST: internal
1407 * @NL80211_STA_INFO_MAX: highest possible station info attribute
1051 */ 1408 */
1052enum nl80211_sta_info { 1409enum nl80211_sta_info {
1053 __NL80211_STA_INFO_INVALID, 1410 __NL80211_STA_INFO_INVALID,
@@ -1061,6 +1418,12 @@ enum nl80211_sta_info {
1061 NL80211_STA_INFO_TX_BITRATE, 1418 NL80211_STA_INFO_TX_BITRATE,
1062 NL80211_STA_INFO_RX_PACKETS, 1419 NL80211_STA_INFO_RX_PACKETS,
1063 NL80211_STA_INFO_TX_PACKETS, 1420 NL80211_STA_INFO_TX_PACKETS,
1421 NL80211_STA_INFO_TX_RETRIES,
1422 NL80211_STA_INFO_TX_FAILED,
1423 NL80211_STA_INFO_SIGNAL_AVG,
1424 NL80211_STA_INFO_RX_BITRATE,
1425 NL80211_STA_INFO_BSS_PARAM,
1426 NL80211_STA_INFO_CONNECTED_TIME,
1064 1427
1065 /* keep last */ 1428 /* keep last */
1066 __NL80211_STA_INFO_AFTER_LAST, 1429 __NL80211_STA_INFO_AFTER_LAST,
@@ -1091,14 +1454,17 @@ enum nl80211_mpath_flags {
1091 * information about a mesh path. 1454 * information about a mesh path.
1092 * 1455 *
1093 * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved 1456 * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved
1094 * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination 1457 * @NL80211_MPATH_INFO_FRAME_QLEN: number of queued frames for this destination
1095 * @NL80211_ATTR_MPATH_SN: destination sequence number 1458 * @NL80211_MPATH_INFO_SN: destination sequence number
1096 * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path 1459 * @NL80211_MPATH_INFO_METRIC: metric (cost) of this mesh path
1097 * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now 1460 * @NL80211_MPATH_INFO_EXPTIME: expiration time for the path, in msec from now
1098 * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in 1461 * @NL80211_MPATH_INFO_FLAGS: mesh path flags, enumerated in
1099 * &enum nl80211_mpath_flags; 1462 * &enum nl80211_mpath_flags;
1100 * @NL80211_ATTR_MPATH_DISCOVERY_TIMEOUT: total path discovery timeout, in msec 1463 * @NL80211_MPATH_INFO_DISCOVERY_TIMEOUT: total path discovery timeout, in msec
1101 * @NL80211_ATTR_MPATH_DISCOVERY_RETRIES: mesh path discovery retries 1464 * @NL80211_MPATH_INFO_DISCOVERY_RETRIES: mesh path discovery retries
1465 * @NL80211_MPATH_INFO_MAX: highest mesh path information attribute number
1466 * currently defind
1467 * @__NL80211_MPATH_INFO_AFTER_LAST: internal use
1102 */ 1468 */
1103enum nl80211_mpath_info { 1469enum nl80211_mpath_info {
1104 __NL80211_MPATH_INFO_INVALID, 1470 __NL80211_MPATH_INFO_INVALID,
@@ -1127,6 +1493,8 @@ enum nl80211_mpath_info {
1127 * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE 1493 * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE
1128 * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n 1494 * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n
1129 * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n 1495 * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n
1496 * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined
1497 * @__NL80211_BAND_ATTR_AFTER_LAST: internal use
1130 */ 1498 */
1131enum nl80211_band_attr { 1499enum nl80211_band_attr {
1132 __NL80211_BAND_ATTR_INVALID, 1500 __NL80211_BAND_ATTR_INVALID,
@@ -1147,6 +1515,7 @@ enum nl80211_band_attr {
1147 1515
1148/** 1516/**
1149 * enum nl80211_frequency_attr - frequency attributes 1517 * enum nl80211_frequency_attr - frequency attributes
1518 * @__NL80211_FREQUENCY_ATTR_INVALID: attribute number 0 is reserved
1150 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz 1519 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz
1151 * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current 1520 * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current
1152 * regulatory domain. 1521 * regulatory domain.
@@ -1158,6 +1527,9 @@ enum nl80211_band_attr {
1158 * on this channel in current regulatory domain. 1527 * on this channel in current regulatory domain.
1159 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm 1528 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
1160 * (100 * dBm). 1529 * (100 * dBm).
1530 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
1531 * currently defined
1532 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
1161 */ 1533 */
1162enum nl80211_frequency_attr { 1534enum nl80211_frequency_attr {
1163 __NL80211_FREQUENCY_ATTR_INVALID, 1535 __NL80211_FREQUENCY_ATTR_INVALID,
@@ -1177,9 +1549,13 @@ enum nl80211_frequency_attr {
1177 1549
1178/** 1550/**
1179 * enum nl80211_bitrate_attr - bitrate attributes 1551 * enum nl80211_bitrate_attr - bitrate attributes
1552 * @__NL80211_BITRATE_ATTR_INVALID: attribute number 0 is reserved
1180 * @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps 1553 * @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps
1181 * @NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE: Short preamble supported 1554 * @NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE: Short preamble supported
1182 * in 2.4 GHz band. 1555 * in 2.4 GHz band.
1556 * @NL80211_BITRATE_ATTR_MAX: highest bitrate attribute number
1557 * currently defined
1558 * @__NL80211_BITRATE_ATTR_AFTER_LAST: internal use
1183 */ 1559 */
1184enum nl80211_bitrate_attr { 1560enum nl80211_bitrate_attr {
1185 __NL80211_BITRATE_ATTR_INVALID, 1561 __NL80211_BITRATE_ATTR_INVALID,
@@ -1201,7 +1577,11 @@ enum nl80211_bitrate_attr {
1201 * wireless core it thinks its knows the regulatory domain we should be in. 1577 * wireless core it thinks its knows the regulatory domain we should be in.
1202 * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an 1578 * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an
1203 * 802.11 country information element with regulatory information it 1579 * 802.11 country information element with regulatory information it
1204 * thinks we should consider. 1580 * thinks we should consider. cfg80211 only processes the country
1581 * code from the IE, and relies on the regulatory domain information
1582 * structure passed by userspace (CRDA) from our wireless-regdb.
1583 * If a channel is enabled but the country code indicates it should
1584 * be disabled we disable the channel and re-enable it upon disassociation.
1205 */ 1585 */
1206enum nl80211_reg_initiator { 1586enum nl80211_reg_initiator {
1207 NL80211_REGDOM_SET_BY_CORE, 1587 NL80211_REGDOM_SET_BY_CORE,
@@ -1235,6 +1615,7 @@ enum nl80211_reg_type {
1235 1615
1236/** 1616/**
1237 * enum nl80211_reg_rule_attr - regulatory rule attributes 1617 * enum nl80211_reg_rule_attr - regulatory rule attributes
1618 * @__NL80211_REG_RULE_ATTR_INVALID: attribute number 0 is reserved
1238 * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional 1619 * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional
1239 * considerations for a given frequency range. These are the 1620 * considerations for a given frequency range. These are the
1240 * &enum nl80211_reg_rule_flags. 1621 * &enum nl80211_reg_rule_flags.
@@ -1251,6 +1632,9 @@ enum nl80211_reg_type {
1251 * If you don't have one then don't send this. 1632 * If you don't have one then don't send this.
1252 * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for 1633 * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for
1253 * a given frequency range. The value is in mBm (100 * dBm). 1634 * a given frequency range. The value is in mBm (100 * dBm).
1635 * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number
1636 * currently defined
1637 * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use
1254 */ 1638 */
1255enum nl80211_reg_rule_attr { 1639enum nl80211_reg_rule_attr {
1256 __NL80211_REG_RULE_ATTR_INVALID, 1640 __NL80211_REG_RULE_ATTR_INVALID,
@@ -1302,11 +1686,31 @@ enum nl80211_reg_rule_flags {
1302 * @__NL80211_SURVEY_INFO_INVALID: attribute number 0 is reserved 1686 * @__NL80211_SURVEY_INFO_INVALID: attribute number 0 is reserved
1303 * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel 1687 * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel
1304 * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm) 1688 * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm)
1689 * @NL80211_SURVEY_INFO_IN_USE: channel is currently being used
1690 * @NL80211_SURVEY_INFO_CHANNEL_TIME: amount of time (in ms) that the radio
1691 * spent on this channel
1692 * @NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY: amount of the time the primary
1693 * channel was sensed busy (either due to activity or energy detect)
1694 * @NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY: amount of time the extension
1695 * channel was sensed busy
1696 * @NL80211_SURVEY_INFO_CHANNEL_TIME_RX: amount of time the radio spent
1697 * receiving data
1698 * @NL80211_SURVEY_INFO_CHANNEL_TIME_TX: amount of time the radio spent
1699 * transmitting data
1700 * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
1701 * currently defined
1702 * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
1305 */ 1703 */
1306enum nl80211_survey_info { 1704enum nl80211_survey_info {
1307 __NL80211_SURVEY_INFO_INVALID, 1705 __NL80211_SURVEY_INFO_INVALID,
1308 NL80211_SURVEY_INFO_FREQUENCY, 1706 NL80211_SURVEY_INFO_FREQUENCY,
1309 NL80211_SURVEY_INFO_NOISE, 1707 NL80211_SURVEY_INFO_NOISE,
1708 NL80211_SURVEY_INFO_IN_USE,
1709 NL80211_SURVEY_INFO_CHANNEL_TIME,
1710 NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY,
1711 NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY,
1712 NL80211_SURVEY_INFO_CHANNEL_TIME_RX,
1713 NL80211_SURVEY_INFO_CHANNEL_TIME_TX,
1310 1714
1311 /* keep last */ 1715 /* keep last */
1312 __NL80211_SURVEY_INFO_AFTER_LAST, 1716 __NL80211_SURVEY_INFO_AFTER_LAST,
@@ -1346,14 +1750,15 @@ enum nl80211_mntr_flags {
1346/** 1750/**
1347 * enum nl80211_meshconf_params - mesh configuration parameters 1751 * enum nl80211_meshconf_params - mesh configuration parameters
1348 * 1752 *
1349 * Mesh configuration parameters 1753 * Mesh configuration parameters. These can be changed while the mesh is
1754 * active.
1350 * 1755 *
1351 * @__NL80211_MESHCONF_INVALID: internal use 1756 * @__NL80211_MESHCONF_INVALID: internal use
1352 * 1757 *
1353 * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in 1758 * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in
1354 * millisecond units, used by the Peer Link Open message 1759 * millisecond units, used by the Peer Link Open message
1355 * 1760 *
1356 * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the inital confirm timeout, in 1761 * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the initial confirm timeout, in
1357 * millisecond units, used by the peer link management to close a peer link 1762 * millisecond units, used by the peer link management to close a peer link
1358 * 1763 *
1359 * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in 1764 * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in
@@ -1393,7 +1798,10 @@ enum nl80211_mntr_flags {
1393 * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) 1798 * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs)
1394 * that it takes for an HWMP information element to propagate across the mesh 1799 * that it takes for an HWMP information element to propagate across the mesh
1395 * 1800 *
1396 * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not 1801 * @NL80211_MESHCONF_HWMP_ROOTMODE: whether root mode is enabled or not
1802 *
1803 * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a
1804 * source mesh point for path selection elements.
1397 * 1805 *
1398 * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute 1806 * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
1399 * 1807 *
@@ -1415,6 +1823,7 @@ enum nl80211_meshconf_params {
1415 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, 1823 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
1416 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, 1824 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
1417 NL80211_MESHCONF_HWMP_ROOTMODE, 1825 NL80211_MESHCONF_HWMP_ROOTMODE,
1826 NL80211_MESHCONF_ELEMENT_TTL,
1418 1827
1419 /* keep last */ 1828 /* keep last */
1420 __NL80211_MESHCONF_ATTR_AFTER_LAST, 1829 __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -1422,6 +1831,54 @@ enum nl80211_meshconf_params {
1422}; 1831};
1423 1832
1424/** 1833/**
1834 * enum nl80211_mesh_setup_params - mesh setup parameters
1835 *
1836 * Mesh setup parameters. These are used to start/join a mesh and cannot be
1837 * changed while the mesh is active.
1838 *
1839 * @__NL80211_MESH_SETUP_INVALID: Internal use
1840 *
1841 * @NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL: Enable this option to use a
1842 * vendor specific path selection algorithm or disable it to use the default
1843 * HWMP.
1844 *
1845 * @NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC: Enable this option to use a
1846 * vendor specific path metric or disable it to use the default Airtime
1847 * metric.
1848 *
1849 * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a
1850 * robust security network ie, or a vendor specific information element that
1851 * vendors will use to identify the path selection methods and metrics in use.
1852 *
1853 * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication
1854 * daemon will be authenticating mesh candidates.
1855 *
1856 * @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication
1857 * daemon will be securing peer link frames. AMPE is a secured version of Mesh
1858 * Peering Management (MPM) and is implemented with the assistance of a
1859 * userspace daemon. When this flag is set, the kernel will send peer
1860 * management frames to a userspace daemon that will implement AMPE
1861 * functionality (security capabilities selection, key confirmation, and key
1862 * management). When the flag is unset (default), the kernel can autonomously
1863 * complete (unsecured) mesh peering without the need of a userspace daemon.
1864 *
1865 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
1866 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
1867 */
1868enum nl80211_mesh_setup_params {
1869 __NL80211_MESH_SETUP_INVALID,
1870 NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL,
1871 NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC,
1872 NL80211_MESH_SETUP_IE,
1873 NL80211_MESH_SETUP_USERSPACE_AUTH,
1874 NL80211_MESH_SETUP_USERSPACE_AMPE,
1875
1876 /* keep last */
1877 __NL80211_MESH_SETUP_ATTR_AFTER_LAST,
1878 NL80211_MESH_SETUP_ATTR_MAX = __NL80211_MESH_SETUP_ATTR_AFTER_LAST - 1
1879};
1880
1881/**
1425 * enum nl80211_txq_attr - TX queue parameter attributes 1882 * enum nl80211_txq_attr - TX queue parameter attributes
1426 * @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved 1883 * @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved
1427 * @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*) 1884 * @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*)
@@ -1466,6 +1923,7 @@ enum nl80211_channel_type {
1466 * enum nl80211_bss - netlink attributes for a BSS 1923 * enum nl80211_bss - netlink attributes for a BSS
1467 * 1924 *
1468 * @__NL80211_BSS_INVALID: invalid 1925 * @__NL80211_BSS_INVALID: invalid
1926 * @NL80211_BSS_BSSID: BSSID of the BSS (6 octets)
1469 * @NL80211_BSS_FREQUENCY: frequency in MHz (u32) 1927 * @NL80211_BSS_FREQUENCY: frequency in MHz (u32)
1470 * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64) 1928 * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64)
1471 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) 1929 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16)
@@ -1509,6 +1967,12 @@ enum nl80211_bss {
1509 1967
1510/** 1968/**
1511 * enum nl80211_bss_status - BSS "status" 1969 * enum nl80211_bss_status - BSS "status"
1970 * @NL80211_BSS_STATUS_AUTHENTICATED: Authenticated with this BSS.
1971 * @NL80211_BSS_STATUS_ASSOCIATED: Associated with this BSS.
1972 * @NL80211_BSS_STATUS_IBSS_JOINED: Joined to this IBSS.
1973 *
1974 * The BSS status is a BSS attribute in scan dumps, which
1975 * indicates the status the interface has wrt. this BSS.
1512 */ 1976 */
1513enum nl80211_bss_status { 1977enum nl80211_bss_status {
1514 NL80211_BSS_STATUS_AUTHENTICATED, 1978 NL80211_BSS_STATUS_AUTHENTICATED,
@@ -1546,11 +2010,14 @@ enum nl80211_auth_type {
1546 * @NL80211_KEYTYPE_GROUP: Group (broadcast/multicast) key 2010 * @NL80211_KEYTYPE_GROUP: Group (broadcast/multicast) key
1547 * @NL80211_KEYTYPE_PAIRWISE: Pairwise (unicast/individual) key 2011 * @NL80211_KEYTYPE_PAIRWISE: Pairwise (unicast/individual) key
1548 * @NL80211_KEYTYPE_PEERKEY: PeerKey (DLS) 2012 * @NL80211_KEYTYPE_PEERKEY: PeerKey (DLS)
2013 * @NUM_NL80211_KEYTYPES: number of defined key types
1549 */ 2014 */
1550enum nl80211_key_type { 2015enum nl80211_key_type {
1551 NL80211_KEYTYPE_GROUP, 2016 NL80211_KEYTYPE_GROUP,
1552 NL80211_KEYTYPE_PAIRWISE, 2017 NL80211_KEYTYPE_PAIRWISE,
1553 NL80211_KEYTYPE_PEERKEY, 2018 NL80211_KEYTYPE_PEERKEY,
2019
2020 NUM_NL80211_KEYTYPES
1554}; 2021};
1555 2022
1556/** 2023/**
@@ -1569,6 +2036,23 @@ enum nl80211_wpa_versions {
1569}; 2036};
1570 2037
1571/** 2038/**
2039 * enum nl80211_key_default_types - key default types
2040 * @__NL80211_KEY_DEFAULT_TYPE_INVALID: invalid
2041 * @NL80211_KEY_DEFAULT_TYPE_UNICAST: key should be used as default
2042 * unicast key
2043 * @NL80211_KEY_DEFAULT_TYPE_MULTICAST: key should be used as default
2044 * multicast key
2045 * @NUM_NL80211_KEY_DEFAULT_TYPES: number of default types
2046 */
2047enum nl80211_key_default_types {
2048 __NL80211_KEY_DEFAULT_TYPE_INVALID,
2049 NL80211_KEY_DEFAULT_TYPE_UNICAST,
2050 NL80211_KEY_DEFAULT_TYPE_MULTICAST,
2051
2052 NUM_NL80211_KEY_DEFAULT_TYPES
2053};
2054
2055/**
1572 * enum nl80211_key_attributes - key attributes 2056 * enum nl80211_key_attributes - key attributes
1573 * @__NL80211_KEY_INVALID: invalid 2057 * @__NL80211_KEY_INVALID: invalid
1574 * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of 2058 * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of
@@ -1581,6 +2065,12 @@ enum nl80211_wpa_versions {
1581 * CCMP keys, each six bytes in little endian 2065 * CCMP keys, each six bytes in little endian
1582 * @NL80211_KEY_DEFAULT: flag indicating default key 2066 * @NL80211_KEY_DEFAULT: flag indicating default key
1583 * @NL80211_KEY_DEFAULT_MGMT: flag indicating default management key 2067 * @NL80211_KEY_DEFAULT_MGMT: flag indicating default management key
2068 * @NL80211_KEY_TYPE: the key type from enum nl80211_key_type, if not
2069 * specified the default depends on whether a MAC address was
2070 * given with the command using the key or not (u32)
2071 * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags
2072 * attributes, specifying what a key should be set as default as.
2073 * See &enum nl80211_key_default_types.
1584 * @__NL80211_KEY_AFTER_LAST: internal 2074 * @__NL80211_KEY_AFTER_LAST: internal
1585 * @NL80211_KEY_MAX: highest key attribute 2075 * @NL80211_KEY_MAX: highest key attribute
1586 */ 2076 */
@@ -1592,6 +2082,8 @@ enum nl80211_key_attributes {
1592 NL80211_KEY_SEQ, 2082 NL80211_KEY_SEQ,
1593 NL80211_KEY_DEFAULT, 2083 NL80211_KEY_DEFAULT,
1594 NL80211_KEY_DEFAULT_MGMT, 2084 NL80211_KEY_DEFAULT_MGMT,
2085 NL80211_KEY_TYPE,
2086 NL80211_KEY_DEFAULT_TYPES,
1595 2087
1596 /* keep last */ 2088 /* keep last */
1597 __NL80211_KEY_AFTER_LAST, 2089 __NL80211_KEY_AFTER_LAST,
@@ -1619,8 +2111,8 @@ enum nl80211_tx_rate_attributes {
1619 2111
1620/** 2112/**
1621 * enum nl80211_band - Frequency band 2113 * enum nl80211_band - Frequency band
1622 * @NL80211_BAND_2GHZ - 2.4 GHz ISM band 2114 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
1623 * @NL80211_BAND_5GHZ - around 5 GHz band (4.9 - 5.7 GHz) 2115 * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
1624 */ 2116 */
1625enum nl80211_band { 2117enum nl80211_band {
1626 NL80211_BAND_2GHZ, 2118 NL80211_BAND_2GHZ,
@@ -1642,6 +2134,8 @@ enum nl80211_ps_state {
1642 * the minimum amount the RSSI level must change after an event before a 2134 * the minimum amount the RSSI level must change after an event before a
1643 * new event may be issued (to reduce effects of RSSI oscillation). 2135 * new event may be issued (to reduce effects of RSSI oscillation).
1644 * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event 2136 * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event
2137 * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many
2138 * consecutive packets were not acknowledged by the peer
1645 * @__NL80211_ATTR_CQM_AFTER_LAST: internal 2139 * @__NL80211_ATTR_CQM_AFTER_LAST: internal
1646 * @NL80211_ATTR_CQM_MAX: highest key attribute 2140 * @NL80211_ATTR_CQM_MAX: highest key attribute
1647 */ 2141 */
@@ -1650,6 +2144,7 @@ enum nl80211_attr_cqm {
1650 NL80211_ATTR_CQM_RSSI_THOLD, 2144 NL80211_ATTR_CQM_RSSI_THOLD,
1651 NL80211_ATTR_CQM_RSSI_HYST, 2145 NL80211_ATTR_CQM_RSSI_HYST,
1652 NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, 2146 NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT,
2147 NL80211_ATTR_CQM_PKT_LOSS_EVENT,
1653 2148
1654 /* keep last */ 2149 /* keep last */
1655 __NL80211_ATTR_CQM_AFTER_LAST, 2150 __NL80211_ATTR_CQM_AFTER_LAST,
@@ -1658,9 +2153,9 @@ enum nl80211_attr_cqm {
1658 2153
1659/** 2154/**
1660 * enum nl80211_cqm_rssi_threshold_event - RSSI threshold event 2155 * enum nl80211_cqm_rssi_threshold_event - RSSI threshold event
1661 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW - The RSSI level is lower than the 2156 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW: The RSSI level is lower than the
1662 * configured threshold 2157 * configured threshold
1663 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH - The RSSI is higher than the 2158 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the
1664 * configured threshold 2159 * configured threshold
1665 */ 2160 */
1666enum nl80211_cqm_rssi_threshold_event { 2161enum nl80211_cqm_rssi_threshold_event {
@@ -1681,4 +2176,189 @@ enum nl80211_tx_power_setting {
1681 NL80211_TX_POWER_FIXED, 2176 NL80211_TX_POWER_FIXED,
1682}; 2177};
1683 2178
2179/**
2180 * enum nl80211_wowlan_packet_pattern_attr - WoWLAN packet pattern attribute
2181 * @__NL80211_WOWLAN_PKTPAT_INVALID: invalid number for nested attribute
2182 * @NL80211_WOWLAN_PKTPAT_PATTERN: the pattern, values where the mask has
2183 * a zero bit are ignored
2184 * @NL80211_WOWLAN_PKTPAT_MASK: pattern mask, must be long enough to have
2185 * a bit for each byte in the pattern. The lowest-order bit corresponds
2186 * to the first byte of the pattern, but the bytes of the pattern are
2187 * in a little-endian-like format, i.e. the 9th byte of the pattern
2188 * corresponds to the lowest-order bit in the second byte of the mask.
2189 * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where
2190 * xx indicates "don't care") would be represented by a pattern of
2191 * twelve zero bytes, and a mask of "0xed,0x07".
2192 * Note that the pattern matching is done as though frames were not
2193 * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked
2194 * first (including SNAP header unpacking) and then matched.
2195 * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes
2196 * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number
2197 */
2198enum nl80211_wowlan_packet_pattern_attr {
2199 __NL80211_WOWLAN_PKTPAT_INVALID,
2200 NL80211_WOWLAN_PKTPAT_MASK,
2201 NL80211_WOWLAN_PKTPAT_PATTERN,
2202
2203 NUM_NL80211_WOWLAN_PKTPAT,
2204 MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1,
2205};
2206
2207/**
2208 * struct nl80211_wowlan_pattern_support - pattern support information
2209 * @max_patterns: maximum number of patterns supported
2210 * @min_pattern_len: minimum length of each pattern
2211 * @max_pattern_len: maximum length of each pattern
2212 *
2213 * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when
2214 * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the
2215 * capability information given by the kernel to userspace.
2216 */
2217struct nl80211_wowlan_pattern_support {
2218 __u32 max_patterns;
2219 __u32 min_pattern_len;
2220 __u32 max_pattern_len;
2221} __attribute__((packed));
2222
2223/**
2224 * enum nl80211_wowlan_triggers - WoWLAN trigger definitions
2225 * @__NL80211_WOWLAN_TRIG_INVALID: invalid number for nested attributes
2226 * @NL80211_WOWLAN_TRIG_ANY: wake up on any activity, do not really put
2227 * the chip into a special state -- works best with chips that have
2228 * support for low-power operation already (flag)
2229 * @NL80211_WOWLAN_TRIG_DISCONNECT: wake up on disconnect, the way disconnect
2230 * is detected is implementation-specific (flag)
2231 * @NL80211_WOWLAN_TRIG_MAGIC_PKT: wake up on magic packet (6x 0xff, followed
2232 * by 16 repetitions of MAC addr, anywhere in payload) (flag)
2233 * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns
2234 * which are passed in an array of nested attributes, each nested attribute
2235 * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern.
2236 * Each pattern defines a wakeup packet. The matching is done on the MSDU,
2237 * i.e. as though the packet was an 802.3 packet, so the pattern matching
2238 * is done after the packet is converted to the MSDU.
2239 *
2240 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
2241 * carrying a &struct nl80211_wowlan_pattern_support.
2242 * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers
2243 * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number
2244 */
2245enum nl80211_wowlan_triggers {
2246 __NL80211_WOWLAN_TRIG_INVALID,
2247 NL80211_WOWLAN_TRIG_ANY,
2248 NL80211_WOWLAN_TRIG_DISCONNECT,
2249 NL80211_WOWLAN_TRIG_MAGIC_PKT,
2250 NL80211_WOWLAN_TRIG_PKT_PATTERN,
2251
2252 /* keep last */
2253 NUM_NL80211_WOWLAN_TRIG,
2254 MAX_NL80211_WOWLAN_TRIG = NUM_NL80211_WOWLAN_TRIG - 1
2255};
2256
2257/**
2258 * enum nl80211_iface_limit_attrs - limit attributes
2259 * @NL80211_IFACE_LIMIT_UNSPEC: (reserved)
2260 * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that
2261 * can be chosen from this set of interface types (u32)
2262 * @NL80211_IFACE_LIMIT_TYPES: nested attribute containing a
2263 * flag attribute for each interface type in this set
2264 * @NUM_NL80211_IFACE_LIMIT: number of attributes
2265 * @MAX_NL80211_IFACE_LIMIT: highest attribute number
2266 */
2267enum nl80211_iface_limit_attrs {
2268 NL80211_IFACE_LIMIT_UNSPEC,
2269 NL80211_IFACE_LIMIT_MAX,
2270 NL80211_IFACE_LIMIT_TYPES,
2271
2272 /* keep last */
2273 NUM_NL80211_IFACE_LIMIT,
2274 MAX_NL80211_IFACE_LIMIT = NUM_NL80211_IFACE_LIMIT - 1
2275};
2276
2277/**
2278 * enum nl80211_if_combination_attrs -- interface combination attributes
2279 *
2280 * @NL80211_IFACE_COMB_UNSPEC: (reserved)
2281 * @NL80211_IFACE_COMB_LIMITS: Nested attributes containing the limits
2282 * for given interface types, see &enum nl80211_iface_limit_attrs.
2283 * @NL80211_IFACE_COMB_MAXNUM: u32 attribute giving the total number of
2284 * interfaces that can be created in this group. This number doesn't
2285 * apply to interfaces purely managed in software, which are listed
2286 * in a separate attribute %NL80211_ATTR_INTERFACES_SOFTWARE.
2287 * @NL80211_IFACE_COMB_STA_AP_BI_MATCH: flag attribute specifying that
2288 * beacon intervals within this group must be all the same even for
2289 * infrastructure and AP/GO combinations, i.e. the GO(s) must adopt
2290 * the infrastructure network's beacon interval.
2291 * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many
2292 * different channels may be used within this group.
2293 * @NUM_NL80211_IFACE_COMB: number of attributes
2294 * @MAX_NL80211_IFACE_COMB: highest attribute number
2295 *
2296 * Examples:
2297 * limits = [ #{STA} <= 1, #{AP} <= 1 ], matching BI, channels = 1, max = 2
2298 * => allows an AP and a STA that must match BIs
2299 *
2300 * numbers = [ #{AP, P2P-GO} <= 8 ], channels = 1, max = 8
2301 * => allows 8 of AP/GO
2302 *
2303 * numbers = [ #{STA} <= 2 ], channels = 2, max = 2
2304 * => allows two STAs on different channels
2305 *
2306 * numbers = [ #{STA} <= 1, #{P2P-client,P2P-GO} <= 3 ], max = 4
2307 * => allows a STA plus three P2P interfaces
2308 *
2309 * The list of these four possiblities could completely be contained
2310 * within the %NL80211_ATTR_INTERFACE_COMBINATIONS attribute to indicate
2311 * that any of these groups must match.
2312 *
2313 * "Combinations" of just a single interface will not be listed here,
2314 * a single interface of any valid interface type is assumed to always
2315 * be possible by itself. This means that implicitly, for each valid
2316 * interface type, the following group always exists:
2317 * numbers = [ #{<type>} <= 1 ], channels = 1, max = 1
2318 */
2319enum nl80211_if_combination_attrs {
2320 NL80211_IFACE_COMB_UNSPEC,
2321 NL80211_IFACE_COMB_LIMITS,
2322 NL80211_IFACE_COMB_MAXNUM,
2323 NL80211_IFACE_COMB_STA_AP_BI_MATCH,
2324 NL80211_IFACE_COMB_NUM_CHANNELS,
2325
2326 /* keep last */
2327 NUM_NL80211_IFACE_COMB,
2328 MAX_NL80211_IFACE_COMB = NUM_NL80211_IFACE_COMB - 1
2329};
2330
2331
2332/**
2333 * enum nl80211_plink_state - state of a mesh peer link finite state machine
2334 *
2335 * @NL80211_PLINK_LISTEN: initial state, considered the implicit
2336 * state of non existant mesh peer links
2337 * @NL80211_PLINK_OPN_SNT: mesh plink open frame has been sent to
2338 * this mesh peer
2339 * @NL80211_PLINK_OPN_RCVD: mesh plink open frame has been received
2340 * from this mesh peer
2341 * @NL80211_PLINK_CNF_RCVD: mesh plink confirm frame has been
2342 * received from this mesh peer
2343 * @NL80211_PLINK_ESTAB: mesh peer link is established
2344 * @NL80211_PLINK_HOLDING: mesh peer link is being closed or cancelled
2345 * @NL80211_PLINK_BLOCKED: all frames transmitted from this mesh
2346 * plink are discarded
2347 * @NUM_NL80211_PLINK_STATES: number of peer link states
2348 * @MAX_NL80211_PLINK_STATES: highest numerical value of plink states
2349 */
2350enum nl80211_plink_state {
2351 NL80211_PLINK_LISTEN,
2352 NL80211_PLINK_OPN_SNT,
2353 NL80211_PLINK_OPN_RCVD,
2354 NL80211_PLINK_CNF_RCVD,
2355 NL80211_PLINK_ESTAB,
2356 NL80211_PLINK_HOLDING,
2357 NL80211_PLINK_BLOCKED,
2358
2359 /* keep last */
2360 NUM_NL80211_PLINK_STATES,
2361 MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1
2362};
2363
1684#endif /* __LINUX_NL80211_H */ 2364#endif /* __LINUX_NL80211_H */