Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | #if !defined(__SME_API_H) |
| 29 | #define __SME_API_H |
| 30 | |
| 31 | /** |
| 32 | * file smeApi.h |
| 33 | * |
| 34 | * brief prototype for SME APIs |
| 35 | */ |
| 36 | |
| 37 | /*-------------------------------------------------------------------------- |
| 38 | Include Files |
| 39 | ------------------------------------------------------------------------*/ |
| 40 | #include "csr_api.h" |
Anurag Chouhan | a37b5b7 | 2016-02-21 14:53:42 +0530 | [diff] [blame] | 41 | #include "qdf_lock.h" |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 42 | #include "qdf_types.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 43 | #include "sir_api.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 44 | #include "cds_regdomain.h" |
| 45 | #include "sme_internal.h" |
Krishna Kumaar Natarajan | 052c6e6 | 2015-09-28 15:32:55 -0700 | [diff] [blame] | 46 | #include "wma_tgt_cfg.h" |
Jeff Johnson | 6136fb9 | 2017-03-30 15:21:49 -0700 | [diff] [blame] | 47 | #include "wma_fips_public_structs.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 48 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 49 | #include "sme_rrm_internal.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 50 | #include "sir_types.h" |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 51 | #include "scheduler_api.h" |
Varun Reddy Yeturu | 35c07f9 | 2017-02-28 10:35:00 -0800 | [diff] [blame] | 52 | #include "wlan_serialization_legacy_api.h" |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 53 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 54 | /*-------------------------------------------------------------------------- |
| 55 | Preprocessor definitions and constants |
| 56 | ------------------------------------------------------------------------*/ |
| 57 | |
Jeff Johnson | 97fdfd0 | 2017-03-13 09:25:31 -0700 | [diff] [blame] | 58 | #define SME_SUMMARY_STATS (1 << eCsrSummaryStats) |
| 59 | #define SME_GLOBAL_CLASSA_STATS (1 << eCsrGlobalClassAStats) |
Jeff Johnson | 97fdfd0 | 2017-03-13 09:25:31 -0700 | [diff] [blame] | 60 | #define SME_GLOBAL_CLASSD_STATS (1 << eCsrGlobalClassDStats) |
Jeff Johnson | 97fdfd0 | 2017-03-13 09:25:31 -0700 | [diff] [blame] | 61 | #define SME_PER_CHAIN_RSSI_STATS (1 << csr_per_chain_rssi_stats) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 62 | |
Srinivas Girigowda | af487f6 | 2017-03-16 15:53:46 -0700 | [diff] [blame] | 63 | #define sme_log(level, args...) QDF_TRACE(QDF_MODULE_ID_SME, level, ## args) |
| 64 | #define sme_logfl(level, format, args...) sme_log(level, FL(format), ## args) |
| 65 | |
| 66 | #define sme_alert(format, args...) \ |
| 67 | sme_logfl(QDF_TRACE_LEVEL_FATAL, format, ## args) |
| 68 | #define sme_err(format, args...) \ |
| 69 | sme_logfl(QDF_TRACE_LEVEL_ERROR, format, ## args) |
| 70 | #define sme_warn(format, args...) \ |
| 71 | sme_logfl(QDF_TRACE_LEVEL_WARN, format, ## args) |
| 72 | #define sme_info(format, args...) \ |
| 73 | sme_logfl(QDF_TRACE_LEVEL_INFO, format, ## args) |
| 74 | #define sme_debug(format, args...) \ |
| 75 | sme_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args) |
| 76 | |
| 77 | #define SME_ENTER() sme_logfl(QDF_TRACE_LEVEL_DEBUG, "enter") |
| 78 | #define SME_EXIT() sme_logfl(QDF_TRACE_LEVEL_DEBUG, "exit") |
| 79 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 80 | #define SME_SESSION_ID_ANY 50 |
Wu Gao | a0230a6 | 2018-01-04 20:56:57 +0800 | [diff] [blame] | 81 | #define SME_SESSION_ID_BROADCAST 0xFF |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 82 | |
| 83 | #define SME_INVALID_COUNTRY_CODE "XX" |
Krunal Soni | bfd0549 | 2017-10-03 15:48:37 -0700 | [diff] [blame] | 84 | #define INVALID_ROAM_ID 0 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 85 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 86 | #define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \ |
| 87 | reg_info_1 &= 0xff00ffff; \ |
| 88 | reg_info_1 |= ((val & 0xff) << 16); \ |
| 89 | } while (0) |
| 90 | |
| 91 | #define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \ |
| 92 | reg_info_2 &= 0xffff00ff; \ |
| 93 | reg_info_2 |= ((val & 0xff) << 8); \ |
| 94 | } while (0) |
| 95 | |
Varun Reddy Yeturu | b43fda1 | 2015-09-10 18:16:21 -0700 | [diff] [blame] | 96 | #define SME_CONFIG_TO_ROAM_CONFIG 1 |
| 97 | #define ROAM_CONFIG_TO_SME_CONFIG 2 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 98 | |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 99 | #define NUM_OF_BANDS 2 |
Naveen Rawat | b56880c | 2016-12-13 17:56:03 -0800 | [diff] [blame] | 100 | |
| 101 | #define SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE (30*1000) |
| 102 | #define SME_CMD_TIMEOUT_VALUE (SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE + 1000) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 103 | /*-------------------------------------------------------------------------- |
| 104 | Type declarations |
| 105 | ------------------------------------------------------------------------*/ |
| 106 | typedef void (*hdd_ftm_msg_processor)(void *); |
| 107 | typedef struct _smeConfigParams { |
| 108 | tCsrConfigParam csrConfig; |
Krishna Kumaar Natarajan | f599c6e | 2015-11-03 11:44:03 -0800 | [diff] [blame] | 109 | struct rrm_config_param rrmConfig; |
Kapil Gupta | 4f0c0c1 | 2017-02-07 15:21:15 +0530 | [diff] [blame] | 110 | bool snr_monitor_enabled; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 111 | } tSmeConfigParams, *tpSmeConfigParams; |
| 112 | |
| 113 | #ifdef FEATURE_WLAN_TDLS |
| 114 | #define SME_TDLS_MAX_SUPP_CHANNELS 128 |
| 115 | #define SME_TDLS_MAX_SUPP_OPER_CLASSES 32 |
| 116 | |
| 117 | typedef struct _smeTdlsPeerCapParams { |
| 118 | uint8_t isPeerResponder; |
| 119 | uint8_t peerUapsdQueue; |
| 120 | uint8_t peerMaxSp; |
| 121 | uint8_t peerBuffStaSupport; |
| 122 | uint8_t peerOffChanSupport; |
| 123 | uint8_t peerCurrOperClass; |
| 124 | uint8_t selfCurrOperClass; |
| 125 | uint8_t peerChanLen; |
| 126 | uint8_t peerChan[SME_TDLS_MAX_SUPP_CHANNELS]; |
| 127 | uint8_t peerOperClassLen; |
| 128 | uint8_t peerOperClass[SME_TDLS_MAX_SUPP_OPER_CLASSES]; |
| 129 | uint8_t prefOffChanNum; |
| 130 | uint8_t prefOffChanBandwidth; |
| 131 | uint8_t opClassForPrefOffChan; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 132 | } tSmeTdlsPeerCapParams; |
| 133 | |
Kabilan Kannan | 421714b | 2015-11-23 04:44:59 -0800 | [diff] [blame] | 134 | /** |
| 135 | * eSmeTdlsPeerState - tdls peer state |
| 136 | * @eSME_TDLS_PEER_STATE_PEERING: tdls connection in progress |
| 137 | * @eSME_TDLS_PEER_STATE_CONNECTED: tdls peer is connected |
| 138 | * @eSME_TDLS_PEER_STATE_TEARDOWN: tdls peer is tear down |
| 139 | * @eSME_TDLS_PEER_ADD_MAC_ADDR: add peer mac into connection table |
| 140 | * @eSME_TDLS_PEER_REMOVE_MAC_ADDR: remove peer mac from connection table |
| 141 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 142 | typedef enum { |
| 143 | eSME_TDLS_PEER_STATE_PEERING, |
| 144 | eSME_TDLS_PEER_STATE_CONNECTED, |
Kabilan Kannan | 421714b | 2015-11-23 04:44:59 -0800 | [diff] [blame] | 145 | eSME_TDLS_PEER_STATE_TEARDOWN, |
| 146 | eSME_TDLS_PEER_ADD_MAC_ADDR, |
| 147 | eSME_TDLS_PEER_REMOVE_MAC_ADDR, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 148 | } eSmeTdlsPeerState; |
| 149 | |
| 150 | typedef struct _smeTdlsPeerStateParams { |
| 151 | uint32_t vdevId; |
| 152 | tSirMacAddr peerMacAddr; |
| 153 | uint32_t peerState; |
| 154 | tSmeTdlsPeerCapParams peerCap; |
| 155 | } tSmeTdlsPeerStateParams; |
| 156 | |
| 157 | #define ENABLE_CHANSWITCH 1 |
| 158 | #define DISABLE_CHANSWITCH 2 |
| 159 | #define BW_20_OFFSET_BIT 0 |
| 160 | #define BW_40_OFFSET_BIT 1 |
| 161 | #define BW_80_OFFSET_BIT 2 |
| 162 | #define BW_160_OFFSET_BIT 3 |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 163 | typedef struct sme_tdls_chan_switch_param_struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 164 | uint32_t vdev_id; |
| 165 | tSirMacAddr peer_mac_addr; |
| 166 | uint16_t tdls_off_ch_bw_offset;/* Target Off Channel Bandwidth offset */ |
| 167 | uint8_t tdls_off_channel; /* Target Off Channel */ |
| 168 | uint8_t tdls_off_ch_mode; /* TDLS Off Channel Mode */ |
| 169 | uint8_t is_responder; /* is peer responder or initiator */ |
Masti, Narayanraddi | c4a7ab8 | 2015-11-25 15:41:10 +0530 | [diff] [blame] | 170 | uint8_t opclass; /* tdls operating class */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 171 | } sme_tdls_chan_switch_params; |
| 172 | #endif /* FEATURE_WLAN_TDLS */ |
| 173 | |
| 174 | /* Thermal Mitigation*/ |
| 175 | typedef struct { |
| 176 | uint16_t smeMinTempThreshold; |
| 177 | uint16_t smeMaxTempThreshold; |
| 178 | } tSmeThermalLevelInfo; |
| 179 | |
| 180 | #define SME_MAX_THERMAL_LEVELS (4) |
Poddar, Siddarth | 8390502 | 2016-04-16 17:56:08 -0700 | [diff] [blame] | 181 | #define SME_MAX_THROTTLE_LEVELS (4) |
| 182 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 183 | typedef struct { |
| 184 | /* Array of thermal levels */ |
| 185 | tSmeThermalLevelInfo smeThermalLevels[SME_MAX_THERMAL_LEVELS]; |
| 186 | uint8_t smeThermalMgmtEnabled; |
| 187 | uint32_t smeThrottlePeriod; |
Poddar, Siddarth | 8390502 | 2016-04-16 17:56:08 -0700 | [diff] [blame] | 188 | uint8_t sme_throttle_duty_cycle_tbl[SME_MAX_THROTTLE_LEVELS]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 189 | } tSmeThermalParams; |
| 190 | |
| 191 | typedef enum { |
| 192 | SME_AC_BK = 0, |
| 193 | SME_AC_BE = 1, |
| 194 | SME_AC_VI = 2, |
| 195 | SME_AC_VO = 3 |
| 196 | } sme_ac_enum_type; |
| 197 | |
Abhishek Singh | 12be60f | 2017-08-11 13:52:42 +0530 | [diff] [blame] | 198 | /* |
| 199 | * Enumeration of the various TSPEC directions |
| 200 | * From 802.11e/WMM specifications |
| 201 | */ |
| 202 | enum sme_qos_wmm_dir_type { |
Naveen Rawat | d9dd4b3 | 2017-07-05 14:32:54 -0700 | [diff] [blame] | 203 | SME_QOS_WMM_TS_DIR_UPLINK = 0, |
| 204 | SME_QOS_WMM_TS_DIR_DOWNLINK = 1, |
| 205 | SME_QOS_WMM_TS_DIR_RESV = 2, /* Reserved */ |
| 206 | SME_QOS_WMM_TS_DIR_BOTH = 3, |
Abhishek Singh | 12be60f | 2017-08-11 13:52:42 +0530 | [diff] [blame] | 207 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 208 | |
Krishna Kumaar Natarajan | 53ca290 | 2015-12-04 14:01:46 -0800 | [diff] [blame] | 209 | /** |
| 210 | * struct sme_oem_capability - OEM capability to be exchanged between host |
| 211 | * and userspace |
| 212 | * @ftm_rr: FTM range report capability bit |
| 213 | * @lci_capability: LCI capability bit |
| 214 | * @reserved1: reserved |
| 215 | * @reserved2: reserved |
| 216 | */ |
| 217 | struct sme_oem_capability { |
| 218 | uint32_t ftm_rr:1; |
| 219 | uint32_t lci_capability:1; |
| 220 | uint32_t reserved1:30; |
| 221 | uint32_t reserved2; |
| 222 | }; |
| 223 | |
Manjeet Singh | a9cae43 | 2017-02-28 11:58:22 +0530 | [diff] [blame] | 224 | /** |
| 225 | * struct sme_5g_pref_params : 5G preference params to be read from ini |
| 226 | * @rssi_boost_threshold_5g: RSSI threshold above which 5 GHz is favored |
| 227 | * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted |
| 228 | * @max_rssi_boost_5g: Maximum boost that can be applied to 5GHz RSSI |
| 229 | * @rssi_penalize_threshold_5g: RSSI threshold below which 5G is not favored |
| 230 | * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalized |
| 231 | * @max_rssi_penalize_5g: Maximum penalty that can be applied to 5G RSSI |
| 232 | */ |
| 233 | struct sme_5g_band_pref_params { |
| 234 | int8_t rssi_boost_threshold_5g; |
| 235 | uint8_t rssi_boost_factor_5g; |
| 236 | uint8_t max_rssi_boost_5g; |
| 237 | int8_t rssi_penalize_threshold_5g; |
| 238 | uint8_t rssi_penalize_factor_5g; |
| 239 | uint8_t max_rssi_penalize_5g; |
| 240 | }; |
| 241 | |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 242 | /** |
| 243 | * struct sme_session_params: Session creation params passed by HDD layer |
| 244 | * @session_open_cb: callback to be registered with SME for opening the session |
| 245 | * @session_close_cb: callback to be registered with SME for closing the session |
| 246 | * @self_mac_addr: Self mac address |
| 247 | * @sme_session_id: SME session id |
| 248 | * @type_of_persona: person type |
| 249 | * @subtype_of_persona: sub type of persona |
| 250 | */ |
| 251 | struct sme_session_params { |
| 252 | csr_session_open_cb session_open_cb; |
| 253 | csr_session_close_cb session_close_cb; |
| 254 | csr_roam_completeCallback callback; |
| 255 | void *callback_ctx; |
| 256 | uint8_t *self_mac_addr; |
| 257 | uint8_t sme_session_id; |
| 258 | uint32_t type_of_persona; |
| 259 | uint32_t subtype_of_persona; |
| 260 | }; |
| 261 | |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 262 | #define MAX_CANDIDATE_INFO 10 |
| 263 | |
| 264 | /** |
| 265 | * struct bss_candidate_info - Candidate bss information |
| 266 | * |
| 267 | * @bssid : BSSID of candidate bss |
| 268 | * @status : status code for candidate bss |
| 269 | */ |
| 270 | struct bss_candidate_info { |
| 271 | struct qdf_mac_addr bssid; |
| 272 | uint32_t status; |
| 273 | }; |
| 274 | |
| 275 | /* |
| 276 | * MBO transition reason codes |
| 277 | */ |
| 278 | enum { |
| 279 | MBO_TRANSITION_REASON_UNSPECIFIED, |
| 280 | MBO_TRANSITION_REASON_EXCESSIVE_FRAME_LOSS_RATE, |
| 281 | MBO_TRANSITION_REASON_EXCESSIVE_DELAY_FOR_CURRENT_TRAFFIC, |
| 282 | MBO_TRANSITION_REASON_INSUFFICIENT_BANDWIDTH_FOR_CURRENT_TRAFFIC, |
| 283 | MBO_TRANSITION_REASON_LOAD_BALANCING, |
| 284 | MBO_TRANSITION_REASON_LOW_RSSI, |
| 285 | MBO_TRANSITION_REASON_RECEIVED_EXCESSIVE_RETRANSMISSIONS, |
| 286 | MBO_TRANSITION_REASON_HIGH_INTERFERENCE, |
| 287 | MBO_TRANSITION_REASON_GRAY_ZONE, |
| 288 | MBO_TRANSITION_REASON_TRANSITIONING_TO_PREMIUM_AP, |
| 289 | }; |
| 290 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 291 | /*------------------------------------------------------------------------- |
| 292 | Function declarations and documenation |
| 293 | ------------------------------------------------------------------------*/ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 294 | QDF_STATUS sme_open(tHalHandle hHal); |
| 295 | QDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2, |
Amar Singhal | a297bfa | 2015-10-15 15:07:29 -0700 | [diff] [blame] | 296 | enum country_src cc_src); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 297 | QDF_STATUS sme_close(tHalHandle hHal); |
| 298 | QDF_STATUS sme_start(tHalHandle hHal); |
| 299 | QDF_STATUS sme_stop(tHalHandle hHal, tHalStopType stopType); |
Krunal Soni | 8d184fa | 2017-11-20 21:52:05 -0800 | [diff] [blame] | 300 | /* |
| 301 | * sme_open_session() - Open a session for given persona |
| 302 | * |
| 303 | * This is a synchronous API. For any protocol stack related activity |
| 304 | * requires session to be opened. This API needs to be called to open |
| 305 | * the session in SME module. |
| 306 | * |
| 307 | * hal: The handle returned by mac_open. |
| 308 | * params: to initialize the session open params |
| 309 | * |
| 310 | * Return: |
| 311 | * QDF_STATUS_SUCCESS - session is opened. |
| 312 | * Other status means SME is failed to open the session. |
| 313 | */ |
| 314 | QDF_STATUS sme_open_session(tHalHandle hal, struct sme_session_params *params); |
| 315 | |
| 316 | /* |
| 317 | * sme_close_session() - Close a session for given persona |
| 318 | * |
| 319 | * This is a synchronous API. This API needs to be called to close the session |
| 320 | * in SME module before terminating the session completely. |
| 321 | * |
| 322 | * hal: The handle returned by mac_open. |
| 323 | * session_id: A previous opened session's ID. |
| 324 | * |
| 325 | * Return: |
| 326 | * QDF_STATUS_SUCCESS - session is closed. |
| 327 | * Other status means SME is failed to open the session. |
| 328 | */ |
| 329 | QDF_STATUS sme_close_session(tHalHandle hal, uint8_t sessionId); |
Peng Xu | f5d60c8 | 2015-10-02 17:17:03 -0700 | [diff] [blame] | 330 | void sme_set_curr_device_mode(tHalHandle hHal, |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 331 | enum QDF_OPMODE currDeviceMode); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 332 | QDF_STATUS sme_update_roam_params(tHalHandle hHal, uint8_t session_id, |
Srinivas Girigowda | 72f3039 | 2017-07-13 18:55:09 -0700 | [diff] [blame] | 333 | struct roam_ext_params *roam_params_src, int update_param); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 334 | QDF_STATUS sme_update_config(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 335 | tpSmeConfigParams pSmeConfigParams); |
| 336 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 337 | QDF_STATUS sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams); |
| 338 | QDF_STATUS sme_get_soft_ap_domain(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 339 | v_REGDOMAIN_t *domainIdSoftAp); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 340 | QDF_STATUS sme_hdd_ready_ind(tHalHandle hHal); |
Krunal Soni | a8270f5 | 2017-02-23 19:51:25 -0800 | [diff] [blame] | 341 | /** |
| 342 | * sme_ser_cmd_callback() - callback from serialization module |
| 343 | * @buf: serialization command buffer |
| 344 | * @reason: reason why serialization module has given this callback |
| 345 | * |
| 346 | * Serialization module will give callback to SME for why it triggered |
| 347 | * the callback |
| 348 | * |
| 349 | * Return: QDF_STATUS_SUCCESS |
| 350 | */ |
| 351 | QDF_STATUS sme_ser_cmd_callback(void *buf, |
| 352 | enum wlan_serialization_cb_reason reason); |
Rajeev Kumar | 8eaedf6 | 2017-01-21 11:03:13 -0800 | [diff] [blame] | 353 | QDF_STATUS sme_process_msg(tHalHandle hHal, struct scheduler_msg *pMsg); |
Krunal Soni | d32c6bc | 2016-10-18 18:00:21 -0700 | [diff] [blame] | 354 | QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg); |
Rajeev Kumar | 8eaedf6 | 2017-01-21 11:03:13 -0800 | [diff] [blame] | 355 | void sme_free_msg(tHalHandle hHal, struct scheduler_msg *pMsg); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 356 | QDF_STATUS sme_scan_get_result(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 357 | tCsrScanResultFilter *pFilter, |
| 358 | tScanResultHandle *phResult); |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 359 | QDF_STATUS sme_get_ap_channel_from_scan_cache( |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 360 | tCsrRoamProfile *profile, |
| 361 | tScanResultHandle *scan_cache, |
| 362 | uint8_t *ap_chnl_id); |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 363 | QDF_STATUS sme_get_ap_channel_from_scan(void *profile, |
| 364 | tScanResultHandle *scan_cache, |
| 365 | uint8_t *ap_chnl_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 366 | bool sme_store_joinreq_param(tHalHandle hal_handle, |
| 367 | tCsrRoamProfile *profile, |
| 368 | tScanResultHandle scan_cache, |
| 369 | uint32_t *roam_id, |
| 370 | uint32_t session_id); |
| 371 | bool sme_clear_joinreq_param(tHalHandle hal_handle, |
| 372 | uint32_t session_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 373 | QDF_STATUS sme_issue_stored_joinreq(tHalHandle hal_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 374 | uint32_t *roam_id, |
| 375 | uint32_t session_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 376 | QDF_STATUS sme_scan_flush_result(tHalHandle hHal); |
| 377 | QDF_STATUS sme_filter_scan_results(tHalHandle hHal, uint8_t sessionId); |
| 378 | QDF_STATUS sme_scan_flush_p2p_result(tHalHandle hHal, uint8_t sessionId); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 379 | tCsrScanResultInfo *sme_scan_result_get_first(tHalHandle, |
| 380 | tScanResultHandle hScanResult); |
| 381 | tCsrScanResultInfo *sme_scan_result_get_next(tHalHandle, |
| 382 | tScanResultHandle hScanResult); |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 383 | QDF_STATUS sme_scan_result_purge(tScanResultHandle hScanResult); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 384 | QDF_STATUS sme_scan_get_pmkid_candidate_list(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 385 | tPmkidCandidateInfo *pPmkidList, |
| 386 | uint32_t *pNumItems); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 387 | QDF_STATUS sme_roam_connect(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 388 | tCsrRoamProfile *pProfile, uint32_t *pRoamId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 389 | QDF_STATUS sme_roam_reassoc(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 390 | tCsrRoamProfile *pProfile, |
| 391 | tCsrRoamModifyProfileFields modProfileFields, |
| 392 | uint32_t *pRoamId, bool fForce); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 393 | QDF_STATUS sme_roam_connect_to_last_profile(tHalHandle hHal, uint8_t sessionId); |
| 394 | QDF_STATUS sme_roam_disconnect(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 395 | eCsrRoamDisconnectReason reason); |
Abhishek Singh | ca40803 | 2016-09-13 15:26:12 +0530 | [diff] [blame] | 396 | void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 397 | QDF_STATUS sme_roam_stop_bss(tHalHandle hHal, uint8_t sessionId); |
| 398 | QDF_STATUS sme_roam_get_associated_stas(tHalHandle hHal, uint8_t sessionId, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 399 | QDF_MODULE_ID modId, void *pUsrContext, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 400 | void *pfnSapEventCallback, |
| 401 | uint8_t *pAssocStasBuf); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 402 | QDF_STATUS sme_roam_disconnect_sta(tHalHandle hHal, uint8_t sessionId, |
Jeff Johnson | e6bf719 | 2017-11-07 15:16:09 -0800 | [diff] [blame] | 403 | struct csr_del_sta_params *p_del_sta_params); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 404 | QDF_STATUS sme_roam_deauth_sta(tHalHandle hHal, uint8_t sessionId, |
Jeff Johnson | e6bf719 | 2017-11-07 15:16:09 -0800 | [diff] [blame] | 405 | struct csr_del_sta_params *pDelStaParams); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 406 | QDF_STATUS sme_roam_get_connect_state(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 407 | eCsrConnectState *pState); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 408 | QDF_STATUS sme_roam_get_connect_profile(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 409 | tCsrRoamConnectedProfile *pProfile); |
Naveen Rawat | df0a7e7 | 2016-01-06 18:35:53 -0800 | [diff] [blame] | 410 | void sme_roam_free_connect_profile(tCsrRoamConnectedProfile *profile); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 411 | QDF_STATUS sme_roam_set_pmkid_cache(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 412 | tPmkidCacheInfo *pPMKIDCache, |
| 413 | uint32_t numItems, |
| 414 | bool update_entire_cache); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 415 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 416 | QDF_STATUS sme_roam_set_psk_pmk(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 417 | uint8_t *pPSK_PMK, size_t pmk_len); |
| 418 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 419 | QDF_STATUS sme_roam_get_security_req_ie(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 420 | uint32_t *pLen, uint8_t *pBuf, |
| 421 | eCsrSecurityType secType); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 422 | QDF_STATUS sme_roam_get_security_rsp_ie(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 423 | uint32_t *pLen, uint8_t *pBuf, |
| 424 | eCsrSecurityType secType); |
| 425 | uint32_t sme_roam_get_num_pmkid_cache(tHalHandle hHal, uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 426 | QDF_STATUS sme_roam_get_pmkid_cache(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 427 | uint32_t *pNum, |
| 428 | tPmkidCacheInfo *pPmkidCache); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 429 | QDF_STATUS sme_get_config_param(tHalHandle hHal, tSmeConfigParams *pParam); |
| 430 | QDF_STATUS sme_get_statistics(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 431 | eCsrStatsRequesterType requesterId, |
| 432 | uint32_t statsMask, tCsrStatsCallback callback, |
Naveen Rawat | d0ca441 | 2017-06-16 14:19:19 -0700 | [diff] [blame] | 433 | uint8_t staId, void *pContext, uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 434 | QDF_STATUS sme_get_rssi(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 435 | tCsrRssiCallback callback, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 436 | uint8_t staId, struct qdf_mac_addr bssId, int8_t lastRSSI, |
Jeff Johnson | 8bd2335 | 2017-09-26 11:39:24 -0700 | [diff] [blame] | 437 | void *pContext); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 438 | QDF_STATUS sme_get_snr(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 439 | tCsrSnrCallback callback, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 440 | uint8_t staId, struct qdf_mac_addr bssId, void *pContext); |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 441 | #ifdef FEATURE_WLAN_ESE |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 442 | QDF_STATUS sme_get_tsm_stats(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 443 | tCsrTsmStatsCallback callback, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 444 | uint8_t staId, struct qdf_mac_addr bssId, |
Jeff Johnson | 30f8455 | 2017-09-13 14:55:25 -0700 | [diff] [blame] | 445 | void *pContext, uint8_t tid); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 446 | QDF_STATUS sme_set_cckm_ie(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 447 | uint8_t sessionId, |
| 448 | uint8_t *pCckmIe, uint8_t cckmIeLen); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 449 | QDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 450 | const tCsrEseBeaconReq *pEseBcnReq); |
Srinivas Girigowda | 515a9ef | 2015-12-11 11:00:48 -0800 | [diff] [blame] | 451 | QDF_STATUS sme_set_plm_request(tHalHandle hHal, tpSirPlmReq pPlm); |
| 452 | #endif /*FEATURE_WLAN_ESE */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 453 | QDF_STATUS sme_cfg_set_int(tHalHandle hal, uint16_t cfg_id, uint32_t value); |
| 454 | QDF_STATUS sme_cfg_set_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 455 | uint32_t length); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 456 | QDF_STATUS sme_cfg_get_int(tHalHandle hal, uint16_t cfg_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 457 | uint32_t *cfg_value); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 458 | QDF_STATUS sme_cfg_get_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 459 | uint32_t *length); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 460 | QDF_STATUS sme_get_modify_profile_fields(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 461 | tCsrRoamModifyProfileFields * |
| 462 | pModifyProfileFields); |
| 463 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 464 | extern QDF_STATUS sme_set_host_power_save(tHalHandle hHal, bool psMode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 465 | |
| 466 | void sme_set_dhcp_till_power_active_flag(tHalHandle hHal, uint8_t flag); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 467 | extern QDF_STATUS sme_register11d_scan_done_callback(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 468 | csr_scan_completeCallback); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 469 | void sme_deregister11d_scan_done_callback(tHalHandle hHal); |
| 470 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 471 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 472 | extern QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle h_hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 473 | sme_send_oem_data_rsp_msg callback); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 474 | void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal); |
| 475 | |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 476 | #else |
Naveen Rawat | 910726a | 2017-03-06 11:42:51 -0800 | [diff] [blame] | 477 | static inline QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle hal, |
| 478 | void *callback) |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 479 | { |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 480 | return QDF_STATUS_SUCCESS; |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 481 | } |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 482 | static inline void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal) |
| 483 | { |
| 484 | } |
| 485 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 486 | #endif |
| 487 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 488 | extern QDF_STATUS sme_enter_wowl(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 489 | void (*enter_wowl_callback_routine)(void |
| 490 | *callbackContext, |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 491 | QDF_STATUS status), |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 492 | void *enter_wowl_callback_context, |
| 493 | #ifdef WLAN_WAKEUP_EVENTS |
| 494 | void (*wake_reason_ind_cb)(void *callbackContext, |
| 495 | tpSirWakeReasonInd |
| 496 | wake_reason_ind), |
| 497 | void *wake_reason_ind_cb_ctx, |
| 498 | #endif /* WLAN_WAKEUP_EVENTS */ |
| 499 | tpSirSmeWowlEnterParams wowl_enter_params, |
| 500 | uint8_t sessionId); |
| 501 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 502 | extern QDF_STATUS sme_exit_wowl(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 503 | tpSirSmeWowlExitParams wowl_exit_params); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 504 | QDF_STATUS sme_roam_set_key(tHalHandle, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 505 | tCsrRoamSetKey *pSetKey, uint32_t *pRoamId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 506 | QDF_STATUS sme_get_country_code(tHalHandle hHal, uint8_t *pBuf, uint8_t *pbLen); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 507 | |
| 508 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 509 | /* some support functions */ |
| 510 | bool sme_is11d_supported(tHalHandle hHal); |
| 511 | bool sme_is11h_supported(tHalHandle hHal); |
| 512 | bool sme_is_wmm_supported(tHalHandle hHal); |
| 513 | |
| 514 | typedef void (*tSmeChangeCountryCallback)(void *pContext); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 515 | QDF_STATUS sme_change_country_code(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 516 | tSmeChangeCountryCallback callback, |
| 517 | uint8_t *pCountry, |
| 518 | void *pContext, |
| 519 | void *p_cds_context, |
Srinivas Girigowda | 74a66d6 | 2017-06-21 23:28:25 -0700 | [diff] [blame] | 520 | bool countryFromUserSpace, |
| 521 | bool sendRegHint); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 522 | QDF_STATUS sme_generic_change_country_code(tHalHandle hHal, |
Amar Singhal | 7f1f3ec | 2015-10-13 17:14:08 -0700 | [diff] [blame] | 523 | uint8_t *pCountry); |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 524 | QDF_STATUS sme_tx_fail_monitor_start_stop_ind(tHalHandle hHal, |
| 525 | uint8_t tx_fail_count, |
| 526 | void *txFailIndCallback); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 527 | QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 528 | uint8_t device_mode, |
| 529 | uint8_t *macAddr, uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 530 | QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 531 | uint8_t device_mode, |
| 532 | uint8_t *macAddr, uint8_t sessionId); |
| 533 | void sme_set_cfg_privacy(tHalHandle hHal, tCsrRoamProfile *pProfile, |
| 534 | bool fPrivacy); |
| 535 | void sme_get_recovery_stats(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 536 | QDF_STATUS sme_neighbor_report_request(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 537 | tpRrmNeighborReq pRrmNeighborReq, |
| 538 | tpRrmNeighborRspCallbackInfo callbackInfo); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 539 | QDF_STATUS sme_get_wcnss_wlan_compiled_version(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 540 | tSirVersionType * pVersion); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 541 | QDF_STATUS sme_get_wcnss_wlan_reported_version(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 542 | tSirVersionType *pVersion); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 543 | QDF_STATUS sme_get_wcnss_software_version(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 544 | uint8_t *pVersion, uint32_t versionBufferSize); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 545 | QDF_STATUS sme_get_wcnss_hardware_version(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 546 | uint8_t *pVersion, uint32_t versionBufferSize); |
| 547 | #ifdef FEATURE_WLAN_WAPI |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 548 | QDF_STATUS sme_scan_get_bkid_candidate_list(tHalHandle hHal, uint32_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 549 | tBkidCandidateInfo * pBkidList, |
| 550 | uint32_t *pNumItems); |
| 551 | #endif /* FEATURE_WLAN_WAPI */ |
| 552 | #ifdef FEATURE_OEM_DATA_SUPPORT |
Krishna Kumaar Natarajan | c1fa17d | 2016-08-03 14:19:20 -0700 | [diff] [blame] | 553 | QDF_STATUS sme_oem_data_req(tHalHandle hHal, struct oem_data_req *); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 554 | QDF_STATUS sme_oem_update_capability(tHalHandle hHal, |
Krishna Kumaar Natarajan | 53ca290 | 2015-12-04 14:01:46 -0800 | [diff] [blame] | 555 | struct sme_oem_capability *cap); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 556 | QDF_STATUS sme_oem_get_capability(tHalHandle hHal, |
Krishna Kumaar Natarajan | 53ca290 | 2015-12-04 14:01:46 -0800 | [diff] [blame] | 557 | struct sme_oem_capability *cap); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 558 | #endif /*FEATURE_OEM_DATA_SUPPORT */ |
Archana Ramachandran | 2eb7a61 | 2017-03-23 22:58:42 -0700 | [diff] [blame] | 559 | QDF_STATUS sme_change_mcc_beacon_interval(uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 560 | QDF_STATUS sme_set_host_offload(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 561 | tpSirHostOffloadReq pRequest); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 562 | QDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 563 | tpSirKeepAliveReq pRequest); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 564 | QDF_STATUS sme_get_operation_channel(tHalHandle hHal, uint32_t *pChannel, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 565 | uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 566 | QDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 567 | uint16_t frameType, uint8_t *matchData, |
| 568 | uint16_t matchLen); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 569 | QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 570 | uint16_t frameType, uint8_t *matchData, |
| 571 | uint16_t matchLen); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 572 | QDF_STATUS sme_ConfigureAppsCpuWakeupState(tHalHandle hHal, bool isAppsAwake); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 573 | #ifdef WLAN_FEATURE_EXTWOW_SUPPORT |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 574 | QDF_STATUS sme_configure_ext_wow(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 575 | tpSirExtWoWParams wlanExtParams, |
| 576 | csr_readyToSuspendCallback callback, |
| 577 | void *callbackContext); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 578 | QDF_STATUS sme_configure_app_type1_params(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 579 | tpSirAppType1Params wlanAppType1Params); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 580 | QDF_STATUS sme_configure_app_type2_params(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 581 | tpSirAppType2Params wlanAppType2Params); |
| 582 | #endif |
| 583 | int8_t sme_get_infra_session_id(tHalHandle hHal); |
| 584 | uint8_t sme_get_infra_operation_channel(tHalHandle hHal, uint8_t sessionId); |
| 585 | uint8_t sme_get_concurrent_operation_channel(tHalHandle hHal); |
| 586 | #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH |
| 587 | uint16_t sme_check_concurrent_channel_overlap(tHalHandle hHal, uint16_t sap_ch, |
| 588 | eCsrPhyMode sapPhyMode, |
| 589 | uint8_t cc_switch_mode); |
| 590 | #endif |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 591 | QDF_STATUS sme_get_cfg_valid_channels(uint8_t *aValidChannels, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 592 | uint32_t *len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 593 | #ifdef WLAN_FEATURE_PACKET_FILTERING |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 594 | QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 595 | tpSirRcvFltMcAddrList pMulticastAddrs); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 596 | #endif /* WLAN_FEATURE_PACKET_FILTERING */ |
| 597 | bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 598 | QDF_STATUS sme_set_freq_band(tHalHandle hHal, uint8_t sessionId, |
Varun Reddy Yeturu | a48bc41 | 2017-11-17 15:33:35 -0800 | [diff] [blame] | 599 | enum band_info eBand); |
| 600 | QDF_STATUS sme_get_freq_band(tHalHandle hHal, enum band_info *pBand); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 601 | uint16_t sme_chn_to_freq(uint8_t chanNum); |
| 602 | bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel); |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 603 | QDF_STATUS sme_set_max_tx_power(tHalHandle hHal, struct qdf_mac_addr pBssid, |
| 604 | struct qdf_mac_addr pSelfMacAddress, int8_t dB); |
Varun Reddy Yeturu | a48bc41 | 2017-11-17 15:33:35 -0800 | [diff] [blame] | 605 | QDF_STATUS sme_set_max_tx_power_per_band(enum band_info band, int8_t db); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 606 | QDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 607 | struct qdf_mac_addr bssid, |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 608 | enum QDF_OPMODE dev_mode, int power); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 609 | QDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr); |
| 610 | QDF_STATUS sme_hide_ssid(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 611 | uint8_t ssidHidden); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 612 | QDF_STATUS sme_set_tm_level(tHalHandle hHal, uint16_t newTMLevel, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 613 | uint16_t tmMode); |
| 614 | void sme_feature_caps_exchange(tHalHandle hHal); |
| 615 | void sme_disable_feature_capablity(uint8_t feature_index); |
| 616 | void sme_reset_power_values_for5_g(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 617 | QDF_STATUS sme_update_roam_prefer5_g_hz(tHalHandle hHal, bool nRoamPrefer5GHz); |
| 618 | QDF_STATUS sme_set_roam_intra_band(tHalHandle hHal, const bool nRoamIntraBand); |
| 619 | QDF_STATUS sme_update_roam_scan_n_probes(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 620 | const uint8_t nProbes); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 621 | QDF_STATUS sme_update_roam_scan_home_away_time(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 622 | uint8_t sessionId, |
| 623 | const uint16_t nRoamScanHomeAwayTime, |
| 624 | const bool bSendOffloadCmd); |
| 625 | |
| 626 | bool sme_get_roam_intra_band(tHalHandle hHal); |
| 627 | uint8_t sme_get_roam_scan_n_probes(tHalHandle hHal); |
| 628 | uint16_t sme_get_roam_scan_home_away_time(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 629 | QDF_STATUS sme_update_roam_rssi_diff(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 630 | uint8_t RoamRssiDiff); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 631 | QDF_STATUS sme_update_fast_transition_enabled(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 632 | bool isFastTransitionEnabled); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 633 | QDF_STATUS sme_update_wes_mode(tHalHandle hHal, bool isWESModeEnabled, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 634 | uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 635 | QDF_STATUS sme_set_roam_scan_control(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 636 | bool roamScanControl); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 637 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 638 | QDF_STATUS sme_update_is_fast_roam_ini_feature_enabled(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 639 | uint8_t sessionId, |
| 640 | const bool |
| 641 | isFastRoamIniFeatureEnabled); |
Mukul Sharma | 69c44cd | 2016-09-12 18:33:57 +0530 | [diff] [blame] | 642 | |
| 643 | QDF_STATUS sme_config_fast_roaming(tHalHandle hal, uint8_t session_id, |
| 644 | const bool is_fast_roam_enabled); |
| 645 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 646 | QDF_STATUS sme_update_is_mawc_ini_feature_enabled(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 647 | const bool MAWCEnabled); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 648 | QDF_STATUS sme_stop_roaming(tHalHandle hHal, uint8_t sessionId, uint8_t reason); |
Abhishek Singh | d568647 | 2017-09-20 15:18:50 +0530 | [diff] [blame] | 649 | |
| 650 | /** |
| 651 | * sme_indicate_disconnect_inprogress() - Indicate to csr that disconnect is in |
| 652 | * progress |
| 653 | * @hal: The handle returned by mac_open |
| 654 | * @session_id: sessionId on which disconenct has started |
| 655 | * |
| 656 | * Return: void |
| 657 | */ |
| 658 | void sme_indicate_disconnect_inprogress(tHalHandle hal, uint8_t session_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 659 | QDF_STATUS sme_start_roaming(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 660 | uint8_t reason); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 661 | QDF_STATUS sme_update_enable_fast_roam_in_concurrency(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 662 | bool bFastRoamInConIniFeatureEnabled); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 663 | #ifdef FEATURE_WLAN_ESE |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 664 | QDF_STATUS sme_update_is_ese_feature_enabled(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 665 | const bool isEseIniFeatureEnabled); |
| 666 | #endif /* FEATURE_WLAN_ESE */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 667 | QDF_STATUS sme_update_config_fw_rssi_monitoring(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 668 | bool fEnableFwRssiMonitoring); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 669 | QDF_STATUS sme_set_roam_rescan_rssi_diff(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 670 | uint8_t sessionId, |
| 671 | const uint8_t nRoamRescanRssiDiff); |
| 672 | uint8_t sme_get_roam_rescan_rssi_diff(tHalHandle hHal); |
| 673 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 674 | QDF_STATUS sme_set_roam_opportunistic_scan_threshold_diff(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 675 | uint8_t sessionId, |
| 676 | const uint8_t nOpportunisticThresholdDiff); |
| 677 | uint8_t sme_get_roam_opportunistic_scan_threshold_diff(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 678 | QDF_STATUS sme_set_neighbor_lookup_rssi_threshold(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 679 | uint8_t sessionId, uint8_t neighborLookupRssiThreshold); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 680 | QDF_STATUS sme_set_delay_before_vdev_stop(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 681 | uint8_t sessionId, uint8_t delay_before_vdev_stop); |
| 682 | uint8_t sme_get_neighbor_lookup_rssi_threshold(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 683 | QDF_STATUS sme_set_neighbor_scan_refresh_period(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 684 | uint8_t sessionId, uint16_t neighborScanResultsRefreshPeriod); |
| 685 | uint16_t sme_get_neighbor_scan_refresh_period(tHalHandle hHal); |
| 686 | uint16_t sme_get_empty_scan_refresh_period(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 687 | QDF_STATUS sme_update_empty_scan_refresh_period(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 688 | uint8_t sessionId, uint16_t nEmptyScanRefreshPeriod); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 689 | QDF_STATUS sme_set_neighbor_scan_min_chan_time(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 690 | const uint16_t nNeighborScanMinChanTime, |
| 691 | uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 692 | QDF_STATUS sme_set_neighbor_scan_max_chan_time(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 693 | uint8_t sessionId, const uint16_t nNeighborScanMaxChanTime); |
| 694 | uint16_t sme_get_neighbor_scan_min_chan_time(tHalHandle hHal, |
| 695 | uint8_t sessionId); |
| 696 | uint32_t sme_get_neighbor_roam_state(tHalHandle hHal, uint8_t sessionId); |
| 697 | uint32_t sme_get_current_roam_state(tHalHandle hHal, uint8_t sessionId); |
| 698 | uint32_t sme_get_current_roam_sub_state(tHalHandle hHal, uint8_t sessionId); |
| 699 | uint32_t sme_get_lim_sme_state(tHalHandle hHal); |
| 700 | uint32_t sme_get_lim_mlm_state(tHalHandle hHal); |
| 701 | bool sme_is_lim_session_valid(tHalHandle hHal, uint8_t sessionId); |
| 702 | uint32_t sme_get_lim_sme_session_state(tHalHandle hHal, uint8_t sessionId); |
| 703 | uint32_t sme_get_lim_mlm_session_state(tHalHandle hHal, uint8_t sessionId); |
| 704 | uint16_t sme_get_neighbor_scan_max_chan_time(tHalHandle hHal, |
| 705 | uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 706 | QDF_STATUS sme_set_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 707 | const uint16_t nNeighborScanPeriod); |
| 708 | uint16_t sme_get_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId); |
Sridhar Selvaraj | 1b2330c | 2017-07-21 15:16:42 +0530 | [diff] [blame] | 709 | QDF_STATUS sme_set_neighbor_scan_min_period(tHalHandle h_hal, |
| 710 | uint8_t session_id, const uint16_t neighbor_scan_min_period); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 711 | QDF_STATUS sme_set_roam_bmiss_first_bcnt(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 712 | uint8_t sessionId, const uint8_t nRoamBmissFirstBcnt); |
| 713 | uint8_t sme_get_roam_bmiss_first_bcnt(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 714 | QDF_STATUS sme_set_roam_bmiss_final_bcnt(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 715 | const uint8_t nRoamBmissFinalBcnt); |
| 716 | uint8_t sme_get_roam_bmiss_final_bcnt(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 717 | QDF_STATUS sme_set_roam_beacon_rssi_weight(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 718 | const uint8_t nRoamBeaconRssiWeight); |
| 719 | uint8_t sme_get_roam_beacon_rssi_weight(tHalHandle hHal); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 720 | uint8_t sme_get_roam_rssi_diff(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 721 | QDF_STATUS sme_change_roam_scan_channel_list(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 722 | uint8_t *pChannelList, |
| 723 | uint8_t numChannels); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 724 | QDF_STATUS sme_set_ese_roam_scan_channel_list(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 725 | uint8_t sessionId, uint8_t *pChannelList, |
| 726 | uint8_t numChannels); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 727 | QDF_STATUS sme_get_roam_scan_channel_list(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 728 | uint8_t *pChannelList, uint8_t *pNumChannels, |
| 729 | uint8_t sessionId); |
| 730 | bool sme_get_is_ese_feature_enabled(tHalHandle hHal); |
| 731 | bool sme_get_wes_mode(tHalHandle hHal); |
| 732 | bool sme_get_roam_scan_control(tHalHandle hHal); |
| 733 | bool sme_get_is_lfr_feature_enabled(tHalHandle hHal); |
| 734 | bool sme_get_is_ft_feature_enabled(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 735 | QDF_STATUS sme_update_roam_scan_offload_enabled(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 736 | bool nRoamScanOffloadEnabled); |
Krishna Kumaar Natarajan | d0bbb3c | 2017-03-13 17:04:58 -0700 | [diff] [blame] | 737 | bool sme_is_feature_supported_by_fw(enum cap_bitmap feature); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 738 | |
| 739 | /* |
| 740 | * SME API to enable/disable WLAN driver initiated SSR |
| 741 | */ |
| 742 | void sme_update_enable_ssr(tHalHandle hHal, bool enableSSR); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 743 | QDF_STATUS sme_set_phy_mode(tHalHandle hHal, eCsrPhyMode phyMode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 744 | eCsrPhyMode sme_get_phy_mode(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 745 | QDF_STATUS sme_handoff_request(tHalHandle hHal, uint8_t sessionId, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 746 | tCsrHandoffRequest *pHandoffInfo); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 747 | QDF_STATUS sme_is_sta_p2p_client_connected(tHalHandle hHal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 748 | QDF_STATUS sme_add_periodic_tx_ptrn(tHalHandle hHal, tSirAddPeriodicTxPtrn |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 749 | *addPeriodicTxPtrnParams); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 750 | QDF_STATUS sme_del_periodic_tx_ptrn(tHalHandle hHal, tSirDelPeriodicTxPtrn |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 751 | *delPeriodicTxPtrnParams); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 752 | QDF_STATUS sme_send_rate_update_ind(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 753 | tSirRateUpdateInd *rateUpdateParams); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 754 | QDF_STATUS sme_roam_del_pmkid_from_cache(tHalHandle hHal, uint8_t sessionId, |
Sridhar Selvaraj | c3684c7 | 2017-08-21 14:32:47 +0530 | [diff] [blame] | 755 | tPmkidCacheInfo *pmksa, bool flush_cache); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 756 | void sme_get_command_q_status(tHalHandle hHal); |
| 757 | |
Rajeev Kumar | 8e3e283 | 2015-11-06 16:02:54 -0800 | [diff] [blame] | 758 | QDF_STATUS sme_enable_rmc(tHalHandle hHal, uint32_t sessionId); |
| 759 | QDF_STATUS sme_disable_rmc(tHalHandle hHal, uint32_t sessionId); |
| 760 | QDF_STATUS sme_send_rmc_action_period(tHalHandle hHal, uint32_t sessionId); |
| 761 | QDF_STATUS sme_request_ibss_peer_info(tHalHandle hHal, void *pUserData, |
| 762 | pIbssPeerInfoCb peerInfoCbk, bool allPeerInfoReqd, uint8_t staIdx); |
| 763 | QDF_STATUS sme_send_cesium_enable_ind(tHalHandle hHal, uint32_t sessionId); |
| 764 | |
Paul Zhang | 99fe884 | 2017-12-08 14:43:46 +0800 | [diff] [blame] | 765 | /** |
| 766 | * sme_set_wlm_latency_level_ind() - Used to set the latency level to fw |
| 767 | * @hal |
| 768 | * @session_id |
| 769 | * @latency_level |
| 770 | * |
| 771 | * Return QDF_STATUS |
| 772 | */ |
| 773 | QDF_STATUS sme_set_wlm_latency_level(tHalHandle hal, |
| 774 | uint16_t session_id, |
| 775 | uint16_t latency_level); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 776 | /* |
| 777 | * SME API to enable/disable idle mode powersave |
| 778 | * This should be called only if powersave offload |
| 779 | * is enabled |
| 780 | */ |
Arunk Khandavalli | 847969d | 2017-09-25 15:15:36 +0530 | [diff] [blame] | 781 | QDF_STATUS sme_set_idle_powersave_config(bool value); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 782 | QDF_STATUS sme_notify_modem_power_state(tHalHandle hHal, uint32_t value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 783 | |
| 784 | /*SME API to convert convert the ini value to the ENUM used in csr and MAC*/ |
| 785 | ePhyChanBondState sme_get_cb_phy_state_from_cb_ini_value(uint32_t cb_ini_value); |
| 786 | int sme_update_ht_config(tHalHandle hHal, uint8_t sessionId, uint16_t htCapab, |
| 787 | int value); |
| 788 | int16_t sme_get_ht_config(tHalHandle hHal, uint8_t session_id, |
| 789 | uint16_t ht_capab); |
| 790 | #ifdef QCA_HT_2040_COEX |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 791 | QDF_STATUS sme_notify_ht2040_mode(tHalHandle hHal, uint16_t staId, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 792 | struct qdf_mac_addr macAddrSTA, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 793 | uint8_t sessionId, |
| 794 | uint8_t channel_type); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 795 | QDF_STATUS sme_set_ht2040_mode(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 796 | uint8_t channel_type, bool obssEnabled); |
| 797 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 798 | QDF_STATUS sme_get_reg_info(tHalHandle hHal, uint8_t chanId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 799 | uint32_t *regInfo1, uint32_t *regInfo2); |
| 800 | #ifdef FEATURE_WLAN_TDLS |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 801 | QDF_STATUS sme_update_fw_tdls_state(tHalHandle hHal, void *psmeTdlsParams, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 802 | bool useSmeLock); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 803 | #endif /* FEATURE_WLAN_TDLS */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 804 | QDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 805 | #ifdef FEATURE_WLAN_AUTO_SHUTDOWN |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 806 | QDF_STATUS sme_set_auto_shutdown_cb(tHalHandle hHal, void (*pCallbackfn)(void)); |
| 807 | QDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 808 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 809 | QDF_STATUS sme_roam_channel_change_req(tHalHandle hHal, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 810 | struct qdf_mac_addr bssid, |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 811 | struct ch_params *ch_params, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 812 | tCsrRoamProfile *profile); |
| 813 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 814 | QDF_STATUS sme_roam_start_beacon_req(tHalHandle hHal, |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 815 | struct qdf_mac_addr bssid, uint8_t dfsCacWaitStatus); |
| 816 | QDF_STATUS sme_roam_csa_ie_request(tHalHandle hHal, struct qdf_mac_addr bssid, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 817 | uint8_t targetChannel, uint8_t csaIeReqd, |
Amar Singhal | 5cccafe | 2017-02-15 12:42:58 -0800 | [diff] [blame] | 818 | struct ch_params *ch_params); |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 819 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 820 | QDF_STATUS sme_init_thermal_info(tHalHandle hHal, |
Amar Singhal | e4f28ee | 2015-10-21 14:36:56 -0700 | [diff] [blame] | 821 | tSmeThermalParams thermalParam); |
| 822 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 823 | QDF_STATUS sme_set_thermal_level(tHalHandle hHal, uint8_t level); |
| 824 | QDF_STATUS sme_txpower_limit(tHalHandle hHal, tSirTxPowerLimit *psmetx); |
| 825 | QDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 826 | void *plsContext, |
| 827 | void (*pCallbackfn)(tSirLinkSpeedInfo *indParam, |
| 828 | void *pContext)); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 829 | QDF_STATUS sme_modify_add_ie(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 830 | tSirModifyIE *pModifyIE, eUpdateIEsType updateType); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 831 | QDF_STATUS sme_update_add_ie(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 832 | tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 833 | QDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value); |
Sreelakshmi Konamki | 39acb13 | 2015-12-16 13:06:22 +0530 | [diff] [blame] | 834 | const char *sme_request_type_to_string(const uint8_t request_type); |
Rajeev Kumar | 43e25b1 | 2016-04-15 16:26:36 -0700 | [diff] [blame] | 835 | const char *sme_scan_type_to_string(const uint8_t scan_type); |
| 836 | const char *sme_bss_type_to_string(const uint8_t bss_type); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 837 | QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 838 | bool disablefwd); |
jiad | bdefb25 | 2018-01-03 14:27:06 +0800 | [diff] [blame] | 839 | QDF_STATUS sme_get_channel_bonding_mode5_g(tHalHandle hHal, uint32_t *mode); |
| 840 | QDF_STATUS sme_get_channel_bonding_mode24_g(tHalHandle hHal, uint32_t *mode); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 841 | #ifdef WLAN_FEATURE_STATS_EXT |
| 842 | typedef struct sStatsExtRequestReq { |
| 843 | uint32_t request_data_len; |
| 844 | uint8_t *request_data; |
| 845 | } tStatsExtRequestReq, *tpStatsExtRequestReq; |
| 846 | typedef void (*StatsExtCallback)(void *, tStatsExtEvent *); |
| 847 | void sme_stats_ext_register_callback(tHalHandle hHal, |
| 848 | StatsExtCallback callback); |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 849 | /** |
| 850 | * sme_register_stats_ext2_callback() - Register stats ext2 register |
| 851 | * @hal_handle: hal handle for getting global mac struct |
| 852 | * @stats_ext2_cb: callback to be registered |
| 853 | * |
| 854 | * This function will register a callback for frame aggregation failure |
| 855 | * indications processing. |
| 856 | * |
| 857 | * Return: void |
| 858 | */ |
| 859 | void sme_stats_ext2_register_callback(tHalHandle hal_handle, |
| 860 | void (*stats_ext2_cb)(void *, struct sir_sme_rx_aggr_hole_ind *)); |
Krunal Soni | aadaa27 | 2017-10-04 16:42:55 -0700 | [diff] [blame] | 861 | /** |
| 862 | * sme_send_unit_test_cmd() - send unit test command to lower layer |
| 863 | * @session_id: sme session id to be filled while forming the command |
| 864 | * @module_id: module id given by user to be filled in the command |
| 865 | * @arg_count: number of argument count |
| 866 | * @arg: pointer to argument list |
| 867 | * |
| 868 | * This API exposed to HDD layer which takes the argument from user and sends |
| 869 | * down to lower layer for further processing |
| 870 | * |
| 871 | * Return: QDF_STATUS based on overall success |
| 872 | */ |
| 873 | QDF_STATUS sme_send_unit_test_cmd(uint32_t vdev_id, uint32_t module_id, |
| 874 | uint32_t arg_count, uint32_t *arg); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 875 | void sme_stats_ext_deregister_callback(tHalHandle hhal); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 876 | QDF_STATUS sme_stats_ext_request(uint8_t session_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 877 | tpStatsExtRequestReq input); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 878 | QDF_STATUS sme_stats_ext_event(tHalHandle hHal, void *pMsg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 879 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 880 | QDF_STATUS sme_update_dfs_scan_mode(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 881 | uint8_t sessionId, |
| 882 | uint8_t allowDFSChannelRoam); |
| 883 | uint8_t sme_get_dfs_scan_mode(tHalHandle hHal); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 884 | |
| 885 | #ifdef FEATURE_WLAN_EXTSCAN |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 886 | QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, uint8_t wifiBand, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 887 | uint32_t *aValidChannels, |
| 888 | uint8_t *pNumChannels); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 889 | QDF_STATUS sme_ext_scan_get_capabilities(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 890 | tSirGetExtScanCapabilitiesReqParams *pReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 891 | QDF_STATUS sme_ext_scan_start(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 892 | tSirWifiScanCmdReqParams *pStartCmd); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 893 | QDF_STATUS sme_ext_scan_stop(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 894 | tSirExtScanStopReqParams *pStopReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 895 | QDF_STATUS sme_set_bss_hotlist(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 896 | tSirExtScanSetBssidHotListReqParams * |
| 897 | pSetHotListReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 898 | QDF_STATUS sme_reset_bss_hotlist(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 899 | tSirExtScanResetBssidHotlistReqParams * |
| 900 | pResetReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 901 | QDF_STATUS sme_set_significant_change(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 902 | tSirExtScanSetSigChangeReqParams * |
| 903 | pSetSignificantChangeReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 904 | QDF_STATUS sme_reset_significant_change(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 905 | tSirExtScanResetSignificantChangeReqParams |
| 906 | *pResetReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 907 | QDF_STATUS sme_get_cached_results(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 908 | tSirExtScanGetCachedResultsReqParams * |
| 909 | pCachedResultsReq); |
| 910 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 911 | QDF_STATUS sme_set_epno_list(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 912 | struct wifi_epno_params *req_msg); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 913 | QDF_STATUS sme_set_passpoint_list(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 914 | struct wifi_passpoint_req *req_msg); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 915 | QDF_STATUS sme_reset_passpoint_list(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 916 | struct wifi_passpoint_req *req_msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 917 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 918 | QDF_STATUS sme_ext_scan_register_callback(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 919 | void (*pExtScanIndCb)(void *, const uint16_t, void *)); |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 920 | #else |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 921 | static inline QDF_STATUS sme_ext_scan_register_callback(tHalHandle hHal, |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 922 | void (*pExtScanIndCb)(void *, const uint16_t, void *)) |
| 923 | { |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 924 | return QDF_STATUS_SUCCESS; |
Prashanth Bhatta | 75fa9a1 | 2016-01-11 18:30:08 -0800 | [diff] [blame] | 925 | } |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 926 | #endif /* FEATURE_WLAN_EXTSCAN */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 927 | QDF_STATUS sme_abort_roam_scan(tHalHandle hHal, uint8_t sessionId); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 928 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 929 | QDF_STATUS sme_ll_stats_clear_req(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 930 | tSirLLStatsClearReq * pclearStatsReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 931 | QDF_STATUS sme_ll_stats_set_req(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 932 | tSirLLStatsSetReq *psetStatsReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 933 | QDF_STATUS sme_ll_stats_get_req(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 934 | tSirLLStatsGetReq *pgetStatsReq); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 935 | QDF_STATUS sme_set_link_layer_stats_ind_cb(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 936 | void (*callbackRoutine)(void *callbackCtx, |
| 937 | int indType, void *pRsp)); |
Zhang Qian | a6e9c10 | 2016-12-22 16:47:24 +0800 | [diff] [blame] | 938 | QDF_STATUS sme_set_link_layer_ext_cb(tHalHandle hal, |
| 939 | void (*ll_stats_ext_cb)(tHddHandle callback_ctx, |
| 940 | tSirLLStatsResults * rsp)); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 941 | QDF_STATUS sme_reset_link_layer_stats_ind_cb(tHalHandle hhal); |
Zhang Qian | 73c348a | 2017-03-13 16:15:55 +0800 | [diff] [blame] | 942 | QDF_STATUS sme_ll_stats_set_thresh(tHalHandle hal, |
| 943 | struct sir_ll_ext_stats_threshold *threshold); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 944 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
| 945 | |
Manikandan Mohan | 80dea79 | 2016-04-28 16:36:48 -0700 | [diff] [blame] | 946 | QDF_STATUS sme_set_wisa_params(tHalHandle hal, |
| 947 | struct sir_wisa_params *wisa_params); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 948 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 949 | QDF_STATUS sme_update_roam_offload_enabled(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 950 | bool nRoamOffloadEnabled); |
Deepak Dhamdhere | f2a7d8b | 2016-08-19 16:17:38 -0700 | [diff] [blame] | 951 | QDF_STATUS sme_update_roam_key_mgmt_offload_enabled(tHalHandle hal_ctx, |
| 952 | uint8_t session_id, |
| 953 | bool key_mgmt_offload_enabled, |
Deepak Dhamdhere | 828f189 | 2017-02-09 11:51:19 -0800 | [diff] [blame] | 954 | struct pmkid_mode_bits *pmkid_modes); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 955 | #endif |
| 956 | #ifdef WLAN_FEATURE_NAN |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 957 | QDF_STATUS sme_nan_event(tHalHandle hHal, void *pMsg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 958 | #endif /* WLAN_FEATURE_NAN */ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 959 | QDF_STATUS sme_get_link_status(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 960 | tCsrLinkStatusCallback callback, |
| 961 | void *pContext, uint8_t sessionId); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 962 | QDF_STATUS sme_get_temperature(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 963 | void *tempContext, |
| 964 | void (*pCallbackfn)(int temperature, |
| 965 | void *pContext)); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 966 | QDF_STATUS sme_set_scanning_mac_oui(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 967 | tSirScanMacOui *pScanMacOui); |
| 968 | |
| 969 | #ifdef IPA_OFFLOAD |
| 970 | /* --------------------------------------------------------------------------- |
| 971 | \fn sme_ipa_offload_enable_disable |
| 972 | \brief API to enable/disable IPA offload |
| 973 | \param hHal - The handle returned by macOpen. |
| 974 | \param sessionId - Session Identifier |
| 975 | \param pRequest - Pointer to the offload request. |
Deepak Dhamdhere | 0f076bd | 2016-06-02 11:29:21 -0700 | [diff] [blame] | 976 | \return QDF_STATUS |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 977 | ---------------------------------------------------------------------------*/ |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 978 | QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 979 | uint8_t session_id, |
| 980 | struct sir_ipa_offload_enable_disable *request); |
| 981 | #else |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 982 | static inline QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 983 | uint8_t session_id, |
| 984 | struct sir_ipa_offload_enable_disable *request) |
| 985 | { |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 986 | return QDF_STATUS_SUCCESS; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 987 | } |
| 988 | #endif /* IPA_OFFLOAD */ |
| 989 | |
| 990 | #ifdef DHCP_SERVER_OFFLOAD |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 991 | QDF_STATUS sme_set_dhcp_srv_offload(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 992 | tSirDhcpSrvOffloadInfo * pDhcpSrvInfo); |
| 993 | #endif /* DHCP_SERVER_OFFLOAD */ |
| 994 | #ifdef WLAN_FEATURE_GPIO_LED_FLASHING |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 995 | QDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 996 | uint32_t x0, uint32_t x1); |
| 997 | #endif |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 998 | QDF_STATUS sme_handle_dfs_chan_scan(tHalHandle hHal, uint8_t dfs_flag); |
| 999 | QDF_STATUS sme_set_mas(uint32_t val); |
| 1000 | QDF_STATUS sme_set_miracast(tHalHandle hal, uint8_t filter_type); |
| 1001 | QDF_STATUS sme_ext_change_channel(tHalHandle hHal, uint32_t channel, |
Abhishek Singh | 518323d | 2015-10-19 17:42:01 +0530 | [diff] [blame] | 1002 | uint8_t session_id); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1003 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1004 | QDF_STATUS sme_configure_modulated_dtim(tHalHandle hal, uint8_t session_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1005 | uint32_t modulated_dtim); |
| 1006 | |
Mukul Sharma | 6398b25 | 2017-05-01 17:58:12 +0530 | [diff] [blame] | 1007 | QDF_STATUS sme_override_listen_interval(tHalHandle h_hal, uint8_t session_id, |
| 1008 | uint32_t override_li); |
| 1009 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1010 | QDF_STATUS sme_configure_stats_avg_factor(tHalHandle hal, uint8_t session_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1011 | uint16_t stats_avg_factor); |
| 1012 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1013 | QDF_STATUS sme_configure_guard_time(tHalHandle hal, uint8_t session_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1014 | uint32_t guard_time); |
| 1015 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1016 | QDF_STATUS sme_wifi_start_logger(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1017 | struct sir_wifi_start_log start_log); |
| 1018 | |
| 1019 | bool sme_neighbor_middle_of_roaming(tHalHandle hHal, |
| 1020 | uint8_t sessionId); |
| 1021 | |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1022 | /** |
| 1023 | * sme_enable_uapsd_for_ac() - enable uapsd for access catagory request to WMA |
| 1024 | * @sta_id: station id |
| 1025 | * @ac: access catagory |
| 1026 | * @tid: tid value |
| 1027 | * @pri: user priority |
| 1028 | * @srvc_int: service interval |
| 1029 | * @sus_int: suspend interval |
| 1030 | * @dir: tspec direction |
| 1031 | * @psb: PSB value |
| 1032 | * @sessionId: session id |
| 1033 | * @delay_interval: delay interval |
| 1034 | * |
| 1035 | * Return: QDF status |
| 1036 | */ |
| 1037 | QDF_STATUS sme_enable_uapsd_for_ac(uint8_t sta_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1038 | sme_ac_enum_type ac, uint8_t tid, |
| 1039 | uint8_t pri, uint32_t srvc_int, |
| 1040 | uint32_t sus_int, |
Abhishek Singh | 12be60f | 2017-08-11 13:52:42 +0530 | [diff] [blame] | 1041 | enum sme_qos_wmm_dir_type dir, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1042 | uint8_t psb, uint32_t sessionId, |
| 1043 | uint32_t delay_interval); |
| 1044 | |
Jeff Johnson | a1e9261 | 2017-09-24 15:33:44 -0700 | [diff] [blame] | 1045 | /** |
| 1046 | * sme_disable_uapsd_for_ac() - disable uapsd access catagory request to WMA |
| 1047 | * @sta_id: station id |
| 1048 | * @ac: access catagory |
| 1049 | * @sessionId: session id |
| 1050 | * |
| 1051 | * Return: QDF status |
| 1052 | */ |
| 1053 | QDF_STATUS sme_disable_uapsd_for_ac(uint8_t sta_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1054 | sme_ac_enum_type ac, |
| 1055 | uint32_t sessionId); |
| 1056 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1057 | QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1058 | struct rssi_monitor_req *input); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1059 | QDF_STATUS sme_set_rssi_threshold_breached_cb(tHalHandle hal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1060 | void (*cb)(void *, struct rssi_breach_event *)); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 1061 | QDF_STATUS sme_reset_rssi_threshold_breached_cb(tHalHandle hal); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1062 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1063 | QDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal, |
Abhishek Singh | 7996eb7 | 2015-12-30 17:24:02 +0530 | [diff] [blame] | 1064 | sir_mgmt_frame_ind_callback callback); |
| 1065 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1066 | QDF_STATUS sme_update_nss(tHalHandle h_hal, uint8_t nss); |
Archana Ramachandran | 5041b25 | 2016-04-25 14:29:25 -0700 | [diff] [blame] | 1067 | void sme_update_user_configured_nss(tHalHandle hal, uint8_t nss); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1068 | |
| 1069 | bool sme_is_any_session_in_connected_state(tHalHandle h_hal); |
| 1070 | |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1071 | QDF_STATUS sme_pdev_set_pcl(struct policy_mgr_pcl_list msg); |
| 1072 | QDF_STATUS sme_pdev_set_hw_mode(struct policy_mgr_hw_mode msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1073 | void sme_register_hw_mode_trans_cb(tHalHandle hal, |
| 1074 | hw_mode_transition_cb callback); |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1075 | QDF_STATUS sme_nss_update_request(uint32_t vdev_id, |
| 1076 | uint8_t new_nss, policy_mgr_nss_update_cback cback, |
| 1077 | uint8_t next_action, struct wlan_objmgr_psoc *psoc, |
| 1078 | enum policy_mgr_conn_update_reason reason); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1079 | |
| 1080 | typedef void (*sme_peer_authorized_fp) (uint32_t vdev_id); |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1081 | QDF_STATUS sme_set_peer_authorized(uint8_t *peer_addr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1082 | sme_peer_authorized_fp auth_fp, |
| 1083 | uint32_t vdev_id); |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1084 | QDF_STATUS sme_soc_set_dual_mac_config(struct policy_mgr_dual_mac_config msg); |
Archana Ramachandran | d41c3ed | 2016-02-10 15:48:06 -0800 | [diff] [blame] | 1085 | QDF_STATUS sme_soc_set_antenna_mode(tHalHandle hal, |
| 1086 | struct sir_antenna_mode_param *msg); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1087 | |
| 1088 | void sme_set_scan_disable(tHalHandle h_hal, int value); |
| 1089 | void sme_setdef_dot11mode(tHalHandle hal); |
| 1090 | |
Amar Singhal | 7c1e898 | 2016-05-19 15:08:09 -0700 | [diff] [blame] | 1091 | QDF_STATUS sme_handle_set_fcc_channel(tHalHandle hHal, |
Amar Singhal | 83a047a | 2016-05-19 15:56:11 -0700 | [diff] [blame] | 1092 | bool fcc_constraint, |
| 1093 | bool scan_pending); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1094 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1095 | QDF_STATUS sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1096 | uint8_t session_id, |
| 1097 | uint32_t notify_id, |
| 1098 | int32_t val); |
| 1099 | |
| 1100 | void wlan_sap_enable_phy_error_logs(tHalHandle hal, bool enable_log); |
Agrawal Ashish | b141b09 | 2016-09-02 19:59:26 +0530 | [diff] [blame] | 1101 | #ifdef WLAN_FEATURE_DSRC |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1102 | void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p); |
| 1103 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1104 | QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1105 | ocb_callback callback, |
| 1106 | struct sir_ocb_config *config); |
| 1107 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1108 | QDF_STATUS sme_ocb_set_utc_time(tHalHandle hHal, struct sir_ocb_utc *utc); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1109 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1110 | QDF_STATUS sme_ocb_start_timing_advert(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1111 | struct sir_ocb_timing_advert *timing_advert); |
| 1112 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1113 | QDF_STATUS sme_ocb_stop_timing_advert(tHalHandle hHal, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1114 | struct sir_ocb_timing_advert *timing_advert); |
| 1115 | |
Naveen Rawat | b4d3762 | 2015-11-13 16:15:25 -0800 | [diff] [blame] | 1116 | int sme_ocb_gen_timing_advert_frame(tHalHandle hHal, tSirMacAddr self_addr, |
| 1117 | uint8_t **buf, uint32_t *timestamp_offset, |
| 1118 | uint32_t *time_value_offset); |
| 1119 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1120 | QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1121 | ocb_callback callback, |
| 1122 | struct sir_ocb_get_tsf_timer *request); |
| 1123 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1124 | QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1125 | ocb_callback callback, |
| 1126 | struct sir_dcc_get_stats *request); |
| 1127 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1128 | QDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1129 | uint32_t dcc_stats_bitmap); |
| 1130 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1131 | QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1132 | ocb_callback callback, |
| 1133 | struct sir_dcc_update_ndl *request); |
| 1134 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1135 | QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1136 | ocb_callback callback); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 1137 | QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal); |
| 1138 | |
Agrawal Ashish | b141b09 | 2016-09-02 19:59:26 +0530 | [diff] [blame] | 1139 | #else |
| 1140 | static inline void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p) |
| 1141 | { |
| 1142 | return; |
| 1143 | } |
| 1144 | |
| 1145 | static inline QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context, |
| 1146 | ocb_callback callback, |
| 1147 | struct sir_ocb_config *config) |
| 1148 | { |
| 1149 | return QDF_STATUS_SUCCESS; |
| 1150 | } |
| 1151 | |
| 1152 | static inline QDF_STATUS sme_ocb_set_utc_time(struct sir_ocb_utc *utc) |
| 1153 | { |
| 1154 | return QDF_STATUS_SUCCESS; |
| 1155 | } |
| 1156 | |
| 1157 | static inline QDF_STATUS sme_ocb_start_timing_advert( |
| 1158 | struct sir_ocb_timing_advert *timing_advert) |
| 1159 | { |
| 1160 | return QDF_STATUS_SUCCESS; |
| 1161 | } |
| 1162 | |
| 1163 | static inline QDF_STATUS sme_ocb_stop_timing_advert(struct sir_ocb_timing_advert |
| 1164 | *timing_advert) |
| 1165 | { |
| 1166 | return QDF_STATUS_SUCCESS; |
| 1167 | } |
| 1168 | |
| 1169 | static inline int sme_ocb_gen_timing_advert_frame(tHalHandle hHal, |
| 1170 | tSirMacAddr self_addr, uint8_t **buf, |
| 1171 | uint32_t *timestamp_offset, |
| 1172 | uint32_t *time_value_offset) |
| 1173 | { |
| 1174 | return 0; |
| 1175 | } |
| 1176 | |
| 1177 | static inline QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context, |
| 1178 | ocb_callback callback, |
| 1179 | struct sir_ocb_get_tsf_timer *request) |
| 1180 | { |
| 1181 | return QDF_STATUS_SUCCESS; |
| 1182 | } |
| 1183 | |
| 1184 | static inline QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context, |
| 1185 | ocb_callback callback, |
| 1186 | struct sir_dcc_get_stats *request) |
| 1187 | { |
| 1188 | return QDF_STATUS_SUCCESS; |
| 1189 | } |
| 1190 | |
| 1191 | static inline QDF_STATUS sme_dcc_clear_stats(uint32_t vdev_id, |
| 1192 | uint32_t dcc_stats_bitmap) |
| 1193 | { |
| 1194 | return QDF_STATUS_SUCCESS; |
| 1195 | } |
| 1196 | |
| 1197 | static inline QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context, |
| 1198 | ocb_callback callback, |
| 1199 | struct sir_dcc_update_ndl *request) |
| 1200 | { |
| 1201 | return QDF_STATUS_SUCCESS; |
| 1202 | } |
| 1203 | |
| 1204 | static inline QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, |
| 1205 | void *context, ocb_callback callback) |
| 1206 | { |
| 1207 | return QDF_STATUS_SUCCESS; |
| 1208 | } |
| 1209 | static inline QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal) |
| 1210 | { |
| 1211 | return QDF_STATUS_SUCCESS; |
| 1212 | } |
| 1213 | #endif |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1214 | void sme_add_set_thermal_level_callback(tHalHandle hal, |
| 1215 | sme_set_thermal_level_callback callback); |
| 1216 | |
Krishna Kumaar Natarajan | 052c6e6 | 2015-09-28 15:32:55 -0700 | [diff] [blame] | 1217 | void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg); |
Edhar, Mahesh Kumar | df2ec12 | 2015-11-16 11:33:16 +0530 | [diff] [blame] | 1218 | bool sme_validate_sap_channel_switch(tHalHandle hal, |
| 1219 | uint16_t sap_ch, eCsrPhyMode sap_phy_mode, |
| 1220 | uint8_t cc_switch_mode, uint8_t session_id); |
Masti, Narayanraddi | c4a7ab8 | 2015-11-25 15:41:10 +0530 | [diff] [blame] | 1221 | |
Chandrasekaran, Manishekar | 2859de4 | 2016-02-11 16:17:38 +0530 | [diff] [blame] | 1222 | bool sme_is_session_id_valid(tHalHandle hal, uint32_t session_id); |
| 1223 | |
Masti, Narayanraddi | c4a7ab8 | 2015-11-25 15:41:10 +0530 | [diff] [blame] | 1224 | #ifdef FEATURE_WLAN_TDLS |
| 1225 | void sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset, |
| 1226 | uint8_t *opclass); |
| 1227 | #else |
| 1228 | static inline void |
| 1229 | sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset, |
| 1230 | uint8_t *opclass) |
| 1231 | { |
| 1232 | } |
| 1233 | #endif |
| 1234 | |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 1235 | #ifdef FEATURE_LFR_SUBNET_DETECTION |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 1236 | QDF_STATUS sme_gateway_param_update(tHalHandle hHal, |
Ravi Joshi | 61c3c7a | 2015-11-09 18:41:20 -0800 | [diff] [blame] | 1237 | struct gateway_param_update_req *request); |
| 1238 | #endif |
| 1239 | |
Selvaraj, Sridhar | 57bb4d0 | 2016-08-31 16:14:15 +0530 | [diff] [blame] | 1240 | void sme_update_fine_time_measurement_capab(tHalHandle hal, uint8_t session_id, |
| 1241 | uint32_t val); |
Sandeep Puligilla | e087566 | 2016-02-12 16:09:21 -0800 | [diff] [blame] | 1242 | QDF_STATUS sme_ht40_stop_obss_scan(tHalHandle hHal, uint32_t vdev_id); |
Anurag Chouhan | bf5e0e2 | 2016-09-12 12:54:09 +0530 | [diff] [blame] | 1243 | QDF_STATUS sme_set_fw_test(struct set_fwtest_params *fw_test); |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 1244 | QDF_STATUS sme_set_tsfcb(tHalHandle hHal, |
| 1245 | int (*cb_fn)(void *cb_ctx, struct stsf *ptsf), void *cb_ctx); |
Krunal Soni | e353194 | 2016-04-12 17:43:53 -0700 | [diff] [blame] | 1246 | |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 1247 | QDF_STATUS sme_reset_tsfcb(tHalHandle h_hal); |
| 1248 | |
Manikandan Mohan | 976e756 | 2016-03-15 16:33:31 -0700 | [diff] [blame] | 1249 | #ifdef WLAN_FEATURE_TSF |
| 1250 | QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue); |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 1251 | QDF_STATUS sme_reset_tsf_gpio(tHalHandle h_hal); |
| 1252 | |
Manikandan Mohan | 976e756 | 2016-03-15 16:33:31 -0700 | [diff] [blame] | 1253 | #else |
| 1254 | static inline QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue) |
| 1255 | { |
| 1256 | return QDF_STATUS_E_FAILURE; |
| 1257 | } |
Arun Khandavalli | 4b55da7 | 2016-07-19 19:55:01 +0530 | [diff] [blame] | 1258 | static inline QDF_STATUS sme_reset_tsf_gpio(tHalHandle h_hal) |
| 1259 | { |
| 1260 | return QDF_STATUS_E_FAILURE; |
| 1261 | } |
| 1262 | |
Manikandan Mohan | 976e756 | 2016-03-15 16:33:31 -0700 | [diff] [blame] | 1263 | #endif |
| 1264 | |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 1265 | QDF_STATUS sme_update_mimo_power_save(tHalHandle hHal, |
| 1266 | uint8_t is_ht_smps_enabled, |
Archana Ramachandran | fec2481 | 2016-02-16 16:31:56 -0800 | [diff] [blame] | 1267 | uint8_t ht_smps_mode, |
| 1268 | bool send_smps_action); |
Archana Ramachandran | 20d2e23 | 2016-02-11 16:58:40 -0800 | [diff] [blame] | 1269 | |
| 1270 | bool sme_is_sta_smps_allowed(tHalHandle hHal, uint8_t session_id); |
Gupta, Kapil | 4cb1d7d | 2016-04-16 18:16:25 -0700 | [diff] [blame] | 1271 | QDF_STATUS sme_add_beacon_filter(tHalHandle hal, |
| 1272 | uint32_t session_id, uint32_t *ie_map); |
| 1273 | QDF_STATUS sme_remove_beacon_filter(tHalHandle hal, uint32_t session_id); |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 1274 | |
Jeff Johnson | a867e0c | 2017-01-26 13:43:51 -0800 | [diff] [blame] | 1275 | /** |
| 1276 | * sme_get_bpf_offload_capabilities() - Get BPF offload capabilities |
| 1277 | * @hal: Global HAL handle |
| 1278 | * @callback: Callback function to be called with the result |
| 1279 | * @context: Opaque context to be used by the caller to associate the |
| 1280 | * request with the response |
| 1281 | * |
| 1282 | * This function constructs the cds message and fill in message type, |
| 1283 | * post the same to WDA. |
| 1284 | * |
| 1285 | * Return: QDF_STATUS enumeration |
| 1286 | */ |
| 1287 | QDF_STATUS sme_get_bpf_offload_capabilities(tHalHandle hal, |
| 1288 | bpf_get_offload_cb callback, |
| 1289 | void *context); |
| 1290 | |
Arun Khandavalli | 2476ef5 | 2016-04-26 20:19:43 +0530 | [diff] [blame] | 1291 | QDF_STATUS sme_set_bpf_instructions(tHalHandle hal, |
| 1292 | struct sir_bpf_set_offload *); |
Abhishek Singh | 1c67622 | 2016-05-09 14:20:28 +0530 | [diff] [blame] | 1293 | uint32_t sme_get_wni_dot11_mode(tHalHandle hal); |
Manjunathappa Prakash | 59f861d | 2016-04-21 10:33:31 -0700 | [diff] [blame] | 1294 | QDF_STATUS sme_create_mon_session(tHalHandle hal_handle, uint8_t *bssid); |
Gupta, Kapil | 96c7f2f | 2016-04-25 19:13:41 +0530 | [diff] [blame] | 1295 | QDF_STATUS sme_set_adaptive_dwelltime_config(tHalHandle hal, |
| 1296 | struct adaptive_dwelltime_params *dwelltime_params); |
Naveen Rawat | a410c5a | 2016-09-19 14:22:33 -0700 | [diff] [blame] | 1297 | |
| 1298 | void sme_set_vdev_ies_per_band(tHalHandle hal, uint8_t vdev_id); |
Kiran Kumar Lokere | 666bf85 | 2016-05-02 12:23:02 -0700 | [diff] [blame] | 1299 | void sme_set_pdev_ht_vht_ies(tHalHandle hHal, bool enable2x2); |
| 1300 | |
| 1301 | void sme_update_vdev_type_nss(tHalHandle hal, uint8_t max_supp_nss, |
Varun Reddy Yeturu | a48bc41 | 2017-11-17 15:33:35 -0800 | [diff] [blame] | 1302 | uint32_t vdev_type_nss, enum band_info band); |
Nitesh Shah | db5ea0d | 2017-03-22 15:17:47 +0530 | [diff] [blame] | 1303 | void sme_update_hw_dbs_capable(tHalHandle hal, uint8_t hw_dbs_capable); |
Peng Xu | 8fdaa49 | 2016-06-22 10:20:47 -0700 | [diff] [blame] | 1304 | void sme_register_p2p_lo_event(tHalHandle hHal, void *context, |
| 1305 | p2p_lo_callback callback); |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 1306 | |
Abhishek Singh | c994160 | 2016-08-09 16:06:22 +0530 | [diff] [blame] | 1307 | QDF_STATUS sme_remove_bssid_from_scan_list(tHalHandle hal, |
| 1308 | tSirMacAddr bssid); |
| 1309 | |
Manjeet Singh | f82ed07 | 2016-07-08 11:40:00 +0530 | [diff] [blame] | 1310 | QDF_STATUS sme_process_mac_pwr_dbg_cmd(tHalHandle hal, uint32_t session_id, |
| 1311 | struct sir_mac_pwr_dbg_cmd* |
| 1312 | dbg_args); |
| 1313 | |
Jeff Johnson | c1e6278 | 2017-11-09 09:50:17 -0800 | [diff] [blame] | 1314 | void sme_get_vdev_type_nss(enum QDF_OPMODE dev_mode, |
| 1315 | uint8_t *nss_2g, uint8_t *nss_5g); |
Masti, Narayanraddi | ab712a7 | 2016-08-04 11:59:11 +0530 | [diff] [blame] | 1316 | QDF_STATUS sme_roam_set_default_key_index(tHalHandle hal, uint8_t session_id, |
| 1317 | uint8_t default_idx); |
Kondabattini, Ganesh | 3f2d02c | 2016-09-13 12:23:47 +0530 | [diff] [blame] | 1318 | void sme_send_disassoc_req_frame(tHalHandle hal, uint8_t session_id, uint8_t |
| 1319 | *peer_mac, uint16_t reason, uint8_t |
| 1320 | wait_for_ack); |
Kondabattini, Ganesh | e4f18e0 | 2016-09-13 13:01:22 +0530 | [diff] [blame] | 1321 | QDF_STATUS sme_update_access_policy_vendor_ie(tHalHandle hal, |
| 1322 | uint8_t session_id, uint8_t *vendor_ie, |
| 1323 | int access_policy); |
| 1324 | |
Krishna Kumaar Natarajan | f1581df | 2017-02-21 13:42:08 -0800 | [diff] [blame] | 1325 | /** |
| 1326 | * sme_set_peer_param() - set peer param |
| 1327 | * @vdev_id: vdev ID |
| 1328 | * @peer_addr: peer MAC address |
| 1329 | * @param_id: param ID to be updated |
| 1330 | * @param_Value: paraam value |
| 1331 | * |
| 1332 | * This SME API is used to send the peer param to WMA to be sent to FW. |
| 1333 | * |
| 1334 | * Return: QDF_STATUS |
| 1335 | */ |
| 1336 | QDF_STATUS sme_set_peer_param(uint8_t *peer_addr, uint32_t param_id, |
| 1337 | uint32_t param_value, uint32_t vdev_id); |
| 1338 | |
Agrawal Ashish | 21ba257 | 2016-09-03 16:40:10 +0530 | [diff] [blame] | 1339 | QDF_STATUS sme_update_sta_roam_policy(tHalHandle hal, |
| 1340 | enum sta_roam_policy_dfs_mode dfs_mode, |
| 1341 | bool skip_unsafe_channels, |
Agrawal, Ashish | 9f84c40 | 2016-11-30 16:19:44 +0530 | [diff] [blame] | 1342 | uint8_t session_id, uint8_t sap_operating_band); |
Selvaraj, Sridhar | ebda0f2 | 2016-08-29 16:05:23 +0530 | [diff] [blame] | 1343 | QDF_STATUS sme_enable_disable_chanavoidind_event(tHalHandle hal, |
| 1344 | uint8_t set_value); |
Deepak Dhamdhere | b106ae5 | 2016-08-10 20:55:30 +0530 | [diff] [blame] | 1345 | QDF_STATUS sme_set_default_scan_ie(tHalHandle hal, uint16_t session_id, |
| 1346 | uint8_t *ie_data, uint16_t ie_len); |
Selvaraj, Sridhar | 7231c5f | 2016-09-28 12:42:33 +0530 | [diff] [blame] | 1347 | /** |
| 1348 | * sme_update_session_param() - API to update PE session param |
| 1349 | * @hal: HAL handle for device |
| 1350 | * @session_id: Session ID |
| 1351 | * @param_type: Param type to be updated |
| 1352 | * @param_val: Param value to be update |
| 1353 | * |
| 1354 | * Note: this setting will not persist over reboots. |
| 1355 | * |
| 1356 | * Return: QDF_STATUS |
| 1357 | */ |
| 1358 | QDF_STATUS sme_update_session_param(tHalHandle hal, uint8_t session_id, |
| 1359 | uint32_t param_type, uint32_t param_val); |
Padma, Santhosh Kumar | d7cc079 | 2016-06-28 18:54:12 +0530 | [diff] [blame] | 1360 | |
Vignesh Viswanathan | 32761e4 | 2017-09-25 17:10:54 +0530 | [diff] [blame] | 1361 | /** |
| 1362 | * sme_update_fils_setting() - API to update PE FILS setting |
| 1363 | * @hal: HAL handle for device |
| 1364 | * @session_id: Session ID |
| 1365 | * @param_val: Param value to be update |
| 1366 | * |
| 1367 | * Return: QDF_STATUS |
| 1368 | */ |
| 1369 | QDF_STATUS sme_update_fils_setting(tHalHandle hal, uint8_t session_id, |
| 1370 | uint8_t param_val); |
Jeff Johnson | 6136fb9 | 2017-03-30 15:21:49 -0700 | [diff] [blame] | 1371 | #ifdef WLAN_FEATURE_FIPS |
| 1372 | /** |
| 1373 | * sme_fips_request() - Perform a FIPS certification operation |
| 1374 | * @hal: Hal handle for the object being certified |
| 1375 | * @param: The FIPS certification parameters |
| 1376 | * @callback: Callback function to invoke with the results |
| 1377 | * @context: Opaque context to pass back to caller in the callback |
| 1378 | * |
| 1379 | * Return: QDF_STATUS_SUCCESS if the request is successfully sent |
| 1380 | * to firmware for processing, otherwise an error status. |
| 1381 | */ |
| 1382 | QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param, |
| 1383 | wma_fips_cb callback, void *context); |
| 1384 | #else |
| 1385 | static inline |
| 1386 | QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param, |
| 1387 | wma_fips_cb callback, void *context) |
| 1388 | { |
| 1389 | return QDF_STATUS_E_NOSUPPORT; |
| 1390 | } |
| 1391 | #endif /* WLAN_FEATURE_FIPS */ |
| 1392 | |
Agrawal Ashish | b2d1a45 | 2016-05-05 12:23:58 +0530 | [diff] [blame] | 1393 | /** |
| 1394 | * sme_set_cts2self_for_p2p_go() - sme function to set ini parms to FW. |
| 1395 | * @hal: reference to the HAL |
| 1396 | * |
| 1397 | * Return: QDF_STATUS |
| 1398 | */ |
| 1399 | QDF_STATUS sme_set_cts2self_for_p2p_go(tHalHandle hal); |
Kiran Kumar Lokere | 1aa9c9a | 2016-10-05 18:50:59 -0700 | [diff] [blame] | 1400 | void sme_set_prefer_80MHz_over_160MHz(tHalHandle hal, |
| 1401 | bool sta_prefer_80MHz_over_160MHz); |
Agrawal, Ashish | 35b251d | 2016-09-08 19:21:03 +0530 | [diff] [blame] | 1402 | QDF_STATUS sme_update_tx_fail_cnt_threshold(tHalHandle hal_handle, |
| 1403 | uint8_t session_id, uint32_t tx_fail_count); |
Agrawal Ashish | da3e950 | 2016-09-21 17:43:51 +0530 | [diff] [blame] | 1404 | QDF_STATUS sme_update_short_retry_limit_threshold(tHalHandle hal_handle, |
| 1405 | struct sme_short_retry_limit *short_retry_limit_th); |
| 1406 | QDF_STATUS sme_update_long_retry_limit_threshold(tHalHandle hal_handle, |
| 1407 | struct sme_long_retry_limit *long_retry_limit_th); |
yeshwanth sriram guntuka | a1ba9a2 | 2017-02-28 16:17:32 +0530 | [diff] [blame] | 1408 | /** |
| 1409 | * sme_roam_is_ese_assoc() - Check if association type is ESE |
| 1410 | * @roam_info: Pointer to roam info |
| 1411 | * |
| 1412 | * Return: true if ESE Association, false otherwise. |
| 1413 | */ |
| 1414 | #ifdef FEATURE_WLAN_ESE |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 1415 | bool sme_roam_is_ese_assoc(struct csr_roam_info *roam_info); |
yeshwanth sriram guntuka | a1ba9a2 | 2017-02-28 16:17:32 +0530 | [diff] [blame] | 1416 | #else |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 1417 | static inline bool sme_roam_is_ese_assoc(struct csr_roam_info *roam_info) |
yeshwanth sriram guntuka | a1ba9a2 | 2017-02-28 16:17:32 +0530 | [diff] [blame] | 1418 | { |
| 1419 | return false; |
| 1420 | } |
| 1421 | #endif |
| 1422 | /** |
| 1423 | * sme_neighbor_roam_is11r_assoc() - Check if association type is 11R |
| 1424 | * @hal_ctx: HAL handle |
| 1425 | * @session_id: session id |
| 1426 | * |
| 1427 | * Return: true if 11r Association, false otherwise. |
| 1428 | */ |
| 1429 | bool sme_neighbor_roam_is11r_assoc(tHalHandle hal_ctx, uint8_t session_id); |
Agrawal, Ashish | 4e5fa1c | 2016-09-21 19:03:43 +0530 | [diff] [blame] | 1430 | |
| 1431 | /** |
| 1432 | * sme_update_sta_inactivity_timeout(): Update sta_inactivity_timeout to FW |
| 1433 | * @hal: Handle returned by mac_open |
| 1434 | * @sta_inactivity_timer: struct for sta inactivity timer |
| 1435 | * |
| 1436 | * If a station does not send anything in sta_inactivity_timeout seconds, an |
| 1437 | * empty data frame is sent to it in order to verify whether it is |
| 1438 | * still in range. If this frame is not ACKed, the station will be |
| 1439 | * disassociated and then deauthenticated. |
| 1440 | * |
| 1441 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 1442 | */ |
| 1443 | QDF_STATUS sme_update_sta_inactivity_timeout(tHalHandle hal_handle, |
| 1444 | struct sme_sta_inactivity_timeout *sta_inactivity_timer); |
| 1445 | |
Sreelakshmi Konamki | 58c7243 | 2016-11-09 17:06:44 +0530 | [diff] [blame] | 1446 | /** |
| 1447 | * sme_set_lost_link_info_cb() - plug in callback function for receiving |
| 1448 | * @hal: HAL handle |
| 1449 | * @cb: callback function |
| 1450 | * |
| 1451 | * Return: HAL status |
| 1452 | */ |
| 1453 | QDF_STATUS sme_set_lost_link_info_cb(tHalHandle hal, |
| 1454 | void (*cb)(void *, struct sir_lost_link_info *)); |
Yingying Tang | 9540997 | 2016-10-20 15:16:15 +0800 | [diff] [blame] | 1455 | |
Kapil Gupta | 8878ad9 | 2017-02-13 11:56:04 +0530 | [diff] [blame] | 1456 | /** |
| 1457 | * sme_update_new_channel_event() - update new channel event for sapFsm |
| 1458 | * @hal: HAL handle |
| 1459 | * @session_id: session id |
| 1460 | * |
| 1461 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 1462 | */ |
| 1463 | QDF_STATUS sme_update_new_channel_event(tHalHandle hal, uint8_t session_id); |
Sridhar Selvaraj | dc400d2 | 2016-10-18 17:18:03 +0530 | [diff] [blame] | 1464 | #ifdef WLAN_POWER_DEBUGFS |
| 1465 | QDF_STATUS sme_power_debug_stats_req(tHalHandle hal, void (*callback_fn) |
| 1466 | (struct power_stats_response *response, |
| 1467 | void *context), void *power_stats_context); |
| 1468 | #endif |
Kabilan Kannan | 3c0a735 | 2016-12-02 18:49:38 -0800 | [diff] [blame] | 1469 | /** |
| 1470 | * sme_set_sar_power_limits() - set sar limits |
| 1471 | * @hal: HAL handle |
| 1472 | * @sar_limit_cmd: struct to send sar limit cmd. |
| 1473 | * |
| 1474 | * Return: QDF_STATUS enumeration. |
| 1475 | */ |
| 1476 | QDF_STATUS sme_set_sar_power_limits(tHalHandle hal, |
| 1477 | struct sar_limit_cmd_params *sar_limit_cmd); |
Amar Singhal | 6edf973 | 2016-11-20 21:43:40 -0800 | [diff] [blame] | 1478 | void sme_set_cc_src(tHalHandle hal_handle, enum country_src); |
Yingying Tang | 9540997 | 2016-10-20 15:16:15 +0800 | [diff] [blame] | 1479 | |
| 1480 | |
| 1481 | #ifdef WLAN_FEATURE_WOW_PULSE |
| 1482 | QDF_STATUS sme_set_wow_pulse(struct wow_pulse_mode *wow_pulse_set_info); |
| 1483 | #endif |
| 1484 | |
Anurag Chouhan | 3920c0f | 2017-09-11 17:10:56 +0530 | [diff] [blame] | 1485 | /* ARP DEBUG STATS */ |
| 1486 | QDF_STATUS sme_set_nud_debug_stats(tHalHandle hal, |
| 1487 | struct set_arp_stats_params |
| 1488 | *set_stats_param); |
| 1489 | QDF_STATUS sme_get_nud_debug_stats(tHalHandle hal, |
| 1490 | struct get_arp_stats_params |
| 1491 | *get_stats_param); |
| 1492 | QDF_STATUS sme_set_nud_debug_stats_cb(tHalHandle hal, |
| 1493 | void (*cb)(void *, struct rsp_stats *)); |
| 1494 | |
Kapil Gupta | 4f0c0c1 | 2017-02-07 15:21:15 +0530 | [diff] [blame] | 1495 | /** |
| 1496 | * sme_set_chan_info_callback() - Register chan info callback |
| 1497 | * @hal - MAC global handle |
| 1498 | * @callback_routine - callback routine from HDD |
| 1499 | * |
| 1500 | * This API is invoked by HDD to register its callback to mac |
| 1501 | * |
| 1502 | * Return: QDF_STATUS |
| 1503 | */ |
| 1504 | void sme_set_chan_info_callback(tHalHandle hal_handle, |
| 1505 | void (*callback)(struct scan_chan_info *chan_info)); |
Naveen Rawat | 664a7cb | 2017-01-19 17:58:14 -0800 | [diff] [blame] | 1506 | |
| 1507 | /** |
Hanumanth Reddy Pothula | 9005178 | 2017-05-04 22:14:43 +0530 | [diff] [blame] | 1508 | * sme_get_rssi_snr_by_bssid() - gets the rssi and snr by bssid from scan cache |
| 1509 | * @hal: handle returned by mac_open |
| 1510 | * @profile: current connected profile |
| 1511 | * @bssid: bssid to look for in scan cache |
| 1512 | * @rssi: rssi value found |
| 1513 | * @snr: snr value found |
| 1514 | * |
| 1515 | * Return: QDF_STATUS |
| 1516 | */ |
| 1517 | QDF_STATUS sme_get_rssi_snr_by_bssid(tHalHandle hal, tCsrRoamProfile *profile, |
| 1518 | const uint8_t *bssid, int8_t *rssi, |
| 1519 | int8_t *snr); |
| 1520 | |
| 1521 | /** |
Naveen Rawat | 664a7cb | 2017-01-19 17:58:14 -0800 | [diff] [blame] | 1522 | * sme_get_beacon_frm() - gets the bss descriptor from scan cache and prepares |
| 1523 | * beacon frame |
| 1524 | * @hal: handle returned by mac_open |
| 1525 | * @profile: current connected profile |
| 1526 | * @bssid: bssid to look for in scan cache |
| 1527 | * @frame_buf: frame buffer to populate |
| 1528 | * @frame_len: length of constructed frame |
Selvaraj, Sridhar | 64b0a9c | 2017-05-11 16:50:15 +0530 | [diff] [blame] | 1529 | * @channel: Pointer to channel info to be filled |
Naveen Rawat | 664a7cb | 2017-01-19 17:58:14 -0800 | [diff] [blame] | 1530 | * |
| 1531 | * Return: QDF_STATUS |
| 1532 | */ |
| 1533 | QDF_STATUS sme_get_beacon_frm(tHalHandle hal, tCsrRoamProfile *profile, |
| 1534 | const tSirMacAddr bssid, |
Selvaraj, Sridhar | 64b0a9c | 2017-05-11 16:50:15 +0530 | [diff] [blame] | 1535 | uint8_t **frame_buf, uint32_t *frame_len, |
| 1536 | int *channel); |
Paul Zhang | c3fc0a8 | 2018-01-09 16:38:20 +0800 | [diff] [blame] | 1537 | |
| 1538 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Naveen Rawat | 4195c5e | 2017-05-22 17:07:45 -0700 | [diff] [blame] | 1539 | /** |
| 1540 | * sme_fast_reassoc() - invokes FAST REASSOC command |
| 1541 | * @hal: handle returned by mac_open |
| 1542 | * @profile: current connected profile |
| 1543 | * @bssid: bssid to look for in scan cache |
| 1544 | * @channel: channel on which reassoc should be send |
| 1545 | * @vdev_id: vdev id |
Krunal Soni | 332f4af | 2017-06-01 14:36:17 -0700 | [diff] [blame] | 1546 | * @connected_bssid: bssid of currently connected profile |
Naveen Rawat | 4195c5e | 2017-05-22 17:07:45 -0700 | [diff] [blame] | 1547 | * |
| 1548 | * Return: QDF_STATUS |
| 1549 | */ |
| 1550 | QDF_STATUS sme_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile, |
| 1551 | const tSirMacAddr bssid, int channel, |
Krunal Soni | 332f4af | 2017-06-01 14:36:17 -0700 | [diff] [blame] | 1552 | uint8_t vdev_id, const tSirMacAddr connected_bssid); |
Paul Zhang | c3fc0a8 | 2018-01-09 16:38:20 +0800 | [diff] [blame] | 1553 | #endif |
Padma, Santhosh Kumar | 16dacfb | 2017-03-21 19:05:40 +0530 | [diff] [blame] | 1554 | /** |
| 1555 | * sme_congestion_register_callback(): registers congestion callback |
| 1556 | * @hal: handler for HAL |
| 1557 | * @congestion_cb: congestion callback |
| 1558 | * |
| 1559 | * Return: QDF_STATUS |
| 1560 | */ |
| 1561 | QDF_STATUS sme_congestion_register_callback(tHalHandle hal, |
| 1562 | void (*congestion_cb)(void *, uint32_t congestion, uint32_t vdev_id)); |
| 1563 | |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 1564 | /** |
Sreelakshmi Konamki | 88a2a41 | 2017-04-14 15:11:55 +0530 | [diff] [blame] | 1565 | * sme_rso_cmd_status_cb() - Set RSO cmd status callback |
| 1566 | * @hal: HAL Handle |
| 1567 | * @cb: HDD Callback to rso comman status read |
| 1568 | * |
| 1569 | * This function is used to save HDD RSO Command status callback in MAC |
| 1570 | * |
| 1571 | * Return: QDF_STATUS |
| 1572 | */ |
| 1573 | QDF_STATUS sme_rso_cmd_status_cb(tHalHandle hal, |
| 1574 | void (*cb)(void *, struct rso_cmd_status *)); |
| 1575 | |
| 1576 | /** |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 1577 | * sme_register_set_connection_info_cb() - Register connection |
| 1578 | * info callback |
| 1579 | * @hal - MAC global handle |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1580 | * @set_connection_info_cb - callback routine from HDD to set |
| 1581 | * connection info flag |
| 1582 | * @get_connection_info_cb - callback routine from HDD to get |
| 1583 | * connection info |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 1584 | * |
| 1585 | * This API is invoked by HDD to register its callback to mac |
| 1586 | * |
| 1587 | * Return: QDF_STATUS |
| 1588 | */ |
| 1589 | QDF_STATUS sme_register_set_connection_info_cb(tHalHandle hHal, |
Tushnim Bhattacharyya | 0c4ad2d | 2017-03-09 15:59:03 -0800 | [diff] [blame] | 1590 | bool (*set_connection_info_cb)(bool), |
| 1591 | bool (*get_connection_info_cb)(uint8_t *session_id, |
| 1592 | enum scan_reject_states *reason)); |
Tushnim Bhattacharyya | 9e81b4c | 2017-02-15 17:11:14 -0800 | [diff] [blame] | 1593 | |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 1594 | /** |
Nitesh Shah | f9a09ff | 2017-05-22 15:46:25 +0530 | [diff] [blame] | 1595 | * sme_set_dbs_scan_selection_config() - Update DBS scan selection |
| 1596 | * configuration |
| 1597 | * @hal: The handle returned by macOpen |
| 1598 | * @params: wmi_dbs_scan_sel_params config |
| 1599 | * |
| 1600 | * Return: QDF_STATUS if DBS scan selection update |
| 1601 | * configuration success else failure status |
| 1602 | */ |
| 1603 | QDF_STATUS sme_set_dbs_scan_selection_config(tHalHandle hal, |
| 1604 | struct wmi_dbs_scan_sel_params *params); |
| 1605 | |
| 1606 | /** |
Kiran Kumar Lokere | a3de226 | 2017-04-12 12:15:04 -0700 | [diff] [blame] | 1607 | * sme_store_pdev() - store pdev |
| 1608 | * @hal - MAC global handle |
| 1609 | * @pdev - pdev ptr |
| 1610 | * |
| 1611 | * Return: QDF_STATUS |
| 1612 | */ |
| 1613 | void sme_store_pdev(tHalHandle hal, struct wlan_objmgr_pdev *pdev); |
| 1614 | |
Sandeep Puligilla | f587adf | 2017-04-27 19:53:21 -0700 | [diff] [blame] | 1615 | /** |
| 1616 | * sme_ipa_uc_stat_request() - set ipa config parameters |
| 1617 | * @vdev_id: virtual device for the command |
| 1618 | * @param_id: parameter id |
| 1619 | * @param_val: parameter value |
| 1620 | * @req_cat: parameter category |
| 1621 | * |
| 1622 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 1623 | */ |
| 1624 | QDF_STATUS sme_ipa_uc_stat_request(tHalHandle hal, |
| 1625 | uint32_t vdev_id, uint32_t param_id, |
| 1626 | uint32_t param_val, uint32_t req_cat); |
lifeng | 6683166 | 2017-05-19 16:01:35 +0800 | [diff] [blame] | 1627 | |
| 1628 | /** |
| 1629 | * sme_set_reorder_timeout() - set reorder timeout value |
| 1630 | * including Voice,Video,Besteffort,Background parameters |
| 1631 | * @hal: hal handle for getting global mac struct |
| 1632 | * @reg: struct sir_set_rx_reorder_timeout_val |
| 1633 | * |
| 1634 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 1635 | */ |
| 1636 | QDF_STATUS sme_set_reorder_timeout(tHalHandle hal, |
| 1637 | struct sir_set_rx_reorder_timeout_val *req); |
| 1638 | |
| 1639 | /** |
| 1640 | * sme_set_rx_set_blocksize() - set blocksize value |
| 1641 | * including mac_addr and win_limit parameters |
| 1642 | * @hal: hal handle for getting global mac struct |
| 1643 | * @reg: struct sir_peer_set_rx_blocksize |
| 1644 | * |
| 1645 | * Return: QDF_STATUS_SUCCESS or non-zero on failure. |
| 1646 | */ |
| 1647 | |
| 1648 | QDF_STATUS sme_set_rx_set_blocksize(tHalHandle hal, |
| 1649 | struct sir_peer_set_rx_blocksize *req); |
| 1650 | |
Rajeev Kumar Sirasanagandla | 996e529 | 2016-11-22 21:20:33 +0530 | [diff] [blame] | 1651 | /** |
| 1652 | * sme_get_rcpi() - gets the rcpi value for peer mac addr |
| 1653 | * @hal: handle returned by mac_open |
| 1654 | * @rcpi: rcpi request containing peer mac addr, callback and related info |
| 1655 | * |
| 1656 | * This function posts the rcpi measurement request message to wma queue |
| 1657 | * |
| 1658 | * Return: QDF_STATUS |
| 1659 | */ |
| 1660 | QDF_STATUS sme_get_rcpi(tHalHandle hal, struct sme_rcpi_req *rcpi); |
| 1661 | |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 1662 | /* |
| 1663 | * sme_set_chip_pwr_save_fail_cb() - set chip power save failure callback |
| 1664 | * @hal: global hal handle |
| 1665 | * @cb: callback function pointer |
| 1666 | * |
| 1667 | * This function stores the chip power save failure callback function. |
| 1668 | * |
| 1669 | * Return: QDF_STATUS enumeration. |
| 1670 | */ |
| 1671 | |
| 1672 | QDF_STATUS sme_set_chip_pwr_save_fail_cb(tHalHandle hal, void (*cb)(void *, |
| 1673 | struct chip_pwr_save_fail_detected_params *)); |
Naveen Rawat | 247a868 | 2017-06-05 15:00:31 -0700 | [diff] [blame] | 1674 | /** |
| 1675 | * sme_cli_set_command() - SME wrapper API over WMA "set" command |
| 1676 | * processor cmd |
| 1677 | * @vdev_id: virtual device for the command |
| 1678 | * @param_id: parameter id |
| 1679 | * @sval: parameter value |
| 1680 | * @vpdev: parameter category |
| 1681 | * |
| 1682 | * Command handler for set operations |
| 1683 | * |
| 1684 | * Return: 0 on success, errno on failure |
| 1685 | */ |
| 1686 | int sme_cli_set_command(int vdev_id, int param_id, int sval, int vpdev); |
Ravi Kumar Bokka | 05c14e5 | 2017-03-27 14:48:23 +0530 | [diff] [blame] | 1687 | |
Vidyullatha Kanchanapally | be0ebb3 | 2017-03-23 14:36:21 +0530 | [diff] [blame] | 1688 | /** |
| 1689 | * sme_set_bt_activity_info_cb - set the callback handler for bt events |
| 1690 | * @hal: handle returned by mac_open |
| 1691 | * @cb: callback handler |
| 1692 | * |
| 1693 | * Return: QDF_STATUS |
| 1694 | */ |
| 1695 | QDF_STATUS sme_set_bt_activity_info_cb(tHalHandle hal, |
| 1696 | void (*cb)(void *, uint32_t profile_info)); |
| 1697 | |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 1698 | /** |
Ashish Kumar Dhanotiya | b28338c | 2017-07-21 20:12:34 +0530 | [diff] [blame] | 1699 | * sme_set_smps_cfg() - set SMPS config params |
| 1700 | * @vdev_id: virtual device for the command |
| 1701 | * @param_id: parameter id |
| 1702 | * @param_val: parameter value |
| 1703 | * |
| 1704 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 1705 | */ |
| 1706 | |
| 1707 | QDF_STATUS sme_set_smps_cfg(uint32_t vdev_id, uint32_t param_id, |
| 1708 | uint32_t param_val); |
Ashish Kumar Dhanotiya | 443d31f | 2017-10-13 12:41:19 +0530 | [diff] [blame] | 1709 | |
| 1710 | /** |
| 1711 | * sme_get_peer_stats() - sme api to post peer info request |
| 1712 | * @mac: mac handle |
| 1713 | * @req: peer info request struct send to wma |
| 1714 | * |
| 1715 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 1716 | */ |
| 1717 | |
| 1718 | QDF_STATUS sme_get_peer_stats(tpAniSirGlobal mac, |
| 1719 | struct sir_peer_info_req req); |
| 1720 | |
Ashish Kumar Dhanotiya | b28338c | 2017-07-21 20:12:34 +0530 | [diff] [blame] | 1721 | /** |
Will Huang | 558f808 | 2017-05-31 16:22:24 +0800 | [diff] [blame] | 1722 | * sme_get_peer_info() - sme api to get peer info |
| 1723 | * @hal: hal handle for getting global mac struct |
| 1724 | * @req: peer info request struct send to wma |
| 1725 | * @context: context of callback function |
| 1726 | * @callbackfn: hdd callback function when receive response |
| 1727 | * |
| 1728 | * This function will send WMA_GET_PEER_INFO to WMA |
| 1729 | * |
| 1730 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 1731 | */ |
| 1732 | QDF_STATUS sme_get_peer_info(tHalHandle hal, |
| 1733 | struct sir_peer_info_req req, |
| 1734 | void *context, |
| 1735 | void (*callbackfn)(struct sir_peer_info_resp *param, |
| 1736 | void *pcontext)); |
| 1737 | |
| 1738 | /** |
| 1739 | * sme_get_peer_info_ext() - sme api to get peer ext info |
| 1740 | * @hal: hal handle for getting global mac struct |
| 1741 | * @req: peer ext info request struct send to wma |
| 1742 | * @context: context of callback function |
| 1743 | * @callbackfn: hdd callback function when receive response |
| 1744 | * |
| 1745 | * This function will send WMA_GET_PEER_INFO_EXT to WMA |
| 1746 | * |
| 1747 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 1748 | */ |
| 1749 | QDF_STATUS sme_get_peer_info_ext(tHalHandle hal, |
| 1750 | struct sir_peer_info_ext_req *req, |
| 1751 | void *context, |
| 1752 | void (*callbackfn)(struct sir_peer_info_ext_resp *param, |
| 1753 | void *pcontext)); |
Manjeet Singh | a9cae43 | 2017-02-28 11:58:22 +0530 | [diff] [blame] | 1754 | |
Tushnim Bhattacharyya | 518e80f | 2017-08-30 17:35:33 -0700 | [diff] [blame] | 1755 | /** |
| 1756 | * sme_set_5g_band_pref() - sme api to set 5Ghz preference |
| 1757 | * @hal: hal handle for getting global mac struct |
| 1758 | * @pref_params: preference info request struct |
| 1759 | * |
| 1760 | * This function will set 5Ghz preference for STA connection |
| 1761 | * |
| 1762 | * Return: None |
| 1763 | */ |
Manjeet Singh | a9cae43 | 2017-02-28 11:58:22 +0530 | [diff] [blame] | 1764 | void sme_set_5g_band_pref(tHalHandle hal_handle, |
| 1765 | struct sme_5g_band_pref_params *pref_params); |
lifeng | d217d19 | 2017-05-09 19:44:16 +0800 | [diff] [blame] | 1766 | /** |
| 1767 | * sme_get_chain_rssi() - Get chain rssi |
| 1768 | * @hal: Global HAL handle |
| 1769 | * @input: get chain rssi req params |
| 1770 | * @callback: Callback function to be called with the result |
| 1771 | * @context: Opaque context to be used by the caller to associate the |
| 1772 | * request with the response |
| 1773 | * |
| 1774 | * This function constructs the cds message and fill in message type, |
| 1775 | * post the same to WDA. |
| 1776 | * |
| 1777 | * Return: QDF_STATUS enumeration |
| 1778 | */ |
| 1779 | QDF_STATUS sme_get_chain_rssi(tHalHandle hal, |
| 1780 | struct get_chain_rssi_req_params *input, |
| 1781 | get_chain_rssi_callback callback, |
| 1782 | void *context); |
Tushnim Bhattacharyya | c3c375e | 2017-08-04 23:39:55 -0700 | [diff] [blame] | 1783 | |
| 1784 | /** |
| 1785 | * sme_get_valid_channels() - sme api to get valid channels for |
| 1786 | * current regulatory domain |
| 1787 | * @chan_list: list of the valid channels |
| 1788 | * @list_len: length of the channel list |
| 1789 | * |
| 1790 | * This function will get valid channels for current regulatory |
| 1791 | * domain |
| 1792 | * |
| 1793 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 1794 | */ |
| 1795 | QDF_STATUS sme_get_valid_channels(uint8_t *chan_list, uint32_t *list_len); |
Tushnim Bhattacharyya | 518e80f | 2017-08-30 17:35:33 -0700 | [diff] [blame] | 1796 | |
| 1797 | /** |
| 1798 | * sme_get_mac_context() - sme api to get the pmac context |
| 1799 | * |
| 1800 | * This function will return the pmac context |
| 1801 | * |
| 1802 | * Return: pointer to pmac context |
| 1803 | */ |
| 1804 | tpAniSirGlobal sme_get_mac_context(void); |
Vignesh Viswanathan | 66c951d | 2017-09-06 12:23:42 +0530 | [diff] [blame] | 1805 | |
| 1806 | /** |
| 1807 | * sme_display_disconnect_stats() - Display per session Disconnect stats |
| 1808 | * @hal: hal global context |
| 1809 | * session_id: SME session id |
| 1810 | * |
| 1811 | * Return: None |
| 1812 | */ |
| 1813 | void sme_display_disconnect_stats(tHalHandle hal, uint8_t session_id); |
Sandeep Puligilla | 1426d61 | 2017-04-12 18:22:06 -0700 | [diff] [blame] | 1814 | |
| 1815 | /** |
| 1816 | * sme_process_msg_callback() - process callback message from LIM |
| 1817 | * @hal: global hal handle |
| 1818 | * @msg: scheduler message |
| 1819 | * |
| 1820 | * This function process the callback messages from LIM. |
| 1821 | * |
| 1822 | * Return: QDF_STATUS enumeration. |
| 1823 | */ |
| 1824 | QDF_STATUS sme_process_msg_callback(tHalHandle hal, |
| 1825 | struct scheduler_msg *msg); |
Nachiket Kukade | aaf8a71 | 2017-07-27 19:15:36 +0530 | [diff] [blame] | 1826 | |
| 1827 | /** |
| 1828 | * sme_set_bmiss_bcnt() - set bmiss config parameters |
| 1829 | * @vdev_id: virtual device for the command |
| 1830 | * @first_cnt: bmiss first value |
| 1831 | * @final_cnt: bmiss final value |
| 1832 | * |
| 1833 | * Return: QDF_STATUS_SUCCESS or non-zero on failure |
| 1834 | */ |
| 1835 | QDF_STATUS sme_set_bmiss_bcnt(uint32_t vdev_id, uint32_t first_cnt, |
| 1836 | uint32_t final_cnt); |
| 1837 | |
Ganesh Kondabattini | 479a8ae | 2017-10-03 16:49:24 +0530 | [diff] [blame] | 1838 | /** |
| 1839 | * sme_send_limit_off_channel_params() - send limit off channel parameters |
| 1840 | * @hal: global hal handle |
| 1841 | * @vdev_id: vdev id |
| 1842 | * @is_tos_active: tos active or inactive |
| 1843 | * @max_off_chan_time: max off channel time |
| 1844 | * @rest_time: rest time |
| 1845 | * @skip_dfs_chan: skip dfs channel |
| 1846 | * |
| 1847 | * This function sends command to WMA for setting limit off channel command |
| 1848 | * parameters. |
| 1849 | * |
| 1850 | * Return: QDF_STATUS enumeration. |
| 1851 | */ |
| 1852 | QDF_STATUS sme_send_limit_off_channel_params(tHalHandle hal, uint8_t vdev_id, |
| 1853 | bool is_tos_active, uint32_t max_off_chan_time, |
| 1854 | uint32_t rest_time, bool skip_dfs_chan); |
| 1855 | |
Nachiket Kukade | 8983cf6 | 2017-10-12 18:14:48 +0530 | [diff] [blame] | 1856 | /** |
| 1857 | * sme_set_vc_mode_config() - Set voltage corner config to FW. |
| 1858 | * @bitmap: Bitmap that refers to voltage corner config with |
| 1859 | * different phymode and bw configuration |
| 1860 | * |
| 1861 | * Return: QDF_STATUS |
| 1862 | */ |
| 1863 | QDF_STATUS sme_set_vc_mode_config(uint32_t vc_bitmap); |
| 1864 | |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 1865 | /** |
| 1866 | * sme_set_del_pmkid_cache() - API to update PMKID cache |
| 1867 | * @hal: HAL handle for device |
| 1868 | * @session_id: Session id |
| 1869 | * @pmk_cache_info: Pointer to PMK cache info |
| 1870 | * @is_add: boolean that implies whether to add or delete PMKID entry |
| 1871 | * |
| 1872 | * Return: QDF_STATUS |
| 1873 | */ |
| 1874 | QDF_STATUS sme_set_del_pmkid_cache(tHalHandle hal, uint8_t session_id, |
| 1875 | tPmkidCacheInfo *pmk_cache_info, |
| 1876 | bool is_add); |
| 1877 | |
| 1878 | /** |
| 1879 | * sme_send_hlp_ie_info() - API to send HLP IE info to fw |
| 1880 | * @hal: HAL handle for device |
| 1881 | * @session_id: Session id |
| 1882 | * @profile: CSR Roam profile |
| 1883 | * @if_addr: IP address |
| 1884 | * |
| 1885 | * This API is used to send HLP IE info along with IP address |
| 1886 | * to fw if LFR3 is enabled. |
| 1887 | * |
| 1888 | * Return: QDF_STATUS |
| 1889 | */ |
| 1890 | void sme_send_hlp_ie_info(tHalHandle hal, uint8_t session_id, |
| 1891 | tCsrRoamProfile *profile, uint32_t if_addr); |
| 1892 | |
| 1893 | #if defined(WLAN_FEATURE_FILS_SK) |
| 1894 | /** |
| 1895 | * sme_update_fils_config - Update FILS config to CSR roam session |
| 1896 | * @hal: HAL handle for device |
| 1897 | * @session_id: session id |
| 1898 | * @src_profile: Source profile having latest FILS config |
| 1899 | * |
| 1900 | * API to update FILS config to roam csr session and update the same |
| 1901 | * to fw if LFR3 is enabled. |
| 1902 | * |
| 1903 | * Return: QDF_STATUS |
| 1904 | */ |
| 1905 | QDF_STATUS sme_update_fils_config(tHalHandle hal, uint8_t session_id, |
| 1906 | tCsrRoamProfile *src_profile); |
| 1907 | |
| 1908 | /** |
| 1909 | * sme_free_join_rsp_fils_params - free fils params |
| 1910 | * @roam_info: roam info |
| 1911 | * |
| 1912 | * Return: void |
| 1913 | */ |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 1914 | void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info); |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 1915 | #else |
| 1916 | static inline QDF_STATUS sme_update_fils_config(tHalHandle hal, |
| 1917 | uint8_t session_id, |
| 1918 | tCsrRoamProfile *src_profile) |
| 1919 | { |
| 1920 | return QDF_STATUS_SUCCESS; |
| 1921 | } |
| 1922 | |
Jeff Johnson | 172237b | 2017-11-07 15:32:59 -0800 | [diff] [blame] | 1923 | static inline |
| 1924 | void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info) |
Vignesh Viswanathan | c6d1e1c | 2017-09-18 12:32:49 +0530 | [diff] [blame] | 1925 | {} |
| 1926 | |
| 1927 | #endif |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 1928 | #ifdef WLAN_FEATURE_11AX_BSS_COLOR |
| 1929 | /** |
| 1930 | * sme_set_he_bss_color() - Sets the HE BSS color |
| 1931 | * |
| 1932 | * @hal: The handle returned by mac_open |
| 1933 | * @session_id: session_id of the request |
| 1934 | * @bss_color: HE BSS color value to set |
| 1935 | * |
| 1936 | * Return: QDF_STATUS |
| 1937 | */ |
| 1938 | QDF_STATUS sme_set_he_bss_color(tHalHandle hal, uint8_t session_id, |
| 1939 | uint8_t bss_color); |
| 1940 | #else |
| 1941 | static inline QDF_STATUS sme_set_he_bss_color(tHalHandle hal, |
| 1942 | uint8_t session_id, uint8_t bss_color) |
| 1943 | { |
| 1944 | return QDF_STATUS_SUCCESS; |
| 1945 | } |
| 1946 | #endif |
Vignesh Viswanathan | 9dd88d3 | 2017-11-22 14:22:03 +0530 | [diff] [blame] | 1947 | |
| 1948 | /** |
| 1949 | * sme_scan_get_result_for_bssid - gets the scan result from scan cache for the |
| 1950 | * bssid specified |
| 1951 | * @hal: handle returned by mac_open |
| 1952 | * @bssid: bssid to get the scan result for |
| 1953 | * @res: pointer to tCsrScanResultInfo allocated from caller |
| 1954 | * |
| 1955 | * Return: QDF_STATUS |
| 1956 | */ |
| 1957 | QDF_STATUS sme_scan_get_result_for_bssid(tHalHandle hal_handle, |
| 1958 | struct qdf_mac_addr *bssid, |
| 1959 | tCsrScanResultInfo *res); |
| 1960 | |
| 1961 | /** |
| 1962 | * sme_get_bss_transition_status() - get bss transition status all cadidates |
| 1963 | * @hal: handle returned by mac_open |
| 1964 | * @transition_reason : Transition reason |
| 1965 | * @bssid: bssid to get BSS transition status |
| 1966 | * @info : bss candidate information |
| 1967 | * @n_candidates : number of candidates |
| 1968 | * @is_bt_in_progress: bt activity indicator |
| 1969 | * |
| 1970 | * Return : 0 on success otherwise errno |
| 1971 | */ |
| 1972 | int sme_get_bss_transition_status(tHalHandle hal, |
| 1973 | uint8_t transition_reason, |
| 1974 | struct qdf_mac_addr *bssid, |
| 1975 | struct bss_candidate_info *info, |
| 1976 | uint16_t n_candidates, |
| 1977 | bool is_bt_in_progress); |
| 1978 | |
Abhishek Singh | 7dcb85b | 2017-12-27 15:15:01 +0530 | [diff] [blame] | 1979 | /** |
| 1980 | * sme_unpack_rsn_ie: wrapper to unpack RSN IE and update def RSN params |
| 1981 | * if optional fields are not present. |
| 1982 | * @hal: handle returned by mac_open |
| 1983 | * @buf: rsn ie buffer pointer |
| 1984 | * @buf_len: rsn ie buffer length |
| 1985 | * @rsn_ie: outframe rsn ie structure |
| 1986 | * @append_ie: flag to indicate if the rsn_ie need to be appended from buf |
| 1987 | * |
| 1988 | * Return: parse status |
| 1989 | */ |
| 1990 | uint32_t sme_unpack_rsn_ie(tHalHandle hal, uint8_t *buf, |
| 1991 | uint8_t buf_len, tDot11fIERSN *rsn_ie, |
| 1992 | bool append_ie); |
Sandeep Puligilla | 063a434 | 2018-01-10 02:50:14 -0800 | [diff] [blame] | 1993 | /** |
| 1994 | * sme_get_oper_chan_freq - gets the operating channel freq |
| 1995 | * @vdev: vdev handle |
| 1996 | * |
| 1997 | * Return: operating channel frequency |
| 1998 | */ |
| 1999 | int16_t sme_get_oper_chan_freq(struct wlan_objmgr_vdev *vdev); |
| 2000 | |
| 2001 | /** |
| 2002 | * sme_get_oper_ch_width - gets the operating channel width |
| 2003 | * @vdev: vdev handle |
| 2004 | * |
| 2005 | * Return: operating channel width |
| 2006 | */ |
| 2007 | enum phy_ch_width sme_get_oper_ch_width(struct wlan_objmgr_vdev *vdev); |
| 2008 | |
| 2009 | /** |
| 2010 | * sme_get_oper_ch_width - gets the secondary channel frequency |
| 2011 | * @vdev: vdev handle |
| 2012 | * @sec20chan_freq: secondary channel frequency |
| 2013 | * |
| 2014 | * Return: secondary channel frequency |
| 2015 | */ |
| 2016 | int sme_get_sec20chan_freq_mhz(struct wlan_objmgr_vdev *vdev, |
| 2017 | uint16_t *sec20chan_freq); |
Abhishek Singh | 7dcb85b | 2017-12-27 15:15:01 +0530 | [diff] [blame] | 2018 | |
Abhishek Singh | 1f217ec | 2017-12-22 11:48:27 +0530 | [diff] [blame] | 2019 | /** |
| 2020 | * sme_enable_roaming_on_connected_sta() - Enable roaming on an connected sta |
| 2021 | * @hal: handle returned by mac_open |
| 2022 | * |
| 2023 | * The function check if any connected STA is present on which roaming is not |
| 2024 | * enabled and if present enabled roaming on that STA. |
| 2025 | * |
| 2026 | * Return: none |
| 2027 | */ |
| 2028 | void sme_enable_roaming_on_connected_sta(tHalHandle hal); |
| 2029 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2030 | #endif /* #if !defined( __SME_API_H ) */ |