nl80211.h 26 KB

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