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 structure definitions 20 */ 21 #ifndef __MLO_MGR_PUBLIC_STRUCTS_H 22 #define __MLO_MGR_PUBLIC_STRUCTS_H 23 24 #include <wlan_objmgr_cmn.h> 25 #include <qdf_list.h> 26 #include <qdf_atomic.h> 27 #include <qdf_nbuf.h> 28 #include <wlan_cmn_ieee80211.h> 29 #include <wlan_cmn.h> 30 #include <wlan_objmgr_global_obj.h> 31 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 32 #include <qdf_event.h> 33 #endif 34 #include <wlan_mlo_t2lm.h> 35 36 /* MAX MLO dev support */ 37 #ifndef WLAN_UMAC_MLO_MAX_VDEVS 38 #define WLAN_UMAC_MLO_MAX_VDEVS 2 39 #endif 40 41 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 42 /* Max bridge vdevs supported */ 43 #define WLAN_UMAC_MLO_MAX_BRIDGE_VDEVS 2 44 /* Max number of PSOC taking part in topology decision at a time*/ 45 #define WLAN_UMAC_MLO_MAX_PSOC_TOPOLOGY 3 46 #endif 47 48 #include <wlan_mlo_epcs.h> 49 50 /* MAX instances of ML devices */ 51 #ifndef WLAN_UMAC_MLO_MAX_DEV 52 #define WLAN_UMAC_MLO_MAX_DEV 2 53 #endif 54 55 /* MAX MLO Assoc Links per MLD */ 56 #ifndef WLAN_UMAC_MLO_ASSOC_MAX_SUPPORTED_LINKS 57 #ifdef SAP_MULTI_LINK_EMULATION 58 #define WLAN_UMAC_MLO_ASSOC_MAX_SUPPORTED_LINKS 2 59 #else 60 #define WLAN_UMAC_MLO_ASSOC_MAX_SUPPORTED_LINKS 1 61 #endif 62 #endif 63 64 65 /* Default Initialization value for Max Recommended Simultaneous Links */ 66 #ifndef WLAN_UMAC_MLO_RECOM_MAX_SIMULT_LINKS_DEFAULT 67 #define WLAN_UMAC_MLO_RECOM_MAX_SIMULT_LINKS_DEFAULT 2 68 #endif 69 70 /* Max PEER support */ 71 #define MAX_MLO_PEER 512 72 73 struct mlo_mlme_ext_ops; 74 struct mlo_osif_ext_ops; 75 struct vdev_mlme_obj; 76 struct wlan_t2lm_context; 77 struct mlo_link_switch_context; 78 struct wlan_mlo_link_switch_req; 79 80 /* Max LINK PEER support */ 81 #define MAX_MLO_LINK_PEERS WLAN_UMAC_MLO_MAX_VDEVS 82 83 /* MAX MLO peer_id supported by FW is 128 */ 84 #define MAX_MLO_PEER_ID 128 85 #define MLO_INVALID_PEER_ID 0xFFFF 86 87 /* IE nomenclature */ 88 #define ID_POS 0 89 #define TAG_LEN_POS 1 90 #define IDEXT_POS 2 91 #define MIN_IE_LEN 2 92 #define MULTI_LINK_CTRL_1 3 93 #define MULTI_LINK_CTRL_2 4 94 #define STA_CTRL_1 2 95 #define STA_CTRL_2 3 96 #define STA_PROFILE_SUB_ELEM_ID 0 97 #define PER_STA_PROF_MAC_ADDR_START 4 98 99 /* MLO link id max value */ 100 #define MAX_MLO_LINK_ID 15 101 102 #ifdef WLAN_MLO_MULTI_CHIP 103 104 #ifndef WLAN_MAX_MLO_GROUPS 105 #define WLAN_MAX_MLO_GROUPS 2 106 #endif 107 108 /** 109 * enum MLO_LINK_STATE - MLO link state enums 110 * @MLO_LINK_SETUP_INIT: MLO link SETUP exchange not yet done 111 * @MLO_LINK_SETUP_DONE: MLO link SETUP exchange started 112 * @MLO_LINK_READY: MLO link SETUP done and READY sent 113 * @MLO_LINK_TEARDOWN: MLO teardown done. 114 * @MLO_LINK_UNINITIALIZED: MLO link in blank state 115 */ 116 enum MLO_LINK_STATE { 117 MLO_LINK_SETUP_INIT, 118 MLO_LINK_SETUP_DONE, 119 MLO_LINK_READY, 120 MLO_LINK_TEARDOWN, 121 MLO_LINK_UNINITIALIZED, 122 }; 123 124 /** 125 * enum MLO_SOC_LIST - MLO SOC LIST 126 * @WLAN_MLO_GROUP_DEFAULT_SOC_LIST: All MLO SoCs that are part of this MLO 127 * group, (inclusive of both setup sequence 128 * completed, not yet completed) 129 * @WLAN_MLO_GROUP_CURRENT_SOC_LIST: Current MLO SoCs that are probed for which 130 * the setup sequence has been completed 131 */ 132 enum MLO_SOC_LIST { 133 WLAN_MLO_GROUP_DEFAULT_SOC_LIST, 134 WLAN_MLO_GROUP_CURRENT_SOC_LIST, 135 }; 136 137 /* 138 * Maximum number of MLO LINKS across the system, 139 * this is not the MLO links within and AP-MLD. 140 */ 141 142 #define MAX_MLO_LINKS 6 143 #define MAX_MLO_CHIPS 5 144 #define MAX_ADJ_CHIPS 2 145 146 /* MLO Bridge link */ 147 #define MLO_NUM_CHIPS_FOR_BRIDGE_LINK 4 148 #define MLO_MAX_BRIDGE_LINKS_PER_MLD 2 149 #define MLO_MAX_BRIDGE_LINKS_PER_RADIO 8 150 151 /** 152 * struct mlo_chip_info: MLO chip info per link 153 * @info_valid: If the info here is valid or not 154 * @chip_id: Chip ID as assigned by platform 155 * @adj_chip_ids: Chip IDs of Adjacent chips 156 */ 157 struct mlo_chip_info { 158 uint8_t info_valid; 159 uint8_t chip_id[MAX_MLO_CHIPS]; 160 uint8_t adj_chip_ids[MAX_MLO_CHIPS][MAX_ADJ_CHIPS]; 161 }; 162 163 #define START_STOP_INPROGRESS_BIT 0 164 165 /** 166 * struct mlo_setup_info: MLO setup status per link 167 * @ml_grp_id: Unique id for ML grouping of Pdevs/links 168 * @tot_socs: Total number of soc participating in ML group 169 * @num_soc: Number of soc ready or probed 170 * @tot_links: Total links in ML group 171 * @num_links: Number of links probed in ML group 172 * @pdev_list: current pdev pointers belonging to this group 173 * @curr_soc_list: current psoc pointers belonging to this group 174 * @soc_list: Actual psoc pointers part of this group 175 * @soc_id_list: list of soc ids part of this mlo group 176 * @state: MLO link state 177 * @valid_link_bitmap: valid MLO link bitmap 178 * @trigger_umac_reset: teardown require umac reset, for mode1 SSR 179 * @state_lock: lock to protect access to link state 180 * @event: event for teardown completion 181 * @start_stop_inprogress: MLO group start/stop in progress 182 * @dp_handle: pointer to DP ML context 183 * @chip_info: chip specific info of the soc 184 * @tsf_sync_enabled: MLO TSF sync is enabled at FW or not 185 * @wsi_stats_info_support: WSI stats support at FW or not 186 */ 187 struct mlo_setup_info { 188 uint8_t ml_grp_id; 189 uint8_t tot_socs; 190 uint8_t num_soc; 191 uint8_t tot_links; 192 uint8_t num_links; 193 struct wlan_objmgr_pdev *pdev_list[MAX_MLO_LINKS]; 194 struct wlan_objmgr_psoc *curr_soc_list[MAX_MLO_CHIPS]; 195 struct wlan_objmgr_psoc *soc_list[MAX_MLO_CHIPS]; 196 uint8_t soc_id_list[MAX_MLO_CHIPS]; 197 enum MLO_LINK_STATE state[MAX_MLO_LINKS]; 198 uint16_t valid_link_bitmap; 199 bool trigger_umac_reset; 200 qdf_spinlock_t state_lock; 201 qdf_event_t event; 202 unsigned long start_stop_inprogress; 203 struct cdp_mlo_ctxt *dp_handle; 204 struct mlo_chip_info chip_info; 205 bool tsf_sync_enabled; 206 uint8_t wsi_stats_info_support; 207 }; 208 209 /** 210 * struct mlo_state_params: MLO state params for pdev iteration 211 * @link_state_fail: Flag to check when pdev not in expected state 212 * @check_state: State on against which pdev is to be expected 213 * @grp_id: Id of the required MLO Group 214 */ 215 struct mlo_state_params { 216 bool link_state_fail; 217 enum MLO_LINK_STATE check_state; 218 uint8_t grp_id; 219 }; 220 221 #endif 222 223 /** 224 * enum wlan_mlo_link_switch_notify_reason - Enum for link switch notifier 225 * callback trigger reason. 226 * @MLO_LINK_SWITCH_NOTIFY_REASON_PRE_START_PRE_SER: Prior to start of 227 * link switch and prior to 228 * serializing link switch. 229 * @MLO_LINK_SWITCH_NOTIFY_REASON_PRE_START_POST_SER: Prior to link switch start 230 * but link switch is 231 * serialized 232 * @MLO_LINK_SWITCH_NOTIFY_REASON_STOP_FAILURE: Link switch failure notify 233 * @MLO_LINK_SWITCH_NOTIFY_REASON_STOP_SUCCESS: Link switch success notify 234 */ 235 enum wlan_mlo_link_switch_notify_reason { 236 MLO_LINK_SWITCH_NOTIFY_REASON_PRE_START_PRE_SER, 237 MLO_LINK_SWITCH_NOTIFY_REASON_PRE_START_POST_SER, 238 MLO_LINK_SWITCH_NOTIFY_REASON_STOP_FAILURE, 239 MLO_LINK_SWITCH_NOTIFY_REASON_STOP_SUCCESS, 240 }; 241 242 typedef QDF_STATUS 243 (*mlo_mgr_link_switch_notifier_cb)(struct wlan_objmgr_vdev *vdev, 244 struct wlan_mlo_link_switch_req *lswitch_req, 245 enum wlan_mlo_link_switch_notify_reason notify_reason); 246 247 #ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE 248 /* 249 * struct wlan_mlo_link_switch_notifier - Link switch notifier callbacks 250 * @in_use: Set to true on successful notifier callback registration 251 * @cb: Callback to notify link switch start 252 */ 253 struct wlan_mlo_link_switch_notifier { 254 bool in_use; 255 mlo_mgr_link_switch_notifier_cb cb; 256 }; 257 258 /** 259 * mlo_mgr_register_link_switch_notifier() - API to register link switch 260 * start notifier callback 261 * @comp_id: Component requesting notification on link switch start 262 * @cb: Callback to register. 263 * 264 * The @cb will be triggered on start of link switch with params of the 265 * link switch. 266 * 267 * Return: QDF_STATUS 268 */ 269 QDF_STATUS 270 mlo_mgr_register_link_switch_notifier(enum wlan_umac_comp_id comp_id, 271 mlo_mgr_link_switch_notifier_cb cb); 272 273 /** 274 * mlo_mgr_unregister_link_switch_notifier() - API to unregister link switch 275 * notifier callback. 276 * @comp_id: Component to deregister. 277 * 278 * The API will cleanup the notification callback registered for link switch. 279 * 280 * Return: QDF_STATUS 281 */ 282 QDF_STATUS 283 mlo_mgr_unregister_link_switch_notifier(enum wlan_umac_comp_id comp_id); 284 #else 285 static inline QDF_STATUS 286 mlo_mgr_register_link_switch_notifier(enum wlan_umac_comp_id comp_id, 287 mlo_mgr_link_switch_notifier_cb cb) 288 { 289 return QDF_STATUS_E_NOSUPPORT; 290 } 291 292 static inline QDF_STATUS 293 mlo_mgr_unregister_link_switch_notifier(enum wlan_umac_comp_id comp_id) 294 { 295 return QDF_STATUS_E_NOSUPPORT; 296 } 297 #endif /* WLAN_FEATURE_11BE_MLO_ADV_FEATURE */ 298 299 /* 300 * struct mlo_wsi_link_stats - MLO ingress/egress counters of PSOC 301 * @ingress_cnt: Ingress counter 302 * @egress_cnt: Egress counter 303 * @send_wmi_cmd: To indicate whether WMI command to be sent or not 304 */ 305 struct mlo_wsi_link_stats { 306 uint32_t ingress_cnt; 307 uint32_t egress_cnt; 308 bool send_wmi_cmd; 309 }; 310 311 /* 312 * struct mlo_wsi_psoc_grp - MLO WSI PSOC group 313 * @psoc_order: PSOC list in WSI loop order 314 * @num_psoc: num psoc in the group 315 */ 316 struct mlo_wsi_psoc_grp { 317 uint32_t psoc_order[WLAN_OBJMGR_MAX_DEVICES]; 318 uint32_t num_psoc; 319 }; 320 321 #define MLO_WSI_MAX_MLO_GRPS 2 322 #define MLO_WSI_PSOC_ID_MAX 0xFF 323 324 /* 325 * struct mlo_wsi_info - MLO ingress/egress link context per-PSOC 326 * @mlo_psoc_grp: PSOC IDs for different MLO groups 327 * @num_psoc: Total num psoc 328 * @link_stats: Ingress and Egress counts for PSOCs 329 * @block_wmi_cmd: Blocks WMI command 330 */ 331 struct mlo_wsi_info { 332 struct mlo_wsi_psoc_grp mlo_psoc_grp[MLO_WSI_MAX_MLO_GRPS]; 333 uint32_t num_psoc; 334 struct mlo_wsi_link_stats link_stats[WLAN_OBJMGR_MAX_DEVICES]; 335 uint8_t block_wmi_cmd; 336 }; 337 338 /** 339 * struct mlo_mgr_context - MLO manager context 340 * @ml_dev_list_lock: ML DEV list lock 341 * @aid_lock: AID global lock 342 * @ml_peerid_lock: ML peer ID global lock 343 * @ml_dev_list: Array of MLO device context 344 * @mlo_peer_id_bmap: bitmap to allocate MLO Peer ID 345 * @max_mlo_peer_id: Max MLO Peer ID 346 * @last_mlo_peer_id: Previously allocated ML peer ID 347 * @setup_info: Pointer to MLO setup_info of all groups 348 * @total_grp: Total number of MLO groups 349 * @mlme_ops: MLO MLME callback function pointers 350 * @osif_ops: MLO to OSIF callback function pointers 351 * @msgq_ctx: Context switch mgr 352 * @mlo_is_force_primary_umac: Force Primary UMAC enable 353 * @mlo_forced_primary_umac_id: Force Primary UMAC ID 354 * @force_non_assoc_prim_umac: Force non-assoc link to be primary umac 355 * @lswitch_notifier: Link switch notifier callbacks 356 * @wsi_info: WSI stats info 357 * @disable_eml: Disable Enhanced Multi Link features(eMLSR and eMLMR). 358 */ 359 struct mlo_mgr_context { 360 #ifdef WLAN_MLO_USE_SPINLOCK 361 qdf_spinlock_t ml_dev_list_lock; 362 qdf_spinlock_t aid_lock; 363 qdf_spinlock_t ml_peerid_lock; 364 #else 365 qdf_mutex_t ml_dev_list_lock; 366 qdf_mutex_t aid_lock; 367 qdf_mutex_t ml_peerid_lock; 368 #endif 369 qdf_list_t ml_dev_list; 370 qdf_bitmap(mlo_peer_id_bmap, MAX_MLO_PEER_ID); 371 uint16_t max_mlo_peer_id; 372 uint16_t last_mlo_peer_id; 373 #ifdef WLAN_MLO_MULTI_CHIP 374 struct mlo_setup_info *setup_info; 375 uint8_t total_grp; 376 #endif 377 struct mlo_mlme_ext_ops *mlme_ops; 378 #ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE 379 struct mlo_osif_ext_ops *osif_ops; 380 #endif 381 struct ctxt_switch_mgr *msgq_ctx; 382 bool mlo_is_force_primary_umac; 383 uint8_t mlo_forced_primary_umac_id; 384 bool force_non_assoc_prim_umac; 385 #ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE 386 struct wlan_mlo_link_switch_notifier lswitch_notifier[WLAN_UMAC_COMP_ID_MAX]; 387 #endif /* WLAN_FEATURE_11BE_MLO_ADV_FEATURE */ 388 struct mlo_wsi_info *wsi_info; 389 bool disable_eml; 390 }; 391 392 /** 393 * struct wlan_ml_vdev_aid_mgr - ML AID manager 394 * @aid_bitmap: AID bitmap array 395 * @start_aid: start of AID index 396 * @max_aid: Max allowed AID 397 * @aid_mgr: Array of link vdev aid mgr 398 */ 399 struct wlan_ml_vdev_aid_mgr { 400 qdf_bitmap(aid_bitmap, WLAN_UMAC_MAX_AID); 401 uint16_t start_aid; 402 uint16_t max_aid; 403 struct wlan_vdev_aid_mgr *aid_mgr[WLAN_UMAC_MLO_MAX_VDEVS]; 404 }; 405 406 /** 407 * struct wlan_mlo_key_mgmt - MLO key management 408 * @keys_saved: keys saved bool 409 * @link_id: link id 410 */ 411 struct wlan_mlo_key_mgmt { 412 bool keys_saved; 413 uint8_t link_id; 414 }; 415 416 /** 417 * struct mlo_link_bss_params - link bss param 418 * @link_id: link id 419 * @ap_mld_mac: mld mac address 420 * @chan: channel 421 */ 422 struct mlo_link_bss_params { 423 int8_t link_id; 424 int8_t ap_mld_mac[QDF_MAC_ADDR_SIZE]; 425 struct wlan_channel *chan; 426 }; 427 428 #ifdef WLAN_FEATURE_11BE_MLO 429 430 /** 431 * enum mlo_link_info_event_status - link info event status 432 * @WLAN_LINK_INFO_EVENT_SUCCESS: success 433 * @WLAN_LINK_INFO_EVENT_REJECT_FAILURE: reject due to common failure reason 434 * @WLAN_LINK_INFO_EVENT_REJECT_VDEV_NOT_UP: reject as vdev is not up 435 * @WLAN_LINK_INFO_EVENT_REJECT_ROAMING_IN_PROGRESS: reject as roaming 436 * is in progress 437 * @WLAN_LINK_INFO_EVENT_REJECT_NON_MLO_CONNECTION: reject as it's not 438 * MLO connection 439 */ 440 enum mlo_link_info_event_status { 441 WLAN_LINK_INFO_EVENT_SUCCESS, 442 WLAN_LINK_INFO_EVENT_REJECT_FAILURE, 443 WLAN_LINK_INFO_EVENT_REJECT_VDEV_NOT_UP, 444 WLAN_LINK_INFO_EVENT_REJECT_ROAMING_IN_PROGRESS, 445 WLAN_LINK_INFO_EVENT_REJECT_NON_MLO_CONNECTION, 446 }; 447 448 /** 449 * struct mlo_link_state_cmd_params - MLO link state params 450 * @vdev_id: Vdev id 451 * @mld_mac: mld mac address 452 */ 453 struct mlo_link_state_cmd_params { 454 uint8_t vdev_id; 455 uint8_t mld_mac[QDF_MAC_ADDR_SIZE]; 456 }; 457 458 /** 459 * struct ml_link_info - ml link information 460 * @vdev_id: vdev id for this link 461 * @link_id: link id defined as in 802.11 BE spec. 462 * @link_status: inactive 0, active 1 463 * @reserved: reserved bits 464 * @chan_freq: Channel frequency in MHz 465 */ 466 struct ml_link_info { 467 uint32_t vdev_id:8, 468 link_id:8, 469 link_status:2, 470 reserved:14; 471 uint32_t chan_freq; 472 }; 473 474 /** 475 * struct ml_link_state_info_event - ML link state info response 476 * @status: to indicate the status for ml link info 477 * @hw_mode_index: current hardware mode index 478 * @link_info: link information 479 * @num_mlo_vdev_link_info: number of mlo vdev link info 480 * @vdev_id: vdev_id 481 * @mldaddr: mld addr 482 */ 483 struct ml_link_state_info_event { 484 uint32_t status; 485 uint32_t hw_mode_index; 486 struct ml_link_info link_info[WLAN_MAX_ML_BSS_LINKS]; 487 uint16_t num_mlo_vdev_link_info; 488 uint8_t vdev_id; 489 struct qdf_mac_addr mldaddr; 490 }; 491 492 /** 493 * struct ml_link_state_cmd_info - ml link state command info 494 * @request_cookie: request cookie 495 * @ml_link_state_resp_cb: callback function to handle response 496 * @ml_link_state_req_context: request context 497 */ 498 struct ml_link_state_cmd_info { 499 void *request_cookie; 500 void (*ml_link_state_resp_cb)(struct ml_link_state_info_event *ev, 501 void *cookie); 502 void *ml_link_state_req_context; 503 }; 504 #endif 505 /** 506 * struct mlo_sta_csa_params - CSA request parameters in mlo mgr 507 * @csa_param: csa parameters 508 * @link_id: the link index of AP which triggers CSA 509 * @mlo_csa_synced: Before vdev is up, csa information is only saved but not 510 * handled, and this value is false. Once vdev is up, the saved 511 * csa information is handled, and this value is changed to 512 * true. Note this value will be true if the vdev is doing 513 * restart. 514 * @csa_offload_event_recvd: True if WMI_CSA_HANDLING_EVENTID is already 515 * received. False if this is the first 516 * WMI_CSA_HANDLING_EVENTID. 517 * @valid_csa_param: True once csa_param is filled. 518 */ 519 struct mlo_sta_csa_params { 520 struct csa_offload_params csa_param; 521 uint8_t link_id; 522 bool mlo_csa_synced; 523 bool csa_offload_event_recvd; 524 bool valid_csa_param; 525 }; 526 527 /** 528 * struct mlo_sta_cu_params - critical update parameters in mlo mgr 529 * @vdev_id: vdev id 530 * @bpcc: bss parameter change count 531 * @initialized: flag about the parameter is valid or not 532 */ 533 struct mlo_sta_cu_params { 534 uint8_t vdev_id; 535 uint8_t bpcc; 536 bool initialized; 537 }; 538 539 /** 540 * struct mlo_sta_quiet_status - MLO sta quiet status 541 * @link_id: link id 542 * @quiet_status: true if corresponding ap in quiet status 543 * @valid_status: true if mlo_sta_quiet_status is filled 544 */ 545 struct mlo_sta_quiet_status { 546 uint8_t link_id; 547 bool quiet_status; 548 bool valid_status; 549 }; 550 551 /** 552 * struct ml_link_force_state - link force state. 553 * @force_active_bitmap: force active link bitmap 554 * @force_inactive_bitmap: force inactive link bitmap 555 * @force_active_num: force active link num 556 * @force_active_num_bitmap: force active num link bitmap 557 * @force_inactive_num: force inactive link num 558 * @force_inactive_num_bitmap: force inactive num link bitmap 559 * @curr_dynamic_inactive_bitmap: dynamic inactive link bitmap 560 * @curr_active_bitmap: current active link bitmap 561 * @curr_inactive_bitmap: current inactive link bitmap 562 */ 563 struct ml_link_force_state { 564 uint16_t force_active_bitmap; 565 uint16_t force_inactive_bitmap; 566 uint8_t force_active_num; 567 uint16_t force_active_num_bitmap; 568 uint8_t force_inactive_num; 569 uint16_t force_inactive_num_bitmap; 570 uint16_t curr_dynamic_inactive_bitmap; 571 uint16_t curr_active_bitmap; 572 uint16_t curr_inactive_bitmap; 573 }; 574 575 /** 576 * struct wlan_link_force_context - link force ctx. 577 * @force_state: current force active/inactive states which 578 * have been sent to target 579 */ 580 struct wlan_link_force_context { 581 struct ml_link_force_state force_state; 582 }; 583 584 #if defined(UMAC_SUPPORT_MLNAWDS) || defined(MESH_MODE_SUPPORT) 585 /** 586 * struct mlnawds_config - MLO NAWDS configuration 587 * @caps: Bandwidth & NSS capabilities to be configured on NAWDS peer 588 * @puncture_bitmap: puncture bitmap to be configured on NAWDS peer 589 * @mac: MAC address of the NAWDS peer to which the caps & puncture bitmap is 590 * to be configured. 591 */ 592 struct mlnawds_config { 593 uint64_t caps; 594 uint16_t puncture_bitmap; 595 uint8_t mac[QDF_MAC_ADDR_SIZE]; 596 }; 597 #endif 598 599 /* AP removed link flag bit position for link_status_flags in 600 * struct mlo_link_info 601 */ 602 #define LS_F_AP_REMOVAL_BIT 0 603 604 /** 605 * struct mlo_link_info - ML link info 606 * @link_addr: link mac address 607 * @link_id: link index 608 * @is_bridge : Bridge peer or not 609 * @chan_freq: Operating channel frequency 610 * @nawds_config: peer's NAWDS configurarion 611 * @vdev_id: VDEV ID 612 * @mesh_config: peer's MESH configurarion 613 * @link_status_flags: Current status of link 614 * @ap_link_addr: Associated link BSSID 615 * @link_chan_info: Associated link channel info 616 */ 617 struct mlo_link_info { 618 struct qdf_mac_addr link_addr; 619 uint8_t link_id; 620 bool is_bridge; 621 uint16_t chan_freq; 622 #ifdef UMAC_SUPPORT_MLNAWDS 623 struct mlnawds_config nawds_config; 624 #endif 625 uint8_t vdev_id; 626 #ifdef MESH_MODE_SUPPORT 627 struct mlnawds_config mesh_config; 628 #endif 629 #ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE 630 unsigned long link_status_flags; 631 struct qdf_mac_addr ap_link_addr; 632 struct wlan_channel *link_chan_info; 633 #endif 634 }; 635 636 /** 637 * struct mlo_nstr_info - MLO NSTR capability info 638 * @link_id: Lind Id 639 * @nstr_lp_present: Flag for NSTR link pair presence 640 * @nstr_bmp_size: NSTR Bitmap Size 641 * @nstr_lp_bitmap: NSTR link pair bitmap of link_id 642 */ 643 struct mlo_nstr_info { 644 uint8_t link_id; 645 bool nstr_lp_present; 646 uint8_t nstr_bmp_size; 647 uint16_t nstr_lp_bitmap; 648 }; 649 650 #ifndef WLAN_MAX_ML_BSS_LINKS 651 #define WLAN_MAX_ML_BSS_LINKS WLAN_UMAC_MLO_MAX_VDEVS 652 #endif 653 654 /** 655 * struct mlo_partner_info - mlo partner link info 656 * @num_partner_links: no. of partner links 657 * @partner_link_info: per partner link info 658 * @t2lm_enable_val: enum wlan_t2lm_enable 659 * @nstr_info: NSTR Capability info 660 * @num_nstr_info_links: No. of links for which NSTR info is present 661 */ 662 struct mlo_partner_info { 663 uint8_t num_partner_links; 664 struct mlo_link_info partner_link_info[WLAN_MAX_ML_BSS_LINKS]; 665 #ifdef WLAN_FEATURE_11BE 666 enum wlan_t2lm_enable t2lm_enable_val; 667 struct mlo_nstr_info nstr_info[WLAN_UMAC_MLO_MAX_VDEVS]; 668 uint8_t num_nstr_info_links; 669 #endif 670 }; 671 672 #ifdef WLAN_FEATURE_11BE_MLO 673 /** 674 * struct emlsr_capability - EMLSR capabilities info 675 * @emlsr_supp: EMLSR support is present or not. 676 * @trans_timeout: transition timeout 677 */ 678 struct emlsr_capability { 679 bool emlsr_supp; 680 uint8_t trans_timeout; 681 }; 682 #endif 683 684 /** 685 * struct wlan_mlo_sta_assoc_pending_list - MLO sta assoc pending list entry 686 * @peer_list: MLO peer list 687 * @list_lock: lock to access members of structure 688 */ 689 struct wlan_mlo_sta_assoc_pending_list { 690 qdf_list_t peer_list; 691 qdf_spinlock_t list_lock; 692 }; 693 694 /** 695 * struct wlan_mlo_sta - MLO sta additional info 696 * @wlan_connect_req_links: list of vdevs selected for connection with the MLAP 697 * @wlan_connected_links: list of vdevs associated with this MLO connection 698 * @key_mgmt: 699 * @connect_req: connect params 700 * @copied_conn_req: original connect req 701 * @copied_conn_req_lock: lock for the original connect request 702 * @assoc_rsp: Raw assoc response frame 703 * @mlo_quiet_status: 704 * @mlo_csa_param: CSA request parameters for mlo sta 705 * @mlo_cu_param: critical update parameters for mlo sta 706 * @disconn_req: disconnect req params 707 * @copied_reassoc_rsp: Reassoc response copied from assoc link roam handling 708 * to re-use while link connect in case of deferred/need 709 * basis link connect (e.g. MLO OWE roaming). 710 * @ml_link_state: ml link state command info param 711 * @copied_t2lm_ie_assoc_rsp: copy of t2lm ie received in assoc response 712 * @ml_partner_info: mlo partner link info 713 * @emlsr_cap: EMLSR capabilities info 714 * @link_force_ctx: set link force mode context 715 * @ml_link_control_mode: link control mode configured via user space 716 */ 717 struct wlan_mlo_sta { 718 qdf_bitmap(wlan_connect_req_links, WLAN_UMAC_MLO_MAX_VDEVS); 719 qdf_bitmap(wlan_connected_links, WLAN_UMAC_MLO_MAX_VDEVS); 720 struct wlan_mlo_key_mgmt key_mgmt[WLAN_MAX_ML_BSS_LINKS]; 721 struct wlan_cm_connect_req *connect_req; 722 struct wlan_cm_connect_req *copied_conn_req; 723 #ifdef WLAN_MLO_USE_SPINLOCK 724 qdf_spinlock_t copied_conn_req_lock; 725 #else 726 qdf_mutex_t copied_conn_req_lock; 727 #endif 728 struct element_info assoc_rsp; 729 struct mlo_sta_quiet_status mlo_quiet_status[WLAN_UMAC_MLO_MAX_VDEVS]; 730 struct mlo_sta_csa_params mlo_csa_param[WLAN_UMAC_MLO_MAX_VDEVS]; 731 struct mlo_sta_cu_params mlo_cu_param[WLAN_UMAC_MLO_MAX_VDEVS]; 732 struct wlan_cm_disconnect_req *disconn_req; 733 #ifdef WLAN_FEATURE_ROAM_OFFLOAD 734 struct wlan_cm_connect_resp *copied_reassoc_rsp; 735 #endif 736 #ifdef WLAN_FEATURE_11BE_MLO 737 struct ml_link_state_cmd_info ml_link_state; 738 struct wlan_t2lm_context copied_t2lm_ie_assoc_rsp; 739 struct mlo_partner_info ml_partner_info; 740 struct emlsr_capability emlsr_cap; 741 #endif 742 #ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE 743 struct wlan_link_force_context link_force_ctx; 744 #endif 745 uint8_t ml_link_control_mode; 746 }; 747 748 /** 749 * struct wlan_mlo_ap - MLO AP related info 750 * @num_ml_vdevs: number of vdevs to form MLD 751 * @ml_aid_mgr: ML AID mgr 752 * @mlo_ap_lock: lock to sync VDEV SM event 753 * @mlo_vdev_quiet_bmap: Bitmap of vdevs for which quiet ie needs to enabled 754 * @mlo_vdev_up_bmap: Bitmap of vdevs for which sync complete can be dispatched 755 * @assoc_list: MLO sta assoc pending list entry (for FT-over-DS) 756 */ 757 struct wlan_mlo_ap { 758 uint8_t num_ml_vdevs; 759 struct wlan_ml_vdev_aid_mgr *ml_aid_mgr; 760 #ifdef WLAN_MLO_USE_SPINLOCK 761 qdf_spinlock_t mlo_ap_lock; 762 #else 763 qdf_mutex_t mlo_ap_lock; 764 #endif 765 qdf_bitmap(mlo_vdev_quiet_bmap, WLAN_UMAC_MLO_MAX_VDEVS); 766 qdf_bitmap(mlo_vdev_up_bmap, WLAN_UMAC_MLO_MAX_VDEVS); 767 struct wlan_mlo_sta_assoc_pending_list assoc_list; 768 }; 769 770 /** 771 * struct wlan_mlo_peer_list - MLO peer list entry 772 * @peer_hash: MLO peer hash code 773 * @peer_list_lock: lock to access members of structure 774 */ 775 struct wlan_mlo_peer_list { 776 qdf_list_t peer_hash[WLAN_PEER_HASHSIZE]; 777 #ifdef WLAN_MLO_USE_SPINLOCK 778 qdf_spinlock_t peer_list_lock; 779 #else 780 qdf_mutex_t peer_list_lock; 781 #endif 782 }; 783 784 /** 785 * struct mlo_vdev_link_mac_info - VDEV to link address map 786 * @vdev_id: Vdev Id with which this link mac address is associated: 787 * @link_mac_addr: link specific mac address 788 */ 789 struct mlo_vdev_link_mac_info { 790 uint8_t vdev_id; 791 struct qdf_mac_addr link_mac_addr; 792 }; 793 794 /** 795 * struct wlan_mlo_link_mac_update: VDEV to link MAC address list 796 * @num_mac_update: Number of mac address 797 * @link_mac_info: Each VDEV to link mac address mapping 798 */ 799 struct wlan_mlo_link_mac_update { 800 int num_mac_update; 801 struct mlo_vdev_link_mac_info link_mac_info[3]; 802 }; 803 804 /** 805 * struct wlan_mlo_dev_context - MLO device context 806 * @node: QDF list node member 807 * @mld_id: MLD id 808 * @mld_addr: MLO device MAC address 809 * @wlan_vdev_list: list of vdevs associated with this MLO connection 810 * @wlan_bridge_vdev_list: list of bridge vdevs associated with this MLO 811 * @wlan_bridge_vdev_count: number of elements in the bridge vdev list 812 * @bridge_sta_ctx: bridge sta context 813 * @wlan_vdev_count: number of elements in the vdev list 814 * @mlo_peer_list: list peers in this MLO connection 815 * @wlan_max_mlo_peer_count: peer count across the links of specific MLO 816 * @mlo_dev_lock: lock to access struct 817 * @tsf_recalculation_lock: Lock to protect TSF (re)calculation 818 * @ref_cnt: reference count 819 * @ref_id_dbg: Reference count debug information 820 * @sta_ctx: MLO STA related information 821 * @ap_ctx: AP related information 822 * @t2lm_ctx: T2LM related information 823 * @epcs_ctx: EPCS related information 824 * @ptqm_migrate_timer: timer for ptqm migration 825 * @mlo_peer_id_bmap: mlo_peer_id bitmap for ptqm migration 826 * @link_ctx: link related information 827 * @mlo_max_recom_simult_links: Max Recommended Simultaneous Links 828 */ 829 struct wlan_mlo_dev_context { 830 qdf_list_node_t node; 831 uint8_t mld_id; 832 struct qdf_mac_addr mld_addr; 833 struct wlan_objmgr_vdev *wlan_vdev_list[WLAN_UMAC_MLO_MAX_VDEVS]; 834 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) 835 struct wlan_objmgr_vdev *wlan_bridge_vdev_list[WLAN_UMAC_MLO_MAX_BRIDGE_VDEVS]; 836 struct wlan_mlo_bridge_sta *bridge_sta_ctx; 837 #endif 838 uint16_t wlan_vdev_count; 839 uint16_t wlan_bridge_vdev_count; 840 struct wlan_mlo_peer_list mlo_peer_list; 841 uint16_t wlan_max_mlo_peer_count; 842 #ifdef WLAN_MLO_USE_SPINLOCK 843 qdf_spinlock_t mlo_dev_lock; 844 qdf_spinlock_t tsf_recalculation_lock; 845 #else 846 qdf_mutex_t mlo_dev_lock; 847 qdf_mutex_t tsf_recalculation_lock; 848 #endif 849 qdf_atomic_t ref_cnt; 850 qdf_atomic_t ref_id_dbg[WLAN_REF_ID_MAX]; 851 struct wlan_mlo_sta *sta_ctx; 852 struct wlan_mlo_ap *ap_ctx; 853 struct wlan_t2lm_context t2lm_ctx; 854 struct wlan_epcs_context epcs_ctx; 855 #ifdef QCA_SUPPORT_PRIMARY_LINK_MIGRATE 856 qdf_timer_t ptqm_migrate_timer; 857 qdf_bitmap(mlo_peer_id_bmap, MAX_MLO_PEER_ID); 858 #endif 859 struct mlo_link_switch_context *link_ctx; 860 uint8_t mlo_max_recom_simult_links; 861 }; 862 863 /** 864 * struct wlan_mlo_link_peer_entry - Link peer entry 865 * @link_peer: Object manager peer 866 * @link_addr: MAC address of link peer 867 * @link_ix: Link index 868 * @is_primary: sets true if the peer is primary UMAC’s peer 869 * @hw_link_id: HW Link id of peer 870 * @assoc_rsp_buf: Assoc resp buffer 871 * @peer_assoc_sent: flag to indicate peer assoc sent to FW 872 */ 873 struct wlan_mlo_link_peer_entry { 874 struct wlan_objmgr_peer *link_peer; 875 struct qdf_mac_addr link_addr; 876 uint8_t link_ix; 877 bool is_primary; 878 uint8_t hw_link_id; 879 qdf_nbuf_t assoc_rsp_buf; 880 bool peer_assoc_sent; 881 }; 882 883 /** 884 * enum mlo_peer_state - MLO peer state 885 * @ML_PEER_CREATED: Initial state 886 * @ML_PEER_ASSOC_DONE: ASSOC sent on assoc link 887 * @ML_PEER_DISCONN_INITIATED: Disconnect initiated on one of the links 888 */ 889 enum mlo_peer_state { 890 ML_PEER_CREATED, 891 ML_PEER_ASSOC_DONE, 892 ML_PEER_DISCONN_INITIATED, 893 }; 894 895 /** 896 * struct mlpeer_auth_params - Deferred Auth params 897 * @vdev_id: VDEV ID 898 * @psoc_id: PSOC ID 899 * @link_addr: MAC address 900 * @mldaddr: MLD MAC address 901 * @algo: Auth algorithm 902 * @seq: Auth sequence number 903 * @status_code: Auth status 904 * @challenge: Auth Challenge 905 * @challenge_length: Auth Challenge length 906 * @wbuf: Auth wbuf 907 * @rs: Rx stats 908 */ 909 struct mlpeer_auth_params { 910 uint8_t vdev_id; 911 uint8_t psoc_id; 912 struct qdf_mac_addr link_addr; 913 struct qdf_mac_addr mldaddr; 914 uint16_t algo; 915 uint16_t seq; 916 uint16_t status_code; 917 uint8_t *challenge; 918 uint8_t challenge_length; 919 qdf_nbuf_t wbuf; 920 void *rs; 921 }; 922 923 /** 924 * struct wlan_mlo_eml_cap - EML capabilities of MLD 925 * @emlsr_supp: eMLSR Support 926 * @emlsr_pad_delay: eMLSR Padding Delay 927 * @emlsr_trans_delay: eMLSR transition delay 928 * @emlmr_supp: eMLMR Support 929 * @emlmr_delay: eMLMR Delay 930 * @trans_timeout: Transition Timeout 931 * @reserved: Reserved 932 */ 933 struct wlan_mlo_eml_cap { 934 uint16_t emlsr_supp:1, 935 emlsr_pad_delay:3, 936 emlsr_trans_delay:3, 937 emlmr_supp:1, 938 emlmr_delay:3, 939 trans_timeout:4, 940 reserved:1; 941 }; 942 943 /** 944 * struct wlan_mlo_msd_cap - MSD capabilities of MLD 945 * @medium_sync_duration: Medium Sync Duration 946 * @medium_sync_ofdm_ed_thresh: MSD threshold value 947 * @medium_sync_max_txop_num: Max number of TXOP 948 */ 949 struct wlan_mlo_msd_cap { 950 uint16_t medium_sync_duration:8, 951 medium_sync_ofdm_ed_thresh:4, 952 medium_sync_max_txop_num:4; 953 }; 954 955 /** 956 * struct wlan_mlo_mld_cap - MLD capabilities of MLD 957 * @max_simult_link: Maximum number of simultaneous links 958 * @srs_support: SRS support 959 * @tid2link_neg_support: TID to Link Negotiation Support 960 * @str_freq_sep: Frequency separation suggested by STR non-AP MLD 961 * OR Type of AP-MLD 962 * @aar_support: AAR Support 963 * @reserved: Reserved 964 */ 965 struct wlan_mlo_mld_cap { 966 uint16_t max_simult_link:4, 967 srs_support:1, 968 tid2link_neg_support:2, 969 str_freq_sep:5, 970 aar_support:1, 971 reserved:3; 972 }; 973 974 /** 975 * struct wlan_mlo_peer_context - MLO peer context 976 * 977 * @peer_node: peer list node for ml_dev qdf list 978 * @peer_list: list of peers on the MLO link 979 * @link_peer_cnt: Number of link peers attached 980 * @max_links: Max links for this ML peer 981 * @link_asresp_cnt: Number of reassoc resp generated 982 * @mlo_peer_id: unique ID for the peer 983 * @peer_mld_addr: MAC address of MLD link 984 * @mlo_ie: MLO IE struct 985 * @mlo_peer_lock: lock to access peer structure 986 * @assoc_id: Assoc ID derived by MLO manager 987 * @primary_umac_psoc_id: 988 * @ref_cnt: Reference counter to avoid use after free 989 * @ml_dev: MLO dev context 990 * @mlpeer_state: MLO peer state 991 * @avg_link_rssi: avg RSSI of ML peer 992 * @is_nawds_ml_peer: flag to indicate if ml_peer is NAWDS configured 993 * @nawds_config: eack link peer's NAWDS configuration 994 * @pending_auth: Holds pending auth request 995 * @t2lm_policy: TID-to-link mapping information 996 * @epcs_info: EPCS information 997 * @msd_cap_present: Medium Sync Capability present bit 998 * @mlpeer_emlcap: EML capability information for ML peer 999 * @mlpeer_msdcap: Medium Sync Delay capability information for ML peer 1000 * @is_mesh_ml_peer: flag to indicate if ml_peer is MESH configured 1001 * @mesh_config: eack link peer's MESH configuration 1002 * @mlpeer_mldcap: MLD Capability information for ML peer 1003 * @mlpeer_nstrinfo: NSTR Capability info 1004 * @migrate_primary_umac_psoc_id: primary umac psoc id selected for umac 1005 * migration 1006 * @primary_umac_migration_in_progress: flag to indicate primary umac migration 1007 * in progress 1008 */ 1009 struct wlan_mlo_peer_context { 1010 qdf_list_node_t peer_node; 1011 struct wlan_mlo_link_peer_entry peer_list[MAX_MLO_LINK_PEERS]; 1012 uint8_t link_peer_cnt; 1013 uint8_t max_links; 1014 uint8_t link_asresp_cnt; 1015 uint32_t mlo_peer_id; 1016 struct qdf_mac_addr peer_mld_addr; 1017 uint8_t *mlo_ie; 1018 #ifdef WLAN_MLO_USE_SPINLOCK 1019 qdf_spinlock_t mlo_peer_lock; 1020 #else 1021 qdf_mutex_t mlo_peer_lock; 1022 #endif 1023 uint16_t assoc_id; 1024 uint8_t primary_umac_psoc_id; 1025 qdf_atomic_t ref_cnt; 1026 struct wlan_mlo_dev_context *ml_dev; 1027 enum mlo_peer_state mlpeer_state; 1028 int8_t avg_link_rssi; 1029 #ifdef UMAC_SUPPORT_MLNAWDS 1030 bool is_nawds_ml_peer; 1031 struct mlnawds_config nawds_config[MAX_MLO_LINK_PEERS]; 1032 #endif 1033 #ifdef UMAC_MLO_AUTH_DEFER 1034 struct mlpeer_auth_params *pending_auth[MAX_MLO_LINK_PEERS]; 1035 #endif 1036 #ifdef WLAN_FEATURE_11BE 1037 struct wlan_mlo_peer_t2lm_policy t2lm_policy; 1038 struct wlan_mlo_peer_epcs_info epcs_info; 1039 #endif 1040 bool msd_cap_present; 1041 struct wlan_mlo_eml_cap mlpeer_emlcap; 1042 struct wlan_mlo_msd_cap mlpeer_msdcap; 1043 #ifdef MESH_MODE_SUPPORT 1044 bool is_mesh_ml_peer; 1045 struct mlnawds_config mesh_config[MAX_MLO_LINK_PEERS]; 1046 #endif 1047 struct wlan_mlo_mld_cap mlpeer_mldcap; 1048 struct mlo_nstr_info mlpeer_nstrinfo[WLAN_UMAC_MLO_MAX_VDEVS]; 1049 uint8_t migrate_primary_umac_psoc_id; 1050 bool primary_umac_migration_in_progress; 1051 }; 1052 1053 /** 1054 * struct mlo_probereq_info - mlo probe req link info 1055 * @mlid: MLID requested in the probe req 1056 * @num_links: no. of link info in probe req 1057 * @link_id: target link id of APs 1058 * @is_mld_id_valid: Indicates if mld_id is valid for a given request 1059 * @skip_mbssid: Skip mbssid IE 1060 */ 1061 struct mlo_probereq_info { 1062 uint8_t mlid; 1063 uint8_t num_links; 1064 uint8_t link_id[WLAN_UMAC_MLO_MAX_VDEVS]; 1065 bool is_mld_id_valid; 1066 bool skip_mbssid; 1067 }; 1068 1069 /** 1070 * struct ml_rv_partner_link_info: Partner link information of an ML reconfig IE 1071 * @link_id: Link id advertised by the AP 1072 * @link_mac_addr: Link mac address 1073 * @is_ap_removal_timer_p: AP removal timer is present or not 1074 * @ap_removal_timer: number of TBTTs of the AP removal timer 1075 */ 1076 struct ml_rv_partner_link_info { 1077 uint8_t link_id; 1078 struct qdf_mac_addr link_mac_addr; 1079 uint8_t is_ap_removal_timer_p; 1080 uint16_t ap_removal_timer; 1081 }; 1082 1083 /** 1084 * struct ml_rv_info: Reconfig Multi link information of a 11be beacon 1085 * @mld_mac_addr: MLD mac address 1086 * @num_links: Number of links supported by ML AP 1087 * @link_info: Array containing partner links information 1088 */ 1089 struct ml_rv_info { 1090 struct qdf_mac_addr mld_mac_addr; 1091 uint8_t num_links; 1092 struct ml_rv_partner_link_info link_info[WLAN_UMAC_MLO_MAX_VDEVS]; 1093 }; 1094 1095 /** 1096 * struct mlo_tgt_link_info - ML target link info 1097 * @vdev_id: link peer vdev id 1098 * @hw_mld_link_id: HW link id 1099 * @mlo_enabled: indicate is MLO enabled 1100 * @mlo_assoc_link: indicate is the link used to initialize the association 1101 * of mlo connection 1102 * @mlo_primary_umac: indicate is the link on primary UMAC, WIN only flag 1103 * @mlo_logical_link_index_valid: indicate if the logial link index in is valid 1104 * @mlo_peer_id_valid: indicate if the mlo peer id is valid 1105 * @mlo_force_link_inactive: force the peer inactive 1106 * @emlsr_support: indicate if eMLSR supported 1107 * @emlmr_support: indicate if eMLMR supported 1108 * @msd_cap_support: indicate if MSD supported 1109 * @mlo_bridge_peer: indicate if it is bridge peer 1110 * @unused: spare bits 1111 * @logical_link_index: Unique index for links of the mlo. Starts with Zero 1112 */ 1113 struct mlo_tgt_link_info { 1114 uint8_t vdev_id; 1115 uint8_t hw_mld_link_id; 1116 uint32_t mlo_enabled:1, 1117 mlo_assoc_link:1, 1118 mlo_primary_umac:1, 1119 mlo_logical_link_index_valid:1, 1120 mlo_peer_id_valid:1, 1121 mlo_force_link_inactive:1, 1122 emlsr_support:1, 1123 emlmr_support:1, 1124 msd_cap_support:1, 1125 mlo_bridge_peer:1, 1126 unused:22; 1127 uint32_t logical_link_index; 1128 1129 }; 1130 1131 /** 1132 * struct mlo_tgt_partner_info - mlo target partner link info 1133 * @num_partner_links: no. of partner links 1134 * @link_info: per partner link info 1135 */ 1136 struct mlo_tgt_partner_info { 1137 uint8_t num_partner_links; 1138 struct mlo_tgt_link_info link_info[WLAN_UMAC_MLO_MAX_VDEVS]; 1139 }; 1140 1141 /** 1142 * struct wlan_mlo_bridge_sta - MLO bridge sta context 1143 * @bridge_partners: mlo_partner_info of partners of a bridge 1144 * @bridge_ml_links: mlo_tgt_partner_info of partners of bridge 1145 * @bridge_umac_id: umac id for bridge 1146 * @bridge_link_id: link id used by bridge vdev 1147 * @is_force_central_primary: Flag to tell if bridge should be primary umac 1148 * @bridge_vap_exists: If there is bridge vap 1149 * @bridge_node_auth: Is bridge node auth done 1150 * @bss_mld_addr: MLD address of the BSS 1151 */ 1152 struct wlan_mlo_bridge_sta { 1153 struct mlo_partner_info bridge_partners; 1154 struct mlo_tgt_partner_info bridge_ml_links; 1155 uint8_t bridge_umac_id; 1156 uint8_t bridge_link_id; 1157 bool is_force_central_primary; 1158 bool bridge_vap_exists; 1159 bool bridge_node_auth; 1160 struct qdf_mac_addr bss_mld_addr; 1161 }; 1162 1163 /** 1164 * struct mlo_mlme_ext_ops - MLME callback functions 1165 * @mlo_mlme_ext_validate_conn_req: Callback to validate connect request 1166 * @mlo_mlme_ext_create_link_vdev: Callback to create link vdev for ML STA 1167 * @mlo_mlme_ext_peer_create: Callback to create link peer 1168 * @mlo_mlme_ext_bridge_peer_create: Callback to create bridge peer 1169 * @mlo_mlme_ext_peer_assoc: Callback to initiate peer assoc 1170 * @mlo_mlme_ext_peer_assoc_fail: Callback to notify peer assoc failure 1171 * @mlo_mlme_ext_peer_delete: Callback to initiate link peer delete 1172 * @mlo_mlme_ext_assoc_resp: Callback to initiate assoc resp 1173 * @mlo_mlme_get_link_assoc_req: Callback to get link assoc req buffer 1174 * @mlo_mlme_ext_deauth: Callback to initiate deauth 1175 * @mlo_mlme_ext_clone_security_param: Callback to clone mlo security params 1176 * @mlo_mlme_ext_peer_process_auth: Callback to process pending auth 1177 * @mlo_mlme_ext_handle_sta_csa_param: Callback to handle sta csa param 1178 * @mlo_mlme_ext_sta_op_class: 1179 * @mlo_mlme_ext_peer_reassoc: Callback to process reassoc 1180 */ 1181 struct mlo_mlme_ext_ops { 1182 QDF_STATUS (*mlo_mlme_ext_validate_conn_req)( 1183 struct vdev_mlme_obj *vdev_mlme, void *ext_data); 1184 QDF_STATUS (*mlo_mlme_ext_create_link_vdev)( 1185 struct vdev_mlme_obj *vdev_mlme, void *ext_data); 1186 QDF_STATUS (*mlo_mlme_ext_peer_create)(struct wlan_objmgr_vdev *vdev, 1187 struct wlan_mlo_peer_context *ml_peer, 1188 struct qdf_mac_addr *addr, 1189 qdf_nbuf_t frm_buf); 1190 QDF_STATUS (*mlo_mlme_ext_bridge_peer_create)(struct wlan_objmgr_vdev *vdev, 1191 struct wlan_mlo_peer_context *ml_peer, 1192 struct qdf_mac_addr *addr, 1193 qdf_nbuf_t frm_buf); 1194 void (*mlo_mlme_ext_peer_assoc)(struct wlan_objmgr_peer *peer); 1195 void (*mlo_mlme_ext_peer_assoc_fail)(struct wlan_objmgr_peer *peer); 1196 void (*mlo_mlme_ext_peer_delete)(struct wlan_objmgr_peer *peer); 1197 void (*mlo_mlme_ext_assoc_resp)(struct wlan_objmgr_peer *peer); 1198 qdf_nbuf_t (*mlo_mlme_get_link_assoc_req)(struct wlan_objmgr_peer *peer, 1199 uint8_t link_ix); 1200 void (*mlo_mlme_ext_deauth)(struct wlan_objmgr_peer *peer, 1201 uint8_t is_disassoc); 1202 QDF_STATUS (*mlo_mlme_ext_clone_security_param)( 1203 struct vdev_mlme_obj *vdev_mlme, 1204 struct wlan_cm_connect_req *req); 1205 #ifdef UMAC_MLO_AUTH_DEFER 1206 void (*mlo_mlme_ext_peer_process_auth)( 1207 struct mlpeer_auth_params *auth_param); 1208 #endif 1209 void (*mlo_mlme_ext_handle_sta_csa_param)( 1210 struct wlan_objmgr_vdev *vdev, 1211 struct csa_offload_params *csa_param); 1212 QDF_STATUS (*mlo_mlme_ext_sta_op_class)( 1213 struct vdev_mlme_obj *vdev_mlme, 1214 uint8_t *ml_ie); 1215 QDF_STATUS (*mlo_mlme_ext_peer_reassoc)(struct wlan_objmgr_vdev *vdev, 1216 struct wlan_mlo_peer_context *ml_peer, 1217 struct qdf_mac_addr *addr, 1218 qdf_nbuf_t frm_buf); 1219 }; 1220 1221 /* 1222 * struct mlo_osif_ext_ops - MLO manager to OSIF callback functions 1223 * @mlo_mgr_osif_update_bss_info: Callback to update each link connection info. 1224 * @mlo_mgr_osif_update_mac_addr: Callback to notify MAC addr update complete 1225 * from old link id to new link id for the vdev. 1226 * @mlo_mgr_osif_link_switch_notification: Notify OSIF on start of link switch 1227 */ 1228 struct mlo_osif_ext_ops { 1229 QDF_STATUS 1230 (*mlo_mgr_osif_update_bss_info)(struct qdf_mac_addr *self_mac, 1231 struct qdf_mac_addr *bssid, 1232 int32_t link_id); 1233 1234 QDF_STATUS (*mlo_mgr_osif_update_mac_addr)(int32_t ieee_old_link_id, 1235 int32_t ieee_new_link_id, 1236 uint8_t vdev_id); 1237 1238 QDF_STATUS 1239 (*mlo_mgr_osif_link_switch_notification)(struct wlan_objmgr_vdev *vdev, 1240 uint8_t non_trans_vdev_id); 1241 }; 1242 1243 /* maximum size of vdev bitmap array for MLO link set active command */ 1244 #define MLO_VDEV_BITMAP_SZ 2 1245 1246 /* maximum size of link number param array for MLO link set active command */ 1247 #define MLO_LINK_NUM_SZ 2 1248 1249 /** 1250 * enum mlo_link_force_mode: MLO link force modes 1251 * @MLO_LINK_FORCE_MODE_ACTIVE: 1252 * Force specific links active 1253 * @MLO_LINK_FORCE_MODE_INACTIVE: 1254 * Force specific links inactive 1255 * @MLO_LINK_FORCE_MODE_ACTIVE_NUM: 1256 * Force active a number of links, firmware to decide which links to inactive 1257 * @MLO_LINK_FORCE_MODE_INACTIVE_NUM: 1258 * Force inactive a number of links, firmware to decide which links to inactive 1259 * @MLO_LINK_FORCE_MODE_NO_FORCE: 1260 * Cancel the force operation of specific links, allow firmware to decide 1261 * @MLO_LINK_FORCE_MODE_ACTIVE_INACTIVE: Force specific links active and 1262 * force specific links inactive 1263 */ 1264 enum mlo_link_force_mode { 1265 MLO_LINK_FORCE_MODE_ACTIVE = 1, 1266 MLO_LINK_FORCE_MODE_INACTIVE = 2, 1267 MLO_LINK_FORCE_MODE_ACTIVE_NUM = 3, 1268 MLO_LINK_FORCE_MODE_INACTIVE_NUM = 4, 1269 MLO_LINK_FORCE_MODE_NO_FORCE = 5, 1270 MLO_LINK_FORCE_MODE_ACTIVE_INACTIVE = 6, 1271 }; 1272 1273 /** 1274 * enum mlo_link_force_reason: MLO link force reasons 1275 * @MLO_LINK_FORCE_REASON_CONNECT: 1276 * Set force specific links because of new connection 1277 * @MLO_LINK_FORCE_REASON_DISCONNECT: 1278 * Set force specific links because of new dis-connection 1279 * @MLO_LINK_FORCE_REASON_LINK_REMOVAL: 1280 * Set force specific links because of AP side link removal 1281 * @MLO_LINK_FORCE_REASON_TDLS: 1282 * Set force specific links because of TDLS operation 1283 */ 1284 enum mlo_link_force_reason { 1285 MLO_LINK_FORCE_REASON_CONNECT = 1, 1286 MLO_LINK_FORCE_REASON_DISCONNECT = 2, 1287 MLO_LINK_FORCE_REASON_LINK_REMOVAL = 3, 1288 MLO_LINK_FORCE_REASON_TDLS = 4, 1289 }; 1290 1291 /** 1292 * struct mlo_link_set_active_resp: MLO link set active response structure 1293 * @status: Return status, 0 for success, non-zero otherwise 1294 * @evt_handled: response event is handled 1295 * @active_sz: size of current active vdev bitmap array 1296 * @active: current active vdev bitmap array 1297 * @inactive_sz: size of current inactive vdev bitmap array 1298 * @inactive: current inactive vdev bitmap array 1299 * @use_ieee_link_id: link id is valid in active_linkid_bitmap or 1300 * inactive_linkid_bitmap 1301 * @ap_mld_mac_addr: AP MLD mac address 1302 * @active_linkid_bitmap: current forced active link id bitmap 1303 * @inactive_linkid_bitmap: current forced inactive link id bitmap 1304 * @curr_inactive_linkid_bitmap: current inactive link id bitmap 1305 * @curr_active_linkid_bitmap: current active link id bitmap 1306 */ 1307 struct mlo_link_set_active_resp { 1308 uint32_t status; 1309 bool evt_handled; 1310 uint32_t active_sz; 1311 uint32_t active[MLO_VDEV_BITMAP_SZ]; 1312 uint32_t inactive_sz; 1313 uint32_t inactive[MLO_VDEV_BITMAP_SZ]; 1314 bool use_ieee_link_id; 1315 struct qdf_mac_addr ap_mld_mac_addr; 1316 uint32_t active_linkid_bitmap; 1317 uint32_t inactive_linkid_bitmap; 1318 uint32_t curr_inactive_linkid_bitmap; 1319 uint32_t curr_active_linkid_bitmap; 1320 }; 1321 1322 /** 1323 * struct mlo_link_num_param: MLO link set active number params 1324 * @num_of_link: number of links to active/inactive 1325 * @vdev_type: type of vdev 1326 * @vdev_subtype: subtype of vdev 1327 * @home_freq: home frequency of the link 1328 */ 1329 struct mlo_link_num_param { 1330 uint32_t num_of_link; 1331 uint32_t vdev_type; 1332 uint32_t vdev_subtype; 1333 uint32_t home_freq; 1334 }; 1335 1336 /* 1337 * struct mlo_control_flags: This structure is used for setting 1338 * wmi_mlo_control_flags. 1339 * @overwrite_force_active_bitmap: indicate overwrite all earlier force_active 1340 * bitmaps 1341 * @overwrite_force_inactive_bitmap: indicate overwrite all earlier 1342 * force_inactive bitmaps 1343 * @dynamic_force_link_num: indicate fw to use force link number instead of 1344 * force link bitmaps 1345 * @post_re_evaluate: run link state check again after command response event 1346 * handled 1347 */ 1348 struct mlo_control_flags { 1349 bool overwrite_force_active_bitmap; 1350 bool overwrite_force_inactive_bitmap; 1351 bool dynamic_force_link_num; 1352 bool post_re_evaluate; 1353 }; 1354 1355 /* struct ml_link_force_cmd - force command for links 1356 * @ap_mld_mac_addr: AP mld mac address 1357 * @ieee_link_id_bitmap: link id bitmap 1358 * valid for WMI_MLO_LINK_FORCE_ACTIVE, WMI_MLO_LINK_FORCE_INACTIVE, 1359 * WMI_MLO_LINK_NO_FORCE, WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM, 1360 * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM. 1361 * @ieee_link_id_bitmap2: link id bitmap, only valid for 1362 * WMI_MLO_LINK_FORCE_ACTIVE_INACTIVE carry the inactive linkid bitmap 1363 * @link_num: link num 1364 * only valid on WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or 1365 * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM 1366 */ 1367 struct ml_link_force_cmd { 1368 struct qdf_mac_addr ap_mld_mac_addr; 1369 uint16_t ieee_link_id_bitmap; 1370 uint16_t ieee_link_id_bitmap2; 1371 uint8_t link_num; 1372 }; 1373 1374 /** 1375 * struct mlo_link_set_active_param: MLO link set active params 1376 * @force_mode: operation to take (enum mlo_link_force_mode) 1377 * @reason: reason for the operation (enum mlo_link_force_reason) 1378 * @num_link_entry: number of the valid entries for link_num 1379 * @num_vdev_bitmap: number of the valid entries for vdev_bitmap 1380 * @num_inactive_vdev_bitmap: number of the valid entries for 1381 * inactive_vdev_bitmap 1382 * @link_num: link number param array 1383 * It's present only when force_mode is MLO_LINK_FORCE_MODE_ACTIVE_NUM or 1384 * MLO_LINK_FORCE_MODE_INACTIVE_NUM 1385 * @vdev_bitmap: active/inactive vdev bitmap array 1386 * It will be present when force_mode is MLO_LINK_FORCE_MODE_ACTIVE, 1387 * MLO_LINK_FORCE_MODE_INACTIVE, MLO_LINK_FORCE_MODE_NO_FORCE, 1388 * MLO_LINK_FORCE_MODE_ACTIVE_NUM or MLO_LINK_FORCE_MODE_INACTIVE_NUM, 1389 * and MLO_LINK_FORCE_MODE_ACTIVE_INACTIVE. 1390 * For MLO_LINK_FORCE_MODE_ACTIVE_INACTIVE, it includes the active vdev 1391 * bitmaps 1392 * @inactive_vdev_bitmap: inactive vdev bitmap array 1393 * It will be present when force_mode is MLO_LINK_FORCE_MODE_ACTIVE_INACTIVE, 1394 * it includes the inactive vdev bitmaps 1395 * @control_flags: This structure is used for setting wmi_mlo_control_flags. 1396 * @use_ieee_link_id: send link id bitmap to target. 1397 * If this value is true, the "force_cmd" field should be provided and 1398 * that will be sent to target 1399 * @force_cmd: force command which includes link id bitmap 1400 */ 1401 struct mlo_link_set_active_param { 1402 uint32_t force_mode; 1403 uint32_t reason; 1404 uint32_t num_link_entry; 1405 uint32_t num_vdev_bitmap; 1406 uint32_t num_inactive_vdev_bitmap; 1407 struct mlo_link_num_param link_num[MLO_LINK_NUM_SZ]; 1408 uint32_t vdev_bitmap[MLO_VDEV_BITMAP_SZ]; 1409 uint32_t inactive_vdev_bitmap[MLO_VDEV_BITMAP_SZ]; 1410 struct mlo_control_flags control_flags; 1411 bool use_ieee_link_id; 1412 struct ml_link_force_cmd force_cmd; 1413 }; 1414 1415 /** 1416 * struct mlo_link_set_active_ctx - Context for MLO link set active request 1417 * @vdev: pointer to vdev on which the request issued 1418 * @set_mlo_link_cb: callback function for MLO link set active request 1419 * @validate_set_mlo_link_cb: callback to validate set link request 1420 * @cb_arg: callback context 1421 */ 1422 struct mlo_link_set_active_ctx { 1423 struct wlan_objmgr_vdev *vdev; 1424 void (*set_mlo_link_cb)(struct wlan_objmgr_vdev *vdev, void *arg, 1425 struct mlo_link_set_active_resp *evt); 1426 QDF_STATUS (*validate_set_mlo_link_cb)( 1427 struct wlan_objmgr_psoc *psoc, 1428 struct mlo_link_set_active_param *param); 1429 void *cb_arg; 1430 }; 1431 1432 /** 1433 * struct mlo_link_set_active_req - MLO link set active request 1434 * @ctx: context for MLO link set active request 1435 * @param: MLO link set active params 1436 */ 1437 struct mlo_link_set_active_req { 1438 struct mlo_link_set_active_ctx ctx; 1439 struct mlo_link_set_active_param param; 1440 }; 1441 1442 /** 1443 * enum mlo_chip_recovery_type - MLO chip recovery types 1444 * @MLO_RECOVERY_MODE_0: CRASH_PARTNER_CHIPS & recover all chips 1445 * @MLO_RECOVERY_MODE_1: Crash & recover asserted chip alone 1446 * @MLO_RECOVERY_MODE_MAX: Max limit for recovery types 1447 */ 1448 enum mlo_chip_recovery_type { 1449 MLO_RECOVERY_MODE_0 = 1, 1450 MLO_RECOVERY_MODE_1 = 2, 1451 1452 /* Add new types above */ 1453 MLO_RECOVERY_MODE_MAX = 0xf 1454 }; 1455 1456 /** 1457 * enum wlan_t2lm_status - Target status codes in event of t2lm 1458 * @WLAN_MAP_SWITCH_TIMER_TSF: Mapping switch time value in TSF to be included 1459 * in probe response frames 1460 * @WLAN_MAP_SWITCH_TIMER_EXPIRED: Indication that the new proposed T2LM has 1461 * been applied, Update the required data structures and other modules. 1462 * @WLAN_EXPECTED_DUR_EXPIRED: Indication that the proposed T2LM ineffective 1463 * after this duration and all TIDs fall back to default mode. 1464 */ 1465 enum wlan_t2lm_status { 1466 WLAN_MAP_SWITCH_TIMER_TSF, 1467 WLAN_MAP_SWITCH_TIMER_EXPIRED, 1468 WLAN_EXPECTED_DUR_EXPIRED, 1469 }; 1470 1471 /** 1472 * struct mlo_vdev_host_tid_to_link_map_resp - TID-to-link mapping response 1473 * @vdev_id: Vdev id 1474 * @status: Target status for t2lm ie info 1475 * @mapping_switch_tsf: Mapping switch time in tsf for probe response frames 1476 */ 1477 struct mlo_vdev_host_tid_to_link_map_resp { 1478 uint8_t vdev_id; 1479 enum wlan_t2lm_status status; 1480 uint32_t mapping_switch_tsf; 1481 }; 1482 1483 /** 1484 * struct mlo_link_removal_cmd_params - MLO link removal command parameters 1485 * @vdev_id: vdev ID of the link to be removed 1486 * @reconfig_ml_ie: Entire ML reconfiguration element 1487 * @reconfig_ml_ie_size: size of the field @reconfig_ml_ie 1488 */ 1489 struct mlo_link_removal_cmd_params { 1490 uint8_t vdev_id; 1491 uint8_t *reconfig_ml_ie; 1492 uint32_t reconfig_ml_ie_size; 1493 }; 1494 1495 /** 1496 * struct mlo_link_removal_tbtt_info - MLO link removal TBTT info. This 1497 * information will be in correspondence with an outgoing beacon instance. 1498 * @tbtt_count: AP removal timer TBTT count in the reported beacon 1499 * @qtimer_reading: Q-timer reading when the reported beacon is sent out 1500 * @tsf: TSF of the reported beacon 1501 */ 1502 struct mlo_link_removal_tbtt_info { 1503 uint32_t tbtt_count; 1504 uint64_t qtimer_reading; 1505 uint64_t tsf; 1506 }; 1507 1508 /** 1509 * struct mlo_link_removal_evt_params - MLO link removal event parameters 1510 * @vdev_id: vdev ID of the link undergoing removal 1511 * @tbtt_info: TBTT information of the link undergoing removal 1512 */ 1513 struct mlo_link_removal_evt_params { 1514 uint8_t vdev_id; 1515 struct mlo_link_removal_tbtt_info tbtt_info; 1516 }; 1517 1518 /** 1519 * struct mgmt_rx_mlo_link_removal_info - Information, sent in MGMT Rx event, of 1520 * a link undergoing removal from its MLD 1521 * @vdev_id: Vdev ID of the link undergoing removal 1522 * @hw_link_id: HW link ID of the link undergoing removal 1523 * @tbtt_count: AP removal timer TBTT count of the link undergoing removal 1524 */ 1525 struct mgmt_rx_mlo_link_removal_info { 1526 uint8_t vdev_id; 1527 uint8_t hw_link_id; 1528 uint16_t tbtt_count; 1529 }; 1530 1531 /** 1532 * struct mlo_link_disable_request_evt_params - MLO link disable 1533 * request params 1534 * @mld_addr: disable mld address 1535 * @link_id_bitmap: Disable Link id bitmap 1536 */ 1537 struct mlo_link_disable_request_evt_params { 1538 struct qdf_mac_addr mld_addr; 1539 uint32_t link_id_bitmap; 1540 }; 1541 1542 #define MAX_LINK_SWITCH_TLV 5 1543 /** 1544 * struct mlo_link_switch_params - Structure to hold link State switch 1545 * related parameters 1546 * @mld_addr: MLD address 1547 * @active_link_bitmap: Bitmap of ieee link id for active links 1548 * @prev_link_bitmap: Bitmap of ieee link id for previous active links 1549 * @fw_timestamp: Firmware timestamp in milliseconds 1550 * @reason_code: Reason code for the switch 1551 */ 1552 struct mlo_link_switch_params { 1553 struct qdf_mac_addr mld_addr; 1554 uint32_t active_link_bitmap; 1555 uint32_t prev_link_bitmap; 1556 uint32_t fw_timestamp; 1557 uint32_t reason_code; 1558 }; 1559 1560 /** 1561 * struct mlo_link_switch_state_info - Structure to hold the link switch 1562 * related parameters corresponding to all the TLV received in link state switch 1563 * event. 1564 * @num_params: Number of the link switch parameters 1565 * @link_switch_param: Link switch parameters 1566 */ 1567 struct mlo_link_switch_state_info { 1568 uint8_t num_params; 1569 struct mlo_link_switch_params link_switch_param[MAX_LINK_SWITCH_TLV]; 1570 }; 1571 1572 #ifdef QCA_SUPPORT_PRIMARY_LINK_MIGRATE 1573 /** 1574 * struct peer_ptqm_migrate_entry - peer ptqm migrate entry 1575 * @ml_peer_id: ML peer id 1576 * @hw_link_id: HW link id 1577 */ 1578 struct peer_ptqm_migrate_entry { 1579 uint16_t ml_peer_id; 1580 uint16_t hw_link_id; 1581 }; 1582 1583 /** 1584 * struct peer_ptqm_migrate_params - peer ptqm migrate request parameter 1585 * @vdev_id: vdev id 1586 * @num_peers: peer count 1587 * @num_peers_failed: number of peers for which wmi cmd is failed. 1588 * This value is expected to be used only in case failure is returned by WMI 1589 * @peer_list: list of peers to be migrated 1590 */ 1591 struct peer_ptqm_migrate_params { 1592 uint8_t vdev_id; 1593 uint16_t num_peers; 1594 uint16_t num_peers_failed; 1595 struct peer_ptqm_migrate_entry *peer_list; 1596 }; 1597 1598 /** 1599 * struct peer_ptqm_migrate_list_entry - peer ptqm migrate list 1600 * @node: QDF list node member 1601 * @peer: objmgr peer object 1602 * @mlo_peer_id: mlo peer id 1603 * @new_hw_link_id: hw link id of new primary 1604 */ 1605 struct peer_ptqm_migrate_list_entry { 1606 qdf_list_node_t node; 1607 struct wlan_objmgr_peer *peer; 1608 uint32_t mlo_peer_id; 1609 uint8_t new_hw_link_id; 1610 }; 1611 1612 /** 1613 * struct peer_migrate_ptqm_multi_entries - multi ptqm migrate peer entry params 1614 * @num_entries: Number of entries in the peer_list list 1615 * @peer_list: List to hold the peer entries to be migrated 1616 * 1617 */ 1618 struct peer_migrate_ptqm_multi_entries { 1619 uint16_t num_entries; 1620 qdf_list_t peer_list; 1621 }; 1622 1623 enum primary_link_peer_migration_evenr_status { 1624 PRIMARY_LINK_PEER_MIGRATION_SUCCESS, 1625 PRIMARY_LINK_PEER_MIGRATION_IN_PROGRESS, 1626 PRIMARY_LINK_PEER_MIGRATION_DELETE_IN_PROGRESS, 1627 PRIMARY_LINK_PEER_MIGRATION_DELETED, 1628 PRIMARY_LINK_PEER_MIGRATION_TX_PIPES_FAILED, 1629 PRIMARY_LINK_PEER_MIGRATION_RX_PIPES_FAILED, 1630 1631 /* Add any new status above this line */ 1632 PRIMARY_LINK_PEER_MIGRATION_FAIL = 255, 1633 }; 1634 1635 /** 1636 * struct peer_ptqm_migrate_event_params - peer ptqm migrate event parameter 1637 * @vdev_id: vdev id 1638 * @num_peers: peer count 1639 */ 1640 struct peer_ptqm_migrate_event_params { 1641 uint8_t vdev_id; 1642 uint16_t num_peers; 1643 }; 1644 1645 /** 1646 * struct peer_entry_ptqm_migrate_event_params - peer entry ptqm migrate 1647 * event parameter 1648 * @ml_peer_id: ML peer id 1649 * @status: migration status 1650 */ 1651 struct peer_entry_ptqm_migrate_event_params { 1652 uint16_t ml_peer_id; 1653 enum primary_link_peer_migration_evenr_status status; 1654 }; 1655 #endif /* QCA_SUPPORT_PRIMARY_LINK_MIGRATE */ 1656 1657 /** 1658 * struct wlan_mlo_sta_entry - MLO sta entry 1659 * @mac_node: QDF list mac_node member 1660 * @peer_mld_addr: MLO peer MAC address 1661 */ 1662 1663 struct wlan_mlo_sta_entry { 1664 qdf_list_node_t mac_node; 1665 struct qdf_mac_addr peer_mld_addr; 1666 }; 1667 1668 #endif 1669