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.h371
1 files changed, 365 insertions, 6 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index bbfa1093f606..c7ccaae15af6 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -77,6 +77,39 @@
77 */ 77 */
78 78
79/** 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/**
80 * enum nl80211_commands - supported nl80211 commands 113 * enum nl80211_commands - supported nl80211 commands
81 * 114 *
82 * @NL80211_CMD_UNSPEC: unspecified command to catch errors 115 * @NL80211_CMD_UNSPEC: unspecified command to catch errors
@@ -203,6 +236,28 @@
203 * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, 236 * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
204 * partial scan results may be available 237 * partial scan results may be available
205 * 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 *
206 * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation 261 * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation
207 * or noise level 262 * or noise level
208 * @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
@@ -410,6 +465,24 @@
410 * notification. This event is used to indicate that an unprotected 465 * notification. This event is used to indicate that an unprotected
411 * disassociation frame was dropped when MFP is in use. 466 * disassociation frame was dropped when MFP is in use.
412 * 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 *
413 * @NL80211_CMD_MAX: highest used command number 486 * @NL80211_CMD_MAX: highest used command number
414 * @__NL80211_CMD_AFTER_LAST: internal use 487 * @__NL80211_CMD_AFTER_LAST: internal use
415 */ 488 */
@@ -522,6 +595,16 @@ enum nl80211_commands {
522 NL80211_CMD_UNPROT_DEAUTHENTICATE, 595 NL80211_CMD_UNPROT_DEAUTHENTICATE,
523 NL80211_CMD_UNPROT_DISASSOCIATE, 596 NL80211_CMD_UNPROT_DISASSOCIATE,
524 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,
607
525 /* add new commands above here */ 608 /* add new commands above here */
526 609
527 /* used to define NL80211_CMD_MAX below */ 610 /* used to define NL80211_CMD_MAX below */
@@ -545,6 +628,7 @@ enum nl80211_commands {
545/* source-level API compatibility */ 628/* source-level API compatibility */
546#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG 629#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG
547#define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_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
548 632
549/** 633/**
550 * enum nl80211_attrs - nl80211 netlink attributes 634 * enum nl80211_attrs - nl80211 netlink attributes
@@ -886,6 +970,31 @@ enum nl80211_commands {
886 * changed once the mesh is active. 970 * changed once the mesh is active.
887 * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute 971 * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute
888 * containing attributes from &enum nl80211_meshconf_params. 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.
889 * 998 *
890 * @NL80211_ATTR_MAX: highest attribute number currently defined 999 * @NL80211_ATTR_MAX: highest attribute number currently defined
891 * @__NL80211_ATTR_AFTER_LAST: internal use 1000 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -1074,6 +1183,17 @@ enum nl80211_attrs {
1074 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, 1183 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX,
1075 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, 1184 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX,
1076 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
1077 /* add attributes here, update the policy in nl80211.c */ 1197 /* add attributes here, update the policy in nl80211.c */
1078 1198
1079 __NL80211_ATTR_AFTER_LAST, 1199 __NL80211_ATTR_AFTER_LAST,
@@ -1126,7 +1246,9 @@ enum nl80211_attrs {
1126 * @NL80211_IFTYPE_ADHOC: independent BSS member 1246 * @NL80211_IFTYPE_ADHOC: independent BSS member
1127 * @NL80211_IFTYPE_STATION: managed BSS member 1247 * @NL80211_IFTYPE_STATION: managed BSS member
1128 * @NL80211_IFTYPE_AP: access point 1248 * @NL80211_IFTYPE_AP: access point
1129 * @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.
1130 * @NL80211_IFTYPE_WDS: wireless distribution interface 1252 * @NL80211_IFTYPE_WDS: wireless distribution interface
1131 * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames 1253 * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames
1132 * @NL80211_IFTYPE_MESH_POINT: mesh point 1254 * @NL80211_IFTYPE_MESH_POINT: mesh point
@@ -1168,6 +1290,7 @@ enum nl80211_iftype {
1168 * with short barker preamble 1290 * with short barker preamble
1169 * @NL80211_STA_FLAG_WME: station is WME/QoS capable 1291 * @NL80211_STA_FLAG_WME: station is WME/QoS capable
1170 * @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
1171 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined 1294 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
1172 * @__NL80211_STA_FLAG_AFTER_LAST: internal use 1295 * @__NL80211_STA_FLAG_AFTER_LAST: internal use
1173 */ 1296 */
@@ -1177,6 +1300,7 @@ enum nl80211_sta_flags {
1177 NL80211_STA_FLAG_SHORT_PREAMBLE, 1300 NL80211_STA_FLAG_SHORT_PREAMBLE,
1178 NL80211_STA_FLAG_WME, 1301 NL80211_STA_FLAG_WME,
1179 NL80211_STA_FLAG_MFP, 1302 NL80211_STA_FLAG_MFP,
1303 NL80211_STA_FLAG_AUTHENTICATED,
1180 1304
1181 /* keep last */ 1305 /* keep last */
1182 __NL80211_STA_FLAG_AFTER_LAST, 1306 __NL80211_STA_FLAG_AFTER_LAST,
@@ -1222,6 +1346,36 @@ enum nl80211_rate_info {
1222}; 1346};
1223 1347
1224/** 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/**
1225 * enum nl80211_sta_info - station information 1379 * enum nl80211_sta_info - station information
1226 * 1380 *
1227 * These attribute types are used with %NL80211_ATTR_STA_INFO 1381 * These attribute types are used with %NL80211_ATTR_STA_INFO
@@ -1233,7 +1387,7 @@ enum nl80211_rate_info {
1233 * @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)
1234 * @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)
1235 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute 1389 * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
1236 * containing info as possible, see &enum nl80211_sta_info_txrate. 1390 * containing info as possible, see &enum nl80211_rate_info
1237 * @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)
1238 * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this 1392 * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this
1239 * station) 1393 * station)
@@ -1243,8 +1397,12 @@ enum nl80211_rate_info {
1243 * @NL80211_STA_INFO_LLID: the station's mesh LLID 1397 * @NL80211_STA_INFO_LLID: the station's mesh LLID
1244 * @NL80211_STA_INFO_PLID: the station's mesh PLID 1398 * @NL80211_STA_INFO_PLID: the station's mesh PLID
1245 * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station 1399 * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station
1400 * (see %enum nl80211_plink_state)
1246 * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested 1401 * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested
1247 * attribute, like NL80211_STA_INFO_TX_BITRATE. 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
1248 * @__NL80211_STA_INFO_AFTER_LAST: internal 1406 * @__NL80211_STA_INFO_AFTER_LAST: internal
1249 * @NL80211_STA_INFO_MAX: highest possible station info attribute 1407 * @NL80211_STA_INFO_MAX: highest possible station info attribute
1250 */ 1408 */
@@ -1264,6 +1422,8 @@ enum nl80211_sta_info {
1264 NL80211_STA_INFO_TX_FAILED, 1422 NL80211_STA_INFO_TX_FAILED,
1265 NL80211_STA_INFO_SIGNAL_AVG, 1423 NL80211_STA_INFO_SIGNAL_AVG,
1266 NL80211_STA_INFO_RX_BITRATE, 1424 NL80211_STA_INFO_RX_BITRATE,
1425 NL80211_STA_INFO_BSS_PARAM,
1426 NL80211_STA_INFO_CONNECTED_TIME,
1267 1427
1268 /* keep last */ 1428 /* keep last */
1269 __NL80211_STA_INFO_AFTER_LAST, 1429 __NL80211_STA_INFO_AFTER_LAST,
@@ -1686,9 +1846,21 @@ enum nl80211_meshconf_params {
1686 * vendor specific path metric or disable it to use the default Airtime 1846 * vendor specific path metric or disable it to use the default Airtime
1687 * metric. 1847 * metric.
1688 * 1848 *
1689 * @NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE: A vendor specific information 1849 * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a
1690 * element that vendors will use to identify the path selection methods and 1850 * robust security network ie, or a vendor specific information element that
1691 * metrics in use. 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.
1692 * 1864 *
1693 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number 1865 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
1694 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use 1866 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
@@ -1697,7 +1869,9 @@ enum nl80211_mesh_setup_params {
1697 __NL80211_MESH_SETUP_INVALID, 1869 __NL80211_MESH_SETUP_INVALID,
1698 NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL, 1870 NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL,
1699 NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC, 1871 NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC,
1700 NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE, 1872 NL80211_MESH_SETUP_IE,
1873 NL80211_MESH_SETUP_USERSPACE_AUTH,
1874 NL80211_MESH_SETUP_USERSPACE_AMPE,
1701 1875
1702 /* keep last */ 1876 /* keep last */
1703 __NL80211_MESH_SETUP_ATTR_AFTER_LAST, 1877 __NL80211_MESH_SETUP_ATTR_AFTER_LAST,
@@ -2002,4 +2176,189 @@ enum nl80211_tx_power_setting {
2002 NL80211_TX_POWER_FIXED, 2176 NL80211_TX_POWER_FIXED,
2003}; 2177};
2004 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
2005#endif /* __LINUX_NL80211_H */ 2364#endif /* __LINUX_NL80211_H */