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.h177
1 files changed, 172 insertions, 5 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index e86ed59f9ad5..f33aa08dd9b3 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -47,7 +47,7 @@
47 * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or 47 * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or
48 * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME, 48 * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,
49 * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or 49 * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ, and/or
50 * %NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET. 50 * %NL80211_ATTR_WIPHY_CHANNEL_TYPE.
51 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request 51 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
52 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and 52 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and
53 * %NL80211_ATTR_WIPHY_NAME. 53 * %NL80211_ATTR_WIPHY_NAME.
@@ -72,8 +72,8 @@
72 * 72 *
73 * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified 73 * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified
74 * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. 74 * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC.
75 * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT or 75 * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT,
76 * %NL80211_ATTR_KEY_THRESHOLD. 76 * %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD.
77 * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, 77 * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA,
78 * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER 78 * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER
79 * attributes. 79 * attributes.
@@ -84,7 +84,7 @@
84 * %NL80222_CMD_NEW_BEACON message) 84 * %NL80222_CMD_NEW_BEACON message)
85 * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface 85 * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface
86 * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, 86 * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD,
87 * %NL80211_BEACON_HEAD and %NL80211_BEACON_TAIL attributes. 87 * %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes.
88 * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, 88 * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface,
89 * parameters are like for %NL80211_CMD_SET_BEACON. 89 * parameters are like for %NL80211_CMD_SET_BEACON.
90 * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it 90 * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it
@@ -113,6 +113,8 @@
113 * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by 113 * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by
114 * %NL80211_ATTR_IFINDEX. 114 * %NL80211_ATTR_IFINDEX.
115 * 115 *
116 * @NL80211_CMD_GET_REG: ask the wireless core to send us its currently set
117 * regulatory domain.
116 * @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command 118 * @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command
117 * after being queried by the kernel. CRDA replies by sending a regulatory 119 * after being queried by the kernel. CRDA replies by sending a regulatory
118 * domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our 120 * domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our
@@ -133,6 +135,32 @@
133 * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the 135 * @NL80211_CMD_SET_MESH_PARAMS: Set mesh networking properties for the
134 * interface identified by %NL80211_ATTR_IFINDEX 136 * interface identified by %NL80211_ATTR_IFINDEX
135 * 137 *
138 * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The
139 * interface is identified with %NL80211_ATTR_IFINDEX and the management
140 * frame subtype with %NL80211_ATTR_MGMT_SUBTYPE. The extra IE data to be
141 * added to the end of the specified management frame is specified with
142 * %NL80211_ATTR_IE. If the command succeeds, the requested data will be
143 * added to all specified management frames generated by
144 * kernel/firmware/driver.
145 *
146 * @NL80211_CMD_GET_SCAN: get scan results
147 * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
148 * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
149 * NL80211_CMD_GET_SCAN and on the "scan" multicast group)
150 * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
151 * partial scan results may be available
152 *
153 * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain
154 * has been changed and provides details of the request information
155 * that caused the change such as who initiated the regulatory request
156 * (%NL80211_ATTR_REG_INITIATOR), the wiphy_idx
157 * (%NL80211_ATTR_REG_ALPHA2) on which the request was made from if
158 * the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or
159 * %NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain
160 * set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is
161 * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on
162 * to (%NL80211_ATTR_REG_ALPHA2).
163 *
136 * @NL80211_CMD_MAX: highest used command number 164 * @NL80211_CMD_MAX: highest used command number
137 * @__NL80211_CMD_AFTER_LAST: internal use 165 * @__NL80211_CMD_AFTER_LAST: internal use
138 */ 166 */
@@ -178,6 +206,17 @@ enum nl80211_commands {
178 NL80211_CMD_GET_MESH_PARAMS, 206 NL80211_CMD_GET_MESH_PARAMS,
179 NL80211_CMD_SET_MESH_PARAMS, 207 NL80211_CMD_SET_MESH_PARAMS,
180 208
209 NL80211_CMD_SET_MGMT_EXTRA_IE,
210
211 NL80211_CMD_GET_REG,
212
213 NL80211_CMD_GET_SCAN,
214 NL80211_CMD_TRIGGER_SCAN,
215 NL80211_CMD_NEW_SCAN_RESULTS,
216 NL80211_CMD_SCAN_ABORTED,
217
218 NL80211_CMD_REG_CHANGE,
219
181 /* add new commands above here */ 220 /* add new commands above here */
182 221
183 /* used to define NL80211_CMD_MAX below */ 222 /* used to define NL80211_CMD_MAX below */
@@ -190,6 +229,9 @@ enum nl80211_commands {
190 * here 229 * here
191 */ 230 */
192#define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS 231#define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS
232#define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE
233
234#define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE
193 235
194/** 236/**
195 * enum nl80211_attrs - nl80211 netlink attributes 237 * enum nl80211_attrs - nl80211 netlink attributes
@@ -284,6 +326,29 @@ enum nl80211_commands {
284 * supported interface types, each a flag attribute with the number 326 * supported interface types, each a flag attribute with the number
285 * of the interface mode. 327 * of the interface mode.
286 * 328 *
329 * @NL80211_ATTR_MGMT_SUBTYPE: Management frame subtype for
330 * %NL80211_CMD_SET_MGMT_EXTRA_IE.
331 *
332 * @NL80211_ATTR_IE: Information element(s) data (used, e.g., with
333 * %NL80211_CMD_SET_MGMT_EXTRA_IE).
334 *
335 * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with
336 * a single scan request, a wiphy attribute.
337 *
338 * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz)
339 * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive
340 * scanning and include a zero-length SSID (wildcard) for wildcard scan
341 * @NL80211_ATTR_SCAN_GENERATION: the scan generation increases whenever the
342 * scan result list changes (BSS expired or added) so that applications
343 * can verify that they got a single, consistent snapshot (when all dump
344 * messages carried the same generation number)
345 * @NL80211_ATTR_BSS: scan result BSS
346 *
347 * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain
348 * currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_*
349 * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently
350 * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*)
351 *
287 * @NL80211_ATTR_MAX: highest attribute number currently defined 352 * @NL80211_ATTR_MAX: highest attribute number currently defined
288 * @__NL80211_ATTR_AFTER_LAST: internal use 353 * @__NL80211_ATTR_AFTER_LAST: internal use
289 */ 354 */
@@ -346,6 +411,21 @@ enum nl80211_attrs {
346 NL80211_ATTR_WIPHY_FREQ, 411 NL80211_ATTR_WIPHY_FREQ,
347 NL80211_ATTR_WIPHY_CHANNEL_TYPE, 412 NL80211_ATTR_WIPHY_CHANNEL_TYPE,
348 413
414 NL80211_ATTR_KEY_DEFAULT_MGMT,
415
416 NL80211_ATTR_MGMT_SUBTYPE,
417 NL80211_ATTR_IE,
418
419 NL80211_ATTR_MAX_NUM_SCAN_SSIDS,
420
421 NL80211_ATTR_SCAN_FREQUENCIES,
422 NL80211_ATTR_SCAN_SSIDS,
423 NL80211_ATTR_SCAN_GENERATION,
424 NL80211_ATTR_BSS,
425
426 NL80211_ATTR_REG_INITIATOR,
427 NL80211_ATTR_REG_TYPE,
428
349 /* add attributes here, update the policy in nl80211.c */ 429 /* add attributes here, update the policy in nl80211.c */
350 430
351 __NL80211_ATTR_AFTER_LAST, 431 __NL80211_ATTR_AFTER_LAST,
@@ -360,7 +440,11 @@ enum nl80211_attrs {
360#define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES 440#define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES
361#define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS 441#define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS
362#define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ 442#define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ
363#define NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET 443#define NL80211_ATTR_WIPHY_CHANNEL_TYPE NL80211_ATTR_WIPHY_CHANNEL_TYPE
444#define NL80211_ATTR_MGMT_SUBTYPE NL80211_ATTR_MGMT_SUBTYPE
445#define NL80211_ATTR_IE NL80211_ATTR_IE
446#define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR
447#define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE
364 448
365#define NL80211_MAX_SUPP_RATES 32 449#define NL80211_MAX_SUPP_RATES 32
366#define NL80211_MAX_SUPP_REG_RULES 32 450#define NL80211_MAX_SUPP_REG_RULES 32
@@ -412,12 +496,14 @@ enum nl80211_iftype {
412 * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames 496 * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames
413 * with short barker preamble 497 * with short barker preamble
414 * @NL80211_STA_FLAG_WME: station is WME/QoS capable 498 * @NL80211_STA_FLAG_WME: station is WME/QoS capable
499 * @NL80211_STA_FLAG_MFP: station uses management frame protection
415 */ 500 */
416enum nl80211_sta_flags { 501enum nl80211_sta_flags {
417 __NL80211_STA_FLAG_INVALID, 502 __NL80211_STA_FLAG_INVALID,
418 NL80211_STA_FLAG_AUTHORIZED, 503 NL80211_STA_FLAG_AUTHORIZED,
419 NL80211_STA_FLAG_SHORT_PREAMBLE, 504 NL80211_STA_FLAG_SHORT_PREAMBLE,
420 NL80211_STA_FLAG_WME, 505 NL80211_STA_FLAG_WME,
506 NL80211_STA_FLAG_MFP,
421 507
422 /* keep last */ 508 /* keep last */
423 __NL80211_STA_FLAG_AFTER_LAST, 509 __NL80211_STA_FLAG_AFTER_LAST,
@@ -465,6 +551,9 @@ enum nl80211_rate_info {
465 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) 551 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
466 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute 552 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
467 * containing info as possible, see &enum nl80211_sta_info_txrate. 553 * containing info as possible, see &enum nl80211_sta_info_txrate.
554 * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station)
555 * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this
556 * station)
468 */ 557 */
469enum nl80211_sta_info { 558enum nl80211_sta_info {
470 __NL80211_STA_INFO_INVALID, 559 __NL80211_STA_INFO_INVALID,
@@ -476,6 +565,8 @@ enum nl80211_sta_info {
476 NL80211_STA_INFO_PLINK_STATE, 565 NL80211_STA_INFO_PLINK_STATE,
477 NL80211_STA_INFO_SIGNAL, 566 NL80211_STA_INFO_SIGNAL,
478 NL80211_STA_INFO_TX_BITRATE, 567 NL80211_STA_INFO_TX_BITRATE,
568 NL80211_STA_INFO_RX_PACKETS,
569 NL80211_STA_INFO_TX_PACKETS,
479 570
480 /* keep last */ 571 /* keep last */
481 __NL80211_STA_INFO_AFTER_LAST, 572 __NL80211_STA_INFO_AFTER_LAST,
@@ -607,6 +698,48 @@ enum nl80211_bitrate_attr {
607}; 698};
608 699
609/** 700/**
701 * enum nl80211_initiator - Indicates the initiator of a reg domain request
702 * @NL80211_REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world
703 * regulatory domain.
704 * @NL80211_REGDOM_SET_BY_USER: User asked the wireless core to set the
705 * regulatory domain.
706 * @NL80211_REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the
707 * wireless core it thinks its knows the regulatory domain we should be in.
708 * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an
709 * 802.11 country information element with regulatory information it
710 * thinks we should consider.
711 */
712enum nl80211_reg_initiator {
713 NL80211_REGDOM_SET_BY_CORE,
714 NL80211_REGDOM_SET_BY_USER,
715 NL80211_REGDOM_SET_BY_DRIVER,
716 NL80211_REGDOM_SET_BY_COUNTRY_IE,
717};
718
719/**
720 * enum nl80211_reg_type - specifies the type of regulatory domain
721 * @NL80211_REGDOM_TYPE_COUNTRY: the regulatory domain set is one that pertains
722 * to a specific country. When this is set you can count on the
723 * ISO / IEC 3166 alpha2 country code being valid.
724 * @NL80211_REGDOM_TYPE_WORLD: the regulatory set domain is the world regulatory
725 * domain.
726 * @NL80211_REGDOM_TYPE_CUSTOM_WORLD: the regulatory domain set is a custom
727 * driver specific world regulatory domain. These do not apply system-wide
728 * and are only applicable to the individual devices which have requested
729 * them to be applied.
730 * @NL80211_REGDOM_TYPE_INTERSECTION: the regulatory domain set is the product
731 * of an intersection between two regulatory domains -- the previously
732 * set regulatory domain on the system and the last accepted regulatory
733 * domain request to be processed.
734 */
735enum nl80211_reg_type {
736 NL80211_REGDOM_TYPE_COUNTRY,
737 NL80211_REGDOM_TYPE_WORLD,
738 NL80211_REGDOM_TYPE_CUSTOM_WORLD,
739 NL80211_REGDOM_TYPE_INTERSECTION,
740};
741
742/**
610 * enum nl80211_reg_rule_attr - regulatory rule attributes 743 * enum nl80211_reg_rule_attr - regulatory rule attributes
611 * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional 744 * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional
612 * considerations for a given frequency range. These are the 745 * considerations for a given frequency range. These are the
@@ -811,4 +944,38 @@ enum nl80211_channel_type {
811 NL80211_CHAN_HT40MINUS, 944 NL80211_CHAN_HT40MINUS,
812 NL80211_CHAN_HT40PLUS 945 NL80211_CHAN_HT40PLUS
813}; 946};
947
948/**
949 * enum nl80211_bss - netlink attributes for a BSS
950 *
951 * @__NL80211_BSS_INVALID: invalid
952 * @NL80211_BSS_FREQUENCY: frequency in MHz (u32)
953 * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64)
954 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16)
955 * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16)
956 * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the
957 * raw information elements from the probe response/beacon (bin)
958 * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon
959 * in mBm (100 * dBm) (s32)
960 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon
961 * in unspecified units, scaled to 0..100 (u8)
962 * @__NL80211_BSS_AFTER_LAST: internal
963 * @NL80211_BSS_MAX: highest BSS attribute
964 */
965enum nl80211_bss {
966 __NL80211_BSS_INVALID,
967 NL80211_BSS_BSSID,
968 NL80211_BSS_FREQUENCY,
969 NL80211_BSS_TSF,
970 NL80211_BSS_BEACON_INTERVAL,
971 NL80211_BSS_CAPABILITY,
972 NL80211_BSS_INFORMATION_ELEMENTS,
973 NL80211_BSS_SIGNAL_MBM,
974 NL80211_BSS_SIGNAL_UNSPEC,
975
976 /* keep last */
977 __NL80211_BSS_AFTER_LAST,
978 NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1
979};
980
814#endif /* __LINUX_NL80211_H */ 981#endif /* __LINUX_NL80211_H */