Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 1 | /* |
| 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 Viswanathan | a0921c4 | 2018-09-04 19:03:35 +0530 | [diff] [blame] | 19 | * DOC: declare UCFG APIs exposed by the mlme component |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 20 | */ |
| 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 Viswanathan | a0921c4 | 2018-09-04 19:03:35 +0530 | [diff] [blame] | 29 | #include <wlan_mlme_api.h> |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 30 | |
| 31 | /** |
Vignesh Viswanathan | a0921c4 | 2018-09-04 19:03:35 +0530 | [diff] [blame] | 32 | * 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 | */ |
| 38 | QDF_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 | */ |
| 47 | QDF_STATUS ucfg_mlme_deinit(void); |
| 48 | |
| 49 | /** |
| 50 | * ucfg_mlme_psoc_open() - MLME component Open |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 51 | * @psoc: pointer to psoc object |
| 52 | * |
| 53 | * Open the MLME component and initialize the MLME strucutre |
| 54 | * |
| 55 | * Return: QDF Status |
| 56 | */ |
Vignesh Viswanathan | a0921c4 | 2018-09-04 19:03:35 +0530 | [diff] [blame] | 57 | QDF_STATUS ucfg_mlme_psoc_open(struct wlan_objmgr_psoc *psoc); |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 58 | |
| 59 | /** |
Vignesh Viswanathan | a0921c4 | 2018-09-04 19:03:35 +0530 | [diff] [blame] | 60 | * ucfg_mlme_psoc_close() - MLME component close |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 61 | * @psoc: pointer to psoc object |
| 62 | * |
| 63 | * Close the MLME component and clear the MLME structures |
| 64 | * |
| 65 | * Return: None |
| 66 | */ |
Vignesh Viswanathan | a0921c4 | 2018-09-04 19:03:35 +0530 | [diff] [blame] | 67 | void ucfg_mlme_psoc_close(struct wlan_objmgr_psoc *psoc); |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 68 | |
Sandeep Puligilla | b7beb47 | 2018-08-13 22:54:20 -0700 | [diff] [blame^] | 69 | #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 | */ |
| 78 | QDF_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 | */ |
| 88 | QDF_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 | */ |
| 99 | static 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 | */ |
| 112 | static inline QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev) |
| 113 | { |
| 114 | return QDF_STATUS_SUCCESS; |
| 115 | } |
| 116 | #endif |
| 117 | |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 118 | /** |
| 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 | */ |
| 127 | static inline |
| 128 | QDF_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 | */ |
| 144 | static inline |
| 145 | QDF_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 Thilagaraj | f4cc58b | 2018-07-31 00:39:05 +0530 | [diff] [blame] | 151 | |
| 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 | */ |
| 163 | static inline |
| 164 | QDF_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 Thilagaraj | 00bd8bc | 2018-08-18 01:23:01 +0530 | [diff] [blame] | 169 | |
| 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 | */ |
| 178 | static inline |
| 179 | QDF_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 | */ |
| 193 | static inline |
| 194 | QDF_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 | */ |
| 208 | static inline |
| 209 | QDF_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 | */ |
| 223 | static inline |
| 224 | QDF_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 Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 230 | #endif /* _WLAN_MLME_UCFG_API_H_ */ |