001-nl80211_h_sync.patch 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. --- a/nl80211.h
  2. +++ b/nl80211.h
  3. @@ -323,7 +323,7 @@
  4. * @NL80211_CMD_GET_SCAN: get scan results
  5. * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
  6. * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
  7. - * probe requests at CCK rate or not. %NL80211_ATTR_MAC can be used to
  8. + * probe requests at CCK rate or not. %NL80211_ATTR_BSSID can be used to
  9. * specify a BSSID to scan for; if not included, the wildcard BSSID will
  10. * be used.
  11. * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
  12. @@ -600,6 +600,20 @@
  13. *
  14. * @NL80211_CMD_SET_WDS_PEER: Set the MAC address of the peer on a WDS interface.
  15. *
  16. + * @NL80211_CMD_SET_MULTICAST_TO_UNICAST: Configure if this AP should perform
  17. + * multicast to unicast conversion. When enabled, all multicast packets
  18. + * with ethertype ARP, IPv4 or IPv6 (possibly within an 802.1Q header)
  19. + * will be sent out to each station once with the destination (multicast)
  20. + * MAC address replaced by the station's MAC address. Note that this may
  21. + * break certain expectations of the receiver, e.g. the ability to drop
  22. + * unicast IP packets encapsulated in multicast L2 frames, or the ability
  23. + * to not send destination unreachable messages in such cases.
  24. + * This can only be toggled per BSS. Configure this on an interface of
  25. + * type %NL80211_IFTYPE_AP. It applies to all its VLAN interfaces
  26. + * (%NL80211_IFTYPE_AP_VLAN), except for those in 4addr (WDS) mode.
  27. + * If %NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED is not present with this
  28. + * command, the feature is disabled.
  29. + *
  30. * @NL80211_CMD_JOIN_MESH: Join a mesh. The mesh ID must be given, and initial
  31. * mesh config parameters may be given.
  32. * @NL80211_CMD_LEAVE_MESH: Leave the mesh network -- no special arguments, the
  33. @@ -874,6 +888,12 @@
  34. * This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and
  35. * %NL80211_ATTR_COOKIE.
  36. *
  37. + * @NL80211_CMD_UPDATE_CONNECT_PARAMS: Update one or more connect parameters
  38. + * for subsequent roaming cases if the driver or firmware uses internal
  39. + * BSS selection. This command can be issued only while connected and it
  40. + * does not result in a change for the current association. Currently,
  41. + * only the %NL80211_ATTR_IE data is used and updated with this command.
  42. + *
  43. * @NL80211_CMD_MAX: highest used command number
  44. * @__NL80211_CMD_AFTER_LAST: internal use
  45. */
  46. @@ -1069,6 +1089,10 @@ enum nl80211_commands {
  47. NL80211_CMD_CHANGE_NAN_CONFIG,
  48. NL80211_CMD_NAN_MATCH,
  49. + NL80211_CMD_SET_MULTICAST_TO_UNICAST,
  50. +
  51. + NL80211_CMD_UPDATE_CONNECT_PARAMS,
  52. +
  53. /* add new commands above here */
  54. /* used to define NL80211_CMD_MAX below */
  55. @@ -1638,8 +1662,16 @@ enum nl80211_commands {
  56. * the connection request from a station. nl80211_connect_failed_reason
  57. * enum has different reasons of connection failure.
  58. *
  59. - * @NL80211_ATTR_SAE_DATA: SAE elements in Authentication frames. This starts
  60. - * with the Authentication transaction sequence number field.
  61. + * @NL80211_ATTR_AUTH_DATA: Fields and elements in Authentication frames.
  62. + * This contains the authentication frame body (non-IE and IE data),
  63. + * excluding the Authentication algorithm number, i.e., starting at the
  64. + * Authentication transaction sequence number field. It is used with
  65. + * authentication algorithms that need special fields to be added into
  66. + * the frames (SAE and FILS). Currently, only the SAE cases use the
  67. + * initial two fields (Authentication transaction sequence number and
  68. + * Status code). However, those fields are included in the attribute data
  69. + * for all authentication algorithms to keep the attribute definition
  70. + * consistent.
  71. *
  72. * @NL80211_ATTR_VHT_CAPABILITY: VHT Capability information element (from
  73. * association request when used with NL80211_CMD_NEW_STATION)
  74. @@ -1740,7 +1772,9 @@ enum nl80211_commands {
  75. *
  76. * @NL80211_ATTR_OPMODE_NOTIF: Operating mode field from Operating Mode
  77. * Notification Element based on association request when used with
  78. - * %NL80211_CMD_NEW_STATION; u8 attribute.
  79. + * %NL80211_CMD_NEW_STATION or %NL80211_CMD_SET_STATION (only when
  80. + * %NL80211_FEATURE_FULL_AP_CLIENT_STATE is supported, or with TDLS);
  81. + * u8 attribute.
  82. *
  83. * @NL80211_ATTR_VENDOR_ID: The vendor ID, either a 24-bit OUI or, if
  84. * %NL80211_VENDOR_ID_IS_LINUX is set, a special Linux ID (not used yet)
  85. @@ -1788,6 +1822,8 @@ enum nl80211_commands {
  86. * and remove functions. NAN notifications will be sent in unicast to that
  87. * socket. Without this attribute, any socket can add functions and the
  88. * notifications will be sent to the %NL80211_MCGRP_NAN multicast group.
  89. + * If set during %NL80211_CMD_ASSOCIATE or %NL80211_CMD_CONNECT the
  90. + * station will deauthenticate when the socket is closed.
  91. *
  92. * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
  93. * the TDLS link initiator.
  94. @@ -1936,6 +1972,38 @@ enum nl80211_commands {
  95. * attribute.
  96. * @NL80211_ATTR_NAN_MATCH: used to report a match. This is a nested attribute.
  97. * See &enum nl80211_nan_match_attributes.
  98. + * @NL80211_ATTR_FILS_KEK: KEK for FILS (Re)Association Request/Response frame
  99. + * protection.
  100. + * @NL80211_ATTR_FILS_NONCES: Nonces (part of AAD) for FILS (Re)Association
  101. + * Request/Response frame protection. This attribute contains the 16 octet
  102. + * STA Nonce followed by 16 octets of AP Nonce.
  103. + *
  104. + * @NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED: Indicates whether or not multicast
  105. + * packets should be send out as unicast to all stations (flag attribute).
  106. + *
  107. + * @NL80211_ATTR_BSSID: The BSSID of the AP. Note that %NL80211_ATTR_MAC is also
  108. + * used in various commands/events for specifying the BSSID.
  109. + *
  110. + * @NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI: Relative RSSI threshold by which
  111. + * other BSSs has to be better or slightly worse than the current
  112. + * connected BSS so that they get reported to user space.
  113. + * This will give an opportunity to userspace to consider connecting to
  114. + * other matching BSSs which have better or slightly worse RSSI than
  115. + * the current connected BSS by using an offloaded operation to avoid
  116. + * unnecessary wakeups.
  117. + *
  118. + * @NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST: When present the RSSI level for BSSs in
  119. + * the specified band is to be adjusted before doing
  120. + * %NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI based comparision to figure out
  121. + * better BSSs. The attribute value is a packed structure
  122. + * value as specified by &struct nl80211_bss_select_rssi_adjust.
  123. + *
  124. + * @NL80211_ATTR_TIMEOUT_REASON: The reason for which an operation timed out.
  125. + * u32 attribute with an &enum nl80211_timeout_reason value. This is used,
  126. + * e.g., with %NL80211_CMD_CONNECT event.
  127. + *
  128. + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
  129. + * transmit power to stay within regulatory limits. u32, dBi.
  130. *
  131. * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  132. * @NL80211_ATTR_MAX: highest attribute number currently defined
  133. @@ -2195,7 +2263,7 @@ enum nl80211_attrs {
  134. NL80211_ATTR_CONN_FAILED_REASON,
  135. - NL80211_ATTR_SAE_DATA,
  136. + NL80211_ATTR_AUTH_DATA,
  137. NL80211_ATTR_VHT_CAPABILITY,
  138. @@ -2336,6 +2404,20 @@ enum nl80211_attrs {
  139. NL80211_ATTR_NAN_FUNC,
  140. NL80211_ATTR_NAN_MATCH,
  141. + NL80211_ATTR_FILS_KEK,
  142. + NL80211_ATTR_FILS_NONCES,
  143. +
  144. + NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED,
  145. +
  146. + NL80211_ATTR_BSSID,
  147. +
  148. + NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI,
  149. + NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST,
  150. +
  151. + NL80211_ATTR_TIMEOUT_REASON,
  152. +
  153. + NL80211_ATTR_WIPHY_ANTENNA_GAIN,
  154. +
  155. /* add attributes here, update the policy in nl80211.c */
  156. __NL80211_ATTR_AFTER_LAST,
  157. @@ -2347,6 +2429,7 @@ enum nl80211_attrs {
  158. #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION
  159. #define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
  160. #define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER
  161. +#define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
  162. /*
  163. * Allow user space programs to use #ifdef on new attributes by defining them
  164. @@ -3027,6 +3110,13 @@ enum nl80211_reg_rule_attr {
  165. * how this API was implemented in the past. Also, due to the same problem,
  166. * the only way to create a matchset with only an RSSI filter (with this
  167. * attribute) is if there's only a single matchset with the RSSI attribute.
  168. + * @NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI: Flag indicating whether
  169. + * %NL80211_SCHED_SCAN_MATCH_ATTR_RSSI to be used as absolute RSSI or
  170. + * relative to current bss's RSSI.
  171. + * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST: When present the RSSI level for
  172. + * BSS-es in the specified band is to be adjusted before doing
  173. + * RSSI-based BSS selection. The attribute value is a packed structure
  174. + * value as specified by &struct nl80211_bss_select_rssi_adjust.
  175. * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
  176. * attribute number currently defined
  177. * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
  178. @@ -3036,6 +3126,8 @@ enum nl80211_sched_scan_match_attr {
  179. NL80211_SCHED_SCAN_MATCH_ATTR_SSID,
  180. NL80211_SCHED_SCAN_MATCH_ATTR_RSSI,
  181. + NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI,
  182. + NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST,
  183. /* keep last */
  184. __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
  185. @@ -3660,6 +3752,9 @@ enum nl80211_bss_status {
  186. * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r)
  187. * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP)
  188. * @NL80211_AUTHTYPE_SAE: Simultaneous authentication of equals
  189. + * @NL80211_AUTHTYPE_FILS_SK: Fast Initial Link Setup shared key
  190. + * @NL80211_AUTHTYPE_FILS_SK_PFS: Fast Initial Link Setup shared key with PFS
  191. + * @NL80211_AUTHTYPE_FILS_PK: Fast Initial Link Setup public key
  192. * @__NL80211_AUTHTYPE_NUM: internal
  193. * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm
  194. * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by
  195. @@ -3672,6 +3767,9 @@ enum nl80211_auth_type {
  196. NL80211_AUTHTYPE_FT,
  197. NL80211_AUTHTYPE_NETWORK_EAP,
  198. NL80211_AUTHTYPE_SAE,
  199. + NL80211_AUTHTYPE_FILS_SK,
  200. + NL80211_AUTHTYPE_FILS_SK_PFS,
  201. + NL80211_AUTHTYPE_FILS_PK,
  202. /* keep last */
  203. __NL80211_AUTHTYPE_NUM,
  204. @@ -4280,6 +4378,9 @@ enum nl80211_iface_limit_attrs {
  205. * of supported channel widths for radar detection.
  206. * @NL80211_IFACE_COMB_RADAR_DETECT_REGIONS: u32 attribute containing the bitmap
  207. * of supported regulatory regions for radar detection.
  208. + * @NL80211_IFACE_COMB_BI_MIN_GCD: u32 attribute specifying the minimum GCD of
  209. + * different beacon intervals supported by all the interface combinations
  210. + * in this group (if not present, all beacon intervals be identical).
  211. * @NUM_NL80211_IFACE_COMB: number of attributes
  212. * @MAX_NL80211_IFACE_COMB: highest attribute number
  213. *
  214. @@ -4287,8 +4388,8 @@ enum nl80211_iface_limit_attrs {
  215. * limits = [ #{STA} <= 1, #{AP} <= 1 ], matching BI, channels = 1, max = 2
  216. * => allows an AP and a STA that must match BIs
  217. *
  218. - * numbers = [ #{AP, P2P-GO} <= 8 ], channels = 1, max = 8
  219. - * => allows 8 of AP/GO
  220. + * numbers = [ #{AP, P2P-GO} <= 8 ], BI min gcd, channels = 1, max = 8,
  221. + * => allows 8 of AP/GO that can have BI gcd >= min gcd
  222. *
  223. * numbers = [ #{STA} <= 2 ], channels = 2, max = 2
  224. * => allows two STAs on different channels
  225. @@ -4314,6 +4415,7 @@ enum nl80211_if_combination_attrs {
  226. NL80211_IFACE_COMB_NUM_CHANNELS,
  227. NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
  228. NL80211_IFACE_COMB_RADAR_DETECT_REGIONS,
  229. + NL80211_IFACE_COMB_BI_MIN_GCD,
  230. /* keep last */
  231. NUM_NL80211_IFACE_COMB,
  232. @@ -4634,6 +4736,15 @@ enum nl80211_feature_flags {
  233. * configuration (AP/mesh) with HT rates.
  234. * @NL80211_EXT_FEATURE_BEACON_RATE_VHT: Driver supports beacon rate
  235. * configuration (AP/mesh) with VHT rates.
  236. + * @NL80211_EXT_FEATURE_FILS_STA: This driver supports Fast Initial Link Setup
  237. + * with user space SME (NL80211_CMD_AUTHENTICATE) in station mode.
  238. + * @NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA: This driver supports randomized TA
  239. + * in @NL80211_CMD_FRAME while not associated.
  240. + * @NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED: This driver supports
  241. + * randomized TA in @NL80211_CMD_FRAME while associated.
  242. + * @NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI: The driver supports sched_scan
  243. + * for reporting BSSs with better RSSI than the current connected BSS
  244. + * (%NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI).
  245. *
  246. * @NUM_NL80211_EXT_FEATURES: number of extended features.
  247. * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
  248. @@ -4648,6 +4759,10 @@ enum nl80211_ext_feature_index {
  249. NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
  250. NL80211_EXT_FEATURE_BEACON_RATE_HT,
  251. NL80211_EXT_FEATURE_BEACON_RATE_VHT,
  252. + NL80211_EXT_FEATURE_FILS_STA,
  253. + NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA,
  254. + NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED,
  255. + NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI,
  256. /* add new features before the definition below */
  257. NUM_NL80211_EXT_FEATURES,
  258. @@ -4687,6 +4802,21 @@ enum nl80211_connect_failed_reason {
  259. };
  260. /**
  261. + * enum nl80211_timeout_reason - timeout reasons
  262. + *
  263. + * @NL80211_TIMEOUT_UNSPECIFIED: Timeout reason unspecified.
  264. + * @NL80211_TIMEOUT_SCAN: Scan (AP discovery) timed out.
  265. + * @NL80211_TIMEOUT_AUTH: Authentication timed out.
  266. + * @NL80211_TIMEOUT_ASSOC: Association timed out.
  267. + */
  268. +enum nl80211_timeout_reason {
  269. + NL80211_TIMEOUT_UNSPECIFIED,
  270. + NL80211_TIMEOUT_SCAN,
  271. + NL80211_TIMEOUT_AUTH,
  272. + NL80211_TIMEOUT_ASSOC,
  273. +};
  274. +
  275. +/**
  276. * enum nl80211_scan_flags - scan request control flags
  277. *
  278. * Scan request control flags are used to control the handling
  279. @@ -4900,8 +5030,9 @@ enum nl80211_sched_scan_plan {
  280. /**
  281. * struct nl80211_bss_select_rssi_adjust - RSSI adjustment parameters.
  282. *
  283. - * @band: band of BSS that must match for RSSI value adjustment.
  284. - * @delta: value used to adjust the RSSI value of matching BSS.
  285. + * @band: band of BSS that must match for RSSI value adjustment. The value
  286. + * of this field is according to &enum nl80211_band.
  287. + * @delta: value used to adjust the RSSI value of matching BSS in dB.
  288. */
  289. struct nl80211_bss_select_rssi_adjust {
  290. __u8 band;