utils_mlo.h 25 KB

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