xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlo_mgr/inc/wlan_mlo_mgr_ap.h (revision 64dc3a4199dccc18198e0b8c7df2ca952b243653)
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 public file containing AP functionality
20  */
21 #ifndef _WLAN_MLO_MGR_AP_H_
22 #define _WLAN_MLO_MGR_AP_H_
23 
24 #include <wlan_mlo_mgr_cmn.h>
25 #include <wlan_mlo_mgr_public_structs.h>
26 #include "wlan_mlo_mgr_msgq.h"
27 
28 #define WLAN_RESV_AID_BITS 0xc000
29 #define WLAN_AID(b)    ((b) & ~0xc000)
30 /**
31  * mlo_ap_vdev_attach() - update vdev obj and vdev count to
32  *                         wlan_mlo_dev_context
33  * @vdev: vdev pointer
34  * @link_id: link id
35  * @vdev_count: number of vdev in the mlo
36  *
37  * Return: true if succeeds
38  */
39 bool mlo_ap_vdev_attach(struct wlan_objmgr_vdev *vdev,
40 			uint8_t link_id,
41 			uint16_t vdev_count);
42 
43 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
44 /**
45  * mlo_ap_get_bridge_vdev_list() - get mlo bridge vdev list
46  * @vdev: vdev pointer
47  * @vdev_count: vdev count
48  * @wlan_bridge_vdev_list: bridge vdev list
49  *
50  * This API gets all partner bridge vdevs.
51  *
52  * It takes references for all vdev's with bit set in the list. Callers
53  * of this API should properly release references before destroying the
54  * list.
55  *
56  * Return: None
57  */
58 void mlo_ap_get_bridge_vdev_list(struct wlan_objmgr_vdev *vdev,
59 				 uint16_t *vdev_count,
60 				 struct wlan_objmgr_vdev **wlan_bridge_vdev_list);
61 
62 /**
63  * mlo_ap_get_bridge_vdev_count() - get mlo bridge vdev count
64  * @mld_ctx: mld context
65  * @vdev_count: vdev count
66  *
67  * This API gets count of all partner bridge vdevs
68  *
69  * Return: None
70  */
71 QDF_STATUS mlo_ap_get_bridge_vdev_count(struct wlan_mlo_dev_context *mld_ctx,
72 					uint16_t *vdev_count);
73 
74 /**
75  * mlo_ap_get_vdev_list_no_flag() - get mlo vdev list
76  * @vdev: vdev pointer
77  * @vdev_count: vdev count
78  * @wlan_vdev_list: vdev list
79  *
80  * This API gets all partner vdev's without checking for WLAN_VDEV_FEXT2_MLO.
81  *
82  * It takes references for all vdev's with bit set in the list. Callers
83  * of this API should properly release references before destroying the
84  * list.
85  *
86  * Return: None
87  */
88 void mlo_ap_get_vdev_list_no_flag(struct wlan_objmgr_vdev *vdev,
89 				  uint16_t *vdev_count,
90 				  struct wlan_objmgr_vdev **wlan_vdev_list);
91 #else
92 static inline void
93 mlo_ap_get_bridge_vdev_list(struct wlan_objmgr_vdev *vdev,
94 			    uint16_t *vdev_count,
95 			    struct wlan_objmgr_vdev **wlan_bridge_vdev_list)
96 {
97 }
98 
99 static inline QDF_STATUS
100 mlo_ap_get_bridge_vdev_count(struct wlan_mlo_dev_context *mld_ctx,
101 			     uint16_t *vdev_count)
102 {
103 	if (!vdev_count)
104 		return QDF_STATUS_E_NULL_VALUE;
105 
106 	*vdev_count = 0;
107 
108 	return QDF_STATUS_SUCCESS;
109 }
110 
111 static inline void
112 mlo_ap_get_vdev_list_no_flag(struct wlan_objmgr_vdev *vdev,
113 			     uint16_t *vdev_count,
114 			     struct wlan_objmgr_vdev **wlan_vdev_list)
115 {
116 }
117 #endif
118 
119 /**
120  * mlo_ap_get_vdev_list() - get mlo vdev list
121  * @vdev: vdev pointer
122  * @vdev_count: vdev count
123  * @wlan_vdev_list: vdev list
124  *
125  * This API gets all partner vdev's which have WLAN_VDEV_FEXT2_MLO bit
126  * set.
127  *
128  * It takes references for all vdev's with bit set in the list. Callers
129  * of this API should properly release references before destroying the
130  * list.
131  *
132  * Return: None
133  */
134 void mlo_ap_get_vdev_list(struct wlan_objmgr_vdev *vdev,
135 			  uint16_t *vdev_count,
136 			  struct wlan_objmgr_vdev **wlan_vdev_list);
137 
138 /**
139  * mlo_peer_get_vdev_list() - get mlo peer vdev list
140  * @peer: peer pointer
141  * @vdev_count: vdev count
142  * @wlan_vdev_list: vdev list
143  *
144  * This API gets all partner vdev's which have WLAN_VDEV_FEXT2_MLO bit
145  * set.
146  *
147  * It takes references for all vdev's with bit set in the list. Callers
148  * of this API should properly release references before destroying the
149  * list.
150  *
151  * Return: None
152  */
153 void mlo_peer_get_vdev_list(struct wlan_objmgr_peer *peer,
154 			    uint16_t *vdev_count,
155 			    struct wlan_objmgr_vdev **wlan_vdev_list);
156 
157 /**
158  * mlo_ap_get_active_vdev_list() - get mlo vdev list
159  * @vdev: vdev pointer
160  * @vdev_count: vdev count
161  * @wlan_vdev_list: vdev list
162  *
163  * This API gets all active partner vdev's which have WLAN_VDEV_FEXT2_MLO bit
164  * set.
165  *
166  * It takes references for all vdev's with bit set in the list. Callers
167  * of this API should properly release references before destroying the
168  * list.
169  *
170  * Return: None
171  */
172 void mlo_ap_get_active_vdev_list(struct wlan_objmgr_vdev *vdev,
173 				 uint16_t *vdev_count,
174 				 struct wlan_objmgr_vdev **wlan_vdev_list);
175 
176 /**
177  * mlo_ap_get_partner_vdev_list_from_mld() - get partner vdev from MLD
178  *                                           vdev_list without checking
179  *                                           WLAN_VDEV_FEXT2_MLO bit
180  * @vdev: vdev pointer
181  * @vdev_count: vdev count
182  * @wlan_vdev_list: vdev list
183  *
184  * This API gets all partner vdev's irrespective of WLAN_VDEV_FEXT2_MLO
185  * bit. Ideally, it copies all partners of the MLD with references.
186  *
187  * It takes references for all vdev's in the list. The callers of this
188  * API should properly release references before destroying the list.
189  *
190  * Return: None
191  */
192 void mlo_ap_get_partner_vdev_list_from_mld(
193 		struct wlan_objmgr_vdev *vdev,
194 		uint16_t *vdev_count,
195 		struct wlan_objmgr_vdev **wlan_vdev_list);
196 
197 /**
198  * mlo_ap_link_sync_wait_notify() - notify the mlo manager, once vdev
199  *                                  enters WLAN_VDEV_SS_MLO_SYNC_WAIT
200  * @vdev: vdev pointer
201  *
202  * Return: true if MLO_SYNC_COMPLETE is posted, else false
203  */
204 bool mlo_ap_link_sync_wait_notify(struct wlan_objmgr_vdev *vdev);
205 
206 /**
207  * mlo_ap_link_start_rsp_notify - Notify that the link start is completed
208  *
209  * @vdev: pointer to vdev
210  *
211  * Return: none
212  */
213 void mlo_ap_link_start_rsp_notify(struct wlan_objmgr_vdev *vdev);
214 
215 /**
216  * mlo_ap_vdev_detach() - notify the mlo manager to detach given vdev
217  * @vdev: vdev pointer
218  *
219  * Return: None
220  */
221 void mlo_ap_vdev_detach(struct wlan_objmgr_vdev *vdev);
222 
223 /**
224  * mlo_ap_link_down_cmpl_notify() - notify the mlo manager, once vdev
225  *                                  is down completely
226  * @vdev: vdev pointer
227  *
228  * Return: None
229  */
230 void mlo_ap_link_down_cmpl_notify(struct wlan_objmgr_vdev *vdev);
231 
232 /**
233  * wlan_vdev_mlme_aid_mgr_max_aid_set() - set VDEV Max AID
234  * @vdev: vdev pointer
235  * @max_aid: max AID
236  *
237  * This function sets max AID for the VDEV
238  *
239  * Return: void
240  */
241 void wlan_vdev_mlme_aid_mgr_max_aid_set(struct wlan_objmgr_vdev *vdev,
242 					uint16_t max_aid);
243 
244 /**
245  * wlan_vdev_mlme_set_start_aid() - set VDEV start AID
246  * @vdev: vdev pointer
247  * @start_aid: start AID
248  *
249  * This function sets start AID for the VDEV
250  *
251  * Return: void
252  */
253 QDF_STATUS wlan_vdev_mlme_set_start_aid(struct wlan_objmgr_vdev *vdev,
254 					uint16_t start_aid);
255 
256 /**
257  * wlan_vdev_mlme_get_start_aid() - set VDEV start AID
258  * @vdev: vdev pointer
259  *
260  * This function sets start AID for the VDEV
261  *
262  * Return: start AID
263  */
264 uint16_t wlan_vdev_mlme_get_start_aid(struct wlan_objmgr_vdev *vdev);
265 
266 /**
267  * wlan_mlo_vdev_init_mbss_aid_mgr() - Assigns tx vdev aid mgr to a VDEV
268  * @ml_dev: MLO DEV context
269  * @vdev: VDEV
270  * @tx_vdev: Transmit VDEV
271  *
272  * This function assigns Tx VDEV's AID mgr to non-Tx VDEV
273  *
274  * Return: SUCCESS if assigned successfully
275  */
276 QDF_STATUS wlan_mlo_vdev_init_mbss_aid_mgr(struct wlan_mlo_dev_context *ml_dev,
277 					   struct wlan_objmgr_vdev *vdev,
278 					   struct wlan_objmgr_vdev *tx_vdev);
279 
280 /**
281  * wlan_mlo_vdev_deinit_mbss_aid_mgr() - Resets aid mgr to a non-Tx VDEV
282  * @mldev: MLO DEV context
283  * @vdev: VDEV
284  * @tx_vdev: Transmit VDEV
285  *
286  * This function resets AID mgr of non-Tx VDEV
287  *
288  * Return: SUCCESS if reset successfully
289  */
290 QDF_STATUS wlan_mlo_vdev_deinit_mbss_aid_mgr(struct wlan_mlo_dev_context *mldev,
291 					     struct wlan_objmgr_vdev *vdev,
292 					     struct wlan_objmgr_vdev *tx_vdev);
293 
294 /**
295  * wlan_mlme_vdev_init_mbss_aid_mgr() - Assigns tx vdev aid mgr to a VDEV
296  * @vdev: VDEV
297  * @tx_vdev: Transmit VDEV
298  *
299  * This function assigns Tx VDEV's AID mgr to non-Tx VDEV
300  *
301  * Return: SUCCESS if assigned successfully
302  */
303 QDF_STATUS wlan_mlme_vdev_init_mbss_aid_mgr(struct wlan_objmgr_vdev *vdev,
304 					    struct wlan_objmgr_vdev *tx_vdev);
305 
306 /**
307  * wlan_mlme_vdev_deinit_mbss_aid_mgr() - Resets aid mgr to a non-Tx VDEV
308  * @vdev: VDEV
309  * @tx_vdev: Transmit VDEV
310  *
311  * This function resets AID mgr of non-Tx VDEV
312  *
313  * Return: SUCCESS if reset successfully
314  */
315 QDF_STATUS wlan_mlme_vdev_deinit_mbss_aid_mgr(struct wlan_objmgr_vdev *vdev,
316 					      struct wlan_objmgr_vdev *tx_vdev);
317 
318 /**
319  * wlan_vdev_aid_mgr_init() - VDEV AID mgr init
320  * @max_aid: max AID
321  *
322  * This function is called as part of vdev/MLO DEV initialization.
323  * This will allocate aid mgr structure for a VDEV
324  *
325  * Return: aid_mgr
326  */
327 struct wlan_vdev_aid_mgr *wlan_vdev_aid_mgr_init(uint16_t max_aid);
328 
329 /**
330  * wlan_vdev_aid_mgr_free() - VDEV AID mgr free
331  * @aid_mgr: AID mgr
332  *
333  * This function frees the aid mgr of the VDEV
334  *
335  * Return: void
336  */
337 void wlan_vdev_aid_mgr_free(struct wlan_vdev_aid_mgr *aid_mgr);
338 
339 /**
340  * wlan_mlo_vdev_aid_mgr_init() - MLO AID mgr init
341  * @ml_dev: MLO DEV context
342  *
343  * This function allocate AID space for all associated VDEVs of MLD
344  *
345  * Return: SUCCESS if allocated successfully
346  */
347 QDF_STATUS wlan_mlo_vdev_aid_mgr_init(struct wlan_mlo_dev_context *ml_dev);
348 
349 /**
350  * wlan_mlo_vdev_aid_mgr_deinit() - MLO AID mgr free
351  * @ml_dev: MLO DEV context
352  *
353  * This function frees AID space for all associated VDEVs of MLD
354  *
355  * Return: void
356  */
357 void wlan_mlo_vdev_aid_mgr_deinit(struct wlan_mlo_dev_context *ml_dev);
358 
359 /**
360  * wlan_mlo_vdev_alloc_aid_mgr() - Allocate AID space for a VDEV
361  * @ml_dev: MLO DEV context
362  * @vdev: VDEV
363  *
364  * This function allocates AID space for an associated VDEV of MLD
365  *
366  * Return: SUCCESS if allocated successfully
367  */
368 QDF_STATUS wlan_mlo_vdev_alloc_aid_mgr(struct wlan_mlo_dev_context *ml_dev,
369 				       struct wlan_objmgr_vdev *vdev);
370 
371 /**
372  * wlan_mlo_vdev_free_aid_mgr() - Free AID space for a VDEV
373  * @ml_dev: MLO DEV context
374  * @vdev: VDEV
375  *
376  * This function frees AID space for an associated VDEV of MLD
377  *
378  * Return: SUCCESS if freed successfully
379  */
380 QDF_STATUS wlan_mlo_vdev_free_aid_mgr(struct wlan_mlo_dev_context *ml_dev,
381 				      struct wlan_objmgr_vdev *vdev);
382 
383 /**
384  * mlo_peer_allocate_aid() - Allocate AID for MLO peer
385  * @ml_dev: MLO DEV context
386  * @ml_peer: MLO peer object
387  *
388  * This function allocates AID for an MLO peer
389  *
390  * Return: SUCCESS if allocated successfully
391  */
392 QDF_STATUS mlo_peer_allocate_aid(
393 		struct wlan_mlo_dev_context *ml_dev,
394 		struct wlan_mlo_peer_context *ml_peer);
395 
396 /**
397  * mlo_get_aid() - Allocate AID for a associated station
398  * @vdev: VDEV
399  *
400  * This function allocates AID for an associated station of MLD
401  *
402  * Return: AID
403  */
404 uint16_t mlo_get_aid(struct wlan_objmgr_vdev *vdev);
405 
406 /**
407  * mlo_free_aid() - Frees AID for a station
408  * @vdev: VDEV
409  * @assoc_id: Assoc ID
410  *
411  * This function frees AID for an associated station of MLD
412  *
413  * Return: SUCCESS if freed
414  */
415 QDF_STATUS mlo_free_aid(struct wlan_objmgr_vdev *vdev, uint16_t assoc_id);
416 
417 /**
418  * mlme_get_aid() - Allocate AID for a non-MLD station
419  * @vdev: VDEV
420  *
421  * This function allocates AID for an associated NON-MLD station of MLD
422  *
423  * Return: AID
424  */
425 uint16_t mlme_get_aid(struct wlan_objmgr_vdev *vdev);
426 
427 /**
428  * mlme_is_aid_set() - Check whether the AID is already allocated
429  * @vdev: VDEV
430  * @assoc_id: Assoc ID
431  *
432  * This function checks whether the AID is already allocated
433  *
434  * Return: 1 for AID is already allocated
435  *         0 for AID is available
436  */
437 int mlme_is_aid_set(struct wlan_objmgr_vdev *vdev, uint16_t assoc_id);
438 
439 /**
440  * wlan_mlo_peer_free_aid() - Free assoc id
441  * @ml_aid_mgr: MLO AID mgr
442  * @link_ix: Link index
443  * @assoc_id: Assoc id to be freed
444  *
445  * This function frees assoc id, resets bit in all bitmaps
446  *
447  * Return: SUCCESS,if it freed
448  */
449 QDF_STATUS wlan_mlo_peer_free_aid(
450 		struct wlan_ml_vdev_aid_mgr *ml_aid_mgr,
451 		uint8_t link_ix,
452 		uint16_t assoc_id);
453 
454 /**
455  * wlan_mlme_peer_free_aid() - Free link assoc id
456  * @vdev_aid_mgr: VDEV AID mgr
457  * @no_lock: lock needed for the operation
458  * @assoc_id: Assoc id to be freed
459  *
460  * This function frees assoc id of a specific VDEV
461  *
462  * Return: void
463  */
464 void wlan_mlme_peer_free_aid(
465 		struct wlan_vdev_aid_mgr *vdev_aid_mgr,
466 		bool no_lock, uint16_t assoc_id);
467 
468 /**
469  * mlo_peer_free_aid() - public API to free AID
470  * @ml_dev: MLO DEV context
471  * @ml_peer: MLO peer object
472  *
473  * This function invokes low level API to free assoc id
474  *
475  * Return: SUCCESS, if it freed
476  */
477 QDF_STATUS mlo_peer_free_aid(struct wlan_mlo_dev_context *ml_dev,
478 			     struct wlan_mlo_peer_context *ml_peer);
479 
480 /**
481  * mlme_free_aid() - public API to free link assoc id
482  * @vdev: VDEV object
483  * @assoc_id: Assoc id to be freed
484  *
485  * This function invokes low level API to free assoc id of a specific VDEV
486  *
487  * Return: void
488  */
489 void mlme_free_aid(struct wlan_objmgr_vdev *vdev, uint16_t assoc_id);
490 
491 /**
492  * mlo_set_aid() - public API to reserve AID
493  * @vdev: VDEV object
494  * @assoc_id: Assoc id to be reserved
495  *
496  * This function reserves AID of MLO VDEV
497  *
498  * Return: SUCCESS, if it is reserved
499  *         FAILURE, if it is already allocated
500  */
501 QDF_STATUS mlo_set_aid(struct wlan_objmgr_vdev *vdev,
502 		       uint16_t assoc_id);
503 
504 /**
505  * mlme_set_aid() - public API to reserve AID
506  * @vdev: VDEV object
507  * @assoc_id: Assoc id to be reserved
508  *
509  * This function reserves AID of VDEV
510  *
511  * Return: SUCCESS, if it is reserved
512  *         FAILURE, if it is already allocated
513  */
514 QDF_STATUS mlme_set_aid(struct wlan_objmgr_vdev *vdev,
515 			uint16_t assoc_id);
516 
517 /**
518  * wlan_mlme_get_aid_count() - public API to get AID count
519  * @vdev: VDEV object
520  *
521  * This function counts number AIDs allocated for the VDEV
522  *
523  * Return: aid count value
524  */
525 uint16_t wlan_mlme_get_aid_count(struct wlan_objmgr_vdev *vdev);
526 
527 /**
528  * mlo_ap_update_max_ml_peer_ids() - public API to update max MLO peer ids
529  * @pdev_id: PDEV id
530  * @max_ml_peer_ids: maximum ml peer ids supported
531  *
532  * This function updated the maximum MLO peer ids supported for the psoc
533  */
534 QDF_STATUS mlo_ap_update_max_ml_peer_ids(
535 		uint32_t pdev_id, uint32_t max_ml_peer_ids);
536 
537 /**
538  * mlo_ap_ml_peerid_alloc() - public API to allocate MLO peer id
539  *
540  * This function allocates MLO peer ID
541  *
542  * Return: mlo_peer_id on success,
543  *	 MLO_INVALID_PEER_ID on failure
544  */
545 uint16_t mlo_ap_ml_peerid_alloc(void);
546 
547 /**
548  * mlo_ap_ml_peerid_free() - public API to free MLO peer id
549  * @mlo_peer_id: ML peer id
550  *
551  * This function frees MLO peer ID
552  *
553  * Return: void
554  */
555 void mlo_ap_ml_peerid_free(uint16_t mlo_peer_id);
556 
557 #define ML_PRIMARY_UMAC_ID_INVAL 0xff
558 /**
559  * mlo_peer_assign_primary_umac() - Assign Primary UMAC
560  * @ml_peer: MLO peer object
561  * @peer_entry: Link peer entry
562  *
563  * This function assigns primary UMAC flag in peer entry
564  *
565  * Return: SUCCESS,if it allocated
566  */
567 void mlo_peer_assign_primary_umac(
568 		struct wlan_mlo_peer_context *ml_peer,
569 		struct wlan_mlo_link_peer_entry *peer_entry);
570 
571 /**
572  * mlo_peer_allocate_primary_umac() - Allocate Primary UMAC
573  * @ml_dev: MLO DEV context
574  * @ml_peer: MLO peer object
575  * @link_vdevs: link vdev array
576  *
577  * This function allocates primary UMAC for a MLO peer
578  *
579  * Return: SUCCESS,if it allocated
580  */
581 QDF_STATUS mlo_peer_allocate_primary_umac(
582 		struct wlan_mlo_dev_context *ml_dev,
583 		struct wlan_mlo_peer_context *ml_peer,
584 		struct wlan_objmgr_vdev *link_vdevs[]);
585 
586 /**
587  * mlo_peer_free_primary_umac() - Free Primary UMAC
588  * @ml_dev: MLO DEV context
589  * @ml_peer: MLO peer object
590  *
591  * This function frees primary UMAC for a MLO peer
592  *
593  * Return: SUCCESS,if it is freed
594  */
595 QDF_STATUS mlo_peer_free_primary_umac(
596 		struct wlan_mlo_dev_context *ml_dev,
597 		struct wlan_mlo_peer_context *ml_peer);
598 
599 /**
600  * mlo_ap_vdev_quiet_set() - Set quiet bitmap for requested vdev
601  * @vdev: Pointer to object manager vdev
602  *
603  * Return: void
604  */
605 void mlo_ap_vdev_quiet_set(struct wlan_objmgr_vdev *vdev);
606 
607 /**
608  * mlo_ap_vdev_quiet_clear() - Clear quiet bitmap for requested vdev
609  * @vdev: Pointer to object manager vdev
610  *
611  * Return: void
612  */
613 void mlo_ap_vdev_quiet_clear(struct wlan_objmgr_vdev *vdev);
614 
615 /**
616  * mlo_ap_vdev_quiet_is_any_idx_set() - Check if any index is set in
617  * quiet bitmap
618  * @vdev: Pointer to object manager vdev
619  *
620  * Return: true, if any index is set, else false
621  */
622 bool mlo_ap_vdev_quiet_is_any_idx_set(struct wlan_objmgr_vdev *vdev);
623 
624 #if defined(MESH_MODE_SUPPORT) && defined(WLAN_FEATURE_11BE_MLO)
625 /**
626  * mlo_peer_populate_mesh_params() - Populate mesh parameters in ml_peer
627  * @ml_peer: ml_peer to which mesh config parameters need to be populated
628  * @ml_info: ml_info with mesh config associated with this link
629  *
630  * Return: void
631  */
632 void mlo_peer_populate_mesh_params(
633 		struct wlan_mlo_peer_context *ml_peer,
634 		struct mlo_partner_info *ml_info);
635 #else
636 static inline
637 void mlo_peer_populate_mesh_params(
638 		struct wlan_mlo_peer_context *ml_peer,
639 		struct mlo_partner_info *ml_info)
640 {
641 }
642 #endif
643 
644 #ifdef UMAC_SUPPORT_MLNAWDS
645 /**
646  * mlo_peer_populate_nawds_params() - Populate nawds parameters in ml_peer
647  * @ml_peer: ml_peer to which nawds config parameters need to be populated
648  * @ml_info: ml_info with nawds config associated with this link
649  *
650  * Return: void
651  */
652 void mlo_peer_populate_nawds_params(
653 		struct wlan_mlo_peer_context *ml_peer,
654 		struct mlo_partner_info *ml_info);
655 #else
656 static inline
657 void mlo_peer_populate_nawds_params(
658 		struct wlan_mlo_peer_context *ml_peer,
659 		struct mlo_partner_info *ml_info)
660 {
661 }
662 #endif
663 
664 /**
665  * mlo_peer_create_get_frm_buf() - get frm_buf to peer_create
666  * @ml_peer: MLO peer
667  * @peer_create: pointer to peer_create_notif context
668  * @frm_buf: pointer to frame buffer to be cloned to peer_create
669  *
670  * Return: SUCCESS if
671  * - peer_create frame buffer cloned successfully in non NAWDS case Or
672  * - ml_peer is in NAWDS mode.
673  */
674 QDF_STATUS mlo_peer_create_get_frm_buf(
675 		struct wlan_mlo_peer_context *ml_peer,
676 		struct peer_create_notif_s *peer_create,
677 		qdf_nbuf_t frm_buf);
678 
679 /**
680  * wlan_mlo_ap_get_active_links() - Get number of active link VDEVs of MLD
681  * @vdev: vdev pointer
682  *
683  * Return: active vdev count.
684  */
685 uint16_t wlan_mlo_ap_get_active_links(struct wlan_objmgr_vdev *vdev);
686 
687 #ifdef QCA_SUPPORT_PRIMARY_LINK_MIGRATE
688 /**
689  * mlo_ap_ml_ptqm_peerid_free() - API to clear ml peer id bmap set for
690  * ptqm migration
691  * @ml_dev: ML dev pointer
692  * @mlo_peer_id: MLO peer id
693  *
694  * Return: none
695  */
696 void mlo_ap_ml_ptqm_peerid_free(struct wlan_mlo_dev_context *ml_dev,
697 				uint16_t mlo_peer_id);
698 #else
699 static inline
700 void mlo_ap_ml_ptqm_peerid_free(struct wlan_mlo_dev_context *ml_dev,
701 				uint16_t mlo_peer_id)
702 { }
703 #endif /* QCA_SUPPORT_PRIMARY_LINK_MIGRATE */
704 #endif
705