xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlme/include/wlan_mlme_cmn.h (revision 2f4b444fb7e689b83a4ab0e7b3b38f0bf4def8e0)
1 /*
2  * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /**
18  * DOC: Define Common MLME structure and APIs
19  */
20 #ifndef _WLAN_MLME_CMN_H_
21 #define _WLAN_MLME_CMN_H_
22 
23 #include <include/wlan_psoc_mlme.h>
24 #include <include/wlan_pdev_mlme.h>
25 #include <include/wlan_vdev_mlme.h>
26 #include "wlan_cm_public_struct.h"
27 
28 /**
29  * mlme_cm_ops: connection manager osif callbacks
30  * @mlme_cm_connect_complete_cb: Connect done callback
31  * @vdev: vdev pointer
32  * @rsp: connect response
33  *
34  * @mlme_cm_failed_candidate_cb: Callback to indicate failed candidate
35  * @vdev: vdev pointer
36  * @rsp: connect response
37  *
38  * @mlme_cm_update_id_and_src_cb: Callback to update connect id and
39  *                                source of the connect request
40  * @vdev: vdev pointer
41  * @Source: Source of the connect req
42  * @cm_id: connection manager id
43  *
44  * @mlme_cm_disconnect_complete_cb: Disconnect done callback
45  * @vdev: vdev pointer
46  * @rsp: Disconnect response
47  *
48  * @mlme_cm_disconnect_start_cb: Disconnect start callback
49  * @vdev: vdev pointer
50  *
51  * @mlme_cm_roam_sync_cb: Roam sync callback
52  * @vdev: vdev pointer
53  *
54  * @mlme_cm_pmksa_candidate_notify_cb: Roam pmksa candidate notify callback
55  * @vdev: vdev pointer
56  * @bssid: bssid
57  * @index: index
58  * @preauth: preauth flag
59  *
60  * @mlme_cm_roam_start_cb: Roam start callback
61  * @vdev: vdev pointer
62  *
63  * @mlme_cm_roam_abort_cb: Roam abort callback
64  * @vdev: vdev pointer
65  *
66  * @mlme_cm_roam_cmpl_cb: Roam sync complete cb
67  * @vdev: vdev pointer
68  *
69  * @mlme_cm_ft_preauth_cmpl_cb: Roam ft preauth complete cb
70  * @vdev: vdev pointer
71  * @rsp: preauth response pointer
72  *
73  * @mlme_cm_cckm_preauth_cmpl_cb: Roam cckm preauth complete cb
74  * @vdev: vdev pointer
75  * @rsp: preauth response pointer
76  */
77 struct mlme_cm_ops {
78 	QDF_STATUS (*mlme_cm_connect_complete_cb)(
79 					struct wlan_objmgr_vdev *vdev,
80 					struct wlan_cm_connect_resp *rsp);
81 	QDF_STATUS (*mlme_cm_failed_candidate_cb)(
82 					struct wlan_objmgr_vdev *vdev,
83 					struct wlan_cm_connect_resp *rsp);
84 	QDF_STATUS (*mlme_cm_update_id_and_src_cb)(
85 					struct wlan_objmgr_vdev *vdev,
86 					enum wlan_cm_source source,
87 					wlan_cm_id cm_id);
88 	QDF_STATUS (*mlme_cm_disconnect_complete_cb)(
89 					struct wlan_objmgr_vdev *vdev,
90 					struct wlan_cm_discon_rsp *rsp);
91 	QDF_STATUS (*mlme_cm_disconnect_start_cb)(
92 					struct wlan_objmgr_vdev *vdev);
93 #ifdef CONN_MGR_ADV_FEATURE
94 	QDF_STATUS (*mlme_cm_roam_sync_cb)(struct wlan_objmgr_vdev *vdev);
95 	QDF_STATUS (*mlme_cm_pmksa_candidate_notify_cb)(
96 						struct wlan_objmgr_vdev *vdev,
97 						struct qdf_mac_addr *bssid,
98 						int index, bool preauth);
99 #endif
100 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
101 	QDF_STATUS (*mlme_cm_roam_start_cb)(struct wlan_objmgr_vdev *vdev);
102 	QDF_STATUS (*mlme_cm_roam_abort_cb)(struct wlan_objmgr_vdev *vdev);
103 	QDF_STATUS (*mlme_cm_roam_cmpl_cb)(struct wlan_objmgr_vdev *vdev);
104 #endif
105 #ifdef WLAN_FEATURE_PREAUTH_ENABLE
106 	QDF_STATUS (*mlme_cm_ft_preauth_cmpl_cb)(
107 					struct wlan_objmgr_vdev *vdev,
108 					struct wlan_preauth_rsp *rsp);
109 #ifdef FEATURE_WLAN_ESE
110 	QDF_STATUS (*mlme_cm_cckm_preauth_cmpl_cb)(
111 					struct wlan_objmgr_vdev *vdev,
112 					struct wlan_preauth_rsp *rsp);
113 #endif
114 #endif
115 };
116 
117 /**
118  * struct vdev_mlme_ext_ops - VDEV MLME legacy callbacks structure
119  * @mlme_psoc_ext_hdl_create:               callback to invoke creation of
120  *                                          legacy psoc object
121  * @mlme_psoc_ext_hdl_destroy:              callback to invoke destroy of legacy
122  *                                          psoc object
123  * @mlme_pdev_ext_hdl_create:               callback to invoke creation of
124  *                                          legacy pdev object
125  * @mlme_pdev_ext_hdl_destroy:              callback to invoke destroy of legacy
126  *                                          pdev object
127  * @mlme_vdev_ext_hdl_create:               callback to invoke creation of
128  *                                          legacy vdev object
129  * @mlme_vdev_ext_hdl_post_create:          callback to invoke post creation
130  *                                          actions of legacy vdev object
131  * @mlme_vdev_ext_hdl_destroy:              callback to invoke destroy of legacy
132  *                                          vdev object
133  * @mlme_vdev_start_fw_send:                callback to invoke vdev start
134  *                                          command
135  * @mlme_vdev_stop_fw_send:                 callback to invoke vdev stop command
136  * @mlme_vdev_down_fw_send:                 callback to invoke vdev down command
137  * @mlme_multivdev_restart_fw_send:         callback to invoke multivdev restart
138  *                                          command
139  * @mlme_vdev_enqueue_exp_cmd:              callback to enqueue exception
140  *                                          command
141  *                                          required by serialization
142  * @mlme_multi_vdev_restart_resp:           callback to process multivdev
143  *                                          restart response
144  * @mlme_cm_ext_hdl_create_cb:              callback to create ext cm context
145  * @mlme_cm_ext_hdl_destroy_cb:             callback to destroy ext cm context
146  * @mlme_cm_ext_connect_start_ind_cb:       callback to indicate connect start
147  * @mlme_cm_ext_bss_select_ind_cb:          callback to indicate candidate
148  *                                          select for connect
149  * @mlme_cm_ext_bss_peer_create_req_cb:     callback to bss peer create request
150  * @mlme_cm_ext_connect_req_cb:             callback for connect request to
151  *                                          VDEV/PEER SM
152  * @mlme_cm_ext_connect_complete_ind_cb:    callback to indicate connect
153  *                                          complete
154  * @mlme_cm_ext_disconnect_start_ind_cb :   callback to indicate disconnect
155  *                                          start
156  * @mlme_cm_ext_disconnect_req_cb:          callback to disconnect req to
157  *                                          VDEV/PEER SM
158  * @mlme_cm_ext_bss_peer_delete_req_cb:     callback to bss peer delete request
159  * @mlme_cm_ext_disconnect_complete_ind_cb: callback to indicate disconnect
160  *                                          complete
161  * @mlme_cm_ext_vdev_down_req_cb:           callback to send vdev down to FW
162  * @mlme_cm_ext_roam_start_ind_cb:          callback to indicate roam start
163  * @mlme_cm_ext_reassoc_req_cb:             callback for reassoc request to
164  *                                          VDEV/PEER SM
165  */
166 struct mlme_ext_ops {
167 	QDF_STATUS (*mlme_psoc_ext_hdl_create)(
168 				struct psoc_mlme_obj *psoc_mlme);
169 	QDF_STATUS (*mlme_psoc_ext_hdl_destroy)(
170 				struct psoc_mlme_obj *pdev_mlme);
171 	QDF_STATUS (*mlme_pdev_ext_hdl_create)(
172 				struct pdev_mlme_obj *pdev_mlme);
173 	QDF_STATUS (*mlme_pdev_ext_hdl_destroy)(
174 				struct pdev_mlme_obj *pdev_mlme);
175 	QDF_STATUS (*mlme_vdev_ext_hdl_create)(
176 				struct vdev_mlme_obj *vdev_mlme);
177 	QDF_STATUS (*mlme_vdev_ext_hdl_post_create)(
178 				struct vdev_mlme_obj *vdev_mlme);
179 	QDF_STATUS (*mlme_vdev_ext_hdl_destroy)(
180 				struct vdev_mlme_obj *vdev_mlme);
181 	QDF_STATUS (*mlme_vdev_start_fw_send)(
182 				struct wlan_objmgr_vdev *vdev, uint8_t restart);
183 	QDF_STATUS (*mlme_vdev_stop_fw_send)(struct wlan_objmgr_vdev *vdev);
184 	QDF_STATUS (*mlme_vdev_down_fw_send)(struct wlan_objmgr_vdev *vdev);
185 	QDF_STATUS (*mlme_multivdev_restart_fw_send)(
186 				struct wlan_objmgr_pdev *pdev);
187 	QDF_STATUS (*mlme_vdev_enqueue_exp_cmd)(
188 				struct vdev_mlme_obj *vdev_mlme,
189 				uint8_t cmd_type);
190 	QDF_STATUS (*mlme_vdev_ext_delete_rsp)(
191 					   struct wlan_objmgr_psoc *psoc,
192 					   struct vdev_delete_response *rsp);
193 	QDF_STATUS (*mlme_multi_vdev_restart_resp)(
194 				struct wlan_objmgr_psoc *psoc,
195 				struct multi_vdev_restart_resp *resp);
196 	QDF_STATUS (*mlme_cm_ext_hdl_create_cb)(struct wlan_objmgr_vdev *vdev,
197 						cm_ext_t **ext_cm_ptr);
198 	QDF_STATUS (*mlme_cm_ext_hdl_destroy_cb)(struct wlan_objmgr_vdev *vdev,
199 						 cm_ext_t *ext_cm_ptr);
200 	QDF_STATUS (*mlme_cm_ext_connect_start_ind_cb)(
201 				struct wlan_objmgr_vdev *vdev,
202 				struct wlan_cm_connect_req *req);
203 	QDF_STATUS (*mlme_cm_ext_bss_select_ind_cb)(
204 			struct wlan_objmgr_vdev *vdev,
205 			struct wlan_cm_vdev_connect_req *req);
206 	QDF_STATUS (*mlme_cm_ext_bss_peer_create_req_cb)(
207 				struct wlan_objmgr_vdev *vdev,
208 				struct qdf_mac_addr *peer_mac,
209 				struct qdf_mac_addr *mld_mac,
210 				bool is_assoc_link);
211 	QDF_STATUS (*mlme_cm_ext_connect_req_cb)(struct wlan_objmgr_vdev *vdev,
212 			struct wlan_cm_vdev_connect_req *req);
213 	QDF_STATUS (*mlme_cm_ext_connect_complete_ind_cb)(
214 				struct wlan_objmgr_vdev *vdev,
215 				struct wlan_cm_connect_resp *rsp);
216 	QDF_STATUS (*mlme_cm_ext_disconnect_start_ind_cb)(
217 				struct wlan_objmgr_vdev *vdev,
218 				struct wlan_cm_disconnect_req *req);
219 	QDF_STATUS (*mlme_cm_ext_disconnect_req_cb)
220 			(struct wlan_objmgr_vdev *vdev,
221 			struct wlan_cm_vdev_discon_req *req);
222 	QDF_STATUS (*mlme_cm_ext_bss_peer_delete_req_cb)(
223 			struct wlan_objmgr_vdev *vdev);
224 	QDF_STATUS (*mlme_cm_ext_disconnect_complete_ind_cb)(
225 				struct wlan_objmgr_vdev *vdev,
226 				struct wlan_cm_discon_rsp *rsp);
227 	QDF_STATUS (*mlme_cm_ext_vdev_down_req_cb)(
228 				struct wlan_objmgr_vdev *vdev);
229 	QDF_STATUS (*mlme_cm_ext_roam_start_ind_cb)(
230 				struct wlan_objmgr_vdev *vdev,
231 				struct wlan_cm_roam_req *req);
232 	QDF_STATUS (*mlme_cm_ext_reassoc_req_cb)(
233 				struct wlan_objmgr_vdev *vdev,
234 				struct wlan_cm_vdev_reassoc_req *req);
235 };
236 
237 /**
238  * mlme_psoc_ops_ext_hdl_create() - Alloc PSOC mlme ext handle
239  * @psoc_mlme:  PSOC MLME comp object
240  *
241  * API to allocate PSOC MLME ext handle
242  *
243  * Return: SUCCESS on successful allocation
244  *         Else FAILURE
245  */
246 QDF_STATUS mlme_psoc_ops_ext_hdl_create(struct psoc_mlme_obj *psoc_mlme);
247 
248 /**
249  * mlme_psoc_ops_ext_hdl_destroy() - Destroy PSOC mlme ext handle
250  * @psoc_mlme:  PSOC MLME comp object
251  *
252  * API to free psoc MLME ext handle
253  *
254  * Return: SUCCESS on successful free
255  *         Else FAILURE
256  */
257 QDF_STATUS mlme_psoc_ops_ext_hdl_destroy(struct psoc_mlme_obj *psoc_mlme);
258 
259 /**
260  * mlme_pdev_ops_ext_hdl_create - Alloc PDEV mlme ext handle
261  * @pdev_mlme_obj:  PDEV MLME comp object
262  *
263  * API to allocate PDEV MLME ext handle
264  *
265  * Return: SUCCESS on successful allocation
266  *         Else FAILURE
267  */
268 QDF_STATUS mlme_pdev_ops_ext_hdl_create(struct pdev_mlme_obj *pdev_mlme);
269 
270 /**
271  * mlme_pdev_ops_ext_hdl_destroy - Destroy PDEV mlme ext handle
272  * @pdev_mlme_obj:  PDEV MLME comp object
273  *
274  * API to free pdev MLME ext handle
275  *
276  * Return: SUCCESS on successful free
277  *         Else FAILURE
278  */
279 QDF_STATUS mlme_pdev_ops_ext_hdl_destroy(struct pdev_mlme_obj *pdev_mlme);
280 
281 /**
282  * mlme_vdev_ops_ext_hdl_create - Alloc VDEV mlme ext handle
283  * @vdev_mlme_obj:  VDEV MLME comp object
284  *
285  * API to allocate VDEV MLME ext handle
286  *
287  * Return: SUCCESS on successful allocation
288  *         Else FAILURE
289  */
290 QDF_STATUS mlme_vdev_ops_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme);
291 
292 /**
293  * mlme_vdev_ops_ext_hdl_post_create - Perform post VDEV mlme ext handle alloc
294  *                                     operations
295  * @vdev_mlme_obj:  VDEV MLME comp object
296  *
297  * API to perform post vdev MLME ext handle allocation operations
298  *
299  * Return: SUCCESS on initialization successful
300  *         Else FAILURE
301  */
302 QDF_STATUS mlme_vdev_ops_ext_hdl_post_create(struct vdev_mlme_obj *vdev_mlme);
303 
304 /**
305  * mlme_vdev_ops_ext_hdl_destroy - Destroy VDEV mlme ext handle
306  * @vdev_mlme_obj:  VDEV MLME comp object
307  *
308  * API to free vdev MLME ext handle
309  *
310  * Return: SUCCESS on successful free
311  *         Else FAILURE
312  */
313 QDF_STATUS mlme_vdev_ops_ext_hdl_destroy(struct vdev_mlme_obj *vdev_mlme);
314 
315 /**
316  * mlme_vdev_enqueue_exp_ser_cmd - Enqueue exception serialization cmd
317  * @vdev_mlme_obj:  VDEV MLME comp object
318  * @cmd_type: Serialization command type
319  *
320  * API to enqueue the exception serialization command, used by
321  * mlme-serialization wrapper layer
322  *
323  * Return: SUCCESS on successful enqueuing the command
324  *         Else FAILURE
325  */
326 QDF_STATUS mlme_vdev_enqueue_exp_ser_cmd(struct vdev_mlme_obj *vdev_mlme,
327 					 uint8_t cmd_type);
328 
329 /**
330  * mlme_vdev_ops_start_fw_send - Send WMI START/RESTART commmand to FW
331  * @vdev:  VDEV object
332  *
333  * API to send WMI start/restart command to FW
334  *
335  * Return: SUCCESS on successful sending the command
336  *         Else FAILURE
337  */
338 QDF_STATUS mlme_vdev_ops_start_fw_send(struct wlan_objmgr_vdev *vdev,
339 				       uint8_t restart);
340 
341 /**
342  * mlme_vdev_ops_multivdev_restart_fw_cmd_send - Send WMI Multivdev restart
343  *                                              commmand to FW
344  * @pdev:  PDEV object
345  *
346  * API to send WMI multivdev restart command to FW
347  *
348  * Return: SUCCESS on successful sending the command
349  *         Else FAILURE
350  */
351 QDF_STATUS mlme_vdev_ops_multivdev_restart_fw_cmd_send(
352 						struct wlan_objmgr_pdev *pdev);
353 
354 /**
355  * mlme_vdev_ops_stop_fw_send - Send WMI STOP commmand to FW
356  * @vdev:  VDEV object
357  *
358  * API to send WMI stop command to FW
359  *
360  * Return: SUCCESS on successful sending the command
361  *         Else FAILURE
362  */
363 QDF_STATUS mlme_vdev_ops_stop_fw_send(struct wlan_objmgr_vdev *vdev);
364 
365 /**
366  * mlme_vdev_ops_down_fw_send - Send WMI Down commmand to FW
367  * @vdev:  VDEV object
368  *
369  * API to send WMI down command to FW
370  *
371  * Return: SUCCESS on successful sending the command
372  *         Else FAILURE
373  */
374 QDF_STATUS mlme_vdev_ops_down_fw_send(struct wlan_objmgr_vdev *vdev);
375 
376 /*
377  * mlme_vdev_ops_ext_hdl_multivdev_restart_resp() - Handler multivdev restart
378  * response event
379  * @psoc: PSOC object manager handle
380  * @resp: Restart response event
381  *
382  * Return: Success on successful handling of the response event,
383  *         Else failure
384  */
385 QDF_STATUS mlme_vdev_ops_ext_hdl_multivdev_restart_resp(
386 		struct wlan_objmgr_psoc *psoc,
387 		struct multi_vdev_restart_resp *resp);
388 
389 /**
390  * mlme_set_ops_register_cb - Sets ops registration callback
391  * @ops_cb:  Function pointer
392  *
393  * API to set ops registration call back
394  *
395  * Return: void
396  */
397 typedef struct mlme_ext_ops *(*mlme_get_global_ops_cb)(void);
398 void mlme_set_ops_register_cb(mlme_get_global_ops_cb ops_cb);
399 
400 /**
401  * wlan_cmn_mlme_init - Initializes MLME component
402  *
403  * Registers callbacks with object manager for create/destroy
404  *
405  * Return: SUCCESS on successful registration
406  *         FAILURE, if registration fails
407  */
408 QDF_STATUS wlan_cmn_mlme_init(void);
409 
410 /**
411  * wlan_cmn_mlme_deinit - Uninitializes MLME component
412  *
413  * Unregisters callbacks with object manager for create/destroy
414  *
415  * Return: SUCCESS on successful registration
416  *         FAILURE, if registration fails
417  */
418 QDF_STATUS wlan_cmn_mlme_deinit(void);
419 
420 /**
421  * mlme_vdev_ops_ext_hdl_delete_rsp - Vdev Delete response ext handler
422  * @psoc: PSOC object
423  * @rsp: Vdev delete response received from the firmware
424  *
425  * API to invoke the legacy delete response handler for legacy cleanup
426  *
427  * Return: SUCCESS on successful deletion
428  *         FAILURE, if deletion fails
429  */
430 QDF_STATUS mlme_vdev_ops_ext_hdl_delete_rsp(struct wlan_objmgr_psoc *psoc,
431 					    struct vdev_delete_response *rsp);
432 
433 /**
434  * mlme_cm_ext_hdl_create() - Connection manager callback to create ext
435  * context
436  * @vdev: VDEV object
437  * @ext_cm_ptr: pointer to connection manager ext pointer
438  *
439  * Return: QDF_STATUS
440  */
441 QDF_STATUS mlme_cm_ext_hdl_create(struct wlan_objmgr_vdev *vdev,
442 				  cm_ext_t **ext_cm_ptr);
443 
444 /**
445  * mlme_cm_ext_hdl_destroy() - Connection manager callback to destroy ext
446  * context
447  * @vdev: VDEV object
448  * @ext_cm_ptr: connection manager ext pointer
449  *
450  * Return: QDF_STATUS
451  */
452 QDF_STATUS mlme_cm_ext_hdl_destroy(struct wlan_objmgr_vdev *vdev,
453 				   cm_ext_t *ext_cm_ptr);
454 
455 /**
456  * mlme_cm_connect_start_ind() - Connection manager ext Connect start indication
457  * @vdev: VDEV object
458  * @req: Connection manager connect request
459  *
460  * Return: QDF_STATUS
461  */
462 QDF_STATUS mlme_cm_connect_start_ind(struct wlan_objmgr_vdev *vdev,
463 				     struct wlan_cm_connect_req *req);
464 
465 /**
466  * mlme_cm_bss_select_ind() - Connection manager ext Connect candidate
467  * select indication, to do operations for the candidate
468  * @vdev: VDEV object
469  * @req: Vdev connect request
470  *
471  * Return: QDF_STATUS
472  */
473 QDF_STATUS mlme_cm_bss_select_ind(struct wlan_objmgr_vdev *vdev,
474 				  struct wlan_cm_vdev_connect_req *req);
475 
476 /**
477  * mlme_cm_bss_peer_create_req() - Connection manager ext bss peer create
478  * request
479  * @vdev: VDEV object
480  * @peer_mac: Peer mac address
481  * @mld_mac: mld mac address
482  * @is_assoc_link: assoc happens on this link or not
483  *
484  * Return: QDF_STATUS
485  */
486 QDF_STATUS mlme_cm_bss_peer_create_req(struct wlan_objmgr_vdev *vdev,
487 				       struct qdf_mac_addr *peer_mac,
488 				       struct qdf_mac_addr *mld_mac,
489 				       bool is_assoc_link);
490 
491 /**
492  * mlme_cm_connect_req() - Connection manager ext connect request to start vdev
493  * and peer assoc state machine
494  * @vdev: VDEV object
495  * @req: Vdev connect request
496  *
497  * Context: The req is on stack, so the API need to make a copy, if it want to
498  * use the req after return.
499  *
500  * Return: QDF_STATUS
501  */
502 QDF_STATUS mlme_cm_connect_req(struct wlan_objmgr_vdev *vdev,
503 			       struct wlan_cm_vdev_connect_req *req);
504 
505 /**
506  * mlme_cm_connect_complete_ind() - Connection manager ext connect complete
507  * indication
508  * @vdev: VDEV object
509  * @rsp: Connection manager connect response
510  *
511  * Return: QDF_STATUS
512  */
513 QDF_STATUS mlme_cm_connect_complete_ind(struct wlan_objmgr_vdev *vdev,
514 					struct wlan_cm_connect_resp *rsp);
515 
516 /**
517  * mlme_cm_roam_start_ind() - Connection manager ext Connect start indication
518  * @vdev: VDEV object
519  * @req: Connection manager roam request
520  *
521  * Return: QDF_STATUS
522  */
523 QDF_STATUS mlme_cm_roam_start_ind(struct wlan_objmgr_vdev *vdev,
524 				  struct wlan_cm_roam_req *req);
525 
526 /**
527  * mlme_cm_reassoc_req() - Connection manager ext reassoc request
528  * @vdev: VDEV object
529  * @req: Vdev reassoc request
530  *
531  * Context: The req is on stack, so the API need to make a copy, if it want to
532  * use the req after return.
533  *
534  * Return: QDF_STATUS
535  */
536 QDF_STATUS mlme_cm_reassoc_req(struct wlan_objmgr_vdev *vdev,
537 			       struct wlan_cm_vdev_reassoc_req *req);
538 
539 /**
540  * mlme_cm_disconnect_start_ind() - Connection manager ext disconnect start
541  * indication
542  * @vdev: VDEV object
543  * @req: Connection manager disconnect request
544  *
545  * Return: QDF_STATUS
546  */
547 QDF_STATUS mlme_cm_disconnect_start_ind(struct wlan_objmgr_vdev *vdev,
548 					struct wlan_cm_disconnect_req *req);
549 
550 /**
551  * mlme_cm_disconnect_req() - Connection manager ext disconnect
552  * req to vdev and peer sm
553  * @vdev: VDEV object
554  * @req: vdev disconnect request
555  *
556  * Return: QDF_STATUS
557  */
558 QDF_STATUS mlme_cm_disconnect_req(struct wlan_objmgr_vdev *vdev,
559 				  struct wlan_cm_vdev_discon_req *req);
560 
561 /**
562  * mlme_cm_bss_peer_delete_req() - Connection manager ext bss peer delete
563  * request
564  * @vdev: VDEV object
565  *
566  * Return: QDF_STATUS
567  */
568 QDF_STATUS
569 mlme_cm_bss_peer_delete_req(struct wlan_objmgr_vdev *vdev);
570 
571 /**
572  * mlme_cm_disconnect_complete_ind() - Connection manager ext disconnect
573  * complete indication
574  * @vdev: VDEV object
575  * @rsp: Connection manager disconnect response
576  *
577  * Return: QDF_STATUS
578  */
579 QDF_STATUS mlme_cm_disconnect_complete_ind(struct wlan_objmgr_vdev *vdev,
580 					   struct wlan_cm_discon_rsp *rsp);
581 
582 /**
583  * mlme_cm_vdev_down() - Connection manager ext req to send vdev down to FW
584  * @vdev: VDEV object
585  *
586  * Return: QDF_STATUS
587  */
588 QDF_STATUS mlme_cm_vdev_down_req(struct wlan_objmgr_vdev *vdev);
589 
590 /**
591  * mlme_cm_osif_connect_complete() - Connect complete resp to osif
592  * @vdev: vdev pointer
593  * @rsp: Connect response
594  *
595  * Return: QDF_STATUS
596  */
597 QDF_STATUS mlme_cm_osif_connect_complete(struct wlan_objmgr_vdev *vdev,
598 					 struct wlan_cm_connect_resp *rsp);
599 
600 /**
601  * mlme_cm_osif_failed_candidate_ind() - Failed Candidate indication to osif
602  * @vdev: vdev pointer
603  * @rsp: Connect response
604  *
605  * Return: QDF_STATUS
606  */
607 QDF_STATUS
608 mlme_cm_osif_failed_candidate_ind(struct wlan_objmgr_vdev *vdev,
609 				  struct wlan_cm_connect_resp *rsp);
610 
611 /**
612  * mlme_cm_osif_update_id_and_src() - Update connection id and source to osif
613  * @vdev: vdev pointer
614  * @source: source of request
615  * @cm_id: connection manager id
616  *
617  * Return: QDF_STATUS
618  */
619 QDF_STATUS mlme_cm_osif_update_id_and_src(struct wlan_objmgr_vdev *vdev,
620 					  enum wlan_cm_source source,
621 					  wlan_cm_id cm_id);
622 
623 /**
624  * mlme_cm_osif_disconnect_complete() - Disconnect complete osif response
625  * @vdev: vdev pointer
626  * @cm_conn_rsp: Connect response
627  *
628  * Return: QDF_STATUS
629  */
630 QDF_STATUS
631 mlme_cm_osif_disconnect_complete(struct wlan_objmgr_vdev *vdev,
632 				 struct wlan_cm_discon_rsp *rsp);
633 
634 /**
635  * mlme_cm_osif_disconnect_start_ind() - osif Disconnect start indication
636  * @vdev: vdev pointer
637  * @cm_conn_rsp: Connect response
638  *
639  * Return: QDF_STATUS
640  */
641 QDF_STATUS mlme_cm_osif_disconnect_start_ind(struct wlan_objmgr_vdev *vdev);
642 
643 #ifdef CONN_MGR_ADV_FEATURE
644 /**
645  * mlme_cm_osif_roam_sync_ind() - osif Roam sync indication
646  * @vdev: vdev pointer
647  *
648  * Return: QDF_STATUS
649  */
650 QDF_STATUS mlme_cm_osif_roam_sync_ind(struct wlan_objmgr_vdev *vdev);
651 
652 /**
653  * mlme_cm_osif_pmksa_candidate_notify() - osif roam pmksa candidate notify
654  * @vdev: vdev pointer
655  * @bssid: bssid
656  * @index: index
657  * @preauth: preauth flag
658  *
659  * Return: QDF_STATUS
660  */
661 QDF_STATUS mlme_cm_osif_pmksa_candidate_notify(struct wlan_objmgr_vdev *vdev,
662 					       struct qdf_mac_addr *bssid,
663 					       int index, bool preauth);
664 #else
665 static inline
666 QDF_STATUS mlme_cm_osif_roam_sync_ind(struct wlan_objmgr_vdev *vdev)
667 {
668 	return QDF_STATUS_SUCCESS;
669 }
670 #endif
671 
672 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
673 /**
674  * mlme_cm_osif_roam_start_ind() - osif Roam start indication
675  * @vdev: vdev pointer
676  *
677  * Return: QDF_STATUS
678  */
679 QDF_STATUS mlme_cm_osif_roam_start_ind(struct wlan_objmgr_vdev *vdev);
680 
681 /**
682  * mlme_cm_osif_roam_abort_ind() - osif Roam abort indication
683  * @vdev: vdev pointer
684  *
685  * Return: QDF_STATUS
686  */
687 QDF_STATUS mlme_cm_osif_roam_abort_ind(struct wlan_objmgr_vdev *vdev);
688 
689 /**
690  * mlme_cm_osif_roam_complete() - osif Roam sync complete callback
691  * @vdev: vdev pointer
692  *
693  * Return: QDF_STATUS
694  */
695 QDF_STATUS mlme_cm_osif_roam_complete(struct wlan_objmgr_vdev *vdev);
696 #endif
697 
698 #ifdef WLAN_FEATURE_PREAUTH_ENABLE
699 /**
700  * mlme_cm_osif_ft_preauth_complete() - osif roam ft preauth complete callback
701  * @vdev: vdev pointer
702  * @rsp: preauth response pointer
703  *
704  * Return: QDF_STATUS
705  */
706 QDF_STATUS
707 mlme_cm_osif_ft_preauth_complete(struct wlan_objmgr_vdev *vdev,
708 				 struct wlan_preauth_rsp *rsp);
709 #ifdef FEATURE_WLAN_ESE
710 /**
711  * mlme_cm_osif_cckm_preauth_complete() - osif cckm preauth complete callback
712  * @vdev: vdev pointer
713  * @rsp: preauth response pointer
714  *
715  * Return: QDF_STATUS
716  */
717 QDF_STATUS
718 mlme_cm_osif_cckm_preauth_complete(struct wlan_objmgr_vdev *vdev,
719 				   struct wlan_preauth_rsp *rsp);
720 #else
721 static inline QDF_STATUS
722 mlme_cm_osif_cckm_preauth_complete(struct wlan_objmgr_vdev *vdev,
723 				   struct wlan_preauth_rsp *rsp)
724 {
725 	return QDF_STATUS_SUCCESS;
726 }
727 #endif /* FEATURE_WLAN_ESE */
728 #endif /* WLAN_FEATURE_PREAUTH_ENABLE */
729 
730 /**
731  * typedef osif_cm_get_global_ops_cb() - Callback to get connection manager
732  * global ops
733  */
734 typedef struct mlme_cm_ops *(*osif_cm_get_global_ops_cb)(void);
735 
736 /**
737  * mlme_set_osif_cm_cb() - Sets ops registration callback
738  * @cm_osif_ops:  Function pointer
739  *
740  * API to set ops registration call back
741  *
742  * Return: void
743  */
744 void mlme_set_osif_cm_cb(osif_cm_get_global_ops_cb cm_osif_ops);
745 
746 /**
747  * mlme_max_chan_switch_is_set() - Get if max chan switch IE is enabled
748  * @vdev: Object manager vdev pointer
749  *
750  * Return: True if max chan switch is enabled else false
751  */
752 bool mlme_max_chan_switch_is_set(struct wlan_objmgr_vdev *vdev);
753 
754 #endif
755