blob: 18c8b770bca82463eca2202f21a805faa29cd74c [file] [log] [blame]
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +05301/*
2 * Copyright (c) 2018 The Linux Foundation. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18/**
Vignesh Viswanathana0921c42018-09-04 19:03:35 +053019 * DOC: declare UCFG APIs exposed by the mlme component
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053020 */
21
22#ifndef _WLAN_MLME_UCFG_API_H_
23#define _WLAN_MLME_UCFG_API_H_
24
25#include <wlan_mlme_public_struct.h>
26#include <wlan_objmgr_psoc_obj.h>
27#include <wlan_objmgr_global_obj.h>
28#include <wlan_cmn.h>
Vignesh Viswanathana0921c42018-09-04 19:03:35 +053029#include <wlan_mlme_api.h>
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053030
31/**
Vignesh Viswanathana0921c42018-09-04 19:03:35 +053032 * ucfg_mlme_init() - initialize mlme_ctx context.
33 *
34 * This function initializes the mlme context.
35 *
36 * Return: QDF_STATUS_SUCCESS - in case of success else return error
37 */
38QDF_STATUS ucfg_mlme_init(void);
39
40/**
41 * ucfg_mlme_deinit() - De initialize mlme_ctx context.
42 *
43 * This function De initializes mlme contex.
44 *
45 * Return: QDF_STATUS_SUCCESS - in case of success else return error
46 */
47QDF_STATUS ucfg_mlme_deinit(void);
48
49/**
50 * ucfg_mlme_psoc_open() - MLME component Open
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053051 * @psoc: pointer to psoc object
52 *
53 * Open the MLME component and initialize the MLME strucutre
54 *
55 * Return: QDF Status
56 */
Vignesh Viswanathana0921c42018-09-04 19:03:35 +053057QDF_STATUS ucfg_mlme_psoc_open(struct wlan_objmgr_psoc *psoc);
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053058
59/**
Vignesh Viswanathana0921c42018-09-04 19:03:35 +053060 * ucfg_mlme_psoc_close() - MLME component close
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053061 * @psoc: pointer to psoc object
62 *
63 * Close the MLME component and clear the MLME structures
64 *
65 * Return: None
66 */
Vignesh Viswanathana0921c42018-09-04 19:03:35 +053067void ucfg_mlme_psoc_close(struct wlan_objmgr_psoc *psoc);
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053068
Sandeep Puligillab7beb472018-08-13 22:54:20 -070069#ifdef CONFIG_VDEV_SM
70/**
71 * ucfg_mlme_pdev_open() - MLME component pdev Open
72 * @pdev: pointer to pdev object
73 *
74 * Open the MLME component and initialize the MLME pdev strucutre
75 *
76 * Return: QDF Status
77 */
78QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev);
79
80/**
81 * ucfg_mlme_pdev_close() - MLME component pdev close
82 * @pdev: pointer to pdev object
83 *
84 * close the MLME pdev information
85 *
86 * Return: QDF Status
87 */
88QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev);
89
90#else
91/**
92 * ucfg_mlme_pdev_open() - MLME component pdev Open
93 * @pdev: pointer to pdev object
94 *
95 * Open the MLME component and initialize the MLME pdev strucutre
96 *
97 * Return: QDF Status
98 */
99static inline QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev)
100{
101 return QDF_STATUS_SUCCESS;
102}
103
104/**
105 * ucfg_mlme_pdev_close() - MLME component pdev close
106 * @pdev: pointer to pdev object
107 *
108 * close the MLME pdev information
109 *
110 * Return: QDF Status
111 */
112static inline QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev)
113{
114 return QDF_STATUS_SUCCESS;
115}
116#endif
117
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530118/**
119 * ucfg_mlme_get_ht_cap_info() - Get the HT cap info config
120 * @psoc: pointer to psoc object
121 * @value: pointer to the value which will be filled for the caller
122 *
123 * Inline UCFG API to be used by HDD/OSIF callers
124 *
125 * Return: QDF Status
126 */
127static inline
128QDF_STATUS ucfg_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
129 struct mlme_ht_capabilities_info
130 *ht_cap_info)
131{
132 return wlan_mlme_get_ht_cap_info(psoc, ht_cap_info);
133}
134
135/**
136 * ucfg_mlme_set_ht_cap_info() - Set the HT cap info config
137 * @psoc: pointer to psoc object
138 * @value: Value that needs to be set from the caller
139 *
140 * Inline UCFG API to be used by HDD/OSIF callers
141 *
142 * Return: QDF Status
143 */
144static inline
145QDF_STATUS ucfg_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
146 struct mlme_ht_capabilities_info
147 ht_cap_info)
148{
149 return wlan_mlme_set_ht_cap_info(psoc, ht_cap_info);
150}
Pragaspathi Thilagarajf4cc58b2018-07-31 00:39:05 +0530151
152/**
153 * ucfg_mlme_get_ignore_peer_ht_mode() - Get the ignore peer ht mode flag
154 *
155 * @psoc: pointer to psoc object
156 * @value: Value that needs to be set
157 *
158 * Inline UCFG API to be used by HDD/OSIF callers to get the
159 * ignore_peer_ht_opmode flag value
160 *
161 * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
162 */
163static inline
164QDF_STATUS ucfg_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
165 bool *value)
166{
167 return wlan_mlme_get_ignore_peer_ht_mode(psoc, value);
168}
Pragaspathi Thilagaraj00bd8bc2018-08-18 01:23:01 +0530169
170/**
171 * ucfg_mlme_get_tx_chainmask_1ss() - Get the tx_chainmask_1ss value
172 *
173 * @psoc: pointer to psoc object
174 * @value: Value that needs to be set from the caller
175 *
176 * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
177 */
178static inline
179QDF_STATUS ucfg_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc,
180 uint8_t *value)
181{
182 return wlan_mlme_get_tx_chainmask_1ss(psoc, value);
183}
184
185/**
186 * ucfg_mlme_get_num_11b_tx_chains() - Get the number of 11b only tx chains
187 *
188 * @psoc: pointer to psoc object
189 * @value: Value that needs to be set from the caller
190 *
191 * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
192 */
193static inline
194QDF_STATUS ucfg_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc,
195 uint16_t *value)
196{
197 return wlan_mlme_get_num_11b_tx_chains(psoc, value);
198}
199
200/**
201 * ucfg_mlme_get_num_11ag_tx_chains() - get the total number of 11a/g tx chains
202 *
203 * @psoc: pointer to psoc object
204 * @value: Value that needs to be set from the caller
205 *
206 * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
207 */
208static inline
209QDF_STATUS ucfg_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
210 uint16_t *value)
211{
212 return wlan_mlme_get_num_11ag_tx_chains(psoc, value);
213}
214
215/**
216 * ucfg_mlme_configure_chain_mask() - configure chainmask parameters
217 *
218 * @psoc: pointer to psoc object
219 * @session_id: vdev_id
220 *
221 * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
222 */
223static inline
224QDF_STATUS ucfg_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc,
225 uint8_t session_id)
226{
227 return wlan_mlme_configure_chain_mask(psoc, session_id);
228}
229
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530230#endif /* _WLAN_MLME_UCFG_API_H_ */