001-nl80211_h_sync.patch 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. --- a/nl80211.h
  2. +++ b/nl80211.h
  3. @@ -10,6 +10,7 @@
  4. * Copyright 2008, 2009 Luis R. Rodriguez <lrodriguez@atheros.com>
  5. * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
  6. * Copyright 2008 Colin McCabe <colin@cozybit.com>
  7. + * Copyright 2015 Intel Deutschland GmbH
  8. *
  9. * Permission to use, copy, modify, and/or distribute this software for any
  10. * purpose with or without fee is hereby granted, provided that the above
  11. @@ -321,14 +322,24 @@
  12. * @NL80211_CMD_GET_SCAN: get scan results
  13. * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
  14. * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
  15. - * probe requests at CCK rate or not.
  16. + * probe requests at CCK rate or not. %NL80211_ATTR_MAC can be used to
  17. + * specify a BSSID to scan for; if not included, the wildcard BSSID will
  18. + * be used.
  19. * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
  20. * NL80211_CMD_GET_SCAN and on the "scan" multicast group)
  21. * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
  22. * partial scan results may be available
  23. *
  24. * @NL80211_CMD_START_SCHED_SCAN: start a scheduled scan at certain
  25. - * intervals, as specified by %NL80211_ATTR_SCHED_SCAN_INTERVAL.
  26. + * intervals and certain number of cycles, as specified by
  27. + * %NL80211_ATTR_SCHED_SCAN_PLANS. If %NL80211_ATTR_SCHED_SCAN_PLANS is
  28. + * not specified and only %NL80211_ATTR_SCHED_SCAN_INTERVAL is specified,
  29. + * scheduled scan will run in an infinite loop with the specified interval.
  30. + * These attributes are mutually exculsive,
  31. + * i.e. NL80211_ATTR_SCHED_SCAN_INTERVAL must not be passed if
  32. + * NL80211_ATTR_SCHED_SCAN_PLANS is defined.
  33. + * If for some reason scheduled scan is aborted by the driver, all scan
  34. + * plans are canceled (including scan plans that did not start yet).
  35. * Like with normal scans, if SSIDs (%NL80211_ATTR_SCAN_SSIDS)
  36. * are passed, they are used in the probe requests. For
  37. * broadcast, a broadcast SSID must be passed (ie. an empty
  38. @@ -418,7 +429,11 @@
  39. * @NL80211_CMD_ASSOCIATE: association request and notification; like
  40. * NL80211_CMD_AUTHENTICATE but for Association and Reassociation
  41. * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request,
  42. - * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives).
  43. + * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives). The
  44. + * %NL80211_ATTR_PREV_BSSID attribute is used to specify whether the
  45. + * request is for the initial association to an ESS (that attribute not
  46. + * included) or for reassociation within the ESS (that attribute is
  47. + * included).
  48. * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like
  49. * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to
  50. * MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication
  51. @@ -468,6 +483,9 @@
  52. * set of BSSID,frequency parameters is used (i.e., either the enforcing
  53. * %NL80211_ATTR_MAC,%NL80211_ATTR_WIPHY_FREQ or the less strict
  54. * %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT).
  55. + * %NL80211_ATTR_PREV_BSSID can be used to request a reassociation within
  56. + * the ESS in case the device is already associated and an association with
  57. + * a different BSS is desired.
  58. * Background scan period can optionally be
  59. * specified in %NL80211_ATTR_BG_SCAN_PERIOD,
  60. * if not specified default background scan configuration
  61. @@ -811,6 +829,10 @@
  62. * as an event to indicate changes for devices with wiphy-specific regdom
  63. * management.
  64. *
  65. + * @NL80211_CMD_ABORT_SCAN: Stop an ongoing scan. Returns -ENOENT if a scan is
  66. + * not running. The driver indicates the status of the scan through
  67. + * cfg80211_scan_done().
  68. + *
  69. * @NL80211_CMD_MAX: highest used command number
  70. * @__NL80211_CMD_AFTER_LAST: internal use
  71. */
  72. @@ -997,6 +1019,8 @@ enum nl80211_commands {
  73. NL80211_CMD_WIPHY_REG_CHANGE,
  74. + NL80211_CMD_ABORT_SCAN,
  75. +
  76. /* add new commands above here */
  77. /* used to define NL80211_CMD_MAX below */
  78. @@ -1270,8 +1294,11 @@ enum nl80211_commands {
  79. * @NL80211_ATTR_RESP_IE: (Re)association response information elements as
  80. * sent by peer, for ROAM and successful CONNECT events.
  81. *
  82. - * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used by in ASSOCIATE
  83. - * commands to specify using a reassociate frame
  84. + * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used in ASSOCIATE and CONNECT
  85. + * commands to specify a request to reassociate within an ESS, i.e., to use
  86. + * Reassociate Request frame (with the value of this attribute in the
  87. + * Current AP address field) instead of Association Request frame which is
  88. + * used for the initial association to an ESS.
  89. *
  90. * @NL80211_ATTR_KEY: key information in a nested attribute with
  91. * %NL80211_KEY_* sub-attributes
  92. @@ -1712,6 +1739,8 @@ enum nl80211_commands {
  93. * underlying device supports these minimal RRM features:
  94. * %NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES,
  95. * %NL80211_FEATURE_QUIET,
  96. + * Or, if global RRM is supported, see:
  97. + * %NL80211_EXT_FEATURE_RRM
  98. * If this flag is used, driver must add the Power Capabilities IE to the
  99. * association request. In addition, it must also set the RRM capability
  100. * flag in the association request's Capability Info field.
  101. @@ -1755,12 +1784,44 @@ enum nl80211_commands {
  102. * over all channels.
  103. *
  104. * @NL80211_ATTR_SCHED_SCAN_DELAY: delay before the first cycle of a
  105. - * scheduled scan (or a WoWLAN net-detect scan) is started, u32
  106. - * in seconds.
  107. + * scheduled scan is started. Or the delay before a WoWLAN
  108. + * net-detect scan is started, counting from the moment the
  109. + * system is suspended. This value is a u32, in seconds.
  110. * @NL80211_ATTR_REG_INDOOR: flag attribute, if set indicates that the device
  111. * is operating in an indoor environment.
  112. *
  113. + * @NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS: maximum number of scan plans for
  114. + * scheduled scan supported by the device (u32), a wiphy attribute.
  115. + * @NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL: maximum interval (in seconds) for
  116. + * a scan plan (u32), a wiphy attribute.
  117. + * @NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS: maximum number of iterations in
  118. + * a scan plan (u32), a wiphy attribute.
  119. + * @NL80211_ATTR_SCHED_SCAN_PLANS: a list of scan plans for scheduled scan.
  120. + * Each scan plan defines the number of scan iterations and the interval
  121. + * between scans. The last scan plan will always run infinitely,
  122. + * thus it must not specify the number of iterations, only the interval
  123. + * between scans. The scan plans are executed sequentially.
  124. + * Each scan plan is a nested attribute of &enum nl80211_sched_scan_plan.
  125. + * @NL80211_ATTR_PBSS: flag attribute. If set it means operate
  126. + * in a PBSS. Specified in %NL80211_CMD_CONNECT to request
  127. + * connecting to a PCP, and in %NL80211_CMD_START_AP to start
  128. + * a PCP instead of AP. Relevant for DMG networks only.
  129. + * @NL80211_ATTR_BSS_SELECT: nested attribute for driver supporting the
  130. + * BSS selection feature. When used with %NL80211_CMD_GET_WIPHY it contains
  131. + * attributes according &enum nl80211_bss_select_attr to indicate what
  132. + * BSS selection behaviours are supported. When used with %NL80211_CMD_CONNECT
  133. + * it contains the behaviour-specific attribute containing the parameters for
  134. + * BSS selection to be done by driver and/or firmware.
  135. + *
  136. + * @NL80211_ATTR_STA_SUPPORT_P2P_PS: whether P2P PS mechanism supported
  137. + * or not. u8, one of the values of &enum nl80211_sta_p2p_ps_status
  138. + *
  139. + * @NL80211_ATTR_PAD: attribute used for padding for 64-bit alignment
  140. + *
  141. + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
  142. + * transmit power to stay within regulatory limits. u32, dBi.
  143. + *
  144. * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  145. * @NL80211_ATTR_MAX: highest attribute number currently defined
  146. * @__NL80211_ATTR_AFTER_LAST: internal use
  147. @@ -2130,6 +2191,21 @@ enum nl80211_attrs {
  148. NL80211_ATTR_REG_INDOOR,
  149. + NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS,
  150. + NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL,
  151. + NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS,
  152. + NL80211_ATTR_SCHED_SCAN_PLANS,
  153. +
  154. + NL80211_ATTR_PBSS,
  155. +
  156. + NL80211_ATTR_BSS_SELECT,
  157. +
  158. + NL80211_ATTR_STA_SUPPORT_P2P_PS,
  159. +
  160. + NL80211_ATTR_PAD,
  161. +
  162. + NL80211_ATTR_WIPHY_ANTENNA_GAIN,
  163. +
  164. /* add attributes here, update the policy in nl80211.c */
  165. __NL80211_ATTR_AFTER_LAST,
  166. @@ -2273,6 +2349,20 @@ enum nl80211_sta_flags {
  167. NL80211_STA_FLAG_MAX = __NL80211_STA_FLAG_AFTER_LAST - 1
  168. };
  169. +/**
  170. + * enum nl80211_sta_p2p_ps_status - station support of P2P PS
  171. + *
  172. + * @NL80211_P2P_PS_UNSUPPORTED: station doesn't support P2P PS mechanism
  173. + * @@NL80211_P2P_PS_SUPPORTED: station supports P2P PS mechanism
  174. + * @NUM_NL80211_P2P_PS_STATUS: number of values
  175. + */
  176. +enum nl80211_sta_p2p_ps_status {
  177. + NL80211_P2P_PS_UNSUPPORTED = 0,
  178. + NL80211_P2P_PS_SUPPORTED,
  179. +
  180. + NUM_NL80211_P2P_PS_STATUS,
  181. +};
  182. +
  183. #define NL80211_STA_FLAG_MAX_OLD_API NL80211_STA_FLAG_TDLS_PEER
  184. /**
  185. @@ -2430,6 +2520,9 @@ enum nl80211_sta_bss_param {
  186. * TID+1 and the special TID 16 (i.e. value 17) is used for non-QoS frames;
  187. * each one of those is again nested with &enum nl80211_tid_stats
  188. * attributes carrying the actual values.
  189. + * @NL80211_STA_INFO_RX_DURATION: aggregate PPDU duration for all frames
  190. + * received from the station (u64, usec)
  191. + * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment
  192. * @__NL80211_STA_INFO_AFTER_LAST: internal
  193. * @NL80211_STA_INFO_MAX: highest possible station info attribute
  194. */
  195. @@ -2466,6 +2559,8 @@ enum nl80211_sta_info {
  196. NL80211_STA_INFO_BEACON_RX,
  197. NL80211_STA_INFO_BEACON_SIGNAL_AVG,
  198. NL80211_STA_INFO_TID_STATS,
  199. + NL80211_STA_INFO_RX_DURATION,
  200. + NL80211_STA_INFO_PAD,
  201. /* keep last */
  202. __NL80211_STA_INFO_AFTER_LAST,
  203. @@ -2482,6 +2577,7 @@ enum nl80211_sta_info {
  204. * transmitted MSDUs (not counting the first attempt; u64)
  205. * @NL80211_TID_STATS_TX_MSDU_FAILED: number of failed transmitted
  206. * MSDUs (u64)
  207. + * @NL80211_TID_STATS_PAD: attribute used for padding for 64-bit alignment
  208. * @NUM_NL80211_TID_STATS: number of attributes here
  209. * @NL80211_TID_STATS_MAX: highest numbered attribute here
  210. */
  211. @@ -2491,6 +2587,7 @@ enum nl80211_tid_stats {
  212. NL80211_TID_STATS_TX_MSDU,
  213. NL80211_TID_STATS_TX_MSDU_RETRIES,
  214. NL80211_TID_STATS_TX_MSDU_FAILED,
  215. + NL80211_TID_STATS_PAD,
  216. /* keep last */
  217. NUM_NL80211_TID_STATS,
  218. @@ -2927,6 +3024,7 @@ enum nl80211_user_reg_hint_type {
  219. * transmitting data (on channel or globally)
  220. * @NL80211_SURVEY_INFO_TIME_SCAN: time the radio spent for scan
  221. * (on this channel or globally)
  222. + * @NL80211_SURVEY_INFO_PAD: attribute used for padding for 64-bit alignment
  223. * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
  224. * currently defined
  225. * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
  226. @@ -2942,6 +3040,7 @@ enum nl80211_survey_info {
  227. NL80211_SURVEY_INFO_TIME_RX,
  228. NL80211_SURVEY_INFO_TIME_TX,
  229. NL80211_SURVEY_INFO_TIME_SCAN,
  230. + NL80211_SURVEY_INFO_PAD,
  231. /* keep last */
  232. __NL80211_SURVEY_INFO_AFTER_LAST,
  233. @@ -3364,6 +3463,10 @@ enum nl80211_bss_scan_width {
  234. * (not present if no beacon frame has been received yet)
  235. * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and
  236. * @NL80211_BSS_TSF is known to be from a probe response (flag attribute)
  237. + * @NL80211_BSS_LAST_SEEN_BOOTTIME: CLOCK_BOOTTIME timestamp when this entry
  238. + * was last updated by a received frame. The value is expected to be
  239. + * accurate to about 10ms. (u64, nanoseconds)
  240. + * @NL80211_BSS_PAD: attribute used for padding for 64-bit alignment
  241. * @__NL80211_BSS_AFTER_LAST: internal
  242. * @NL80211_BSS_MAX: highest BSS attribute
  243. */
  244. @@ -3383,6 +3486,8 @@ enum nl80211_bss {
  245. NL80211_BSS_CHAN_WIDTH,
  246. NL80211_BSS_BEACON_TSF,
  247. NL80211_BSS_PRESP_DATA,
  248. + NL80211_BSS_LAST_SEEN_BOOTTIME,
  249. + NL80211_BSS_PAD,
  250. /* keep last */
  251. __NL80211_BSS_AFTER_LAST,
  252. @@ -3568,11 +3673,15 @@ enum nl80211_txrate_gi {
  253. * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
  254. * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
  255. * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz)
  256. + * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
  257. + * since newer kernel versions may support more bands
  258. */
  259. enum nl80211_band {
  260. NL80211_BAND_2GHZ,
  261. NL80211_BAND_5GHZ,
  262. NL80211_BAND_60GHZ,
  263. +
  264. + NUM_NL80211_BANDS,
  265. };
  266. /**
  267. @@ -4358,12 +4467,18 @@ enum nl80211_feature_flags {
  268. /**
  269. * enum nl80211_ext_feature_index - bit index of extended features.
  270. * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates.
  271. + * @NL80211_EXT_FEATURE_RRM: This driver supports RRM. When featured, user can
  272. + * can request to use RRM (see %NL80211_ATTR_USE_RRM) with
  273. + * %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set
  274. + * the ASSOC_REQ_USE_RRM flag in the association request even if
  275. + * NL80211_FEATURE_QUIET is not advertized.
  276. *
  277. * @NUM_NL80211_EXT_FEATURES: number of extended features.
  278. * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
  279. */
  280. enum nl80211_ext_feature_index {
  281. NL80211_EXT_FEATURE_VHT_IBSS,
  282. + NL80211_EXT_FEATURE_RRM,
  283. /* add new features before the definition below */
  284. NUM_NL80211_EXT_FEATURES,
  285. @@ -4589,4 +4704,72 @@ enum nl80211_tdls_peer_capability {
  286. NL80211_TDLS_PEER_WMM = 1<<2,
  287. };
  288. +/**
  289. + * enum nl80211_sched_scan_plan - scanning plan for scheduled scan
  290. + * @__NL80211_SCHED_SCAN_PLAN_INVALID: attribute number 0 is reserved
  291. + * @NL80211_SCHED_SCAN_PLAN_INTERVAL: interval between scan iterations. In
  292. + * seconds (u32).
  293. + * @NL80211_SCHED_SCAN_PLAN_ITERATIONS: number of scan iterations in this
  294. + * scan plan (u32). The last scan plan must not specify this attribute
  295. + * because it will run infinitely. A value of zero is invalid as it will
  296. + * make the scan plan meaningless.
  297. + * @NL80211_SCHED_SCAN_PLAN_MAX: highest scheduled scan plan attribute number
  298. + * currently defined
  299. + * @__NL80211_SCHED_SCAN_PLAN_AFTER_LAST: internal use
  300. + */
  301. +enum nl80211_sched_scan_plan {
  302. + __NL80211_SCHED_SCAN_PLAN_INVALID,
  303. + NL80211_SCHED_SCAN_PLAN_INTERVAL,
  304. + NL80211_SCHED_SCAN_PLAN_ITERATIONS,
  305. +
  306. + /* keep last */
  307. + __NL80211_SCHED_SCAN_PLAN_AFTER_LAST,
  308. + NL80211_SCHED_SCAN_PLAN_MAX =
  309. + __NL80211_SCHED_SCAN_PLAN_AFTER_LAST - 1
  310. +};
  311. +
  312. +/**
  313. + * struct nl80211_bss_select_rssi_adjust - RSSI adjustment parameters.
  314. + *
  315. + * @band: band of BSS that must match for RSSI value adjustment.
  316. + * @delta: value used to adjust the RSSI value of matching BSS.
  317. + */
  318. +struct nl80211_bss_select_rssi_adjust {
  319. + __u8 band;
  320. + __s8 delta;
  321. +} __attribute__((packed));
  322. +
  323. +/**
  324. + * enum nl80211_bss_select_attr - attributes for bss selection.
  325. + *
  326. + * @__NL80211_BSS_SELECT_ATTR_INVALID: reserved.
  327. + * @NL80211_BSS_SELECT_ATTR_RSSI: Flag indicating only RSSI-based BSS selection
  328. + * is requested.
  329. + * @NL80211_BSS_SELECT_ATTR_BAND_PREF: attribute indicating BSS
  330. + * selection should be done such that the specified band is preferred.
  331. + * When there are multiple BSS-es in the preferred band, the driver
  332. + * shall use RSSI-based BSS selection as a second step. The value of
  333. + * this attribute is according to &enum nl80211_band (u32).
  334. + * @NL80211_BSS_SELECT_ATTR_RSSI_ADJUST: When present the RSSI level for
  335. + * BSS-es in the specified band is to be adjusted before doing
  336. + * RSSI-based BSS selection. The attribute value is a packed structure
  337. + * value as specified by &struct nl80211_bss_select_rssi_adjust.
  338. + * @NL80211_BSS_SELECT_ATTR_MAX: highest bss select attribute number.
  339. + * @__NL80211_BSS_SELECT_ATTR_AFTER_LAST: internal use.
  340. + *
  341. + * One and only one of these attributes are found within %NL80211_ATTR_BSS_SELECT
  342. + * for %NL80211_CMD_CONNECT. It specifies the required BSS selection behaviour
  343. + * which the driver shall use.
  344. + */
  345. +enum nl80211_bss_select_attr {
  346. + __NL80211_BSS_SELECT_ATTR_INVALID,
  347. + NL80211_BSS_SELECT_ATTR_RSSI,
  348. + NL80211_BSS_SELECT_ATTR_BAND_PREF,
  349. + NL80211_BSS_SELECT_ATTR_RSSI_ADJUST,
  350. +
  351. + /* keep last */
  352. + __NL80211_BSS_SELECT_ATTR_AFTER_LAST,
  353. + NL80211_BSS_SELECT_ATTR_MAX = __NL80211_BSS_SELECT_ATTR_AFTER_LAST - 1
  354. +};
  355. +
  356. #endif /* __LINUX_NL80211_H */