utils_mlo.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. /*
  2. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. /*
  18. * DOC: contains MLO manager containing util public api's
  19. */
  20. #ifndef _WLAN_UTILS_MLO_H_
  21. #define _WLAN_UTILS_MLO_H_
  22. #include <wlan_cmn_ieee80211.h>
  23. #include "wlan_mlo_mgr_public_structs.h"
  24. #include <wlan_cm_ucfg_api.h>
  25. #include <wlan_objmgr_vdev_obj.h>
  26. #ifdef WLAN_FEATURE_11BE_MLO
  27. /**
  28. * util_gen_link_assoc_req() - Generate link specific assoc request
  29. * @frame: Pointer to original association request. This should not contain the
  30. * 802.11 header, and must start from the fixed fields in the association
  31. * request. This is required due to some caller semantics built into the end to
  32. * end design.
  33. * @frame_len: Length of original association request
  34. * @isreassoc: Whether this is a re-association request
  35. * @link_id: Link ID for secondary links
  36. * @link_addr: Secondary link's MAC address
  37. * @link_frame: Generated secondary link specific association request. Note that
  38. * this will start from the 802.11 header (unlike the original association
  39. * request). This should be ignored in the case of failure.
  40. * @link_frame_maxsize: Maximum size of generated secondary link specific
  41. * association request
  42. * @link_frame_len: Pointer to location where populated length of generated
  43. * secondary link specific association request should be written. This should be
  44. * ignored in the case of failure.
  45. *
  46. * Generate a link specific logically equivalent association request for the
  47. * secondary link from the original association request containing a Multi-Link
  48. * element. This applies to both association and re-association requests.
  49. * Currently, only two link MLO is supported.
  50. *
  51. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  52. * the reason for error in the case of failure.
  53. */
  54. QDF_STATUS
  55. util_gen_link_assoc_req(uint8_t *frame, qdf_size_t frame_len, bool isreassoc,
  56. uint8_t link_id,
  57. struct qdf_mac_addr link_addr,
  58. uint8_t *link_frame,
  59. qdf_size_t link_frame_maxsize,
  60. qdf_size_t *link_frame_len);
  61. /**
  62. * util_gen_link_assoc_rsp() - Generate link specific assoc response
  63. * @frame: Pointer to original association response. This should not contain the
  64. * 802.11 header, and must start from the fixed fields in the association
  65. * response. This is required due to some caller semantics built into the end to
  66. * end design.
  67. * @frame_len: Length of original association response
  68. * @isreassoc: Whether this is a re-association response
  69. * @link_id: Link ID for secondary links
  70. * @link_addr: Secondary link's MAC address
  71. * @link_frame: Generated secondary link specific association response. Note
  72. * that this will start from the 802.11 header (unlike the original association
  73. * response). This should be ignored in the case of failure.
  74. * @link_frame_maxsize: Maximum size of generated secondary link specific
  75. * association response
  76. * @link_frame_len: Pointer to location where populated length of generated
  77. * secondary link specific association response should be written. This should
  78. * be ignored in the case of failure.
  79. *
  80. * Generate a link specific logically equivalent association response for the
  81. * secondary link from the original association response containing a Multi-Link
  82. * element. This applies to both association and re-association responses.
  83. * Currently, only two link MLO is supported.
  84. *
  85. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  86. * the reason for error in the case of failure.
  87. */
  88. QDF_STATUS
  89. util_gen_link_assoc_rsp(uint8_t *frame, qdf_size_t frame_len, bool isreassoc,
  90. uint8_t link_id,
  91. struct qdf_mac_addr link_addr,
  92. uint8_t *link_frame,
  93. qdf_size_t link_frame_maxsize,
  94. qdf_size_t *link_frame_len);
  95. /**
  96. * util_gen_link_probe_rsp() - Generate link specific probe response
  97. * @frame: Pointer to original probe response. This should not contain the
  98. * 802.11 header, and must start from the fixed fields in the probe
  99. * response. This is required due to some caller semantics built into the end to
  100. * end design.
  101. * @frame_len: Length of original probe response
  102. * @link_addr: Secondary link's MAC address
  103. * @link_id: Link ID for secondary links
  104. * @link_frame: Generated secondary link specific probe response. Note
  105. * that this will start from the 802.11 header (unlike the original probe
  106. * response). This should be ignored in the case of failure.
  107. * @link_frame_maxsize: Maximum size of generated secondary link specific
  108. * probe response
  109. * @link_frame_len: Pointer to location where populated length of generated
  110. * secondary link specific probe response should be written. This should
  111. * be ignored in the case of failure.
  112. *
  113. * Generate a link specific logically equivalent probe response for the
  114. * secondary link from the original probe response containing a Multi-Link
  115. * element. This applies to both probe responses.
  116. * Currently, only two link MLO is supported.
  117. *
  118. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  119. * the reason for error in the case of failure.
  120. */
  121. QDF_STATUS
  122. util_gen_link_probe_rsp(uint8_t *frame, qdf_size_t frame_len,
  123. uint8_t link_id,
  124. struct qdf_mac_addr link_addr,
  125. uint8_t *link_frame,
  126. qdf_size_t link_frame_maxsize,
  127. qdf_size_t *link_frame_len);
  128. /**
  129. * util_find_mlie - Find the first Multi-Link element or the start of the first
  130. * Multi-Link element fragment sequence in a given buffer containing elements,
  131. * if a Multi-Link element or element fragment sequence exists in the given
  132. * buffer.
  133. *
  134. * @buf: Buffer to be searched for the Multi-Link element or the start of the
  135. * Multi-Link element fragment sequence
  136. * @buflen: Length of the buffer
  137. * @mlieseq: Pointer to location where the starting address of the Multi-Link
  138. * element or Multi-Link element fragment sequence should be updated if found
  139. * in the given buffer. The value NULL will be updated to this location if the
  140. * element or element fragment sequence is not found. This should be ignored by
  141. * the caller if the function returns error.
  142. * @mlieseqlen: Pointer to location where the total length of the Multi-Link
  143. * element or Multi-Link element fragment sequence should be updated if found
  144. * in the given buffer. This should be ignored by the caller if the function
  145. * returns error, or if the function indicates that the element or element
  146. * fragment sequence was not found by providing a starting address of NULL.
  147. *
  148. * Find the first Multi-Link element or the start of the first Multi-Link
  149. * element fragment sequence in a given buffer containing elements, if a
  150. * Multi-Link element or element fragment sequence exists in the given buffer.
  151. * The buffer should contain only 802.11 Information elements, and thus should
  152. * not contain other information like 802.11 header, 802.11 frame body
  153. * components like fields that are not elements (e.g. Capability Information
  154. * field, Beacon Interval field), etc.
  155. *
  156. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  157. * the reason for error in the case of failure
  158. */
  159. QDF_STATUS
  160. util_find_mlie(uint8_t *buf, qdf_size_t buflen, uint8_t **mlieseq,
  161. qdf_size_t *mlieseqlen);
  162. /**
  163. * util_find_mlie_by_variant - Find the first Multi-Link element or the start of
  164. * the first Multi-Link element fragment sequence in a given buffer containing
  165. * elements based on variant, if a Multi-Link element or element fragment
  166. * sequence exists in the given buffer.
  167. *
  168. * @buf: Buffer to be searched for the Multi-Link element or the start of the
  169. * Multi-Link element fragment sequence
  170. * @buflen: Length of the buffer
  171. * @mlieseq: Based on the variant, pointer to location where the starting
  172. * address of the Multi-Link element or Multi-Link element fragment sequence
  173. * should be updated if found in the given buffer. The value NULL will be
  174. * updated to this location if the element or element fragment sequence is not
  175. * found. This should be ignored by the caller if the function returns error.
  176. * @mlieseqlen: Pointer to location where the total length of the Multi-Link
  177. * element or Multi-Link element fragment sequence should be updated if found
  178. * in the given buffer. This should be ignored by the caller if the function
  179. * returns error, or if the function indicates that the element or element
  180. * fragment sequence was not found by providing a starting address of NULL.
  181. * @variant: Multi-Link element variant. The value should be interpreted by the
  182. * caller as a member of enum wlan_ml_variant. (This enum is not directly used
  183. * as an argument, so that non-MLO code that happens to call this function does
  184. * not need to be aware of the definition of the enum, though such a call would
  185. * ultimately result in an error).
  186. *
  187. * Based on variant, find the Multi-Link element or the start of the Multi-Link
  188. * element fragment sequence in a given buffer containing elements, if a
  189. * Multi-Link element or element fragment sequence exists in the given buffer.
  190. * The buffer should contain only 802.11 Information elements, and thus should
  191. * not contain other information like 802.11 header, 802.11 frame body
  192. * components like fields that are not elements (e.g. Capability Information
  193. * field, Beacon Interval field), etc.
  194. *
  195. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  196. * the reason for error in the case of failure
  197. */
  198. QDF_STATUS
  199. util_find_mlie_by_variant(uint8_t *buf, qdf_size_t buflen, uint8_t **mlieseq,
  200. qdf_size_t *mlieseqlen, int variant);
  201. /**
  202. * util_get_mlie_variant() - Get ML IE variant
  203. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  204. * fragment sequence
  205. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  206. * fragment sequence
  207. * @variant: Pointer to the location where the value of the variant should be
  208. * updated. On success, the value should be interpreted by the caller as a
  209. * member of enum wlan_ml_variant. (This enum is not directly used as an
  210. * argument, so that non-MLO code that happens to call this function does not
  211. * need to be aware of the definition of the enum, though such a call would
  212. * ultimately result in an error). The value should be ignored by the caller if
  213. * the function returns error.
  214. *
  215. * Get the variant of the given Multi-Link element or element fragment sequence.
  216. *
  217. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  218. * the reason for error in the case of failure
  219. */
  220. QDF_STATUS
  221. util_get_mlie_variant(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  222. int *variant);
  223. /**
  224. * util_get_bvmlie_mldmacaddr() - Get the MLD MAC address
  225. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  226. * fragment sequence
  227. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  228. * fragment sequence
  229. * @mldmacaddr: Pointer to the location where the MLD MAC address should be
  230. * updated. This should be ignored by the caller if the function returns error.
  231. *
  232. * Get the MLD MAC address from a given Basic variant Multi-Link element
  233. * or element fragment sequence.
  234. *
  235. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  236. * the reason for error in the case of failure
  237. */
  238. QDF_STATUS
  239. util_get_bvmlie_mldmacaddr(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  240. struct qdf_mac_addr *mldmacaddr);
  241. /**
  242. * util_get_bvmlie_eml_cap() - Get the EML capabilities
  243. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  244. * fragment sequence
  245. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  246. * fragment sequence
  247. * @eml_cap_found: Pointer to the location where a boolean status should be
  248. * updated indicating whether the EML cabalility was found or not. This should
  249. * be ignored by the caller if the function returns error.
  250. * @eml_cap: Pointer to the location where the EML capabilities should be
  251. * updated. This should be ignored by the caller if the function indicates
  252. * that the EML capability was not found.
  253. *
  254. * Get the EML capabilities from a given Basic variant Multi-Link element or
  255. * element fragment sequence.
  256. *
  257. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  258. * the reason for error in the case of failure
  259. */
  260. QDF_STATUS
  261. util_get_bvmlie_eml_cap(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  262. bool *eml_cap_found,
  263. uint16_t *eml_cap);
  264. /**
  265. * util_get_bvmlie_msd_cap() - Get the MSD capabilities for Basic variant
  266. * MLO IE
  267. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  268. * fragment sequence
  269. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  270. * fragment sequence
  271. * @msd_cap_found: Pointer to the location where a boolean status should be
  272. * updated indicating whether the MSD cabalility was found or not. This should
  273. * be ignored by the caller if the function returns error.
  274. * @msd_cap: Pointer to the location where the MSD capabilities should be
  275. * updated. This should be ignored by the caller if the function indicates
  276. * that the MSD capability was not found.
  277. *
  278. * Get the MSD capabilities from a given Basic variant Multi-Link element or
  279. * element fragment sequence.
  280. *
  281. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  282. * the reason for error in the case of failure
  283. */
  284. QDF_STATUS
  285. util_get_bvmlie_msd_cap(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  286. bool *msd_cap_found, uint16_t *msd_cap);
  287. /**
  288. * util_get_bvmlie_primary_linkid() - Get the link identifier
  289. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  290. * fragment sequence
  291. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  292. * fragment sequence
  293. * @linkidfound: Pointer to the location where a boolean status should be
  294. * updated indicating whether the link identifier was found or not. This should
  295. * be ignored by the caller if the function returns error.
  296. * @linkid: Pointer to the location where the value of the link identifier
  297. * should be updated. This should be ignored by the caller if the function
  298. * returns error, or if the function indicates that the link identifier was not
  299. * found.
  300. *
  301. * Get the link identifier from a given Basic variant Multi-Link element or
  302. * element fragment sequence, of the AP that transmits the Multi-Link
  303. * element/element fragment sequence or the nontransmitted BSSID in the same
  304. * multiple BSSID set as the AP that transmits the Multi-Link element/element
  305. * fragment sequence and that is affiliated with the MLD that is described in
  306. * the Multi-Link element.
  307. *
  308. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  309. * the reason for error in the case of failure
  310. */
  311. QDF_STATUS
  312. util_get_bvmlie_primary_linkid(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  313. bool *linkidfound, uint8_t *linkid);
  314. /**
  315. * util_get_mlie_common_info_len() - Get the MLD common info len
  316. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  317. * fragment sequence
  318. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  319. * fragment sequence
  320. * @commoninfo_len: Pointer to the location where the value of the MLD common
  321. * info len should be updated. This should be ignored by the caller if the
  322. * function returns error.
  323. *
  324. * Get the MLD common info len from Multi-Link element transmitted by the AP.
  325. *
  326. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  327. * the reason for error in the case of failure
  328. */
  329. QDF_STATUS
  330. util_get_mlie_common_info_len(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  331. uint8_t *commoninfo_len);
  332. /**
  333. * util_get_bvmlie_bssparamchangecnt() - Get the MLD BSS PARAM Change Count
  334. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  335. * fragment sequence
  336. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  337. * fragment sequence
  338. * @bssparamchangecntfound: Pointer to the location where a boolean status
  339. * should be updated indicating whether the MLD BSS PARAM Change Count was
  340. * found or not. This should be ignored by the caller if the function
  341. * returns error.
  342. * @bssparamchangecnt: Pointer to the location where the value of the MLD BSS
  343. * PARAM Change Count should be updated. This should be ignored by the caller
  344. * if the function returns error, or if the function indicates that the MLD
  345. * BSS PARAM Change Count was not found.
  346. *
  347. * Get the MLD BSS PARAM Change Count from Multi-Link element transmitted
  348. * by the AP.
  349. *
  350. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  351. * the reason for error in the case of failure
  352. */
  353. QDF_STATUS
  354. util_get_bvmlie_bssparamchangecnt(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  355. bool *bssparamchangecntfound,
  356. uint8_t *bssparamchangecnt);
  357. /**
  358. * util_get_bvmlie_mldcap() - Get the MLD capabilities
  359. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  360. * fragment sequence
  361. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  362. * fragment sequence
  363. * @mldcapfound: Pointer to the location where a boolean status should be
  364. * updated indicating whether the MLD capabilities was found or not. This should
  365. * be ignored by the caller if the function returns error.
  366. * @mldcap: Pointer to the location where the value of the MLD capabilities
  367. * should be updated. This should be ignored by the caller if the function
  368. * returns error, or if the function indicates that the MLD capabilities was not
  369. * found.
  370. *
  371. * Get the MLD capabilities from a given Basic variant Multi-Link element or
  372. * element fragment sequence, of the AP that transmits the Multi-Link
  373. * element/element fragment sequence or the nontransmitted BSSID in the same
  374. * multiple BSSID set as the AP that transmits the Multi-Link element/element
  375. * fragment sequence and that is affiliated with the MLD that is described in
  376. * the Multi-Link element.
  377. *
  378. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  379. * the reason for error in the case of failure
  380. */
  381. QDF_STATUS
  382. util_get_bvmlie_mldcap(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  383. bool *mldcapfound, uint16_t *mldcap);
  384. /**
  385. * util_get_bvmlie_persta_partner_info() - Get per-STA partner link information
  386. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  387. * fragment sequence
  388. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  389. * fragment sequence
  390. * @partner_info: Pointer to the location where the partner link information
  391. * should be updated. This should be ignored by the caller if the function
  392. * returns error. Note that success will be returned and the number of links in
  393. * this structure will be reported as 0, if no Link Info is found, or no per-STA
  394. * profile is found, or if none of the per-STA profiles includes a MAC address
  395. * in the STA Info field (assuming no errors are encountered).
  396. *
  397. * Get partner link information in the per-STA profiles present in a Basic
  398. * variant Multi-Link element. The partner link information is returned only for
  399. * those per-STA profiles which have a MAC address in the STA Info field.
  400. *
  401. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  402. * the reason for error in the case of failure
  403. */
  404. QDF_STATUS
  405. util_get_bvmlie_persta_partner_info(uint8_t *mlieseq,
  406. qdf_size_t mlieseqlen,
  407. struct mlo_partner_info *partner_info);
  408. /**
  409. * util_get_prvmlie_mldid - Get the MLD ID from a given Probe Request
  410. * variant Multi-Link element , of the STA that transmits ML Probe Request
  411. * with the Multi-Link element
  412. *
  413. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  414. * fragment sequence
  415. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  416. * fragment sequence
  417. * @mldidfound: Pointer to the location where a boolean status should be
  418. * updated indicating whether the MLD ID was found or not. This should
  419. * be ignored by the caller if the function returns error.
  420. * @mldid: Pointer to the location where the value of the MLD ID
  421. * should be updated. This should be ignored by the caller if the function
  422. * returns error, or if the function indicates that the MLD ID was not
  423. * found.
  424. *
  425. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  426. * the reason for error in the case of failure
  427. */
  428. QDF_STATUS
  429. util_get_prvmlie_mldid(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  430. bool *mldidfound, uint8_t *mldid);
  431. /**
  432. * util_get_prvmlie_persta_link_id() - Get per-STA probe req link information
  433. *
  434. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  435. * fragment sequence
  436. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  437. * fragment sequence
  438. * @probereq_info: Pointer to the location where the probe req link information
  439. * should be updated. This should be ignored by the caller if the function
  440. * returns error. Note that success will be returned and the number of links in
  441. * this structure will be reported as 0, if no Link Info is found, or no per-STA
  442. * profile is found.
  443. *
  444. * Get probe req link information in the per-STA profiles present in a Probe req
  445. * variant Multi-Link element.
  446. *
  447. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  448. * the reason for error in the case of failure
  449. */
  450. QDF_STATUS
  451. util_get_prvmlie_persta_link_id(uint8_t *mlieseq,
  452. qdf_size_t mlieseqlen,
  453. struct mlo_probereq_info *probereq_info);
  454. /**
  455. * util_get_rvmlie_mldmacaddr() - Get the MLD MAC address from a given Reconfig
  456. * variant Multi-Link element.
  457. *
  458. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  459. * fragment sequence
  460. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  461. * fragment sequence
  462. * @mldmacaddr: Pointer to the location where the MLD MAC address should be
  463. * updated. This should be ignored by the caller if the function returns error.
  464. *
  465. * Get the MLD MAC address from a given Reconfig variant Multi-Link element
  466. * or element fragment sequence.
  467. *
  468. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  469. * the reason for error in the case of failure
  470. */
  471. QDF_STATUS
  472. util_get_rvmlie_mldmacaddr(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  473. struct qdf_mac_addr *mldmacaddr);
  474. /**
  475. * util_get_rvmlie_persta_link_info() - Get per-STA reconfig link information
  476. *
  477. * @mlieseq: Starting address of the Multi-Link element or Multi-Link element
  478. * fragment sequence
  479. * @mlieseqlen: Total length of the Multi-Link element or Multi-Link element
  480. * fragment sequence
  481. * @reconfig_info: Pointer to the location where the reconfig link information
  482. * should be updated. This should be ignored by the caller if the function
  483. * returns error. Note that success will be returned and the number of links in
  484. * this structure will be reported as 0, if no Link Info is found, or no per-STA
  485. * profile is found.
  486. *
  487. * Get reconfig link information in the per-STA profiles present in a Reconfig
  488. * variant Multi-Link element.
  489. *
  490. * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
  491. * the reason for error in the case of failure.
  492. */
  493. QDF_STATUS
  494. util_get_rvmlie_persta_link_info(uint8_t *mlieseq,
  495. qdf_size_t mlieseqlen,
  496. struct ml_rv_info *reconfig_info);
  497. #else
  498. static inline QDF_STATUS
  499. util_gen_link_assoc_req(uint8_t *frame, qdf_size_t frame_len, bool isreassoc,
  500. uint8_t link_id,
  501. struct qdf_mac_addr link_addr,
  502. uint8_t *link_frame,
  503. qdf_size_t link_frame_maxsize,
  504. qdf_size_t *link_frame_len)
  505. {
  506. return QDF_STATUS_E_NOSUPPORT;
  507. }
  508. static inline QDF_STATUS
  509. util_gen_link_assoc_rsp(uint8_t *frame, qdf_size_t frame_len, bool isreassoc,
  510. uint8_t link_id,
  511. struct qdf_mac_addr link_addr,
  512. uint8_t *link_frame,
  513. qdf_size_t link_frame_maxsize,
  514. qdf_size_t *link_frame_len)
  515. {
  516. return QDF_STATUS_E_NOSUPPORT;
  517. }
  518. static inline QDF_STATUS
  519. util_find_mlie(uint8_t *buf, qdf_size_t buflen, uint8_t **mlieseq,
  520. qdf_size_t *mlieseqlen)
  521. {
  522. return QDF_STATUS_E_NOSUPPORT;
  523. }
  524. static inline QDF_STATUS
  525. util_find_mlie_by_variant(uint8_t *buf, qdf_size_t buflen, uint8_t **mlieseq,
  526. qdf_size_t *mlieseqlen)
  527. {
  528. return QDF_STATUS_E_FAILURE;
  529. }
  530. static inline QDF_STATUS
  531. util_get_mlie_variant(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  532. int *variant)
  533. {
  534. return QDF_STATUS_E_NOSUPPORT;
  535. }
  536. static inline QDF_STATUS
  537. util_get_mlie_common_info_len(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  538. uint8_t *commoninfo_len)
  539. {
  540. return QDF_STATUS_E_NOSUPPORT;
  541. }
  542. static inline QDF_STATUS
  543. util_get_bvmlie_bssparamchangecnt(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  544. bool *bssparamchangecntfound,
  545. uint8_t *bssparamchangecnt)
  546. {
  547. return QDF_STATUS_E_NOSUPPORT;
  548. }
  549. static inline QDF_STATUS
  550. util_get_bvmlie_mldmacaddr(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  551. struct qdf_mac_addr *mldmacaddr)
  552. {
  553. return QDF_STATUS_E_NOSUPPORT;
  554. }
  555. static inline QDF_STATUS
  556. util_get_bvmlie_eml_cap(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  557. bool *eml_cap_found,
  558. uint16_t *eml_cap)
  559. {
  560. return QDF_STATUS_E_NOSUPPORT;
  561. }
  562. static inline QDF_STATUS
  563. util_get_bvmlie_msd_cap(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  564. bool *msd_cap_found,
  565. uint16_t *msd_cap)
  566. {
  567. return QDF_STATUS_E_NOSUPPORT;
  568. }
  569. static inline QDF_STATUS
  570. util_get_bvmlie_primary_linkid(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  571. bool *linkidfound, uint8_t *linkid)
  572. {
  573. return QDF_STATUS_E_NOSUPPORT;
  574. }
  575. static inline QDF_STATUS
  576. util_get_bvmlie_persta_partner_info(uint8_t *mlieseq,
  577. qdf_size_t mlieseqlen,
  578. struct mlo_partner_info *partner_info)
  579. {
  580. return QDF_STATUS_E_NOSUPPORT;
  581. }
  582. static inline QDF_STATUS
  583. util_get_prvmlie_persta_link_id(uint8_t *mlieseq,
  584. qdf_size_t mlieseqlen,
  585. struct mlo_probereq_info *probereq_info)
  586. {
  587. return QDF_STATUS_E_NOSUPPORT;
  588. }
  589. static inline QDF_STATUS
  590. util_get_prvmlie_mldid(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  591. bool *mldcapfound, uint8_t *mldcap)
  592. {
  593. return QDF_STATUS_E_NOSUPPORT;
  594. }
  595. static inline QDF_STATUS
  596. util_get_rvmlie_mldmacaddr(uint8_t *mlieseq, qdf_size_t mlieseqlen,
  597. struct qdf_mac_addr *mldmacaddr)
  598. {
  599. return QDF_STATUS_E_NOSUPPORT;
  600. }
  601. static inline QDF_STATUS
  602. util_get_rvmlie_persta_link_info(uint8_t *mlieseq,
  603. qdf_size_t mlieseqlen,
  604. struct ml_rv_info *reconfig_info)
  605. {
  606. return QDF_STATUS_E_NOSUPPORT;
  607. }
  608. #endif /* WLAN_FEATURE_11BE_MLO */
  609. #endif /* _WLAN_UTILS_MLO_H_ */