xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlme/include/wlan_mlme_cmn.h (revision 7f898dfcc20c6ad27c946334cf5e432699aca714)
1 /*
2  * Copyright (c) 2019-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: Define Common MLME structure and APIs
20  */
21 #ifndef _WLAN_MLME_CMN_H_
22 #define _WLAN_MLME_CMN_H_
23 
24 #include <include/wlan_psoc_mlme.h>
25 #include <include/wlan_pdev_mlme.h>
26 #include <include/wlan_vdev_mlme.h>
27 #include "wlan_cm_public_struct.h"
28 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
29 #include "wlan_cm_roam_public_struct.h"
30 #endif
31 #include "wlan_twt_public_structs.h"
32 
33 /**
34  * struct mlme_cm_ops: connection manager osif callbacks
35  * @mlme_cm_connect_complete_cb: Connect done callback
36  * @vdev: vdev pointer
37  * @rsp: connect response
38  *
39  * @mlme_cm_failed_candidate_cb: Callback to indicate failed candidate
40  * @vdev: vdev pointer
41  * @rsp: connect response
42  *
43  * @mlme_cm_update_id_and_src_cb: Callback to update connect id and
44  *                                source of the connect request
45  * @vdev: vdev pointer
46  * @Source: Source of the connect req
47  * @cm_id: connection manager id
48  *
49  * @mlme_cm_disconnect_complete_cb: Disconnect done callback
50  * @vdev: vdev pointer
51  * @rsp: Disconnect response
52  *
53  * @mlme_cm_disconnect_start_cb: Disconnect start callback
54  * @vdev: vdev pointer
55  *
56  * @mlme_cm_roam_sync_cb: Roam sync callback
57  * @vdev: vdev pointer
58  *
59  * @mlme_cm_pmksa_candidate_notify_cb: Roam pmksa candidate notify callback
60  * @vdev: vdev pointer
61  * @bssid: bssid
62  * @index: index
63  * @preauth: preauth flag
64  *
65  * @mlme_cm_send_keys_cb:
66  * @vdev: vdev pointer
67  * @key_index: key index
68  * @pairwise: true if a pairwise key
69  * @cipher_type: key cipher type
70  *
71  * @mlme_cm_link_reconfig_notify_cb:
72  * @vdev: vdev object
73  *
74  * @mlme_cm_roam_start_cb: Roam start callback
75  * @vdev: vdev pointer
76  *
77  * @mlme_cm_roam_abort_cb: Roam abort callback
78  * @vdev: vdev pointer
79  *
80  * @mlme_cm_roam_cmpl_cb: Roam sync complete cb
81  * @vdev: vdev pointer
82  *
83  * @mlme_cm_roam_get_scan_ie_cb: Get scan ie cb
84  * @vdev: vdev pointer
85  * @scan_ie: scan ie element pointer
86  * @dot11mode_filter: dot11mode filter enumn pointer
87  *
88  * @mlme_cm_roam_rt_stats_cb: Roam stats cb
89  * @roam_stats_event: roam_stats_event pointer
90  * @idx: TLV idx for roam_stats_event
91  *
92  * @mlme_cm_ft_preauth_cmpl_cb: Roam ft preauth complete cb
93  * @vdev: vdev pointer
94  * @rsp: preauth response pointer
95  *
96  * @mlme_cm_cckm_preauth_cmpl_cb: Roam cckm preauth complete cb
97  * @vdev: vdev pointer
98  * @rsp: preauth response pointer
99  *
100  * @mlme_cm_get_vendor_handoff_params_cb: get vendor handoff params cb
101  * @psoc: psoc pointer
102  * @rsp: vendor handoff response pointer
103  * @vendor_handoff_context: vendor handoff context
104  *
105  * @mlme_cm_perfd_reset_cpufreq_ctrl_cb: callback to reset CPU min freq
106  */
107 struct mlme_cm_ops {
108 	QDF_STATUS (*mlme_cm_connect_complete_cb)(
109 					struct wlan_objmgr_vdev *vdev,
110 					struct wlan_cm_connect_resp *rsp);
111 	QDF_STATUS (*mlme_cm_failed_candidate_cb)(
112 					struct wlan_objmgr_vdev *vdev,
113 					struct wlan_cm_connect_resp *rsp);
114 	QDF_STATUS (*mlme_cm_update_id_and_src_cb)(
115 					struct wlan_objmgr_vdev *vdev,
116 					enum wlan_cm_source source,
117 					wlan_cm_id cm_id);
118 	QDF_STATUS (*mlme_cm_disconnect_complete_cb)(
119 					struct wlan_objmgr_vdev *vdev,
120 					struct wlan_cm_discon_rsp *rsp);
121 	QDF_STATUS (*mlme_cm_disconnect_start_cb)(
122 					struct wlan_objmgr_vdev *vdev);
123 #ifdef CONN_MGR_ADV_FEATURE
124 	QDF_STATUS (*mlme_cm_roam_sync_cb)(struct wlan_objmgr_vdev *vdev);
125 	QDF_STATUS (*mlme_cm_pmksa_candidate_notify_cb)(
126 						struct wlan_objmgr_vdev *vdev,
127 						struct qdf_mac_addr *bssid,
128 						int index, bool preauth);
129 	QDF_STATUS (*mlme_cm_send_keys_cb)(struct wlan_objmgr_vdev *vdev,
130 					   uint8_t key_index, bool pairwise,
131 					   enum wlan_crypto_cipher_type cipher_type);
132 	QDF_STATUS (*mlme_cm_link_reconfig_notify_cb)(
133 					struct wlan_objmgr_vdev *vdev);
134 #endif
135 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
136 	QDF_STATUS (*mlme_cm_roam_start_cb)(struct wlan_objmgr_vdev *vdev);
137 	QDF_STATUS (*mlme_cm_roam_abort_cb)(struct wlan_objmgr_vdev *vdev);
138 	QDF_STATUS (*mlme_cm_roam_cmpl_cb)(struct wlan_objmgr_vdev *vdev);
139 	QDF_STATUS (*mlme_cm_roam_get_scan_ie_cb)(struct wlan_objmgr_vdev *vdev,
140 				struct element_info *scan_ie,
141 				enum dot11_mode_filter *dot11mode_filter);
142 	void (*mlme_cm_roam_rt_stats_cb)(struct roam_stats_event *roam_stats,
143 					 uint8_t idx);
144 #endif
145 #ifdef WLAN_FEATURE_PREAUTH_ENABLE
146 	QDF_STATUS (*mlme_cm_ft_preauth_cmpl_cb)(
147 					struct wlan_objmgr_vdev *vdev,
148 					struct wlan_preauth_rsp *rsp);
149 #ifdef FEATURE_WLAN_ESE
150 	QDF_STATUS (*mlme_cm_cckm_preauth_cmpl_cb)(
151 					struct wlan_objmgr_vdev *vdev,
152 					struct wlan_preauth_rsp *rsp);
153 #endif
154 #endif
155 #ifdef WLAN_VENDOR_HANDOFF_CONTROL
156 	QDF_STATUS (*mlme_cm_get_vendor_handoff_params_cb)(
157 				struct wlan_objmgr_psoc *psoc,
158 				void *vendor_handoff_context);
159 #endif
160 #ifdef WLAN_BOOST_CPU_FREQ_IN_ROAM
161 	void (*mlme_cm_perfd_reset_cpufreq_ctrl_cb)(void);
162 #endif
163 };
164 
165 /**
166  * struct mlme_vdev_mgr_ops - MLME VDEV mgr osif callbacks
167  * @mlme_vdev_mgr_set_mac_addr_response: Callback to indicate set MAC address
168  *                                       response to osif
169  * @mlme_vdev_mgr_send_scan_done_complete_cb: Callback to indicate scan done
170  *                                            complete to osif
171  */
172 struct mlme_vdev_mgr_ops {
173 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
174 	QDF_STATUS (*mlme_vdev_mgr_set_mac_addr_response)(uint8_t vdev_id,
175 							  uint8_t resp_status);
176 #endif
177 	void (*mlme_vdev_mgr_send_scan_done_complete_cb)(uint8_t vdev_id);
178 };
179 
180 /**
181  * struct mlme_twt_ops: twt component osif callbacks
182  * @mlme_twt_enable_complete_cb: TWT enable complete callback
183  * @psoc: psoc pointer
184  * @event: response
185  * @context: context
186  *
187  * @mlme_twt_disable_complete_cb: TWT disable complete callback
188  * @psoc: psoc pointer
189  * @event: response
190  * @context: context
191  *
192  * @mlme_twt_ack_complete_cb: TWT ack complete callback
193  * @psoc: psoc pointer
194  * @event: response
195  * @context: context
196  *
197  * @mlme_twt_setup_complete_cb: TWT setup complete callback
198  * @psoc: psoc pointer
199  * @event: response
200  * @renego_fail: flag to indicate if renegotiation failure case
201  *
202  * @mlme_twt_teardown_complete_cb: TWT teardown complete callback
203  * @psoc: psoc pointer
204  * @event: response
205  *
206  * @mlme_twt_pause_complete_cb: TWT pause complete callback
207  * @psoc: psoc pointer
208  * @event: response
209  *
210  * @mlme_twt_resume_complete_cb: TWT resume complete callback
211  * @psoc: psoc pointer
212  * @event: response
213  *
214  * @mlme_twt_nudge_complete_cb: TWT nudge complete callback
215  * @psoc: psoc pointer
216  * @event: response
217  *
218  * @mlme_twt_notify_complete_cb: TWT notify complete callback
219  * @psoc: psoc pointer
220  * @event: response
221  *
222  * @mlme_twt_vdev_create_cb: TWT vdev create callback
223  * @vdev: vdev pointer
224  *
225  * @mlme_twt_vdev_destroy_cb: TWT vdev destroy callback
226  * @vdev: vdev pointer
227  */
228 struct mlme_twt_ops {
229 	QDF_STATUS (*mlme_twt_enable_complete_cb)(
230 			struct wlan_objmgr_psoc *psoc,
231 			struct twt_enable_complete_event_param *event,
232 			void *context);
233 
234 	QDF_STATUS (*mlme_twt_disable_complete_cb)(
235 			struct wlan_objmgr_psoc *psoc,
236 			struct twt_disable_complete_event_param *event,
237 			void *context);
238 
239 	QDF_STATUS (*mlme_twt_ack_complete_cb)(
240 			struct wlan_objmgr_psoc *psoc,
241 			struct twt_ack_complete_event_param *event,
242 			void *context);
243 
244 	QDF_STATUS (*mlme_twt_setup_complete_cb)(
245 			struct wlan_objmgr_psoc *psoc,
246 			struct twt_add_dialog_complete_event *event,
247 			bool renego_fail);
248 
249 	QDF_STATUS (*mlme_twt_teardown_complete_cb)(
250 			struct wlan_objmgr_psoc *psoc,
251 			struct twt_del_dialog_complete_event_param *event);
252 
253 	QDF_STATUS (*mlme_twt_pause_complete_cb)(
254 			struct wlan_objmgr_psoc *psoc,
255 			struct twt_pause_dialog_complete_event_param *event);
256 
257 	QDF_STATUS (*mlme_twt_resume_complete_cb)(
258 			struct wlan_objmgr_psoc *psoc,
259 			struct twt_resume_dialog_complete_event_param *event);
260 
261 	QDF_STATUS (*mlme_twt_nudge_complete_cb)(
262 			struct wlan_objmgr_psoc *psoc,
263 			struct twt_nudge_dialog_complete_event_param *event);
264 
265 	QDF_STATUS (*mlme_twt_notify_complete_cb)(
266 			struct wlan_objmgr_psoc *psoc,
267 			struct twt_notify_event_param *event);
268 
269 	QDF_STATUS (*mlme_twt_vdev_create_cb)(
270 			struct wlan_objmgr_vdev *vdev);
271 
272 	QDF_STATUS (*mlme_twt_vdev_destroy_cb)(
273 			struct wlan_objmgr_vdev *vdev);
274 };
275 
276 /**
277  * struct mlme_ext_ops - MLME legacy callbacks structure
278  * @mlme_psoc_ext_hdl_create:               callback to invoke creation of
279  *                                          legacy psoc object
280  * @mlme_psoc_ext_hdl_destroy:              callback to invoke destroy of legacy
281  *                                          psoc object
282  * @mlme_pdev_ext_hdl_create:               callback to invoke creation of
283  *                                          legacy pdev object
284  * @mlme_pdev_ext_hdl_destroy:              callback to invoke destroy of legacy
285  *                                          pdev object
286  * @mlme_vdev_ext_hdl_create:               callback to invoke creation of
287  *                                          legacy vdev object
288  * @mlme_vdev_ext_hdl_post_create:          callback to invoke post creation
289  *                                          actions of legacy vdev object
290  * @mlme_vdev_ext_hdl_destroy:              callback to invoke destroy of legacy
291  *                                          vdev object
292  * @mlme_vdev_start_fw_send:                callback to invoke vdev start
293  *                                          command
294  * @mlme_vdev_stop_fw_send:                 callback to invoke vdev stop command
295  * @mlme_vdev_down_fw_send:                 callback to invoke vdev down command
296  * @mlme_multivdev_restart_fw_send:         callback to invoke multivdev restart
297  *                                          command
298  * @mlme_vdev_enqueue_exp_cmd:              callback to enqueue exception
299  *                                          command
300  *                                          required by serialization
301  * @mlme_vdev_ext_delete_rsp:               callback to process vdev ext delete
302  * @mlme_multi_vdev_restart_resp:           callback to process multivdev
303  *                                          restart response
304  * @mlme_cm_ext_hdl_create_cb:              callback to create ext cm context
305  * @mlme_cm_ext_hdl_destroy_cb:             callback to destroy ext cm context
306  * @mlme_cm_ext_connect_start_ind_cb:       callback to indicate connect start
307  * @mlme_cm_ext_bss_select_ind_cb:          callback to indicate candidate
308  *                                          select for connect
309  * @mlme_cm_ext_bss_peer_create_req_cb:     callback to bss peer create request
310  * @mlme_cm_ext_connect_req_cb:             callback for connect request to
311  *                                          VDEV/PEER SM
312  * @mlme_cm_ext_connect_complete_ind_cb:    callback to indicate connect
313  *                                          complete
314  * @mlme_cm_ext_disconnect_start_ind_cb :   callback to indicate disconnect
315  *                                          start
316  * @mlme_cm_ext_disconnect_req_cb:          callback to disconnect req to
317  *                                          VDEV/PEER SM
318  * @mlme_cm_ext_bss_peer_delete_req_cb:     callback to bss peer delete request
319  * @mlme_cm_ext_disconnect_complete_ind_cb: callback to indicate disconnect
320  *                                          complete
321  * @mlme_cm_ext_vdev_down_req_cb:           callback to send vdev down to FW
322  * @mlme_cm_ext_roam_start_ind_cb:          callback to indicate roam start
323  * @mlme_cm_ext_rso_stop_cb:                callback to send rso stop to FW
324  * @mlme_cm_ext_reassoc_req_cb:             callback for reassoc request to
325  *                                          VDEV/PEER SM
326  * @mlme_psoc_ext_hdl_enable: to enable mlme ext param handler
327  * @mlme_psoc_ext_hdl_disable: to disable mlme ext param handler
328  * @mlme_vdev_send_set_mac_addr:            callback to send set MAC address
329  *                                          request to FW
330  * @mlme_ext_get_acs_inprogress:            callback to determine if ACS is
331  *                                          in progress on a given vdev
332  */
333 struct mlme_ext_ops {
334 	QDF_STATUS (*mlme_psoc_ext_hdl_create)(
335 				struct psoc_mlme_obj *psoc_mlme);
336 	QDF_STATUS (*mlme_psoc_ext_hdl_destroy)(
337 				struct psoc_mlme_obj *pdev_mlme);
338 	QDF_STATUS (*mlme_pdev_ext_hdl_create)(
339 				struct pdev_mlme_obj *pdev_mlme);
340 	QDF_STATUS (*mlme_pdev_ext_hdl_destroy)(
341 				struct pdev_mlme_obj *pdev_mlme);
342 	QDF_STATUS (*mlme_vdev_ext_hdl_create)(
343 				struct vdev_mlme_obj *vdev_mlme);
344 	QDF_STATUS (*mlme_vdev_ext_hdl_post_create)(
345 				struct vdev_mlme_obj *vdev_mlme);
346 	QDF_STATUS (*mlme_vdev_ext_hdl_destroy)(
347 				struct vdev_mlme_obj *vdev_mlme);
348 	QDF_STATUS (*mlme_vdev_start_fw_send)(
349 				struct wlan_objmgr_vdev *vdev, uint8_t restart);
350 	QDF_STATUS (*mlme_vdev_stop_fw_send)(struct wlan_objmgr_vdev *vdev);
351 	QDF_STATUS (*mlme_vdev_down_fw_send)(struct wlan_objmgr_vdev *vdev);
352 	QDF_STATUS (*mlme_multivdev_restart_fw_send)(
353 				struct wlan_objmgr_pdev *pdev);
354 	QDF_STATUS (*mlme_vdev_enqueue_exp_cmd)(
355 				struct vdev_mlme_obj *vdev_mlme,
356 				uint8_t cmd_type);
357 	QDF_STATUS (*mlme_vdev_ext_delete_rsp)(
358 					   struct wlan_objmgr_psoc *psoc,
359 					   struct vdev_delete_response *rsp);
360 	QDF_STATUS (*mlme_multi_vdev_restart_resp)(
361 				struct wlan_objmgr_psoc *psoc,
362 				struct multi_vdev_restart_resp *resp);
363 	QDF_STATUS (*mlme_cm_ext_hdl_create_cb)(struct wlan_objmgr_vdev *vdev,
364 						cm_ext_t **ext_cm_ptr);
365 	QDF_STATUS (*mlme_cm_ext_hdl_destroy_cb)(struct wlan_objmgr_vdev *vdev,
366 						 cm_ext_t *ext_cm_ptr);
367 	QDF_STATUS (*mlme_cm_ext_connect_start_ind_cb)(
368 				struct wlan_objmgr_vdev *vdev,
369 				struct wlan_cm_connect_req *req);
370 	QDF_STATUS (*mlme_cm_ext_bss_select_ind_cb)(
371 			struct wlan_objmgr_vdev *vdev,
372 			struct wlan_cm_vdev_connect_req *req);
373 	QDF_STATUS (*mlme_cm_ext_bss_peer_create_req_cb)(
374 				struct wlan_objmgr_vdev *vdev,
375 				struct qdf_mac_addr *peer_mac,
376 				struct qdf_mac_addr *mld_mac,
377 				bool is_assoc_link);
378 	QDF_STATUS (*mlme_cm_ext_connect_req_cb)(struct wlan_objmgr_vdev *vdev,
379 			struct wlan_cm_vdev_connect_req *req);
380 	QDF_STATUS (*mlme_cm_ext_connect_complete_ind_cb)(
381 				struct wlan_objmgr_vdev *vdev,
382 				struct wlan_cm_connect_resp *rsp);
383 	QDF_STATUS (*mlme_cm_ext_disconnect_start_ind_cb)(
384 				struct wlan_objmgr_vdev *vdev,
385 				struct wlan_cm_disconnect_req *req);
386 	QDF_STATUS (*mlme_cm_ext_disconnect_req_cb)
387 			(struct wlan_objmgr_vdev *vdev,
388 			struct wlan_cm_vdev_discon_req *req);
389 	QDF_STATUS (*mlme_cm_ext_bss_peer_delete_req_cb)(
390 			struct wlan_objmgr_vdev *vdev);
391 	QDF_STATUS (*mlme_cm_ext_disconnect_complete_ind_cb)(
392 				struct wlan_objmgr_vdev *vdev,
393 				struct wlan_cm_discon_rsp *rsp);
394 	QDF_STATUS (*mlme_cm_ext_vdev_down_req_cb)(
395 				struct wlan_objmgr_vdev *vdev);
396 	QDF_STATUS (*mlme_cm_ext_roam_start_ind_cb)(
397 				struct wlan_objmgr_vdev *vdev,
398 				struct wlan_cm_roam_req *req);
399 	QDF_STATUS (*mlme_cm_ext_rso_stop_cb)(struct wlan_objmgr_vdev *vdev);
400 	QDF_STATUS (*mlme_cm_ext_reassoc_req_cb)(
401 				struct wlan_objmgr_vdev *vdev,
402 				struct wlan_cm_vdev_reassoc_req *req);
403 	QDF_STATUS (*mlme_psoc_ext_hdl_enable)(struct wlan_objmgr_psoc *psoc);
404 	QDF_STATUS (*mlme_psoc_ext_hdl_disable)(struct wlan_objmgr_psoc *psoc);
405 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
406 	QDF_STATUS (*mlme_vdev_send_set_mac_addr)(
407 						struct qdf_mac_addr mac_addr,
408 						struct qdf_mac_addr mld_addr,
409 						struct wlan_objmgr_vdev *vdev);
410 #endif
411 	QDF_STATUS (*mlme_ext_get_acs_inprogress)(
412 						struct wlan_objmgr_vdev *vdev,
413 						bool *is_acs_inprogress);
414 };
415 
416 enum wlan_mlme_peer_param;
417 enum wlan_mlme_vdev_param;
418 enum wlan_mlme_pdev_param;
419 
420 /**
421  * struct mlme_external_tx_ops - MLME external callbacks structure
422  * @peer_ops:             callback to invoke peer mlme ops from external module
423  * @vdev_ops:             callback to invoke vdev mlme ops from external module
424  * @pdev_ops:             callback to invoke pdev mlme ops from external module
425  * @scan_db_iterate:      callback to invoke scan database iterate
426  */
427 struct mlme_external_tx_ops {
428 	QDF_STATUS (*peer_ops)(
429 		struct wlan_objmgr_peer *peer,
430 		enum wlan_mlme_peer_param type,
431 		void *data, void *ret);
432 	QDF_STATUS (*vdev_ops)(
433 		struct wlan_objmgr_vdev *vdev,
434 		enum wlan_mlme_vdev_param type,
435 		void *data, void *ret);
436 	QDF_STATUS (*pdev_ops)(
437 		struct wlan_objmgr_pdev *pdev,
438 		enum wlan_mlme_pdev_param type,
439 		void *data, void *ret);
440 	QDF_STATUS (*scan_db_iterate)(
441 		struct wlan_objmgr_pdev *pdev,
442 		scan_iterator_func handler, void *arg);
443 };
444 
445 /**
446  * mlme_psoc_ops_ext_hdl_create() - Alloc PSOC mlme ext handle
447  * @psoc_mlme:  PSOC MLME comp object
448  *
449  * API to allocate PSOC MLME ext handle
450  *
451  * Return: SUCCESS on successful allocation
452  *         Else FAILURE
453  */
454 QDF_STATUS mlme_psoc_ops_ext_hdl_create(struct psoc_mlme_obj *psoc_mlme);
455 
456 /**
457  * mlme_psoc_ops_ext_hdl_destroy() - Destroy PSOC mlme ext handle
458  * @psoc_mlme:  PSOC MLME comp object
459  *
460  * API to free psoc MLME ext handle
461  *
462  * Return: SUCCESS on successful free
463  *         Else FAILURE
464  */
465 QDF_STATUS mlme_psoc_ops_ext_hdl_destroy(struct psoc_mlme_obj *psoc_mlme);
466 
467 /**
468  * mlme_psoc_ext_enable_cb() - to enable mlme ext param handler callback
469  * @psoc: psoc common object
470  *
471  * Return: QDF_STATUS
472  */
473 QDF_STATUS mlme_psoc_ext_enable_cb(struct wlan_objmgr_psoc *psoc);
474 
475 /**
476  * mlme_psoc_ext_disable_cb() - to disable mlme ext param handler callback
477  * @psoc: psoc common object
478  *
479  * Return: QDF_STATUS
480  */
481 QDF_STATUS mlme_psoc_ext_disable_cb(struct wlan_objmgr_psoc *psoc);
482 
483 /**
484  * mlme_pdev_ops_ext_hdl_create - Alloc PDEV mlme ext handle
485  * @pdev_mlme:  PDEV MLME comp object
486  *
487  * API to allocate PDEV MLME ext handle
488  *
489  * Return: SUCCESS on successful allocation
490  *         Else FAILURE
491  */
492 QDF_STATUS mlme_pdev_ops_ext_hdl_create(struct pdev_mlme_obj *pdev_mlme);
493 
494 /**
495  * mlme_pdev_ops_ext_hdl_destroy - Destroy PDEV mlme ext handle
496  * @pdev_mlme:  PDEV MLME comp object
497  *
498  * API to free pdev MLME ext handle
499  *
500  * Return: SUCCESS on successful free
501  *         Else FAILURE
502  */
503 QDF_STATUS mlme_pdev_ops_ext_hdl_destroy(struct pdev_mlme_obj *pdev_mlme);
504 
505 /**
506  * mlme_vdev_ops_ext_hdl_create - Alloc VDEV mlme ext handle
507  * @vdev_mlme:  VDEV MLME comp object
508  *
509  * API to allocate VDEV MLME ext handle
510  *
511  * Return: SUCCESS on successful allocation
512  *         Else FAILURE
513  */
514 QDF_STATUS mlme_vdev_ops_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme);
515 
516 /**
517  * mlme_vdev_ops_ext_hdl_post_create - Perform post VDEV mlme ext handle alloc
518  *                                     operations
519  * @vdev_mlme:  VDEV MLME comp object
520  *
521  * API to perform post vdev MLME ext handle allocation operations
522  *
523  * Return: SUCCESS on initialization successful
524  *         Else FAILURE
525  */
526 QDF_STATUS mlme_vdev_ops_ext_hdl_post_create(struct vdev_mlme_obj *vdev_mlme);
527 
528 /**
529  * mlme_vdev_ops_ext_hdl_destroy - Destroy VDEV mlme ext handle
530  * @vdev_mlme:  VDEV MLME comp object
531  *
532  * API to free vdev MLME ext handle
533  *
534  * Return: SUCCESS on successful free
535  *         Else FAILURE
536  */
537 QDF_STATUS mlme_vdev_ops_ext_hdl_destroy(struct vdev_mlme_obj *vdev_mlme);
538 
539 /**
540  * mlme_vdev_enqueue_exp_ser_cmd - Enqueue exception serialization cmd
541  * @vdev_mlme:  VDEV MLME comp object
542  * @cmd_type: Serialization command type
543  *
544  * API to enqueue the exception serialization command, used by
545  * mlme-serialization wrapper layer
546  *
547  * Return: SUCCESS on successful enqueuing the command
548  *         Else FAILURE
549  */
550 QDF_STATUS mlme_vdev_enqueue_exp_ser_cmd(struct vdev_mlme_obj *vdev_mlme,
551 					 uint8_t cmd_type);
552 
553 /**
554  * mlme_vdev_ops_start_fw_send - Send WMI START/RESTART command to FW
555  * @vdev:  VDEV object
556  * @restart: send start vs restart
557  *
558  * API to send WMI start/restart command to FW
559  *
560  * Return: SUCCESS on successful sending the command
561  *         Else FAILURE
562  */
563 QDF_STATUS mlme_vdev_ops_start_fw_send(struct wlan_objmgr_vdev *vdev,
564 				       uint8_t restart);
565 
566 /**
567  * mlme_vdev_ops_multivdev_restart_fw_cmd_send - Send WMI Multivdev restart
568  *                                              command to FW
569  * @pdev:  PDEV object
570  *
571  * API to send WMI multivdev restart command to FW
572  *
573  * Return: SUCCESS on successful sending the command
574  *         Else FAILURE
575  */
576 QDF_STATUS mlme_vdev_ops_multivdev_restart_fw_cmd_send(
577 						struct wlan_objmgr_pdev *pdev);
578 
579 /**
580  * mlme_vdev_ops_stop_fw_send - Send WMI STOP command to FW
581  * @vdev:  VDEV object
582  *
583  * API to send WMI stop command to FW
584  *
585  * Return: SUCCESS on successful sending the command
586  *         Else FAILURE
587  */
588 QDF_STATUS mlme_vdev_ops_stop_fw_send(struct wlan_objmgr_vdev *vdev);
589 
590 /**
591  * mlme_vdev_ops_down_fw_send - Send WMI Down command to FW
592  * @vdev:  VDEV object
593  *
594  * API to send WMI down command to FW
595  *
596  * Return: SUCCESS on successful sending the command
597  *         Else FAILURE
598  */
599 QDF_STATUS mlme_vdev_ops_down_fw_send(struct wlan_objmgr_vdev *vdev);
600 
601 /**
602  * mlme_vdev_ops_ext_hdl_multivdev_restart_resp() - Handler multivdev restart
603  * response event
604  * @psoc: PSOC object manager handle
605  * @resp: Restart response event
606  *
607  * Return: Success on successful handling of the response event,
608  *         Else failure
609  */
610 QDF_STATUS mlme_vdev_ops_ext_hdl_multivdev_restart_resp(
611 		struct wlan_objmgr_psoc *psoc,
612 		struct multi_vdev_restart_resp *resp);
613 
614 /*
615  * typedef mlme_get_global_ops_cb() - callback to get MLME ext ops
616  *
617  * NB: kernel-doc Cannot parse typedef
618  */
619 typedef struct mlme_ext_ops *(*mlme_get_global_ops_cb)(void);
620 
621 /**
622  * mlme_set_ops_register_cb - Sets ops registration callback
623  * @ops_cb:  Function pointer
624  *
625  * API to set ops registration call back
626  *
627  * Return: void
628  */
629 void mlme_set_ops_register_cb(mlme_get_global_ops_cb ops_cb);
630 
631 /**
632  * wlan_cmn_mlme_init - Initializes MLME component
633  *
634  * Registers callbacks with object manager for create/destroy
635  *
636  * Return: SUCCESS on successful registration
637  *         FAILURE, if registration fails
638  */
639 QDF_STATUS wlan_cmn_mlme_init(void);
640 
641 /**
642  * wlan_cmn_mlme_deinit - Uninitializes MLME component
643  *
644  * Unregisters callbacks with object manager for create/destroy
645  *
646  * Return: SUCCESS on successful registration
647  *         FAILURE, if registration fails
648  */
649 QDF_STATUS wlan_cmn_mlme_deinit(void);
650 
651 /**
652  * mlme_vdev_ops_ext_hdl_delete_rsp - Vdev Delete response ext handler
653  * @psoc: PSOC object
654  * @rsp: Vdev delete response received from the firmware
655  *
656  * API to invoke the legacy delete response handler for legacy cleanup
657  *
658  * Return: SUCCESS on successful deletion
659  *         FAILURE, if deletion fails
660  */
661 QDF_STATUS mlme_vdev_ops_ext_hdl_delete_rsp(struct wlan_objmgr_psoc *psoc,
662 					    struct vdev_delete_response *rsp);
663 
664 /**
665  * mlme_cm_ext_hdl_create() - Connection manager callback to create ext
666  * context
667  * @vdev: VDEV object
668  * @ext_cm_ptr: pointer to connection manager ext pointer
669  *
670  * Return: QDF_STATUS
671  */
672 QDF_STATUS mlme_cm_ext_hdl_create(struct wlan_objmgr_vdev *vdev,
673 				  cm_ext_t **ext_cm_ptr);
674 
675 /**
676  * mlme_cm_ext_hdl_destroy() - Connection manager callback to destroy ext
677  * context
678  * @vdev: VDEV object
679  * @ext_cm_ptr: connection manager ext pointer
680  *
681  * Return: QDF_STATUS
682  */
683 QDF_STATUS mlme_cm_ext_hdl_destroy(struct wlan_objmgr_vdev *vdev,
684 				   cm_ext_t *ext_cm_ptr);
685 
686 /**
687  * mlme_cm_connect_start_ind() - Connection manager ext Connect start indication
688  * @vdev: VDEV object
689  * @req: Connection manager connect request
690  *
691  * Return: QDF_STATUS
692  */
693 QDF_STATUS mlme_cm_connect_start_ind(struct wlan_objmgr_vdev *vdev,
694 				     struct wlan_cm_connect_req *req);
695 
696 /**
697  * mlme_cm_bss_select_ind() - Connection manager ext Connect candidate
698  * select indication, to do operations for the candidate
699  * @vdev: VDEV object
700  * @req: Vdev connect request
701  *
702  * Return: QDF_STATUS
703  */
704 QDF_STATUS mlme_cm_bss_select_ind(struct wlan_objmgr_vdev *vdev,
705 				  struct wlan_cm_vdev_connect_req *req);
706 
707 /**
708  * mlme_cm_bss_peer_create_req() - Connection manager ext bss peer create
709  * request
710  * @vdev: VDEV object
711  * @peer_mac: Peer mac address
712  * @mld_mac: mld mac address
713  * @is_assoc_link: assoc happens on this link or not
714  *
715  * Return: QDF_STATUS
716  */
717 QDF_STATUS mlme_cm_bss_peer_create_req(struct wlan_objmgr_vdev *vdev,
718 				       struct qdf_mac_addr *peer_mac,
719 				       struct qdf_mac_addr *mld_mac,
720 				       bool is_assoc_link);
721 
722 /**
723  * mlme_cm_connect_req() - Connection manager ext connect request to start vdev
724  * and peer assoc state machine
725  * @vdev: VDEV object
726  * @req: Vdev connect request
727  *
728  * Context: The req is on stack, so the API need to make a copy, if it want to
729  * use the req after return.
730  *
731  * Return: QDF_STATUS
732  */
733 QDF_STATUS mlme_cm_connect_req(struct wlan_objmgr_vdev *vdev,
734 			       struct wlan_cm_vdev_connect_req *req);
735 
736 /**
737  * mlme_cm_connect_complete_ind() - Connection manager ext connect complete
738  * indication
739  * @vdev: VDEV object
740  * @rsp: Connection manager connect response
741  *
742  * Return: QDF_STATUS
743  */
744 QDF_STATUS mlme_cm_connect_complete_ind(struct wlan_objmgr_vdev *vdev,
745 					struct wlan_cm_connect_resp *rsp);
746 
747 /**
748  * mlme_cm_roam_start_ind() - Connection manager ext Connect start indication
749  * @vdev: VDEV object
750  * @req: Connection manager roam request
751  *
752  * Return: QDF_STATUS
753  */
754 QDF_STATUS mlme_cm_roam_start_ind(struct wlan_objmgr_vdev *vdev,
755 				  struct wlan_cm_roam_req *req);
756 
757 /**
758  * mlme_cm_rso_stop_req() - Connection manager ext RSO stop request
759  * @vdev: VDEV object
760  *
761  * Return: QDF_STATUS
762  */
763 QDF_STATUS mlme_cm_rso_stop_req(struct wlan_objmgr_vdev *vdev);
764 
765 /**
766  * mlme_cm_reassoc_req() - Connection manager ext reassoc request
767  * @vdev: VDEV object
768  * @req: Vdev reassoc request
769  *
770  * Context: The req is on stack, so the API need to make a copy, if it want to
771  * use the req after return.
772  *
773  * Return: QDF_STATUS
774  */
775 QDF_STATUS mlme_cm_reassoc_req(struct wlan_objmgr_vdev *vdev,
776 			       struct wlan_cm_vdev_reassoc_req *req);
777 
778 /**
779  * mlme_cm_disconnect_start_ind() - Connection manager ext disconnect start
780  * indication
781  * @vdev: VDEV object
782  * @req: Connection manager disconnect request
783  *
784  * Return: QDF_STATUS
785  */
786 QDF_STATUS mlme_cm_disconnect_start_ind(struct wlan_objmgr_vdev *vdev,
787 					struct wlan_cm_disconnect_req *req);
788 
789 /**
790  * mlme_cm_disconnect_req() - Connection manager ext disconnect
791  * req to vdev and peer sm
792  * @vdev: VDEV object
793  * @req: vdev disconnect request
794  *
795  * Return: QDF_STATUS
796  */
797 QDF_STATUS mlme_cm_disconnect_req(struct wlan_objmgr_vdev *vdev,
798 				  struct wlan_cm_vdev_discon_req *req);
799 
800 /**
801  * mlme_cm_bss_peer_delete_req() - Connection manager ext bss peer delete
802  * request
803  * @vdev: VDEV object
804  *
805  * Return: QDF_STATUS
806  */
807 QDF_STATUS
808 mlme_cm_bss_peer_delete_req(struct wlan_objmgr_vdev *vdev);
809 
810 /**
811  * mlme_cm_disconnect_complete_ind() - Connection manager ext disconnect
812  * complete indication
813  * @vdev: VDEV object
814  * @rsp: Connection manager disconnect response
815  *
816  * Return: QDF_STATUS
817  */
818 QDF_STATUS mlme_cm_disconnect_complete_ind(struct wlan_objmgr_vdev *vdev,
819 					   struct wlan_cm_discon_rsp *rsp);
820 
821 /**
822  * mlme_cm_vdev_down_req() - Connection manager ext req to send vdev down to FW
823  * @vdev: VDEV object
824  *
825  * Return: QDF_STATUS
826  */
827 QDF_STATUS mlme_cm_vdev_down_req(struct wlan_objmgr_vdev *vdev);
828 
829 /**
830  * mlme_ext_hdl_get_acs_in_progress() - Check if ACS is in progress
831  * @vdev: VDEV object
832  * @acs_in_progress: ACS in progress flag
833  *
834  * Return: QDF_STATUS
835  */
836 QDF_STATUS mlme_ext_hdl_get_acs_in_progress(struct wlan_objmgr_vdev *vdev,
837 					    bool *acs_in_progress);
838 /**
839  * mlme_cm_osif_connect_complete() - Connect complete resp to osif
840  * @vdev: vdev pointer
841  * @rsp: Connect response
842  *
843  * Return: QDF_STATUS
844  */
845 QDF_STATUS mlme_cm_osif_connect_complete(struct wlan_objmgr_vdev *vdev,
846 					 struct wlan_cm_connect_resp *rsp);
847 
848 /**
849  * mlme_cm_osif_failed_candidate_ind() - Failed Candidate indication to osif
850  * @vdev: vdev pointer
851  * @rsp: Connect response
852  *
853  * Return: QDF_STATUS
854  */
855 QDF_STATUS
856 mlme_cm_osif_failed_candidate_ind(struct wlan_objmgr_vdev *vdev,
857 				  struct wlan_cm_connect_resp *rsp);
858 
859 /**
860  * mlme_cm_osif_update_id_and_src() - Update connection id and source to osif
861  * @vdev: vdev pointer
862  * @source: source of request
863  * @cm_id: connection manager id
864  *
865  * Return: QDF_STATUS
866  */
867 QDF_STATUS mlme_cm_osif_update_id_and_src(struct wlan_objmgr_vdev *vdev,
868 					  enum wlan_cm_source source,
869 					  wlan_cm_id cm_id);
870 
871 /**
872  * mlme_cm_osif_disconnect_complete() - Disconnect complete osif response
873  * @vdev: vdev pointer
874  * @rsp: Disconnect response
875  *
876  * Return: QDF_STATUS
877  */
878 QDF_STATUS
879 mlme_cm_osif_disconnect_complete(struct wlan_objmgr_vdev *vdev,
880 				 struct wlan_cm_discon_rsp *rsp);
881 
882 /**
883  * mlme_cm_osif_disconnect_start_ind() - osif Disconnect start indication
884  * @vdev: vdev pointer
885  *
886  * Return: QDF_STATUS
887  */
888 QDF_STATUS mlme_cm_osif_disconnect_start_ind(struct wlan_objmgr_vdev *vdev);
889 
890 #ifdef WLAN_VENDOR_HANDOFF_CONTROL
891 /**
892  * mlme_cm_osif_get_vendor_handoff_params() - osif get vendor handoff params
893  * indication
894  * @psoc: psoc pointer
895  * @vendor_handoff_context: vendor handoff context
896  *
897  * Return: QDF_STATUS
898  */
899 QDF_STATUS mlme_cm_osif_get_vendor_handoff_params(struct wlan_objmgr_psoc *psoc,
900 						  void *vendor_handoff_context);
901 #endif
902 
903 #ifdef CONN_MGR_ADV_FEATURE
904 /**
905  * mlme_cm_osif_roam_sync_ind() - osif Roam sync indication
906  * @vdev: vdev pointer
907  *
908  * Return: QDF_STATUS
909  */
910 QDF_STATUS mlme_cm_osif_roam_sync_ind(struct wlan_objmgr_vdev *vdev);
911 
912 /**
913  * mlme_cm_osif_pmksa_candidate_notify() - osif roam pmksa candidate notify
914  * @vdev: vdev pointer
915  * @bssid: bssid
916  * @index: index
917  * @preauth: preauth flag
918  *
919  * Return: QDF_STATUS
920  */
921 QDF_STATUS mlme_cm_osif_pmksa_candidate_notify(struct wlan_objmgr_vdev *vdev,
922 					       struct qdf_mac_addr *bssid,
923 					       int index, bool preauth);
924 /**
925  * mlme_cm_osif_send_keys() - send vdev keys
926  * @vdev: vdev pointer
927  * @key_index: key index value
928  * @pairwise: pairwise bool value
929  * @cipher_type: cipher enum value
930  *
931  * Return: QDF_STATUS
932  */
933 QDF_STATUS mlme_cm_osif_send_keys(struct wlan_objmgr_vdev *vdev,
934 				  uint8_t key_index, bool pairwise,
935 				  enum wlan_crypto_cipher_type cipher_type);
936 
937 /**
938  * mlme_cm_osif_link_reconfig_notify() - notify link reconfig event
939  * @vdev: vdev pointer
940  *
941  * Return: QDF_STATUS
942  */
943 QDF_STATUS mlme_cm_osif_link_reconfig_notify(struct wlan_objmgr_vdev *vdev);
944 #else
945 static inline
946 QDF_STATUS mlme_cm_osif_roam_sync_ind(struct wlan_objmgr_vdev *vdev)
947 {
948 	return QDF_STATUS_SUCCESS;
949 }
950 
951 static inline
952 QDF_STATUS mlme_cm_osif_send_keys(struct wlan_objmgr_vdev *vdev,
953 				  uint8_t key_index, bool pairwise,
954 				  enum wlan_crypto_cipher_type cipher_type)
955 {
956 	return QDF_STATUS_SUCCESS;
957 }
958 
959 static inline
960 QDF_STATUS mlme_cm_osif_link_reconfig_notify(struct wlan_objmgr_vdev *vdev)
961 {
962 	return QDF_STATUS_SUCCESS;
963 }
964 #endif
965 
966 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
967 /**
968  * mlme_cm_osif_roam_start_ind() - osif Roam start indication
969  * @vdev: vdev pointer
970  *
971  * Return: QDF_STATUS
972  */
973 QDF_STATUS mlme_cm_osif_roam_start_ind(struct wlan_objmgr_vdev *vdev);
974 
975 /**
976  * mlme_cm_osif_roam_abort_ind() - osif Roam abort indication
977  * @vdev: vdev pointer
978  *
979  * Return: QDF_STATUS
980  */
981 QDF_STATUS mlme_cm_osif_roam_abort_ind(struct wlan_objmgr_vdev *vdev);
982 
983 /**
984  * mlme_cm_osif_roam_complete() - osif Roam sync complete callback
985  * @vdev: vdev pointer
986  *
987  * Return: QDF_STATUS
988  */
989 QDF_STATUS mlme_cm_osif_roam_complete(struct wlan_objmgr_vdev *vdev);
990 
991 /**
992  * mlme_cm_osif_roam_rt_stats() - osif Roam stats callback
993  * @roam_stats: roam_stats_event pointer
994  * @idx: TLV idx for roam_stats_event
995  *
996  * Return: void
997  */
998 void mlme_cm_osif_roam_rt_stats(struct roam_stats_event *roam_stats, uint8_t idx);
999 /**
1000  * mlme_cm_osif_roam_get_scan_params() - osif Roam get scan params callback
1001  * @vdev: vdev pointer
1002  * @scan_ie: Pointer to scan_ie
1003  * @dot11mode_filter: Pointer to dot11mode_filter
1004  *
1005  * Get scan IE params from adapter corresponds to given vdev
1006  *
1007  * Return: QDF_STATUS
1008  */
1009 QDF_STATUS
1010 mlme_cm_osif_roam_get_scan_params(struct wlan_objmgr_vdev *vdev,
1011 				  struct element_info *scan_ie,
1012 				  enum dot11_mode_filter *dot11mode_filter);
1013 #endif
1014 
1015 #ifdef WLAN_FEATURE_PREAUTH_ENABLE
1016 /**
1017  * mlme_cm_osif_ft_preauth_complete() - osif roam ft preauth complete callback
1018  * @vdev: vdev pointer
1019  * @rsp: preauth response pointer
1020  *
1021  * Return: QDF_STATUS
1022  */
1023 QDF_STATUS
1024 mlme_cm_osif_ft_preauth_complete(struct wlan_objmgr_vdev *vdev,
1025 				 struct wlan_preauth_rsp *rsp);
1026 #ifdef FEATURE_WLAN_ESE
1027 /**
1028  * mlme_cm_osif_cckm_preauth_complete() - osif cckm preauth complete callback
1029  * @vdev: vdev pointer
1030  * @rsp: preauth response pointer
1031  *
1032  * Return: QDF_STATUS
1033  */
1034 QDF_STATUS
1035 mlme_cm_osif_cckm_preauth_complete(struct wlan_objmgr_vdev *vdev,
1036 				   struct wlan_preauth_rsp *rsp);
1037 #else
1038 static inline QDF_STATUS
1039 mlme_cm_osif_cckm_preauth_complete(struct wlan_objmgr_vdev *vdev,
1040 				   struct wlan_preauth_rsp *rsp)
1041 {
1042 	return QDF_STATUS_SUCCESS;
1043 }
1044 #endif /* FEATURE_WLAN_ESE */
1045 #endif /* WLAN_FEATURE_PREAUTH_ENABLE */
1046 
1047 /*
1048  * typedef osif_cm_get_global_ops_cb() - Callback to get connection manager
1049  * global ops
1050  *
1051  * NB: kernel-doc Cannot parse typedef
1052  */
1053 typedef struct mlme_cm_ops *(*osif_cm_get_global_ops_cb)(void);
1054 
1055 /*
1056  * typedef osif_twt_get_global_ops_cb() - Callback to get twt global ops
1057  *
1058  * NB: kernel-doc Cannot parse typedef
1059  */
1060 typedef struct mlme_twt_ops *(*osif_twt_get_global_ops_cb)(void);
1061 
1062 /**
1063  * mlme_set_osif_cm_cb() - Sets ops registration callback
1064  * @cm_osif_ops:  Function pointer
1065  *
1066  * API to set ops registration call back
1067  *
1068  * Return: void
1069  */
1070 void mlme_set_osif_cm_cb(osif_cm_get_global_ops_cb cm_osif_ops);
1071 
1072 /*
1073  * typedef osif_vdev_mgr_get_global_ops_cb() - Callback to get vdev manager
1074  * global ops
1075  *
1076  * NB: kernel-doc Cannot parse typedef
1077  */
1078 typedef struct mlme_vdev_mgr_ops *(*osif_vdev_mgr_get_global_ops_cb)(void);
1079 
1080 /**
1081  * mlme_set_osif_vdev_mgr_cb() - Sets ops registration callback
1082  * @mlme_vdev_mgr_osif_ops:  Function pointer
1083  *
1084  * API to set ops registration call back
1085  *
1086  * Return: void
1087  */
1088 void mlme_set_osif_vdev_mgr_cb(
1089 		osif_vdev_mgr_get_global_ops_cb mlme_vdev_mgr_osif_ops);
1090 
1091 /**
1092  * mlme_set_osif_twt_cb() - Sets twt ops registration callback
1093  * @twt_osif_ops:  Function pointer
1094  *
1095  * API to set twt ops registration call back
1096  *
1097  * Return: void
1098  */
1099 void mlme_set_osif_twt_cb(osif_twt_get_global_ops_cb twt_osif_ops);
1100 
1101 /**
1102  * mlme_max_chan_switch_is_set() - Get if max chan switch IE is enabled
1103  * @psoc: Object manager psoc pointer
1104  *
1105  * Return: True if max chan switch is enabled else false
1106  */
1107 bool mlme_max_chan_switch_is_set(struct wlan_objmgr_psoc *psoc);
1108 
1109 /**
1110  * mlme_send_scan_done_complete_cb() - send scan done indication to upper layer
1111  * @vdev_id: vdev id
1112  *
1113  * Return: none
1114  */
1115 void mlme_send_scan_done_complete_cb(uint8_t vdev_id);
1116 
1117 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
1118 /**
1119  * mlme_vdev_ops_send_set_mac_address() - Send set MAC address request to FW
1120  * @mac_addr: VDEV MAC address
1121  * @mld_addr: VDEV MLD address
1122  * @vdev: vdev pointer
1123  *
1124  * API to send set MAC address request command to FW
1125  *
1126  * Return: QDF_STATUS
1127  */
1128 QDF_STATUS mlme_vdev_ops_send_set_mac_address(struct qdf_mac_addr mac_addr,
1129 					      struct qdf_mac_addr mld_addr,
1130 					      struct wlan_objmgr_vdev *vdev);
1131 
1132 /**
1133  * mlme_vdev_mgr_notify_set_mac_addr_response() - Notify set MAC address
1134  *                                                response
1135  * @vdev_id: VDEV ID
1136  * @resp_status: FW response for the set MAC address operation
1137  *
1138  * API to notify set MAC address to osif
1139  *
1140  * Return: None
1141  */
1142 void mlme_vdev_mgr_notify_set_mac_addr_response(uint8_t vdev_id,
1143 						uint8_t resp_status);
1144 #endif
1145 
1146 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
1147 /**
1148  * mlme_twt_osif_enable_complete_ind() - enable complete resp to osif
1149  * @psoc: psoc pointer
1150  * @event: enable complete response
1151  * @context: context registered by OSIF
1152  *
1153  * Return: QDF_STATUS
1154  */
1155 QDF_STATUS
1156 mlme_twt_osif_enable_complete_ind(struct wlan_objmgr_psoc *psoc,
1157 				  struct twt_enable_complete_event_param *event,
1158 				  void *context);
1159 
1160 /**
1161  * mlme_twt_osif_disable_complete_ind() - disable complete resp to osif
1162  * @psoc: psoc pointer
1163  * @event: disable complete response
1164  * @context: context registered by OSIF
1165  *
1166  * Return: QDF_STATUS
1167  */
1168 QDF_STATUS
1169 mlme_twt_osif_disable_complete_ind(struct wlan_objmgr_psoc *psoc,
1170 				 struct twt_disable_complete_event_param *event,
1171 				 void *context);
1172 
1173 /**
1174  * mlme_twt_osif_ack_complete_ind() - ack complete resp to osif
1175  * @psoc: psoc pointer
1176  * @event: ack complete response
1177  * @context: context registered by OSIF
1178  *
1179  * Return: QDF_STATUS
1180  */
1181 QDF_STATUS
1182 mlme_twt_osif_ack_complete_ind(struct wlan_objmgr_psoc *psoc,
1183 			       struct twt_ack_complete_event_param *event,
1184 			       void *context);
1185 
1186 /**
1187  * mlme_twt_osif_setup_complete_ind() - setup complete resp to osif
1188  * @psoc: psoc pointer
1189  * @event: setup complete response
1190  * @renego_fail: flag to indicate if renegotiation failure case
1191  *
1192  * Return: QDF_STATUS
1193  */
1194 QDF_STATUS
1195 mlme_twt_osif_setup_complete_ind(struct wlan_objmgr_psoc *psoc,
1196 				 struct twt_add_dialog_complete_event *event,
1197 				 bool renego_fail);
1198 
1199 /**
1200  * mlme_twt_osif_teardown_complete_ind() - teardown complete resp to osif
1201  * @psoc: psoc pointer
1202  * @event: teardown complete response
1203  *
1204  * Return: QDF_STATUS
1205  */
1206 QDF_STATUS
1207 mlme_twt_osif_teardown_complete_ind(struct wlan_objmgr_psoc *psoc,
1208 			     struct twt_del_dialog_complete_event_param *event);
1209 
1210 /**
1211  * mlme_twt_osif_pause_complete_ind() - pause complete resp to osif
1212  * @psoc: psoc pointer
1213  * @event: pause complete response
1214  *
1215  * Return: QDF_STATUS
1216  */
1217 QDF_STATUS
1218 mlme_twt_osif_pause_complete_ind(struct wlan_objmgr_psoc *psoc,
1219 			   struct twt_pause_dialog_complete_event_param *event);
1220 
1221 /**
1222  * mlme_twt_osif_resume_complete_ind() - resume complete resp to osif
1223  * @psoc: psoc pointer
1224  * @event: resume complete response
1225  *
1226  * Return: QDF_STATUS
1227  */
1228 QDF_STATUS
1229 mlme_twt_osif_resume_complete_ind(struct wlan_objmgr_psoc *psoc,
1230 			  struct twt_resume_dialog_complete_event_param *event);
1231 
1232 /**
1233  * mlme_twt_osif_nudge_complete_ind() - nudge complete resp to osif
1234  * @psoc: psoc pointer
1235  * @event: nudge complete response
1236  *
1237  * Return: QDF_STATUS
1238  */
1239 QDF_STATUS
1240 mlme_twt_osif_nudge_complete_ind(struct wlan_objmgr_psoc *psoc,
1241 			   struct twt_nudge_dialog_complete_event_param *event);
1242 
1243 /**
1244  * mlme_twt_osif_notify_complete_ind() - notify complete resp to osif
1245  * @psoc: psoc pointer
1246  * @event: notify complete response
1247  *
1248  * Return: QDF_STATUS
1249  */
1250 QDF_STATUS
1251 mlme_twt_osif_notify_complete_ind(struct wlan_objmgr_psoc *psoc,
1252 				  struct twt_notify_event_param *event);
1253 
1254 /**
1255  * mlme_twt_vdev_create_notification() - vdev create notification to osif
1256  * @vdev: vdev pointer
1257  *
1258  * Return: QDF_STATUS
1259  */
1260 QDF_STATUS
1261 mlme_twt_vdev_create_notification(struct wlan_objmgr_vdev *vdev);
1262 
1263 /**
1264  * mlme_twt_vdev_destroy_notification() - vdev destroy notification to osif
1265  * @vdev: vdev pointer
1266  *
1267  * Return: QDF_STATUS
1268  */
1269 QDF_STATUS
1270 mlme_twt_vdev_destroy_notification(struct wlan_objmgr_vdev *vdev);
1271 #else
1272 static inline QDF_STATUS
1273 mlme_twt_osif_enable_complete_ind(struct wlan_objmgr_psoc *psoc,
1274 				  struct twt_enable_complete_event_param *event,
1275 				  void *context)
1276 {
1277 	return QDF_STATUS_SUCCESS;
1278 }
1279 
1280 static inline QDF_STATUS
1281 mlme_twt_osif_disable_complete_ind(struct wlan_objmgr_psoc *psoc,
1282 				 struct twt_disable_complete_event_param *event,
1283 				 void *context)
1284 {
1285 	return QDF_STATUS_SUCCESS;
1286 }
1287 
1288 static inline QDF_STATUS
1289 mlme_twt_osif_ack_complete_ind(struct wlan_objmgr_psoc *psoc,
1290 			       struct twt_ack_complete_event_param *event,
1291 			       void *context)
1292 {
1293 	return QDF_STATUS_SUCCESS;
1294 }
1295 
1296 static inline QDF_STATUS
1297 mlme_twt_osif_setup_complete_ind(struct wlan_objmgr_psoc *psoc,
1298 				 struct twt_add_dialog_complete_event *event,
1299 				 bool renego_fail)
1300 {
1301 	return QDF_STATUS_SUCCESS;
1302 }
1303 
1304 static inline QDF_STATUS
1305 mlme_twt_osif_teardown_complete_ind(struct wlan_objmgr_psoc *psoc,
1306 			      struct twt_del_dialog_complete_event_param *event)
1307 {
1308 	return QDF_STATUS_SUCCESS;
1309 }
1310 
1311 static inline QDF_STATUS
1312 mlme_twt_osif_pause_complete_ind(struct wlan_objmgr_psoc *psoc,
1313 			    struct twt_pause_dialog_complete_event_param *event)
1314 {
1315 	return QDF_STATUS_SUCCESS;
1316 }
1317 
1318 static inline QDF_STATUS
1319 mlme_twt_osif_resume_complete_ind(struct wlan_objmgr_psoc *psoc,
1320 			   struct twt_resume_dialog_complete_event_param *event)
1321 {
1322 	return QDF_STATUS_SUCCESS;
1323 }
1324 
1325 static inline QDF_STATUS
1326 mlme_twt_osif_nudge_complete_ind(struct wlan_objmgr_psoc *psoc,
1327 			    struct twt_nudge_dialog_complete_event_param *event)
1328 {
1329 	return QDF_STATUS_SUCCESS;
1330 }
1331 
1332 static inline QDF_STATUS
1333 mlme_twt_osif_notify_complete_ind(struct wlan_objmgr_psoc *psoc,
1334 				  struct twt_notify_event_param *event)
1335 {
1336 	return QDF_STATUS_SUCCESS;
1337 }
1338 
1339 static inline QDF_STATUS
1340 mlme_twt_vdev_create_notification(struct wlan_objmgr_vdev *vdev)
1341 {
1342 	return QDF_STATUS_SUCCESS;
1343 }
1344 
1345 static inline QDF_STATUS
1346 mlme_twt_vdev_destroy_notification(struct wlan_objmgr_vdev *vdev)
1347 {
1348 	return QDF_STATUS_SUCCESS;
1349 }
1350 
1351 #endif /* WLAN_SUPPORT_TWT && WLAN_TWT_CONV_SUPPORTED */
1352 
1353 /**
1354  * mlme_vdev_reconfig_timer_cb() - vdev ml reconfig timer callback
1355  * @arg: timer argument
1356  *
1357  * Return: None
1358  */
1359 void mlme_vdev_reconfig_timer_cb(void *arg);
1360 
1361 /**
1362  * mlme_mlo_is_reconfig_reassoc_enable() - Get if reassoc on mlo reconfig link
1363  * add is enable
1364  * @psoc: Object manager psoc pointer
1365  *
1366  * Return: True if reassoc on mlo reconfig link add ie enable
1367  */
1368 bool mlme_mlo_is_reconfig_reassoc_enable(struct wlan_objmgr_psoc *psoc);
1369 
1370 #ifdef WLAN_BOOST_CPU_FREQ_IN_ROAM
1371 /**
1372  * mlme_cm_osif_perfd_reset_cpufreq() - Function to reset CPU freq
1373  *
1374  * This function is to reset the CPU freq
1375  *
1376  * Return: None
1377  */
1378 void mlme_cm_osif_perfd_reset_cpufreq(void);
1379 #else
1380 static inline
1381 void mlme_cm_osif_perfd_reset_cpufreq(void)
1382 {
1383 }
1384 #endif
1385 
1386 #endif
1387