xref: /wlan-driver/qca-wifi-host-cmn/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 /**
19  * DOC: wlan_cm_api.h
20  *
21  * This file maintains declarations of public apis
22  */
23 
24 #ifndef __WLAN_CM_API_H
25 #define __WLAN_CM_API_H
26 
27 #include "wlan_cm_public_struct.h"
28 #include "wlan_ext_mlme_obj_types.h"
29 
30 /**
31  * wlan_cm_start_connect() - connect start request
32  * @vdev: vdev pointer
33  * @req: connect req
34  *
35  * Return: QDF_STATUS
36  */
37 QDF_STATUS wlan_cm_start_connect(struct wlan_objmgr_vdev *vdev,
38 				 struct wlan_cm_connect_req *req);
39 
40 /**
41  * wlan_cm_disconnect() - disconnect start request
42  * @vdev: vdev pointer
43  * @source: disconnect source
44  * @reason_code: disconnect reason
45  * @bssid: bssid of AP to disconnect, can be null if not known
46  *
47  * Context: can be called from any context
48  *
49  * Return: QDF_STATUS
50  */
51 QDF_STATUS wlan_cm_disconnect(struct wlan_objmgr_vdev *vdev,
52 			      enum wlan_cm_source source,
53 			      enum wlan_reason_code reason_code,
54 			      struct qdf_mac_addr *bssid);
55 
56 /**
57  * wlan_cm_disconnect_sync() - disconnect request with wait till
58  * completed
59  * @vdev: vdev pointer
60  * @source: disconnect source
61  * @reason_code: disconnect reason
62  *
63  * Context: Only call for north bound disconnect req, if wait till complete
64  * is required, e.g. during vdev delete. Do not call from scheduler context.
65  *
66  * Return: QDF_STATUS
67  */
68 QDF_STATUS wlan_cm_disconnect_sync(struct wlan_objmgr_vdev *vdev,
69 				   enum wlan_cm_source source,
70 				   enum wlan_reason_code reason_code);
71 
72 /**
73  * wlan_cm_bss_select_ind_rsp() - Connection manager resp for bss
74  * select indication
75  * @vdev: vdev pointer
76  * @status: Status
77  *
78  * Return: QDF_STATUS
79  */
80 QDF_STATUS wlan_cm_bss_select_ind_rsp(struct wlan_objmgr_vdev *vdev,
81 				      QDF_STATUS status);
82 
83 /**
84  * wlan_cm_bss_peer_create_rsp() - Connection manager bss peer create response
85  * @vdev: vdev pointer
86  * @status: Status
87  * @peer_mac: Peer mac address
88  *
89  * Return: QDF_STATUS
90  */
91 QDF_STATUS wlan_cm_bss_peer_create_rsp(struct wlan_objmgr_vdev *vdev,
92 				       QDF_STATUS status,
93 				       struct qdf_mac_addr *peer_mac);
94 
95 /**
96  * wlan_cm_update_scan_mlme_info() - Called after connect/roam complete
97  * to update the scan cache with assoc state
98  * @vdev: vdev object pointer
99  * @resp: Connect response
100  *
101  * Return: QDF_STATUS
102  */
103 void wlan_cm_update_scan_mlme_info(struct wlan_objmgr_vdev *vdev,
104 				   struct wlan_cm_connect_resp *resp);
105 
106 /**
107  * wlan_cm_connect_rsp() - Connection manager connect response
108  * @vdev: vdev pointer
109  * @resp: Connect response
110  *
111  * Return: QDF_STATUS
112  */
113 QDF_STATUS wlan_cm_connect_rsp(struct wlan_objmgr_vdev *vdev,
114 			       struct wlan_cm_connect_resp *resp);
115 
116 /**
117  * wlan_cm_bss_peer_delete_ind() - Connection manager peer delete indication
118  * @vdev: vdev pointer
119  * @peer_mac: Peer mac address
120  *
121  * Return: QDF_STATUS
122  */
123 QDF_STATUS wlan_cm_bss_peer_delete_ind(struct wlan_objmgr_vdev *vdev,
124 				       struct qdf_mac_addr *peer_mac);
125 
126 /**
127  * wlan_cm_bss_peer_delete_rsp() - Connection manager peer delete response
128  * @vdev: vdev pointer
129  * @status: status
130  *
131  * Return: QDF_STATUS
132  */
133 QDF_STATUS wlan_cm_bss_peer_delete_rsp(struct wlan_objmgr_vdev *vdev,
134 				       uint32_t status);
135 
136 /**
137  * wlan_cm_disconnect_rsp() - Connection manager disconnect response
138  * @vdev: vdev pointer
139  * @resp: disconnect response
140  *
141  * Return: QDF_STATUS
142  */
143 QDF_STATUS wlan_cm_disconnect_rsp(struct wlan_objmgr_vdev *vdev,
144 				  struct wlan_cm_discon_rsp *resp);
145 
146 /**
147  * wlan_cm_set_max_connect_attempts() - Set max connect attempts
148  * @vdev: vdev pointer
149  * @max_connect_attempts: max connect attempts to be set.
150  *
151  * Set max connect attempts. Max value is limited to CM_MAX_CONNECT_ATTEMPTS.
152  *
153  * Return: void
154  */
155 void wlan_cm_set_max_connect_attempts(struct wlan_objmgr_vdev *vdev,
156 				      uint8_t max_connect_attempts);
157 
158 /**
159  * wlan_cm_set_max_connect_timeout() - Set max connect timeout
160  * @vdev: vdev pointer
161  * @max_connect_timeout: max connect timeout to be set.
162  *
163  * Set max connect timeout.
164  *
165  * Return: void
166  */
167 void wlan_cm_set_max_connect_timeout(struct wlan_objmgr_vdev *vdev,
168 				     uint32_t max_connect_timeout);
169 
170 /**
171  * wlan_cm_is_vdev_connecting() - check if vdev is in connecting state
172  * @vdev: vdev pointer
173  *
174  * Return: bool
175  */
176 bool wlan_cm_is_vdev_connecting(struct wlan_objmgr_vdev *vdev);
177 
178 /**
179  * wlan_cm_is_vdev_connected() - check if vdev is in connected state
180  * @vdev: vdev pointer
181  *
182  * Return: bool
183  */
184 bool wlan_cm_is_vdev_connected(struct wlan_objmgr_vdev *vdev);
185 
186 /**
187  * wlan_cm_is_vdev_active() - check if vdev is in active state ie connected or
188  * roaming state
189  * @vdev: vdev pointer
190  *
191  * Return: bool
192  */
193 bool wlan_cm_is_vdev_active(struct wlan_objmgr_vdev *vdev);
194 
195 /**
196  * wlan_cm_is_vdev_disconnecting() - check if vdev is in disconnecting state
197  * @vdev: vdev pointer
198  *
199  * Return: bool
200  */
201 bool wlan_cm_is_vdev_disconnecting(struct wlan_objmgr_vdev *vdev);
202 
203 /**
204  * wlan_cm_is_vdev_disconnected() - check if vdev is disconnected/init state
205  * @vdev: vdev pointer
206  *
207  * Return: bool
208  */
209 bool wlan_cm_is_vdev_disconnected(struct wlan_objmgr_vdev *vdev);
210 
211 /**
212  * wlan_cm_is_vdev_idle_due_to_link_switch() - Check if VDEV is in IDLE
213  * due to link switch sub-state.
214  * @vdev: VDEV objmgr pointer
215  *
216  * Return: bool
217  */
218 bool wlan_cm_is_vdev_idle_due_to_link_switch(struct wlan_objmgr_vdev *vdev);
219 
220 /**
221  * wlan_cm_is_vdev_roaming() - check if vdev is in roaming state
222  * @vdev: vdev pointer
223  *
224  * Return: bool
225  */
226 bool wlan_cm_is_vdev_roaming(struct wlan_objmgr_vdev *vdev);
227 
228 /**
229  * wlan_cm_free_connect_req() - free up connect request and its sub memory
230  * @connect_req: Connect request
231  *
232  * Return: void
233  */
234 void wlan_cm_free_connect_req(struct wlan_cm_connect_req *connect_req);
235 
236 /**
237  * wlan_cm_free_connect_resp() - free up connect response and its sub memory
238  * @connect_rsp: Connect response
239  *
240  * Return: void
241  */
242 void wlan_cm_free_connect_resp(struct wlan_cm_connect_resp *connect_rsp);
243 
244 /**
245  * wlan_cm_free_connect_req_param() - free up connect request sub memory
246  * @req: Connect request
247  *
248  * Return: void
249  */
250 void wlan_cm_free_connect_req_param(struct wlan_cm_connect_req *req);
251 
252 /**
253  * wlan_cm_is_link_switch_disconnect_resp() - Check if the disconnect response
254  * is for link switch request.
255  * @resp: Connection manager disconnect response.
256  *
257  * Return: bool
258  */
259 bool wlan_cm_is_link_switch_disconnect_resp(struct wlan_cm_discon_rsp *resp);
260 
261 /**
262  * wlan_cm_is_link_switch_connect_resp() - Check if the connect response if for
263  * link switch request.
264  * @resp: Connection manager connect response.
265  *
266  * Return: bool
267  */
268 bool wlan_cm_is_link_switch_connect_resp(struct wlan_cm_connect_resp *resp);
269 
270 /**
271  * wlan_cm_trigger_panic_on_cmd_timeout() - Trigger recovery on CM command
272  * timeout.
273  * @vdev: VDEV object manager
274  * @reason: Hang reason code
275  *
276  * Return: void
277  */
278 void wlan_cm_trigger_panic_on_cmd_timeout(struct wlan_objmgr_vdev *vdev,
279 					  enum qdf_hang_reason reason);
280 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
281 /**
282  * wlan_cm_is_vdev_roam_started() - check if vdev is in roaming state and
283  * roam started sub stated
284  * @vdev: vdev pointer
285  *
286  * Return: bool
287  */
288 bool wlan_cm_is_vdev_roam_started(struct wlan_objmgr_vdev *vdev);
289 
290 /**
291  * wlan_cm_is_vdev_roam_sync_inprogress() - check if vdev is in roaming state
292  * and roam sync substate
293  * @vdev: vdev pointer
294  *
295  * Return: bool
296  */
297 bool wlan_cm_is_vdev_roam_sync_inprogress(struct wlan_objmgr_vdev *vdev);
298 #else
wlan_cm_is_vdev_roam_started(struct wlan_objmgr_vdev * vdev)299 static inline bool wlan_cm_is_vdev_roam_started(struct wlan_objmgr_vdev *vdev)
300 {
301 	return false;
302 }
303 
304 static inline
wlan_cm_is_vdev_roam_sync_inprogress(struct wlan_objmgr_vdev * vdev)305 bool wlan_cm_is_vdev_roam_sync_inprogress(struct wlan_objmgr_vdev *vdev)
306 {
307 	return false;
308 }
309 #endif
310 
311 #ifdef WLAN_FEATURE_HOST_ROAM
312 /**
313  * wlan_cm_is_vdev_roam_preauth_state() - check if vdev is in roaming state and
314  * preauth is in progress
315  * @vdev: vdev pointer
316  *
317  * Return: bool
318  */
319 bool wlan_cm_is_vdev_roam_preauth_state(struct wlan_objmgr_vdev *vdev);
320 
321 /**
322  * wlan_cm_is_vdev_roam_reassoc_state() - check if vdev is in roaming state
323  * and reassoc is in progress
324  * @vdev: vdev pointer
325  *
326  * Return: bool
327  */
328 bool wlan_cm_is_vdev_roam_reassoc_state(struct wlan_objmgr_vdev *vdev);
329 #else
330 static inline
wlan_cm_is_vdev_roam_preauth_state(struct wlan_objmgr_vdev * vdev)331 bool wlan_cm_is_vdev_roam_preauth_state(struct wlan_objmgr_vdev *vdev)
332 {
333 	return false;
334 }
335 
336 static inline
wlan_cm_is_vdev_roam_reassoc_state(struct wlan_objmgr_vdev * vdev)337 bool wlan_cm_is_vdev_roam_reassoc_state(struct wlan_objmgr_vdev *vdev)
338 {
339 	return false;
340 }
341 #endif
342 
343 /**
344  * wlan_cm_connect_resp_fill_mld_addr_from_cm_id() - API to get MLD of
345  * current candidate from connect request ID.
346  * @vdev: VDEV objmgr pointer.
347  * @cm_id: connect request ID.
348  * @rsp: connect resp pointer.
349  *
350  * This wrapper API fills MLD address in @rsp from connect request ID.
351  *
352  * Return: void
353  */
354 void
355 wlan_cm_connect_resp_fill_mld_addr_from_cm_id(struct wlan_objmgr_vdev *vdev,
356 					      wlan_cm_id cm_id,
357 					      struct wlan_cm_connect_resp *rsp);
358 
359 /**
360  * wlan_cm_connect_resp_fill_mld_addr_from_vdev_id() - API to get MLD
361  * from scan entry in join request.
362  * @psoc: PSOC objmgr pointer.
363  * @vdev_id: session ID.
364  * @entry: Scan entry of the candidate.
365  * @rsp: connect response pointer.
366  *
367  * This wrapper API gets VDEV from join request and fills MLD address
368  * in @rsp from the scan entry in join request.
369  *
370  * Return: void
371  */
372 #ifdef WLAN_FEATURE_11BE_MLO
373 void
374 wlan_cm_connect_resp_fill_mld_addr_from_vdev_id(struct wlan_objmgr_psoc *psoc,
375 						uint8_t vdev_id,
376 						struct scan_cache_entry *entry,
377 						struct wlan_cm_connect_resp *rsp);
378 #else
379 static inline void
wlan_cm_connect_resp_fill_mld_addr_from_vdev_id(struct wlan_objmgr_psoc * psoc,uint8_t vdev_id,struct scan_cache_entry * entry,struct wlan_cm_connect_resp * rsp)380 wlan_cm_connect_resp_fill_mld_addr_from_vdev_id(struct wlan_objmgr_psoc *psoc,
381 						uint8_t vdev_id,
382 						struct scan_cache_entry *entry,
383 						struct wlan_cm_connect_resp *rsp)
384 {
385 }
386 #endif
387 
388 /**
389  * wlan_cm_get_active_connect_req() - Get copy of active connect request
390  * @vdev: vdev pointer
391  * @req: pointer to the copy of the active connect request
392  * *
393  * Context: Should be called only in the context of the
394  * cm request activation
395  *
396  * Return: true and connect req if any request is active
397  */
398 bool wlan_cm_get_active_connect_req(struct wlan_objmgr_vdev *vdev,
399 				    struct wlan_cm_vdev_connect_req *req);
400 
401 /**
402  * wlan_cm_is_first_candidate_connect_attempt() - Check whether it is
403  * the first attempt for the current AP after receiving connect request
404  * @vdev: vdev pointer
405  *
406  * Return: True if it is the first connecting attempt on a candidate.
407  * Otherwise return false
408  */
409 bool wlan_cm_is_first_candidate_connect_attempt(struct wlan_objmgr_vdev *vdev);
410 
411 /**
412  * wlan_cm_get_active_connect_req_param() - API to fetch connect request
413  * parameter.
414  * @vdev: vdev pointer
415  * @req: Connection request parameter buffer to be filled
416  *
417  * Return: QDF_STATUS
418  */
419 QDF_STATUS
420 wlan_cm_get_active_connect_req_param(struct wlan_objmgr_vdev *vdev,
421 				     struct wlan_cm_connect_req *req);
422 
423 #ifdef WLAN_FEATURE_HOST_ROAM
424 /**
425  * wlan_cm_get_active_reassoc_req() - Get copy of active reassoc request
426  * @vdev: vdev pointer
427  * @req: pointer to the copy of the active reassoc request
428  * *
429  * Context: Should be called only in the context of the
430  * cm request activation
431  *
432  * Return: true and reassoc req if any request is active
433  */
434 bool wlan_cm_get_active_reassoc_req(struct wlan_objmgr_vdev *vdev,
435 				    struct wlan_cm_vdev_reassoc_req *req);
436 #else
437 static inline
wlan_cm_get_active_reassoc_req(struct wlan_objmgr_vdev * vdev,struct wlan_cm_vdev_reassoc_req * req)438 bool wlan_cm_get_active_reassoc_req(struct wlan_objmgr_vdev *vdev,
439 				    struct wlan_cm_vdev_reassoc_req *req)
440 {
441 	return false;
442 }
443 #endif
444 
445 /**
446  * wlan_cm_get_active_disconnect_req() - Get copy of active disconnect request
447  * @vdev: vdev pointer
448  * @req: pointer to the copy of the active disconnect request
449  * *
450  * Context: Should be called only in the context of the
451  * cm request activation
452  *
453  * Return: true and disconnect req if any request is active
454  */
455 bool wlan_cm_get_active_disconnect_req(struct wlan_objmgr_vdev *vdev,
456 				       struct wlan_cm_vdev_discon_req *req);
457 
458 /**
459  * wlan_cm_reason_code_to_str() - return string conversion of reason code
460  * @reason: reason code.
461  *
462  * This utility function helps log string conversion of reason code.
463  *
464  * Return: string conversion of reason code, if match found;
465  *         "Unknown" otherwise.
466  */
467 const char *wlan_cm_reason_code_to_str(enum wlan_reason_code reason);
468 
469 /**
470  * wlan_cm_get_active_req_type() - return cm  active request type
471  * @vdev: vdev pointer
472  *
473  * This function returns the cm active request type
474  *
475  * Return: active request type if any, otherwise return 0
476  */
477 enum wlan_cm_active_request_type
478 wlan_cm_get_active_req_type(struct wlan_objmgr_vdev *vdev);
479 
480 /**
481  * wlan_cm_get_ext_hdl() - Get connection manager ext context from vdev
482  * @vdev: vdev pointer
483  *
484  * Return: pointer to connection manager ext context
485  */
486 cm_ext_t *wlan_cm_get_ext_hdl(struct wlan_objmgr_vdev *vdev);
487 
488 #ifdef WLAN_FEATURE_HOST_ROAM
489 /**
490  * wlan_cm_reassoc_rsp() - Connection manager reassoc response
491  * @vdev: vdev pointer
492  * @resp: Connect response
493  *
494  * Return: QDF_STATUS
495  */
496 QDF_STATUS wlan_cm_reassoc_rsp(struct wlan_objmgr_vdev *vdev,
497 			       struct wlan_cm_connect_resp *resp);
498 #else
499 static inline
wlan_cm_reassoc_rsp(struct wlan_objmgr_vdev * vdev,struct wlan_cm_connect_resp * resp)500 QDF_STATUS wlan_cm_reassoc_rsp(struct wlan_objmgr_vdev *vdev,
501 			       struct wlan_cm_connect_resp *resp)
502 {
503 	return QDF_STATUS_SUCCESS;
504 }
505 #endif
506 
507 /**
508  * wlan_cm_hw_mode_change_resp() - HW mode change response
509  * @pdev: pdev pointer
510  * @vdev_id: vdev id
511  * @cm_id: connection ID which gave the hw mode change request
512  * @status: status of the HW mode change.
513  *
514  * Return: void
515  */
516 #ifdef WLAN_POLICY_MGR_ENABLE
517 void wlan_cm_hw_mode_change_resp(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
518 				 wlan_cm_id cm_id, QDF_STATUS status);
519 #endif /* ifdef POLICY_MGR_ENABLE */
520 
521 #ifdef SM_ENG_HIST_ENABLE
522 /**
523  * wlan_cm_sm_history_print() - Prints SM history
524  * @vdev: Objmgr vdev
525  *
526  * API to print CM SM history
527  *
528  * Return: void
529  */
530 void wlan_cm_sm_history_print(struct wlan_objmgr_vdev *vdev);
531 
532 /**
533  * wlan_cm_req_history_print() - Prints CM request history
534  * @vdev: Objmgr vdev
535  *
536  * API to print CM request history
537  *
538  * Return: void
539  */
540 void wlan_cm_req_history_print(struct wlan_objmgr_vdev *vdev);
541 #else
wlan_cm_sm_history_print(struct wlan_objmgr_vdev * vdev)542 static inline void wlan_cm_sm_history_print(struct wlan_objmgr_vdev *vdev)
543 {
544 }
545 
wlan_cm_req_history_print(struct wlan_objmgr_vdev * vdev)546 static inline void wlan_cm_req_history_print(struct wlan_objmgr_vdev *vdev)
547 {}
548 #endif
549 
550 #ifdef CONN_MGR_ADV_FEATURE
551 /**
552  * wlan_cm_set_candidate_advance_filter_cb() - Set CM candidate advance
553  * filter cb
554  * @vdev: Objmgr vdev
555  * @filter_fun: CM candidate advance filter cb
556  *
557  * Return: void
558  */
559 static inline
wlan_cm_set_candidate_advance_filter_cb(struct wlan_objmgr_vdev * vdev,void (* filter_fun)(struct wlan_objmgr_vdev * vdev,struct scan_filter * filter))560 void wlan_cm_set_candidate_advance_filter_cb(
561 		struct wlan_objmgr_vdev *vdev,
562 		void (*filter_fun)(struct wlan_objmgr_vdev *vdev,
563 				   struct scan_filter *filter))
564 {
565 }
566 
567 /**
568  * wlan_cm_set_candidate_custom_sort_cb() - Set CM candidate custom sort cb
569  * @vdev: Objmgr vdev
570  * @sort_fun: CM candidate custom sort cb
571  *
572  * Return: void
573  */
574 static inline
wlan_cm_set_candidate_custom_sort_cb(struct wlan_objmgr_vdev * vdev,void (* sort_fun)(struct wlan_objmgr_vdev * vdev,qdf_list_t * list))575 void wlan_cm_set_candidate_custom_sort_cb(
576 		struct wlan_objmgr_vdev *vdev,
577 		void (*sort_fun)(struct wlan_objmgr_vdev *vdev,
578 				 qdf_list_t *list))
579 {
580 }
581 #else
582 void wlan_cm_set_candidate_advance_filter_cb(
583 		struct wlan_objmgr_vdev *vdev,
584 		void (*filter_fun)(struct wlan_objmgr_vdev *vdev,
585 				   struct scan_filter *filter));
586 
587 void wlan_cm_set_candidate_custom_sort_cb(
588 		struct wlan_objmgr_vdev *vdev,
589 		void (*sort_fun)(struct wlan_objmgr_vdev *vdev,
590 				 qdf_list_t *list));
591 #endif
592 
593 /**
594  * wlan_cm_get_rnr() - get rnr
595  * @vdev:vdev
596  * @cm_id: connect mgr id
597  * @rnr: pointer to copy rnr info
598  *
599  * Return: QDF_STATUS
600  */
601 QDF_STATUS wlan_cm_get_rnr(struct wlan_objmgr_vdev *vdev, wlan_cm_id cm_id,
602 			   struct reduced_neighbor_report *rnr);
603 
604 /**
605  * wlan_cm_get_curr_candidate_entry() - Get current candidate from cnx mgr
606  * @vdev: VDEV object manager
607  * @cm_id: cnx mgr ID
608  *
609  * Get the current candidate for connection from cnx mgr.
610  *
611  * Return: Scan entry
612  */
613 struct scan_cache_entry *
614 wlan_cm_get_curr_candidate_entry(struct wlan_objmgr_vdev *vdev,
615 				 wlan_cm_id cm_id);
616 
617 /**
618  * wlan_cm_disc_cont_after_rso_stop() - Continue disconnect after RSO stop
619  * @vdev: Objmgr vdev
620  * @req: pointer to cm vdev disconnect req
621  *
622  * Continue disconnect after RSO stop response is receive from south bound.
623  * This is a wrapper to call core API cm_disconnect_continue_after_rso_stop
624  * by acquiring cm_lock through cm_sm_deliver_event.
625  *
626  * Return: QDF_STATUS
627  */
628 QDF_STATUS
629 wlan_cm_disc_cont_after_rso_stop(struct wlan_objmgr_vdev *vdev,
630 				 struct wlan_cm_vdev_discon_req *req);
631 
632 #ifdef WLAN_FEATURE_11BE
633 /**
634  * wlan_cm_sta_set_chan_param() - set channel parameters for 802.11be sta
635  *
636  * @vdev: vdev
637  * @ch_freq: operating channel frequency
638  * @ori_bw: bandwidth information according to EHT operation IE
639  * @ori_punc: original puncture bitmap from EHT operation IE
640  * @ccfs0: EHT channel center frequency segment0 information
641  * @ccfs1: EHT channel center frequency segment1 information
642  * @chan_param: chan_param to be set
643  *
644  * ori_bw, ori_punc, ccfs0, ccfs1 are information from AP EHT operation IE
645  * chan_param->ch_width is the intersected channel width based on STA's
646  * capability. Complete chan_param including puncture will be set if
647  * it returns success.
648  *
649  * Return: QDF_STATUS
650  */
651 QDF_STATUS wlan_cm_sta_set_chan_param(struct wlan_objmgr_vdev *vdev,
652 				      qdf_freq_t ch_freq,
653 				      enum phy_ch_width ori_bw,
654 				      uint16_t ori_punc,
655 				      uint8_t ccfs0, uint8_t ccfs1,
656 				      struct ch_params *chan_param);
657 
658 /**
659  * wlan_cm_sta_update_bw_puncture() - update puncture and channel width for sta
660  * @vdev: vdev
661  * @peer_mac: peer mac address
662  * @ori_punc: original puncture bitmap from EHT operation IE
663  * @ori_bw: bandwidth information according to EHT operation IE
664  * @ccfs0: EHT Channel Centre Frequency Segment0 information
665  * @ccfs1: EHT Channel Centre Frequency Segment1 information
666  * @new_bw: bandwidth to be set
667  */
668 QDF_STATUS wlan_cm_sta_update_bw_puncture(struct wlan_objmgr_vdev *vdev,
669 					  uint8_t *peer_mac,
670 					  uint16_t ori_punc,
671 					  enum phy_ch_width ori_bw,
672 					  uint8_t ccfs0, uint8_t ccfs1,
673 					  enum phy_ch_width new_bw);
674 #endif /* WLAN_FEATURE_11BE */
675 
676 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_FEATURE_11BE_MLO_ADV_FEATURE)
677 
678 /**
679  * wlan_cm_check_mlo_roam_auth_status - api to check roam auth status on link
680  * @vdev: vdev corresponds to given link
681  *
682  * This api will be called to check if roam auth status is connected
683  *
684  * Return: boolean true or false
685  */
686 bool
687 wlan_cm_check_mlo_roam_auth_status(struct wlan_objmgr_vdev *vdev);
688 #else
689 static inline bool
wlan_cm_check_mlo_roam_auth_status(struct wlan_objmgr_vdev * vdev)690 wlan_cm_check_mlo_roam_auth_status(struct wlan_objmgr_vdev *vdev)
691 {
692 	return false;
693 }
694 #endif
695 
696 /**
697  * wlan_cm_bss_mlo_type() - Check if the scan entry is of MLO type
698  * @psoc: Pointer to psoc
699  * @entry: scan cache entry
700  * @scan_list: list of scan entries to look for if @entry is of ML type
701  *
702  * Return: MLO AP type: SLO, MLMR or EMLSR.
703  */
704 enum MLO_TYPE
705 wlan_cm_bss_mlo_type(struct wlan_objmgr_psoc *psoc,
706 		     struct scan_cache_entry *entry,
707 		     qdf_list_t *scan_list);
708 
709 #ifdef WLAN_FEATURE_LL_LT_SAP
710 /**
711  * wlan_cm_bearer_switch_resp() - Bearer switch response
712  * @psoc: psoc pointer
713  * @vdev_id: vdev id
714  * @cm_id: connection ID which gave the hw mode change request
715  * @status: status of the Bearer switch
716  *
717  * Return: void
718  */
719 void wlan_cm_bearer_switch_resp(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
720 				wlan_cm_id cm_id, QDF_STATUS status);
721 #endif /* WLAN_FEATURE_LL_LT_SAP */
722 #endif /* __WLAN_CM_UCFG_API_H */
723