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.h245
1 files changed, 242 insertions, 3 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index da8ea2e19273..2c8701687336 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -3,7 +3,7 @@
3/* 3/*
4 * 802.11 netlink interface public header 4 * 802.11 netlink interface public header
5 * 5 *
6 * Copyright 2006, 2007, 2008 Johannes Berg <johannes@sipsolutions.net> 6 * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
7 * Copyright 2008 Michael Wu <flamingice@sourmilk.net> 7 * Copyright 2008 Michael Wu <flamingice@sourmilk.net>
8 * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com> 8 * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com>
9 * Copyright 2008 Michael Buesch <mb@bu3sch.de> 9 * Copyright 2008 Michael Buesch <mb@bu3sch.de>
@@ -52,6 +52,8 @@
52 * %NL80211_ATTR_WIPHY_CHANNEL_TYPE, %NL80211_ATTR_WIPHY_RETRY_SHORT, 52 * %NL80211_ATTR_WIPHY_CHANNEL_TYPE, %NL80211_ATTR_WIPHY_RETRY_SHORT,
53 * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD, 53 * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD,
54 * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD. 54 * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD.
55 * However, for setting the channel, see %NL80211_CMD_SET_CHANNEL
56 * instead, the support here is for backward compatibility only.
55 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request 57 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
56 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and 58 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and
57 * %NL80211_ATTR_WIPHY_NAME. 59 * %NL80211_ATTR_WIPHY_NAME.
@@ -130,7 +132,7 @@
130 * %NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and 132 * %NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and
131 * %NL80211_ATTR_REG_RULE_POWER_MAX_EIRP. 133 * %NL80211_ATTR_REG_RULE_POWER_MAX_EIRP.
132 * @NL80211_CMD_REQ_SET_REG: ask the wireless core to set the regulatory domain 134 * @NL80211_CMD_REQ_SET_REG: ask the wireless core to set the regulatory domain
133 * to the the specified ISO/IEC 3166-1 alpha2 country code. The core will 135 * to the specified ISO/IEC 3166-1 alpha2 country code. The core will
134 * store this as a valid request and then query userspace for it. 136 * store this as a valid request and then query userspace for it.
135 * 137 *
136 * @NL80211_CMD_GET_MESH_PARAMS: Get mesh networking properties for the 138 * @NL80211_CMD_GET_MESH_PARAMS: Get mesh networking properties for the
@@ -270,6 +272,75 @@
270 * @NL80211_CMD_SET_WIPHY_NETNS: Set a wiphy's netns. Note that all devices 272 * @NL80211_CMD_SET_WIPHY_NETNS: Set a wiphy's netns. Note that all devices
271 * associated with this wiphy must be down and will follow. 273 * associated with this wiphy must be down and will follow.
272 * 274 *
275 * @NL80211_CMD_REMAIN_ON_CHANNEL: Request to remain awake on the specified
276 * 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
278 * a response while being associated to an AP on another channel.
279 * %NL80211_ATTR_WIPHY or %NL80211_ATTR_IFINDEX is used to specify which
280 * 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
282 * optionally used to specify additional channel parameters.
283 * %NL80211_ATTR_DURATION is used to specify the duration in milliseconds
284 * to remain on the channel. This command is also used as an event to
285 * notify when the requested duration starts (it may take a while for the
286 * driver to schedule this time due to other concurrent needs for the
287 * radio).
288 * When called, this operation returns a cookie (%NL80211_ATTR_COOKIE)
289 * that will be included with any events pertaining to this request;
290 * the cookie is also used to cancel the request.
291 * @NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL: This command can be used to cancel a
292 * pending remain-on-channel duration if the desired operation has been
293 * completed prior to expiration of the originally requested duration.
294 * %NL80211_ATTR_WIPHY or %NL80211_ATTR_IFINDEX is used to specify the
295 * radio. The %NL80211_ATTR_COOKIE attribute must be given as well to
296 * uniquely identify the request.
297 * This command is also used as an event to notify when a requested
298 * remain-on-channel duration has expired.
299 *
300 * @NL80211_CMD_SET_TX_BITRATE_MASK: Set the mask of rates to be used in TX
301 * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface
302 * and @NL80211_ATTR_TX_RATES the set of allowed rates.
303 *
304 * @NL80211_CMD_REGISTER_ACTION: Register for receiving certain action frames
305 * (via @NL80211_CMD_ACTION) for processing in userspace. This command
306 * requires an interface index and a match attribute containing the first
307 * few bytes of the frame that should match, e.g. a single byte for only
308 * a category match or four bytes for vendor frames including the OUI.
309 * The registration cannot be dropped, but is removed automatically
310 * when the netlink socket is closed. Multiple registrations can be made.
311 * @NL80211_CMD_ACTION: Action frame TX request and RX notification. This
312 * command is used both as a request to transmit an Action frame and as an
313 * event indicating reception of an Action frame that was not processed in
314 * 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
316 * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and
317 * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on
318 * which channel the frame is to be transmitted or was received. This
319 * channel has to be the current channel (remain-on-channel or the
320 * operational channel). When called, this operation returns a cookie
321 * (%NL80211_ATTR_COOKIE) that will be included with the TX status event
322 * pertaining to the TX request.
323 * @NL80211_CMD_ACTION_TX_STATUS: Report TX status of an Action frame
324 * transmitted with %NL80211_CMD_ACTION. %NL80211_ATTR_COOKIE identifies
325 * the TX command and %NL80211_ATTR_FRAME includes the contents of the
326 * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged
327 * the frame.
328 * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command
329 * is used to configure connection quality monitoring notification trigger
330 * levels.
331 * @NL80211_CMD_NOTIFY_CQM: Connection quality monitor notification. This
332 * command is used as an event to indicate the that a trigger level was
333 * reached.
334 * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ
335 * and %NL80211_ATTR_WIPHY_CHANNEL_TYPE) the given interface (identifed
336 * by %NL80211_ATTR_IFINDEX) shall operate on.
337 * In case multiple channels are supported by the device, the mechanism
338 * with which it switches channels is implementation-defined.
339 * When a monitor interface is given, it can only switch channel while
340 * no other interfaces are operating to avoid disturbing the operation
341 * of any other interfaces, and other interfaces will again take
342 * precedence when they are used.
343 *
273 * @NL80211_CMD_MAX: highest used command number 344 * @NL80211_CMD_MAX: highest used command number
274 * @__NL80211_CMD_AFTER_LAST: internal use 345 * @__NL80211_CMD_AFTER_LAST: internal use
275 */ 346 */
@@ -353,6 +424,23 @@ enum nl80211_commands {
353 NL80211_CMD_DEL_PMKSA, 424 NL80211_CMD_DEL_PMKSA,
354 NL80211_CMD_FLUSH_PMKSA, 425 NL80211_CMD_FLUSH_PMKSA,
355 426
427 NL80211_CMD_REMAIN_ON_CHANNEL,
428 NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL,
429
430 NL80211_CMD_SET_TX_BITRATE_MASK,
431
432 NL80211_CMD_REGISTER_ACTION,
433 NL80211_CMD_ACTION,
434 NL80211_CMD_ACTION_TX_STATUS,
435
436 NL80211_CMD_SET_POWER_SAVE,
437 NL80211_CMD_GET_POWER_SAVE,
438
439 NL80211_CMD_SET_CQM,
440 NL80211_CMD_NOTIFY_CQM,
441
442 NL80211_CMD_SET_CHANNEL,
443
356 /* add new commands above here */ 444 /* add new commands above here */
357 445
358 /* used to define NL80211_CMD_MAX below */ 446 /* used to define NL80211_CMD_MAX below */
@@ -402,6 +490,8 @@ enum nl80211_commands {
402 * @NL80211_ATTR_WIPHY_RTS_THRESHOLD: RTS threshold (TX frames with length 490 * @NL80211_ATTR_WIPHY_RTS_THRESHOLD: RTS threshold (TX frames with length
403 * larger than or equal to this use RTS/CTS handshake); allowed range: 491 * larger than or equal to this use RTS/CTS handshake); allowed range:
404 * 0..65536, disable with (u32)-1; dot11RTSThreshold; u32 492 * 0..65536, disable with (u32)-1; dot11RTSThreshold; u32
493 * @NL80211_ATTR_WIPHY_COVERAGE_CLASS: Coverage Class as defined by IEEE 802.11
494 * section 7.3.2.9; dot11CoverageClass; u8
405 * 495 *
406 * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on 496 * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
407 * @NL80211_ATTR_IFNAME: network interface name 497 * @NL80211_ATTR_IFNAME: network interface name
@@ -606,6 +696,41 @@ enum nl80211_commands {
606 * @NL80211_ATTR_MAX_NUM_PMKIDS: maximum number of PMKIDs a firmware can 696 * @NL80211_ATTR_MAX_NUM_PMKIDS: maximum number of PMKIDs a firmware can
607 * cache, a wiphy attribute. 697 * cache, a wiphy attribute.
608 * 698 *
699 * @NL80211_ATTR_DURATION: Duration of an operation in milliseconds, u32.
700 *
701 * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects.
702 *
703 * @NL80211_ATTR_TX_RATES: Nested set of attributes
704 * (enum nl80211_tx_rate_attributes) describing TX rates per band. The
705 * enum nl80211_band value is used as the index (nla_type() of the nested
706 * data. If a band is not included, it will be configured to allow all
707 * rates based on negotiated supported rates information. This attribute
708 * is used with %NL80211_CMD_SET_TX_BITRATE_MASK.
709 *
710 * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
711 * at least one byte, currently used with @NL80211_CMD_REGISTER_ACTION.
712 *
713 * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was
714 * acknowledged by the recipient.
715 *
716 * @NL80211_ATTR_CQM: connection quality monitor configuration in a
717 * nested attribute with %NL80211_ATTR_CQM_* sub-attributes.
718 *
719 * @NL80211_ATTR_LOCAL_STATE_CHANGE: Flag attribute to indicate that a command
720 * is requesting a local authentication/association state change without
721 * invoking actual management frame exchange. This can be used with
722 * NL80211_CMD_AUTHENTICATE, NL80211_CMD_DEAUTHENTICATE,
723 * NL80211_CMD_DISASSOCIATE.
724 *
725 * @NL80211_ATTR_AP_ISOLATE: (AP mode) Do not forward traffic between stations
726 * connected to this BSS.
727 *
728 * @NL80211_ATTR_WIPHY_TX_POWER_SETTING: Transmit power setting type. See
729 * &enum nl80211_tx_power_setting for possible values.
730 * @NL80211_ATTR_WIPHY_TX_POWER_LEVEL: Transmit power level in signed mBm units.
731 * This is used in association with @NL80211_ATTR_WIPHY_TX_POWER_SETTING
732 * for non-automatic settings.
733 *
609 * @NL80211_ATTR_MAX: highest attribute number currently defined 734 * @NL80211_ATTR_MAX: highest attribute number currently defined
610 * @__NL80211_ATTR_AFTER_LAST: internal use 735 * @__NL80211_ATTR_AFTER_LAST: internal use
611 */ 736 */
@@ -743,6 +868,29 @@ enum nl80211_attrs {
743 NL80211_ATTR_PMKID, 868 NL80211_ATTR_PMKID,
744 NL80211_ATTR_MAX_NUM_PMKIDS, 869 NL80211_ATTR_MAX_NUM_PMKIDS,
745 870
871 NL80211_ATTR_DURATION,
872
873 NL80211_ATTR_COOKIE,
874
875 NL80211_ATTR_WIPHY_COVERAGE_CLASS,
876
877 NL80211_ATTR_TX_RATES,
878
879 NL80211_ATTR_FRAME_MATCH,
880
881 NL80211_ATTR_ACK,
882
883 NL80211_ATTR_PS_STATE,
884
885 NL80211_ATTR_CQM,
886
887 NL80211_ATTR_LOCAL_STATE_CHANGE,
888
889 NL80211_ATTR_AP_ISOLATE,
890
891 NL80211_ATTR_WIPHY_TX_POWER_SETTING,
892 NL80211_ATTR_WIPHY_TX_POWER_LEVEL,
893
746 /* add attributes here, update the policy in nl80211.c */ 894 /* add attributes here, update the policy in nl80211.c */
747 895
748 __NL80211_ATTR_AFTER_LAST, 896 __NL80211_ATTR_AFTER_LAST,
@@ -1323,13 +1471,20 @@ enum nl80211_channel_type {
1323 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) 1471 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16)
1324 * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16) 1472 * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16)
1325 * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the 1473 * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the
1326 * raw information elements from the probe response/beacon (bin) 1474 * raw information elements from the probe response/beacon (bin);
1475 * if the %NL80211_BSS_BEACON_IES attribute is present, the IEs here are
1476 * from a Probe Response frame; otherwise they are from a Beacon frame.
1477 * However, if the driver does not indicate the source of the IEs, these
1478 * IEs may be from either frame subtype.
1327 * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon 1479 * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon
1328 * in mBm (100 * dBm) (s32) 1480 * in mBm (100 * dBm) (s32)
1329 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon 1481 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon
1330 * in unspecified units, scaled to 0..100 (u8) 1482 * in unspecified units, scaled to 0..100 (u8)
1331 * @NL80211_BSS_STATUS: status, if this BSS is "used" 1483 * @NL80211_BSS_STATUS: status, if this BSS is "used"
1332 * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms 1484 * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms
1485 * @NL80211_BSS_BEACON_IES: binary attribute containing the raw information
1486 * elements from a Beacon frame (bin); not present if no Beacon frame has
1487 * yet been received
1333 * @__NL80211_BSS_AFTER_LAST: internal 1488 * @__NL80211_BSS_AFTER_LAST: internal
1334 * @NL80211_BSS_MAX: highest BSS attribute 1489 * @NL80211_BSS_MAX: highest BSS attribute
1335 */ 1490 */
@@ -1345,6 +1500,7 @@ enum nl80211_bss {
1345 NL80211_BSS_SIGNAL_UNSPEC, 1500 NL80211_BSS_SIGNAL_UNSPEC,
1346 NL80211_BSS_STATUS, 1501 NL80211_BSS_STATUS,
1347 NL80211_BSS_SEEN_MS_AGO, 1502 NL80211_BSS_SEEN_MS_AGO,
1503 NL80211_BSS_BEACON_IES,
1348 1504
1349 /* keep last */ 1505 /* keep last */
1350 __NL80211_BSS_AFTER_LAST, 1506 __NL80211_BSS_AFTER_LAST,
@@ -1442,4 +1598,87 @@ enum nl80211_key_attributes {
1442 NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 1598 NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1
1443}; 1599};
1444 1600
1601/**
1602 * enum nl80211_tx_rate_attributes - TX rate set attributes
1603 * @__NL80211_TXRATE_INVALID: invalid
1604 * @NL80211_TXRATE_LEGACY: Legacy (non-MCS) rates allowed for TX rate selection
1605 * in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with
1606 * 1 = 500 kbps) but without the IE length restriction (at most
1607 * %NL80211_MAX_SUPP_RATES in a single array).
1608 * @__NL80211_TXRATE_AFTER_LAST: internal
1609 * @NL80211_TXRATE_MAX: highest TX rate attribute
1610 */
1611enum nl80211_tx_rate_attributes {
1612 __NL80211_TXRATE_INVALID,
1613 NL80211_TXRATE_LEGACY,
1614
1615 /* keep last */
1616 __NL80211_TXRATE_AFTER_LAST,
1617 NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1
1618};
1619
1620/**
1621 * enum nl80211_band - Frequency band
1622 * @NL80211_BAND_2GHZ - 2.4 GHz ISM band
1623 * @NL80211_BAND_5GHZ - around 5 GHz band (4.9 - 5.7 GHz)
1624 */
1625enum nl80211_band {
1626 NL80211_BAND_2GHZ,
1627 NL80211_BAND_5GHZ,
1628};
1629
1630enum nl80211_ps_state {
1631 NL80211_PS_DISABLED,
1632 NL80211_PS_ENABLED,
1633};
1634
1635/**
1636 * enum nl80211_attr_cqm - connection quality monitor attributes
1637 * @__NL80211_ATTR_CQM_INVALID: invalid
1638 * @NL80211_ATTR_CQM_RSSI_THOLD: RSSI threshold in dBm. This value specifies
1639 * the threshold for the RSSI level at which an event will be sent. Zero
1640 * to disable.
1641 * @NL80211_ATTR_CQM_RSSI_HYST: RSSI hysteresis in dBm. This value specifies
1642 * 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).
1644 * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event
1645 * @__NL80211_ATTR_CQM_AFTER_LAST: internal
1646 * @NL80211_ATTR_CQM_MAX: highest key attribute
1647 */
1648enum nl80211_attr_cqm {
1649 __NL80211_ATTR_CQM_INVALID,
1650 NL80211_ATTR_CQM_RSSI_THOLD,
1651 NL80211_ATTR_CQM_RSSI_HYST,
1652 NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT,
1653
1654 /* keep last */
1655 __NL80211_ATTR_CQM_AFTER_LAST,
1656 NL80211_ATTR_CQM_MAX = __NL80211_ATTR_CQM_AFTER_LAST - 1
1657};
1658
1659/**
1660 * enum nl80211_cqm_rssi_threshold_event - RSSI threshold event
1661 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW - The RSSI level is lower than the
1662 * configured threshold
1663 * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH - The RSSI is higher than the
1664 * configured threshold
1665 */
1666enum nl80211_cqm_rssi_threshold_event {
1667 NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
1668 NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
1669};
1670
1671
1672/**
1673 * enum nl80211_tx_power_setting - TX power adjustment
1674 * @NL80211_TX_POWER_AUTOMATIC: automatically determine transmit power
1675 * @NL80211_TX_POWER_LIMITED: limit TX power by the mBm parameter
1676 * @NL80211_TX_POWER_FIXED: fix TX power to the mBm parameter
1677 */
1678enum nl80211_tx_power_setting {
1679 NL80211_TX_POWER_AUTOMATIC,
1680 NL80211_TX_POWER_LIMITED,
1681 NL80211_TX_POWER_FIXED,
1682};
1683
1445#endif /* __LINUX_NL80211_H */ 1684#endif /* __LINUX_NL80211_H */