100-multi_radio.patch 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498
  1. --- a/api/nl80211.h
  2. +++ b/api/nl80211.h
  3. @@ -11,7 +11,7 @@
  4. * Copyright 2008 Jouni Malinen <[email protected]>
  5. * Copyright 2008 Colin McCabe <[email protected]>
  6. * Copyright 2015-2017 Intel Deutschland GmbH
  7. - * Copyright (C) 2018-2023 Intel Corporation
  8. + * Copyright (C) 2018-2024 Intel Corporation
  9. *
  10. * Permission to use, copy, modify, and/or distribute this software for any
  11. * purpose with or without fee is hereby granted, provided that the above
  12. @@ -72,7 +72,7 @@
  13. * For drivers supporting TDLS with external setup (WIPHY_FLAG_SUPPORTS_TDLS
  14. * and WIPHY_FLAG_TDLS_EXTERNAL_SETUP), the station lifetime is as follows:
  15. * - a setup station entry is added, not yet authorized, without any rate
  16. - * or capability information, this just exists to avoid race conditions
  17. + * or capability information; this just exists to avoid race conditions
  18. * - when the TDLS setup is done, a single NL80211_CMD_SET_STATION is valid
  19. * to add rate and capability information to the station and at the same
  20. * time mark it authorized.
  21. @@ -87,7 +87,7 @@
  22. * DOC: Frame transmission/registration support
  23. *
  24. * Frame transmission and registration support exists to allow userspace
  25. - * management entities such as wpa_supplicant react to management frames
  26. + * management entities such as wpa_supplicant to react to management frames
  27. * that are not being handled by the kernel. This includes, for example,
  28. * certain classes of action frames that cannot be handled in the kernel
  29. * for various reasons.
  30. @@ -113,7 +113,7 @@
  31. *
  32. * Frame transmission allows userspace to send for example the required
  33. * responses to action frames. It is subject to some sanity checking,
  34. - * but many frames can be transmitted. When a frame was transmitted, its
  35. + * but many frames can be transmitted. When a frame is transmitted, its
  36. * status is indicated to the sending socket.
  37. *
  38. * For more technical details, see the corresponding command descriptions
  39. @@ -123,7 +123,7 @@
  40. /**
  41. * DOC: Virtual interface / concurrency capabilities
  42. *
  43. - * Some devices are able to operate with virtual MACs, they can have
  44. + * Some devices are able to operate with virtual MACs; they can have
  45. * more than one virtual interface. The capability handling for this
  46. * is a bit complex though, as there may be a number of restrictions
  47. * on the types of concurrency that are supported.
  48. @@ -135,7 +135,7 @@
  49. * Once concurrency is desired, more attributes must be observed:
  50. * To start with, since some interface types are purely managed in
  51. * software, like the AP-VLAN type in mac80211 for example, there's
  52. - * an additional list of these, they can be added at any time and
  53. + * an additional list of these; they can be added at any time and
  54. * are only restricted by some semantic restrictions (e.g. AP-VLAN
  55. * cannot be added without a corresponding AP interface). This list
  56. * is exported in the %NL80211_ATTR_SOFTWARE_IFTYPES attribute.
  57. @@ -164,17 +164,17 @@
  58. * Packet coalesce feature helps to reduce number of received interrupts
  59. * to host by buffering these packets in firmware/hardware for some
  60. * predefined time. Received interrupt will be generated when one of the
  61. - * following events occur.
  62. + * following events occurs.
  63. * a) Expiration of hardware timer whose expiration time is set to maximum
  64. * coalescing delay of matching coalesce rule.
  65. - * b) Coalescing buffer in hardware reaches it's limit.
  66. + * b) Coalescing buffer in hardware reaches its limit.
  67. * c) Packet doesn't match any of the configured coalesce rules.
  68. *
  69. * User needs to configure following parameters for creating a coalesce
  70. * rule.
  71. * a) Maximum coalescing delay
  72. * b) List of packet patterns which needs to be matched
  73. - * c) Condition for coalescence. pattern 'match' or 'no match'
  74. + * c) Condition for coalescence: pattern 'match' or 'no match'
  75. * Multiple such rules can be created.
  76. */
  77. @@ -213,7 +213,7 @@
  78. /**
  79. * DOC: FILS shared key authentication offload
  80. *
  81. - * FILS shared key authentication offload can be advertized by drivers by
  82. + * FILS shared key authentication offload can be advertised by drivers by
  83. * setting @NL80211_EXT_FEATURE_FILS_SK_OFFLOAD flag. The drivers that support
  84. * FILS shared key authentication offload should be able to construct the
  85. * authentication and association frames for FILS shared key authentication and
  86. @@ -239,7 +239,7 @@
  87. * The PMKSA can be maintained in userspace persistently so that it can be used
  88. * later after reboots or wifi turn off/on also.
  89. *
  90. - * %NL80211_ATTR_FILS_CACHE_ID is the cache identifier advertized by a FILS
  91. + * %NL80211_ATTR_FILS_CACHE_ID is the cache identifier advertised by a FILS
  92. * capable AP supporting PMK caching. It specifies the scope within which the
  93. * PMKSAs are cached in an ESS. %NL80211_CMD_SET_PMKSA and
  94. * %NL80211_CMD_DEL_PMKSA are enhanced to allow support for PMKSA caching based
  95. @@ -290,12 +290,12 @@
  96. * If the configuration needs to be applied for specific peer then the MAC
  97. * address of the peer needs to be passed in %NL80211_ATTR_MAC, otherwise the
  98. * configuration will be applied for all the connected peers in the vif except
  99. - * any peers that have peer specific configuration for the TID by default; if
  100. - * the %NL80211_TID_CONFIG_ATTR_OVERRIDE flag is set, peer specific values
  101. + * any peers that have peer-specific configuration for the TID by default; if
  102. + * the %NL80211_TID_CONFIG_ATTR_OVERRIDE flag is set, peer-specific values
  103. * will be overwritten.
  104. *
  105. - * All this configuration is valid only for STA's current connection
  106. - * i.e. the configuration will be reset to default when the STA connects back
  107. + * All this configuration is valid only for STA's current connection,
  108. + * i.e., the configuration will be reset to default when the STA connects back
  109. * after disconnection/roaming, and this configuration will be cleared when
  110. * the interface goes down.
  111. */
  112. @@ -326,7 +326,7 @@
  113. /**
  114. * DOC: Multi-Link Operation
  115. *
  116. - * In Multi-Link Operation, a connection between to MLDs utilizes multiple
  117. + * In Multi-Link Operation, a connection between two MLDs utilizes multiple
  118. * links. To use this in nl80211, various commands and responses now need
  119. * to or will include the new %NL80211_ATTR_MLO_LINKS attribute.
  120. * Additionally, various commands that need to operate on a specific link
  121. @@ -335,6 +335,15 @@
  122. */
  123. /**
  124. + * DOC: OWE DH IE handling offload
  125. + *
  126. + * By setting @NL80211_EXT_FEATURE_OWE_OFFLOAD flag, drivers can indicate
  127. + * kernel/application space to avoid DH IE handling. When this flag is
  128. + * advertised, the driver/device will take care of DH IE inclusion and
  129. + * processing of peer DH IE to generate PMK.
  130. + */
  131. +
  132. +/**
  133. * enum nl80211_commands - supported nl80211 commands
  134. *
  135. * @NL80211_CMD_UNSPEC: unspecified command to catch errors
  136. @@ -404,8 +413,8 @@
  137. * are like for %NL80211_CMD_SET_BEACON, and additionally parameters that
  138. * do not change are used, these include %NL80211_ATTR_BEACON_INTERVAL,
  139. * %NL80211_ATTR_DTIM_PERIOD, %NL80211_ATTR_SSID,
  140. - * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE,
  141. - * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS,
  142. + * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHER_SUITES_PAIRWISE,
  143. + * %NL80211_ATTR_CIPHER_SUITE_GROUP, %NL80211_ATTR_WPA_VERSIONS,
  144. * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
  145. * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT,
  146. * %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS.
  147. @@ -429,23 +438,19 @@
  148. * %NL80211_ATTR_REASON_CODE can optionally be used to specify which type
  149. * of disconnection indication should be sent to the station
  150. * (Deauthentication or Disassociation frame and reason code for that
  151. - * frame).
  152. + * frame). %NL80211_ATTR_MLO_LINK_ID can be used optionally to remove
  153. + * stations connected and using at least that link as one of its links.
  154. *
  155. * @NL80211_CMD_GET_MPATH: Get mesh path attributes for mesh path to
  156. - * destination %NL80211_ATTR_MAC on the interface identified by
  157. - * %NL80211_ATTR_IFINDEX.
  158. + * destination %NL80211_ATTR_MAC on the interface identified by
  159. + * %NL80211_ATTR_IFINDEX.
  160. * @NL80211_CMD_SET_MPATH: Set mesh path attributes for mesh path to
  161. - * destination %NL80211_ATTR_MAC on the interface identified by
  162. - * %NL80211_ATTR_IFINDEX.
  163. + * destination %NL80211_ATTR_MAC on the interface identified by
  164. + * %NL80211_ATTR_IFINDEX.
  165. * @NL80211_CMD_NEW_MPATH: Create a new mesh path for the destination given by
  166. * %NL80211_ATTR_MAC via %NL80211_ATTR_MPATH_NEXT_HOP.
  167. * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by
  168. * %NL80211_ATTR_MAC.
  169. - * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the
  170. - * interface identified by %NL80211_ATTR_IFINDEX.
  171. - * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC
  172. - * or, if no MAC address given, all mesh paths, on the interface identified
  173. - * by %NL80211_ATTR_IFINDEX.
  174. * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by
  175. * %NL80211_ATTR_IFINDEX.
  176. *
  177. @@ -466,15 +471,15 @@
  178. * after being queried by the kernel. CRDA replies by sending a regulatory
  179. * domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our
  180. * current alpha2 if it found a match. It also provides
  181. - * NL80211_ATTR_REG_RULE_FLAGS, and a set of regulatory rules. Each
  182. - * regulatory rule is a nested set of attributes given by
  183. - * %NL80211_ATTR_REG_RULE_FREQ_[START|END] and
  184. - * %NL80211_ATTR_FREQ_RANGE_MAX_BW with an attached power rule given by
  185. - * %NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and
  186. - * %NL80211_ATTR_REG_RULE_POWER_MAX_EIRP.
  187. + * NL80211_ATTR_REG_RULE_FLAGS, and a set of regulatory rules. Each
  188. + * regulatory rule is a nested set of attributes given by
  189. + * %NL80211_ATTR_REG_RULE_FREQ_[START|END] and
  190. + * %NL80211_ATTR_FREQ_RANGE_MAX_BW with an attached power rule given by
  191. + * %NL80211_ATTR_REG_RULE_POWER_MAX_ANT_GAIN and
  192. + * %NL80211_ATTR_REG_RULE_POWER_MAX_EIRP.
  193. * @NL80211_CMD_REQ_SET_REG: ask the wireless core to set the regulatory domain
  194. - * to the specified ISO/IEC 3166-1 alpha2 country code. The core will
  195. - * store this as a valid request and then query userspace for it.
  196. + * to the specified ISO/IEC 3166-1 alpha2 country code. The core will
  197. + * store this as a valid request and then query userspace for it.
  198. *
  199. * @NL80211_CMD_GET_MESH_CONFIG: Get mesh networking properties for the
  200. * interface identified by %NL80211_ATTR_IFINDEX
  201. @@ -512,7 +517,7 @@
  202. * %NL80211_ATTR_SCHED_SCAN_PLANS. If %NL80211_ATTR_SCHED_SCAN_PLANS is
  203. * not specified and only %NL80211_ATTR_SCHED_SCAN_INTERVAL is specified,
  204. * scheduled scan will run in an infinite loop with the specified interval.
  205. - * These attributes are mutually exculsive,
  206. + * These attributes are mutually exclusive,
  207. * i.e. NL80211_ATTR_SCHED_SCAN_INTERVAL must not be passed if
  208. * NL80211_ATTR_SCHED_SCAN_PLANS is defined.
  209. * If for some reason scheduled scan is aborted by the driver, all scan
  210. @@ -543,7 +548,7 @@
  211. * %NL80211_CMD_STOP_SCHED_SCAN command is received or when the interface
  212. * is brought down while a scheduled scan was running.
  213. *
  214. - * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation
  215. + * @NL80211_CMD_GET_SURVEY: get survey results, e.g. channel occupation
  216. * or noise level
  217. * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to
  218. * NL80211_CMD_GET_SURVEY and on the "scan" multicast group)
  219. @@ -554,40 +559,41 @@
  220. * using %NL80211_ATTR_SSID, %NL80211_ATTR_FILS_CACHE_ID,
  221. * %NL80211_ATTR_PMKID, and %NL80211_ATTR_PMK in case of FILS
  222. * authentication where %NL80211_ATTR_FILS_CACHE_ID is the identifier
  223. - * advertized by a FILS capable AP identifying the scope of PMKSA in an
  224. + * advertised by a FILS capable AP identifying the scope of PMKSA in an
  225. * ESS.
  226. * @NL80211_CMD_DEL_PMKSA: Delete a PMKSA cache entry, using %NL80211_ATTR_MAC
  227. * (for the BSSID) and %NL80211_ATTR_PMKID or using %NL80211_ATTR_SSID,
  228. * %NL80211_ATTR_FILS_CACHE_ID, and %NL80211_ATTR_PMKID in case of FILS
  229. - * authentication.
  230. + * authentication. Additionally in case of SAE offload and OWE offloads
  231. + * PMKSA entry can be deleted using %NL80211_ATTR_SSID.
  232. * @NL80211_CMD_FLUSH_PMKSA: Flush all PMKSA cache entries.
  233. *
  234. * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain
  235. - * has been changed and provides details of the request information
  236. - * that caused the change such as who initiated the regulatory request
  237. - * (%NL80211_ATTR_REG_INITIATOR), the wiphy_idx
  238. - * (%NL80211_ATTR_REG_ALPHA2) on which the request was made from if
  239. - * the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or
  240. - * %NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain
  241. - * set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is
  242. - * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on
  243. - * to (%NL80211_ATTR_REG_ALPHA2).
  244. + * has been changed and provides details of the request information
  245. + * that caused the change such as who initiated the regulatory request
  246. + * (%NL80211_ATTR_REG_INITIATOR), the wiphy_idx
  247. + * (%NL80211_ATTR_REG_ALPHA2) on which the request was made from if
  248. + * the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or
  249. + * %NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain
  250. + * set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is
  251. + * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on
  252. + * to (%NL80211_ATTR_REG_ALPHA2).
  253. * @NL80211_CMD_REG_BEACON_HINT: indicates to userspace that an AP beacon
  254. - * has been found while world roaming thus enabling active scan or
  255. - * any mode of operation that initiates TX (beacons) on a channel
  256. - * where we would not have been able to do either before. As an example
  257. - * if you are world roaming (regulatory domain set to world or if your
  258. - * driver is using a custom world roaming regulatory domain) and while
  259. - * doing a passive scan on the 5 GHz band you find an AP there (if not
  260. - * on a DFS channel) you will now be able to actively scan for that AP
  261. - * or use AP mode on your card on that same channel. Note that this will
  262. - * never be used for channels 1-11 on the 2 GHz band as they are always
  263. - * enabled world wide. This beacon hint is only sent if your device had
  264. - * either disabled active scanning or beaconing on a channel. We send to
  265. - * userspace the wiphy on which we removed a restriction from
  266. - * (%NL80211_ATTR_WIPHY) and the channel on which this occurred
  267. - * before (%NL80211_ATTR_FREQ_BEFORE) and after (%NL80211_ATTR_FREQ_AFTER)
  268. - * the beacon hint was processed.
  269. + * has been found while world roaming thus enabling active scan or
  270. + * any mode of operation that initiates TX (beacons) on a channel
  271. + * where we would not have been able to do either before. As an example
  272. + * if you are world roaming (regulatory domain set to world or if your
  273. + * driver is using a custom world roaming regulatory domain) and while
  274. + * doing a passive scan on the 5 GHz band you find an AP there (if not
  275. + * on a DFS channel) you will now be able to actively scan for that AP
  276. + * or use AP mode on your card on that same channel. Note that this will
  277. + * never be used for channels 1-11 on the 2 GHz band as they are always
  278. + * enabled world wide. This beacon hint is only sent if your device had
  279. + * either disabled active scanning or beaconing on a channel. We send to
  280. + * userspace the wiphy on which we removed a restriction from
  281. + * (%NL80211_ATTR_WIPHY) and the channel on which this occurred
  282. + * before (%NL80211_ATTR_FREQ_BEFORE) and after (%NL80211_ATTR_FREQ_AFTER)
  283. + * the beacon hint was processed.
  284. *
  285. * @NL80211_CMD_AUTHENTICATE: authentication request and notification.
  286. * This command is used both as a command (request to authenticate) and
  287. @@ -598,7 +604,7 @@
  288. * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify
  289. * the SSID (mainly for association, but is included in authentication
  290. * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ +
  291. - * %NL80211_ATTR_WIPHY_FREQ_OFFSET is used to specify the frequence of the
  292. + * %NL80211_ATTR_WIPHY_FREQ_OFFSET is used to specify the frequency of the
  293. * channel in MHz. %NL80211_ATTR_AUTH_TYPE is used to specify the
  294. * authentication type. %NL80211_ATTR_IE is used to define IEs
  295. * (VendorSpecificInfo, but also including RSN IE and FT IEs) to be added
  296. @@ -807,7 +813,7 @@
  297. * reached.
  298. * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ
  299. * and the attributes determining channel width) the given interface
  300. - * (identifed by %NL80211_ATTR_IFINDEX) shall operate on.
  301. + * (identified by %NL80211_ATTR_IFINDEX) shall operate on.
  302. * In case multiple channels are supported by the device, the mechanism
  303. * with which it switches channels is implementation-defined.
  304. * When a monitor interface is given, it can only switch channel while
  305. @@ -879,7 +885,7 @@
  306. * inform userspace of the new replay counter.
  307. *
  308. * @NL80211_CMD_PMKSA_CANDIDATE: This is used as an event to inform userspace
  309. - * of PMKSA caching dandidates.
  310. + * of PMKSA caching candidates.
  311. *
  312. * @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup).
  313. * In addition, this can be used as an event to request userspace to take
  314. @@ -915,7 +921,7 @@
  315. *
  316. * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface
  317. * by sending a null data frame to it and reporting when the frame is
  318. - * acknowleged. This is used to allow timing out inactive clients. Uses
  319. + * acknowledged. This is used to allow timing out inactive clients. Uses
  320. * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_MAC. The command returns a
  321. * direct reply with an %NL80211_ATTR_COOKIE that is later used to match
  322. * up the event with the request. The event includes the same data and
  323. @@ -1109,7 +1115,7 @@
  324. * current configuration is not changed. If it is present but
  325. * set to zero, the configuration is changed to don't-care
  326. * (i.e. the device can decide what to do).
  327. - * @NL80211_CMD_NAN_FUNC_MATCH: Notification sent when a match is reported.
  328. + * @NL80211_CMD_NAN_MATCH: Notification sent when a match is reported.
  329. * This will contain a %NL80211_ATTR_NAN_MATCH nested attribute and
  330. * %NL80211_ATTR_COOKIE.
  331. *
  332. @@ -1126,11 +1132,15 @@
  333. * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously
  334. * configured PMK for the authenticator address identified by
  335. * %NL80211_ATTR_MAC.
  336. - * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates an 802.1X FT roam was
  337. - * completed successfully. Drivers that support 4 way handshake offload
  338. - * should send this event after indicating 802.1X FT assocation with
  339. - * %NL80211_CMD_ROAM. If the 4 way handshake failed %NL80211_CMD_DISCONNECT
  340. - * should be indicated instead.
  341. + * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates port is authorized and
  342. + * open for regular data traffic. For STA/P2P-client, this event is sent
  343. + * with AP MAC address and for AP/P2P-GO, the event carries the STA/P2P-
  344. + * client MAC address.
  345. + * Drivers that support 4 way handshake offload should send this event for
  346. + * STA/P2P-client after successful 4-way HS or after 802.1X FT following
  347. + * NL80211_CMD_CONNECT or NL80211_CMD_ROAM. Drivers using AP/P2P-GO 4-way
  348. + * handshake offload should send this event on successful completion of
  349. + * 4-way handshake with the peer (STA/P2P-client).
  350. * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request
  351. * and RX notification. This command is used both as a request to transmit
  352. * a control port frame and as a notification that a control port frame
  353. @@ -1314,6 +1324,11 @@
  354. * Multi-Link reconfiguration. %NL80211_ATTR_MLO_LINKS is used to provide
  355. * information about the removed STA MLD setup links.
  356. *
  357. + * @NL80211_CMD_SET_TID_TO_LINK_MAPPING: Set the TID to Link Mapping for a
  358. + * non-AP MLD station. The %NL80211_ATTR_MLO_TTLM_DLINK and
  359. + * %NL80211_ATTR_MLO_TTLM_ULINK attributes are used to specify the
  360. + * TID to Link mapping for downlink/uplink traffic.
  361. + *
  362. * @NL80211_CMD_MAX: highest used command number
  363. * @__NL80211_CMD_AFTER_LAST: internal use
  364. */
  365. @@ -1569,6 +1584,8 @@ enum nl80211_commands {
  366. NL80211_CMD_LINKS_REMOVED,
  367. + NL80211_CMD_SET_TID_TO_LINK_MAPPING,
  368. +
  369. /* add new commands above here */
  370. /* used to define NL80211_CMD_MAX below */
  371. @@ -1693,21 +1710,21 @@ enum nl80211_commands {
  372. * (see &enum nl80211_plink_action).
  373. * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path.
  374. * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path
  375. - * info given for %NL80211_CMD_GET_MPATH, nested attribute described at
  376. + * info given for %NL80211_CMD_GET_MPATH, nested attribute described at
  377. * &enum nl80211_mpath_info.
  378. *
  379. * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of
  380. * &enum nl80211_mntr_flags.
  381. *
  382. * @NL80211_ATTR_REG_ALPHA2: an ISO-3166-alpha2 country code for which the
  383. - * current regulatory domain should be set to or is already set to.
  384. - * For example, 'CR', for Costa Rica. This attribute is used by the kernel
  385. - * to query the CRDA to retrieve one regulatory domain. This attribute can
  386. - * also be used by userspace to query the kernel for the currently set
  387. - * regulatory domain. We chose an alpha2 as that is also used by the
  388. - * IEEE-802.11 country information element to identify a country.
  389. - * Users can also simply ask the wireless core to set regulatory domain
  390. - * to a specific alpha2.
  391. + * current regulatory domain should be set to or is already set to.
  392. + * For example, 'CR', for Costa Rica. This attribute is used by the kernel
  393. + * to query the CRDA to retrieve one regulatory domain. This attribute can
  394. + * also be used by userspace to query the kernel for the currently set
  395. + * regulatory domain. We chose an alpha2 as that is also used by the
  396. + * IEEE-802.11 country information element to identify a country.
  397. + * Users can also simply ask the wireless core to set regulatory domain
  398. + * to a specific alpha2.
  399. * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory
  400. * rules.
  401. *
  402. @@ -1750,9 +1767,9 @@ enum nl80211_commands {
  403. * @NL80211_ATTR_BSS: scan result BSS
  404. *
  405. * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain
  406. - * currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_*
  407. + * currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_*
  408. * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently
  409. - * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*)
  410. + * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*)
  411. *
  412. * @NL80211_ATTR_SUPPORTED_COMMANDS: wiphy attribute that specifies
  413. * an array of command numbers (i.e. a mapping index to command number)
  414. @@ -1771,15 +1788,15 @@ enum nl80211_commands {
  415. * a u32
  416. *
  417. * @NL80211_ATTR_FREQ_BEFORE: A channel which has suffered a regulatory change
  418. - * due to considerations from a beacon hint. This attribute reflects
  419. - * the state of the channel _before_ the beacon hint processing. This
  420. - * attributes consists of a nested attribute containing
  421. - * NL80211_FREQUENCY_ATTR_*
  422. + * due to considerations from a beacon hint. This attribute reflects
  423. + * the state of the channel _before_ the beacon hint processing. This
  424. + * attributes consists of a nested attribute containing
  425. + * NL80211_FREQUENCY_ATTR_*
  426. * @NL80211_ATTR_FREQ_AFTER: A channel which has suffered a regulatory change
  427. - * due to considerations from a beacon hint. This attribute reflects
  428. - * the state of the channel _after_ the beacon hint processing. This
  429. - * attributes consists of a nested attribute containing
  430. - * NL80211_FREQUENCY_ATTR_*
  431. + * due to considerations from a beacon hint. This attribute reflects
  432. + * the state of the channel _after_ the beacon hint processing. This
  433. + * attributes consists of a nested attribute containing
  434. + * NL80211_FREQUENCY_ATTR_*
  435. *
  436. * @NL80211_ATTR_CIPHER_SUITES: a set of u32 values indicating the supported
  437. * cipher suites
  438. @@ -1826,7 +1843,7 @@ enum nl80211_commands {
  439. * using %CMD_CONTROL_PORT_FRAME. If control port routing over NL80211 is
  440. * to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER
  441. * flag. When used with %NL80211_ATTR_CONTROL_PORT_NO_PREAUTH, pre-auth
  442. - * frames are not forwared over the control port.
  443. + * frames are not forwarded over the control port.
  444. *
  445. * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver.
  446. * We recommend using nested, driver-specific attributes within this.
  447. @@ -1840,12 +1857,6 @@ enum nl80211_commands {
  448. * that protected APs should be used. This is also used with NEW_BEACON to
  449. * indicate that the BSS is to use protection.
  450. *
  451. - * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT, ASSOCIATE, and NEW_BEACON
  452. - * to indicate which unicast key ciphers will be used with the connection
  453. - * (an array of u32).
  454. - * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
  455. - * indicate which group key cipher will be used with the connection (a
  456. - * u32).
  457. * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
  458. * indicate which WPA version(s) the AP we want to associate with is using
  459. * (a u32 with flags from &enum nl80211_wpa_versions).
  460. @@ -1876,6 +1887,7 @@ enum nl80211_commands {
  461. * with %NL80211_KEY_* sub-attributes
  462. *
  463. * @NL80211_ATTR_PID: Process ID of a network namespace.
  464. + * @NL80211_ATTR_NETNS_FD: File descriptor of a network namespace.
  465. *
  466. * @NL80211_ATTR_GENERATION: Used to indicate consistent snapshots for
  467. * dumps. This number increases whenever the object list being
  468. @@ -1930,6 +1942,7 @@ enum nl80211_commands {
  469. *
  470. * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was
  471. * acknowledged by the recipient.
  472. + * @NL80211_ATTR_ACK_SIGNAL: Station's ack signal strength (s32)
  473. *
  474. * @NL80211_ATTR_PS_STATE: powersave state, using &enum nl80211_ps_state values.
  475. *
  476. @@ -1963,10 +1976,10 @@ enum nl80211_commands {
  477. * bit. Depending on which antennas are selected in the bitmap, 802.11n
  478. * drivers can derive which chainmasks to use (if all antennas belonging to
  479. * a particular chain are disabled this chain should be disabled) and if
  480. - * a chain has diversity antennas wether diversity should be used or not.
  481. + * a chain has diversity antennas whether diversity should be used or not.
  482. * HT capabilities (STBC, TX Beamforming, Antenna selection) can be
  483. * derived from the available chains after applying the antenna mask.
  484. - * Non-802.11n drivers can derive wether to use diversity or not.
  485. + * Non-802.11n drivers can derive whether to use diversity or not.
  486. * Drivers may reject configurations or RX/TX mask combinations they cannot
  487. * support by returning -EINVAL.
  488. *
  489. @@ -2039,6 +2052,10 @@ enum nl80211_commands {
  490. * @NL80211_ATTR_INTERFACE_COMBINATIONS: Nested attribute listing the supported
  491. * interface combinations. In each nested item, it contains attributes
  492. * defined in &enum nl80211_if_combination_attrs.
  493. + * If the wiphy uses multiple radios (@NL80211_ATTR_WIPHY_RADIOS is set),
  494. + * this attribute contains the interface combinations of the first radio.
  495. + * See @NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS for the global wiphy
  496. + * combinations for the sum of all radios.
  497. * @NL80211_ATTR_SOFTWARE_IFTYPES: Nested attribute (just like
  498. * %NL80211_ATTR_SUPPORTED_IFTYPES) containing the interface types that
  499. * are managed in software: interfaces of these types aren't subject to
  500. @@ -2127,6 +2144,9 @@ enum nl80211_commands {
  501. * @NL80211_ATTR_DISABLE_HE: Force HE capable interfaces to disable
  502. * this feature during association. This is a flag attribute.
  503. * Currently only supported in mac80211 drivers.
  504. + * @NL80211_ATTR_DISABLE_EHT: Force EHT capable interfaces to disable
  505. + * this feature during association. This is a flag attribute.
  506. + * Currently only supported in mac80211 drivers.
  507. * @NL80211_ATTR_HT_CAPABILITY_MASK: Specify which bits of the
  508. * ATTR_HT_CAPABILITY to which attention should be paid.
  509. * Currently, only mac80211 NICs support this feature.
  510. @@ -2136,6 +2156,12 @@ enum nl80211_commands {
  511. * All values are treated as suggestions and may be ignored
  512. * by the driver as required. The actual values may be seen in
  513. * the station debugfs ht_caps file.
  514. + * @NL80211_ATTR_VHT_CAPABILITY_MASK: Specify which bits of the
  515. + * ATTR_VHT_CAPABILITY to which attention should be paid.
  516. + * Currently, only mac80211 NICs support this feature.
  517. + * All values are treated as suggestions and may be ignored
  518. + * by the driver as required. The actual values may be seen in
  519. + * the station debugfs vht_caps file.
  520. *
  521. * @NL80211_ATTR_DFS_REGION: region for regulatory rules which this country
  522. * abides to when initiating radiation on DFS channels. A country maps
  523. @@ -2394,7 +2420,7 @@ enum nl80211_commands {
  524. * scheduled scan is started. Or the delay before a WoWLAN
  525. * net-detect scan is started, counting from the moment the
  526. * system is suspended. This value is a u32, in seconds.
  527. -
  528. + *
  529. * @NL80211_ATTR_REG_INDOOR: flag attribute, if set indicates that the device
  530. * is operating in an indoor environment.
  531. *
  532. @@ -2536,7 +2562,7 @@ enum nl80211_commands {
  533. * from successful FILS authentication and is used with
  534. * %NL80211_CMD_CONNECT.
  535. *
  536. - * @NL80211_ATTR_FILS_CACHE_ID: A 2-octet identifier advertized by a FILS AP
  537. + * @NL80211_ATTR_FILS_CACHE_ID: A 2-octet identifier advertised by a FILS AP
  538. * identifying the scope of PMKSAs. This is used with
  539. * @NL80211_CMD_SET_PMKSA and @NL80211_CMD_DEL_PMKSA.
  540. *
  541. @@ -2690,11 +2716,13 @@ enum nl80211_commands {
  542. *
  543. * @NL80211_ATTR_FILS_DISCOVERY: Optional parameter to configure FILS
  544. * discovery. It is a nested attribute, see
  545. - * &enum nl80211_fils_discovery_attributes.
  546. + * &enum nl80211_fils_discovery_attributes. Userspace should pass an empty
  547. + * nested attribute to disable this feature and delete the templates.
  548. *
  549. * @NL80211_ATTR_UNSOL_BCAST_PROBE_RESP: Optional parameter to configure
  550. * unsolicited broadcast probe response. It is a nested attribute, see
  551. - * &enum nl80211_unsol_bcast_probe_resp_attributes.
  552. + * &enum nl80211_unsol_bcast_probe_resp_attributes. Userspace should pass an empty
  553. + * nested attribute to disable this feature and delete the templates.
  554. *
  555. * @NL80211_ATTR_S1G_CAPABILITY: S1G Capability information element (from
  556. * association request when used with NL80211_CMD_NEW_STATION)
  557. @@ -2815,6 +2843,34 @@ enum nl80211_commands {
  558. * @NL80211_ATTR_MLO_LINK_DISABLED: Flag attribute indicating that the link is
  559. * disabled.
  560. *
  561. + * @NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA: Include BSS usage data, i.e.
  562. + * include BSSes that can only be used in restricted scenarios and/or
  563. + * cannot be used at all.
  564. + *
  565. + * @NL80211_ATTR_MLO_TTLM_DLINK: Binary attribute specifying the downlink TID to
  566. + * link mapping. The length is 8 * sizeof(u16). For each TID the link
  567. + * mapping is as defined in section 9.4.2.314 (TID-To-Link Mapping element)
  568. + * in Draft P802.11be_D4.0.
  569. + * @NL80211_ATTR_MLO_TTLM_ULINK: Binary attribute specifying the uplink TID to
  570. + * link mapping. The length is 8 * sizeof(u16). For each TID the link
  571. + * mapping is as defined in section 9.4.2.314 (TID-To-Link Mapping element)
  572. + * in Draft P802.11be_D4.0.
  573. + *
  574. + * @NL80211_ATTR_ASSOC_SPP_AMSDU: flag attribute used with
  575. + * %NL80211_CMD_ASSOCIATE indicating the SPP A-MSDUs
  576. + * are used on this connection
  577. + *
  578. + * @NL80211_ATTR_WIPHY_RADIOS: Nested attribute describing physical radios
  579. + * belonging to this wiphy. See &enum nl80211_wiphy_radio_attrs.
  580. + *
  581. + * @NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS: Nested attribute listing the
  582. + * supported interface combinations for all radios combined. In each
  583. + * nested item, it contains attributes defined in
  584. + * &enum nl80211_if_combination_attrs.
  585. + *
  586. + * @NL80211_ATTR_VIF_RADIO_MASK: Bitmask of allowed radios (u32).
  587. + * A value of 0 means all radios.
  588. + *
  589. * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  590. * @NL80211_ATTR_MAX: highest attribute number currently defined
  591. * @__NL80211_ATTR_AFTER_LAST: internal use
  592. @@ -3353,6 +3409,18 @@ enum nl80211_attrs {
  593. NL80211_ATTR_MLO_LINK_DISABLED,
  594. + NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA,
  595. +
  596. + NL80211_ATTR_MLO_TTLM_DLINK,
  597. + NL80211_ATTR_MLO_TTLM_ULINK,
  598. +
  599. + NL80211_ATTR_ASSOC_SPP_AMSDU,
  600. +
  601. + NL80211_ATTR_WIPHY_RADIOS,
  602. + NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS,
  603. +
  604. + NL80211_ATTR_VIF_RADIO_MASK,
  605. +
  606. /* add attributes here, update the policy in nl80211.c */
  607. __NL80211_ATTR_AFTER_LAST,
  608. @@ -3493,6 +3561,7 @@ enum nl80211_iftype {
  609. * @NL80211_STA_FLAG_ASSOCIATED: station is associated; used with drivers
  610. * that support %NL80211_FEATURE_FULL_AP_CLIENT_STATE to transition a
  611. * previously added station into associated state
  612. + * @NL80211_STA_FLAG_SPP_AMSDU: station supports SPP A-MSDUs
  613. * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
  614. * @__NL80211_STA_FLAG_AFTER_LAST: internal use
  615. */
  616. @@ -3505,6 +3574,7 @@ enum nl80211_sta_flags {
  617. NL80211_STA_FLAG_AUTHENTICATED,
  618. NL80211_STA_FLAG_TDLS_PEER,
  619. NL80211_STA_FLAG_ASSOCIATED,
  620. + NL80211_STA_FLAG_SPP_AMSDU,
  621. /* keep last */
  622. __NL80211_STA_FLAG_AFTER_LAST,
  623. @@ -3515,7 +3585,7 @@ enum nl80211_sta_flags {
  624. * enum nl80211_sta_p2p_ps_status - station support of P2P PS
  625. *
  626. * @NL80211_P2P_PS_UNSUPPORTED: station doesn't support P2P PS mechanism
  627. - * @@NL80211_P2P_PS_SUPPORTED: station supports P2P PS mechanism
  628. + * @NL80211_P2P_PS_SUPPORTED: station supports P2P PS mechanism
  629. * @NUM_NL80211_P2P_PS_STATUS: number of values
  630. */
  631. enum nl80211_sta_p2p_ps_status {
  632. @@ -3553,9 +3623,9 @@ enum nl80211_he_gi {
  633. /**
  634. * enum nl80211_he_ltf - HE long training field
  635. - * @NL80211_RATE_INFO_HE_1xLTF: 3.2 usec
  636. - * @NL80211_RATE_INFO_HE_2xLTF: 6.4 usec
  637. - * @NL80211_RATE_INFO_HE_4xLTF: 12.8 usec
  638. + * @NL80211_RATE_INFO_HE_1XLTF: 3.2 usec
  639. + * @NL80211_RATE_INFO_HE_2XLTF: 6.4 usec
  640. + * @NL80211_RATE_INFO_HE_4XLTF: 12.8 usec
  641. */
  642. enum nl80211_he_ltf {
  643. NL80211_RATE_INFO_HE_1XLTF,
  644. @@ -3670,7 +3740,7 @@ enum nl80211_eht_ru_alloc {
  645. * @NL80211_RATE_INFO_HE_GI: HE guard interval identifier
  646. * (u8, see &enum nl80211_he_gi)
  647. * @NL80211_RATE_INFO_HE_DCM: HE DCM value (u8, 0/1)
  648. - * @NL80211_RATE_INFO_RU_ALLOC: HE RU allocation, if not present then
  649. + * @NL80211_RATE_INFO_HE_RU_ALLOC: HE RU allocation, if not present then
  650. * non-OFDMA was used (u8, see &enum nl80211_he_ru_alloc)
  651. * @NL80211_RATE_INFO_320_MHZ_WIDTH: 320 MHz bitrate
  652. * @NL80211_RATE_INFO_EHT_MCS: EHT MCS index (u8, 0-15)
  653. @@ -3773,7 +3843,7 @@ enum nl80211_sta_bss_param {
  654. * (u64, to this station)
  655. * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm)
  656. * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute
  657. - * containing info as possible, see &enum nl80211_rate_info
  658. + * containing info as possible, see &enum nl80211_rate_info
  659. * @NL80211_STA_INFO_RX_PACKETS: total received packet (MSDUs and MMPDUs)
  660. * (u32, from this station)
  661. * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (MSDUs and MMPDUs)
  662. @@ -3802,8 +3872,8 @@ enum nl80211_sta_bss_param {
  663. * Contains a nested array of signal strength attributes (u8, dBm)
  664. * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
  665. * Same format as NL80211_STA_INFO_CHAIN_SIGNAL.
  666. - * @NL80211_STA_EXPECTED_THROUGHPUT: expected throughput considering also the
  667. - * 802.11 header (u32, kbps)
  668. + * @NL80211_STA_INFO_EXPECTED_THROUGHPUT: expected throughput considering also
  669. + * the 802.11 header (u32, kbps)
  670. * @NL80211_STA_INFO_RX_DROP_MISC: RX packets dropped for unspecified reasons
  671. * (u64)
  672. * @NL80211_STA_INFO_BEACON_RX: number of beacons received from this peer (u64)
  673. @@ -3989,7 +4059,7 @@ enum nl80211_mpath_flags {
  674. * @NL80211_MPATH_INFO_METRIC: metric (cost) of this mesh path
  675. * @NL80211_MPATH_INFO_EXPTIME: expiration time for the path, in msec from now
  676. * @NL80211_MPATH_INFO_FLAGS: mesh path flags, enumerated in
  677. - * &enum nl80211_mpath_flags;
  678. + * &enum nl80211_mpath_flags;
  679. * @NL80211_MPATH_INFO_DISCOVERY_TIMEOUT: total path discovery timeout, in msec
  680. * @NL80211_MPATH_INFO_DISCOVERY_RETRIES: mesh path discovery retries
  681. * @NL80211_MPATH_INFO_HOP_COUNT: hop count to destination
  682. @@ -4129,7 +4199,7 @@ enum nl80211_band_attr {
  683. * @NL80211_WMMR_CW_MAX: Maximum contention window slot.
  684. * @NL80211_WMMR_AIFSN: Arbitration Inter Frame Space.
  685. * @NL80211_WMMR_TXOP: Maximum allowed tx operation time.
  686. - * @nl80211_WMMR_MAX: highest possible wmm rule.
  687. + * @NL80211_WMMR_MAX: highest possible wmm rule.
  688. * @__NL80211_WMMR_LAST: Internal use.
  689. */
  690. enum nl80211_wmm_rule {
  691. @@ -4151,15 +4221,16 @@ enum nl80211_wmm_rule {
  692. * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current
  693. * regulatory domain.
  694. * @NL80211_FREQUENCY_ATTR_NO_IR: no mechanisms that initiate radiation
  695. - * are permitted on this channel, this includes sending probe
  696. - * requests, or modes of operation that require beaconing.
  697. + * are permitted on this channel, this includes sending probe
  698. + * requests, or modes of operation that require beaconing.
  699. + * @__NL80211_FREQUENCY_ATTR_NO_IBSS: obsolete, same as _NO_IR
  700. * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory
  701. * on this channel in current regulatory domain.
  702. * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
  703. * (100 * dBm).
  704. * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS
  705. * (enum nl80211_dfs_state)
  706. - * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in miliseconds for how long
  707. + * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in milliseconds for how long
  708. * this channel is in this DFS state.
  709. * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this
  710. * channel as the control channel
  711. @@ -4213,6 +4284,21 @@ enum nl80211_wmm_rule {
  712. * as the primary or any of the secondary channels isn't possible
  713. * @NL80211_FREQUENCY_ATTR_NO_EHT: EHT operation is not allowed on this channel
  714. * in current regulatory domain.
  715. + * @NL80211_FREQUENCY_ATTR_PSD: Power spectral density (in dBm) that
  716. + * is allowed on this channel in current regulatory domain.
  717. + * @NL80211_FREQUENCY_ATTR_DFS_CONCURRENT: Operation on this channel is
  718. + * allowed for peer-to-peer or adhoc communication under the control
  719. + * of a DFS master which operates on the same channel (FCC-594280 D01
  720. + * Section B.3). Should be used together with %NL80211_RRF_DFS only.
  721. + * @NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT: Client connection to VLP AP
  722. + * not allowed using this channel
  723. + * @NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT: Client connection to AFC AP
  724. + * not allowed using this channel
  725. + * @NL80211_FREQUENCY_ATTR_CAN_MONITOR: This channel can be used in monitor
  726. + * mode despite other (regulatory) restrictions, even if the channel is
  727. + * otherwise completely disabled.
  728. + * @NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP: This channel can be used for a
  729. + * very low power (VLP) AP, despite being NO_IR.
  730. * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
  731. * currently defined
  732. * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
  733. @@ -4251,6 +4337,12 @@ enum nl80211_frequency_attr {
  734. NL80211_FREQUENCY_ATTR_16MHZ,
  735. NL80211_FREQUENCY_ATTR_NO_320MHZ,
  736. NL80211_FREQUENCY_ATTR_NO_EHT,
  737. + NL80211_FREQUENCY_ATTR_PSD,
  738. + NL80211_FREQUENCY_ATTR_DFS_CONCURRENT,
  739. + NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT,
  740. + NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT,
  741. + NL80211_FREQUENCY_ATTR_CAN_MONITOR,
  742. + NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP,
  743. /* keep last */
  744. __NL80211_FREQUENCY_ATTR_AFTER_LAST,
  745. @@ -4263,6 +4355,10 @@ enum nl80211_frequency_attr {
  746. #define NL80211_FREQUENCY_ATTR_NO_IR NL80211_FREQUENCY_ATTR_NO_IR
  747. #define NL80211_FREQUENCY_ATTR_GO_CONCURRENT \
  748. NL80211_FREQUENCY_ATTR_IR_CONCURRENT
  749. +#define NL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT \
  750. + NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT
  751. +#define NL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT \
  752. + NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT
  753. /**
  754. * enum nl80211_bitrate_attr - bitrate attributes
  755. @@ -4285,16 +4381,16 @@ enum nl80211_bitrate_attr {
  756. };
  757. /**
  758. - * enum nl80211_initiator - Indicates the initiator of a reg domain request
  759. + * enum nl80211_reg_initiator - Indicates the initiator of a reg domain request
  760. * @NL80211_REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world
  761. - * regulatory domain.
  762. + * regulatory domain.
  763. * @NL80211_REGDOM_SET_BY_USER: User asked the wireless core to set the
  764. - * regulatory domain.
  765. + * regulatory domain.
  766. * @NL80211_REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the
  767. - * wireless core it thinks its knows the regulatory domain we should be in.
  768. + * wireless core it thinks its knows the regulatory domain we should be in.
  769. * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an
  770. - * 802.11 country information element with regulatory information it
  771. - * thinks we should consider. cfg80211 only processes the country
  772. + * 802.11 country information element with regulatory information it
  773. + * thinks we should consider. cfg80211 only processes the country
  774. * code from the IE, and relies on the regulatory domain information
  775. * structure passed by userspace (CRDA) from our wireless-regdb.
  776. * If a channel is enabled but the country code indicates it should
  777. @@ -4313,11 +4409,11 @@ enum nl80211_reg_initiator {
  778. * to a specific country. When this is set you can count on the
  779. * ISO / IEC 3166 alpha2 country code being valid.
  780. * @NL80211_REGDOM_TYPE_WORLD: the regulatory set domain is the world regulatory
  781. - * domain.
  782. + * domain.
  783. * @NL80211_REGDOM_TYPE_CUSTOM_WORLD: the regulatory domain set is a custom
  784. - * driver specific world regulatory domain. These do not apply system-wide
  785. - * and are only applicable to the individual devices which have requested
  786. - * them to be applied.
  787. + * driver specific world regulatory domain. These do not apply system-wide
  788. + * and are only applicable to the individual devices which have requested
  789. + * them to be applied.
  790. * @NL80211_REGDOM_TYPE_INTERSECTION: the regulatory domain set is the product
  791. * of an intersection between two regulatory domains -- the previously
  792. * set regulatory domain on the system and the last accepted regulatory
  793. @@ -4334,23 +4430,25 @@ enum nl80211_reg_type {
  794. * enum nl80211_reg_rule_attr - regulatory rule attributes
  795. * @__NL80211_REG_RULE_ATTR_INVALID: attribute number 0 is reserved
  796. * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional
  797. - * considerations for a given frequency range. These are the
  798. - * &enum nl80211_reg_rule_flags.
  799. + * considerations for a given frequency range. These are the
  800. + * &enum nl80211_reg_rule_flags.
  801. * @NL80211_ATTR_FREQ_RANGE_START: starting frequencry for the regulatory
  802. - * rule in KHz. This is not a center of frequency but an actual regulatory
  803. - * band edge.
  804. + * rule in KHz. This is not a center of frequency but an actual regulatory
  805. + * band edge.
  806. * @NL80211_ATTR_FREQ_RANGE_END: ending frequency for the regulatory rule
  807. - * in KHz. This is not a center a frequency but an actual regulatory
  808. - * band edge.
  809. + * in KHz. This is not a center a frequency but an actual regulatory
  810. + * band edge.
  811. * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this
  812. * frequency range, in KHz.
  813. * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain
  814. - * for a given frequency range. The value is in mBi (100 * dBi).
  815. - * If you don't have one then don't send this.
  816. + * for a given frequency range. The value is in mBi (100 * dBi).
  817. + * If you don't have one then don't send this.
  818. * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for
  819. - * a given frequency range. The value is in mBm (100 * dBm).
  820. + * a given frequency range. The value is in mBm (100 * dBm).
  821. * @NL80211_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
  822. * If not present or 0 default CAC time will be used.
  823. + * @NL80211_ATTR_POWER_RULE_PSD: power spectral density (in dBm).
  824. + * This could be negative.
  825. * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number
  826. * currently defined
  827. * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use
  828. @@ -4368,6 +4466,8 @@ enum nl80211_reg_rule_attr {
  829. NL80211_ATTR_DFS_CAC_TIME,
  830. + NL80211_ATTR_POWER_RULE_PSD,
  831. +
  832. /* keep last */
  833. __NL80211_REG_RULE_ATTR_AFTER_LAST,
  834. NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1
  835. @@ -4396,14 +4496,7 @@ enum nl80211_reg_rule_attr {
  836. * value as specified by &struct nl80211_bss_select_rssi_adjust.
  837. * @NL80211_SCHED_SCAN_MATCH_ATTR_BSSID: BSSID to be used for matching
  838. * (this cannot be used together with SSID).
  839. - * @NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI: Nested attribute that carries the
  840. - * band specific minimum rssi thresholds for the bands defined in
  841. - * enum nl80211_band. The minimum rssi threshold value(s32) specific to a
  842. - * band shall be encapsulated in attribute with type value equals to one
  843. - * of the NL80211_BAND_* defined in enum nl80211_band. For example, the
  844. - * minimum rssi threshold value for 2.4GHZ band shall be encapsulated
  845. - * within an attribute of type NL80211_BAND_2GHZ. And one or more of such
  846. - * attributes will be nested within this attribute.
  847. + * @NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI: Obsolete
  848. * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
  849. * attribute number currently defined
  850. * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
  851. @@ -4416,7 +4509,7 @@ enum nl80211_sched_scan_match_attr {
  852. NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI,
  853. NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST,
  854. NL80211_SCHED_SCAN_MATCH_ATTR_BSSID,
  855. - NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI,
  856. + NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI, /* obsolete */
  857. /* keep last */
  858. __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
  859. @@ -4438,8 +4531,9 @@ enum nl80211_sched_scan_match_attr {
  860. * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links
  861. * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links
  862. * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed,
  863. - * this includes probe requests or modes of operation that require
  864. - * beaconing.
  865. + * this includes probe requests or modes of operation that require
  866. + * beaconing.
  867. + * @__NL80211_RRF_NO_IBSS: obsolete, same as NO_IR
  868. * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated
  869. * base on contiguous rules and wider channels will be allowed to cross
  870. * multiple contiguous/overlapping frequency ranges.
  871. @@ -4451,6 +4545,15 @@ enum nl80211_sched_scan_match_attr {
  872. * @NL80211_RRF_NO_HE: HE operation not allowed
  873. * @NL80211_RRF_NO_320MHZ: 320MHz operation not allowed
  874. * @NL80211_RRF_NO_EHT: EHT operation not allowed
  875. + * @NL80211_RRF_PSD: Ruleset has power spectral density value
  876. + * @NL80211_RRF_DFS_CONCURRENT: Operation on this channel is allowed for
  877. + * peer-to-peer or adhoc communication under the control of a DFS master
  878. + * which operates on the same channel (FCC-594280 D01 Section B.3).
  879. + * Should be used together with %NL80211_RRF_DFS only.
  880. + * @NL80211_RRF_NO_6GHZ_VLP_CLIENT: Client connection to VLP AP not allowed
  881. + * @NL80211_RRF_NO_6GHZ_AFC_CLIENT: Client connection to AFC AP not allowed
  882. + * @NL80211_RRF_ALLOW_6GHZ_VLP_AP: Very low power (VLP) AP can be permitted
  883. + * despite NO_IR configuration.
  884. */
  885. enum nl80211_reg_rule_flags {
  886. NL80211_RRF_NO_OFDM = 1<<0,
  887. @@ -4471,6 +4574,11 @@ enum nl80211_reg_rule_flags {
  888. NL80211_RRF_NO_HE = 1<<17,
  889. NL80211_RRF_NO_320MHZ = 1<<18,
  890. NL80211_RRF_NO_EHT = 1<<19,
  891. + NL80211_RRF_PSD = 1<<20,
  892. + NL80211_RRF_DFS_CONCURRENT = 1<<21,
  893. + NL80211_RRF_NO_6GHZ_VLP_CLIENT = 1<<22,
  894. + NL80211_RRF_NO_6GHZ_AFC_CLIENT = 1<<23,
  895. + NL80211_RRF_ALLOW_6GHZ_VLP_AP = 1<<24,
  896. };
  897. #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
  898. @@ -4479,6 +4587,8 @@ enum nl80211_reg_rule_flags {
  899. #define NL80211_RRF_NO_HT40 (NL80211_RRF_NO_HT40MINUS |\
  900. NL80211_RRF_NO_HT40PLUS)
  901. #define NL80211_RRF_GO_CONCURRENT NL80211_RRF_IR_CONCURRENT
  902. +#define NL80211_RRF_NO_UHB_VLP_CLIENT NL80211_RRF_NO_6GHZ_VLP_CLIENT
  903. +#define NL80211_RRF_NO_UHB_AFC_CLIENT NL80211_RRF_NO_6GHZ_AFC_CLIENT
  904. /* For backport compatibility with older userspace */
  905. #define NL80211_RRF_NO_IR_ALL (NL80211_RRF_NO_IR | __NL80211_RRF_NO_IBSS)
  906. @@ -4593,6 +4703,7 @@ enum nl80211_survey_info {
  907. * overrides all other flags.
  908. * @NL80211_MNTR_FLAG_ACTIVE: use the configured MAC address
  909. * and ACK incoming unicast packets.
  910. + * @NL80211_MNTR_FLAG_SKIP_TX: do not pass local tx packets
  911. *
  912. * @__NL80211_MNTR_FLAG_AFTER_LAST: internal use
  913. * @NL80211_MNTR_FLAG_MAX: highest possible monitor flag
  914. @@ -4605,6 +4716,7 @@ enum nl80211_mntr_flags {
  915. NL80211_MNTR_FLAG_OTHER_BSS,
  916. NL80211_MNTR_FLAG_COOK_FRAMES,
  917. NL80211_MNTR_FLAG_ACTIVE,
  918. + NL80211_MNTR_FLAG_SKIP_TX,
  919. /* keep last */
  920. __NL80211_MNTR_FLAG_AFTER_LAST,
  921. @@ -4625,8 +4737,8 @@ enum nl80211_mntr_flags {
  922. * alternate between Active and Doze states, but may not wake up
  923. * for neighbor's beacons.
  924. *
  925. - * @__NL80211_MESH_POWER_AFTER_LAST - internal use
  926. - * @NL80211_MESH_POWER_MAX - highest possible power save level
  927. + * @__NL80211_MESH_POWER_AFTER_LAST: internal use
  928. + * @NL80211_MESH_POWER_MAX: highest possible power save level
  929. */
  930. enum nl80211_mesh_power_mode {
  931. @@ -5008,6 +5120,36 @@ enum nl80211_bss_scan_width {
  932. };
  933. /**
  934. + * enum nl80211_bss_use_for - bitmap indicating possible BSS use
  935. + * @NL80211_BSS_USE_FOR_NORMAL: Use this BSS for normal "connection",
  936. + * including IBSS/MBSS depending on the type.
  937. + * @NL80211_BSS_USE_FOR_MLD_LINK: This BSS can be used as a link in an
  938. + * MLO connection. Note that for an MLO connection, all links including
  939. + * the assoc link must have this flag set, and the assoc link must
  940. + * additionally have %NL80211_BSS_USE_FOR_NORMAL set.
  941. + */
  942. +enum nl80211_bss_use_for {
  943. + NL80211_BSS_USE_FOR_NORMAL = 1 << 0,
  944. + NL80211_BSS_USE_FOR_MLD_LINK = 1 << 1,
  945. +};
  946. +
  947. +/**
  948. + * enum nl80211_bss_cannot_use_reasons - reason(s) connection to a
  949. + * BSS isn't possible
  950. + * @NL80211_BSS_CANNOT_USE_NSTR_NONPRIMARY: NSTR nonprimary links aren't
  951. + * supported by the device, and this BSS entry represents one.
  952. + * @NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH: STA is not supporting
  953. + * the AP power type (SP, VLP, AP) that the AP uses.
  954. + */
  955. +enum nl80211_bss_cannot_use_reasons {
  956. + NL80211_BSS_CANNOT_USE_NSTR_NONPRIMARY = 1 << 0,
  957. + NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH = 1 << 1,
  958. +};
  959. +
  960. +#define NL80211_BSS_CANNOT_USE_UHB_PWR_MISMATCH \
  961. + NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH
  962. +
  963. +/**
  964. * enum nl80211_bss - netlink attributes for a BSS
  965. *
  966. * @__NL80211_BSS_INVALID: invalid
  967. @@ -5038,7 +5180,7 @@ enum nl80211_bss_scan_width {
  968. * elements from a Beacon frame (bin); not present if no Beacon frame has
  969. * yet been received
  970. * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel
  971. - * (u32, enum nl80211_bss_scan_width)
  972. + * (u32, enum nl80211_bss_scan_width) - No longer used!
  973. * @NL80211_BSS_BEACON_TSF: TSF of the last received beacon (u64)
  974. * (not present if no beacon frame has been received yet)
  975. * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and
  976. @@ -5059,6 +5201,14 @@ enum nl80211_bss_scan_width {
  977. * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz
  978. * @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8).
  979. * @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it.
  980. + * @NL80211_BSS_USE_FOR: u32 bitmap attribute indicating what the BSS can be
  981. + * used for, see &enum nl80211_bss_use_for.
  982. + * @NL80211_BSS_CANNOT_USE_REASONS: Indicates the reason that this BSS cannot
  983. + * be used for all or some of the possible uses by the device reporting it,
  984. + * even though its presence was detected.
  985. + * This is a u64 attribute containing a bitmap of values from
  986. + * &enum nl80211_cannot_use_reasons, note that the attribute may be missing
  987. + * if no reasons are specified.
  988. * @__NL80211_BSS_AFTER_LAST: internal
  989. * @NL80211_BSS_MAX: highest BSS attribute
  990. */
  991. @@ -5086,6 +5236,8 @@ enum nl80211_bss {
  992. NL80211_BSS_FREQUENCY_OFFSET,
  993. NL80211_BSS_MLO_LINK_ID,
  994. NL80211_BSS_MLD_ADDR,
  995. + NL80211_BSS_USE_FOR,
  996. + NL80211_BSS_CANNOT_USE_REASONS,
  997. /* keep last */
  998. __NL80211_BSS_AFTER_LAST,
  999. @@ -5434,7 +5586,7 @@ enum nl80211_tx_rate_setting {
  1000. * (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE).
  1001. * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but
  1002. * per peer instead.
  1003. - * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if set indicates
  1004. + * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribute, if set indicates
  1005. * that the new configuration overrides all previous peer
  1006. * configurations, otherwise previous peer specific configurations
  1007. * should be left untouched.
  1008. @@ -5606,7 +5758,7 @@ struct nl80211_pattern_support {
  1009. * "TCP connection wakeup" for more details. This is a nested attribute
  1010. * containing the exact information for establishing and keeping alive
  1011. * the TCP connection.
  1012. - * @NL80211_WOWLAN_TRIG_TCP_WAKEUP_MATCH: For wakeup reporting only, the
  1013. + * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH: For wakeup reporting only, the
  1014. * wakeup packet was received on the TCP connection
  1015. * @NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST: For wakeup reporting only, the
  1016. * TCP connection was lost or failed to be established
  1017. @@ -5635,6 +5787,8 @@ struct nl80211_pattern_support {
  1018. * %NL80211_ATTR_SCAN_FREQUENCIES contains more than one
  1019. * frequency, it means that the match occurred in more than one
  1020. * channel.
  1021. + * @NL80211_WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC: For wakeup reporting only.
  1022. + * Wake up happened due to unprotected deauth or disassoc frame in MFP.
  1023. * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers
  1024. * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number
  1025. *
  1026. @@ -5662,6 +5816,7 @@ enum nl80211_wowlan_triggers {
  1027. NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS,
  1028. NL80211_WOWLAN_TRIG_NET_DETECT,
  1029. NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS,
  1030. + NL80211_WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC,
  1031. /* keep last */
  1032. NUM_NL80211_WOWLAN_TRIG,
  1033. @@ -5817,7 +5972,7 @@ enum nl80211_attr_coalesce_rule {
  1034. /**
  1035. * enum nl80211_coalesce_condition - coalesce rule conditions
  1036. - * @NL80211_COALESCE_CONDITION_MATCH: coalaesce Rx packets when patterns
  1037. + * @NL80211_COALESCE_CONDITION_MATCH: coalesce Rx packets when patterns
  1038. * in a rule are matched.
  1039. * @NL80211_COALESCE_CONDITION_NO_MATCH: coalesce Rx packets when patterns
  1040. * in a rule are not matched.
  1041. @@ -5916,7 +6071,7 @@ enum nl80211_if_combination_attrs {
  1042. * enum nl80211_plink_state - state of a mesh peer link finite state machine
  1043. *
  1044. * @NL80211_PLINK_LISTEN: initial state, considered the implicit
  1045. - * state of non existent mesh peer links
  1046. + * state of non-existent mesh peer links
  1047. * @NL80211_PLINK_OPN_SNT: mesh plink open frame has been sent to
  1048. * this mesh peer
  1049. * @NL80211_PLINK_OPN_RCVD: mesh plink open frame has been received
  1050. @@ -5952,7 +6107,7 @@ enum nl80211_plink_state {
  1051. * @NL80211_PLINK_ACTION_BLOCK: block traffic from this mesh peer
  1052. * @NUM_NL80211_PLINK_ACTIONS: number of possible actions
  1053. */
  1054. -enum plink_actions {
  1055. +enum nl80211_plink_action {
  1056. NL80211_PLINK_ACTION_NO_ACTION,
  1057. NL80211_PLINK_ACTION_OPEN,
  1058. NL80211_PLINK_ACTION_BLOCK,
  1059. @@ -6209,7 +6364,7 @@ enum nl80211_feature_flags {
  1060. * request to use RRM (see %NL80211_ATTR_USE_RRM) with
  1061. * %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set
  1062. * the ASSOC_REQ_USE_RRM flag in the association request even if
  1063. - * NL80211_FEATURE_QUIET is not advertized.
  1064. + * NL80211_FEATURE_QUIET is not advertised.
  1065. * @NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER: This device supports MU-MIMO air
  1066. * sniffer which means that it can be configured to hear packets from
  1067. * certain groups which can be configured by the
  1068. @@ -6221,13 +6376,15 @@ enum nl80211_feature_flags {
  1069. * the BSS that the interface that requested the scan is connected to
  1070. * (if available).
  1071. * @NL80211_EXT_FEATURE_BSS_PARENT_TSF: Per BSS, this driver reports the
  1072. - * time the last beacon/probe was received. The time is the TSF of the
  1073. - * BSS that the interface that requested the scan is connected to
  1074. - * (if available).
  1075. + * time the last beacon/probe was received. For a non-MLO connection, the
  1076. + * time is the TSF of the BSS that the interface that requested the scan is
  1077. + * connected to (if available). For an MLO connection, the time is the TSF
  1078. + * of the BSS corresponding with link ID specified in the scan request (if
  1079. + * specified).
  1080. * @NL80211_EXT_FEATURE_SET_SCAN_DWELL: This driver supports configuration of
  1081. * channel dwell time.
  1082. * @NL80211_EXT_FEATURE_BEACON_RATE_LEGACY: Driver supports beacon rate
  1083. - * configuration (AP/mesh), supporting a legacy (non HT/VHT) rate.
  1084. + * configuration (AP/mesh), supporting a legacy (non-HT/VHT) rate.
  1085. * @NL80211_EXT_FEATURE_BEACON_RATE_HT: Driver supports beacon rate
  1086. * configuration (AP/mesh) with HT rates.
  1087. * @NL80211_EXT_FEATURE_BEACON_RATE_VHT: Driver supports beacon rate
  1088. @@ -6277,6 +6434,7 @@ enum nl80211_feature_flags {
  1089. * receiving control port frames over nl80211 instead of the netdevice.
  1090. * @NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT: This driver/device supports
  1091. * (average) ACK signal strength reporting.
  1092. + * @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: Backward-compatible ID
  1093. * @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate
  1094. * TXQs.
  1095. * @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the
  1096. @@ -6301,8 +6459,7 @@ enum nl80211_feature_flags {
  1097. * @NL80211_EXT_FEATURE_AP_PMKSA_CACHING: Driver/device supports PMKSA caching
  1098. * (set/del PMKSA operations) in AP mode.
  1099. *
  1100. - * @NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD: Driver supports
  1101. - * filtering of sched scan results using band specific RSSI thresholds.
  1102. + * @NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD: Obsolete
  1103. *
  1104. * @NL80211_EXT_FEATURE_STA_TX_PWR: This driver supports controlling tx power
  1105. * to a station.
  1106. @@ -6400,6 +6557,22 @@ enum nl80211_feature_flags {
  1107. * in authentication and deauthentication frames sent to unassociated peer
  1108. * using @NL80211_CMD_FRAME.
  1109. *
  1110. + * @NL80211_EXT_FEATURE_OWE_OFFLOAD: Driver/Device wants to do OWE DH IE
  1111. + * handling in station mode.
  1112. + *
  1113. + * @NL80211_EXT_FEATURE_OWE_OFFLOAD_AP: Driver/Device wants to do OWE DH IE
  1114. + * handling in AP mode.
  1115. + *
  1116. + * @NL80211_EXT_FEATURE_DFS_CONCURRENT: The device supports peer-to-peer or
  1117. + * ad hoc operation on DFS channels under the control of a concurrent
  1118. + * DFS master on the same channel as described in FCC-594280 D01
  1119. + * (Section B.3). This, for example, allows P2P GO and P2P clients to
  1120. + * operate on DFS channels as long as there's a concurrent BSS connection.
  1121. + *
  1122. + * @NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT: The driver has support for SPP
  1123. + * (signaling and payload protected) A-MSDUs and this shall be advertised
  1124. + * in the RSNXE.
  1125. + *
  1126. * @NUM_NL80211_EXT_FEATURES: number of extended features.
  1127. * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
  1128. */
  1129. @@ -6441,7 +6614,7 @@ enum nl80211_ext_feature_index {
  1130. NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER,
  1131. NL80211_EXT_FEATURE_AIRTIME_FAIRNESS,
  1132. NL80211_EXT_FEATURE_AP_PMKSA_CACHING,
  1133. - NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD,
  1134. + NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD, /* obsolete */
  1135. NL80211_EXT_FEATURE_EXT_KEY_ID,
  1136. NL80211_EXT_FEATURE_STA_TX_PWR,
  1137. NL80211_EXT_FEATURE_SAE_OFFLOAD,
  1138. @@ -6471,6 +6644,10 @@ enum nl80211_ext_feature_index {
  1139. NL80211_EXT_FEATURE_PUNCT,
  1140. NL80211_EXT_FEATURE_SECURE_NAN,
  1141. NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA,
  1142. + NL80211_EXT_FEATURE_OWE_OFFLOAD,
  1143. + NL80211_EXT_FEATURE_OWE_OFFLOAD_AP,
  1144. + NL80211_EXT_FEATURE_DFS_CONCURRENT,
  1145. + NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT,
  1146. /* add new features before the definition below */
  1147. NUM_NL80211_EXT_FEATURES,
  1148. @@ -6555,7 +6732,7 @@ enum nl80211_timeout_reason {
  1149. * request parameters IE in the probe request
  1150. * @NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP: accept broadcast probe responses
  1151. * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE: send probe request frames at
  1152. - * rate of at least 5.5M. In case non OCE AP is discovered in the channel,
  1153. + * rate of at least 5.5M. In case non-OCE AP is discovered in the channel,
  1154. * only the first probe req in the channel will be sent in high rate.
  1155. * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: allow probe request
  1156. * tx deferral (dot11FILSProbeDelay shall be set to 15ms)
  1157. @@ -6591,7 +6768,7 @@ enum nl80211_timeout_reason {
  1158. * received on the 2.4/5 GHz channels to actively scan only the 6GHz
  1159. * channels on which APs are expected to be found. Note that when not set,
  1160. * the scan logic would scan all 6GHz channels, but since transmission of
  1161. - * probe requests on non PSC channels is limited, it is highly likely that
  1162. + * probe requests on non-PSC channels is limited, it is highly likely that
  1163. * these channels would passively be scanned. Also note that when the flag
  1164. * is set, in addition to the colocated APs, PSC channels would also be
  1165. * scanned if the user space has asked for it.
  1166. @@ -6641,6 +6818,8 @@ enum nl80211_acl_policy {
  1167. * @NL80211_SMPS_STATIC: static SMPS (use a single antenna)
  1168. * @NL80211_SMPS_DYNAMIC: dynamic smps (start with a single antenna and
  1169. * turn on other antennas after CTS/RTS).
  1170. + * @__NL80211_SMPS_AFTER_LAST: internal
  1171. + * @NL80211_SMPS_MAX: highest used enumeration
  1172. */
  1173. enum nl80211_smps_mode {
  1174. NL80211_SMPS_OFF,
  1175. @@ -6671,14 +6850,6 @@ enum nl80211_smps_mode {
  1176. * applicable for ETSI dfs domain where pre-CAC is valid for ever.
  1177. * @NL80211_RADAR_CAC_STARTED: Channel Availability Check has been started,
  1178. * should be generated by HW if NL80211_EXT_FEATURE_DFS_OFFLOAD is enabled.
  1179. - * @NL80211_RADAR_BACKGROUND_CHAN_UPDATE: background channel is updated by the
  1180. - * driver.
  1181. - * @NL80211_RADAR_BACKGROUND_CHAN_EXPAND: background channel is updated by the
  1182. - * driver and required to expand main operating channel.
  1183. - * @NL80211_RADAR_STA_CAC_SKIPPED: STA set the DFS state to available
  1184. - * when receiving CSA/assoc resp
  1185. - * @NL80211_RADAR_STA_CAC_EXPIRED: STA set the DFS state to usable
  1186. - * when STA is disconnected or leaving the channel
  1187. */
  1188. enum nl80211_radar_event {
  1189. NL80211_RADAR_DETECTED,
  1190. @@ -6687,10 +6858,6 @@ enum nl80211_radar_event {
  1191. NL80211_RADAR_NOP_FINISHED,
  1192. NL80211_RADAR_PRE_CAC_EXPIRED,
  1193. NL80211_RADAR_CAC_STARTED,
  1194. - NL80211_RADAR_BACKGROUND_CHAN_UPDATE,
  1195. - NL80211_RADAR_BACKGROUND_CHAN_EXPAND,
  1196. - NL80211_RADAR_STA_CAC_SKIPPED,
  1197. - NL80211_RADAR_STA_CAC_EXPIRED,
  1198. };
  1199. /**
  1200. @@ -6874,6 +7041,8 @@ enum nl80211_bss_select_attr {
  1201. * @NL80211_NAN_FUNC_PUBLISH: function is publish
  1202. * @NL80211_NAN_FUNC_SUBSCRIBE: function is subscribe
  1203. * @NL80211_NAN_FUNC_FOLLOW_UP: function is follow-up
  1204. + * @__NL80211_NAN_FUNC_TYPE_AFTER_LAST: internal use
  1205. + * @NL80211_NAN_FUNC_MAX_TYPE: internal use
  1206. */
  1207. enum nl80211_nan_function_type {
  1208. NL80211_NAN_FUNC_PUBLISH,
  1209. @@ -6935,7 +7104,7 @@ enum nl80211_nan_func_term_reason {
  1210. * The instance ID for the follow up Service Discovery Frame. This is u8.
  1211. * @NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID: relevant if the function's type
  1212. * is follow up. This is a u8.
  1213. - * The requestor instance ID for the follow up Service Discovery Frame.
  1214. + * The requester instance ID for the follow up Service Discovery Frame.
  1215. * @NL80211_NAN_FUNC_FOLLOW_UP_DEST: the MAC address of the recipient of the
  1216. * follow up Service Discovery Frame. This is a binary attribute.
  1217. * @NL80211_NAN_FUNC_CLOSE_RANGE: is this function limited for devices in a
  1218. @@ -7034,7 +7203,7 @@ enum nl80211_nan_match_attributes {
  1219. };
  1220. /**
  1221. - * nl80211_external_auth_action - Action to perform with external
  1222. + * enum nl80211_external_auth_action - Action to perform with external
  1223. * authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION.
  1224. * @NL80211_EXTERNAL_AUTH_START: Start the authentication.
  1225. * @NL80211_EXTERNAL_AUTH_ABORT: Abort the ongoing authentication.
  1226. @@ -7052,7 +7221,7 @@ enum nl80211_external_auth_action {
  1227. * @NL80211_FTM_RESP_ATTR_LCI: The content of Measurement Report Element
  1228. * (9.4.2.22 in 802.11-2016) with type 8 - LCI (9.4.2.22.10),
  1229. * i.e. starting with the measurement token
  1230. - * @NL80211_FTM_RESP_ATTR_CIVIC: The content of Measurement Report Element
  1231. + * @NL80211_FTM_RESP_ATTR_CIVICLOC: The content of Measurement Report Element
  1232. * (9.4.2.22 in 802.11-2016) with type 11 - Civic (Section 9.4.2.22.13),
  1233. * i.e. starting with the measurement token
  1234. * @__NL80211_FTM_RESP_ATTR_LAST: Internal
  1235. @@ -7325,7 +7494,7 @@ enum nl80211_peer_measurement_attrs {
  1236. * @NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED: flag attribute indicating if
  1237. * trigger based ranging measurement is supported
  1238. * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating
  1239. - * if non trigger based ranging measurement is supported
  1240. + * if non-trigger-based ranging measurement is supported
  1241. *
  1242. * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal
  1243. * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number
  1244. @@ -7379,7 +7548,7 @@ enum nl80211_peer_measurement_ftm_capa {
  1245. * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor
  1246. * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based
  1247. * ranging will be used.
  1248. - * @NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED: request non trigger based
  1249. + * @NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED: request non-trigger-based
  1250. * ranging measurement (flag)
  1251. * This attribute and %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED are
  1252. * mutually exclusive.
  1253. @@ -7457,7 +7626,7 @@ enum nl80211_peer_measurement_ftm_failur
  1254. * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS: number of FTM Request frames
  1255. * transmitted (u32, optional)
  1256. * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES: number of FTM Request frames
  1257. - * that were acknowleged (u32, optional)
  1258. + * that were acknowledged (u32, optional)
  1259. * @NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME: retry time received from the
  1260. * busy peer (u32, seconds)
  1261. * @NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP: actual number of bursts exponent
  1262. @@ -7618,7 +7787,7 @@ enum nl80211_iftype_akm_attributes {
  1263. * @NL80211_FILS_DISCOVERY_ATTR_INT_MIN: Minimum packet interval (u32, TU).
  1264. * Allowed range: 0..10000 (TU = Time Unit)
  1265. * @NL80211_FILS_DISCOVERY_ATTR_INT_MAX: Maximum packet interval (u32, TU).
  1266. - * Allowed range: 0..10000 (TU = Time Unit)
  1267. + * Allowed range: 0..10000 (TU = Time Unit). If set to 0, the feature is disabled.
  1268. * @NL80211_FILS_DISCOVERY_ATTR_TMPL: Template data for FILS discovery action
  1269. * frame including the headers.
  1270. *
  1271. @@ -7631,7 +7800,6 @@ enum nl80211_fils_discovery_attributes {
  1272. NL80211_FILS_DISCOVERY_ATTR_INT_MIN,
  1273. NL80211_FILS_DISCOVERY_ATTR_INT_MAX,
  1274. NL80211_FILS_DISCOVERY_ATTR_TMPL,
  1275. - NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INTE,
  1276. /* keep last */
  1277. __NL80211_FILS_DISCOVERY_ATTR_LAST,
  1278. @@ -7652,7 +7820,8 @@ enum nl80211_fils_discovery_attributes {
  1279. *
  1280. * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT: Maximum packet interval (u32, TU).
  1281. * Allowed range: 0..20 (TU = Time Unit). IEEE P802.11ax/D6.0
  1282. - * 26.17.2.3.2 (AP behavior for fast passive scanning).
  1283. + * 26.17.2.3.2 (AP behavior for fast passive scanning). If set to 0, the feature is
  1284. + * disabled.
  1285. * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL: Unsolicited broadcast probe response
  1286. * frame template (binary).
  1287. *
  1288. @@ -7695,6 +7864,7 @@ enum nl80211_sae_pwe_mechanism {
  1289. *
  1290. * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit
  1291. *
  1292. + * @NUM_NL80211_SAR_TYPE: internal
  1293. */
  1294. enum nl80211_sar_type {
  1295. NL80211_SAR_TYPE_POWER,
  1296. @@ -7708,6 +7878,8 @@ enum nl80211_sar_type {
  1297. /**
  1298. * enum nl80211_sar_attrs - Attributes for SAR spec
  1299. *
  1300. + * @__NL80211_SAR_ATTR_INVALID: Invalid
  1301. + *
  1302. * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type.
  1303. *
  1304. * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power
  1305. @@ -7739,6 +7911,8 @@ enum nl80211_sar_attrs {
  1306. /**
  1307. * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs
  1308. *
  1309. + * @__NL80211_SAR_ATTR_SPECS_INVALID: Invalid
  1310. + *
  1311. * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual
  1312. * power limit value in units of 0.25 dBm if type is
  1313. * NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm).
  1314. @@ -7853,4 +8027,54 @@ enum nl80211_ap_settings_flags {
  1315. NL80211_AP_SETTINGS_SA_QUERY_OFFLOAD_SUPPORT = 1 << 1,
  1316. };
  1317. +/**
  1318. + * enum nl80211_wiphy_radio_attrs - wiphy radio attributes
  1319. + *
  1320. + * @__NL80211_WIPHY_RADIO_ATTR_INVALID: Invalid
  1321. + *
  1322. + * @NL80211_WIPHY_RADIO_ATTR_INDEX: Index of this radio (u32)
  1323. + * @NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE: Frequency range supported by this
  1324. + * radio. Attribute may be present multiple times.
  1325. + * @NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION: Supported interface
  1326. + * combination for this radio. Attribute may be present multiple times
  1327. + * and contains attributes defined in &enum nl80211_if_combination_attrs.
  1328. + *
  1329. + * @__NL80211_WIPHY_RADIO_ATTR_LAST: Internal
  1330. + * @NL80211_WIPHY_RADIO_ATTR_MAX: Highest attribute
  1331. + */
  1332. +enum nl80211_wiphy_radio_attrs {
  1333. + __NL80211_WIPHY_RADIO_ATTR_INVALID,
  1334. +
  1335. + NL80211_WIPHY_RADIO_ATTR_INDEX,
  1336. + NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE,
  1337. + NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION,
  1338. +
  1339. + /* keep last */
  1340. + __NL80211_WIPHY_RADIO_ATTR_LAST,
  1341. + NL80211_WIPHY_RADIO_ATTR_MAX = __NL80211_WIPHY_RADIO_ATTR_LAST - 1,
  1342. +};
  1343. +
  1344. +/**
  1345. + * enum nl80211_wiphy_radio_freq_range - wiphy radio frequency range
  1346. + *
  1347. + * @__NL80211_WIPHY_RADIO_FREQ_ATTR_INVALID: Invalid
  1348. + *
  1349. + * @NL80211_WIPHY_RADIO_FREQ_ATTR_START: Frequency range start (u32).
  1350. + * The unit is kHz.
  1351. + * @NL80211_WIPHY_RADIO_FREQ_ATTR_END: Frequency range end (u32).
  1352. + * The unit is kHz.
  1353. + *
  1354. + * @__NL80211_WIPHY_RADIO_FREQ_ATTR_LAST: Internal
  1355. + * @NL80211_WIPHY_RADIO_FREQ_ATTR_MAX: Highest attribute
  1356. + */
  1357. +enum nl80211_wiphy_radio_freq_range {
  1358. + __NL80211_WIPHY_RADIO_FREQ_ATTR_INVALID,
  1359. +
  1360. + NL80211_WIPHY_RADIO_FREQ_ATTR_START,
  1361. + NL80211_WIPHY_RADIO_FREQ_ATTR_END,
  1362. +
  1363. + __NL80211_WIPHY_RADIO_FREQ_ATTR_LAST,
  1364. + NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = __NL80211_WIPHY_RADIO_FREQ_ATTR_LAST - 1,
  1365. +};
  1366. +
  1367. #endif /* __LINUX_NL80211_H */
  1368. --- a/iwinfo_nl80211.c
  1369. +++ b/iwinfo_nl80211.c
  1370. @@ -37,6 +37,11 @@
  1371. static struct nl80211_state *nls = NULL;
  1372. +struct nl80211_if_data {
  1373. + int mode;
  1374. + int radio_idx;
  1375. +};
  1376. +
  1377. static void nl80211_close(void)
  1378. {
  1379. if (nls)
  1380. @@ -862,7 +867,7 @@ static char * nl80211_phy2ifname(const c
  1381. static int nl80211_get_mode_cb(struct nl_msg *msg, void *arg)
  1382. {
  1383. - int *mode = arg;
  1384. + struct nl80211_if_data *data = arg;
  1385. struct nlattr **tb = nl80211_parse(msg);
  1386. const int ifmodes[NL80211_IFTYPE_MAX + 1] = {
  1387. IWINFO_OPMODE_UNKNOWN, /* unspecified */
  1388. @@ -878,37 +883,57 @@ static int nl80211_get_mode_cb(struct nl
  1389. };
  1390. if (tb[NL80211_ATTR_IFTYPE])
  1391. - *mode = ifmodes[nla_get_u32(tb[NL80211_ATTR_IFTYPE])];
  1392. + data->mode = ifmodes[nla_get_u32(tb[NL80211_ATTR_IFTYPE])];
  1393. +
  1394. + if (tb[NL80211_ATTR_VIF_RADIO_MASK]) {
  1395. + uint32_t mask = nla_get_u32(tb[NL80211_ATTR_VIF_RADIO_MASK]);
  1396. +
  1397. + for (int i = 0; mask && i < 32; i++, mask >>= 1)
  1398. + if (mask & 1)
  1399. + data->radio_idx = i;
  1400. + }
  1401. return NL_SKIP;
  1402. }
  1403. -static int nl80211_get_mode(const char *ifname, int *buf)
  1404. +static int nl80211_get_if_data(const char *ifname, struct nl80211_if_data *data)
  1405. {
  1406. char *res;
  1407. - *buf = IWINFO_OPMODE_UNKNOWN;
  1408. -
  1409. res = nl80211_phy2ifname(ifname);
  1410. + data->mode = IWINFO_OPMODE_UNKNOWN;
  1411. + data->radio_idx = -1;
  1412. nl80211_request(res ? res : ifname, NL80211_CMD_GET_INTERFACE, 0,
  1413. - nl80211_get_mode_cb, buf);
  1414. + nl80211_get_mode_cb, data);
  1415. - return (*buf == IWINFO_OPMODE_UNKNOWN) ? -1 : 0;
  1416. + return (data->mode == IWINFO_OPMODE_UNKNOWN) ? -1 : 0;
  1417. +}
  1418. +
  1419. +static int nl80211_get_mode(const char *ifname, int *buf)
  1420. +{
  1421. + struct nl80211_if_data data = {};
  1422. + int ret;
  1423. +
  1424. + ret = nl80211_get_if_data(ifname, &data);
  1425. + *buf = data.mode;
  1426. +
  1427. + return ret;
  1428. }
  1429. static int __nl80211_hostapd_query(const char *ifname, ...)
  1430. {
  1431. + struct nl80211_if_data data = {};
  1432. va_list ap, ap_cur;
  1433. char *phy, *search, *dest, *key, *val, buf[128];
  1434. - int len, mode, found = 0, match = 1;
  1435. + int len, found = 0, match = 1;
  1436. FILE *fp;
  1437. - if (nl80211_get_mode(ifname, &mode))
  1438. + if (nl80211_get_if_data(ifname, &data))
  1439. return 0;
  1440. - if (mode != IWINFO_OPMODE_MASTER && mode != IWINFO_OPMODE_AP_VLAN)
  1441. + if (data.mode != IWINFO_OPMODE_MASTER && data.mode != IWINFO_OPMODE_AP_VLAN)
  1442. return 0;
  1443. phy = nl80211_ifname2phy(ifname);
  1444. @@ -916,7 +941,10 @@ static int __nl80211_hostapd_query(const
  1445. if (!phy)
  1446. return 0;
  1447. - snprintf(buf, sizeof(buf), "/var/run/hostapd-%s.conf", phy);
  1448. + if (data.radio_idx >= 0)
  1449. + snprintf(buf, sizeof(buf), "/var/run/hostapd-%s.%d.conf", phy, data.radio_idx);
  1450. + else
  1451. + snprintf(buf, sizeof(buf), "/var/run/hostapd-%s.conf", phy);
  1452. fp = fopen(buf, "r");
  1453. if (!fp)