at cba767175becadc5c4016cceb7bfdd2c7fe722f4 597 lines 22 kB view raw
1#ifndef __LINUX_NL80211_H 2#define __LINUX_NL80211_H 3/* 4 * 802.11 netlink interface public header 5 * 6 * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net> 7 */ 8 9/** 10 * DOC: Station handling 11 * 12 * Stations are added per interface, but a special case exists with VLAN 13 * interfaces. When a station is bound to an AP interface, it may be moved 14 * into a VLAN identified by a VLAN interface index (%NL80211_ATTR_STA_VLAN). 15 * The station is still assumed to belong to the AP interface it was added 16 * to. 17 * 18 * TODO: need more info? 19 */ 20 21/** 22 * enum nl80211_commands - supported nl80211 commands 23 * 24 * @NL80211_CMD_UNSPEC: unspecified command to catch errors 25 * 26 * @NL80211_CMD_GET_WIPHY: request information about a wiphy or dump request 27 * to get a list of all present wiphys. 28 * @NL80211_CMD_SET_WIPHY: set wiphy name, needs %NL80211_ATTR_WIPHY and 29 * %NL80211_ATTR_WIPHY_NAME. 30 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request 31 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and 32 * %NL80211_ATTR_WIPHY_NAME. 33 * @NL80211_CMD_DEL_WIPHY: Wiphy deleted. Has attributes 34 * %NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME. 35 * 36 * @NL80211_CMD_GET_INTERFACE: Request an interface's configuration; 37 * either a dump request on a %NL80211_ATTR_WIPHY or a specific get 38 * on an %NL80211_ATTR_IFINDEX is supported. 39 * @NL80211_CMD_SET_INTERFACE: Set type of a virtual interface, requires 40 * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_IFTYPE. 41 * @NL80211_CMD_NEW_INTERFACE: Newly created virtual interface or response 42 * to %NL80211_CMD_GET_INTERFACE. Has %NL80211_ATTR_IFINDEX, 43 * %NL80211_ATTR_WIPHY and %NL80211_ATTR_IFTYPE attributes. Can also 44 * be sent from userspace to request creation of a new virtual interface, 45 * then requires attributes %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFTYPE and 46 * %NL80211_ATTR_IFNAME. 47 * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes 48 * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from 49 * userspace to request deletion of a virtual interface, then requires 50 * attribute %NL80211_ATTR_IFINDEX. 51 * 52 * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified 53 * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. 54 * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT or 55 * %NL80211_ATTR_KEY_THRESHOLD. 56 * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA, 57 * %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER 58 * attributes. 59 * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX 60 * or %NL80211_ATTR_MAC. 61 * 62 * @NL80211_CMD_GET_BEACON: retrieve beacon information (returned in a 63 * %NL80222_CMD_NEW_BEACON message) 64 * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface 65 * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, 66 * %NL80211_BEACON_HEAD and %NL80211_BEACON_TAIL attributes. 67 * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, 68 * parameters are like for %NL80211_CMD_SET_BEACON. 69 * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it 70 * 71 * @NL80211_CMD_GET_STATION: Get station attributes for station identified by 72 * %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX. 73 * @NL80211_CMD_SET_STATION: Set station attributes for station identified by 74 * %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX. 75 * @NL80211_CMD_NEW_STATION: Add a station with given attributes to the 76 * the interface identified by %NL80211_ATTR_IFINDEX. 77 * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC 78 * or, if no MAC address given, all stations, on the interface identified 79 * by %NL80211_ATTR_IFINDEX. 80 * 81 * @NL80211_CMD_GET_MPATH: Get mesh path attributes for mesh path to 82 * destination %NL80211_ATTR_MAC on the interface identified by 83 * %NL80211_ATTR_IFINDEX. 84 * @NL80211_CMD_SET_MPATH: Set mesh path attributes for mesh path to 85 * destination %NL80211_ATTR_MAC on the interface identified by 86 * %NL80211_ATTR_IFINDEX. 87 * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the 88 * the interface identified by %NL80211_ATTR_IFINDEX. 89 * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC 90 * or, if no MAC address given, all mesh paths, on the interface identified 91 * by %NL80211_ATTR_IFINDEX. 92 * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by 93 * %NL80211_ATTR_IFINDEX. 94 * 95 * @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command 96 * after being queried by the kernel. CRDA replies by sending a regulatory 97 * domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our 98 * current alpha2 if it found a match. It also provides 99 * NL80211_ATTR_REG_RULE_FLAGS, and a set of regulatory rules. Each 100 * regulatory rule is a nested set of attributes given by 101 * %NL80211_ATTR_REG_RULE_FREQ_[START|END] and 102 * %NL80211_ATTR_FREQ_RANGE_MAX_BW with an attached power rule given by 103 * %NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and 104 * %NL80211_ATTR_REG_RULE_POWER_MAX_EIRP. 105 * @NL80211_CMD_REQ_SET_REG: ask the wireless core to set the regulatory domain 106 * to the the specified ISO/IEC 3166-1 alpha2 country code. The core will 107 * store this as a valid request and then query userspace for it. 108 * 109 * @NL80211_CMD_MAX: highest used command number 110 * @__NL80211_CMD_AFTER_LAST: internal use 111 */ 112enum nl80211_commands { 113/* don't change the order or add anything inbetween, this is ABI! */ 114 NL80211_CMD_UNSPEC, 115 116 NL80211_CMD_GET_WIPHY, /* can dump */ 117 NL80211_CMD_SET_WIPHY, 118 NL80211_CMD_NEW_WIPHY, 119 NL80211_CMD_DEL_WIPHY, 120 121 NL80211_CMD_GET_INTERFACE, /* can dump */ 122 NL80211_CMD_SET_INTERFACE, 123 NL80211_CMD_NEW_INTERFACE, 124 NL80211_CMD_DEL_INTERFACE, 125 126 NL80211_CMD_GET_KEY, 127 NL80211_CMD_SET_KEY, 128 NL80211_CMD_NEW_KEY, 129 NL80211_CMD_DEL_KEY, 130 131 NL80211_CMD_GET_BEACON, 132 NL80211_CMD_SET_BEACON, 133 NL80211_CMD_NEW_BEACON, 134 NL80211_CMD_DEL_BEACON, 135 136 NL80211_CMD_GET_STATION, 137 NL80211_CMD_SET_STATION, 138 NL80211_CMD_NEW_STATION, 139 NL80211_CMD_DEL_STATION, 140 141 NL80211_CMD_GET_MPATH, 142 NL80211_CMD_SET_MPATH, 143 NL80211_CMD_NEW_MPATH, 144 NL80211_CMD_DEL_MPATH, 145 146 NL80211_CMD_SET_BSS, 147 148 NL80211_CMD_SET_REG, 149 NL80211_CMD_REQ_SET_REG, 150 151 /* add new commands above here */ 152 153 /* used to define NL80211_CMD_MAX below */ 154 __NL80211_CMD_AFTER_LAST, 155 NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1 156}; 157 158/* 159 * Allow user space programs to use #ifdef on new commands by defining them 160 * here 161 */ 162#define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS 163 164/** 165 * enum nl80211_attrs - nl80211 netlink attributes 166 * 167 * @NL80211_ATTR_UNSPEC: unspecified attribute to catch errors 168 * 169 * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf. 170 * /sys/class/ieee80211/<phyname>/index 171 * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming) 172 * 173 * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on 174 * @NL80211_ATTR_IFNAME: network interface name 175 * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype 176 * 177 * @NL80211_ATTR_MAC: MAC address (various uses) 178 * 179 * @NL80211_ATTR_KEY_DATA: (temporal) key data; for TKIP this consists of 180 * 16 bytes encryption key followed by 8 bytes each for TX and RX MIC 181 * keys 182 * @NL80211_ATTR_KEY_IDX: key ID (u8, 0-3) 183 * @NL80211_ATTR_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11 184 * section 7.3.2.25.1, e.g. 0x000FAC04) 185 * @NL80211_ATTR_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and 186 * CCMP keys, each six bytes in little endian 187 * 188 * @NL80211_ATTR_BEACON_INTERVAL: beacon interval in TU 189 * @NL80211_ATTR_DTIM_PERIOD: DTIM period for beaconing 190 * @NL80211_ATTR_BEACON_HEAD: portion of the beacon before the TIM IE 191 * @NL80211_ATTR_BEACON_TAIL: portion of the beacon after the TIM IE 192 * 193 * @NL80211_ATTR_STA_AID: Association ID for the station (u16) 194 * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of 195 * &enum nl80211_sta_flags. 196 * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by 197 * IEEE 802.11 7.3.1.6 (u16). 198 * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported 199 * rates as defined by IEEE 802.11 7.3.2.2 but without the length 200 * restriction (at most %NL80211_MAX_SUPP_RATES). 201 * @NL80211_ATTR_STA_VLAN: interface index of VLAN interface to move station 202 * to, or the AP interface the station was originally added to to. 203 * @NL80211_ATTR_STA_INFO: information about a station, part of station info 204 * given for %NL80211_CMD_GET_STATION, nested attribute containing 205 * info as possible, see &enum nl80211_sta_info. 206 * 207 * @NL80211_ATTR_WIPHY_BANDS: Information about an operating bands, 208 * consisting of a nested array. 209 * 210 * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes). 211 * @NL80211_ATTR_PLINK_ACTION: action to perform on the mesh peer link. 212 * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. 213 * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path 214 * info given for %NL80211_CMD_GET_MPATH, nested attribute described at 215 * &enum nl80211_mpath_info. 216 * 217 * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of 218 * &enum nl80211_mntr_flags. 219 * 220 * @NL80211_ATTR_REG_ALPHA2: an ISO-3166-alpha2 country code for which the 221 * current regulatory domain should be set to or is already set to. 222 * For example, 'CR', for Costa Rica. This attribute is used by the kernel 223 * to query the CRDA to retrieve one regulatory domain. This attribute can 224 * also be used by userspace to query the kernel for the currently set 225 * regulatory domain. We chose an alpha2 as that is also used by the 226 * IEEE-802.11d country information element to identify a country. 227 * Users can also simply ask the wireless core to set regulatory domain 228 * to a specific alpha2. 229 * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory 230 * rules. 231 * 232 * @NL80211_ATTR_BSS_CTS_PROT: whether CTS protection is enabled (u8, 0 or 1) 233 * @NL80211_ATTR_BSS_SHORT_PREAMBLE: whether short preamble is enabled 234 * (u8, 0 or 1) 235 * @NL80211_ATTR_BSS_SHORT_SLOT_TIME: whether short slot time enabled 236 * (u8, 0 or 1) 237 * 238 * @NL80211_ATTR_HT_CAPABILITY: HT Capability information element (from 239 * association request when used with NL80211_CMD_NEW_STATION) 240 * 241 * @NL80211_ATTR_SUPPORTED_IFTYPES: nested attribute containing all 242 * supported interface types, each a flag attribute with the number 243 * of the interface mode. 244 * 245 * @NL80211_ATTR_MAX: highest attribute number currently defined 246 * @__NL80211_ATTR_AFTER_LAST: internal use 247 */ 248enum nl80211_attrs { 249/* don't change the order or add anything inbetween, this is ABI! */ 250 NL80211_ATTR_UNSPEC, 251 252 NL80211_ATTR_WIPHY, 253 NL80211_ATTR_WIPHY_NAME, 254 255 NL80211_ATTR_IFINDEX, 256 NL80211_ATTR_IFNAME, 257 NL80211_ATTR_IFTYPE, 258 259 NL80211_ATTR_MAC, 260 261 NL80211_ATTR_KEY_DATA, 262 NL80211_ATTR_KEY_IDX, 263 NL80211_ATTR_KEY_CIPHER, 264 NL80211_ATTR_KEY_SEQ, 265 NL80211_ATTR_KEY_DEFAULT, 266 267 NL80211_ATTR_BEACON_INTERVAL, 268 NL80211_ATTR_DTIM_PERIOD, 269 NL80211_ATTR_BEACON_HEAD, 270 NL80211_ATTR_BEACON_TAIL, 271 272 NL80211_ATTR_STA_AID, 273 NL80211_ATTR_STA_FLAGS, 274 NL80211_ATTR_STA_LISTEN_INTERVAL, 275 NL80211_ATTR_STA_SUPPORTED_RATES, 276 NL80211_ATTR_STA_VLAN, 277 NL80211_ATTR_STA_INFO, 278 279 NL80211_ATTR_WIPHY_BANDS, 280 281 NL80211_ATTR_MNTR_FLAGS, 282 283 NL80211_ATTR_MESH_ID, 284 NL80211_ATTR_STA_PLINK_ACTION, 285 NL80211_ATTR_MPATH_NEXT_HOP, 286 NL80211_ATTR_MPATH_INFO, 287 288 NL80211_ATTR_BSS_CTS_PROT, 289 NL80211_ATTR_BSS_SHORT_PREAMBLE, 290 NL80211_ATTR_BSS_SHORT_SLOT_TIME, 291 292 NL80211_ATTR_HT_CAPABILITY, 293 294 NL80211_ATTR_SUPPORTED_IFTYPES, 295 296 NL80211_ATTR_REG_ALPHA2, 297 NL80211_ATTR_REG_RULES, 298 299 /* add attributes here, update the policy in nl80211.c */ 300 301 __NL80211_ATTR_AFTER_LAST, 302 NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 303}; 304 305/* 306 * Allow user space programs to use #ifdef on new attributes by defining them 307 * here 308 */ 309#define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY 310 311#define NL80211_MAX_SUPP_RATES 32 312#define NL80211_MAX_SUPP_REG_RULES 32 313#define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0 314#define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 315#define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 316#define NL80211_HT_CAPABILITY_LEN 26 317 318/** 319 * enum nl80211_iftype - (virtual) interface types 320 * 321 * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides 322 * @NL80211_IFTYPE_ADHOC: independent BSS member 323 * @NL80211_IFTYPE_STATION: managed BSS member 324 * @NL80211_IFTYPE_AP: access point 325 * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points 326 * @NL80211_IFTYPE_WDS: wireless distribution interface 327 * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames 328 * @NL80211_IFTYPE_MESH_POINT: mesh point 329 * @NL80211_IFTYPE_MAX: highest interface type number currently defined 330 * @__NL80211_IFTYPE_AFTER_LAST: internal use 331 * 332 * These values are used with the %NL80211_ATTR_IFTYPE 333 * to set the type of an interface. 334 * 335 */ 336enum nl80211_iftype { 337 NL80211_IFTYPE_UNSPECIFIED, 338 NL80211_IFTYPE_ADHOC, 339 NL80211_IFTYPE_STATION, 340 NL80211_IFTYPE_AP, 341 NL80211_IFTYPE_AP_VLAN, 342 NL80211_IFTYPE_WDS, 343 NL80211_IFTYPE_MONITOR, 344 NL80211_IFTYPE_MESH_POINT, 345 346 /* keep last */ 347 __NL80211_IFTYPE_AFTER_LAST, 348 NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1 349}; 350 351/** 352 * enum nl80211_sta_flags - station flags 353 * 354 * Station flags. When a station is added to an AP interface, it is 355 * assumed to be already associated (and hence authenticated.) 356 * 357 * @NL80211_STA_FLAG_AUTHORIZED: station is authorized (802.1X) 358 * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames 359 * with short barker preamble 360 * @NL80211_STA_FLAG_WME: station is WME/QoS capable 361 */ 362enum nl80211_sta_flags { 363 __NL80211_STA_FLAG_INVALID, 364 NL80211_STA_FLAG_AUTHORIZED, 365 NL80211_STA_FLAG_SHORT_PREAMBLE, 366 NL80211_STA_FLAG_WME, 367 368 /* keep last */ 369 __NL80211_STA_FLAG_AFTER_LAST, 370 NL80211_STA_FLAG_MAX = __NL80211_STA_FLAG_AFTER_LAST - 1 371}; 372 373/** 374 * enum nl80211_sta_info - station information 375 * 376 * These attribute types are used with %NL80211_ATTR_STA_INFO 377 * when getting information about a station. 378 * 379 * @__NL80211_STA_INFO_INVALID: attribute number 0 is reserved 380 * @NL80211_STA_INFO_INACTIVE_TIME: time since last activity (u32, msecs) 381 * @NL80211_STA_INFO_RX_BYTES: total received bytes (u32, from this station) 382 * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) 383 * @__NL80211_STA_INFO_AFTER_LAST: internal 384 * @NL80211_STA_INFO_MAX: highest possible station info attribute 385 */ 386enum nl80211_sta_info { 387 __NL80211_STA_INFO_INVALID, 388 NL80211_STA_INFO_INACTIVE_TIME, 389 NL80211_STA_INFO_RX_BYTES, 390 NL80211_STA_INFO_TX_BYTES, 391 NL80211_STA_INFO_LLID, 392 NL80211_STA_INFO_PLID, 393 NL80211_STA_INFO_PLINK_STATE, 394 395 /* keep last */ 396 __NL80211_STA_INFO_AFTER_LAST, 397 NL80211_STA_INFO_MAX = __NL80211_STA_INFO_AFTER_LAST - 1 398}; 399 400/** 401 * enum nl80211_mpath_flags - nl80211 mesh path flags 402 * 403 * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active 404 * @NL80211_MPATH_FLAG_RESOLVING: the mesh path discovery process is running 405 * @NL80211_MPATH_FLAG_DSN_VALID: the mesh path contains a valid DSN 406 * @NL80211_MPATH_FLAG_FIXED: the mesh path has been manually set 407 * @NL80211_MPATH_FLAG_RESOLVED: the mesh path discovery process succeeded 408 */ 409enum nl80211_mpath_flags { 410 NL80211_MPATH_FLAG_ACTIVE = 1<<0, 411 NL80211_MPATH_FLAG_RESOLVING = 1<<1, 412 NL80211_MPATH_FLAG_DSN_VALID = 1<<2, 413 NL80211_MPATH_FLAG_FIXED = 1<<3, 414 NL80211_MPATH_FLAG_RESOLVED = 1<<4, 415}; 416 417/** 418 * enum nl80211_mpath_info - mesh path information 419 * 420 * These attribute types are used with %NL80211_ATTR_MPATH_INFO when getting 421 * information about a mesh path. 422 * 423 * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved 424 * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination 425 * @NL80211_ATTR_MPATH_DSN: destination sequence number 426 * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path 427 * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now 428 * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in 429 * &enum nl80211_mpath_flags; 430 * @NL80211_ATTR_MPATH_DISCOVERY_TIMEOUT: total path discovery timeout, in msec 431 * @NL80211_ATTR_MPATH_DISCOVERY_RETRIES: mesh path discovery retries 432 */ 433enum nl80211_mpath_info { 434 __NL80211_MPATH_INFO_INVALID, 435 NL80211_MPATH_INFO_FRAME_QLEN, 436 NL80211_MPATH_INFO_DSN, 437 NL80211_MPATH_INFO_METRIC, 438 NL80211_MPATH_INFO_EXPTIME, 439 NL80211_MPATH_INFO_FLAGS, 440 NL80211_MPATH_INFO_DISCOVERY_TIMEOUT, 441 NL80211_MPATH_INFO_DISCOVERY_RETRIES, 442 443 /* keep last */ 444 __NL80211_MPATH_INFO_AFTER_LAST, 445 NL80211_MPATH_INFO_MAX = __NL80211_MPATH_INFO_AFTER_LAST - 1 446}; 447 448/** 449 * enum nl80211_band_attr - band attributes 450 * @__NL80211_BAND_ATTR_INVALID: attribute number 0 is reserved 451 * @NL80211_BAND_ATTR_FREQS: supported frequencies in this band, 452 * an array of nested frequency attributes 453 * @NL80211_BAND_ATTR_RATES: supported bitrates in this band, 454 * an array of nested bitrate attributes 455 */ 456enum nl80211_band_attr { 457 __NL80211_BAND_ATTR_INVALID, 458 NL80211_BAND_ATTR_FREQS, 459 NL80211_BAND_ATTR_RATES, 460 461 /* keep last */ 462 __NL80211_BAND_ATTR_AFTER_LAST, 463 NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1 464}; 465 466/** 467 * enum nl80211_frequency_attr - frequency attributes 468 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz 469 * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current 470 * regulatory domain. 471 * @NL80211_FREQUENCY_ATTR_PASSIVE_SCAN: Only passive scanning is 472 * permitted on this channel in current regulatory domain. 473 * @NL80211_FREQUENCY_ATTR_NO_IBSS: IBSS networks are not permitted 474 * on this channel in current regulatory domain. 475 * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory 476 * on this channel in current regulatory domain. 477 */ 478enum nl80211_frequency_attr { 479 __NL80211_FREQUENCY_ATTR_INVALID, 480 NL80211_FREQUENCY_ATTR_FREQ, 481 NL80211_FREQUENCY_ATTR_DISABLED, 482 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN, 483 NL80211_FREQUENCY_ATTR_NO_IBSS, 484 NL80211_FREQUENCY_ATTR_RADAR, 485 486 /* keep last */ 487 __NL80211_FREQUENCY_ATTR_AFTER_LAST, 488 NL80211_FREQUENCY_ATTR_MAX = __NL80211_FREQUENCY_ATTR_AFTER_LAST - 1 489}; 490 491/** 492 * enum nl80211_bitrate_attr - bitrate attributes 493 * @NL80211_BITRATE_ATTR_RATE: Bitrate in units of 100 kbps 494 * @NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE: Short preamble supported 495 * in 2.4 GHz band. 496 */ 497enum nl80211_bitrate_attr { 498 __NL80211_BITRATE_ATTR_INVALID, 499 NL80211_BITRATE_ATTR_RATE, 500 NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE, 501 502 /* keep last */ 503 __NL80211_BITRATE_ATTR_AFTER_LAST, 504 NL80211_BITRATE_ATTR_MAX = __NL80211_BITRATE_ATTR_AFTER_LAST - 1 505}; 506 507/** 508 * enum nl80211_reg_rule_attr - regulatory rule attributes 509 * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional 510 * considerations for a given frequency range. These are the 511 * &enum nl80211_reg_rule_flags. 512 * @NL80211_ATTR_FREQ_RANGE_START: starting frequencry for the regulatory 513 * rule in KHz. This is not a center of frequency but an actual regulatory 514 * band edge. 515 * @NL80211_ATTR_FREQ_RANGE_END: ending frequency for the regulatory rule 516 * in KHz. This is not a center a frequency but an actual regulatory 517 * band edge. 518 * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this 519 * frequency range, in KHz. 520 * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain 521 * for a given frequency range. The value is in mBi (100 * dBi). 522 * If you don't have one then don't send this. 523 * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for 524 * a given frequency range. The value is in mBm (100 * dBm). 525 */ 526enum nl80211_reg_rule_attr { 527 __NL80211_REG_RULE_ATTR_INVALID, 528 NL80211_ATTR_REG_RULE_FLAGS, 529 530 NL80211_ATTR_FREQ_RANGE_START, 531 NL80211_ATTR_FREQ_RANGE_END, 532 NL80211_ATTR_FREQ_RANGE_MAX_BW, 533 534 NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN, 535 NL80211_ATTR_POWER_RULE_MAX_EIRP, 536 537 /* keep last */ 538 __NL80211_REG_RULE_ATTR_AFTER_LAST, 539 NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1 540}; 541 542/** 543 * enum nl80211_reg_rule_flags - regulatory rule flags 544 * 545 * @NL80211_RRF_NO_OFDM: OFDM modulation not allowed 546 * @NL80211_RRF_NO_CCK: CCK modulation not allowed 547 * @NL80211_RRF_NO_INDOOR: indoor operation not allowed 548 * @NL80211_RRF_NO_OUTDOOR: outdoor operation not allowed 549 * @NL80211_RRF_DFS: DFS support is required to be used 550 * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links 551 * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links 552 * @NL80211_RRF_PASSIVE_SCAN: passive scan is required 553 * @NL80211_RRF_NO_IBSS: no IBSS is allowed 554 */ 555enum nl80211_reg_rule_flags { 556 NL80211_RRF_NO_OFDM = 1<<0, 557 NL80211_RRF_NO_CCK = 1<<1, 558 NL80211_RRF_NO_INDOOR = 1<<2, 559 NL80211_RRF_NO_OUTDOOR = 1<<3, 560 NL80211_RRF_DFS = 1<<4, 561 NL80211_RRF_PTP_ONLY = 1<<5, 562 NL80211_RRF_PTMP_ONLY = 1<<6, 563 NL80211_RRF_PASSIVE_SCAN = 1<<7, 564 NL80211_RRF_NO_IBSS = 1<<8, 565}; 566 567/** 568 * enum nl80211_mntr_flags - monitor configuration flags 569 * 570 * Monitor configuration flags. 571 * 572 * @__NL80211_MNTR_FLAG_INVALID: reserved 573 * 574 * @NL80211_MNTR_FLAG_FCSFAIL: pass frames with bad FCS 575 * @NL80211_MNTR_FLAG_PLCPFAIL: pass frames with bad PLCP 576 * @NL80211_MNTR_FLAG_CONTROL: pass control frames 577 * @NL80211_MNTR_FLAG_OTHER_BSS: disable BSSID filtering 578 * @NL80211_MNTR_FLAG_COOK_FRAMES: report frames after processing. 579 * overrides all other flags. 580 * 581 * @__NL80211_MNTR_FLAG_AFTER_LAST: internal use 582 * @NL80211_MNTR_FLAG_MAX: highest possible monitor flag 583 */ 584enum nl80211_mntr_flags { 585 __NL80211_MNTR_FLAG_INVALID, 586 NL80211_MNTR_FLAG_FCSFAIL, 587 NL80211_MNTR_FLAG_PLCPFAIL, 588 NL80211_MNTR_FLAG_CONTROL, 589 NL80211_MNTR_FLAG_OTHER_BSS, 590 NL80211_MNTR_FLAG_COOK_FRAMES, 591 592 /* keep last */ 593 __NL80211_MNTR_FLAG_AFTER_LAST, 594 NL80211_MNTR_FLAG_MAX = __NL80211_MNTR_FLAG_AFTER_LAST - 1 595}; 596 597#endif /* __LINUX_NL80211_H */