xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlo_mgr/inc/wlan_mlo_mgr_sta.h (revision 8cfe6b10058a04cafb17eed051f2ddf11bee8931)
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 STA functionality
20  */
21 #ifndef _WLAN_MLO_MGR_STA_H_
22 #define _WLAN_MLO_MGR_STA_H_
23 
24 #include <wlan_cm_ucfg_api.h>
25 #include <wlan_objmgr_vdev_obj.h>
26 #include <wlan_mlo_mgr_cmn.h>
27 #ifdef WLAN_FEATURE_11BE_MLO
28 #include <wlan_mlo_mgr_public_structs.h>
29 
30 /**
31  * mlo_connect - Start the connection process
32  * @vdev: pointer to vdev
33  * @req: connection request
34  *
35  * Return: QDF_STATUS
36  */
37 QDF_STATUS mlo_connect(struct wlan_objmgr_vdev *vdev,
38 		       struct wlan_cm_connect_req *req);
39 
40 /**
41  * mlo_sta_link_connect_notify - Called by connection manager to notify the
42  * STA link connect is complete
43  * @vdev: pointer to vdev
44  * @rsp: MLO connect response
45  *
46  * Connection manager will notify the MLO manager when the link has started
47  * and MLO manager will start the subsequent connections, if necessary
48  *
49  * Return: none
50  */
51 void
52 mlo_sta_link_connect_notify(struct wlan_objmgr_vdev *vdev,
53 			    struct wlan_cm_connect_resp *rsp);
54 
55 /**
56  * mlo_disconnect - Start the disconnection process
57  * @vdev: pointer to vdev
58  * @source: source of the request (can be connect or disconnect request)
59  * @reason_code: reason for disconnect
60  * @bssid: BSSID
61  *
62  * Return: QDF_STATUS
63  */
64 QDF_STATUS mlo_disconnect(struct wlan_objmgr_vdev *vdev,
65 			  enum wlan_cm_source source,
66 			  enum wlan_reason_code reason_code,
67 			  struct qdf_mac_addr *bssid);
68 
69 /**
70  * mlo_sync_disconnect - Start the sync disconnection process
71  * @vdev: pointer to vdev
72  * @source: source of the request (can be connect or disconnect request)
73  * @reason_code: reason for disconnect
74  * @bssid: BSSID
75  *
76  * Return: QDF_STATUS
77  */
78 QDF_STATUS mlo_sync_disconnect(struct wlan_objmgr_vdev *vdev,
79 			       enum wlan_cm_source source,
80 			       enum wlan_reason_code reason_code,
81 			       struct qdf_mac_addr *bssid);
82 
83 /**
84  * mlo_sta_link_disconn_notify - Notifies that STA link disconnect completion
85  * @vdev: pointer to vdev
86  * @resp: disconnect resp
87  *
88  * Return: none
89  */
90 void mlo_sta_link_disconn_notify(struct wlan_objmgr_vdev *vdev,
91 				 struct wlan_cm_discon_rsp *resp);
92 
93 /**
94  * mlo_handle_sta_link_connect_failure - Notifies that STA link connect failure
95  * @vdev: pointer to vdev
96  * @rsp: connect resp
97  *
98  * Return: none
99  */
100 void mlo_handle_sta_link_connect_failure(struct wlan_objmgr_vdev *vdev,
101 					 struct wlan_cm_connect_resp *rsp);
102 
103 /**
104  * mlo_handle_pending_disconnect - Handle pending disconnect if received
105  * while link connect is ongoing.
106  * @vdev: pointer to vdev
107  *
108  * Return: none
109  */
110 void mlo_handle_pending_disconnect(struct wlan_objmgr_vdev *vdev);
111 
112 /**
113  * mlo_is_mld_sta - Check if MLD associated with the vdev is a station
114  * @vdev: pointer to vdev
115  *
116  * Return: true if MLD is a station, false otherwise
117  */
118 bool mlo_is_mld_sta(struct wlan_objmgr_vdev *vdev);
119 
120 /**
121  * ucfg_mlo_is_mld_disconnected - Check whether MLD is disconnected
122  * @vdev: pointer to vdev
123  *
124  * Return: true if mld is disconnected, false otherwise
125  */
126 bool ucfg_mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev);
127 
128 /**
129  * mlo_is_mld_disconnecting_connecting - Check whether MLD is disconnecting or
130  * connecting
131  * @vdev: pointer to vdev
132  *
133  * Return: true if mld is disconnecting or connecting, false otherwise
134  */
135 bool mlo_is_mld_disconnecting_connecting(struct wlan_objmgr_vdev *vdev);
136 
137 #ifndef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
138 /**
139  * ucfg_mlo_is_mld_connected - Check whether MLD is connected
140  * @vdev: pointer to vdev
141  *
142  * Return: true if mld is connected, false otherwise
143  */
144 bool ucfg_mlo_is_mld_connected(struct wlan_objmgr_vdev *vdev);
145 
146 /**
147  * ucfg_mlo_mld_clear_mlo_cap - Clear MLO cap for all vdevs in MLD
148  * @vdev: pointer to vdev
149  *
150  * Return: None
151  */
152 void ucfg_mlo_mld_clear_mlo_cap(struct wlan_objmgr_vdev *vdev);
153 #endif
154 
155 /**
156  * ucfg_mlo_get_assoc_link_vdev - API to get assoc link vdev
157  * @vdev: vdev object
158  *
159  * Return: MLD assoc link vdev
160  */
161 struct wlan_objmgr_vdev *
162 ucfg_mlo_get_assoc_link_vdev(struct wlan_objmgr_vdev *vdev);
163 
164 /**
165  * wlan_mlo_get_assoc_link_vdev - API to get assoc link vdev
166  * @vdev: vdev object
167  *
168  * Return: MLD assoc link vdev
169  */
170 struct wlan_objmgr_vdev *
171 wlan_mlo_get_assoc_link_vdev(struct wlan_objmgr_vdev *vdev);
172 
173 /**
174  * mlo_update_connected_links_bmap: update connected links bitmap
175  * @mlo_dev_ctx: mlo dev context ptr
176  * @ml_partner_info: ml parnter info ptr
177  *
178  * Return: none
179  */
180 void
181 mlo_update_connected_links_bmap(struct wlan_mlo_dev_context *mlo_dev_ctx,
182 				struct mlo_partner_info ml_partner_info);
183 
184 /**
185  * mlo_clear_connected_links_bmap() - clear connected links bitmap
186  * @vdev: vdev object
187  *
188  * Return: none
189  */
190 void mlo_clear_connected_links_bmap(struct wlan_objmgr_vdev *vdev);
191 
192 /**
193  * mlo_set_cu_bpcc() - set the bpcc per link id
194  * @vdev: vdev object
195  * @vdev_id: the id of vdev
196  * @bpcc: bss parameters change count
197  *
198  * Return: QDF_STATUS
199  */
200 QDF_STATUS mlo_set_cu_bpcc(struct wlan_objmgr_vdev *vdev, uint8_t vdev_id,
201 			   uint8_t bpcc);
202 
203 /**
204  * mlo_get_cu_bpcc() - get the bpcc per link id
205  * @vdev: vdev object
206  * @vdev_id: the id of vdev
207  * @bpcc: the bss parameters change count pointer to save value
208  *
209  * Return: QDF_STATUS
210  */
211 QDF_STATUS mlo_get_cu_bpcc(struct wlan_objmgr_vdev *vdev, uint8_t vdev_id,
212 			   uint8_t *bpcc);
213 
214 /**
215  * mlo_init_cu_bpcc() - initialize the bpcc for vdev
216  * @mlo_dev_ctx: wlan mlo dev context
217  * @vdev_id: vdev id
218  *
219  * Return: void
220  */
221 void mlo_init_cu_bpcc(struct wlan_mlo_dev_context *mlo_dev_ctx,
222 		      uint8_t vdev_id);
223 
224 /**
225  * mlo_clear_cu_bpcc() - clear the bpcc info
226  * @vdev: vdev object
227  *
228  * Return: void
229  */
230 void mlo_clear_cu_bpcc(struct wlan_objmgr_vdev *vdev);
231 
232 /**
233  * typedef mlo_vdev_op_handler() - API to have operation on ml vdevs
234  * @vdev: vdev object
235  * @arg: operation-specific argument
236  */
237 typedef void (*mlo_vdev_op_handler)(struct wlan_objmgr_vdev *vdev,
238 				    void *arg);
239 
240 /**
241  * mlo_iterate_connected_vdev_list: Iterate on connected ML links
242  * @vdev: vdev object
243  * @handler: the handler will be called for each object in ML list
244  * @arg: argument to be passed to handler
245  *
246  * Return: none
247  */
248 static inline
249 void mlo_iterate_connected_vdev_list(struct wlan_objmgr_vdev *vdev,
250 				     mlo_vdev_op_handler handler,
251 				     void *arg)
252 {
253 	struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
254 	struct wlan_mlo_sta *sta_ctx = NULL;
255 	uint8_t i = 0;
256 
257 	if (!mlo_dev_ctx || !(wlan_vdev_mlme_is_mlo_vdev(vdev)))
258 		return;
259 
260 	sta_ctx = mlo_dev_ctx->sta_ctx;
261 	if (!sta_ctx)
262 		return;
263 
264 	for (i =  0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
265 		if (!mlo_dev_ctx->wlan_vdev_list[i])
266 			continue;
267 		if (qdf_test_bit(i, sta_ctx->wlan_connected_links)) {
268 			if (handler)
269 				handler(mlo_dev_ctx->wlan_vdev_list[i], arg);
270 		}
271 	}
272 }
273 
274 /**
275  * call_handler_for_standalone_ap: Iterate on all standalone ML vdevs in
276  * ML AP context and call handler only for standalone AP
277  *
278  * @ap_dev_ctx: AP vdev context
279  * @handler: the handler will be called for each object in ML list
280  * @arg: argument to be passed to handler
281  *
282  * Return: none
283  */
284 static inline void
285 call_handler_for_standalone_ap(struct wlan_mlo_dev_context *ap_dev_ctx,
286 			       mlo_vdev_op_handler handler, void *arg)
287 {
288 	struct wlan_objmgr_vdev *ml_ap_vdev = NULL;
289 	int i;
290 
291 	for (i =  0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
292 		/* For each vdev in ML AP context, check if its PDEV has any
293 		 * STA. If it doesn't, call the handler for that particular
294 		 * VDEV.
295 		 */
296 		if (!ap_dev_ctx->wlan_vdev_list[i])
297 			continue;
298 		ml_ap_vdev = ap_dev_ctx->wlan_vdev_list[i];
299 		handler(ml_ap_vdev, arg);
300 	}
301 }
302 
303 /**
304  * mlo_iterate_ml_standalone_vdev_list: Iterate on all standalone ML vdevs in
305  * ML link
306  *
307  * @vdev: vdev object
308  * @handler: the handler will be called for each object in ML list
309  * @arg: argument to be passed to handler
310  *
311  * Return: none
312  */
313 static inline
314 void mlo_iterate_ml_standalone_vdev_list(struct wlan_objmgr_vdev *vdev,
315 					 mlo_vdev_op_handler handler,
316 					 void *arg)
317 {
318 	struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
319 	struct wlan_mlo_sta *sta_ctx = NULL;
320 	uint8_t i = 0;
321 	struct wlan_objmgr_pdev *pdev = NULL;
322 	struct wlan_objmgr_vdev *vdev_temp = NULL;
323 	struct wlan_mlo_dev_context *ap_ml_ctx;
324 	qdf_list_t *vdev_list;
325 
326 	if (!mlo_dev_ctx || !(wlan_vdev_mlme_is_mlo_vdev(vdev)) || !handler)
327 		return;
328 
329 	sta_ctx = mlo_dev_ctx->sta_ctx;
330 	if (!sta_ctx)
331 		return;
332 
333 	/* If repeater is configured as dependent WDS repeater,
334 	 * bring up/bring down all the standalone AP vaps in it once all
335 	 * the other AP vaps present in the AP ML context are up/down.
336 	 */
337 
338 	for (i =  0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
339 		if (!mlo_dev_ctx->wlan_vdev_list[i])
340 			continue;
341 
342 		pdev = wlan_vdev_get_pdev(mlo_dev_ctx->wlan_vdev_list[i]);
343 		vdev_list = &pdev->pdev_objmgr.wlan_vdev_list;
344 		vdev_temp = wlan_pdev_vdev_list_peek_head(vdev_list);
345 		while (vdev_temp) {
346 			// Get all VDEVs of the STA vap from its PDEV
347 			if ((vdev_temp != vdev) &&
348 			    wlan_vdev_mlme_get_opmode(vdev_temp) ==
349 			    QDF_SAP_MODE) {
350 				ap_ml_ctx = vdev_temp->mlo_dev_ctx;
351 				if (!ap_ml_ctx)
352 					return;
353 
354 				call_handler_for_standalone_ap(ap_ml_ctx,
355 							       handler, arg);
356 			}
357 
358 			vdev_temp = wlan_vdev_get_next_vdev_of_pdev(
359 							vdev_list, vdev_temp);
360 		}
361 	}
362 }
363 
364 /**
365  * mlo_update_connect_req_links: update connect req links index
366  * @vdev: vdev object
367  * @value: set/clear the bit
368  *
369  * Return: none
370  */
371 static inline void
372 mlo_update_connect_req_links(struct wlan_objmgr_vdev *vdev, uint8_t value)
373 {
374 	struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
375 	struct wlan_mlo_sta *sta_ctx = NULL;
376 	uint8_t i = 0;
377 
378 	if (!mlo_dev_ctx)
379 		return;
380 
381 	sta_ctx = mlo_dev_ctx->sta_ctx;
382 	if (!sta_ctx)
383 		return;
384 
385 	for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
386 		if (!mlo_dev_ctx->wlan_vdev_list[i])
387 			continue;
388 
389 		if (vdev == mlo_dev_ctx->wlan_vdev_list[i]) {
390 			if (value)
391 				qdf_set_bit(i, sta_ctx->wlan_connect_req_links);
392 			else
393 				qdf_clear_bit(
394 					i, sta_ctx->wlan_connect_req_links);
395 		}
396 	}
397 }
398 
399 /**
400  * mlo_is_vdev_connect_req_link: API to check if vdev is in active connection
401  * @vdev: vdev object
402  *
403  * Return: true is vdev is participating in active connect else false
404  */
405 static inline bool
406 mlo_is_vdev_connect_req_link(struct wlan_objmgr_vdev *vdev)
407 {
408 	struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
409 	struct wlan_mlo_sta *sta_ctx = NULL;
410 
411 	if (!mlo_dev_ctx)
412 		return false;
413 
414 	sta_ctx = mlo_dev_ctx->sta_ctx;
415 	if (!sta_ctx)
416 		return false;
417 
418 	if (qdf_test_bit(
419 		mlo_get_link_vdev_ix(vdev->mlo_dev_ctx, vdev),
420 		sta_ctx->wlan_connect_req_links))
421 		return true;
422 
423 	return false;
424 }
425 
426 /**
427  * mlo_clear_connect_req_links_bmap() - clear connect req links bitmap
428  * @vdev: vdev object
429  *
430  * Return: none
431  */
432 static inline
433 void mlo_clear_connect_req_links_bmap(struct wlan_objmgr_vdev *vdev)
434 {
435 	struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
436 	struct wlan_mlo_sta *sta_ctx = NULL;
437 
438 	if (!mlo_dev_ctx)
439 		return;
440 
441 	sta_ctx = mlo_dev_ctx->sta_ctx;
442 	if (!sta_ctx)
443 		return;
444 
445 	qdf_mem_zero(sta_ctx->wlan_connect_req_links,
446 		     sizeof(sta_ctx->wlan_connect_req_links));
447 }
448 
449 /**
450  * mlo_update_connected_links: update connected links index
451  * @vdev: vdev object
452  * @value: set/clear the bit
453  *
454  * Return: none
455  */
456 static inline void
457 mlo_update_connected_links(struct wlan_objmgr_vdev *vdev, uint8_t value)
458 {
459 	struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
460 	struct wlan_mlo_sta *sta_ctx = NULL;
461 	uint8_t i = 0;
462 
463 	if (!mlo_dev_ctx)
464 		return;
465 
466 	sta_ctx = mlo_dev_ctx->sta_ctx;
467 	if (!sta_ctx)
468 		return;
469 
470 	for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
471 		if (!mlo_dev_ctx->wlan_vdev_list[i])
472 			continue;
473 
474 		if (vdev == mlo_dev_ctx->wlan_vdev_list[i]) {
475 			if (value)
476 				qdf_set_bit(i, sta_ctx->wlan_connected_links);
477 			else
478 				qdf_clear_bit(i, sta_ctx->wlan_connected_links);
479 		}
480 	}
481 }
482 
483 #ifndef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
484 /**
485  * mlo_get_ml_vdev_by_mac: get ml vdev from mac
486  * @vdev: vdev object
487  * @macaddr: mac of vdev to be returned
488  *
489  * Return: vdev object if found else NULL
490  */
491 struct wlan_objmgr_vdev *
492 mlo_get_ml_vdev_by_mac(struct wlan_objmgr_vdev *vdev,
493 		       struct qdf_mac_addr *macaddr);
494 #endif
495 
496 /**
497  * mlo_set_keys_saved: set mlo keys saved bool for vdev
498  * @vdev: vdev object
499  * @mac_address: peer mac address
500  * @value: bool true or false
501  * Return: none
502  */
503 void mlo_set_keys_saved(struct wlan_objmgr_vdev *vdev,
504 			struct qdf_mac_addr *mac_address, bool value);
505 
506 /**
507  * mlo_get_keys_saved: get if mlo keys are saved for vdev
508  * @vdev: vdev object
509  * @mac_address: peer mac address
510  * Return: boolean value true or false
511  */
512 bool mlo_get_keys_saved(struct wlan_objmgr_vdev *vdev, uint8_t *mac_address);
513 
514 /**
515  * mlo_get_chan_freq_by_bssid - Get channel freq by bssid
516  * @pdev: pdev pointer
517  * @bssid: link mac address
518  *
519  * Return: chan frequency
520  */
521 qdf_freq_t
522 mlo_get_chan_freq_by_bssid(struct wlan_objmgr_pdev *pdev,
523 			   struct qdf_mac_addr *bssid);
524 
525 /**
526  * mlo_get_assoc_rsp - Get Assoc response from mlo manager
527  * @vdev: vdev obj mgr
528  * @assoc_rsp_frame: association response frame ptr
529  *
530  * Return: none
531  */
532 void mlo_get_assoc_rsp(struct wlan_objmgr_vdev *vdev,
533 		       struct element_info *assoc_rsp_frame);
534 
535 /**
536  * mlo_sta_save_quiet_status - save quiet status for given link of mlo station
537  * @mlo_dev_ctx: mlo context
538  * @link_id: link id
539  * @quiet_status: True if quiet starts. False if quiet stops.
540  *
541  * Return: QDF_STATUS
542  */
543 QDF_STATUS mlo_sta_save_quiet_status(struct wlan_mlo_dev_context *mlo_dev_ctx,
544 				     uint8_t link_id,
545 				     bool quiet_status);
546 
547 /**
548  * mlo_is_sta_in_quiet_status - is the link of given mlo sta is in quiet status
549  * @mlo_dev_ctx: mlo context
550  * @link_id: link id
551  *
552  * Return: true if the link of given mlo sta is in quiet status
553  */
554 bool mlo_is_sta_in_quiet_status(struct wlan_mlo_dev_context *mlo_dev_ctx,
555 				uint8_t link_id);
556 
557 /**
558  * mlo_is_sta_inactivity_allowed_with_quiet() - Is link OK to force inactivity
559  *                                              based on current quiet status
560  *                                              of mlo connection
561  * @psoc: pointer to psoc
562  * @vdev_id_list: vdev id list
563  * @num_mlo: number of mlo vdev
564  * @mlo_idx: list of index of vdev_id_list if it is vdev id of mlo vdev
565  * @affected_links: number of links to be set inactivity
566  * @affected_list: list of vdev id to be set inactivity
567  *
568  * Return: true if any link not in mlo_vdev_list is not in quiet mode
569  */
570 bool mlo_is_sta_inactivity_allowed_with_quiet(struct wlan_objmgr_psoc *psoc,
571 					      uint8_t *vdev_id_list,
572 					      uint8_t num_mlo, uint8_t *mlo_idx,
573 					      uint8_t affected_links,
574 					      uint8_t *affected_list);
575 
576 /**
577  * mlo_is_sta_csa_synced - Is mlo sta csa parameters are synced or not
578  * @mlo_dev_ctx: mlo context
579  * @link_id: link id
580  *
581  * Return: true if mlo sta csa parameters of given link id is synced
582  */
583 bool mlo_is_sta_csa_synced(struct wlan_mlo_dev_context *mlo_dev_ctx,
584 			   uint8_t link_id);
585 
586 /**
587  * mlo_sta_csa_save_params - Save csa parameters for mlo station
588  * @mlo_dev_ctx: mlo context
589  * @link_id: link id
590  * @csa_param: csa parameters to be saved
591  *
592  * Return: QDF_STATUS
593  */
594 QDF_STATUS mlo_sta_csa_save_params(struct wlan_mlo_dev_context *mlo_dev_ctx,
595 				   uint8_t link_id,
596 				   struct csa_offload_params *csa_param);
597 
598 /**
599  * mlo_sta_up_active_notify - mlo sta up active notify
600  * @vdev: vdev obj mgr
601  *
602  * Return: QDF_STATUS
603  */
604 QDF_STATUS mlo_sta_up_active_notify(struct wlan_objmgr_vdev *vdev);
605 
606 /**
607  * mlo_is_sta_csa_param_handled - Is given csa_param handled or not
608  * @vdev: vdev obj mgr
609  * @csa_param: csa parameters to be checked
610  *
611  * Return: true if given csa parameters is handled
612  */
613 bool mlo_is_sta_csa_param_handled(struct wlan_objmgr_vdev *vdev,
614 				  struct csa_offload_params *csa_param);
615 
616 /**
617  * mlo_internal_disconnect_links - Internal disconnect for connection manager
618  * @vdev: vdev obj mgr
619  *
620  * Return: none
621  */
622 void mlo_internal_disconnect_links(struct wlan_objmgr_vdev *vdev);
623 
624 /**
625  * mlo_sta_vdev_get_reconfig_timer_state() - Get ml reconfig timer state on
626  * vdev
627  * @vdev: vdev pointer
628  *
629  * Return: true if reconfig timer is active, otherwise false
630  */
631 bool mlo_sta_vdev_get_reconfig_timer_state(struct wlan_objmgr_vdev *vdev);
632 
633 /**
634  * mlo_sta_stop_reconfig_timer_by_vdev() - Stop ml reconfig timer
635  * @vdev: vdev pointer
636  *
637  * Return: None
638  */
639 void mlo_sta_stop_reconfig_timer_by_vdev(struct wlan_objmgr_vdev *vdev);
640 
641 /**
642  * mlo_sta_stop_reconfig_timer() - Stop reconfig timer on all vdev on ml dev
643  * @vdev: vdev pointer
644  *
645  * Return: None
646  */
647 void mlo_sta_stop_reconfig_timer(struct wlan_objmgr_vdev *vdev);
648 
649 /**
650  * mlo_sta_get_vdev_list() - get mlo vdev list
651  * @vdev: vdev pointer
652  * @vdev_count: vdev count
653  * @wlan_vdev_list: vdev list
654  *
655  * Return: None
656  */
657 void mlo_sta_get_vdev_list(struct wlan_objmgr_vdev *vdev, uint16_t *vdev_count,
658 			   struct wlan_objmgr_vdev **wlan_vdev_list);
659 
660 /**
661  * mlo_process_ml_reconfig_ie() - process ml reconfig ie for vdev
662  * @vdev: vdev pointer
663  * @scan_entry: RootAP scan entry
664  * @ml_ie: Pointer to ML IE
665  * @ml_ie_len: Length of ML IE
666  * @partner_info: Cached partner info
667  *
668  * Return: None
669  */
670 void mlo_process_ml_reconfig_ie(struct wlan_objmgr_vdev *vdev,
671 				struct scan_cache_entry *scan_entry,
672 				uint8_t *ml_ie, qdf_size_t ml_ie_len,
673 				struct mlo_partner_info *partner_info);
674 /**
675  * mlo_allocate_and_copy_ies() - allocate and copy ies
676  * @target: target connect req pointer
677  * @source: source connect req pointer
678  *
679  * Return: None
680  */
681 void
682 mlo_allocate_and_copy_ies(struct wlan_cm_connect_req *target,
683 			  struct wlan_cm_connect_req *source);
684 
685 /**
686  * mlo_free_connect_ies() - free connect ies
687  * @connect_req: connect req pointer
688  *
689  * Return: None
690  */
691 void
692 mlo_free_connect_ies(struct wlan_cm_connect_req *connect_req);
693 #else
694 static inline
695 QDF_STATUS mlo_connect(struct wlan_objmgr_vdev *vdev,
696 		       struct wlan_cm_connect_req *req)
697 {
698 	return wlan_cm_start_connect(vdev, req);
699 }
700 
701 static inline
702 void mlo_sta_link_connect_notify(struct wlan_objmgr_vdev *vdev,
703 				 struct wlan_cm_connect_resp *rsp)
704 { }
705 
706 static inline
707 QDF_STATUS mlo_disconnect(struct wlan_objmgr_vdev *vdev,
708 			  enum wlan_cm_source source,
709 			  enum wlan_reason_code reason_code,
710 			  struct qdf_mac_addr *bssid)
711 {
712 	QDF_STATUS status;
713 
714 	status = wlan_cm_disconnect(vdev, source,
715 				    reason_code,
716 				    bssid);
717 	return status;
718 }
719 
720 static inline
721 QDF_STATUS mlo_sync_disconnect(struct wlan_objmgr_vdev *vdev,
722 			       enum wlan_cm_source source,
723 			       enum wlan_reason_code reason_code,
724 			       struct qdf_mac_addr *bssid)
725 {
726 	return wlan_cm_disconnect_sync(vdev, CM_OSIF_DISCONNECT,
727 				       reason_code);
728 }
729 
730 static inline
731 void mlo_sta_link_disconn_notify(struct wlan_objmgr_vdev *vdev,
732 				 struct wlan_cm_discon_rsp *resp)
733 { }
734 
735 #ifndef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
736 static inline
737 bool ucfg_mlo_is_mld_connected(struct wlan_objmgr_vdev *vdev)
738 {
739 	return true;
740 }
741 
742 static inline
743 bool ucfg_mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev)
744 {
745 	return true;
746 }
747 #endif
748 
749 static inline
750 bool mlo_is_mld_disconnecting_connecting(struct wlan_objmgr_vdev *vdev)
751 {
752 	return false;
753 }
754 
755 static inline
756 bool mlo_is_mld_sta(struct wlan_objmgr_vdev *vdev)
757 {
758 	return false;
759 }
760 
761 static inline
762 struct wlan_objmgr_vdev *
763 ucfg_mlo_get_assoc_link_vdev(struct wlan_objmgr_vdev *vdev)
764 {
765 	return vdev;
766 }
767 
768 static inline void
769 mlo_update_connect_req_links(struct wlan_objmgr_vdev *vdev, uint8_t value)
770 { }
771 
772 static inline void
773 mlo_update_connected_links_bmap(struct wlan_mlo_dev_context *mlo_dev_ctx,
774 				struct mlo_partner_info ml_parnter_info)
775 { }
776 
777 static inline bool
778 mlo_is_vdev_connect_req_link(struct wlan_objmgr_vdev *vdev)
779 {
780 	return true;
781 }
782 
783 static inline void
784 mlo_update_connected_links(struct wlan_objmgr_vdev *vdev, uint8_t value)
785 { }
786 
787 static inline void
788 mlo_clear_connect_req_links_bmap(struct wlan_objmgr_vdev *vdev)
789 { }
790 
791 static inline void
792 mlo_clear_connected_links_bmap(struct wlan_objmgr_vdev *vdev)
793 { }
794 
795 static inline struct wlan_objmgr_vdev *
796 mlo_get_ml_vdev_by_mac(struct wlan_objmgr_vdev *vdev,
797 		       struct qdf_mac_addr *macaddr)
798 {
799 	return vdev;
800 }
801 
802 static inline qdf_freq_t
803 mlo_get_chan_freq_by_bssid(struct wlan_objmgr_pdev *pdev,
804 			   struct qdf_mac_addr *bssid)
805 {
806 	return 0;
807 }
808 
809 static inline void
810 mlo_get_assoc_rsp(struct wlan_objmgr_vdev *vdev,
811 		  struct element_info *assoc_rsp_frame)
812 {
813 }
814 
815 static inline bool
816 mlo_is_sta_csa_param_handled(struct wlan_objmgr_vdev *vdev,
817 			     struct csa_offload_params *csa_param)
818 {
819 	return false;
820 }
821 
822 static inline void mlo_internal_disconnect_links(struct wlan_objmgr_vdev *vdev)
823 {
824 }
825 
826 static inline
827 void mlo_sta_get_vdev_list(struct wlan_objmgr_vdev *vdev,
828 			   uint16_t *vdev_count,
829 			   struct wlan_objmgr_vdev **wlan_vdev_list)
830 {
831 }
832 
833 static inline bool
834 mlo_sta_vdev_get_reconfig_timer_state(struct wlan_objmgr_vdev *vdev)
835 {
836 	return false;
837 }
838 
839 static inline void
840 mlo_sta_stop_reconfig_timer_by_vdev(struct wlan_objmgr_vdev *vdev)
841 {
842 }
843 
844 static inline void mlo_sta_stop_reconfig_timer(struct wlan_objmgr_vdev *vdev)
845 {
846 }
847 
848 static inline
849 void mlo_set_keys_saved(struct wlan_objmgr_vdev *vdev,
850 			struct qdf_mac_addr *mac_address, bool value)
851 {
852 }
853 
854 static inline
855 bool mlo_get_keys_saved(struct wlan_objmgr_vdev *vdev,
856 			uint8_t *mac_address)
857 {
858 	return false;
859 }
860 
861 static inline
862 void mlo_process_ml_reconfig_ie(struct wlan_objmgr_vdev *vdev,
863 				struct scan_cache_entry *scan_entry,
864 				uint8_t *ml_ie, qdf_size_t ml_ie_len,
865 				struct mlo_partner_info *partner_info)
866 { }
867 #endif
868 #endif
869