Sandeep Puligilla | c5609d5 | 2018-05-17 19:23:41 -0700 | [diff] [blame] | 1 | /* |
Abhishek Singh | 7c1c743 | 2019-04-04 12:11:57 +0530 | [diff] [blame] | 2 | * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. |
Sandeep Puligilla | c5609d5 | 2018-05-17 19:23:41 -0700 | [diff] [blame] | 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 | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 19 | * DOC: declare internal API related to the mlme component |
Sandeep Puligilla | c5609d5 | 2018-05-17 19:23:41 -0700 | [diff] [blame] | 20 | */ |
| 21 | |
| 22 | #ifndef _WLAN_MLME_MAIN_H_ |
| 23 | #define _WLAN_MLME_MAIN_H_ |
| 24 | |
| 25 | #include <wlan_mlme_public_struct.h> |
Sandeep Puligilla | c5609d5 | 2018-05-17 19:23:41 -0700 | [diff] [blame] | 26 | #include <wlan_objmgr_psoc_obj.h> |
| 27 | #include <wlan_objmgr_global_obj.h> |
| 28 | #include <wlan_cmn.h> |
gaurank kathpalia | 24ed0f4 | 2018-11-13 15:37:49 +0530 | [diff] [blame] | 29 | #include <wlan_objmgr_vdev_obj.h> |
Abhishek Singh | 7c1c743 | 2019-04-04 12:11:57 +0530 | [diff] [blame] | 30 | #include <wlan_objmgr_peer_obj.h> |
Sandeep Puligilla | c5609d5 | 2018-05-17 19:23:41 -0700 | [diff] [blame] | 31 | |
Abhishek Ambure | ec00007 | 2019-05-03 12:38:42 +0530 | [diff] [blame] | 32 | #define mlme_legacy_fatal(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_MLME, params) |
| 33 | #define mlme_legacy_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_MLME, params) |
| 34 | #define mlme_legacy_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_MLME, params) |
| 35 | #define mlme_legacy_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_MLME, params) |
| 36 | #define mlme_legacy_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_MLME, params) |
Sandeep Puligilla | c5609d5 | 2018-05-17 19:23:41 -0700 | [diff] [blame] | 37 | |
| 38 | /** |
Arun Kumar Khandavalli | a43590e | 2019-08-26 17:13:25 +0530 | [diff] [blame^] | 39 | * struct wlan_mlme_psoc_ext_obj -MLME ext psoc priv object |
Sandeep Puligilla | c5609d5 | 2018-05-17 19:23:41 -0700 | [diff] [blame] | 40 | * @cfg: cfg items |
| 41 | */ |
Arun Kumar Khandavalli | a43590e | 2019-08-26 17:13:25 +0530 | [diff] [blame^] | 42 | struct wlan_mlme_psoc_ext_obj { |
Sandeep Puligilla | c5609d5 | 2018-05-17 19:23:41 -0700 | [diff] [blame] | 43 | struct wlan_mlme_cfg cfg; |
| 44 | }; |
| 45 | |
Abhishek Singh | 7c1c743 | 2019-04-04 12:11:57 +0530 | [diff] [blame] | 46 | /** |
Srinivas Dasari | 37e3731 | 2019-06-30 23:50:24 +0530 | [diff] [blame] | 47 | * struct wlan_ies - Generic WLAN Information Element(s) format |
| 48 | * @len: Total length of the IEs |
| 49 | * @data: IE data |
| 50 | */ |
| 51 | struct wlan_ies { |
| 52 | uint16_t len; |
| 53 | uint8_t *data; |
| 54 | }; |
| 55 | |
| 56 | /** |
Abhishek Singh | 7c1c743 | 2019-04-04 12:11:57 +0530 | [diff] [blame] | 57 | * struct peer_mlme_priv_obj - peer MLME component object |
| 58 | * @ucast_key_cipher: unicast crypto type. |
Srinivas Dasari | cc863f0 | 2019-09-05 17:18:48 +0530 | [diff] [blame] | 59 | * @is_pmf_enabled: True if PMF is enabled |
Abhishek Singh | 7c1c743 | 2019-04-04 12:11:57 +0530 | [diff] [blame] | 60 | */ |
| 61 | struct peer_mlme_priv_obj { |
| 62 | uint32_t ucast_key_cipher; |
Srinivas Dasari | cc863f0 | 2019-09-05 17:18:48 +0530 | [diff] [blame] | 63 | bool is_pmf_enabled; |
Abhishek Singh | 7c1c743 | 2019-04-04 12:11:57 +0530 | [diff] [blame] | 64 | }; |
| 65 | |
gaurank kathpalia | 24ed0f4 | 2018-11-13 15:37:49 +0530 | [diff] [blame] | 66 | /** |
| 67 | * enum vdev_assoc_type - VDEV associate/reassociate type |
| 68 | * @VDEV_ASSOC: associate |
| 69 | * @VDEV_REASSOC: reassociate |
| 70 | * @VDEV_FT_REASSOC: fast reassociate |
| 71 | */ |
| 72 | enum vdev_assoc_type { |
| 73 | VDEV_ASSOC, |
| 74 | VDEV_REASSOC, |
| 75 | VDEV_FT_REASSOC |
| 76 | }; |
| 77 | |
| 78 | /** |
Yeshwanth Sriram Guntuka | ea2fb37 | 2019-08-28 12:21:16 +0530 | [diff] [blame] | 79 | * wlan_mlme_roam_state_info - Structure containing roaming |
| 80 | * state related details |
| 81 | * @state: Roaming module state. |
| 82 | * @mlme_operations_bitmap: Bitmap containing what mlme operations are in |
| 83 | * progress where roaming should not be allowed. |
| 84 | */ |
| 85 | struct wlan_mlme_roam_state_info { |
| 86 | enum roam_offload_state state; |
| 87 | uint8_t mlme_operations_bitmap; |
| 88 | }; |
| 89 | |
| 90 | /** |
| 91 | * struct wlan_mlme_roaming_config - Roaming configurations structure |
| 92 | * @roam_trigger_bitmap: Master bitmap of roaming triggers. If the bitmap is |
| 93 | * zero, roaming module will be deinitialized at firmware for this vdev. |
| 94 | * @supplicant_disabled_roaming: Enable/disable roam scan in firmware; will be |
| 95 | * used by supplicant to do roam invoke after disabling roam scan in firmware |
| 96 | */ |
| 97 | struct wlan_mlme_roaming_config { |
| 98 | uint32_t roam_trigger_bitmap; |
| 99 | bool supplicant_disabled_roaming; |
| 100 | }; |
| 101 | |
| 102 | /** |
| 103 | * struct wlan_mlme_roam - Roam structure containing roam state and |
| 104 | * roam config info |
| 105 | * @roam_sm: Structure containing roaming state related details |
| 106 | * @roam_config: Roaming configurations structure |
| 107 | */ |
| 108 | struct wlan_mlme_roam { |
| 109 | struct wlan_mlme_roam_state_info roam_sm; |
| 110 | struct wlan_mlme_roaming_config roam_cfg; |
| 111 | }; |
| 112 | |
| 113 | /** |
gaurank kathpalia | 24ed0f4 | 2018-11-13 15:37:49 +0530 | [diff] [blame] | 114 | * struct mlme_legacy_priv - VDEV MLME legacy priv object |
| 115 | * @chan_switch_in_progress: flag to indicate that channel switch is in progress |
| 116 | * @hidden_ssid_restart_in_progress: flag to indicate hidden ssid restart is |
| 117 | * in progress |
| 118 | * @vdev_start_failed: flag to indicate that vdev start failed. |
| 119 | * @connection_fail: flag to indicate connection failed |
Abhishek Singh | 06522c5 | 2019-05-08 12:13:42 +0530 | [diff] [blame] | 120 | * @cac_required_for_new_channel: if CAC is required for new channel |
Paul Zhang | d34b575 | 2019-10-09 11:22:32 +0800 | [diff] [blame] | 121 | * @follow_ap_edca: if true, it is forced to follow the AP's edca. |
gaurank kathpalia | 24ed0f4 | 2018-11-13 15:37:49 +0530 | [diff] [blame] | 122 | * @assoc_type: vdev associate/reassociate type |
| 123 | * @dynamic_cfg: current configuration of nss, chains for vdev. |
| 124 | * @ini_cfg: Max configuration of nss, chains supported for vdev. |
Bala Venkatesh | accb9ddb | 2019-04-04 17:41:58 +0530 | [diff] [blame] | 125 | * @sta_dynamic_oce_value: Dyanmic oce flags value for sta |
gaurank kathpalia | 7ef7218 | 2019-05-29 19:41:25 +0530 | [diff] [blame] | 126 | * @roam_invoke_params: Roam invoke params |
Srinivas Dasari | 37e3731 | 2019-06-30 23:50:24 +0530 | [diff] [blame] | 127 | * @self_disconnect_ies: Disconnect IEs to be sent in deauth/disassoc frames |
| 128 | * originated from driver |
Srinivas Dasari | d4e8725 | 2019-07-01 15:35:52 +0530 | [diff] [blame] | 129 | * @peer_disconnect_ies: Disconnect IEs received in deauth/disassoc frames |
| 130 | * from peer |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 131 | * @vdev_stop_type: vdev stop type request |
Yeshwanth Sriram Guntuka | ea2fb37 | 2019-08-28 12:21:16 +0530 | [diff] [blame] | 132 | * @roam_off_state: Roam offload state |
gaurank kathpalia | 24ed0f4 | 2018-11-13 15:37:49 +0530 | [diff] [blame] | 133 | */ |
| 134 | struct mlme_legacy_priv { |
| 135 | bool chan_switch_in_progress; |
| 136 | bool hidden_ssid_restart_in_progress; |
| 137 | bool vdev_start_failed; |
| 138 | bool connection_fail; |
Abhishek Singh | 06522c5 | 2019-05-08 12:13:42 +0530 | [diff] [blame] | 139 | bool cac_required_for_new_channel; |
Paul Zhang | d34b575 | 2019-10-09 11:22:32 +0800 | [diff] [blame] | 140 | bool follow_ap_edca; |
gaurank kathpalia | 24ed0f4 | 2018-11-13 15:37:49 +0530 | [diff] [blame] | 141 | enum vdev_assoc_type assoc_type; |
| 142 | struct wlan_mlme_nss_chains dynamic_cfg; |
| 143 | struct wlan_mlme_nss_chains ini_cfg; |
Bala Venkatesh | accb9ddb | 2019-04-04 17:41:58 +0530 | [diff] [blame] | 144 | uint8_t sta_dynamic_oce_value; |
gaurank kathpalia | 7ef7218 | 2019-05-29 19:41:25 +0530 | [diff] [blame] | 145 | struct mlme_roam_after_data_stall roam_invoke_params; |
Srinivas Dasari | 37e3731 | 2019-06-30 23:50:24 +0530 | [diff] [blame] | 146 | struct wlan_ies self_disconnect_ies; |
Srinivas Dasari | d4e8725 | 2019-07-01 15:35:52 +0530 | [diff] [blame] | 147 | struct wlan_ies peer_disconnect_ies; |
Abhishek Ambure | 968f151 | 2019-08-28 18:33:57 +0530 | [diff] [blame] | 148 | uint32_t vdev_stop_type; |
Yeshwanth Sriram Guntuka | ea2fb37 | 2019-08-28 12:21:16 +0530 | [diff] [blame] | 149 | struct wlan_mlme_roam mlme_roam; |
gaurank kathpalia | 24ed0f4 | 2018-11-13 15:37:49 +0530 | [diff] [blame] | 150 | }; |
| 151 | |
Abhishek Singh | f880a7d | 2019-04-29 14:51:11 +0530 | [diff] [blame] | 152 | #ifndef CRYPTO_SET_KEY_CONVERGED |
Sandeep Puligilla | c5609d5 | 2018-05-17 19:23:41 -0700 | [diff] [blame] | 153 | /** |
Abhishek Singh | 7c1c743 | 2019-04-04 12:11:57 +0530 | [diff] [blame] | 154 | * wlan_peer_set_unicast_cipher() - set unicast cipher |
| 155 | * @peer: PEER object |
| 156 | * @value: value to be set |
| 157 | * |
| 158 | * Return: void |
| 159 | */ |
| 160 | static inline |
| 161 | void wlan_peer_set_unicast_cipher(struct wlan_objmgr_peer *peer, uint32_t value) |
| 162 | { |
| 163 | struct peer_mlme_priv_obj *peer_priv; |
| 164 | |
| 165 | peer_priv = wlan_objmgr_peer_get_comp_private_obj(peer, |
| 166 | WLAN_UMAC_COMP_MLME); |
| 167 | if (!peer_priv) { |
Abhishek Ambure | ec00007 | 2019-05-03 12:38:42 +0530 | [diff] [blame] | 168 | mlme_legacy_err(" peer mlme component object is NULL"); |
Abhishek Singh | 7c1c743 | 2019-04-04 12:11:57 +0530 | [diff] [blame] | 169 | return; |
| 170 | } |
| 171 | peer_priv->ucast_key_cipher = value; |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * wlan_peer_get_unicast_cipher() - get unicast cipher |
| 176 | * @peer: PEER object |
| 177 | * |
| 178 | * Return: ucast_key_cipher value |
| 179 | */ |
| 180 | static inline |
| 181 | uint32_t wlan_peer_get_unicast_cipher(struct wlan_objmgr_peer *peer) |
| 182 | { |
| 183 | struct peer_mlme_priv_obj *peer_priv; |
| 184 | |
| 185 | peer_priv = wlan_objmgr_peer_get_comp_private_obj(peer, |
| 186 | WLAN_UMAC_COMP_MLME); |
| 187 | if (!peer_priv) { |
Abhishek Ambure | ec00007 | 2019-05-03 12:38:42 +0530 | [diff] [blame] | 188 | mlme_legacy_err("peer mlme component object is NULL"); |
Abhishek Singh | 7c1c743 | 2019-04-04 12:11:57 +0530 | [diff] [blame] | 189 | return 0; |
| 190 | } |
| 191 | |
| 192 | return peer_priv->ucast_key_cipher; |
| 193 | } |
Abhishek Singh | f880a7d | 2019-04-29 14:51:11 +0530 | [diff] [blame] | 194 | #endif |
Abhishek Singh | 7c1c743 | 2019-04-04 12:11:57 +0530 | [diff] [blame] | 195 | /** |
| 196 | * wma_get_peer_mic_len() - get mic hdr len and mic length for peer |
| 197 | * @psoc: psoc |
| 198 | * @pdev_id: pdev id for the peer |
| 199 | * @peer_mac: peer mac |
| 200 | * @mic_len: mic length for peer |
| 201 | * @mic_hdr_len: mic header length for peer |
| 202 | * |
| 203 | * Return: Success or Failure status |
| 204 | */ |
| 205 | QDF_STATUS mlme_get_peer_mic_len(struct wlan_objmgr_psoc *psoc, uint8_t pdev_id, |
| 206 | uint8_t *peer_mac, uint8_t *mic_len, |
| 207 | uint8_t *mic_hdr_len); |
| 208 | |
| 209 | /** |
| 210 | * mlme_peer_object_created_notification(): mlme peer create handler |
| 211 | * @peer: peer which is going to created by objmgr |
| 212 | * @arg: argument for vdev create handler |
| 213 | * |
| 214 | * Register this api with objmgr to detect peer is created |
| 215 | * |
| 216 | * Return: QDF_STATUS status in case of success else return error |
| 217 | */ |
| 218 | |
| 219 | QDF_STATUS |
| 220 | mlme_peer_object_created_notification(struct wlan_objmgr_peer *peer, |
| 221 | void *arg); |
| 222 | |
| 223 | /** |
| 224 | * mlme_peer_object_destroyed_notification(): mlme peer delete handler |
| 225 | * @peer: peer which is going to delete by objmgr |
| 226 | * @arg: argument for vdev delete handler |
| 227 | * |
| 228 | * Register this api with objmgr to detect peer is deleted |
| 229 | * |
| 230 | * Return: QDF_STATUS status in case of success else return error |
| 231 | */ |
| 232 | QDF_STATUS |
| 233 | mlme_peer_object_destroyed_notification(struct wlan_objmgr_peer *peer, |
| 234 | void *arg); |
| 235 | |
| 236 | /** |
Bala Venkatesh | accb9ddb | 2019-04-04 17:41:58 +0530 | [diff] [blame] | 237 | * mlme_get_dynamic_oce_flags(): mlme get dynamic oce flags |
| 238 | * @vdev: pointer to vdev object |
| 239 | * |
| 240 | * This api is used to get the dynamic oce flags pointer |
| 241 | * |
| 242 | * Return: QDF_STATUS status in case of success else return error |
| 243 | */ |
| 244 | uint8_t *mlme_get_dynamic_oce_flags(struct wlan_objmgr_vdev *vdev); |
| 245 | |
| 246 | /** |
gaurank kathpalia | 991e2fa | 2018-11-12 21:48:06 +0530 | [diff] [blame] | 247 | * mlme_get_dynamic_vdev_config() - get the vdev dynamic config params |
| 248 | * @vdev: vdev pointer |
| 249 | * |
| 250 | * Return: pointer to the dynamic vdev config structure |
| 251 | */ |
| 252 | struct wlan_mlme_nss_chains *mlme_get_dynamic_vdev_config( |
| 253 | struct wlan_objmgr_vdev *vdev); |
| 254 | |
| 255 | /** |
| 256 | * mlme_get_ini_vdev_config() - get the vdev ini config params |
| 257 | * @vdev: vdev pointer |
| 258 | * |
| 259 | * Return: pointer to the ini vdev config structure |
| 260 | */ |
| 261 | struct wlan_mlme_nss_chains *mlme_get_ini_vdev_config( |
| 262 | struct wlan_objmgr_vdev *vdev); |
| 263 | |
| 264 | /** |
gaurank kathpalia | 7ef7218 | 2019-05-29 19:41:25 +0530 | [diff] [blame] | 265 | * mlme_get_roam_invoke_params() - get the roam invoke params |
| 266 | * @vdev: vdev pointer |
| 267 | * |
| 268 | * Return: pointer to the vdev roam invoke config structure |
| 269 | */ |
| 270 | struct mlme_roam_after_data_stall * |
| 271 | mlme_get_roam_invoke_params(struct wlan_objmgr_vdev *vdev); |
| 272 | |
| 273 | /** |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 274 | * mlme_cfg_on_psoc_enable() - Populate MLME structure from CFG and INI |
| 275 | * @psoc: pointer to the psoc object |
| 276 | * |
| 277 | * Populate the MLME CFG structure from CFG and INI values using CFG APIs |
| 278 | * |
| 279 | * Return: QDF_STATUS |
| 280 | */ |
| 281 | QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc); |
| 282 | |
| 283 | /** |
Arun Kumar Khandavalli | a43590e | 2019-08-26 17:13:25 +0530 | [diff] [blame^] | 284 | * mlme_get_psoc_ext_obj() - Get MLME object from psoc |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 285 | * @psoc: pointer to the psoc object |
| 286 | * |
| 287 | * Get the MLME object pointer from the psoc |
| 288 | * |
| 289 | * Return: pointer to MLME object |
| 290 | */ |
Arun Kumar Khandavalli | a43590e | 2019-08-26 17:13:25 +0530 | [diff] [blame^] | 291 | #define mlme_get_psoc_ext_obj(psoc) \ |
| 292 | mlme_get_psoc_ext_obj_fl(psoc, __func__, __LINE__) |
| 293 | struct wlan_mlme_psoc_ext_obj *mlme_get_psoc_ext_obj_fl(struct wlan_objmgr_psoc |
| 294 | *psoc, |
| 295 | const char *func, |
| 296 | uint32_t line); |
Vignesh Viswanathan | 21c58cb | 2018-05-24 15:53:58 +0530 | [diff] [blame] | 297 | |
Manikandan Mohan | 2bd0977 | 2018-11-28 18:27:32 -0800 | [diff] [blame] | 298 | /** |
| 299 | * mlme_init_ibss_cfg() - Init IBSS config data structure with default CFG value |
| 300 | * @psoc: pointer to the psoc object |
| 301 | * @ibss_cfg: Pointer to IBSS cfg data structure to return values |
| 302 | * |
| 303 | * Return: QDF_STATUS |
| 304 | */ |
| 305 | QDF_STATUS mlme_init_ibss_cfg(struct wlan_objmgr_psoc *psoc, |
| 306 | struct wlan_mlme_ibss_cfg *ibss_cfg); |
| 307 | |
Srinivas Dasari | 37e3731 | 2019-06-30 23:50:24 +0530 | [diff] [blame] | 308 | /** |
| 309 | * mlme_set_self_disconnect_ies() - Set diconnect IEs configured from userspace |
| 310 | * @vdev: vdev pointer |
| 311 | * @ie: pointer for disconnect IEs |
| 312 | * |
| 313 | * Return: None |
| 314 | */ |
| 315 | void mlme_set_self_disconnect_ies(struct wlan_objmgr_vdev *vdev, |
| 316 | struct wlan_ies *ie); |
| 317 | |
| 318 | /** |
| 319 | * mlme_free_self_disconnect_ies() - Free the self diconnect IEs |
| 320 | * @vdev: vdev pointer |
| 321 | * |
| 322 | * Return: None |
| 323 | */ |
| 324 | void mlme_free_self_disconnect_ies(struct wlan_objmgr_vdev *vdev); |
Srinivas Dasari | e2ee094 | 2019-06-29 14:34:50 +0530 | [diff] [blame] | 325 | |
| 326 | /** |
| 327 | * mlme_get_self_disconnect_ies() - Get diconnect IEs from vdev object |
| 328 | * @vdev: vdev pointer |
| 329 | * |
| 330 | * Return: Returns a pointer to the self disconnect IEs present in vdev object |
| 331 | */ |
| 332 | struct wlan_ies *mlme_get_self_disconnect_ies(struct wlan_objmgr_vdev *vdev); |
Srinivas Dasari | d4e8725 | 2019-07-01 15:35:52 +0530 | [diff] [blame] | 333 | |
| 334 | /** |
| 335 | * mlme_set_peer_disconnect_ies() - Cache disconnect IEs received from peer |
| 336 | * @vdev: vdev pointer |
| 337 | * @ie: pointer for disconnect IEs |
| 338 | * |
| 339 | * Return: None |
| 340 | */ |
| 341 | void mlme_set_peer_disconnect_ies(struct wlan_objmgr_vdev *vdev, |
| 342 | struct wlan_ies *ie); |
| 343 | |
| 344 | /** |
| 345 | * mlme_free_peer_disconnect_ies() - Free the peer diconnect IEs |
| 346 | * @vdev: vdev pointer |
| 347 | * |
| 348 | * Return: None |
| 349 | */ |
| 350 | void mlme_free_peer_disconnect_ies(struct wlan_objmgr_vdev *vdev); |
| 351 | |
| 352 | /** |
Paul Zhang | d34b575 | 2019-10-09 11:22:32 +0800 | [diff] [blame] | 353 | * mlme_set_follow_ap_edca_flag() - Set follow ap's edca flag |
| 354 | * @vdev: vdev pointer |
| 355 | * @flag: carries if following ap's edca is true or not. |
| 356 | * |
| 357 | * Return: None |
| 358 | */ |
| 359 | void mlme_set_follow_ap_edca_flag(struct wlan_objmgr_vdev *vdev, bool flag); |
| 360 | |
| 361 | /** |
| 362 | * mlme_get_follow_ap_edca_flag() - Get follow ap's edca flag |
| 363 | * @vdev: vdev pointer |
| 364 | * |
| 365 | * Return: value of follow_ap_edca |
| 366 | */ |
| 367 | bool mlme_get_follow_ap_edca_flag(struct wlan_objmgr_vdev *vdev); |
| 368 | |
| 369 | /** |
Srinivas Dasari | d4e8725 | 2019-07-01 15:35:52 +0530 | [diff] [blame] | 370 | * mlme_get_peer_disconnect_ies() - Get diconnect IEs from vdev object |
| 371 | * @vdev: vdev pointer |
| 372 | * |
| 373 | * Return: Returns a pointer to the peer disconnect IEs present in vdev object |
| 374 | */ |
| 375 | struct wlan_ies *mlme_get_peer_disconnect_ies(struct wlan_objmgr_vdev *vdev); |
Srinivas Dasari | cc863f0 | 2019-09-05 17:18:48 +0530 | [diff] [blame] | 376 | |
| 377 | /** |
| 378 | * mlme_set_peer_pmf_status() - set pmf status of peer |
| 379 | * @peer: PEER object |
| 380 | * @is_pmf_enabled: Carries if PMF is enabled or not |
| 381 | * |
| 382 | * is_pmf_enabled will be set to true if PMF is enabled by peer |
| 383 | * |
| 384 | * Return: void |
| 385 | */ |
| 386 | void mlme_set_peer_pmf_status(struct wlan_objmgr_peer *peer, |
| 387 | bool is_pmf_enabled); |
| 388 | /** |
| 389 | * mlme_get_peer_pmf_status() - get if peer is of pmf capable |
| 390 | * @peer: PEER object |
| 391 | * |
| 392 | * Return: Value of is_pmf_enabled; True if PMF is enabled by peer |
| 393 | */ |
| 394 | bool mlme_get_peer_pmf_status(struct wlan_objmgr_peer *peer); |
Yeshwanth Sriram Guntuka | ea2fb37 | 2019-08-28 12:21:16 +0530 | [diff] [blame] | 395 | |
| 396 | #if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD) |
| 397 | /** |
| 398 | * mlme_get_supplicant_disabled_roaming() - Get supplicant disabled roaming |
| 399 | * value for a given vdev. |
| 400 | * @psoc: PSOC pointer |
| 401 | * @vdev_id: Vdev for which the supplicant disabled roaming value is being |
| 402 | * requested |
| 403 | * |
| 404 | * Return: True if supplicant disabled roaming else false |
| 405 | */ |
| 406 | bool |
| 407 | mlme_get_supplicant_disabled_roaming(struct wlan_objmgr_psoc *psoc, |
| 408 | uint8_t vdev_id); |
| 409 | |
| 410 | /** |
| 411 | * mlme_set_supplicant_disabled_roaming - Set the supplicant disabled |
| 412 | * roaming flag. |
| 413 | * @psoc: PSOC pointer |
| 414 | * @vdev_id: Vdev for which the supplicant disabled roaming needs to |
| 415 | * be set |
| 416 | * @val: value true is to disable RSO and false to enable RSO |
| 417 | * |
| 418 | * Return: None |
| 419 | */ |
| 420 | void mlme_set_supplicant_disabled_roaming(struct wlan_objmgr_psoc *psoc, |
| 421 | uint8_t vdev_id, bool val); |
| 422 | |
| 423 | /** |
| 424 | * mlme_get_roam_trigger_bitmap() - Get roaming trigger bitmap value for a given |
| 425 | * vdev. |
| 426 | * @psoc: PSOC pointer |
| 427 | * @vdev_id: Vdev for which the roam trigger bitmap is being requested |
| 428 | * |
| 429 | * Return: roaming trigger bitmap |
| 430 | */ |
| 431 | uint32_t |
| 432 | mlme_get_roam_trigger_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id); |
| 433 | |
| 434 | /** |
| 435 | * mlme_set_roam_trigger_bitmap() - Set the roaming trigger bitmap value for |
| 436 | * the given vdev. If the bitmap is zero then roaming is completely disabled |
| 437 | * on the vdev which means roam structure in firmware is not allocated and no |
| 438 | * RSO start/stop commands can be sent |
| 439 | * @psoc: PSOC pointer |
| 440 | * @vdev_id: Vdev for which the roam trigger bitmap is to be set |
| 441 | * @val: bitmap value to set |
| 442 | * |
| 443 | * Return: None |
| 444 | */ |
| 445 | void mlme_set_roam_trigger_bitmap(struct wlan_objmgr_psoc *psoc, |
| 446 | uint8_t vdev_id, uint32_t val); |
| 447 | |
| 448 | /** |
| 449 | * mlme_get_roam_state() - Get roam state from vdev object |
| 450 | * @psoc: psoc pointer |
| 451 | * @vdev_id: vdev id |
| 452 | * |
| 453 | * Return: Returns roam offload state |
| 454 | */ |
| 455 | enum roam_offload_state |
| 456 | mlme_get_roam_state(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id); |
| 457 | |
| 458 | /** |
| 459 | * mlme_set_roam_state() - Set roam state in vdev object |
| 460 | * @psoc: psoc pointer |
| 461 | * @vdev_id: vdev id |
| 462 | * @val: roam offload state |
| 463 | * |
| 464 | * Return: None |
| 465 | */ |
| 466 | void mlme_set_roam_state(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, |
| 467 | enum roam_offload_state val); |
| 468 | |
| 469 | /** |
| 470 | * mlme_get_operations_bitmap() - Get the mlme operations bitmap which |
| 471 | * contains the bitmap of mlme operations which have disabled roaming |
| 472 | * temporarily |
| 473 | * @psoc: PSOC pointer |
| 474 | * @vdev_id: vdev for which the mlme operation bitmap is requested |
| 475 | * |
| 476 | * Return: bitmap value |
| 477 | */ |
| 478 | uint8_t |
| 479 | mlme_get_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id); |
| 480 | |
| 481 | /** |
| 482 | * mlme_set_operations_bitmap() - Set the mlme operations bitmap which |
| 483 | * indicates what mlme operations are in progress |
| 484 | * @psoc: PSOC pointer |
| 485 | * @vdev_id: vdev for which the mlme operation bitmap is requested |
| 486 | * @reqs: RSO stop requestor |
| 487 | * @clear: clear bit if true else set bit |
| 488 | * |
| 489 | * Return: bitmap value |
| 490 | */ |
| 491 | void |
| 492 | mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, |
| 493 | enum roam_control_requestor reqs, bool clear); |
| 494 | |
| 495 | #define MLME_IS_ROAM_STATE_RSO_STARTED(psoc, vdev_id) \ |
| 496 | (mlme_get_roam_state(psoc, vdev_id) == ROAM_RSO_STARTED) |
| 497 | |
| 498 | #define MLME_IS_ROAM_STATE_DEINIT(psoc, vdev_id) \ |
| 499 | (mlme_get_roam_state(psoc, vdev_id) == ROAM_DEINIT) |
| 500 | |
| 501 | #define MLME_IS_ROAM_STATE_INIT(psoc, vdev_id) \ |
| 502 | (mlme_get_roam_state(psoc, vdev_id) == ROAM_INIT) |
| 503 | |
| 504 | #define MLME_IS_ROAM_STATE_STOPPED(psoc, vdev_id) \ |
| 505 | (mlme_get_roam_state(psoc, vdev_id) == ROAM_RSO_STOPPED) |
| 506 | |
| 507 | #define MLME_IS_ROAM_INITIALIZED(psoc, vdev_id) \ |
| 508 | (mlme_get_roam_state(psoc, vdev_id) >= ROAM_INIT) |
| 509 | #endif |
Srinivas Dasari | 1ec7452 | 2019-09-19 14:16:29 +0530 | [diff] [blame] | 510 | |
| 511 | /** |
| 512 | * mlme_reinit_control_config_lfr_params() - Reinitialize roam control config |
| 513 | * @psoc: PSOC pointer |
| 514 | * @lfr: Pointer of an lfr_cfg buffer to fill. |
| 515 | * |
| 516 | * Reinitialize/restore the param related control roam config lfr params with |
| 517 | * default values of corresponding ini params. |
| 518 | * |
| 519 | * Return: None |
| 520 | */ |
| 521 | void mlme_reinit_control_config_lfr_params(struct wlan_objmgr_psoc *psoc, |
| 522 | struct wlan_mlme_lfr_cfg *lfr); |
Sandeep Puligilla | c5609d5 | 2018-05-17 19:23:41 -0700 | [diff] [blame] | 523 | #endif |