xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mgr_utils_api.h (revision dd4dc88b837a295134aa9869114a2efee0f4894b)
1 /*
2  * Copyright (c) 2019 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 
19 /**
20  * DOC: wlan_vdev_mgr_utils_api.h
21  *
22  * This file provides declaration for APIs used for psoc enable/disable
23  */
24 
25 #ifndef __WLAN_VDEV_MGR_UTILS_API_H__
26 #define __WLAN_VDEV_MGR_UTILS_API_H__
27 
28 #include <wlan_objmgr_psoc_obj.h>
29 #include <include/wlan_vdev_mlme.h>
30 #include <wlan_vdev_mgr_ucfg_api.h>
31 #include <cdp_txrx_cmn_struct.h>
32 
33 /**
34  * wlan_util_vdev_get_cdp_txrx_opmode - get cdp txrx opmode from qdf mode
35  * @vdev: pointer to vdev object
36  *
37  * Return: wlan_opmode
38  */
39 enum wlan_op_mode
40 wlan_util_vdev_get_cdp_txrx_opmode(struct wlan_objmgr_vdev *vdev);
41 
42 /**
43  * wlan_util_vdev_mlme_set_ratemask_config) – common MLME API to set
44  * ratemask configuration and send it to FW
45  * @vdev_mlme: pointer to vdev_mlme object
46  *
47  * Return: QDF_STATUS - Success or Failure
48  */
49 QDF_STATUS
50 wlan_util_vdev_mlme_set_ratemask_config(struct vdev_mlme_obj *vdev_mlme);
51 
52 /**
53  * wlan_util_vdev_mlme_set_param() – common MLME API to fill common
54  * parameters of vdev_mlme object
55  * @vdev_mlme: pointer to vdev_mlme object
56  * @param_id: param id for which the value should be set
57  * @param_value: value that should bem set to the parameter
58  *
59  * Return: QDF_STATUS - Success or Failure
60  */
61 QDF_STATUS wlan_util_vdev_mlme_set_param(struct vdev_mlme_obj *vdev_mlme,
62 					 enum wlan_mlme_cfg_id param_id,
63 					 struct wlan_vdev_mgr_cfg mlme_cfg);
64 
65 /**
66  * wlan_util_vdev_mlme_get_param() – common MLME API to get common
67  * parameters of vdev_mlme object
68  * @vdev_mlme: pointer to vdev_mlme object
69  * @param_id: param id for which the value should be set
70  * @param_value: value that should bem set to the parameter
71  *
72  * Return: QDF_STATUS - Success or Failure
73  */
74 void wlan_util_vdev_mlme_get_param(struct vdev_mlme_obj *vdev_mlme,
75 				   enum wlan_mlme_cfg_id param_id,
76 				   uint32_t *param_value);
77 
78 /**
79  * wlan_util_vdev_get_param() – common MLME API to get common
80  * parameters of vdev_mlme object
81  * @vdev: pointer to vdev object
82  * @param_id: param id for which the value should be set
83  * @param_value: value that should bem set to the parameter
84  *
85  * Return: QDF_STATUS - Success or Failure
86  */
87 void wlan_util_vdev_get_param(struct wlan_objmgr_vdev *vdev,
88 			      enum wlan_mlme_cfg_id param_id,
89 			      uint32_t *param_value);
90 
91 #endif /* __WLAN_VDEV_MGR_UTILS_API_H__ */
92