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