aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/nl80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux/nl80211.h')
-rw-r--r--include/uapi/linux/nl80211.h395
1 files changed, 386 insertions, 9 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index e3e19f8b16f2..c46bb016f4e4 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -170,7 +170,8 @@
170 * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE, 170 * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE,
171 * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, 171 * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS,
172 * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, 172 * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
173 * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT. 173 * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT,
174 * %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS.
174 * The channel to use can be set on the interface or be given using the 175 * The channel to use can be set on the interface or be given using the
175 * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width. 176 * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width.
176 * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP 177 * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP
@@ -374,8 +375,8 @@
374 * requests to connect to a specified network but without separating 375 * requests to connect to a specified network but without separating
375 * auth and assoc steps. For this, you need to specify the SSID in a 376 * auth and assoc steps. For this, you need to specify the SSID in a
376 * %NL80211_ATTR_SSID attribute, and can optionally specify the association 377 * %NL80211_ATTR_SSID attribute, and can optionally specify the association
377 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC, 378 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
378 * %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, 379 * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
379 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and 380 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
380 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT. 381 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
381 * Background scan period can optionally be 382 * Background scan period can optionally be
@@ -512,6 +513,12 @@
512 * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For 513 * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For
513 * more background information, see 514 * more background information, see
514 * http://wireless.kernel.org/en/users/Documentation/WoWLAN. 515 * http://wireless.kernel.org/en/users/Documentation/WoWLAN.
516 * The @NL80211_CMD_SET_WOWLAN command can also be used as a notification
517 * from the driver reporting the wakeup reason. In this case, the
518 * @NL80211_ATTR_WOWLAN_TRIGGERS attribute will contain the reason
519 * for the wakeup, if it was caused by wireless. If it is not present
520 * in the wakeup notification, the wireless device didn't cause the
521 * wakeup but reports that it was woken up.
515 * 522 *
516 * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver 523 * @NL80211_CMD_SET_REKEY_OFFLOAD: This command is used give the driver
517 * the necessary information for supporting GTK rekey offload. This 524 * the necessary information for supporting GTK rekey offload. This
@@ -586,6 +593,24 @@
586 * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames 593 * @NL80211_CMD_SET_MCAST_RATE: Change the rate used to send multicast frames
587 * for IBSS or MESH vif. 594 * for IBSS or MESH vif.
588 * 595 *
596 * @NL80211_CMD_SET_MAC_ACL: sets ACL for MAC address based access control.
597 * This is to be used with the drivers advertising the support of MAC
598 * address based access control. List of MAC addresses is passed in
599 * %NL80211_ATTR_MAC_ADDRS and ACL policy is passed in
600 * %NL80211_ATTR_ACL_POLICY. Driver will enable ACL with this list, if it
601 * is not already done. The new list will replace any existing list. Driver
602 * will clear its ACL when the list of MAC addresses passed is empty. This
603 * command is used in AP/P2P GO mode. Driver has to make sure to clear its
604 * ACL list during %NL80211_CMD_STOP_AP.
605 *
606 * @NL80211_CMD_RADAR_DETECT: Start a Channel availability check (CAC). Once
607 * a radar is detected or the channel availability scan (CAC) has finished
608 * or was aborted, or a radar was detected, usermode will be notified with
609 * this event. This command is also used to notify userspace about radars
610 * while operating on this channel.
611 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the
612 * event.
613 *
589 * @NL80211_CMD_MAX: highest used command number 614 * @NL80211_CMD_MAX: highest used command number
590 * @__NL80211_CMD_AFTER_LAST: internal use 615 * @__NL80211_CMD_AFTER_LAST: internal use
591 */ 616 */
@@ -736,6 +761,10 @@ enum nl80211_commands {
736 761
737 NL80211_CMD_SET_MCAST_RATE, 762 NL80211_CMD_SET_MCAST_RATE,
738 763
764 NL80211_CMD_SET_MAC_ACL,
765
766 NL80211_CMD_RADAR_DETECT,
767
739 /* add new commands above here */ 768 /* add new commands above here */
740 769
741 /* used to define NL80211_CMD_MAX below */ 770 /* used to define NL80211_CMD_MAX below */
@@ -958,7 +987,7 @@ enum nl80211_commands {
958 * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is 987 * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is
959 * used for the association (&enum nl80211_mfp, represented as a u32); 988 * used for the association (&enum nl80211_mfp, represented as a u32);
960 * this attribute can be used 989 * this attribute can be used
961 * with %NL80211_CMD_ASSOCIATE request 990 * with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests
962 * 991 *
963 * @NL80211_ATTR_STA_FLAGS2: Attribute containing a 992 * @NL80211_ATTR_STA_FLAGS2: Attribute containing a
964 * &struct nl80211_sta_flag_update. 993 * &struct nl80211_sta_flag_update.
@@ -1310,6 +1339,35 @@ enum nl80211_commands {
1310 * if not given in START_AP 0 is assumed, if not given in SET_BSS 1339 * if not given in START_AP 0 is assumed, if not given in SET_BSS
1311 * no change is made. 1340 * no change is made.
1312 * 1341 *
1342 * @NL80211_ATTR_LOCAL_MESH_POWER_MODE: local mesh STA link-specific power mode
1343 * defined in &enum nl80211_mesh_power_mode.
1344 *
1345 * @NL80211_ATTR_ACL_POLICY: ACL policy, see &enum nl80211_acl_policy,
1346 * carried in a u32 attribute
1347 *
1348 * @NL80211_ATTR_MAC_ADDRS: Array of nested MAC addresses, used for
1349 * MAC ACL.
1350 *
1351 * @NL80211_ATTR_MAC_ACL_MAX: u32 attribute to advertise the maximum
1352 * number of MAC addresses that a device can support for MAC
1353 * ACL.
1354 *
1355 * @NL80211_ATTR_RADAR_EVENT: Type of radar event for notification to userspace,
1356 * contains a value of enum nl80211_radar_event (u32).
1357 *
1358 * @NL80211_ATTR_EXT_CAPA: 802.11 extended capabilities that the kernel driver
1359 * has and handles. The format is the same as the IE contents. See
1360 * 802.11-2012 8.4.2.29 for more information.
1361 * @NL80211_ATTR_EXT_CAPA_MASK: Extended capabilities that the kernel driver
1362 * has set in the %NL80211_ATTR_EXT_CAPA value, for multibit fields.
1363 *
1364 * @NL80211_ATTR_STA_CAPABILITY: Station capabilities (u16) are advertised to
1365 * the driver, e.g., to enable TDLS power save (PU-APSD).
1366 *
1367 * @NL80211_ATTR_STA_EXT_CAPABILITY: Station extended capabilities are
1368 * advertised to the driver, e.g., to enable TDLS off channel operations
1369 * and PU-APSD.
1370 *
1313 * @NL80211_ATTR_MAX: highest attribute number currently defined 1371 * @NL80211_ATTR_MAX: highest attribute number currently defined
1314 * @__NL80211_ATTR_AFTER_LAST: internal use 1372 * @__NL80211_ATTR_AFTER_LAST: internal use
1315 */ 1373 */
@@ -1580,6 +1638,22 @@ enum nl80211_attrs {
1580 NL80211_ATTR_P2P_CTWINDOW, 1638 NL80211_ATTR_P2P_CTWINDOW,
1581 NL80211_ATTR_P2P_OPPPS, 1639 NL80211_ATTR_P2P_OPPPS,
1582 1640
1641 NL80211_ATTR_LOCAL_MESH_POWER_MODE,
1642
1643 NL80211_ATTR_ACL_POLICY,
1644
1645 NL80211_ATTR_MAC_ADDRS,
1646
1647 NL80211_ATTR_MAC_ACL_MAX,
1648
1649 NL80211_ATTR_RADAR_EVENT,
1650
1651 NL80211_ATTR_EXT_CAPA,
1652 NL80211_ATTR_EXT_CAPA_MASK,
1653
1654 NL80211_ATTR_STA_CAPABILITY,
1655 NL80211_ATTR_STA_EXT_CAPABILITY,
1656
1583 /* add attributes here, update the policy in nl80211.c */ 1657 /* add attributes here, update the policy in nl80211.c */
1584 1658
1585 __NL80211_ATTR_AFTER_LAST, 1659 __NL80211_ATTR_AFTER_LAST,
@@ -1697,6 +1771,9 @@ enum nl80211_iftype {
1697 * flag can't be changed, it is only valid while adding a station, and 1771 * flag can't be changed, it is only valid while adding a station, and
1698 * attempts to change it will silently be ignored (rather than rejected 1772 * attempts to change it will silently be ignored (rather than rejected
1699 * as errors.) 1773 * as errors.)
1774 * @NL80211_STA_FLAG_ASSOCIATED: station is associated; used with drivers
1775 * that support %NL80211_FEATURE_FULL_AP_CLIENT_STATE to transition a
1776 * previously added station into associated state
1700 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined 1777 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
1701 * @__NL80211_STA_FLAG_AFTER_LAST: internal use 1778 * @__NL80211_STA_FLAG_AFTER_LAST: internal use
1702 */ 1779 */
@@ -1708,6 +1785,7 @@ enum nl80211_sta_flags {
1708 NL80211_STA_FLAG_MFP, 1785 NL80211_STA_FLAG_MFP,
1709 NL80211_STA_FLAG_AUTHENTICATED, 1786 NL80211_STA_FLAG_AUTHENTICATED,
1710 NL80211_STA_FLAG_TDLS_PEER, 1787 NL80211_STA_FLAG_TDLS_PEER,
1788 NL80211_STA_FLAG_ASSOCIATED,
1711 1789
1712 /* keep last */ 1790 /* keep last */
1713 __NL80211_STA_FLAG_AFTER_LAST, 1791 __NL80211_STA_FLAG_AFTER_LAST,
@@ -1813,6 +1891,8 @@ enum nl80211_sta_bss_param {
1813 * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) 1891 * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs)
1814 * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) 1892 * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station)
1815 * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) 1893 * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station)
1894 * @NL80211_STA_INFO_RX_BYTES64: total received bytes (u64, from this station)
1895 * @NL80211_STA_INFO_TX_BYTES64: total transmitted bytes (u64, to this station)
1816 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) 1896 * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
1817 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute 1897 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
1818 * containing info as possible, see &enum nl80211_rate_info 1898 * containing info as possible, see &enum nl80211_rate_info
@@ -1834,6 +1914,10 @@ enum nl80211_sta_bss_param {
1834 * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. 1914 * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
1835 * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32) 1915 * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
1836 * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64) 1916 * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64)
1917 * @NL80211_STA_INFO_LOCAL_PM: local mesh STA link-specific power mode
1918 * @NL80211_STA_INFO_PEER_PM: peer mesh STA link-specific power mode
1919 * @NL80211_STA_INFO_NONPEER_PM: neighbor mesh STA power save mode towards
1920 * non-peer STA
1837 * @__NL80211_STA_INFO_AFTER_LAST: internal 1921 * @__NL80211_STA_INFO_AFTER_LAST: internal
1838 * @NL80211_STA_INFO_MAX: highest possible station info attribute 1922 * @NL80211_STA_INFO_MAX: highest possible station info attribute
1839 */ 1923 */
@@ -1858,6 +1942,11 @@ enum nl80211_sta_info {
1858 NL80211_STA_INFO_STA_FLAGS, 1942 NL80211_STA_INFO_STA_FLAGS,
1859 NL80211_STA_INFO_BEACON_LOSS, 1943 NL80211_STA_INFO_BEACON_LOSS,
1860 NL80211_STA_INFO_T_OFFSET, 1944 NL80211_STA_INFO_T_OFFSET,
1945 NL80211_STA_INFO_LOCAL_PM,
1946 NL80211_STA_INFO_PEER_PM,
1947 NL80211_STA_INFO_NONPEER_PM,
1948 NL80211_STA_INFO_RX_BYTES64,
1949 NL80211_STA_INFO_TX_BYTES64,
1861 1950
1862 /* keep last */ 1951 /* keep last */
1863 __NL80211_STA_INFO_AFTER_LAST, 1952 __NL80211_STA_INFO_AFTER_LAST,
@@ -1967,6 +2056,20 @@ enum nl80211_band_attr {
1967 * on this channel in current regulatory domain. 2056 * on this channel in current regulatory domain.
1968 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm 2057 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
1969 * (100 * dBm). 2058 * (100 * dBm).
2059 * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS
2060 * (enum nl80211_dfs_state)
2061 * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in miliseconds for how long
2062 * this channel is in this DFS state.
2063 * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this
2064 * channel as the control channel
2065 * @NL80211_FREQUENCY_ATTR_NO_HT40_PLUS: HT40+ isn't possible with this
2066 * channel as the control channel
2067 * @NL80211_FREQUENCY_ATTR_NO_80MHZ: any 80 MHz channel using this channel
2068 * as the primary or any of the secondary channels isn't possible,
2069 * this includes 80+80 channels
2070 * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
2071 * using this channel as the primary or any of the secondary channels
2072 * isn't possible
1970 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number 2073 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
1971 * currently defined 2074 * currently defined
1972 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use 2075 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -1979,6 +2082,12 @@ enum nl80211_frequency_attr {
1979 NL80211_FREQUENCY_ATTR_NO_IBSS, 2082 NL80211_FREQUENCY_ATTR_NO_IBSS,
1980 NL80211_FREQUENCY_ATTR_RADAR, 2083 NL80211_FREQUENCY_ATTR_RADAR,
1981 NL80211_FREQUENCY_ATTR_MAX_TX_POWER, 2084 NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
2085 NL80211_FREQUENCY_ATTR_DFS_STATE,
2086 NL80211_FREQUENCY_ATTR_DFS_TIME,
2087 NL80211_FREQUENCY_ATTR_NO_HT40_MINUS,
2088 NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
2089 NL80211_FREQUENCY_ATTR_NO_80MHZ,
2090 NL80211_FREQUENCY_ATTR_NO_160MHZ,
1982 2091
1983 /* keep last */ 2092 /* keep last */
1984 __NL80211_FREQUENCY_ATTR_AFTER_LAST, 2093 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -2249,6 +2358,34 @@ enum nl80211_mntr_flags {
2249}; 2358};
2250 2359
2251/** 2360/**
2361 * enum nl80211_mesh_power_mode - mesh power save modes
2362 *
2363 * @NL80211_MESH_POWER_UNKNOWN: The mesh power mode of the mesh STA is
2364 * not known or has not been set yet.
2365 * @NL80211_MESH_POWER_ACTIVE: Active mesh power mode. The mesh STA is
2366 * in Awake state all the time.
2367 * @NL80211_MESH_POWER_LIGHT_SLEEP: Light sleep mode. The mesh STA will
2368 * alternate between Active and Doze states, but will wake up for
2369 * neighbor's beacons.
2370 * @NL80211_MESH_POWER_DEEP_SLEEP: Deep sleep mode. The mesh STA will
2371 * alternate between Active and Doze states, but may not wake up
2372 * for neighbor's beacons.
2373 *
2374 * @__NL80211_MESH_POWER_AFTER_LAST - internal use
2375 * @NL80211_MESH_POWER_MAX - highest possible power save level
2376 */
2377
2378enum nl80211_mesh_power_mode {
2379 NL80211_MESH_POWER_UNKNOWN,
2380 NL80211_MESH_POWER_ACTIVE,
2381 NL80211_MESH_POWER_LIGHT_SLEEP,
2382 NL80211_MESH_POWER_DEEP_SLEEP,
2383
2384 __NL80211_MESH_POWER_AFTER_LAST,
2385 NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1
2386};
2387
2388/**
2252 * enum nl80211_meshconf_params - mesh configuration parameters 2389 * enum nl80211_meshconf_params - mesh configuration parameters
2253 * 2390 *
2254 * Mesh configuration parameters. These can be changed while the mesh is 2391 * Mesh configuration parameters. These can be changed while the mesh is
@@ -2342,6 +2479,11 @@ enum nl80211_mntr_flags {
2342 * (in TUs) during which a mesh STA can send only one Action frame 2479 * (in TUs) during which a mesh STA can send only one Action frame
2343 * containing a PREQ element for root path confirmation. 2480 * containing a PREQ element for root path confirmation.
2344 * 2481 *
2482 * @NL80211_MESHCONF_POWER_MODE: Default mesh power mode for new peer links.
2483 * type &enum nl80211_mesh_power_mode (u32)
2484 *
2485 * @NL80211_MESHCONF_AWAKE_WINDOW: awake window duration (in TUs)
2486 *
2345 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use 2487 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
2346 */ 2488 */
2347enum nl80211_meshconf_params { 2489enum nl80211_meshconf_params {
@@ -2371,6 +2513,8 @@ enum nl80211_meshconf_params {
2371 NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, 2513 NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
2372 NL80211_MESHCONF_HWMP_ROOT_INTERVAL, 2514 NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
2373 NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, 2515 NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
2516 NL80211_MESHCONF_POWER_MODE,
2517 NL80211_MESHCONF_AWAKE_WINDOW,
2374 2518
2375 /* keep last */ 2519 /* keep last */
2376 __NL80211_MESHCONF_ATTR_AFTER_LAST, 2520 __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -2816,10 +2960,12 @@ enum nl80211_tx_power_setting {
2816 * corresponds to the lowest-order bit in the second byte of the mask. 2960 * corresponds to the lowest-order bit in the second byte of the mask.
2817 * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where 2961 * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where
2818 * xx indicates "don't care") would be represented by a pattern of 2962 * xx indicates "don't care") would be represented by a pattern of
2819 * twelve zero bytes, and a mask of "0xed,0x07". 2963 * twelve zero bytes, and a mask of "0xed,0x01".
2820 * Note that the pattern matching is done as though frames were not 2964 * Note that the pattern matching is done as though frames were not
2821 * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked 2965 * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked
2822 * first (including SNAP header unpacking) and then matched. 2966 * first (including SNAP header unpacking) and then matched.
2967 * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after
2968 * these fixed number of bytes of received packet
2823 * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes 2969 * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes
2824 * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number 2970 * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number
2825 */ 2971 */
@@ -2827,6 +2973,7 @@ enum nl80211_wowlan_packet_pattern_attr {
2827 __NL80211_WOWLAN_PKTPAT_INVALID, 2973 __NL80211_WOWLAN_PKTPAT_INVALID,
2828 NL80211_WOWLAN_PKTPAT_MASK, 2974 NL80211_WOWLAN_PKTPAT_MASK,
2829 NL80211_WOWLAN_PKTPAT_PATTERN, 2975 NL80211_WOWLAN_PKTPAT_PATTERN,
2976 NL80211_WOWLAN_PKTPAT_OFFSET,
2830 2977
2831 NUM_NL80211_WOWLAN_PKTPAT, 2978 NUM_NL80211_WOWLAN_PKTPAT,
2832 MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, 2979 MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1,
@@ -2837,6 +2984,7 @@ enum nl80211_wowlan_packet_pattern_attr {
2837 * @max_patterns: maximum number of patterns supported 2984 * @max_patterns: maximum number of patterns supported
2838 * @min_pattern_len: minimum length of each pattern 2985 * @min_pattern_len: minimum length of each pattern
2839 * @max_pattern_len: maximum length of each pattern 2986 * @max_pattern_len: maximum length of each pattern
2987 * @max_pkt_offset: maximum Rx packet offset
2840 * 2988 *
2841 * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when 2989 * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when
2842 * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the 2990 * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the
@@ -2846,6 +2994,7 @@ struct nl80211_wowlan_pattern_support {
2846 __u32 max_patterns; 2994 __u32 max_patterns;
2847 __u32 min_pattern_len; 2995 __u32 min_pattern_len;
2848 __u32 max_pattern_len; 2996 __u32 max_pattern_len;
2997 __u32 max_pkt_offset;
2849} __attribute__((packed)); 2998} __attribute__((packed));
2850 2999
2851/** 3000/**
@@ -2861,12 +3010,17 @@ struct nl80211_wowlan_pattern_support {
2861 * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns 3010 * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns
2862 * which are passed in an array of nested attributes, each nested attribute 3011 * which are passed in an array of nested attributes, each nested attribute
2863 * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern. 3012 * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern.
2864 * Each pattern defines a wakeup packet. The matching is done on the MSDU, 3013 * Each pattern defines a wakeup packet. Packet offset is associated with
2865 * i.e. as though the packet was an 802.3 packet, so the pattern matching 3014 * each pattern which is used while matching the pattern. The matching is
2866 * is done after the packet is converted to the MSDU. 3015 * done on the MSDU, i.e. as though the packet was an 802.3 packet, so the
3016 * pattern matching is done after the packet is converted to the MSDU.
2867 * 3017 *
2868 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute 3018 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
2869 * carrying a &struct nl80211_wowlan_pattern_support. 3019 * carrying a &struct nl80211_wowlan_pattern_support.
3020 *
3021 * When reporting wakeup. it is a u32 attribute containing the 0-based
3022 * index of the pattern that caused the wakeup, in the patterns passed
3023 * to the kernel when configuring.
2870 * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be 3024 * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be
2871 * used when setting, used only to indicate that GTK rekeying is supported 3025 * used when setting, used only to indicate that GTK rekeying is supported
2872 * by the device (flag) 3026 * by the device (flag)
@@ -2877,8 +3031,36 @@ struct nl80211_wowlan_pattern_support {
2877 * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag) 3031 * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag)
2878 * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released 3032 * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released
2879 * (on devices that have rfkill in the device) (flag) 3033 * (on devices that have rfkill in the device) (flag)
3034 * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211: For wakeup reporting only, contains
3035 * the 802.11 packet that caused the wakeup, e.g. a deauth frame. The frame
3036 * may be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN
3037 * attribute contains the original length.
3038 * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN: Original length of the 802.11
3039 * packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211
3040 * attribute if the packet was truncated somewhere.
3041 * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023: For wakeup reporting only, contains the
3042 * 802.11 packet that caused the wakeup, e.g. a magic packet. The frame may
3043 * be truncated, the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN attribute
3044 * contains the original length.
3045 * @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN: Original length of the 802.3
3046 * packet, may be bigger than the @NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023
3047 * attribute if the packet was truncated somewhere.
3048 * @NL80211_WOWLAN_TRIG_TCP_CONNECTION: TCP connection wake, see DOC section
3049 * "TCP connection wakeup" for more details. This is a nested attribute
3050 * containing the exact information for establishing and keeping alive
3051 * the TCP connection.
3052 * @NL80211_WOWLAN_TRIG_TCP_WAKEUP_MATCH: For wakeup reporting only, the
3053 * wakeup packet was received on the TCP connection
3054 * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST: For wakeup reporting only, the
3055 * TCP connection was lost or failed to be established
3056 * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS: For wakeup reporting only,
3057 * the TCP connection ran out of tokens to use for data to send to the
3058 * service
2880 * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers 3059 * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers
2881 * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number 3060 * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number
3061 *
3062 * These nested attributes are used to configure the wakeup triggers and
3063 * to report the wakeup reason(s).
2882 */ 3064 */
2883enum nl80211_wowlan_triggers { 3065enum nl80211_wowlan_triggers {
2884 __NL80211_WOWLAN_TRIG_INVALID, 3066 __NL80211_WOWLAN_TRIG_INVALID,
@@ -2891,6 +3073,14 @@ enum nl80211_wowlan_triggers {
2891 NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST, 3073 NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST,
2892 NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE, 3074 NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE,
2893 NL80211_WOWLAN_TRIG_RFKILL_RELEASE, 3075 NL80211_WOWLAN_TRIG_RFKILL_RELEASE,
3076 NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211,
3077 NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN,
3078 NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023,
3079 NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN,
3080 NL80211_WOWLAN_TRIG_TCP_CONNECTION,
3081 NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH,
3082 NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST,
3083 NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS,
2894 3084
2895 /* keep last */ 3085 /* keep last */
2896 NUM_NL80211_WOWLAN_TRIG, 3086 NUM_NL80211_WOWLAN_TRIG,
@@ -2898,6 +3088,116 @@ enum nl80211_wowlan_triggers {
2898}; 3088};
2899 3089
2900/** 3090/**
3091 * DOC: TCP connection wakeup
3092 *
3093 * Some devices can establish a TCP connection in order to be woken up by a
3094 * packet coming in from outside their network segment, or behind NAT. If
3095 * configured, the device will establish a TCP connection to the given
3096 * service, and periodically send data to that service. The first data
3097 * packet is usually transmitted after SYN/ACK, also ACKing the SYN/ACK.
3098 * The data packets can optionally include a (little endian) sequence
3099 * number (in the TCP payload!) that is generated by the device, and, also
3100 * optionally, a token from a list of tokens. This serves as a keep-alive
3101 * with the service, and for NATed connections, etc.
3102 *
3103 * During this keep-alive period, the server doesn't send any data to the
3104 * client. When receiving data, it is compared against the wakeup pattern
3105 * (and mask) and if it matches, the host is woken up. Similarly, if the
3106 * connection breaks or cannot be established to start with, the host is
3107 * also woken up.
3108 *
3109 * Developer's note: ARP offload is required for this, otherwise TCP
3110 * response packets might not go through correctly.
3111 */
3112
3113/**
3114 * struct nl80211_wowlan_tcp_data_seq - WoWLAN TCP data sequence
3115 * @start: starting value
3116 * @offset: offset of sequence number in packet
3117 * @len: length of the sequence value to write, 1 through 4
3118 *
3119 * Note: don't confuse with the TCP sequence number(s), this is for the
3120 * keepalive packet payload. The actual value is written into the packet
3121 * in little endian.
3122 */
3123struct nl80211_wowlan_tcp_data_seq {
3124 __u32 start, offset, len;
3125};
3126
3127/**
3128 * struct nl80211_wowlan_tcp_data_token - WoWLAN TCP data token config
3129 * @offset: offset of token in packet
3130 * @len: length of each token
3131 * @token_stream: stream of data to be used for the tokens, the length must
3132 * be a multiple of @len for this to make sense
3133 */
3134struct nl80211_wowlan_tcp_data_token {
3135 __u32 offset, len;
3136 __u8 token_stream[];
3137};
3138
3139/**
3140 * struct nl80211_wowlan_tcp_data_token_feature - data token features
3141 * @min_len: minimum token length
3142 * @max_len: maximum token length
3143 * @bufsize: total available token buffer size (max size of @token_stream)
3144 */
3145struct nl80211_wowlan_tcp_data_token_feature {
3146 __u32 min_len, max_len, bufsize;
3147};
3148
3149/**
3150 * enum nl80211_wowlan_tcp_attrs - WoWLAN TCP connection parameters
3151 * @__NL80211_WOWLAN_TCP_INVALID: invalid number for nested attributes
3152 * @NL80211_WOWLAN_TCP_SRC_IPV4: source IPv4 address (in network byte order)
3153 * @NL80211_WOWLAN_TCP_DST_IPV4: destination IPv4 address
3154 * (in network byte order)
3155 * @NL80211_WOWLAN_TCP_DST_MAC: destination MAC address, this is given because
3156 * route lookup when configured might be invalid by the time we suspend,
3157 * and doing a route lookup when suspending is no longer possible as it
3158 * might require ARP querying.
3159 * @NL80211_WOWLAN_TCP_SRC_PORT: source port (u16); optional, if not given a
3160 * socket and port will be allocated
3161 * @NL80211_WOWLAN_TCP_DST_PORT: destination port (u16)
3162 * @NL80211_WOWLAN_TCP_DATA_PAYLOAD: data packet payload, at least one byte.
3163 * For feature advertising, a u32 attribute holding the maximum length
3164 * of the data payload.
3165 * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ: data packet sequence configuration
3166 * (if desired), a &struct nl80211_wowlan_tcp_data_seq. For feature
3167 * advertising it is just a flag
3168 * @NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN: data packet token configuration,
3169 * see &struct nl80211_wowlan_tcp_data_token and for advertising see
3170 * &struct nl80211_wowlan_tcp_data_token_feature.
3171 * @NL80211_WOWLAN_TCP_DATA_INTERVAL: data interval in seconds, maximum
3172 * interval in feature advertising (u32)
3173 * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a
3174 * u32 attribute holding the maximum length
3175 * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for
3176 * feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK
3177 * but on the TCP payload only.
3178 * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes
3179 * @MAX_NL80211_WOWLAN_TCP: highest attribute number
3180 */
3181enum nl80211_wowlan_tcp_attrs {
3182 __NL80211_WOWLAN_TCP_INVALID,
3183 NL80211_WOWLAN_TCP_SRC_IPV4,
3184 NL80211_WOWLAN_TCP_DST_IPV4,
3185 NL80211_WOWLAN_TCP_DST_MAC,
3186 NL80211_WOWLAN_TCP_SRC_PORT,
3187 NL80211_WOWLAN_TCP_DST_PORT,
3188 NL80211_WOWLAN_TCP_DATA_PAYLOAD,
3189 NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ,
3190 NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN,
3191 NL80211_WOWLAN_TCP_DATA_INTERVAL,
3192 NL80211_WOWLAN_TCP_WAKE_PAYLOAD,
3193 NL80211_WOWLAN_TCP_WAKE_MASK,
3194
3195 /* keep last */
3196 NUM_NL80211_WOWLAN_TCP,
3197 MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1
3198};
3199
3200/**
2901 * enum nl80211_iface_limit_attrs - limit attributes 3201 * enum nl80211_iface_limit_attrs - limit attributes
2902 * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) 3202 * @NL80211_IFACE_LIMIT_UNSPEC: (reserved)
2903 * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that 3203 * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that
@@ -2933,6 +3233,8 @@ enum nl80211_iface_limit_attrs {
2933 * the infrastructure network's beacon interval. 3233 * the infrastructure network's beacon interval.
2934 * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many 3234 * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many
2935 * different channels may be used within this group. 3235 * different channels may be used within this group.
3236 * @NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS: u32 attribute containing the bitmap
3237 * of supported channel widths for radar detection.
2936 * @NUM_NL80211_IFACE_COMB: number of attributes 3238 * @NUM_NL80211_IFACE_COMB: number of attributes
2937 * @MAX_NL80211_IFACE_COMB: highest attribute number 3239 * @MAX_NL80211_IFACE_COMB: highest attribute number
2938 * 3240 *
@@ -2965,6 +3267,7 @@ enum nl80211_if_combination_attrs {
2965 NL80211_IFACE_COMB_MAXNUM, 3267 NL80211_IFACE_COMB_MAXNUM,
2966 NL80211_IFACE_COMB_STA_AP_BI_MATCH, 3268 NL80211_IFACE_COMB_STA_AP_BI_MATCH,
2967 NL80211_IFACE_COMB_NUM_CHANNELS, 3269 NL80211_IFACE_COMB_NUM_CHANNELS,
3270 NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
2968 3271
2969 /* keep last */ 3272 /* keep last */
2970 NUM_NL80211_IFACE_COMB, 3273 NUM_NL80211_IFACE_COMB,
@@ -3140,6 +3443,19 @@ enum nl80211_ap_sme_features {
3140 * setting 3443 * setting
3141 * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic 3444 * @NL80211_FEATURE_P2P_GO_OPPPS: P2P GO implementation supports opportunistic
3142 * powersave 3445 * powersave
3446 * @NL80211_FEATURE_FULL_AP_CLIENT_STATE: The driver supports full state
3447 * transitions for AP clients. Without this flag (and if the driver
3448 * doesn't have the AP SME in the device) the driver supports adding
3449 * stations only when they're associated and adds them in associated
3450 * state (to later be transitioned into authorized), with this flag
3451 * they should be added before even sending the authentication reply
3452 * and then transitioned into authenticated, associated and authorized
3453 * states using station flags.
3454 * Note that even for drivers that support this, the default is to add
3455 * stations in authenticated/associated state, so to add unauthenticated
3456 * stations the authenticated/associated bits have to be set in the mask.
3457 * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits
3458 * (HT40, VHT 80/160 MHz) if this flag is set
3143 */ 3459 */
3144enum nl80211_feature_flags { 3460enum nl80211_feature_flags {
3145 NL80211_FEATURE_SK_TX_STATUS = 1 << 0, 3461 NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3155,6 +3471,9 @@ enum nl80211_feature_flags {
3155 NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10, 3471 NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10,
3156 NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11, 3472 NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11,
3157 NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12, 3473 NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12,
3474 /* bit 13 is reserved */
3475 NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14,
3476 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15,
3158}; 3477};
3159 3478
3160/** 3479/**
@@ -3182,7 +3501,7 @@ enum nl80211_probe_resp_offload_support_attr {
3182 * enum nl80211_connect_failed_reason - connection request failed reasons 3501 * enum nl80211_connect_failed_reason - connection request failed reasons
3183 * @NL80211_CONN_FAIL_MAX_CLIENTS: Maximum number of clients that can be 3502 * @NL80211_CONN_FAIL_MAX_CLIENTS: Maximum number of clients that can be
3184 * handled by the AP is reached. 3503 * handled by the AP is reached.
3185 * @NL80211_CONN_FAIL_BLOCKED_CLIENT: Client's MAC is in the AP's blocklist. 3504 * @NL80211_CONN_FAIL_BLOCKED_CLIENT: Connection request is rejected due to ACL.
3186 */ 3505 */
3187enum nl80211_connect_failed_reason { 3506enum nl80211_connect_failed_reason {
3188 NL80211_CONN_FAIL_MAX_CLIENTS, 3507 NL80211_CONN_FAIL_MAX_CLIENTS,
@@ -3210,4 +3529,62 @@ enum nl80211_scan_flags {
3210 NL80211_SCAN_FLAG_AP = 1<<2, 3529 NL80211_SCAN_FLAG_AP = 1<<2,
3211}; 3530};
3212 3531
3532/**
3533 * enum nl80211_acl_policy - access control policy
3534 *
3535 * Access control policy is applied on a MAC list set by
3536 * %NL80211_CMD_START_AP and %NL80211_CMD_SET_MAC_ACL, to
3537 * be used with %NL80211_ATTR_ACL_POLICY.
3538 *
3539 * @NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED: Deny stations which are
3540 * listed in ACL, i.e. allow all the stations which are not listed
3541 * in ACL to authenticate.
3542 * @NL80211_ACL_POLICY_DENY_UNLESS_LISTED: Allow the stations which are listed
3543 * in ACL, i.e. deny all the stations which are not listed in ACL.
3544 */
3545enum nl80211_acl_policy {
3546 NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED,
3547 NL80211_ACL_POLICY_DENY_UNLESS_LISTED,
3548};
3549
3550/**
3551 * enum nl80211_radar_event - type of radar event for DFS operation
3552 *
3553 * Type of event to be used with NL80211_ATTR_RADAR_EVENT to inform userspace
3554 * about detected radars or success of the channel available check (CAC)
3555 *
3556 * @NL80211_RADAR_DETECTED: A radar pattern has been detected. The channel is
3557 * now unusable.
3558 * @NL80211_RADAR_CAC_FINISHED: Channel Availability Check has been finished,
3559 * the channel is now available.
3560 * @NL80211_RADAR_CAC_ABORTED: Channel Availability Check has been aborted, no
3561 * change to the channel status.
3562 * @NL80211_RADAR_NOP_FINISHED: The Non-Occupancy Period for this channel is
3563 * over, channel becomes usable.
3564 */
3565enum nl80211_radar_event {
3566 NL80211_RADAR_DETECTED,
3567 NL80211_RADAR_CAC_FINISHED,
3568 NL80211_RADAR_CAC_ABORTED,
3569 NL80211_RADAR_NOP_FINISHED,
3570};
3571
3572/**
3573 * enum nl80211_dfs_state - DFS states for channels
3574 *
3575 * Channel states used by the DFS code.
3576 *
3577 * @IEEE80211_DFS_USABLE: The channel can be used, but channel availability
3578 * check (CAC) must be performed before using it for AP or IBSS.
3579 * @IEEE80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it
3580 * is therefore marked as not available.
3581 * @IEEE80211_DFS_AVAILABLE: The channel has been CAC checked and is available.
3582 */
3583
3584enum nl80211_dfs_state {
3585 NL80211_DFS_USABLE,
3586 NL80211_DFS_UNAVAILABLE,
3587 NL80211_DFS_AVAILABLE,
3588};
3589
3213#endif /* __LINUX_NL80211_H */ 3590#endif /* __LINUX_NL80211_H */