001-nl80211_h_sync.patch 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. diff --git a/nl80211.h b/nl80211.h
  2. index c587a61..255a971 100644
  3. --- a/nl80211.h
  4. +++ b/nl80211.h
  5. @@ -11,6 +11,7 @@
  6. * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
  7. * Copyright 2008 Colin McCabe <colin@cozybit.com>
  8. * Copyright 2015-2017 Intel Deutschland GmbH
  9. + * Copyright (C) 2018 Intel Corporation
  10. *
  11. * Permission to use, copy, modify, and/or distribute this software for any
  12. * purpose with or without fee is hereby granted, provided that the above
  13. @@ -203,7 +204,8 @@
  14. * FILS shared key authentication offload should be able to construct the
  15. * authentication and association frames for FILS shared key authentication and
  16. * eventually do a key derivation as per IEEE 802.11ai. The below additional
  17. - * parameters should be given to driver in %NL80211_CMD_CONNECT.
  18. + * parameters should be given to driver in %NL80211_CMD_CONNECT and/or in
  19. + * %NL80211_CMD_UPDATE_CONNECT_PARAMS.
  20. * %NL80211_ATTR_FILS_ERP_USERNAME - used to construct keyname_nai
  21. * %NL80211_ATTR_FILS_ERP_REALM - used to construct keyname_nai
  22. * %NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM - used to construct erp message
  23. @@ -214,7 +216,8 @@
  24. * as specified in IETF RFC 6696.
  25. *
  26. * When FILS shared key authentication is completed, driver needs to provide the
  27. - * below additional parameters to userspace.
  28. + * below additional parameters to userspace, which can be either after setting
  29. + * up a connection or after roaming.
  30. * %NL80211_ATTR_FILS_KEK - used for key renewal
  31. * %NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM - used in further EAP-RP exchanges
  32. * %NL80211_ATTR_PMKID - used to identify the PMKSA used/generated
  33. @@ -542,7 +545,8 @@
  34. * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
  35. * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
  36. * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
  37. - * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT, %NL80211_ATTR_MAC_HINT, and
  38. + * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,
  39. + * %NL80211_ATTR_CONTROL_PORT_OVER_NL80211, %NL80211_ATTR_MAC_HINT, and
  40. * %NL80211_ATTR_WIPHY_FREQ_HINT.
  41. * If included, %NL80211_ATTR_MAC and %NL80211_ATTR_WIPHY_FREQ are
  42. * restrictions on BSS selection, i.e., they effectively prevent roaming
  43. @@ -977,21 +981,58 @@
  44. * only the %NL80211_ATTR_IE data is used and updated with this command.
  45. *
  46. * @NL80211_CMD_SET_PMK: For offloaded 4-Way handshake, set the PMK or PMK-R0
  47. - * for the given authenticator address (specified with &NL80211_ATTR_MAC).
  48. - * When &NL80211_ATTR_PMKR0_NAME is set, &NL80211_ATTR_PMK specifies the
  49. + * for the given authenticator address (specified with %NL80211_ATTR_MAC).
  50. + * When %NL80211_ATTR_PMKR0_NAME is set, %NL80211_ATTR_PMK specifies the
  51. * PMK-R0, otherwise it specifies the PMK.
  52. * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously
  53. * configured PMK for the authenticator address identified by
  54. - * &NL80211_ATTR_MAC.
  55. + * %NL80211_ATTR_MAC.
  56. * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way
  57. * handshake was completed successfully by the driver. The BSSID is
  58. - * specified with &NL80211_ATTR_MAC. Drivers that support 4 way handshake
  59. + * specified with %NL80211_ATTR_MAC. Drivers that support 4 way handshake
  60. * offload should send this event after indicating 802.11 association with
  61. - * &NL80211_CMD_CONNECT or &NL80211_CMD_ROAM. If the 4 way handshake failed
  62. - * &NL80211_CMD_DISCONNECT should be indicated instead.
  63. + * %NL80211_CMD_CONNECT or %NL80211_CMD_ROAM. If the 4 way handshake failed
  64. + * %NL80211_CMD_DISCONNECT should be indicated instead.
  65. + *
  66. + * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request
  67. + * and RX notification. This command is used both as a request to transmit
  68. + * a control port frame and as a notification that a control port frame
  69. + * has been received. %NL80211_ATTR_FRAME is used to specify the
  70. + * frame contents. The frame is the raw EAPoL data, without ethernet or
  71. + * 802.11 headers.
  72. + * When used as an event indication %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
  73. + * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT and %NL80211_ATTR_MAC are added
  74. + * indicating the protocol type of the received frame; whether the frame
  75. + * was received unencrypted and the MAC address of the peer respectively.
  76. *
  77. * @NL80211_CMD_RELOAD_REGDB: Request that the regdb firmware file is reloaded.
  78. *
  79. + * @NL80211_CMD_EXTERNAL_AUTH: This interface is exclusively defined for host
  80. + * drivers that do not define separate commands for authentication and
  81. + * association, but rely on user space for the authentication to happen.
  82. + * This interface acts both as the event request (driver to user space)
  83. + * to trigger the authentication and command response (userspace to
  84. + * driver) to indicate the authentication status.
  85. + *
  86. + * User space uses the %NL80211_CMD_CONNECT command to the host driver to
  87. + * trigger a connection. The host driver selects a BSS and further uses
  88. + * this interface to offload only the authentication part to the user
  89. + * space. Authentication frames are passed between the driver and user
  90. + * space through the %NL80211_CMD_FRAME interface. Host driver proceeds
  91. + * further with the association after getting successful authentication
  92. + * status. User space indicates the authentication status through
  93. + * %NL80211_ATTR_STATUS_CODE attribute in %NL80211_CMD_EXTERNAL_AUTH
  94. + * command interface.
  95. + *
  96. + * Host driver reports this status on an authentication failure to the
  97. + * user space through the connect result as the user space would have
  98. + * initiated the connection through the connect request.
  99. + *
  100. + * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notify station's
  101. + * ht opmode or vht opmode changes using any of %NL80211_ATTR_SMPS_MODE,
  102. + * %NL80211_ATTR_CHANNEL_WIDTH,%NL80211_ATTR_NSS attributes with its
  103. + * address(specified in %NL80211_ATTR_MAC).
  104. + *
  105. * @NL80211_CMD_MAX: highest used command number
  106. * @__NL80211_CMD_AFTER_LAST: internal use
  107. */
  108. @@ -1198,6 +1239,12 @@ enum nl80211_commands {
  109. NL80211_CMD_RELOAD_REGDB,
  110. + NL80211_CMD_EXTERNAL_AUTH,
  111. +
  112. + NL80211_CMD_STA_OPMODE_CHANGED,
  113. +
  114. + NL80211_CMD_CONTROL_PORT_FRAME,
  115. +
  116. /* add new commands above here */
  117. /* used to define NL80211_CMD_MAX below */
  118. @@ -1445,6 +1492,15 @@ enum nl80211_commands {
  119. * @NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT: When included along with
  120. * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, indicates that the custom
  121. * ethertype frames used for key negotiation must not be encrypted.
  122. + * @NL80211_ATTR_CONTROL_PORT_OVER_NL80211: A flag indicating whether control
  123. + * port frames (e.g. of type given in %NL80211_ATTR_CONTROL_PORT_ETHERTYPE)
  124. + * will be sent directly to the network interface or sent via the NL80211
  125. + * socket. If this attribute is missing, then legacy behavior of sending
  126. + * control port frames directly to the network interface is used. If the
  127. + * flag is included, then control port frames are sent over NL80211 instead
  128. + * using %CMD_CONTROL_PORT_FRAME. If control port routing over NL80211 is
  129. + * to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER
  130. + * flag.
  131. *
  132. * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver.
  133. * We recommend using nested, driver-specific attributes within this.
  134. @@ -1932,6 +1988,12 @@ enum nl80211_commands {
  135. * multicast group.
  136. * If set during %NL80211_CMD_ASSOCIATE or %NL80211_CMD_CONNECT the
  137. * station will deauthenticate when the socket is closed.
  138. + * If set during %NL80211_CMD_JOIN_IBSS the IBSS will be automatically
  139. + * torn down when the socket is closed.
  140. + * If set during %NL80211_CMD_JOIN_MESH the mesh setup will be
  141. + * automatically torn down when the socket is closed.
  142. + * If set during %NL80211_CMD_START_AP the AP will be automatically
  143. + * disabled when the socket is closed.
  144. *
  145. * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
  146. * the TDLS link initiator.
  147. @@ -2153,6 +2215,35 @@ enum nl80211_commands {
  148. * @NL80211_ATTR_PMKR0_NAME: PMK-R0 Name for offloaded FT.
  149. * @NL80211_ATTR_PORT_AUTHORIZED: (reserved)
  150. *
  151. + * @NL80211_ATTR_EXTERNAL_AUTH_ACTION: Identify the requested external
  152. + * authentication operation (u32 attribute with an
  153. + * &enum nl80211_external_auth_action value). This is used with the
  154. + * %NL80211_CMD_EXTERNAL_AUTH request event.
  155. + * @NL80211_ATTR_EXTERNAL_AUTH_SUPPORT: Flag attribute indicating that the user
  156. + * space supports external authentication. This attribute shall be used
  157. + * only with %NL80211_CMD_CONNECT request. The driver may offload
  158. + * authentication processing to user space if this capability is indicated
  159. + * in NL80211_CMD_CONNECT requests from the user space.
  160. + *
  161. + * @NL80211_ATTR_NSS: Station's New/updated RX_NSS value notified using this
  162. + * u8 attribute. This is used with %NL80211_CMD_STA_OPMODE_CHANGED.
  163. + *
  164. + * @NL80211_ATTR_TXQ_STATS: TXQ statistics (nested attribute, see &enum
  165. + * nl80211_txq_stats)
  166. + * @NL80211_ATTR_TXQ_LIMIT: Total packet limit for the TXQ queues for this phy.
  167. + * The smaller of this and the memory limit is enforced.
  168. + * @NL80211_ATTR_TXQ_MEMORY_LIMIT: Total memory memory limit (in bytes) for the
  169. + * TXQ queues for this phy. The smaller of this and the packet limit is
  170. + * enforced.
  171. + * @NL80211_ATTR_TXQ_QUANTUM: TXQ scheduler quantum (bytes). Number of bytes
  172. + * a flow is assigned on each round of the DRR scheduler.
  173. + * @NL80211_ATTR_HE_CAPABILITY: HE Capability information element (from
  174. + * association request when used with NL80211_CMD_NEW_STATION). Can be set
  175. + * only if %NL80211_STA_FLAG_WME is set.
  176. + *
  177. + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
  178. + * transmit power to stay within regulatory limits. u32, dBi.
  179. + *
  180. * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  181. * @NL80211_ATTR_MAX: highest attribute number currently defined
  182. * @__NL80211_ATTR_AFTER_LAST: internal use
  183. @@ -2579,6 +2670,23 @@ enum nl80211_attrs {
  184. NL80211_ATTR_PMKR0_NAME,
  185. NL80211_ATTR_PORT_AUTHORIZED,
  186. + NL80211_ATTR_EXTERNAL_AUTH_ACTION,
  187. + NL80211_ATTR_EXTERNAL_AUTH_SUPPORT,
  188. +
  189. + NL80211_ATTR_NSS,
  190. + NL80211_ATTR_ACK_SIGNAL,
  191. +
  192. + NL80211_ATTR_CONTROL_PORT_OVER_NL80211,
  193. +
  194. + NL80211_ATTR_TXQ_STATS,
  195. + NL80211_ATTR_TXQ_LIMIT,
  196. + NL80211_ATTR_TXQ_MEMORY_LIMIT,
  197. + NL80211_ATTR_TXQ_QUANTUM,
  198. +
  199. + NL80211_ATTR_HE_CAPABILITY,
  200. +
  201. + NL80211_ATTR_WIPHY_ANTENNA_GAIN,
  202. +
  203. /* add attributes here, update the policy in nl80211.c */
  204. __NL80211_ATTR_AFTER_LAST,
  205. @@ -2618,6 +2726,8 @@ enum nl80211_attrs {
  206. #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS
  207. #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
  208. +#define NL80211_WIPHY_NAME_MAXLEN 64
  209. +
  210. #define NL80211_MAX_SUPP_RATES 32
  211. #define NL80211_MAX_SUPP_HT_RATES 77
  212. #define NL80211_MAX_SUPP_REG_RULES 64
  213. @@ -2626,7 +2736,8 @@ enum nl80211_attrs {
  214. #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24
  215. #define NL80211_HT_CAPABILITY_LEN 26
  216. #define NL80211_VHT_CAPABILITY_LEN 12
  217. -
  218. +#define NL80211_HE_MIN_CAPABILITY_LEN 16
  219. +#define NL80211_HE_MAX_CAPABILITY_LEN 51
  220. #define NL80211_MAX_NR_CIPHER_SUITES 5
  221. #define NL80211_MAX_NR_AKM_SUITES 2
  222. @@ -2754,6 +2865,38 @@ struct nl80211_sta_flag_update {
  223. } __attribute__((packed));
  224. /**
  225. + * enum nl80211_he_gi - HE guard interval
  226. + * @NL80211_RATE_INFO_HE_GI_0_8: 0.8 usec
  227. + * @NL80211_RATE_INFO_HE_GI_1_6: 1.6 usec
  228. + * @NL80211_RATE_INFO_HE_GI_3_2: 3.2 usec
  229. + */
  230. +enum nl80211_he_gi {
  231. + NL80211_RATE_INFO_HE_GI_0_8,
  232. + NL80211_RATE_INFO_HE_GI_1_6,
  233. + NL80211_RATE_INFO_HE_GI_3_2,
  234. +};
  235. +
  236. +/**
  237. + * enum nl80211_he_ru_alloc - HE RU allocation values
  238. + * @NL80211_RATE_INFO_HE_RU_ALLOC_26: 26-tone RU allocation
  239. + * @NL80211_RATE_INFO_HE_RU_ALLOC_52: 52-tone RU allocation
  240. + * @NL80211_RATE_INFO_HE_RU_ALLOC_106: 106-tone RU allocation
  241. + * @NL80211_RATE_INFO_HE_RU_ALLOC_242: 242-tone RU allocation
  242. + * @NL80211_RATE_INFO_HE_RU_ALLOC_484: 484-tone RU allocation
  243. + * @NL80211_RATE_INFO_HE_RU_ALLOC_996: 996-tone RU allocation
  244. + * @NL80211_RATE_INFO_HE_RU_ALLOC_2x996: 2x996-tone RU allocation
  245. + */
  246. +enum nl80211_he_ru_alloc {
  247. + NL80211_RATE_INFO_HE_RU_ALLOC_26,
  248. + NL80211_RATE_INFO_HE_RU_ALLOC_52,
  249. + NL80211_RATE_INFO_HE_RU_ALLOC_106,
  250. + NL80211_RATE_INFO_HE_RU_ALLOC_242,
  251. + NL80211_RATE_INFO_HE_RU_ALLOC_484,
  252. + NL80211_RATE_INFO_HE_RU_ALLOC_996,
  253. + NL80211_RATE_INFO_HE_RU_ALLOC_2x996,
  254. +};
  255. +
  256. +/**
  257. * enum nl80211_rate_info - bitrate information
  258. *
  259. * These attribute types are used with %NL80211_STA_INFO_TXRATE
  260. @@ -2785,6 +2928,13 @@ struct nl80211_sta_flag_update {
  261. * @NL80211_RATE_INFO_5_MHZ_WIDTH: 5 MHz width - note that this is
  262. * a legacy rate and will be reported as the actual bitrate, i.e.
  263. * a quarter of the base (20 MHz) rate
  264. + * @NL80211_RATE_INFO_HE_MCS: HE MCS index (u8, 0-11)
  265. + * @NL80211_RATE_INFO_HE_NSS: HE NSS value (u8, 1-8)
  266. + * @NL80211_RATE_INFO_HE_GI: HE guard interval identifier
  267. + * (u8, see &enum nl80211_he_gi)
  268. + * @NL80211_RATE_INFO_HE_DCM: HE DCM value (u8, 0/1)
  269. + * @NL80211_RATE_INFO_RU_ALLOC: HE RU allocation, if not present then
  270. + * non-OFDMA was used (u8, see &enum nl80211_he_ru_alloc)
  271. * @__NL80211_RATE_INFO_AFTER_LAST: internal use
  272. */
  273. enum nl80211_rate_info {
  274. @@ -2801,6 +2951,11 @@ enum nl80211_rate_info {
  275. NL80211_RATE_INFO_160_MHZ_WIDTH,
  276. NL80211_RATE_INFO_10_MHZ_WIDTH,
  277. NL80211_RATE_INFO_5_MHZ_WIDTH,
  278. + NL80211_RATE_INFO_HE_MCS,
  279. + NL80211_RATE_INFO_HE_NSS,
  280. + NL80211_RATE_INFO_HE_GI,
  281. + NL80211_RATE_INFO_HE_DCM,
  282. + NL80211_RATE_INFO_HE_RU_ALLOC,
  283. /* keep last */
  284. __NL80211_RATE_INFO_AFTER_LAST,
  285. @@ -2899,6 +3054,9 @@ enum nl80211_sta_bss_param {
  286. * @NL80211_STA_INFO_RX_DURATION: aggregate PPDU duration for all frames
  287. * received from the station (u64, usec)
  288. * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment
  289. + * @NL80211_STA_INFO_ACK_SIGNAL: signal strength of the last ACK frame(u8, dBm)
  290. + * @NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG: avg signal strength of (data)
  291. + * ACK frame (s8, dBm)
  292. * @__NL80211_STA_INFO_AFTER_LAST: internal
  293. * @NL80211_STA_INFO_MAX: highest possible station info attribute
  294. */
  295. @@ -2937,6 +3095,8 @@ enum nl80211_sta_info {
  296. NL80211_STA_INFO_TID_STATS,
  297. NL80211_STA_INFO_RX_DURATION,
  298. NL80211_STA_INFO_PAD,
  299. + NL80211_STA_INFO_ACK_SIGNAL,
  300. + NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG,
  301. /* keep last */
  302. __NL80211_STA_INFO_AFTER_LAST,
  303. @@ -2954,6 +3114,7 @@ enum nl80211_sta_info {
  304. * @NL80211_TID_STATS_TX_MSDU_FAILED: number of failed transmitted
  305. * MSDUs (u64)
  306. * @NL80211_TID_STATS_PAD: attribute used for padding for 64-bit alignment
  307. + * @NL80211_TID_STATS_TXQ_STATS: TXQ stats (nested attribute)
  308. * @NUM_NL80211_TID_STATS: number of attributes here
  309. * @NL80211_TID_STATS_MAX: highest numbered attribute here
  310. */
  311. @@ -2964,6 +3125,7 @@ enum nl80211_tid_stats {
  312. NL80211_TID_STATS_TX_MSDU_RETRIES,
  313. NL80211_TID_STATS_TX_MSDU_FAILED,
  314. NL80211_TID_STATS_PAD,
  315. + NL80211_TID_STATS_TXQ_STATS,
  316. /* keep last */
  317. NUM_NL80211_TID_STATS,
  318. @@ -2971,6 +3133,44 @@ enum nl80211_tid_stats {
  319. };
  320. /**
  321. + * enum nl80211_txq_stats - per TXQ statistics attributes
  322. + * @__NL80211_TXQ_STATS_INVALID: attribute number 0 is reserved
  323. + * @NUM_NL80211_TXQ_STATS: number of attributes here
  324. + * @NL80211_TXQ_STATS_BACKLOG_BYTES: number of bytes currently backlogged
  325. + * @NL80211_TXQ_STATS_BACKLOG_PACKETS: number of packets currently
  326. + * backlogged
  327. + * @NL80211_TXQ_STATS_FLOWS: total number of new flows seen
  328. + * @NL80211_TXQ_STATS_DROPS: total number of packet drops
  329. + * @NL80211_TXQ_STATS_ECN_MARKS: total number of packet ECN marks
  330. + * @NL80211_TXQ_STATS_OVERLIMIT: number of drops due to queue space overflow
  331. + * @NL80211_TXQ_STATS_OVERMEMORY: number of drops due to memory limit overflow
  332. + * (only for per-phy stats)
  333. + * @NL80211_TXQ_STATS_COLLISIONS: number of hash collisions
  334. + * @NL80211_TXQ_STATS_TX_BYTES: total number of bytes dequeued from TXQ
  335. + * @NL80211_TXQ_STATS_TX_PACKETS: total number of packets dequeued from TXQ
  336. + * @NL80211_TXQ_STATS_MAX_FLOWS: number of flow buckets for PHY
  337. + * @NL80211_TXQ_STATS_MAX: highest numbered attribute here
  338. + */
  339. +enum nl80211_txq_stats {
  340. + __NL80211_TXQ_STATS_INVALID,
  341. + NL80211_TXQ_STATS_BACKLOG_BYTES,
  342. + NL80211_TXQ_STATS_BACKLOG_PACKETS,
  343. + NL80211_TXQ_STATS_FLOWS,
  344. + NL80211_TXQ_STATS_DROPS,
  345. + NL80211_TXQ_STATS_ECN_MARKS,
  346. + NL80211_TXQ_STATS_OVERLIMIT,
  347. + NL80211_TXQ_STATS_OVERMEMORY,
  348. + NL80211_TXQ_STATS_COLLISIONS,
  349. + NL80211_TXQ_STATS_TX_BYTES,
  350. + NL80211_TXQ_STATS_TX_PACKETS,
  351. + NL80211_TXQ_STATS_MAX_FLOWS,
  352. +
  353. + /* keep last */
  354. + NUM_NL80211_TXQ_STATS,
  355. + NL80211_TXQ_STATS_MAX = NUM_NL80211_TXQ_STATS - 1
  356. +};
  357. +
  358. +/**
  359. * enum nl80211_mpath_flags - nl80211 mesh path flags
  360. *
  361. * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active
  362. @@ -3022,6 +3222,38 @@ enum nl80211_mpath_info {
  363. };
  364. /**
  365. + * enum nl80211_band_iftype_attr - Interface type data attributes
  366. + *
  367. + * @__NL80211_BAND_IFTYPE_ATTR_INVALID: attribute number 0 is reserved
  368. + * @NL80211_BAND_IFTYPE_ATTR_IFTYPES: nested attribute containing a flag attribute
  369. + * for each interface type that supports the band data
  370. + * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC: HE MAC capabilities as in HE
  371. + * capabilities IE
  372. + * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY: HE PHY capabilities as in HE
  373. + * capabilities IE
  374. + * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET: HE supported NSS/MCS as in HE
  375. + * capabilities IE
  376. + * @NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE: HE PPE thresholds information as
  377. + * defined in HE capabilities IE
  378. + * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band HE capability attribute currently
  379. + * defined
  380. + * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
  381. + */
  382. +enum nl80211_band_iftype_attr {
  383. + __NL80211_BAND_IFTYPE_ATTR_INVALID,
  384. +
  385. + NL80211_BAND_IFTYPE_ATTR_IFTYPES,
  386. + NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC,
  387. + NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY,
  388. + NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,
  389. + NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
  390. +
  391. + /* keep last */
  392. + __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
  393. + NL80211_BAND_IFTYPE_ATTR_MAX = __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST - 1
  394. +};
  395. +
  396. +/**
  397. * enum nl80211_band_attr - band attributes
  398. * @__NL80211_BAND_ATTR_INVALID: attribute number 0 is reserved
  399. * @NL80211_BAND_ATTR_FREQS: supported frequencies in this band,
  400. @@ -3036,6 +3268,8 @@ enum nl80211_mpath_info {
  401. * @NL80211_BAND_ATTR_VHT_MCS_SET: 32-byte attribute containing the MCS set as
  402. * defined in 802.11ac
  403. * @NL80211_BAND_ATTR_VHT_CAPA: VHT capabilities, as in the HT information IE
  404. + * @NL80211_BAND_ATTR_IFTYPE_DATA: nested array attribute, with each entry using
  405. + * attributes from &enum nl80211_band_iftype_attr
  406. * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined
  407. * @__NL80211_BAND_ATTR_AFTER_LAST: internal use
  408. */
  409. @@ -3051,6 +3285,7 @@ enum nl80211_band_attr {
  410. NL80211_BAND_ATTR_VHT_MCS_SET,
  411. NL80211_BAND_ATTR_VHT_CAPA,
  412. + NL80211_BAND_ATTR_IFTYPE_DATA,
  413. /* keep last */
  414. __NL80211_BAND_ATTR_AFTER_LAST,
  415. @@ -3060,6 +3295,29 @@ enum nl80211_band_attr {
  416. #define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
  417. /**
  418. + * enum nl80211_wmm_rule - regulatory wmm rule
  419. + *
  420. + * @__NL80211_WMMR_INVALID: attribute number 0 is reserved
  421. + * @NL80211_WMMR_CW_MIN: Minimum contention window slot.
  422. + * @NL80211_WMMR_CW_MAX: Maximum contention window slot.
  423. + * @NL80211_WMMR_AIFSN: Arbitration Inter Frame Space.
  424. + * @NL80211_WMMR_TXOP: Maximum allowed tx operation time.
  425. + * @nl80211_WMMR_MAX: highest possible wmm rule.
  426. + * @__NL80211_WMMR_LAST: Internal use.
  427. + */
  428. +enum nl80211_wmm_rule {
  429. + __NL80211_WMMR_INVALID,
  430. + NL80211_WMMR_CW_MIN,
  431. + NL80211_WMMR_CW_MAX,
  432. + NL80211_WMMR_AIFSN,
  433. + NL80211_WMMR_TXOP,
  434. +
  435. + /* keep last */
  436. + __NL80211_WMMR_LAST,
  437. + NL80211_WMMR_MAX = __NL80211_WMMR_LAST - 1
  438. +};
  439. +
  440. +/**
  441. * enum nl80211_frequency_attr - frequency attributes
  442. * @__NL80211_FREQUENCY_ATTR_INVALID: attribute number 0 is reserved
  443. * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz
  444. @@ -3108,6 +3366,9 @@ enum nl80211_band_attr {
  445. * on this channel in current regulatory domain.
  446. * @NL80211_FREQUENCY_ATTR_NO_10MHZ: 10 MHz operation is not allowed
  447. * on this channel in current regulatory domain.
  448. + * @NL80211_FREQUENCY_ATTR_WMM: this channel has wmm limitations.
  449. + * This is a nested attribute that contains the wmm limitation per AC.
  450. + * (see &enum nl80211_wmm_rule)
  451. * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
  452. * currently defined
  453. * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
  454. @@ -3136,6 +3397,7 @@ enum nl80211_frequency_attr {
  455. NL80211_FREQUENCY_ATTR_IR_CONCURRENT,
  456. NL80211_FREQUENCY_ATTR_NO_20MHZ,
  457. NL80211_FREQUENCY_ATTR_NO_10MHZ,
  458. + NL80211_FREQUENCY_ATTR_WMM,
  459. /* keep last */
  460. __NL80211_FREQUENCY_ATTR_AFTER_LAST,
  461. @@ -3319,7 +3581,7 @@ enum nl80211_sched_scan_match_attr {
  462. * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated
  463. * base on contiguous rules and wider channels will be allowed to cross
  464. * multiple contiguous/overlapping frequency ranges.
  465. - * @NL80211_RRF_IR_CONCURRENT: See &NL80211_FREQUENCY_ATTR_IR_CONCURRENT
  466. + * @NL80211_RRF_IR_CONCURRENT: See %NL80211_FREQUENCY_ATTR_IR_CONCURRENT
  467. * @NL80211_RRF_NO_HT40MINUS: channels can't be used in HT40- operation
  468. * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation
  469. * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed
  470. @@ -4945,6 +5207,27 @@ enum nl80211_feature_flags {
  471. * probe request tx deferral and suppression
  472. * @NL80211_EXT_FEATURE_MFP_OPTIONAL: Driver supports the %NL80211_MFP_OPTIONAL
  473. * value in %NL80211_ATTR_USE_MFP.
  474. + * @NL80211_EXT_FEATURE_LOW_SPAN_SCAN: Driver supports low span scan.
  475. + * @NL80211_EXT_FEATURE_LOW_POWER_SCAN: Driver supports low power scan.
  476. + * @NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN: Driver supports high accuracy scan.
  477. + * @NL80211_EXT_FEATURE_DFS_OFFLOAD: HW/driver will offload DFS actions.
  478. + * Device or driver will do all DFS-related actions by itself,
  479. + * informing user-space about CAC progress, radar detection event,
  480. + * channel change triggered by radar detection event.
  481. + * No need to start CAC from user-space, no need to react to
  482. + * "radar detected" event.
  483. + * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211: Driver supports sending and
  484. + * receiving control port frames over nl80211 instead of the netdevice.
  485. + * @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: This Driver support data ack
  486. + * rssi if firmware support, this flag is to intimate about ack rssi
  487. + * support to nl80211.
  488. + * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate
  489. + * TXQs.
  490. + * @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the
  491. + * SN in probe request frames if requested by %NL80211_SCAN_FLAG_RANDOM_SN.
  492. + * @NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT: Driver/device can omit all data
  493. + * except for supported rates from the probe request content if requested
  494. + * by the %NL80211_SCAN_FLAG_MIN_PREQ_CONTENT flag.
  495. *
  496. * @NUM_NL80211_EXT_FEATURES: number of extended features.
  497. * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
  498. @@ -4972,6 +5255,15 @@ enum nl80211_ext_feature_index {
  499. NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE,
  500. NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION,
  501. NL80211_EXT_FEATURE_MFP_OPTIONAL,
  502. + NL80211_EXT_FEATURE_LOW_SPAN_SCAN,
  503. + NL80211_EXT_FEATURE_LOW_POWER_SCAN,
  504. + NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN,
  505. + NL80211_EXT_FEATURE_DFS_OFFLOAD,
  506. + NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211,
  507. + NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT,
  508. + NL80211_EXT_FEATURE_TXQS,
  509. + NL80211_EXT_FEATURE_SCAN_RANDOM_SN,
  510. + NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT,
  511. /* add new features before the definition below */
  512. NUM_NL80211_EXT_FEATURES,
  513. @@ -5032,6 +5324,10 @@ enum nl80211_timeout_reason {
  514. * of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN
  515. * requests.
  516. *
  517. + * NL80211_SCAN_FLAG_LOW_SPAN, NL80211_SCAN_FLAG_LOW_POWER, and
  518. + * NL80211_SCAN_FLAG_HIGH_ACCURACY flags are exclusive of each other, i.e., only
  519. + * one of them can be used in the request.
  520. + *
  521. * @NL80211_SCAN_FLAG_LOW_PRIORITY: scan request has low priority
  522. * @NL80211_SCAN_FLAG_FLUSH: flush cache before scanning
  523. * @NL80211_SCAN_FLAG_AP: force a scan even if the interface is configured
  524. @@ -5059,7 +5355,26 @@ enum nl80211_timeout_reason {
  525. * and suppression (if it has received a broadcast Probe Response frame,
  526. * Beacon frame or FILS Discovery frame from an AP that the STA considers
  527. * a suitable candidate for (re-)association - suitable in terms of
  528. - * SSID and/or RSSI
  529. + * SSID and/or RSSI.
  530. + * @NL80211_SCAN_FLAG_LOW_SPAN: Span corresponds to the total time taken to
  531. + * accomplish the scan. Thus, this flag intends the driver to perform the
  532. + * scan request with lesser span/duration. It is specific to the driver
  533. + * implementations on how this is accomplished. Scan accuracy may get
  534. + * impacted with this flag.
  535. + * @NL80211_SCAN_FLAG_LOW_POWER: This flag intends the scan attempts to consume
  536. + * optimal possible power. Drivers can resort to their specific means to
  537. + * optimize the power. Scan accuracy may get impacted with this flag.
  538. + * @NL80211_SCAN_FLAG_HIGH_ACCURACY: Accuracy here intends to the extent of scan
  539. + * results obtained. Thus HIGH_ACCURACY scan flag aims to get maximum
  540. + * possible scan results. This flag hints the driver to use the best
  541. + * possible scan configuration to improve the accuracy in scanning.
  542. + * Latency and power use may get impacted with this flag.
  543. + * @NL80211_SCAN_FLAG_RANDOM_SN: randomize the sequence number in probe
  544. + * request frames from this scan to avoid correlation/tracking being
  545. + * possible.
  546. + * @NL80211_SCAN_FLAG_MIN_PREQ_CONTENT: minimize probe request content to
  547. + * only have supported rates and no additional capabilities (unless
  548. + * added by userspace explicitly.)
  549. */
  550. enum nl80211_scan_flags {
  551. NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0,
  552. @@ -5070,6 +5385,11 @@ enum nl80211_scan_flags {
  553. NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP = 1<<5,
  554. NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE = 1<<6,
  555. NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 1<<7,
  556. + NL80211_SCAN_FLAG_LOW_SPAN = 1<<8,
  557. + NL80211_SCAN_FLAG_LOW_POWER = 1<<9,
  558. + NL80211_SCAN_FLAG_HIGH_ACCURACY = 1<<10,
  559. + NL80211_SCAN_FLAG_RANDOM_SN = 1<<11,
  560. + NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 1<<12,
  561. };
  562. /**
  563. @@ -5127,6 +5447,8 @@ enum nl80211_smps_mode {
  564. * non-operating channel is expired and no longer valid. New CAC must
  565. * be done on this channel before starting the operation. This is not
  566. * applicable for ETSI dfs domain where pre-CAC is valid for ever.
  567. + * @NL80211_RADAR_CAC_STARTED: Channel Availability Check has been started,
  568. + * should be generated by HW if NL80211_EXT_FEATURE_DFS_OFFLOAD is enabled.
  569. */
  570. enum nl80211_radar_event {
  571. NL80211_RADAR_DETECTED,
  572. @@ -5134,6 +5456,7 @@ enum nl80211_radar_event {
  573. NL80211_RADAR_CAC_ABORTED,
  574. NL80211_RADAR_NOP_FINISHED,
  575. NL80211_RADAR_PRE_CAC_EXPIRED,
  576. + NL80211_RADAR_CAC_STARTED,
  577. };
  578. /**
  579. @@ -5425,11 +5748,11 @@ enum nl80211_nan_func_attributes {
  580. * @NL80211_NAN_SRF_INCLUDE: present if the include bit of the SRF set.
  581. * This is a flag.
  582. * @NL80211_NAN_SRF_BF: Bloom Filter. Present if and only if
  583. - * &NL80211_NAN_SRF_MAC_ADDRS isn't present. This attribute is binary.
  584. + * %NL80211_NAN_SRF_MAC_ADDRS isn't present. This attribute is binary.
  585. * @NL80211_NAN_SRF_BF_IDX: index of the Bloom Filter. Mandatory if
  586. - * &NL80211_NAN_SRF_BF is present. This is a u8.
  587. + * %NL80211_NAN_SRF_BF is present. This is a u8.
  588. * @NL80211_NAN_SRF_MAC_ADDRS: list of MAC addresses for the SRF. Present if
  589. - * and only if &NL80211_NAN_SRF_BF isn't present. This is a nested
  590. + * and only if %NL80211_NAN_SRF_BF isn't present. This is a nested
  591. * attribute. Each nested attribute is a MAC address.
  592. * @NUM_NL80211_NAN_SRF_ATTR: internal
  593. * @NL80211_NAN_SRF_ATTR_MAX: highest NAN SRF attribute
  594. @@ -5469,4 +5792,15 @@ enum nl80211_nan_match_attributes {
  595. NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 1
  596. };
  597. +/**
  598. + * nl80211_external_auth_action - Action to perform with external
  599. + * authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION.
  600. + * @NL80211_EXTERNAL_AUTH_START: Start the authentication.
  601. + * @NL80211_EXTERNAL_AUTH_ABORT: Abort the ongoing authentication.
  602. + */
  603. +enum nl80211_external_auth_action {
  604. + NL80211_EXTERNAL_AUTH_START,
  605. + NL80211_EXTERNAL_AUTH_ABORT,
  606. +};
  607. +
  608. #endif /* __LINUX_NL80211_H */