blob: e639db4a602fad3d93fa0162f3ea1481a9270a9b [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
69/**
70 * ucfg_mlme_get_ht_cap_info() - Get the HT cap info config
71 * @psoc: pointer to psoc object
72 * @value: pointer to the value which will be filled for the caller
73 *
74 * Inline UCFG API to be used by HDD/OSIF callers
75 *
76 * Return: QDF Status
77 */
78static inline
79QDF_STATUS ucfg_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
80 struct mlme_ht_capabilities_info
81 *ht_cap_info)
82{
83 return wlan_mlme_get_ht_cap_info(psoc, ht_cap_info);
84}
85
86/**
87 * ucfg_mlme_set_ht_cap_info() - Set the HT cap info config
88 * @psoc: pointer to psoc object
89 * @value: Value that needs to be set from the caller
90 *
91 * Inline UCFG API to be used by HDD/OSIF callers
92 *
93 * Return: QDF Status
94 */
95static inline
96QDF_STATUS ucfg_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
97 struct mlme_ht_capabilities_info
98 ht_cap_info)
99{
100 return wlan_mlme_set_ht_cap_info(psoc, ht_cap_info);
101}
102#endif /* _WLAN_MLME_UCFG_API_H_ */