blob: 46f56ff3de71b89a4238b5e9e85346845d072d34 [file] [log] [blame]
Sandeep Puligillac5609d52018-05-17 19:23:41 -07001/*
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 Viswanathan21c58cb2018-05-24 15:53:58 +053019 * DOC: declare internal API related to the mlme component
Sandeep Puligillac5609d52018-05-17 19:23:41 -070020 */
21
22#ifndef _WLAN_MLME_MAIN_H_
23#define _WLAN_MLME_MAIN_H_
24
25#include <wlan_mlme_public_struct.h>
26#include <qdf_atomic.h>
27#include <wlan_objmgr_psoc_obj.h>
28#include <wlan_objmgr_global_obj.h>
29#include <wlan_cmn.h>
30#include <qdf_time.h>
31#include <qdf_list.h>
32
33#define mlme_fatal(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_MLME, params)
34#define mlme_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_MLME, params)
35#define mlme_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_MLME, params)
36#define mlme_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_MLME, params)
37#define mlme_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_MLME, params)
38
39/**
40 * struct wlan_mlme_psoc_obj -MLME psoc priv object
41 * @cfg: cfg items
42 */
43struct wlan_mlme_psoc_obj {
44 struct wlan_mlme_cfg cfg;
45};
46
47/**
48 * mlme_init() - initialize mlme_ctx context.
49 *
50 * This function initializes the mlme context.
51 *
52 * Return: QDF_STATUS_SUCCESS - in case of success else return error
53 */
54QDF_STATUS mlme_init(void);
55
56/**
57 * mlme_deinit() - De initialize mlme_ctx context.
58 *
59 * This function De initializes mlme contex.
60 *
61 * Return: QDF_STATUS_SUCCESS - in case of success else return error
62 */
63QDF_STATUS mlme_deinit(void);
64
65/**
66 * mlme_psoc_object_created_notification(): mlme psoc create handler
67 * @psoc: psoc which is going to created by objmgr
68 * @arg: argument for vdev create handler
69 *
70 * Register this api with objmgr to detect psoc is created
71 *
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053072 * Return: QDF_STATUS status in case of success else return error
Sandeep Puligillac5609d52018-05-17 19:23:41 -070073 */
74QDF_STATUS mlme_psoc_object_created_notification(
75 struct wlan_objmgr_psoc *psoc, void *arg);
76
77/**
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053078 * mlme_psoc_object_destroyed_notification(): mlme psoc delete handler
Sandeep Puligillac5609d52018-05-17 19:23:41 -070079 * @psoc: psoc which is going to delete by objmgr
80 * @arg: argument for vdev delete handler
81 *
82 * Register this api with objmgr to detect psoc is deleted
83 *
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053084 * Return: QDF_STATUS status in case of success else return error
Sandeep Puligillac5609d52018-05-17 19:23:41 -070085 */
86QDF_STATUS mlme_psoc_object_destroyed_notification(
87 struct wlan_objmgr_psoc *psoc, void *arg);
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053088
89/**
90 * mlme_cfg_on_psoc_enable() - Populate MLME structure from CFG and INI
91 * @psoc: pointer to the psoc object
92 *
93 * Populate the MLME CFG structure from CFG and INI values using CFG APIs
94 *
95 * Return: QDF_STATUS
96 */
97QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc);
98
99/**
100 * mlme_get_psoc_obj() - Get MLME object from psoc
101 * @psoc: pointer to the psoc object
102 *
103 * Get the MLME object pointer from the psoc
104 *
105 * Return: pointer to MLME object
106 */
107struct wlan_mlme_psoc_obj *mlme_get_psoc_obj(struct wlan_objmgr_psoc *psoc);
108
Sandeep Puligillac5609d52018-05-17 19:23:41 -0700109#endif