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