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.h145
1 files changed, 143 insertions, 2 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index da8ea2e19273..28ba20fda3e2 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>
@@ -270,6 +270,60 @@
270 * @NL80211_CMD_SET_WIPHY_NETNS: Set a wiphy's netns. Note that all devices 270 * @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. 271 * associated with this wiphy must be down and will follow.
272 * 272 *
273 * @NL80211_CMD_REMAIN_ON_CHANNEL: Request to remain awake on the specified
274 * channel for the specified amount of time. This can be used to do
275 * off-channel operations like transmit a Public Action frame and wait for
276 * a response while being associated to an AP on another channel.
277 * %NL80211_ATTR_WIPHY or %NL80211_ATTR_IFINDEX is used to specify which
278 * radio is used. %NL80211_ATTR_WIPHY_FREQ is used to specify the
279 * frequency for the operation and %NL80211_ATTR_WIPHY_CHANNEL_TYPE may be
280 * optionally used to specify additional channel parameters.
281 * %NL80211_ATTR_DURATION is used to specify the duration in milliseconds
282 * to remain on the channel. This command is also used as an event to
283 * notify when the requested duration starts (it may take a while for the
284 * driver to schedule this time due to other concurrent needs for the
285 * radio).
286 * When called, this operation returns a cookie (%NL80211_ATTR_COOKIE)
287 * that will be included with any events pertaining to this request;
288 * the cookie is also used to cancel the request.
289 * @NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL: This command can be used to cancel a
290 * pending remain-on-channel duration if the desired operation has been
291 * completed prior to expiration of the originally requested duration.
292 * %NL80211_ATTR_WIPHY or %NL80211_ATTR_IFINDEX is used to specify the
293 * radio. The %NL80211_ATTR_COOKIE attribute must be given as well to
294 * uniquely identify the request.
295 * This command is also used as an event to notify when a requested
296 * remain-on-channel duration has expired.
297 *
298 * @NL80211_CMD_SET_TX_BITRATE_MASK: Set the mask of rates to be used in TX
299 * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface
300 * and @NL80211_ATTR_TX_RATES the set of allowed rates.
301 *
302 * @NL80211_CMD_REGISTER_ACTION: Register for receiving certain action frames
303 * (via @NL80211_CMD_ACTION) for processing in userspace. This command
304 * requires an interface index and a match attribute containing the first
305 * few bytes of the frame that should match, e.g. a single byte for only
306 * a category match or four bytes for vendor frames including the OUI.
307 * The registration cannot be dropped, but is removed automatically
308 * when the netlink socket is closed. Multiple registrations can be made.
309 * @NL80211_CMD_ACTION: Action frame TX request and RX notification. This
310 * command is used both as a request to transmit an Action frame and as an
311 * event indicating reception of an Action frame that was not processed in
312 * kernel code, but is for us (i.e., which may need to be processed in a
313 * user space application). %NL80211_ATTR_FRAME is used to specify the
314 * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and
315 * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on
316 * which channel the frame is to be transmitted or was received. This
317 * channel has to be the current channel (remain-on-channel or the
318 * operational channel). When called, this operation returns a cookie
319 * (%NL80211_ATTR_COOKIE) that will be included with the TX status event
320 * pertaining to the TX request.
321 * @NL80211_CMD_ACTION_TX_STATUS: Report TX status of an Action frame
322 * transmitted with %NL80211_CMD_ACTION. %NL80211_ATTR_COOKIE identifies
323 * the TX command and %NL80211_ATTR_FRAME includes the contents of the
324 * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged
325 * the frame.
326 *
273 * @NL80211_CMD_MAX: highest used command number 327 * @NL80211_CMD_MAX: highest used command number
274 * @__NL80211_CMD_AFTER_LAST: internal use 328 * @__NL80211_CMD_AFTER_LAST: internal use
275 */ 329 */
@@ -353,6 +407,18 @@ enum nl80211_commands {
353 NL80211_CMD_DEL_PMKSA, 407 NL80211_CMD_DEL_PMKSA,
354 NL80211_CMD_FLUSH_PMKSA, 408 NL80211_CMD_FLUSH_PMKSA,
355 409
410 NL80211_CMD_REMAIN_ON_CHANNEL,
411 NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL,
412
413 NL80211_CMD_SET_TX_BITRATE_MASK,
414
415 NL80211_CMD_REGISTER_ACTION,
416 NL80211_CMD_ACTION,
417 NL80211_CMD_ACTION_TX_STATUS,
418
419 NL80211_CMD_SET_POWER_SAVE,
420 NL80211_CMD_GET_POWER_SAVE,
421
356 /* add new commands above here */ 422 /* add new commands above here */
357 423
358 /* used to define NL80211_CMD_MAX below */ 424 /* used to define NL80211_CMD_MAX below */
@@ -402,6 +468,8 @@ enum nl80211_commands {
402 * @NL80211_ATTR_WIPHY_RTS_THRESHOLD: RTS threshold (TX frames with length 468 * @NL80211_ATTR_WIPHY_RTS_THRESHOLD: RTS threshold (TX frames with length
403 * larger than or equal to this use RTS/CTS handshake); allowed range: 469 * larger than or equal to this use RTS/CTS handshake); allowed range:
404 * 0..65536, disable with (u32)-1; dot11RTSThreshold; u32 470 * 0..65536, disable with (u32)-1; dot11RTSThreshold; u32
471 * @NL80211_ATTR_WIPHY_COVERAGE_CLASS: Coverage Class as defined by IEEE 802.11
472 * section 7.3.2.9; dot11CoverageClass; u8
405 * 473 *
406 * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on 474 * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
407 * @NL80211_ATTR_IFNAME: network interface name 475 * @NL80211_ATTR_IFNAME: network interface name
@@ -606,6 +674,23 @@ enum nl80211_commands {
606 * @NL80211_ATTR_MAX_NUM_PMKIDS: maximum number of PMKIDs a firmware can 674 * @NL80211_ATTR_MAX_NUM_PMKIDS: maximum number of PMKIDs a firmware can
607 * cache, a wiphy attribute. 675 * cache, a wiphy attribute.
608 * 676 *
677 * @NL80211_ATTR_DURATION: Duration of an operation in milliseconds, u32.
678 *
679 * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects.
680 *
681 * @NL80211_ATTR_TX_RATES: Nested set of attributes
682 * (enum nl80211_tx_rate_attributes) describing TX rates per band. The
683 * enum nl80211_band value is used as the index (nla_type() of the nested
684 * data. If a band is not included, it will be configured to allow all
685 * rates based on negotiated supported rates information. This attribute
686 * is used with %NL80211_CMD_SET_TX_BITRATE_MASK.
687 *
688 * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain
689 * at least one byte, currently used with @NL80211_CMD_REGISTER_ACTION.
690 *
691 * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was
692 * acknowledged by the recipient.
693 *
609 * @NL80211_ATTR_MAX: highest attribute number currently defined 694 * @NL80211_ATTR_MAX: highest attribute number currently defined
610 * @__NL80211_ATTR_AFTER_LAST: internal use 695 * @__NL80211_ATTR_AFTER_LAST: internal use
611 */ 696 */
@@ -743,6 +828,20 @@ enum nl80211_attrs {
743 NL80211_ATTR_PMKID, 828 NL80211_ATTR_PMKID,
744 NL80211_ATTR_MAX_NUM_PMKIDS, 829 NL80211_ATTR_MAX_NUM_PMKIDS,
745 830
831 NL80211_ATTR_DURATION,
832
833 NL80211_ATTR_COOKIE,
834
835 NL80211_ATTR_WIPHY_COVERAGE_CLASS,
836
837 NL80211_ATTR_TX_RATES,
838
839 NL80211_ATTR_FRAME_MATCH,
840
841 NL80211_ATTR_ACK,
842
843 NL80211_ATTR_PS_STATE,
844
746 /* add attributes here, update the policy in nl80211.c */ 845 /* add attributes here, update the policy in nl80211.c */
747 846
748 __NL80211_ATTR_AFTER_LAST, 847 __NL80211_ATTR_AFTER_LAST,
@@ -1323,13 +1422,20 @@ enum nl80211_channel_type {
1323 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) 1422 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16)
1324 * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16) 1423 * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16)
1325 * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the 1424 * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the
1326 * raw information elements from the probe response/beacon (bin) 1425 * raw information elements from the probe response/beacon (bin);
1426 * if the %NL80211_BSS_BEACON_IES attribute is present, the IEs here are
1427 * from a Probe Response frame; otherwise they are from a Beacon frame.
1428 * However, if the driver does not indicate the source of the IEs, these
1429 * IEs may be from either frame subtype.
1327 * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon 1430 * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon
1328 * in mBm (100 * dBm) (s32) 1431 * in mBm (100 * dBm) (s32)
1329 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon 1432 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon
1330 * in unspecified units, scaled to 0..100 (u8) 1433 * in unspecified units, scaled to 0..100 (u8)
1331 * @NL80211_BSS_STATUS: status, if this BSS is "used" 1434 * @NL80211_BSS_STATUS: status, if this BSS is "used"
1332 * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms 1435 * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms
1436 * @NL80211_BSS_BEACON_IES: binary attribute containing the raw information
1437 * elements from a Beacon frame (bin); not present if no Beacon frame has
1438 * yet been received
1333 * @__NL80211_BSS_AFTER_LAST: internal 1439 * @__NL80211_BSS_AFTER_LAST: internal
1334 * @NL80211_BSS_MAX: highest BSS attribute 1440 * @NL80211_BSS_MAX: highest BSS attribute
1335 */ 1441 */
@@ -1345,6 +1451,7 @@ enum nl80211_bss {
1345 NL80211_BSS_SIGNAL_UNSPEC, 1451 NL80211_BSS_SIGNAL_UNSPEC,
1346 NL80211_BSS_STATUS, 1452 NL80211_BSS_STATUS,
1347 NL80211_BSS_SEEN_MS_AGO, 1453 NL80211_BSS_SEEN_MS_AGO,
1454 NL80211_BSS_BEACON_IES,
1348 1455
1349 /* keep last */ 1456 /* keep last */
1350 __NL80211_BSS_AFTER_LAST, 1457 __NL80211_BSS_AFTER_LAST,
@@ -1442,4 +1549,38 @@ enum nl80211_key_attributes {
1442 NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 1549 NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1
1443}; 1550};
1444 1551
1552/**
1553 * enum nl80211_tx_rate_attributes - TX rate set attributes
1554 * @__NL80211_TXRATE_INVALID: invalid
1555 * @NL80211_TXRATE_LEGACY: Legacy (non-MCS) rates allowed for TX rate selection
1556 * in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with
1557 * 1 = 500 kbps) but without the IE length restriction (at most
1558 * %NL80211_MAX_SUPP_RATES in a single array).
1559 * @__NL80211_TXRATE_AFTER_LAST: internal
1560 * @NL80211_TXRATE_MAX: highest TX rate attribute
1561 */
1562enum nl80211_tx_rate_attributes {
1563 __NL80211_TXRATE_INVALID,
1564 NL80211_TXRATE_LEGACY,
1565
1566 /* keep last */
1567 __NL80211_TXRATE_AFTER_LAST,
1568 NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1
1569};
1570
1571/**
1572 * enum nl80211_band - Frequency band
1573 * @NL80211_BAND_2GHZ - 2.4 GHz ISM band
1574 * @NL80211_BAND_5GHZ - around 5 GHz band (4.9 - 5.7 GHz)
1575 */
1576enum nl80211_band {
1577 NL80211_BAND_2GHZ,
1578 NL80211_BAND_5GHZ,
1579};
1580
1581enum nl80211_ps_state {
1582 NL80211_PS_DISABLED,
1583 NL80211_PS_ENABLED,
1584};
1585
1445#endif /* __LINUX_NL80211_H */ 1586#endif /* __LINUX_NL80211_H */