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