nl80211.h 22 KB

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