xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlme/psoc_mgr/dispatcher/inc/wlan_psoc_mlme_api.h (revision 8b3dca18206e1a0461492f082fa6e270b092c035)
1 /*
2  * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022 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 PSOC MLME public APIs
20  */
21 
22 #ifndef _WLAN_PSOC_MLME_API_H_
23 #define _WLAN_PSOC_MLME_API_H_
24 
25 #include <include/wlan_psoc_mlme.h>
26 
27 /**
28  * wlan_psoc_mlme_get_cmpt_obj() - Returns PSOC MLME component object
29  * @psoc: PSOC object
30  *
31  * Retrieves MLME component object from PSOC object
32  *
33  * Return: comp handle on SUCCESS
34  *         NULL, if it fails to retrieve
35  */
36 struct psoc_mlme_obj *wlan_psoc_mlme_get_cmpt_obj(
37 						struct wlan_objmgr_psoc *psoc);
38 
39 /**
40  * wlan_psoc_mlme_get_ext_hdl() - Returns legacy handle
41  * @psoc: PSOC object
42  *
43  * Retrieves legacy handle from psoc mlme component object
44  *
45  * Return: legacy handle on SUCCESS
46  *         NULL, if it fails to retrieve
47  */
48 mlme_psoc_ext_t *wlan_psoc_mlme_get_ext_hdl(struct wlan_objmgr_psoc *psoc);
49 
50 /**
51  * wlan_psoc_mlme_set_ext_hdl() - Set legacy handle
52  * @psoc_mlme: psoc_mlme object
53  * psoc_ext_hdl: PSOC level legacy handle
54  *
55  * Sets legacy handle in psoc mlme component object
56  *
57  * Return: Void
58  */
59 void wlan_psoc_mlme_set_ext_hdl(struct psoc_mlme_obj *psoc_mlme,
60 				mlme_psoc_ext_t *psoc_ext_hdl);
61 
62 /**
63  * wlan_psoc_set_phy_config() - Init psoc phy related configs
64  * @psoc: pointer to psoc object
65  * @phy_config: phy related configs score config
66  *
67  * Return: void
68  */
69 void wlan_psoc_set_phy_config(struct wlan_objmgr_psoc *psoc,
70 			      struct psoc_phy_config *phy_config);
71 
72 /**
73  * mlme_psoc_open() - MLME component Open
74  * @psoc: pointer to psoc object
75  *
76  * Open the MLME component and initialize the MLME structure
77  *
78  * Return: QDF Status
79  */
80 QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc);
81 
82 /**
83  * mlme_psoc_close() - MLME component close
84  * @psoc: pointer to psoc object
85  *
86  * Open the MLME component and initialize the MLME structure
87  *
88  * Return: QDF Status
89  */
90 QDF_STATUS mlme_psoc_close(struct wlan_objmgr_psoc *psoc);
91 
92 /**
93  * wlan_psoc_mlme_get_11be_capab() - Get the 11be capability for target
94  * @psoc: psoc handle
95  * @val: pointer to the output variable
96  *
97  * return: QDF_STATUS
98  */
99 QDF_STATUS
100 wlan_psoc_mlme_get_11be_capab(struct wlan_objmgr_psoc *psoc, bool *val);
101 
102 /**
103  * wlan_psoc_mlme_set_11be_capab() - Set the 11be capability for target
104  * @psoc: psoc handle
105  * @val: pointer to the output variable
106  *
107  * return: QDF_STATUS
108  */
109 QDF_STATUS
110 wlan_psoc_mlme_set_11be_capab(struct wlan_objmgr_psoc *psoc, bool val);
111 #endif
112