blob: 81aef589371586c7699cdc58326873ac74fe7ee3 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Ashish Kumar Dhanotiya443d31f2017-10-13 12:41:19 +05302 * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080019#if !defined(__SME_API_H)
20#define __SME_API_H
21
22/**
23 * file smeApi.h
24 *
25 * brief prototype for SME APIs
26 */
27
28/*--------------------------------------------------------------------------
29 Include Files
30 ------------------------------------------------------------------------*/
31#include "csr_api.h"
Anurag Chouhana37b5b72016-02-21 14:53:42 +053032#include "qdf_lock.h"
Anurag Chouhan6d760662016-02-20 16:05:43 +053033#include "qdf_types.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080034#include "sir_api.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080035#include "cds_regdomain.h"
36#include "sme_internal.h"
Krishna Kumaar Natarajan052c6e62015-09-28 15:32:55 -070037#include "wma_tgt_cfg.h"
Jeff Johnson6136fb92017-03-30 15:21:49 -070038#include "wma_fips_public_structs.h"
Jeff Johnsonf0e54b02017-12-18 15:22:25 -080039#include "wma_sar_public_structs.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080040
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080041#include "sme_rrm_internal.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080042#include "sir_types.h"
Krunal Sonid32c6bc2016-10-18 18:00:21 -070043#include "scheduler_api.h"
Varun Reddy Yeturu35c07f92017-02-28 10:35:00 -080044#include "wlan_serialization_legacy_api.h"
Krunal Sonid32c6bc2016-10-18 18:00:21 -070045
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080046/*--------------------------------------------------------------------------
47 Preprocessor definitions and constants
48 ------------------------------------------------------------------------*/
49
Jeff Johnson97fdfd02017-03-13 09:25:31 -070050#define SME_SUMMARY_STATS (1 << eCsrSummaryStats)
51#define SME_GLOBAL_CLASSA_STATS (1 << eCsrGlobalClassAStats)
Jeff Johnson97fdfd02017-03-13 09:25:31 -070052#define SME_GLOBAL_CLASSD_STATS (1 << eCsrGlobalClassDStats)
Jeff Johnson97fdfd02017-03-13 09:25:31 -070053#define SME_PER_CHAIN_RSSI_STATS (1 << csr_per_chain_rssi_stats)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080054
Sandeep Puligillaaa26b652018-06-13 18:59:35 -070055#define sme_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_SME, params)
56#define sme_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_SME, params)
57#define sme_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_SME, params)
58#define sme_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_SME, params)
59#define sme_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_SME, params)
Srinivas Girigowdaaf487f62017-03-16 15:53:46 -070060
Nirav Shah790d9432018-07-12 19:42:48 +053061#define sme_nofl_alert(params...) \
62 QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_SME, params)
63#define sme_nofl_err(params...) \
64 QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_SME, params)
65#define sme_nofl_warn(params...) \
66 QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_SME, params)
67#define sme_nofl_info(params...) \
68 QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_SME, params)
69#define sme_nofl_debug(params...) \
70 QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_SME, params)
71
Sandeep Puligillaaa26b652018-06-13 18:59:35 -070072#define sme_alert_rl(params...) QDF_TRACE_FATAL_RL(QDF_MODULE_ID_SME, params)
73#define sme_err_rl(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_SME, params)
74#define sme_warn_rl(params...) QDF_TRACE_WARN_RL(QDF_MODULE_ID_SME, params)
75#define sme_info_rl(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_SME, params)
76#define sme_debug_rl(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_SME, params)
Srinivas Girigowdaaf487f62017-03-16 15:53:46 -070077
Nirav Shahd6fa0f82018-07-06 15:52:25 +053078#define SME_ENTER() QDF_TRACE_ENTER(QDF_MODULE_ID_SME, "enter")
79#define SME_EXIT() QDF_TRACE_EXIT(QDF_MODULE_ID_SME, "exit")
Srinivas Girigowdaaf487f62017-03-16 15:53:46 -070080
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080081#define SME_SESSION_ID_ANY 50
Wu Gaoa0230a62018-01-04 20:56:57 +080082#define SME_SESSION_ID_BROADCAST 0xFF
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080083
84#define SME_INVALID_COUNTRY_CODE "XX"
Krunal Sonibfd05492017-10-03 15:48:37 -070085#define INVALID_ROAM_ID 0
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080086
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080087#define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \
88 reg_info_1 &= 0xff00ffff; \
89 reg_info_1 |= ((val & 0xff) << 16); \
90} while (0)
91
92#define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \
93 reg_info_2 &= 0xffff00ff; \
94 reg_info_2 |= ((val & 0xff) << 8); \
95} while (0)
96
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -070097#define SME_CONFIG_TO_ROAM_CONFIG 1
98#define ROAM_CONFIG_TO_SME_CONFIG 2
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080099
Kiran Kumar Lokere666bf852016-05-02 12:23:02 -0700100#define NUM_OF_BANDS 2
Naveen Rawatb56880c2016-12-13 17:56:03 -0800101
102#define SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE (30*1000)
103#define SME_CMD_TIMEOUT_VALUE (SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE + 1000)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800104/*--------------------------------------------------------------------------
105 Type declarations
106 ------------------------------------------------------------------------*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800107typedef struct _smeConfigParams {
108 tCsrConfigParam csrConfig;
Krishna Kumaar Natarajanf599c6e2015-11-03 11:44:03 -0800109 struct rrm_config_param rrmConfig;
Kapil Gupta4f0c0c12017-02-07 15:21:15 +0530110 bool snr_monitor_enabled;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800111} 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
117typedef 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 Dhavali7090c5f2015-11-02 17:55:19 -0800132} tSmeTdlsPeerCapParams;
133
Kabilan Kannan421714b2015-11-23 04:44:59 -0800134/**
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 Dhavali7090c5f2015-11-02 17:55:19 -0800142typedef enum {
143 eSME_TDLS_PEER_STATE_PEERING,
144 eSME_TDLS_PEER_STATE_CONNECTED,
Kabilan Kannan421714b2015-11-23 04:44:59 -0800145 eSME_TDLS_PEER_STATE_TEARDOWN,
146 eSME_TDLS_PEER_ADD_MAC_ADDR,
147 eSME_TDLS_PEER_REMOVE_MAC_ADDR,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800148} eSmeTdlsPeerState;
149
150typedef 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 Lokerea3de2262017-04-12 12:15:04 -0700163typedef struct sme_tdls_chan_switch_param_struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800164 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, Narayanraddic4a7ab82015-11-25 15:41:10 +0530170 uint8_t opclass; /* tdls operating class */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800171} sme_tdls_chan_switch_params;
172#endif /* FEATURE_WLAN_TDLS */
173
174/* Thermal Mitigation*/
175typedef struct {
176 uint16_t smeMinTempThreshold;
177 uint16_t smeMaxTempThreshold;
178} tSmeThermalLevelInfo;
179
180#define SME_MAX_THERMAL_LEVELS (4)
Poddar, Siddarth83905022016-04-16 17:56:08 -0700181#define SME_MAX_THROTTLE_LEVELS (4)
182
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800183typedef struct {
184 /* Array of thermal levels */
185 tSmeThermalLevelInfo smeThermalLevels[SME_MAX_THERMAL_LEVELS];
186 uint8_t smeThermalMgmtEnabled;
187 uint32_t smeThrottlePeriod;
Poddar, Siddarth83905022016-04-16 17:56:08 -0700188 uint8_t sme_throttle_duty_cycle_tbl[SME_MAX_THROTTLE_LEVELS];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800189} tSmeThermalParams;
190
191typedef 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 Singh12be60f2017-08-11 13:52:42 +0530198/*
199 * Enumeration of the various TSPEC directions
200 * From 802.11e/WMM specifications
201 */
202enum sme_qos_wmm_dir_type {
Naveen Rawatd9dd4b32017-07-05 14:32:54 -0700203 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 Singh12be60f2017-08-11 13:52:42 +0530207};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800208
Krishna Kumaar Natarajan53ca2902015-12-04 14:01:46 -0800209/**
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 */
217struct 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 Singha9cae432017-02-28 11:58:22 +0530224/**
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 */
233struct 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 Soni8d184fa2017-11-20 21:52:05 -0800242/**
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
Jeff Johnson6a18c962018-07-01 09:09:37 -0700246 * @callback: callback to be invoked for roaming events
247 * @callback_ctx: user-supplied context to be passed back on roaming events
Krunal Soni8d184fa2017-11-20 21:52:05 -0800248 * @self_mac_addr: Self mac address
249 * @sme_session_id: SME session id
250 * @type_of_persona: person type
251 * @subtype_of_persona: sub type of persona
252 */
253struct sme_session_params {
254 csr_session_open_cb session_open_cb;
255 csr_session_close_cb session_close_cb;
Jeff Johnson6a18c962018-07-01 09:09:37 -0700256 csr_roam_complete_cb callback;
Krunal Soni8d184fa2017-11-20 21:52:05 -0800257 void *callback_ctx;
258 uint8_t *self_mac_addr;
259 uint8_t sme_session_id;
260 uint32_t type_of_persona;
261 uint32_t subtype_of_persona;
262};
263
Vignesh Viswanathan9dd88d32017-11-22 14:22:03 +0530264#define MAX_CANDIDATE_INFO 10
265
266/**
267 * struct bss_candidate_info - Candidate bss information
268 *
269 * @bssid : BSSID of candidate bss
270 * @status : status code for candidate bss
271 */
272struct bss_candidate_info {
273 struct qdf_mac_addr bssid;
274 uint32_t status;
275};
276
277/*
278 * MBO transition reason codes
279 */
280enum {
281 MBO_TRANSITION_REASON_UNSPECIFIED,
282 MBO_TRANSITION_REASON_EXCESSIVE_FRAME_LOSS_RATE,
283 MBO_TRANSITION_REASON_EXCESSIVE_DELAY_FOR_CURRENT_TRAFFIC,
284 MBO_TRANSITION_REASON_INSUFFICIENT_BANDWIDTH_FOR_CURRENT_TRAFFIC,
285 MBO_TRANSITION_REASON_LOAD_BALANCING,
286 MBO_TRANSITION_REASON_LOW_RSSI,
287 MBO_TRANSITION_REASON_RECEIVED_EXCESSIVE_RETRANSMISSIONS,
288 MBO_TRANSITION_REASON_HIGH_INTERFERENCE,
289 MBO_TRANSITION_REASON_GRAY_ZONE,
290 MBO_TRANSITION_REASON_TRANSITIONING_TO_PREMIUM_AP,
291};
292
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800293/*-------------------------------------------------------------------------
294 Function declarations and documenation
295 ------------------------------------------------------------------------*/
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530296QDF_STATUS sme_open(tHalHandle hHal);
297QDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2,
Amar Singhala297bfa2015-10-15 15:07:29 -0700298 enum country_src cc_src);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530299QDF_STATUS sme_close(tHalHandle hHal);
300QDF_STATUS sme_start(tHalHandle hHal);
Jeff Johnson62cd6802018-07-20 12:38:25 -0700301
302/**
303 * sme_stop() - Stop all SME modules and put them at idle state
304 * @mac_handle: Opaque handle to the MAC context
305 *
306 * The function stops each module in SME. Upon return, all modules are
307 * at idle state ready to start.
308 *
309 * This is a synchronous call
310 *
311 * Return: QDF_STATUS_SUCCESS if SME is stopped. Other status means
312 * SME failed to stop one or more modules but caller should
313 * still consider SME is stopped.
314 */
315QDF_STATUS sme_stop(mac_handle_t mac_handle);
316
Krunal Soni8d184fa2017-11-20 21:52:05 -0800317/*
318 * sme_open_session() - Open a session for given persona
319 *
320 * This is a synchronous API. For any protocol stack related activity
321 * requires session to be opened. This API needs to be called to open
322 * the session in SME module.
323 *
324 * hal: The handle returned by mac_open.
325 * params: to initialize the session open params
326 *
327 * Return:
328 * QDF_STATUS_SUCCESS - session is opened.
329 * Other status means SME is failed to open the session.
330 */
331QDF_STATUS sme_open_session(tHalHandle hal, struct sme_session_params *params);
332
333/*
334 * sme_close_session() - Close a session for given persona
335 *
336 * This is a synchronous API. This API needs to be called to close the session
337 * in SME module before terminating the session completely.
338 *
339 * hal: The handle returned by mac_open.
340 * session_id: A previous opened session's ID.
341 *
342 * Return:
343 * QDF_STATUS_SUCCESS - session is closed.
344 * Other status means SME is failed to open the session.
345 */
346QDF_STATUS sme_close_session(tHalHandle hal, uint8_t sessionId);
Peng Xuf5d60c82015-10-02 17:17:03 -0700347void sme_set_curr_device_mode(tHalHandle hHal,
Jeff Johnsonc1e62782017-11-09 09:50:17 -0800348 enum QDF_OPMODE currDeviceMode);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530349QDF_STATUS sme_update_roam_params(tHalHandle hHal, uint8_t session_id,
Srinivas Girigowda72f30392017-07-13 18:55:09 -0700350 struct roam_ext_params *roam_params_src, int update_param);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530351QDF_STATUS sme_update_config(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800352 tpSmeConfigParams pSmeConfigParams);
353
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530354QDF_STATUS sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
355QDF_STATUS sme_get_soft_ap_domain(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800356 v_REGDOMAIN_t *domainIdSoftAp);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530357QDF_STATUS sme_hdd_ready_ind(tHalHandle hHal);
Krunal Sonia8270f52017-02-23 19:51:25 -0800358/**
359 * sme_ser_cmd_callback() - callback from serialization module
360 * @buf: serialization command buffer
361 * @reason: reason why serialization module has given this callback
362 *
363 * Serialization module will give callback to SME for why it triggered
364 * the callback
365 *
366 * Return: QDF_STATUS_SUCCESS
367 */
368QDF_STATUS sme_ser_cmd_callback(void *buf,
369 enum wlan_serialization_cb_reason reason);
Jeff Johnson5f9ce2d2018-06-09 21:20:45 -0700370
371/*
372 * sme_process_msg() - The main message processor for SME.
373 * @mac: The global mac context
374 * @msg: The message to be processed.
375 *
376 * This function is called by a message dispatcher when to process a message
377 * targeted for SME.
378 * This is a synchronous call
379 *
380 * Return: QDF_STATUS_SUCCESS - SME successfully processed the message.
381 * Other status means SME failed to process the message to HAL.
382 */
383QDF_STATUS sme_process_msg(tpAniSirGlobal pMac, struct scheduler_msg *pMsg);
384
Krunal Sonid32c6bc2016-10-18 18:00:21 -0700385QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530386QDF_STATUS sme_scan_get_result(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800387 tCsrScanResultFilter *pFilter,
388 tScanResultHandle *phResult);
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700389QDF_STATUS sme_get_ap_channel_from_scan_cache(
Jeff Johnson66ee8a92018-03-17 15:24:26 -0700390 struct csr_roam_profile *profile,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800391 tScanResultHandle *scan_cache,
392 uint8_t *ap_chnl_id);
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700393QDF_STATUS sme_get_ap_channel_from_scan(void *profile,
394 tScanResultHandle *scan_cache,
395 uint8_t *ap_chnl_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800396bool sme_store_joinreq_param(tHalHandle hal_handle,
Jeff Johnson66ee8a92018-03-17 15:24:26 -0700397 struct csr_roam_profile *profile,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800398 tScanResultHandle scan_cache,
399 uint32_t *roam_id,
400 uint32_t session_id);
401bool sme_clear_joinreq_param(tHalHandle hal_handle,
402 uint32_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530403QDF_STATUS sme_issue_stored_joinreq(tHalHandle hal_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800404 uint32_t *roam_id,
405 uint32_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530406QDF_STATUS sme_scan_flush_result(tHalHandle hHal);
407QDF_STATUS sme_filter_scan_results(tHalHandle hHal, uint8_t sessionId);
408QDF_STATUS sme_scan_flush_p2p_result(tHalHandle hHal, uint8_t sessionId);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800409tCsrScanResultInfo *sme_scan_result_get_first(tHalHandle,
410 tScanResultHandle hScanResult);
411tCsrScanResultInfo *sme_scan_result_get_next(tHalHandle,
412 tScanResultHandle hScanResult);
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700413QDF_STATUS sme_scan_result_purge(tScanResultHandle hScanResult);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530414QDF_STATUS sme_roam_connect(tHalHandle hHal, uint8_t sessionId,
Jeff Johnson66ee8a92018-03-17 15:24:26 -0700415 struct csr_roam_profile *pProfile, uint32_t *pRoamId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530416QDF_STATUS sme_roam_reassoc(tHalHandle hHal, uint8_t sessionId,
Jeff Johnson66ee8a92018-03-17 15:24:26 -0700417 struct csr_roam_profile *pProfile,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800418 tCsrRoamModifyProfileFields modProfileFields,
419 uint32_t *pRoamId, bool fForce);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530420QDF_STATUS sme_roam_connect_to_last_profile(tHalHandle hHal, uint8_t sessionId);
Varun Reddy Yeturu363809c2018-06-27 14:12:52 -0700421
422/**
423 * sme_roam_disconnect() - API to request CSR to disconnect
424 * @hal: HAL context
425 * @session: SME session identifier
426 * @reason: Reason to disconnect
427 *
428 * Return: QDF Status success or failure
429 */
430QDF_STATUS sme_roam_disconnect(tHalHandle hal, uint8_t session,
431 eCsrRoamDisconnectReason reason);
432
Abhishek Singhca408032016-09-13 15:26:12 +0530433void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530434QDF_STATUS sme_roam_stop_bss(tHalHandle hHal, uint8_t sessionId);
435QDF_STATUS sme_roam_get_associated_stas(tHalHandle hHal, uint8_t sessionId,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530436 QDF_MODULE_ID modId, void *pUsrContext,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800437 void *pfnSapEventCallback,
438 uint8_t *pAssocStasBuf);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530439QDF_STATUS sme_roam_disconnect_sta(tHalHandle hHal, uint8_t sessionId,
Jeff Johnsone6bf7192017-11-07 15:16:09 -0800440 struct csr_del_sta_params *p_del_sta_params);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530441QDF_STATUS sme_roam_deauth_sta(tHalHandle hHal, uint8_t sessionId,
Jeff Johnsone6bf7192017-11-07 15:16:09 -0800442 struct csr_del_sta_params *pDelStaParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530443QDF_STATUS sme_roam_get_connect_state(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800444 eCsrConnectState *pState);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530445QDF_STATUS sme_roam_get_connect_profile(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800446 tCsrRoamConnectedProfile *pProfile);
Naveen Rawatdf0a7e72016-01-06 18:35:53 -0800447void sme_roam_free_connect_profile(tCsrRoamConnectedProfile *profile);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530448QDF_STATUS sme_roam_set_pmkid_cache(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800449 tPmkidCacheInfo *pPMKIDCache,
450 uint32_t numItems,
451 bool update_entire_cache);
gaurank kathpalia99d06c12018-05-16 16:28:35 +0530452
Abhinav Kumar7830d9c2018-06-27 17:57:48 +0530453#ifdef WLAN_FEATURE_ROAM_OFFLOAD
gaurank kathpalia99d06c12018-05-16 16:28:35 +0530454/**
455 * sme_get_pmk_info(): A wrapper function to request CSR to save PMK
456 * @hal: Global structure
457 * @session_id: SME session_id
458 * @pmk_cache: pointer to a structure of pmk
459 *
460 * Return: none
461 */
462void sme_get_pmk_info(tHalHandle hal, uint8_t session_id,
463 tPmkidCacheInfo *pmk_cache);
464
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530465QDF_STATUS sme_roam_set_psk_pmk(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800466 uint8_t *pPSK_PMK, size_t pmk_len);
467#endif
Jeff Johnson0a078b52018-06-01 16:15:54 -0700468
469/**
470 * sme_roam_get_wpa_rsn_req_ie() - Retrieve WPA/RSN Request IE
471 * @hal: HAL handle
472 * @session_id: ID of the specific session
473 * @len: Caller allocated memory that has the length of @buf as input.
474 * Upon returned, @len has the length of the IE store in @buf
475 * @buf: Caller allocated memory that contain the IE field, if any,
476 * upon return
477 *
478 * A wrapper function to request CSR to return the WPA or RSN IE CSR
479 * passes to PE to JOIN request or START_BSS request
480 * This is a synchronous call.
481 *
482 * Return: QDF_STATUS - when fail, it usually means the buffer allocated is not
483 * big enough
484 */
485QDF_STATUS sme_roam_get_wpa_rsn_req_ie(tHalHandle hal, uint8_t session_id,
486 uint32_t *len, uint8_t *buf);
487
488/**
489 * sme_roam_get_wpa_rsn_rsp_ie() - Retrieve WPA/RSN Response IE
490 * @hal: HAL handle
491 * @session_id: ID of the specific session
492 * @len: Caller allocated memory that has the length of @buf as input.
493 * Upon returned, @len has the length of the IE store in @buf
494 * @buf: Caller allocated memory that contain the IE field, if any,
495 * upon return
496 *
497 * A wrapper function to request CSR to return the WPA or RSN IE CSR
498 * passes to PE to JOIN request or START_BSS request
499 * This is a synchronous call.
500 *
501 * Return: QDF_STATUS - when fail, it usually means the buffer allocated is not
502 * big enough
503 */
504QDF_STATUS sme_roam_get_wpa_rsn_rsp_ie(tHalHandle hal, uint8_t session_id,
505 uint32_t *len, uint8_t *buf);
506
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800507uint32_t sme_roam_get_num_pmkid_cache(tHalHandle hHal, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530508QDF_STATUS sme_roam_get_pmkid_cache(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800509 uint32_t *pNum,
510 tPmkidCacheInfo *pPmkidCache);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530511QDF_STATUS sme_get_config_param(tHalHandle hHal, tSmeConfigParams *pParam);
Naveen Rawatfa2a1002018-05-17 16:06:37 -0700512#ifndef QCA_SUPPORT_CP_STATS
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530513QDF_STATUS sme_get_statistics(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800514 eCsrStatsRequesterType requesterId,
515 uint32_t statsMask, tCsrStatsCallback callback,
Naveen Rawatd0ca4412017-06-16 14:19:19 -0700516 uint8_t staId, void *pContext, uint8_t sessionId);
Naveen Rawatfa2a1002018-05-17 16:06:37 -0700517#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530518QDF_STATUS sme_get_rssi(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800519 tCsrRssiCallback callback,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530520 uint8_t staId, struct qdf_mac_addr bssId, int8_t lastRSSI,
Jeff Johnson8bd23352017-09-26 11:39:24 -0700521 void *pContext);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530522QDF_STATUS sme_get_snr(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800523 tCsrSnrCallback callback,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530524 uint8_t staId, struct qdf_mac_addr bssId, void *pContext);
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800525#ifdef FEATURE_WLAN_ESE
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530526QDF_STATUS sme_get_tsm_stats(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800527 tCsrTsmStatsCallback callback,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530528 uint8_t staId, struct qdf_mac_addr bssId,
Jeff Johnson30f84552017-09-13 14:55:25 -0700529 void *pContext, uint8_t tid);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530530QDF_STATUS sme_set_cckm_ie(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800531 uint8_t sessionId,
532 uint8_t *pCckmIe, uint8_t cckmIeLen);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530533QDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800534 const tCsrEseBeaconReq *pEseBcnReq);
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800535QDF_STATUS sme_set_plm_request(tHalHandle hHal, tpSirPlmReq pPlm);
536#endif /*FEATURE_WLAN_ESE */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530537QDF_STATUS sme_cfg_set_int(tHalHandle hal, uint16_t cfg_id, uint32_t value);
538QDF_STATUS sme_cfg_set_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800539 uint32_t length);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530540QDF_STATUS sme_cfg_get_int(tHalHandle hal, uint16_t cfg_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800541 uint32_t *cfg_value);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530542QDF_STATUS sme_cfg_get_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800543 uint32_t *length);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530544QDF_STATUS sme_get_modify_profile_fields(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800545 tCsrRoamModifyProfileFields *
546 pModifyProfileFields);
547
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530548extern QDF_STATUS sme_set_host_power_save(tHalHandle hHal, bool psMode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800549
550void sme_set_dhcp_till_power_active_flag(tHalHandle hHal, uint8_t flag);
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530551
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800552#ifdef FEATURE_OEM_DATA_SUPPORT
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530553extern QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle h_hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800554 sme_send_oem_data_rsp_msg callback);
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530555void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal);
556
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800557#else
Naveen Rawat910726a2017-03-06 11:42:51 -0800558static inline QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle hal,
559 void *callback)
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800560{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530561 return QDF_STATUS_SUCCESS;
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800562}
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530563static inline void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal)
564{
565}
566
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800567#endif
568
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530569QDF_STATUS sme_roam_set_key(tHalHandle, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800570 tCsrRoamSetKey *pSetKey, uint32_t *pRoamId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530571QDF_STATUS sme_get_country_code(tHalHandle hHal, uint8_t *pBuf, uint8_t *pbLen);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800572
573
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800574/* some support functions */
575bool sme_is11d_supported(tHalHandle hHal);
576bool sme_is11h_supported(tHalHandle hHal);
577bool sme_is_wmm_supported(tHalHandle hHal);
578
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530579QDF_STATUS sme_generic_change_country_code(tHalHandle hHal,
Amar Singhal7f1f3ec2015-10-13 17:14:08 -0700580 uint8_t *pCountry);
Mukul Sharmaecf8e092017-12-19 22:36:31 +0530581
582
Jeff Johnson330c0bf2018-06-01 15:13:12 -0700583/**
584 * sme_update_channel_list() - Update configured channel list to fwr
585 * This is a synchronous API.
586 * @hal: HAL handle returned by mac_open.
587 *
588 * Return: QDF_STATUS SUCCESS.
589 * FAILURE or RESOURCES The API finished and failed.
590 */
591QDF_STATUS sme_update_channel_list(tHalHandle hal);
Mukul Sharmaecf8e092017-12-19 22:36:31 +0530592
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800593QDF_STATUS sme_tx_fail_monitor_start_stop_ind(tHalHandle hHal,
594 uint8_t tx_fail_count,
595 void *txFailIndCallback);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530596QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800597 uint8_t device_mode,
598 uint8_t *macAddr, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530599QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800600 uint8_t device_mode,
601 uint8_t *macAddr, uint8_t sessionId);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800602void sme_get_recovery_stats(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530603QDF_STATUS sme_neighbor_report_request(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800604 tpRrmNeighborReq pRrmNeighborReq,
605 tpRrmNeighborRspCallbackInfo callbackInfo);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530606QDF_STATUS sme_get_wcnss_wlan_compiled_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800607 tSirVersionType * pVersion);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530608QDF_STATUS sme_get_wcnss_wlan_reported_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800609 tSirVersionType *pVersion);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530610QDF_STATUS sme_get_wcnss_software_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800611 uint8_t *pVersion, uint32_t versionBufferSize);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530612QDF_STATUS sme_get_wcnss_hardware_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800613 uint8_t *pVersion, uint32_t versionBufferSize);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800614#ifdef FEATURE_OEM_DATA_SUPPORT
Krishna Kumaar Natarajanc1fa17d2016-08-03 14:19:20 -0700615QDF_STATUS sme_oem_data_req(tHalHandle hHal, struct oem_data_req *);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530616QDF_STATUS sme_oem_update_capability(tHalHandle hHal,
Krishna Kumaar Natarajan53ca2902015-12-04 14:01:46 -0800617 struct sme_oem_capability *cap);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530618QDF_STATUS sme_oem_get_capability(tHalHandle hHal,
Krishna Kumaar Natarajan53ca2902015-12-04 14:01:46 -0800619 struct sme_oem_capability *cap);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800620#endif /*FEATURE_OEM_DATA_SUPPORT */
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700621QDF_STATUS sme_change_mcc_beacon_interval(uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530622QDF_STATUS sme_set_host_offload(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800623 tpSirHostOffloadReq pRequest);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530624QDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800625 tpSirKeepAliveReq pRequest);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530626QDF_STATUS sme_get_operation_channel(tHalHandle hHal, uint32_t *pChannel,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800627 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530628QDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800629 uint16_t frameType, uint8_t *matchData,
630 uint16_t matchLen);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530631QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800632 uint16_t frameType, uint8_t *matchData,
633 uint16_t matchLen);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530634QDF_STATUS sme_ConfigureAppsCpuWakeupState(tHalHandle hHal, bool isAppsAwake);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800635#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530636QDF_STATUS sme_configure_ext_wow(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800637 tpSirExtWoWParams wlanExtParams,
638 csr_readyToSuspendCallback callback,
639 void *callbackContext);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530640QDF_STATUS sme_configure_app_type1_params(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800641 tpSirAppType1Params wlanAppType1Params);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530642QDF_STATUS sme_configure_app_type2_params(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800643 tpSirAppType2Params wlanAppType2Params);
644#endif
645int8_t sme_get_infra_session_id(tHalHandle hHal);
646uint8_t sme_get_infra_operation_channel(tHalHandle hHal, uint8_t sessionId);
647uint8_t sme_get_concurrent_operation_channel(tHalHandle hHal);
648#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
649uint16_t sme_check_concurrent_channel_overlap(tHalHandle hHal, uint16_t sap_ch,
650 eCsrPhyMode sapPhyMode,
651 uint8_t cc_switch_mode);
652#endif
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -0800653QDF_STATUS sme_get_cfg_valid_channels(uint8_t *aValidChannels,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800654 uint32_t *len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800655#ifdef WLAN_FEATURE_PACKET_FILTERING
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530656QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800657 tpSirRcvFltMcAddrList pMulticastAddrs);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800658#endif /* WLAN_FEATURE_PACKET_FILTERING */
659bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530660QDF_STATUS sme_set_freq_band(tHalHandle hHal, uint8_t sessionId,
Varun Reddy Yeturua48bc412017-11-17 15:33:35 -0800661 enum band_info eBand);
662QDF_STATUS sme_get_freq_band(tHalHandle hHal, enum band_info *pBand);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800663uint16_t sme_chn_to_freq(uint8_t chanNum);
664bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel);
Anurag Chouhan6d760662016-02-20 16:05:43 +0530665QDF_STATUS sme_set_max_tx_power(tHalHandle hHal, struct qdf_mac_addr pBssid,
666 struct qdf_mac_addr pSelfMacAddress, int8_t dB);
Varun Reddy Yeturua48bc412017-11-17 15:33:35 -0800667QDF_STATUS sme_set_max_tx_power_per_band(enum band_info band, int8_t db);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530668QDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530669 struct qdf_mac_addr bssid,
Jeff Johnsonc1e62782017-11-09 09:50:17 -0800670 enum QDF_OPMODE dev_mode, int power);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530671QDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr);
672QDF_STATUS sme_hide_ssid(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800673 uint8_t ssidHidden);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530674QDF_STATUS sme_set_tm_level(tHalHandle hHal, uint16_t newTMLevel,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800675 uint16_t tmMode);
676void sme_feature_caps_exchange(tHalHandle hHal);
677void sme_disable_feature_capablity(uint8_t feature_index);
678void sme_reset_power_values_for5_g(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530679QDF_STATUS sme_update_roam_prefer5_g_hz(tHalHandle hHal, bool nRoamPrefer5GHz);
680QDF_STATUS sme_set_roam_intra_band(tHalHandle hHal, const bool nRoamIntraBand);
681QDF_STATUS sme_update_roam_scan_n_probes(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800682 const uint8_t nProbes);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530683QDF_STATUS sme_update_roam_scan_home_away_time(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800684 uint8_t sessionId,
685 const uint16_t nRoamScanHomeAwayTime,
686 const bool bSendOffloadCmd);
687
688bool sme_get_roam_intra_band(tHalHandle hHal);
689uint8_t sme_get_roam_scan_n_probes(tHalHandle hHal);
690uint16_t sme_get_roam_scan_home_away_time(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530691QDF_STATUS sme_update_roam_rssi_diff(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800692 uint8_t RoamRssiDiff);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530693QDF_STATUS sme_update_fast_transition_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800694 bool isFastTransitionEnabled);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530695QDF_STATUS sme_update_wes_mode(tHalHandle hHal, bool isWESModeEnabled,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800696 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530697QDF_STATUS sme_set_roam_scan_control(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800698 bool roamScanControl);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800699
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530700QDF_STATUS sme_update_is_fast_roam_ini_feature_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800701 uint8_t sessionId,
702 const bool
703 isFastRoamIniFeatureEnabled);
Mukul Sharma69c44cd2016-09-12 18:33:57 +0530704
705QDF_STATUS sme_config_fast_roaming(tHalHandle hal, uint8_t session_id,
706 const bool is_fast_roam_enabled);
707
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530708QDF_STATUS sme_update_is_mawc_ini_feature_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800709 const bool MAWCEnabled);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530710QDF_STATUS sme_stop_roaming(tHalHandle hHal, uint8_t sessionId, uint8_t reason);
Abhishek Singhd5686472017-09-20 15:18:50 +0530711
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530712QDF_STATUS sme_start_roaming(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800713 uint8_t reason);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530714QDF_STATUS sme_update_enable_fast_roam_in_concurrency(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800715 bool bFastRoamInConIniFeatureEnabled);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800716#ifdef FEATURE_WLAN_ESE
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530717QDF_STATUS sme_update_is_ese_feature_enabled(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800718 const bool isEseIniFeatureEnabled);
719#endif /* FEATURE_WLAN_ESE */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530720QDF_STATUS sme_set_roam_rescan_rssi_diff(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800721 uint8_t sessionId,
722 const uint8_t nRoamRescanRssiDiff);
723uint8_t sme_get_roam_rescan_rssi_diff(tHalHandle hHal);
724
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530725QDF_STATUS sme_set_roam_opportunistic_scan_threshold_diff(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800726 uint8_t sessionId,
727 const uint8_t nOpportunisticThresholdDiff);
728uint8_t sme_get_roam_opportunistic_scan_threshold_diff(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530729QDF_STATUS sme_set_neighbor_lookup_rssi_threshold(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800730 uint8_t sessionId, uint8_t neighborLookupRssiThreshold);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530731QDF_STATUS sme_set_delay_before_vdev_stop(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800732 uint8_t sessionId, uint8_t delay_before_vdev_stop);
733uint8_t sme_get_neighbor_lookup_rssi_threshold(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530734QDF_STATUS sme_set_neighbor_scan_refresh_period(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800735 uint8_t sessionId, uint16_t neighborScanResultsRefreshPeriod);
736uint16_t sme_get_neighbor_scan_refresh_period(tHalHandle hHal);
737uint16_t sme_get_empty_scan_refresh_period(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530738QDF_STATUS sme_update_empty_scan_refresh_period(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800739 uint8_t sessionId, uint16_t nEmptyScanRefreshPeriod);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530740QDF_STATUS sme_set_neighbor_scan_min_chan_time(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800741 const uint16_t nNeighborScanMinChanTime,
742 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530743QDF_STATUS sme_set_neighbor_scan_max_chan_time(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800744 uint8_t sessionId, const uint16_t nNeighborScanMaxChanTime);
745uint16_t sme_get_neighbor_scan_min_chan_time(tHalHandle hHal,
746 uint8_t sessionId);
747uint32_t sme_get_neighbor_roam_state(tHalHandle hHal, uint8_t sessionId);
748uint32_t sme_get_current_roam_state(tHalHandle hHal, uint8_t sessionId);
749uint32_t sme_get_current_roam_sub_state(tHalHandle hHal, uint8_t sessionId);
750uint32_t sme_get_lim_sme_state(tHalHandle hHal);
751uint32_t sme_get_lim_mlm_state(tHalHandle hHal);
752bool sme_is_lim_session_valid(tHalHandle hHal, uint8_t sessionId);
753uint32_t sme_get_lim_sme_session_state(tHalHandle hHal, uint8_t sessionId);
754uint32_t sme_get_lim_mlm_session_state(tHalHandle hHal, uint8_t sessionId);
755uint16_t sme_get_neighbor_scan_max_chan_time(tHalHandle hHal,
756 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530757QDF_STATUS sme_set_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800758 const uint16_t nNeighborScanPeriod);
759uint16_t sme_get_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId);
Sridhar Selvaraj1b2330c2017-07-21 15:16:42 +0530760QDF_STATUS sme_set_neighbor_scan_min_period(tHalHandle h_hal,
761 uint8_t session_id, const uint16_t neighbor_scan_min_period);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530762QDF_STATUS sme_set_roam_bmiss_first_bcnt(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800763 uint8_t sessionId, const uint8_t nRoamBmissFirstBcnt);
764uint8_t sme_get_roam_bmiss_first_bcnt(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530765QDF_STATUS sme_set_roam_bmiss_final_bcnt(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800766 const uint8_t nRoamBmissFinalBcnt);
767uint8_t sme_get_roam_bmiss_final_bcnt(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530768QDF_STATUS sme_set_roam_beacon_rssi_weight(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800769 const uint8_t nRoamBeaconRssiWeight);
770uint8_t sme_get_roam_beacon_rssi_weight(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800771uint8_t sme_get_roam_rssi_diff(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530772QDF_STATUS sme_change_roam_scan_channel_list(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800773 uint8_t *pChannelList,
774 uint8_t numChannels);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530775QDF_STATUS sme_set_ese_roam_scan_channel_list(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800776 uint8_t sessionId, uint8_t *pChannelList,
777 uint8_t numChannels);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530778QDF_STATUS sme_get_roam_scan_channel_list(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800779 uint8_t *pChannelList, uint8_t *pNumChannels,
780 uint8_t sessionId);
781bool sme_get_is_ese_feature_enabled(tHalHandle hHal);
782bool sme_get_wes_mode(tHalHandle hHal);
783bool sme_get_roam_scan_control(tHalHandle hHal);
784bool sme_get_is_lfr_feature_enabled(tHalHandle hHal);
785bool sme_get_is_ft_feature_enabled(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530786QDF_STATUS sme_update_roam_scan_offload_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800787 bool nRoamScanOffloadEnabled);
Krishna Kumaar Natarajand0bbb3c2017-03-13 17:04:58 -0700788bool sme_is_feature_supported_by_fw(enum cap_bitmap feature);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800789
790/*
791 * SME API to enable/disable WLAN driver initiated SSR
792 */
793void sme_update_enable_ssr(tHalHandle hHal, bool enableSSR);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530794QDF_STATUS sme_set_phy_mode(tHalHandle hHal, eCsrPhyMode phyMode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800795eCsrPhyMode sme_get_phy_mode(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530796QDF_STATUS sme_handoff_request(tHalHandle hHal, uint8_t sessionId,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700797 tCsrHandoffRequest *pHandoffInfo);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530798QDF_STATUS sme_is_sta_p2p_client_connected(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530799QDF_STATUS sme_add_periodic_tx_ptrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800800 *addPeriodicTxPtrnParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530801QDF_STATUS sme_del_periodic_tx_ptrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800802 *delPeriodicTxPtrnParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530803QDF_STATUS sme_send_rate_update_ind(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800804 tSirRateUpdateInd *rateUpdateParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530805QDF_STATUS sme_roam_del_pmkid_from_cache(tHalHandle hHal, uint8_t sessionId,
Sridhar Selvarajc3684c72017-08-21 14:32:47 +0530806 tPmkidCacheInfo *pmksa, bool flush_cache);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800807void sme_get_command_q_status(tHalHandle hHal);
808
Rachit Kankaneee1735c2018-08-02 13:19:34 +0530809#ifdef FEATURE_WLAN_RMC
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800810QDF_STATUS sme_enable_rmc(tHalHandle hHal, uint32_t sessionId);
811QDF_STATUS sme_disable_rmc(tHalHandle hHal, uint32_t sessionId);
812QDF_STATUS sme_send_rmc_action_period(tHalHandle hHal, uint32_t sessionId);
Rachit Kankaneee1735c2018-08-02 13:19:34 +0530813#endif
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800814QDF_STATUS sme_request_ibss_peer_info(tHalHandle hHal, void *pUserData,
815 pIbssPeerInfoCb peerInfoCbk, bool allPeerInfoReqd, uint8_t staIdx);
816QDF_STATUS sme_send_cesium_enable_ind(tHalHandle hHal, uint32_t sessionId);
817
Paul Zhang99fe8842017-12-08 14:43:46 +0800818/**
819 * sme_set_wlm_latency_level_ind() - Used to set the latency level to fw
820 * @hal
821 * @session_id
822 * @latency_level
823 *
824 * Return QDF_STATUS
825 */
826QDF_STATUS sme_set_wlm_latency_level(tHalHandle hal,
827 uint16_t session_id,
828 uint16_t latency_level);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800829/*
830 * SME API to enable/disable idle mode powersave
831 * This should be called only if powersave offload
832 * is enabled
833 */
Arunk Khandavalli847969d2017-09-25 15:15:36 +0530834QDF_STATUS sme_set_idle_powersave_config(bool value);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530835QDF_STATUS sme_notify_modem_power_state(tHalHandle hHal, uint32_t value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800836
837/*SME API to convert convert the ini value to the ENUM used in csr and MAC*/
838ePhyChanBondState sme_get_cb_phy_state_from_cb_ini_value(uint32_t cb_ini_value);
839int sme_update_ht_config(tHalHandle hHal, uint8_t sessionId, uint16_t htCapab,
840 int value);
841int16_t sme_get_ht_config(tHalHandle hHal, uint8_t session_id,
842 uint16_t ht_capab);
843#ifdef QCA_HT_2040_COEX
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530844QDF_STATUS sme_notify_ht2040_mode(tHalHandle hHal, uint16_t staId,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530845 struct qdf_mac_addr macAddrSTA,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800846 uint8_t sessionId,
847 uint8_t channel_type);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530848QDF_STATUS sme_set_ht2040_mode(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800849 uint8_t channel_type, bool obssEnabled);
850#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530851QDF_STATUS sme_get_reg_info(tHalHandle hHal, uint8_t chanId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800852 uint32_t *regInfo1, uint32_t *regInfo2);
853#ifdef FEATURE_WLAN_TDLS
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530854QDF_STATUS sme_update_fw_tdls_state(tHalHandle hHal, void *psmeTdlsParams,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800855 bool useSmeLock);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800856#endif /* FEATURE_WLAN_TDLS */
Nirav Shaheb017be2018-02-15 11:20:58 +0530857
858#ifdef FEATURE_WLAN_CH_AVOID
859QDF_STATUS sme_ch_avoid_update_req(tHalHandle hal_handle);
860#else
861static inline
862QDF_STATUS sme_ch_avoid_update_req(tHalHandle hal_handle)
863{
864 return QDF_STATUS_SUCCESS;
865}
866#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800867#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530868QDF_STATUS sme_set_auto_shutdown_cb(tHalHandle hHal, void (*pCallbackfn)(void));
869QDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800870#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530871QDF_STATUS sme_roam_channel_change_req(tHalHandle hHal,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700872 struct qdf_mac_addr bssid,
Amar Singhal5cccafe2017-02-15 12:42:58 -0800873 struct ch_params *ch_params,
Jeff Johnson66ee8a92018-03-17 15:24:26 -0700874 struct csr_roam_profile *profile);
Amar Singhale4f28ee2015-10-21 14:36:56 -0700875
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530876QDF_STATUS sme_roam_start_beacon_req(tHalHandle hHal,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530877 struct qdf_mac_addr bssid, uint8_t dfsCacWaitStatus);
878QDF_STATUS sme_roam_csa_ie_request(tHalHandle hHal, struct qdf_mac_addr bssid,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700879 uint8_t targetChannel, uint8_t csaIeReqd,
Amar Singhal5cccafe2017-02-15 12:42:58 -0800880 struct ch_params *ch_params);
Amar Singhale4f28ee2015-10-21 14:36:56 -0700881
Kiran Kumar Lokere08195ef2018-01-17 19:25:15 -0800882/**
883 * sme_set_addba_accept() - Allow/Reject the ADDBA req session
884 * @hal: handle returned by mac_open
885 * @session_id: sme session id
886 * @value: Allow/Reject AddBA session
887 *
888 * Allows/Rejects the ADDBA req session
889 *
890 * Return: 0 on success else errno
891 */
892int sme_set_addba_accept(tHalHandle hal, uint8_t session_id, int value);
893
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530894QDF_STATUS sme_init_thermal_info(tHalHandle hHal,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700895 tSmeThermalParams thermalParam);
896
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530897QDF_STATUS sme_set_thermal_level(tHalHandle hHal, uint8_t level);
898QDF_STATUS sme_txpower_limit(tHalHandle hHal, tSirTxPowerLimit *psmetx);
899QDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800900 void *plsContext,
901 void (*pCallbackfn)(tSirLinkSpeedInfo *indParam,
902 void *pContext));
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530903QDF_STATUS sme_modify_add_ie(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800904 tSirModifyIE *pModifyIE, eUpdateIEsType updateType);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530905QDF_STATUS sme_update_add_ie(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800906 tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530907QDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value);
Rajeev Kumar43e25b12016-04-15 16:26:36 -0700908const char *sme_bss_type_to_string(const uint8_t bss_type);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530909QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800910 bool disablefwd);
jiadbdefb252018-01-03 14:27:06 +0800911QDF_STATUS sme_get_channel_bonding_mode5_g(tHalHandle hHal, uint32_t *mode);
912QDF_STATUS sme_get_channel_bonding_mode24_g(tHalHandle hHal, uint32_t *mode);
Jeff Johnson45843652018-07-04 12:47:34 -0700913
Qiwei Caie689a262018-07-26 15:50:22 +0800914/**
915 * sme_send_unit_test_cmd() - send unit test command to lower layer
916 * @session_id: sme session id to be filled while forming the command
917 * @module_id: module id given by user to be filled in the command
918 * @arg_count: number of argument count
919 * @arg: pointer to argument list
920 *
921 * This API exposed to HDD layer which takes the argument from user and sends
922 * down to lower layer for further processing
923 *
924 * Return: QDF_STATUS based on overall success
925 */
926QDF_STATUS sme_send_unit_test_cmd(uint32_t vdev_id, uint32_t module_id,
927 uint32_t arg_count, uint32_t *arg);
928
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800929typedef struct sStatsExtRequestReq {
930 uint32_t request_data_len;
931 uint8_t *request_data;
932} tStatsExtRequestReq, *tpStatsExtRequestReq;
Jeff Johnson45843652018-07-04 12:47:34 -0700933
Qiwei Caie689a262018-07-26 15:50:22 +0800934#ifdef WLAN_FEATURE_STATS_EXT
lifeng66831662017-05-19 16:01:35 +0800935/**
Jeff Johnson45843652018-07-04 12:47:34 -0700936 * sme_stats_ext_register_callback() - Register stats ext callback
937 * @mac_handle: Opaque handle to the MAC context
938 * @callback: Function to be invoked for stats ext events
939 *
940 * This function is called to register the callback that send vendor
941 * event for stats ext
942 */
943void sme_stats_ext_register_callback(mac_handle_t mac_handle,
944 stats_ext_cb callback);
945
946/**
947 * sme_stats_ext_deregister_callback() - Deregister stats ext callback
948 * @mac_handle: Opaque handle to the MAC context
949 *
950 * This function is called to deregister the callback that send vendor
951 * event for stats ext
952 */
953void sme_stats_ext_deregister_callback(mac_handle_t mac_handle);
954
955/**
956 * sme_stats_ext2_register_callback() - Register stats ext2 callback
957 * @mac_handle: Opaque handle to the MAC context
958 * @callback: Function to be invoked for stats ext2 events
lifeng66831662017-05-19 16:01:35 +0800959 *
960 * This function will register a callback for frame aggregation failure
961 * indications processing.
962 *
963 * Return: void
964 */
965void sme_stats_ext2_register_callback(tHalHandle hal_handle,
Jeff Johnson45843652018-07-04 12:47:34 -0700966 stats_ext2_cb callback);
967
968QDF_STATUS sme_stats_ext_request(uint8_t session_id,
969 tpStatsExtRequestReq input);
Qiwei Caie689a262018-07-26 15:50:22 +0800970#else
971static inline void
972sme_stats_ext_register_callback(mac_handle_t mac_handle,
973 stats_ext_cb callback)
974{
975}
976
977static inline void
978sme_stats_ext2_register_callback(tHalHandle hal_handle,
979 stats_ext2_cb callback)
980{
981}
Jeff Johnson45843652018-07-04 12:47:34 -0700982#endif /* WLAN_FEATURE_STATS_EXT */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530983QDF_STATUS sme_update_dfs_scan_mode(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800984 uint8_t sessionId,
985 uint8_t allowDFSChannelRoam);
986uint8_t sme_get_dfs_scan_mode(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800987
988#ifdef FEATURE_WLAN_EXTSCAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530989QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, uint8_t wifiBand,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800990 uint32_t *aValidChannels,
991 uint8_t *pNumChannels);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530992QDF_STATUS sme_ext_scan_get_capabilities(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800993 tSirGetExtScanCapabilitiesReqParams *pReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530994QDF_STATUS sme_ext_scan_start(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800995 tSirWifiScanCmdReqParams *pStartCmd);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530996QDF_STATUS sme_ext_scan_stop(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800997 tSirExtScanStopReqParams *pStopReq);
Jeff Johnson1148cb02018-07-13 23:14:32 -0700998
999/**
1000 * sme_set_bss_hotlist() - SME API to set BSSID hotlist
1001 * @mac_handle: Opaque handle to the MAC context
1002 * @params: extscan set hotlist structure
1003 *
1004 * Handles the request to set the BSSID hotlist in firmware.
1005 *
1006 * Return: QDF_STATUS
1007 */
1008QDF_STATUS
1009sme_set_bss_hotlist(mac_handle_t mac_handle,
1010 struct extscan_bssid_hotlist_set_params *params);
1011
Jeff Johnson9743eb72018-07-14 10:30:04 -07001012/**
1013 * sme_reset_bss_hotlist() - SME API to reset BSSID hotlist
1014 * @mac_handle: Opaque handle to the MAC context
1015 * @params: extscan reset hotlist structure
1016 *
1017 * Handles the request to reset the BSSID hotlist in firmware.
1018 *
1019 * Return: QDF_STATUS
1020 */
1021QDF_STATUS
1022sme_reset_bss_hotlist(mac_handle_t mac_handle,
1023 struct extscan_bssid_hotlist_reset_params *params);
1024
Jeff Johnsonb43ed032018-07-16 06:59:21 -07001025/**
1026 * sme_set_significant_change() - SME API to set significant change
1027 * @mac_handle: Opaque handle to the MAC context
1028 * @params: extscan set significant change structure
1029 *
1030 * Return: QDF_STATUS
1031 */
1032QDF_STATUS
1033sme_set_significant_change(mac_handle_t mac_handle,
1034 struct extscan_set_sig_changereq_params *params);
1035
Jeff Johnson0c8dbc32018-07-16 22:10:48 -07001036/**
1037 * sme_reset_significant_change() - SME API to reset significant change
1038 * @mac_handle: Opaque handle to the MAC context
1039 * @params: extscan reset significant change structure
1040 *
1041 * Return: QDF_STATUS
1042 */
1043QDF_STATUS
1044sme_reset_significant_change(mac_handle_t mac_handle,
1045 struct extscan_capabilities_reset_params *params);
1046
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301047QDF_STATUS sme_get_cached_results(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001048 tSirExtScanGetCachedResultsReqParams *
1049 pCachedResultsReq);
1050
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301051QDF_STATUS sme_set_epno_list(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001052 struct wifi_epno_params *req_msg);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301053QDF_STATUS sme_set_passpoint_list(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001054 struct wifi_passpoint_req *req_msg);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301055QDF_STATUS sme_reset_passpoint_list(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001056 struct wifi_passpoint_req *req_msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001057
Jeff Johnson17b12392018-07-03 22:21:15 -07001058QDF_STATUS sme_ext_scan_register_callback(mac_handle_t mac_handle,
1059 ext_scan_ind_cb ext_scan_ind_cb);
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -08001060#else
Jeff Johnson17b12392018-07-03 22:21:15 -07001061static inline
1062QDF_STATUS sme_ext_scan_register_callback(mac_handle_t mac_handle,
1063 ext_scan_ind_cb ext_scan_ind_cb)
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -08001064{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301065 return QDF_STATUS_SUCCESS;
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -08001066}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001067#endif /* FEATURE_WLAN_EXTSCAN */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301068QDF_STATUS sme_abort_roam_scan(tHalHandle hHal, uint8_t sessionId);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001069#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301070QDF_STATUS sme_ll_stats_clear_req(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001071 tSirLLStatsClearReq * pclearStatsReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301072QDF_STATUS sme_ll_stats_set_req(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001073 tSirLLStatsSetReq *psetStatsReq);
Dundi Ravitejae232cf12018-05-16 18:34:34 +05301074
1075/**
1076 * sme_ll_stats_get_req() - SME API to get the Link Layer Statistics
1077 * @mac_handle: Global MAC handle
1078 * @get_stats_req: Link Layer get stats request params structure
1079 * @context: Callback context
1080 *
1081 * Return: QDF_STATUS
1082 */
1083QDF_STATUS sme_ll_stats_get_req(mac_handle_t mac_handle,
1084 tSirLLStatsGetReq *get_stats_req,
1085 void *context);
Jeff Johnson959f3692018-07-03 17:30:40 -07001086
1087/**
1088 * sme_set_link_layer_stats_ind_cb() -
1089 * SME API to trigger the stats are available after get request
1090 * @mac_handle: MAC handle
Dundi Ravitejae232cf12018-05-16 18:34:34 +05301091 * @callback: HDD callback which needs to be invoked after
Jeff Johnson959f3692018-07-03 17:30:40 -07001092 * getting status notification from FW
1093 *
1094 * Return: QDF_STATUS
1095 */
1096QDF_STATUS sme_set_link_layer_stats_ind_cb(mac_handle_t mac_handle,
1097 link_layer_stats_cb callback);
1098
Zhang Qiana6e9c102016-12-22 16:47:24 +08001099QDF_STATUS sme_set_link_layer_ext_cb(tHalHandle hal,
Jeff Johnson2d292122018-06-02 21:02:02 -07001100 void (*ll_stats_ext_cb)(hdd_handle_t callback_ctx,
Zhang Qiana6e9c102016-12-22 16:47:24 +08001101 tSirLLStatsResults * rsp));
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301102QDF_STATUS sme_reset_link_layer_stats_ind_cb(tHalHandle hhal);
Zhang Qian73c348a2017-03-13 16:15:55 +08001103QDF_STATUS sme_ll_stats_set_thresh(tHalHandle hal,
1104 struct sir_ll_ext_stats_threshold *threshold);
Qiwei Cai3719efe2018-06-11 21:09:29 +08001105#else /* WLAN_FEATURE_LINK_LAYER_STATS */
1106static inline QDF_STATUS
1107sme_set_link_layer_ext_cb(tHalHandle hal, void (*ll_stats_ext_cb)
1108 (hdd_handle_t callback_ctx, tSirLLStatsResults
1109 *rsp))
1110{
1111 return QDF_STATUS_SUCCESS;
1112}
1113
1114static inline QDF_STATUS
Jeff Johnson959f3692018-07-03 17:30:40 -07001115sme_set_link_layer_stats_ind_cb(mac_handle_t mac_handle,
1116 link_layer_stats_cb callback)
Qiwei Cai3719efe2018-06-11 21:09:29 +08001117{
1118 return QDF_STATUS_SUCCESS;
1119}
1120
1121static inline QDF_STATUS
1122sme_reset_link_layer_stats_ind_cb(tHalHandle hhal)
1123{
1124 return QDF_STATUS_SUCCESS;
1125}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001126#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
1127
Manikandan Mohan80dea792016-04-28 16:36:48 -07001128QDF_STATUS sme_set_wisa_params(tHalHandle hal,
1129 struct sir_wisa_params *wisa_params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001130#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301131QDF_STATUS sme_update_roam_offload_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001132 bool nRoamOffloadEnabled);
Deepak Dhamdheref2a7d8b2016-08-19 16:17:38 -07001133QDF_STATUS sme_update_roam_key_mgmt_offload_enabled(tHalHandle hal_ctx,
1134 uint8_t session_id,
1135 bool key_mgmt_offload_enabled,
Deepak Dhamdhere828f1892017-02-09 11:51:19 -08001136 struct pmkid_mode_bits *pmkid_modes);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001137#endif
1138#ifdef WLAN_FEATURE_NAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301139QDF_STATUS sme_nan_event(tHalHandle hHal, void *pMsg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001140#endif /* WLAN_FEATURE_NAN */
Jeff Johnsonca7a7162018-07-07 12:56:54 -07001141QDF_STATUS sme_get_link_status(mac_handle_t mac_handle,
1142 csr_link_status_callback callback,
1143 void *context, uint8_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301144QDF_STATUS sme_get_temperature(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001145 void *tempContext,
1146 void (*pCallbackfn)(int temperature,
1147 void *pContext));
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301148QDF_STATUS sme_set_scanning_mac_oui(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001149 tSirScanMacOui *pScanMacOui);
1150
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001151#ifdef DHCP_SERVER_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301152QDF_STATUS sme_set_dhcp_srv_offload(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001153 tSirDhcpSrvOffloadInfo * pDhcpSrvInfo);
1154#endif /* DHCP_SERVER_OFFLOAD */
1155#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301156QDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001157 uint32_t x0, uint32_t x1);
1158#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301159QDF_STATUS sme_handle_dfs_chan_scan(tHalHandle hHal, uint8_t dfs_flag);
Min Liu5eaf7242018-03-13 17:32:15 +08001160QDF_STATUS sme_enable_dfs_chan_scan(tHalHandle hHal, uint8_t dfs_flag);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301161QDF_STATUS sme_set_mas(uint32_t val);
1162QDF_STATUS sme_set_miracast(tHalHandle hal, uint8_t filter_type);
1163QDF_STATUS sme_ext_change_channel(tHalHandle hHal, uint32_t channel,
Abhishek Singh518323d2015-10-19 17:42:01 +05301164 uint8_t session_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001165
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301166QDF_STATUS sme_configure_stats_avg_factor(tHalHandle hal, uint8_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001167 uint16_t stats_avg_factor);
1168
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301169QDF_STATUS sme_configure_guard_time(tHalHandle hal, uint8_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001170 uint32_t guard_time);
1171
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301172QDF_STATUS sme_wifi_start_logger(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001173 struct sir_wifi_start_log start_log);
1174
1175bool sme_neighbor_middle_of_roaming(tHalHandle hHal,
1176 uint8_t sessionId);
1177
Padma, Santhosh Kumar86747ec2018-05-29 18:28:29 +05301178/*
1179 * sme_is_any_session_in_middle_of_roaming() - check if roaming is in progress
1180 * @hal: MAC Handle
1181 *
1182 * Checks if any SME session is in middle of roaming
1183 *
1184 * Return : true if roaming is in progress else false
1185 */
1186bool sme_is_any_session_in_middle_of_roaming(mac_handle_t hal);
1187
Jeff Johnsona1e92612017-09-24 15:33:44 -07001188/**
Jeff Johnson698eacd2018-05-12 17:00:03 -07001189 * sme_enable_uapsd_for_ac() - enable uapsd for access category request to WMA
Jeff Johnsona1e92612017-09-24 15:33:44 -07001190 * @sta_id: station id
Jeff Johnson698eacd2018-05-12 17:00:03 -07001191 * @ac: access category
Jeff Johnsona1e92612017-09-24 15:33:44 -07001192 * @tid: tid value
1193 * @pri: user priority
1194 * @srvc_int: service interval
1195 * @sus_int: suspend interval
1196 * @dir: tspec direction
1197 * @psb: PSB value
1198 * @sessionId: session id
1199 * @delay_interval: delay interval
1200 *
1201 * Return: QDF status
1202 */
1203QDF_STATUS sme_enable_uapsd_for_ac(uint8_t sta_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001204 sme_ac_enum_type ac, uint8_t tid,
1205 uint8_t pri, uint32_t srvc_int,
1206 uint32_t sus_int,
Abhishek Singh12be60f2017-08-11 13:52:42 +05301207 enum sme_qos_wmm_dir_type dir,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001208 uint8_t psb, uint32_t sessionId,
1209 uint32_t delay_interval);
1210
Jeff Johnsona1e92612017-09-24 15:33:44 -07001211/**
Jeff Johnson698eacd2018-05-12 17:00:03 -07001212 * sme_disable_uapsd_for_ac() - disable uapsd access category request to WMA
Jeff Johnsona1e92612017-09-24 15:33:44 -07001213 * @sta_id: station id
Jeff Johnson698eacd2018-05-12 17:00:03 -07001214 * @ac: access category
Jeff Johnsona1e92612017-09-24 15:33:44 -07001215 * @sessionId: session id
1216 *
1217 * Return: QDF status
1218 */
1219QDF_STATUS sme_disable_uapsd_for_ac(uint8_t sta_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001220 sme_ac_enum_type ac,
1221 uint32_t sessionId);
1222
Qiwei Caie689a262018-07-26 15:50:22 +08001223#ifdef FEATURE_RSSI_MONITOR
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301224QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001225 struct rssi_monitor_req *input);
Jeff Johnson3201e622018-07-04 10:05:18 -07001226
1227/**
1228 * sme_set_rssi_threshold_breached_cb() - Set RSSI threshold breached callback
1229 * @mac_handle: global MAC handle
1230 * @cb: callback function pointer
1231 *
1232 * This function registers the RSSI threshold breached callback function.
1233 *
1234 * Return: QDF_STATUS enumeration.
1235 */
1236QDF_STATUS sme_set_rssi_threshold_breached_cb(mac_handle_t mac_handle,
1237 rssi_threshold_breached_cb cb);
Qiwei Caie689a262018-07-26 15:50:22 +08001238#else /* FEATURE_RSSI_MONITOR */
1239static inline
1240QDF_STATUS sme_set_rssi_threshold_breached_cb(mac_handle_t mac_handle,
1241 rssi_threshold_breached_cb cb)
1242{
1243 return QDF_STATUS_SUCCESS;
1244}
1245#endif
Jeff Johnson3201e622018-07-04 10:05:18 -07001246/**
1247 * sme_reset_rssi_threshold_breached_cb() - Reset RSSI threshold breached
1248 * callback
1249 * @mac_handle: global MAC handle
1250 *
1251 * This function de-registers the RSSI threshold breached callback function.
1252 *
1253 * Return: QDF_STATUS enumeration.
1254 */
1255QDF_STATUS sme_reset_rssi_threshold_breached_cb(mac_handle_t mac_handle);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001256
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301257QDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal,
Abhishek Singh7996eb72015-12-30 17:24:02 +05301258 sir_mgmt_frame_ind_callback callback);
1259
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301260QDF_STATUS sme_update_nss(tHalHandle h_hal, uint8_t nss);
Archana Ramachandran5041b252016-04-25 14:29:25 -07001261void sme_update_user_configured_nss(tHalHandle hal, uint8_t nss);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001262
1263bool sme_is_any_session_in_connected_state(tHalHandle h_hal);
1264
Krunal Soni8a090df2018-05-03 15:02:54 -07001265QDF_STATUS sme_pdev_set_pcl(struct policy_mgr_pcl_list *msg);
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001266QDF_STATUS sme_pdev_set_hw_mode(struct policy_mgr_hw_mode msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001267void sme_register_hw_mode_trans_cb(tHalHandle hal,
1268 hw_mode_transition_cb callback);
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001269QDF_STATUS sme_nss_update_request(uint32_t vdev_id,
1270 uint8_t new_nss, policy_mgr_nss_update_cback cback,
1271 uint8_t next_action, struct wlan_objmgr_psoc *psoc,
1272 enum policy_mgr_conn_update_reason reason);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001273
1274typedef void (*sme_peer_authorized_fp) (uint32_t vdev_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301275QDF_STATUS sme_set_peer_authorized(uint8_t *peer_addr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001276 sme_peer_authorized_fp auth_fp,
1277 uint32_t vdev_id);
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001278QDF_STATUS sme_soc_set_dual_mac_config(struct policy_mgr_dual_mac_config msg);
Archana Ramachandrand41c3ed2016-02-10 15:48:06 -08001279QDF_STATUS sme_soc_set_antenna_mode(tHalHandle hal,
1280 struct sir_antenna_mode_param *msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001281
1282void sme_set_scan_disable(tHalHandle h_hal, int value);
1283void sme_setdef_dot11mode(tHalHandle hal);
1284
Amar Singhal7c1e8982016-05-19 15:08:09 -07001285QDF_STATUS sme_handle_set_fcc_channel(tHalHandle hHal,
Amar Singhal83a047a2016-05-19 15:56:11 -07001286 bool fcc_constraint,
1287 bool scan_pending);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001288
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301289QDF_STATUS sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001290 uint8_t session_id,
1291 uint32_t notify_id,
1292 int32_t val);
1293
Kiran Kumar Lokere6c7f3fa2018-05-14 18:12:27 -07001294/**
1295 * sme_update_tx_bfee_supp() - sets the Tx Bfee support
1296 * @hal: Pointer to HAL
1297 * @session_id: SME session id
1298 * @cfg_val: Tx Bfee config value
1299 *
1300 * Return: 0 on success else err code
1301 */
1302int sme_update_tx_bfee_supp(tHalHandle hal, uint8_t session_id,
1303 uint8_t cfg_val);
1304
Kiran Kumar Lokeref3044852018-06-27 14:14:24 -07001305/**
1306 * sme_update_tx_bfee_nsts() - sets the Tx Bfee nsts
1307 * @hal: MAC handle
1308 * @session_id: SME session id
1309 * @usr_cfg_val: user config value
1310 * @nsts_val: Tx Bfee nsts config value
1311 *
1312 * Return: 0 on success else err code
1313 */
1314int sme_update_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
1315 uint8_t usr_cfg_val, uint8_t nsts_val);
1316
bings10f26452018-01-21 15:37:46 +08001317void wlan_sap_enable_phy_error_logs(tHalHandle hal, uint32_t enable_log);
Agrawal Ashishb141b092016-09-02 19:59:26 +05301318#ifdef WLAN_FEATURE_DSRC
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001319void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p);
1320
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301321QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001322 ocb_callback callback,
1323 struct sir_ocb_config *config);
1324
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301325QDF_STATUS sme_ocb_set_utc_time(tHalHandle hHal, struct sir_ocb_utc *utc);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001326
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301327QDF_STATUS sme_ocb_start_timing_advert(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001328 struct sir_ocb_timing_advert *timing_advert);
1329
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301330QDF_STATUS sme_ocb_stop_timing_advert(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001331 struct sir_ocb_timing_advert *timing_advert);
1332
Naveen Rawatb4d37622015-11-13 16:15:25 -08001333int sme_ocb_gen_timing_advert_frame(tHalHandle hHal, tSirMacAddr self_addr,
1334 uint8_t **buf, uint32_t *timestamp_offset,
1335 uint32_t *time_value_offset);
1336
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301337QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001338 ocb_callback callback,
1339 struct sir_ocb_get_tsf_timer *request);
1340
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301341QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001342 ocb_callback callback,
1343 struct sir_dcc_get_stats *request);
1344
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301345QDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001346 uint32_t dcc_stats_bitmap);
1347
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301348QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001349 ocb_callback callback,
1350 struct sir_dcc_update_ndl *request);
1351
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301352QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001353 ocb_callback callback);
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301354QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal);
1355
Kiran Kumar Lokere1a43bcf2018-05-15 15:51:58 -07001356static inline void
1357sme_set_etsi13_srd_ch_in_master_mode(tHalHandle hal,
1358 bool etsi13_srd_chan_support)
1359{
1360}
Agrawal Ashishb141b092016-09-02 19:59:26 +05301361#else
1362static inline void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p)
1363{
1364 return;
1365}
1366
1367static inline QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context,
1368 ocb_callback callback,
1369 struct sir_ocb_config *config)
1370{
1371 return QDF_STATUS_SUCCESS;
1372}
1373
1374static inline QDF_STATUS sme_ocb_set_utc_time(struct sir_ocb_utc *utc)
1375{
1376 return QDF_STATUS_SUCCESS;
1377}
1378
1379static inline QDF_STATUS sme_ocb_start_timing_advert(
1380 struct sir_ocb_timing_advert *timing_advert)
1381{
1382 return QDF_STATUS_SUCCESS;
1383}
1384
1385static inline QDF_STATUS sme_ocb_stop_timing_advert(struct sir_ocb_timing_advert
1386 *timing_advert)
1387{
1388 return QDF_STATUS_SUCCESS;
1389}
1390
1391static inline int sme_ocb_gen_timing_advert_frame(tHalHandle hHal,
1392 tSirMacAddr self_addr, uint8_t **buf,
1393 uint32_t *timestamp_offset,
1394 uint32_t *time_value_offset)
1395{
1396 return 0;
1397}
1398
1399static inline QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context,
1400 ocb_callback callback,
1401 struct sir_ocb_get_tsf_timer *request)
1402{
1403 return QDF_STATUS_SUCCESS;
1404}
1405
1406static inline QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context,
1407 ocb_callback callback,
1408 struct sir_dcc_get_stats *request)
1409{
1410 return QDF_STATUS_SUCCESS;
1411}
1412
1413static inline QDF_STATUS sme_dcc_clear_stats(uint32_t vdev_id,
1414 uint32_t dcc_stats_bitmap)
1415{
1416 return QDF_STATUS_SUCCESS;
1417}
1418
1419static inline QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context,
1420 ocb_callback callback,
1421 struct sir_dcc_update_ndl *request)
1422{
1423 return QDF_STATUS_SUCCESS;
1424}
1425
1426static inline QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal,
1427 void *context, ocb_callback callback)
1428{
1429 return QDF_STATUS_SUCCESS;
1430}
1431static inline QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal)
1432{
1433 return QDF_STATUS_SUCCESS;
1434}
Kiran Kumar Lokere1a43bcf2018-05-15 15:51:58 -07001435
1436/**
1437 * sme_set_etsi13_srd_ch_in_master_mode() - master mode UNI-III band ch support
1438 * @hal: HAL pointer
1439 * @srd_chan_support: ETSI SRD channel support
1440 *
1441 * This function set master ETSI SRD channel support
1442 *
1443 * Return: None
1444 */
1445void sme_set_etsi13_srd_ch_in_master_mode(tHalHandle hal,
1446 bool etsi13_srd_chan_support);
Agrawal Ashishb141b092016-09-02 19:59:26 +05301447#endif
Kiran Kumar Lokere1a43bcf2018-05-15 15:51:58 -07001448
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001449void sme_add_set_thermal_level_callback(tHalHandle hal,
1450 sme_set_thermal_level_callback callback);
1451
Krishna Kumaar Natarajan052c6e62015-09-28 15:32:55 -07001452void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg);
Edhar, Mahesh Kumardf2ec122015-11-16 11:33:16 +05301453bool sme_validate_sap_channel_switch(tHalHandle hal,
1454 uint16_t sap_ch, eCsrPhyMode sap_phy_mode,
1455 uint8_t cc_switch_mode, uint8_t session_id);
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +05301456
Chandrasekaran, Manishekar2859de42016-02-11 16:17:38 +05301457bool sme_is_session_id_valid(tHalHandle hal, uint32_t session_id);
1458
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +05301459#ifdef FEATURE_WLAN_TDLS
1460void sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset,
1461 uint8_t *opclass);
1462#else
1463static inline void
1464sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset,
1465 uint8_t *opclass)
1466{
1467}
1468#endif
1469
Ravi Joshi61c3c7a2015-11-09 18:41:20 -08001470#ifdef FEATURE_LFR_SUBNET_DETECTION
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301471QDF_STATUS sme_gateway_param_update(tHalHandle hHal,
Ravi Joshi61c3c7a2015-11-09 18:41:20 -08001472 struct gateway_param_update_req *request);
1473#endif
1474
Selvaraj, Sridhar57bb4d02016-08-31 16:14:15 +05301475void sme_update_fine_time_measurement_capab(tHalHandle hal, uint8_t session_id,
1476 uint32_t val);
Sandeep Puligillae0875662016-02-12 16:09:21 -08001477QDF_STATUS sme_ht40_stop_obss_scan(tHalHandle hHal, uint32_t vdev_id);
Anurag Chouhanbf5e0e22016-09-12 12:54:09 +05301478QDF_STATUS sme_set_fw_test(struct set_fwtest_params *fw_test);
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001479QDF_STATUS sme_set_tsfcb(tHalHandle hHal,
1480 int (*cb_fn)(void *cb_ctx, struct stsf *ptsf), void *cb_ctx);
Krunal Sonie3531942016-04-12 17:43:53 -07001481
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301482QDF_STATUS sme_reset_tsfcb(tHalHandle h_hal);
1483
Manikandan Mohan976e7562016-03-15 16:33:31 -07001484#ifdef WLAN_FEATURE_TSF
1485QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue);
1486#else
1487static inline QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue)
1488{
1489 return QDF_STATUS_E_FAILURE;
1490}
1491#endif
1492
Archana Ramachandran20d2e232016-02-11 16:58:40 -08001493QDF_STATUS sme_update_mimo_power_save(tHalHandle hHal,
1494 uint8_t is_ht_smps_enabled,
Archana Ramachandranfec24812016-02-16 16:31:56 -08001495 uint8_t ht_smps_mode,
1496 bool send_smps_action);
Archana Ramachandran20d2e232016-02-11 16:58:40 -08001497
1498bool sme_is_sta_smps_allowed(tHalHandle hHal, uint8_t session_id);
Gupta, Kapil4cb1d7d2016-04-16 18:16:25 -07001499QDF_STATUS sme_add_beacon_filter(tHalHandle hal,
1500 uint32_t session_id, uint32_t *ie_map);
1501QDF_STATUS sme_remove_beacon_filter(tHalHandle hal, uint32_t session_id);
Arun Khandavalli2476ef52016-04-26 20:19:43 +05301502
Nachiket Kukade177b5b02018-05-22 20:52:17 +05301503#ifdef FEATURE_WLAN_APF
Jeff Johnsona867e0c2017-01-26 13:43:51 -08001504/**
Nachiket Kukade177b5b02018-05-22 20:52:17 +05301505 * sme_get_apf_capabilities() - Get APF capabilities
Jeff Johnsona867e0c2017-01-26 13:43:51 -08001506 * @hal: Global HAL handle
1507 * @callback: Callback function to be called with the result
1508 * @context: Opaque context to be used by the caller to associate the
1509 * request with the response
1510 *
1511 * This function constructs the cds message and fill in message type,
1512 * post the same to WDA.
1513 *
1514 * Return: QDF_STATUS enumeration
1515 */
Nachiket Kukade177b5b02018-05-22 20:52:17 +05301516QDF_STATUS sme_get_apf_capabilities(tHalHandle hal,
1517 apf_get_offload_cb callback,
1518 void *context);
Jeff Johnsona867e0c2017-01-26 13:43:51 -08001519
Nachiket Kukade177b5b02018-05-22 20:52:17 +05301520/**
1521 * sme_set_apf_instructions() - Set APF apf filter instructions.
1522 * @hal: HAL handle
1523 * @apf_set_offload: struct to set apf filter instructions.
1524 *
1525 * APFv2 (Legacy APF) API to set the APF packet filter.
1526 *
1527 * Return: QDF_STATUS enumeration.
1528 */
Nachiket Kukadee547a482018-05-22 16:43:30 +05301529QDF_STATUS sme_set_apf_instructions(tHalHandle hal,
Nachiket Kukade177b5b02018-05-22 20:52:17 +05301530 struct sir_apf_set_offload
1531 *apf_set_offload);
1532
1533/**
1534 * sme_set_apf_enable_disable - Send apf enable/disable cmd
1535 * @hal: global hal handle
1536 * @vdev_id: vdev id
1537 * @apf_enable: true: Enable APF Int., false: Disable APF Int.
1538 *
1539 * API to either enable or disable the APF interpreter.
1540 *
1541 * Return: QDF_STATUS enumeration.
1542 */
1543QDF_STATUS sme_set_apf_enable_disable(tHalHandle hal, uint8_t vdev_id,
1544 bool apf_enable);
1545
1546/**
1547 * sme_apf_write_work_memory - Write into the apf work memory
1548 * @hal: global hal handle
1549 * @write_params: APF parameters for the write operation
1550 *
1551 * API for writing into the APF work memory.
1552 *
1553 * Return: QDF_STATUS enumeration.
1554 */
1555QDF_STATUS sme_apf_write_work_memory(tHalHandle hal,
1556 struct wmi_apf_write_memory_params
1557 *write_params);
1558
1559/**
1560 * sme_apf_read_work_memory - Read part of apf work memory
1561 * @hal: global hal handle
1562 * @read_params: APF parameters for the get operation
1563 * @callback: callback to handle the the read response
1564 *
1565 * API for issuing a APF read memory request.
1566 *
1567 * Return: QDF_STATUS enumeration.
1568 */
1569QDF_STATUS
1570sme_apf_read_work_memory(tHalHandle hal,
1571 struct wmi_apf_read_memory_params *read_params,
1572 apf_read_mem_cb callback);
1573
1574#endif /* FEATURE_WLAN_APF */
1575
Abhishek Singh1c676222016-05-09 14:20:28 +05301576uint32_t sme_get_wni_dot11_mode(tHalHandle hal);
Rajeev Kumar Sirasanagandlae3b59912018-08-24 15:53:31 +05301577QDF_STATUS sme_create_mon_session(tHalHandle hal_handle, uint8_t *bssid,
1578 uint8_t vdev_id);
Gupta, Kapil96c7f2f2016-04-25 19:13:41 +05301579QDF_STATUS sme_set_adaptive_dwelltime_config(tHalHandle hal,
1580 struct adaptive_dwelltime_params *dwelltime_params);
Naveen Rawata410c5a2016-09-19 14:22:33 -07001581
1582void sme_set_vdev_ies_per_band(tHalHandle hal, uint8_t vdev_id);
Kiran Kumar Lokere666bf852016-05-02 12:23:02 -07001583void sme_set_pdev_ht_vht_ies(tHalHandle hHal, bool enable2x2);
1584
1585void sme_update_vdev_type_nss(tHalHandle hal, uint8_t max_supp_nss,
Varun Reddy Yeturua48bc412017-11-17 15:33:35 -08001586 uint32_t vdev_type_nss, enum band_info band);
Nitesh Shahdb5ea0d2017-03-22 15:17:47 +05301587void sme_update_hw_dbs_capable(tHalHandle hal, uint8_t hw_dbs_capable);
Rachit Kankane026e77a2018-07-31 16:21:09 +05301588#ifdef FEATURE_P2P_LISTEN_OFFLOAD
Peng Xu8fdaa492016-06-22 10:20:47 -07001589void sme_register_p2p_lo_event(tHalHandle hHal, void *context,
1590 p2p_lo_callback callback);
Rachit Kankane026e77a2018-07-31 16:21:09 +05301591#else
1592static inline void sme_register_p2p_lo_event(tHalHandle hHal,
1593 void *context,
1594 p2p_lo_callback callback)
1595{
1596}
1597#endif
Manjeet Singhf82ed072016-07-08 11:40:00 +05301598
Abhishek Singhc9941602016-08-09 16:06:22 +05301599QDF_STATUS sme_remove_bssid_from_scan_list(tHalHandle hal,
1600 tSirMacAddr bssid);
1601
Manjeet Singhf82ed072016-07-08 11:40:00 +05301602QDF_STATUS sme_process_mac_pwr_dbg_cmd(tHalHandle hal, uint32_t session_id,
1603 struct sir_mac_pwr_dbg_cmd*
1604 dbg_args);
1605
Jeff Johnsonc1e62782017-11-09 09:50:17 -08001606void sme_get_vdev_type_nss(enum QDF_OPMODE dev_mode,
1607 uint8_t *nss_2g, uint8_t *nss_5g);
Masti, Narayanraddiab712a72016-08-04 11:59:11 +05301608QDF_STATUS sme_roam_set_default_key_index(tHalHandle hal, uint8_t session_id,
1609 uint8_t default_idx);
Kondabattini, Ganesh3f2d02c2016-09-13 12:23:47 +05301610void sme_send_disassoc_req_frame(tHalHandle hal, uint8_t session_id, uint8_t
1611 *peer_mac, uint16_t reason, uint8_t
1612 wait_for_ack);
Kondabattini, Ganeshe4f18e02016-09-13 13:01:22 +05301613QDF_STATUS sme_update_access_policy_vendor_ie(tHalHandle hal,
1614 uint8_t session_id, uint8_t *vendor_ie,
1615 int access_policy);
1616
Krishna Kumaar Natarajanf1581df2017-02-21 13:42:08 -08001617/**
1618 * sme_set_peer_param() - set peer param
1619 * @vdev_id: vdev ID
1620 * @peer_addr: peer MAC address
1621 * @param_id: param ID to be updated
1622 * @param_Value: paraam value
1623 *
1624 * This SME API is used to send the peer param to WMA to be sent to FW.
1625 *
1626 * Return: QDF_STATUS
1627 */
1628QDF_STATUS sme_set_peer_param(uint8_t *peer_addr, uint32_t param_id,
1629 uint32_t param_value, uint32_t vdev_id);
1630
Agrawal Ashish21ba2572016-09-03 16:40:10 +05301631QDF_STATUS sme_update_sta_roam_policy(tHalHandle hal,
1632 enum sta_roam_policy_dfs_mode dfs_mode,
1633 bool skip_unsafe_channels,
Agrawal, Ashish9f84c402016-11-30 16:19:44 +05301634 uint8_t session_id, uint8_t sap_operating_band);
Selvaraj, Sridharebda0f22016-08-29 16:05:23 +05301635QDF_STATUS sme_enable_disable_chanavoidind_event(tHalHandle hal,
1636 uint8_t set_value);
Deepak Dhamdhereb106ae52016-08-10 20:55:30 +05301637QDF_STATUS sme_set_default_scan_ie(tHalHandle hal, uint16_t session_id,
1638 uint8_t *ie_data, uint16_t ie_len);
Selvaraj, Sridhar7231c5f2016-09-28 12:42:33 +05301639/**
1640 * sme_update_session_param() - API to update PE session param
1641 * @hal: HAL handle for device
1642 * @session_id: Session ID
1643 * @param_type: Param type to be updated
1644 * @param_val: Param value to be update
1645 *
1646 * Note: this setting will not persist over reboots.
1647 *
1648 * Return: QDF_STATUS
1649 */
1650QDF_STATUS sme_update_session_param(tHalHandle hal, uint8_t session_id,
1651 uint32_t param_type, uint32_t param_val);
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301652
Vignesh Viswanathan32761e42017-09-25 17:10:54 +05301653/**
1654 * sme_update_fils_setting() - API to update PE FILS setting
1655 * @hal: HAL handle for device
1656 * @session_id: Session ID
1657 * @param_val: Param value to be update
1658 *
1659 * Return: QDF_STATUS
1660 */
1661QDF_STATUS sme_update_fils_setting(tHalHandle hal, uint8_t session_id,
1662 uint8_t param_val);
Jeff Johnson6136fb92017-03-30 15:21:49 -07001663#ifdef WLAN_FEATURE_FIPS
1664/**
1665 * sme_fips_request() - Perform a FIPS certification operation
1666 * @hal: Hal handle for the object being certified
1667 * @param: The FIPS certification parameters
1668 * @callback: Callback function to invoke with the results
1669 * @context: Opaque context to pass back to caller in the callback
1670 *
1671 * Return: QDF_STATUS_SUCCESS if the request is successfully sent
1672 * to firmware for processing, otherwise an error status.
1673 */
1674QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param,
1675 wma_fips_cb callback, void *context);
1676#else
1677static inline
1678QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param,
1679 wma_fips_cb callback, void *context)
1680{
1681 return QDF_STATUS_E_NOSUPPORT;
1682}
1683#endif /* WLAN_FEATURE_FIPS */
1684
Agrawal Ashishb2d1a452016-05-05 12:23:58 +05301685/**
1686 * sme_set_cts2self_for_p2p_go() - sme function to set ini parms to FW.
1687 * @hal: reference to the HAL
1688 *
1689 * Return: QDF_STATUS
1690 */
1691QDF_STATUS sme_set_cts2self_for_p2p_go(tHalHandle hal);
Kiran Kumar Lokere1aa9c9a2016-10-05 18:50:59 -07001692void sme_set_prefer_80MHz_over_160MHz(tHalHandle hal,
1693 bool sta_prefer_80MHz_over_160MHz);
Agrawal, Ashish35b251d2016-09-08 19:21:03 +05301694QDF_STATUS sme_update_tx_fail_cnt_threshold(tHalHandle hal_handle,
1695 uint8_t session_id, uint32_t tx_fail_count);
Agrawal Ashishda3e9502016-09-21 17:43:51 +05301696QDF_STATUS sme_update_short_retry_limit_threshold(tHalHandle hal_handle,
1697 struct sme_short_retry_limit *short_retry_limit_th);
1698QDF_STATUS sme_update_long_retry_limit_threshold(tHalHandle hal_handle,
1699 struct sme_long_retry_limit *long_retry_limit_th);
yeshwanth sriram guntukaa1ba9a22017-02-28 16:17:32 +05301700/**
1701 * sme_roam_is_ese_assoc() - Check if association type is ESE
1702 * @roam_info: Pointer to roam info
1703 *
1704 * Return: true if ESE Association, false otherwise.
1705 */
1706#ifdef FEATURE_WLAN_ESE
Jeff Johnson172237b2017-11-07 15:32:59 -08001707bool sme_roam_is_ese_assoc(struct csr_roam_info *roam_info);
yeshwanth sriram guntukaa1ba9a22017-02-28 16:17:32 +05301708#else
Jeff Johnson172237b2017-11-07 15:32:59 -08001709static inline bool sme_roam_is_ese_assoc(struct csr_roam_info *roam_info)
yeshwanth sriram guntukaa1ba9a22017-02-28 16:17:32 +05301710{
1711 return false;
1712}
1713#endif
1714/**
1715 * sme_neighbor_roam_is11r_assoc() - Check if association type is 11R
1716 * @hal_ctx: HAL handle
1717 * @session_id: session id
1718 *
1719 * Return: true if 11r Association, false otherwise.
1720 */
1721bool sme_neighbor_roam_is11r_assoc(tHalHandle hal_ctx, uint8_t session_id);
Agrawal, Ashish4e5fa1c2016-09-21 19:03:43 +05301722
1723/**
1724 * sme_update_sta_inactivity_timeout(): Update sta_inactivity_timeout to FW
1725 * @hal: Handle returned by mac_open
1726 * @sta_inactivity_timer: struct for sta inactivity timer
1727 *
1728 * If a station does not send anything in sta_inactivity_timeout seconds, an
1729 * empty data frame is sent to it in order to verify whether it is
1730 * still in range. If this frame is not ACKed, the station will be
1731 * disassociated and then deauthenticated.
1732 *
1733 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1734*/
1735QDF_STATUS sme_update_sta_inactivity_timeout(tHalHandle hal_handle,
1736 struct sme_sta_inactivity_timeout *sta_inactivity_timer);
1737
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +05301738/**
1739 * sme_set_lost_link_info_cb() - plug in callback function for receiving
Jeff Johnsondc198ec2018-07-04 17:39:53 -07001740 * @mac_handle: Opaque handle to the MAC context
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +05301741 * @cb: callback function
1742 *
1743 * Return: HAL status
1744 */
Jeff Johnsondc198ec2018-07-04 17:39:53 -07001745QDF_STATUS sme_set_lost_link_info_cb(mac_handle_t mac_handle,
1746 lost_link_info_cb cb);
Yingying Tang95409972016-10-20 15:16:15 +08001747
Kapil Gupta8878ad92017-02-13 11:56:04 +05301748/**
1749 * sme_update_new_channel_event() - update new channel event for sapFsm
1750 * @hal: HAL handle
1751 * @session_id: session id
1752 *
1753 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1754 */
1755QDF_STATUS sme_update_new_channel_event(tHalHandle hal, uint8_t session_id);
Sridhar Selvarajdc400d22016-10-18 17:18:03 +05301756#ifdef WLAN_POWER_DEBUGFS
1757QDF_STATUS sme_power_debug_stats_req(tHalHandle hal, void (*callback_fn)
1758 (struct power_stats_response *response,
1759 void *context), void *power_stats_context);
1760#endif
Jeff Johnsonf0e54b02017-12-18 15:22:25 -08001761
1762/**
1763 * sme_get_sar_power_limits() - get SAR limits
1764 * @hal: HAL handle
1765 * @callback: Callback function to invoke with the results
1766 * @context: Opaque context to pass back to caller in the callback
1767 *
1768 * Return: QDF_STATUS_SUCCESS if the request is successfully sent
1769 * to firmware for processing, otherwise an error status.
1770 */
1771QDF_STATUS sme_get_sar_power_limits(tHalHandle hal,
1772 wma_sar_cb callback, void *context);
1773
Kabilan Kannan3c0a7352016-12-02 18:49:38 -08001774/**
1775 * sme_set_sar_power_limits() - set sar limits
1776 * @hal: HAL handle
1777 * @sar_limit_cmd: struct to send sar limit cmd.
1778 *
1779 * Return: QDF_STATUS enumeration.
1780 */
1781QDF_STATUS sme_set_sar_power_limits(tHalHandle hal,
1782 struct sar_limit_cmd_params *sar_limit_cmd);
Jeff Johnsonf0e54b02017-12-18 15:22:25 -08001783
Amar Singhal6edf9732016-11-20 21:43:40 -08001784void sme_set_cc_src(tHalHandle hal_handle, enum country_src);
Yingying Tang95409972016-10-20 15:16:15 +08001785
1786
1787#ifdef WLAN_FEATURE_WOW_PULSE
1788QDF_STATUS sme_set_wow_pulse(struct wow_pulse_mode *wow_pulse_set_info);
1789#endif
1790
Anurag Chouhan3920c0f2017-09-11 17:10:56 +05301791/* ARP DEBUG STATS */
1792QDF_STATUS sme_set_nud_debug_stats(tHalHandle hal,
1793 struct set_arp_stats_params
1794 *set_stats_param);
1795QDF_STATUS sme_get_nud_debug_stats(tHalHandle hal,
1796 struct get_arp_stats_params
1797 *get_stats_param);
1798QDF_STATUS sme_set_nud_debug_stats_cb(tHalHandle hal,
Dundi Raviteja3bcf3a82018-05-22 13:24:18 +05301799 void (*cb)(void *, struct rsp_stats *, void *context),
1800 void *context);
Anurag Chouhan3920c0f2017-09-11 17:10:56 +05301801
Kapil Gupta4f0c0c12017-02-07 15:21:15 +05301802/**
1803 * sme_set_chan_info_callback() - Register chan info callback
1804 * @hal - MAC global handle
1805 * @callback_routine - callback routine from HDD
1806 *
1807 * This API is invoked by HDD to register its callback to mac
1808 *
1809 * Return: QDF_STATUS
1810 */
1811void sme_set_chan_info_callback(tHalHandle hal_handle,
1812 void (*callback)(struct scan_chan_info *chan_info));
Naveen Rawat664a7cb2017-01-19 17:58:14 -08001813
1814/**
Hanumanth Reddy Pothula90051782017-05-04 22:14:43 +05301815 * sme_get_rssi_snr_by_bssid() - gets the rssi and snr by bssid from scan cache
1816 * @hal: handle returned by mac_open
1817 * @profile: current connected profile
1818 * @bssid: bssid to look for in scan cache
1819 * @rssi: rssi value found
1820 * @snr: snr value found
1821 *
1822 * Return: QDF_STATUS
1823 */
Jeff Johnson66ee8a92018-03-17 15:24:26 -07001824QDF_STATUS sme_get_rssi_snr_by_bssid(tHalHandle hal,
1825 struct csr_roam_profile *profile,
Hanumanth Reddy Pothula90051782017-05-04 22:14:43 +05301826 const uint8_t *bssid, int8_t *rssi,
1827 int8_t *snr);
1828
1829/**
Naveen Rawat664a7cb2017-01-19 17:58:14 -08001830 * sme_get_beacon_frm() - gets the bss descriptor from scan cache and prepares
1831 * beacon frame
1832 * @hal: handle returned by mac_open
1833 * @profile: current connected profile
1834 * @bssid: bssid to look for in scan cache
1835 * @frame_buf: frame buffer to populate
1836 * @frame_len: length of constructed frame
Selvaraj, Sridhar64b0a9c2017-05-11 16:50:15 +05301837 * @channel: Pointer to channel info to be filled
Naveen Rawat664a7cb2017-01-19 17:58:14 -08001838 *
1839 * Return: QDF_STATUS
1840 */
Jeff Johnson66ee8a92018-03-17 15:24:26 -07001841QDF_STATUS sme_get_beacon_frm(tHalHandle hal, struct csr_roam_profile *profile,
1842 const tSirMacAddr bssid,
1843 uint8_t **frame_buf, uint32_t *frame_len,
1844 int *channel);
Paul Zhangc3fc0a82018-01-09 16:38:20 +08001845
1846#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Naveen Rawat4195c5e2017-05-22 17:07:45 -07001847/**
1848 * sme_fast_reassoc() - invokes FAST REASSOC command
1849 * @hal: handle returned by mac_open
1850 * @profile: current connected profile
1851 * @bssid: bssid to look for in scan cache
1852 * @channel: channel on which reassoc should be send
1853 * @vdev_id: vdev id
Krunal Soni332f4af2017-06-01 14:36:17 -07001854 * @connected_bssid: bssid of currently connected profile
Naveen Rawat4195c5e2017-05-22 17:07:45 -07001855 *
1856 * Return: QDF_STATUS
1857 */
Jeff Johnson66ee8a92018-03-17 15:24:26 -07001858QDF_STATUS sme_fast_reassoc(tHalHandle hal, struct csr_roam_profile *profile,
Naveen Rawat4195c5e2017-05-22 17:07:45 -07001859 const tSirMacAddr bssid, int channel,
Krunal Soni332f4af2017-06-01 14:36:17 -07001860 uint8_t vdev_id, const tSirMacAddr connected_bssid);
Paul Zhangc3fc0a82018-01-09 16:38:20 +08001861#endif
Padma, Santhosh Kumar16dacfb2017-03-21 19:05:40 +05301862/**
Jeff Johnsonf6182e42018-07-03 14:46:17 -07001863 * sme_congestion_register_callback() - registers congestion callback
Padma, Santhosh Kumar16dacfb2017-03-21 19:05:40 +05301864 * @hal: handler for HAL
1865 * @congestion_cb: congestion callback
1866 *
1867 * Return: QDF_STATUS
1868 */
1869QDF_STATUS sme_congestion_register_callback(tHalHandle hal,
Jeff Johnsonf6182e42018-07-03 14:46:17 -07001870 congestion_cb congestion_cb);
Padma, Santhosh Kumar16dacfb2017-03-21 19:05:40 +05301871
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001872/**
Varun Reddy Yeturu076eaa82018-01-16 12:16:14 -08001873 * sme_register_tx_queue_cb(): Register tx queue callback
Jeff Johnsonda2afa42018-07-04 10:25:42 -07001874 * @mac_handle: Opaque handle for MAC context
Varun Reddy Yeturu076eaa82018-01-16 12:16:14 -08001875 * @tx_queue_cb: Transmit Queues callback
1876 *
1877 * Return: QDF_STATUS
1878 */
Jeff Johnsonda2afa42018-07-04 10:25:42 -07001879QDF_STATUS sme_register_tx_queue_cb(mac_handle_t mac_handle,
1880 tx_queue_cb tx_queue_cb);
Varun Reddy Yeturu076eaa82018-01-16 12:16:14 -08001881
1882/**
1883 * sme_deregister_tx_queue_cb() - Deregister the tx queue callback
Jeff Johnsonda2afa42018-07-04 10:25:42 -07001884 * @mac_handle: Opaque handle for MAC context
Varun Reddy Yeturu076eaa82018-01-16 12:16:14 -08001885 *
1886 * Return: QDF status
1887 */
Jeff Johnsonda2afa42018-07-04 10:25:42 -07001888QDF_STATUS sme_deregister_tx_queue_cb(mac_handle_t mac_handle);
Varun Reddy Yeturu076eaa82018-01-16 12:16:14 -08001889
1890/**
Sreelakshmi Konamki88a2a412017-04-14 15:11:55 +05301891 * sme_rso_cmd_status_cb() - Set RSO cmd status callback
Jeff Johnson43975142018-07-04 15:33:47 -07001892 * @mac_handle: Opaque handle for the MAC context
1893 * @cb: HDD Callback to rso command status read
Sreelakshmi Konamki88a2a412017-04-14 15:11:55 +05301894 *
1895 * This function is used to save HDD RSO Command status callback in MAC
1896 *
1897 * Return: QDF_STATUS
1898 */
Jeff Johnson43975142018-07-04 15:33:47 -07001899QDF_STATUS sme_rso_cmd_status_cb(mac_handle_t mac_handle,
1900 rso_cmd_status_cb cb);
Sreelakshmi Konamki88a2a412017-04-14 15:11:55 +05301901
1902/**
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001903 * sme_register_set_connection_info_cb() - Register connection
1904 * info callback
1905 * @hal - MAC global handle
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001906 * @set_connection_info_cb - callback routine from HDD to set
1907 * connection info flag
1908 * @get_connection_info_cb - callback routine from HDD to get
1909 * connection info
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001910 *
1911 * This API is invoked by HDD to register its callback to mac
1912 *
1913 * Return: QDF_STATUS
1914 */
1915QDF_STATUS sme_register_set_connection_info_cb(tHalHandle hHal,
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001916 bool (*set_connection_info_cb)(bool),
1917 bool (*get_connection_info_cb)(uint8_t *session_id,
1918 enum scan_reject_states *reason));
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001919
Kiran Kumar Lokerea3de2262017-04-12 12:15:04 -07001920/**
Nitesh Shahf9a09ff2017-05-22 15:46:25 +05301921 * sme_set_dbs_scan_selection_config() - Update DBS scan selection
1922 * configuration
1923 * @hal: The handle returned by macOpen
1924 * @params: wmi_dbs_scan_sel_params config
1925 *
1926 * Return: QDF_STATUS if DBS scan selection update
1927 * configuration success else failure status
1928 */
1929QDF_STATUS sme_set_dbs_scan_selection_config(tHalHandle hal,
1930 struct wmi_dbs_scan_sel_params *params);
1931
1932/**
Kiran Kumar Lokerea3de2262017-04-12 12:15:04 -07001933 * sme_store_pdev() - store pdev
1934 * @hal - MAC global handle
1935 * @pdev - pdev ptr
1936 *
1937 * Return: QDF_STATUS
1938 */
1939void sme_store_pdev(tHalHandle hal, struct wlan_objmgr_pdev *pdev);
1940
Sandeep Puligillaf587adf2017-04-27 19:53:21 -07001941/**
1942 * sme_ipa_uc_stat_request() - set ipa config parameters
1943 * @vdev_id: virtual device for the command
1944 * @param_id: parameter id
1945 * @param_val: parameter value
1946 * @req_cat: parameter category
1947 *
1948 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1949 */
1950QDF_STATUS sme_ipa_uc_stat_request(tHalHandle hal,
1951 uint32_t vdev_id, uint32_t param_id,
1952 uint32_t param_val, uint32_t req_cat);
lifeng66831662017-05-19 16:01:35 +08001953
1954/**
1955 * sme_set_reorder_timeout() - set reorder timeout value
1956 * including Voice,Video,Besteffort,Background parameters
1957 * @hal: hal handle for getting global mac struct
1958 * @reg: struct sir_set_rx_reorder_timeout_val
1959 *
1960 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1961 */
1962QDF_STATUS sme_set_reorder_timeout(tHalHandle hal,
1963 struct sir_set_rx_reorder_timeout_val *req);
1964
1965/**
1966 * sme_set_rx_set_blocksize() - set blocksize value
1967 * including mac_addr and win_limit parameters
1968 * @hal: hal handle for getting global mac struct
1969 * @reg: struct sir_peer_set_rx_blocksize
1970 *
1971 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1972 */
1973
1974QDF_STATUS sme_set_rx_set_blocksize(tHalHandle hal,
1975 struct sir_peer_set_rx_blocksize *req);
1976
Rajeev Kumar Sirasanagandla996e5292016-11-22 21:20:33 +05301977/**
1978 * sme_get_rcpi() - gets the rcpi value for peer mac addr
1979 * @hal: handle returned by mac_open
1980 * @rcpi: rcpi request containing peer mac addr, callback and related info
1981 *
1982 * This function posts the rcpi measurement request message to wma queue
1983 *
1984 * Return: QDF_STATUS
1985 */
1986QDF_STATUS sme_get_rcpi(tHalHandle hal, struct sme_rcpi_req *rcpi);
1987
Jeff Johnsonb7fa2562018-07-02 08:36:17 -07001988/**
Ravi Kumar Bokka05c14e52017-03-27 14:48:23 +05301989 * sme_set_chip_pwr_save_fail_cb() - set chip power save failure callback
Jeff Johnsonb7fa2562018-07-02 08:36:17 -07001990 * @mac_handle: opaque handle to the MAC context
Ravi Kumar Bokka05c14e52017-03-27 14:48:23 +05301991 * @cb: callback function pointer
1992 *
1993 * This function stores the chip power save failure callback function.
1994 *
1995 * Return: QDF_STATUS enumeration.
1996 */
1997
Jeff Johnsonb7fa2562018-07-02 08:36:17 -07001998QDF_STATUS sme_set_chip_pwr_save_fail_cb(mac_handle_t mac_handle,
1999 pwr_save_fail_cb cb);
Naveen Rawat247a8682017-06-05 15:00:31 -07002000/**
2001 * sme_cli_set_command() - SME wrapper API over WMA "set" command
2002 * processor cmd
2003 * @vdev_id: virtual device for the command
2004 * @param_id: parameter id
2005 * @sval: parameter value
2006 * @vpdev: parameter category
2007 *
2008 * Command handler for set operations
2009 *
2010 * Return: 0 on success, errno on failure
2011 */
2012int sme_cli_set_command(int vdev_id, int param_id, int sval, int vpdev);
Ravi Kumar Bokka05c14e52017-03-27 14:48:23 +05302013
Vidyullatha Kanchanapallybe0ebb32017-03-23 14:36:21 +05302014/**
2015 * sme_set_bt_activity_info_cb - set the callback handler for bt events
Jeff Johnsond0b6c7e2018-07-04 14:53:06 -07002016 * @mac_handle: handle returned by mac_open
Vidyullatha Kanchanapallybe0ebb32017-03-23 14:36:21 +05302017 * @cb: callback handler
2018 *
2019 * Return: QDF_STATUS
2020 */
Jeff Johnsond0b6c7e2018-07-04 14:53:06 -07002021QDF_STATUS sme_set_bt_activity_info_cb(mac_handle_t mac_handle,
2022 bt_activity_info_cb cb);
Vidyullatha Kanchanapallybe0ebb32017-03-23 14:36:21 +05302023
Will Huang558f8082017-05-31 16:22:24 +08002024/**
Ashish Kumar Dhanotiyab28338c2017-07-21 20:12:34 +05302025 * sme_set_smps_cfg() - set SMPS config params
2026 * @vdev_id: virtual device for the command
2027 * @param_id: parameter id
2028 * @param_val: parameter value
2029 *
2030 * Return: QDF_STATUS_SUCCESS or non-zero on failure
2031 */
2032
2033QDF_STATUS sme_set_smps_cfg(uint32_t vdev_id, uint32_t param_id,
2034 uint32_t param_val);
Ashish Kumar Dhanotiya443d31f2017-10-13 12:41:19 +05302035
2036/**
2037 * sme_get_peer_stats() - sme api to post peer info request
2038 * @mac: mac handle
2039 * @req: peer info request struct send to wma
2040 *
2041 * Return: QDF_STATUS_SUCCESS or non-zero on failure
2042 */
2043
2044QDF_STATUS sme_get_peer_stats(tpAniSirGlobal mac,
2045 struct sir_peer_info_req req);
2046
Ashish Kumar Dhanotiyab28338c2017-07-21 20:12:34 +05302047/**
Will Huang558f8082017-05-31 16:22:24 +08002048 * sme_get_peer_info() - sme api to get peer info
2049 * @hal: hal handle for getting global mac struct
2050 * @req: peer info request struct send to wma
2051 * @context: context of callback function
2052 * @callbackfn: hdd callback function when receive response
2053 *
2054 * This function will send WMA_GET_PEER_INFO to WMA
2055 *
2056 * Return: QDF_STATUS_SUCCESS or non-zero on failure
2057 */
2058QDF_STATUS sme_get_peer_info(tHalHandle hal,
2059 struct sir_peer_info_req req,
2060 void *context,
2061 void (*callbackfn)(struct sir_peer_info_resp *param,
2062 void *pcontext));
2063
2064/**
2065 * sme_get_peer_info_ext() - sme api to get peer ext info
2066 * @hal: hal handle for getting global mac struct
2067 * @req: peer ext info request struct send to wma
2068 * @context: context of callback function
2069 * @callbackfn: hdd callback function when receive response
2070 *
2071 * This function will send WMA_GET_PEER_INFO_EXT to WMA
2072 *
2073 * Return: QDF_STATUS_SUCCESS or non-zero on failure
2074 */
2075QDF_STATUS sme_get_peer_info_ext(tHalHandle hal,
2076 struct sir_peer_info_ext_req *req,
2077 void *context,
2078 void (*callbackfn)(struct sir_peer_info_ext_resp *param,
2079 void *pcontext));
Manjeet Singha9cae432017-02-28 11:58:22 +05302080
Tushnim Bhattacharyya518e80f2017-08-30 17:35:33 -07002081/**
2082 * sme_set_5g_band_pref() - sme api to set 5Ghz preference
2083 * @hal: hal handle for getting global mac struct
2084 * @pref_params: preference info request struct
2085 *
2086 * This function will set 5Ghz preference for STA connection
2087 *
2088 * Return: None
2089 */
Manjeet Singha9cae432017-02-28 11:58:22 +05302090void sme_set_5g_band_pref(tHalHandle hal_handle,
2091 struct sme_5g_band_pref_params *pref_params);
lifengd217d192017-05-09 19:44:16 +08002092/**
2093 * sme_get_chain_rssi() - Get chain rssi
2094 * @hal: Global HAL handle
2095 * @input: get chain rssi req params
2096 * @callback: Callback function to be called with the result
2097 * @context: Opaque context to be used by the caller to associate the
2098 * request with the response
2099 *
2100 * This function constructs the cds message and fill in message type,
2101 * post the same to WDA.
2102 *
2103 * Return: QDF_STATUS enumeration
2104 */
2105QDF_STATUS sme_get_chain_rssi(tHalHandle hal,
2106 struct get_chain_rssi_req_params *input,
2107 get_chain_rssi_callback callback,
2108 void *context);
Tushnim Bhattacharyyac3c375e2017-08-04 23:39:55 -07002109
2110/**
2111 * sme_get_valid_channels() - sme api to get valid channels for
2112 * current regulatory domain
2113 * @chan_list: list of the valid channels
2114 * @list_len: length of the channel list
2115 *
2116 * This function will get valid channels for current regulatory
2117 * domain
2118 *
2119 * Return: QDF_STATUS_SUCCESS or non-zero on failure
2120 */
2121QDF_STATUS sme_get_valid_channels(uint8_t *chan_list, uint32_t *list_len);
Tushnim Bhattacharyya518e80f2017-08-30 17:35:33 -07002122
2123/**
2124 * sme_get_mac_context() - sme api to get the pmac context
2125 *
2126 * This function will return the pmac context
2127 *
2128 * Return: pointer to pmac context
2129 */
2130tpAniSirGlobal sme_get_mac_context(void);
Vignesh Viswanathan66c951d2017-09-06 12:23:42 +05302131
2132/**
2133 * sme_display_disconnect_stats() - Display per session Disconnect stats
2134 * @hal: hal global context
2135 * session_id: SME session id
2136 *
2137 * Return: None
2138 */
2139void sme_display_disconnect_stats(tHalHandle hal, uint8_t session_id);
Sandeep Puligilla1426d612017-04-12 18:22:06 -07002140
2141/**
2142 * sme_process_msg_callback() - process callback message from LIM
Jeff Johnson5f9ce2d2018-06-09 21:20:45 -07002143 * @mac: global mac context
Sandeep Puligilla1426d612017-04-12 18:22:06 -07002144 * @msg: scheduler message
2145 *
2146 * This function process the callback messages from LIM.
2147 *
2148 * Return: QDF_STATUS enumeration.
2149 */
Jeff Johnson5f9ce2d2018-06-09 21:20:45 -07002150QDF_STATUS sme_process_msg_callback(tpAniSirGlobal mac,
2151 struct scheduler_msg *msg);
Nachiket Kukadeaaf8a712017-07-27 19:15:36 +05302152
2153/**
2154 * sme_set_bmiss_bcnt() - set bmiss config parameters
2155 * @vdev_id: virtual device for the command
2156 * @first_cnt: bmiss first value
2157 * @final_cnt: bmiss final value
2158 *
2159 * Return: QDF_STATUS_SUCCESS or non-zero on failure
2160 */
2161QDF_STATUS sme_set_bmiss_bcnt(uint32_t vdev_id, uint32_t first_cnt,
2162 uint32_t final_cnt);
2163
Ganesh Kondabattini479a8ae2017-10-03 16:49:24 +05302164/**
2165 * sme_send_limit_off_channel_params() - send limit off channel parameters
2166 * @hal: global hal handle
2167 * @vdev_id: vdev id
2168 * @is_tos_active: tos active or inactive
2169 * @max_off_chan_time: max off channel time
2170 * @rest_time: rest time
2171 * @skip_dfs_chan: skip dfs channel
2172 *
2173 * This function sends command to WMA for setting limit off channel command
2174 * parameters.
2175 *
2176 * Return: QDF_STATUS enumeration.
2177 */
2178QDF_STATUS sme_send_limit_off_channel_params(tHalHandle hal, uint8_t vdev_id,
2179 bool is_tos_active, uint32_t max_off_chan_time,
2180 uint32_t rest_time, bool skip_dfs_chan);
2181
Rachit Kankanef6834c42018-08-02 18:47:50 +05302182#ifdef FEATURE_WLAN_DYNAMIC_CVM
Nachiket Kukade8983cf62017-10-12 18:14:48 +05302183/**
2184 * sme_set_vc_mode_config() - Set voltage corner config to FW.
2185 * @bitmap: Bitmap that refers to voltage corner config with
2186 * different phymode and bw configuration
2187 *
2188 * Return: QDF_STATUS
2189 */
2190QDF_STATUS sme_set_vc_mode_config(uint32_t vc_bitmap);
Rachit Kankanef6834c42018-08-02 18:47:50 +05302191#endif
Nachiket Kukade8983cf62017-10-12 18:14:48 +05302192
Vignesh Viswanathanc6d1e1c2017-09-18 12:32:49 +05302193/**
2194 * sme_set_del_pmkid_cache() - API to update PMKID cache
2195 * @hal: HAL handle for device
2196 * @session_id: Session id
2197 * @pmk_cache_info: Pointer to PMK cache info
2198 * @is_add: boolean that implies whether to add or delete PMKID entry
2199 *
2200 * Return: QDF_STATUS
2201 */
2202QDF_STATUS sme_set_del_pmkid_cache(tHalHandle hal, uint8_t session_id,
2203 tPmkidCacheInfo *pmk_cache_info,
2204 bool is_add);
2205
2206/**
2207 * sme_send_hlp_ie_info() - API to send HLP IE info to fw
2208 * @hal: HAL handle for device
2209 * @session_id: Session id
2210 * @profile: CSR Roam profile
2211 * @if_addr: IP address
2212 *
2213 * This API is used to send HLP IE info along with IP address
2214 * to fw if LFR3 is enabled.
2215 *
2216 * Return: QDF_STATUS
2217 */
2218void sme_send_hlp_ie_info(tHalHandle hal, uint8_t session_id,
Jeff Johnson66ee8a92018-03-17 15:24:26 -07002219 struct csr_roam_profile *profile, uint32_t if_addr);
Vignesh Viswanathanc6d1e1c2017-09-18 12:32:49 +05302220
2221#if defined(WLAN_FEATURE_FILS_SK)
2222/**
2223 * sme_update_fils_config - Update FILS config to CSR roam session
2224 * @hal: HAL handle for device
2225 * @session_id: session id
2226 * @src_profile: Source profile having latest FILS config
2227 *
2228 * API to update FILS config to roam csr session and update the same
2229 * to fw if LFR3 is enabled.
2230 *
2231 * Return: QDF_STATUS
2232 */
2233QDF_STATUS sme_update_fils_config(tHalHandle hal, uint8_t session_id,
Jeff Johnson66ee8a92018-03-17 15:24:26 -07002234 struct csr_roam_profile *src_profile);
Vignesh Viswanathanc6d1e1c2017-09-18 12:32:49 +05302235
2236/**
2237 * sme_free_join_rsp_fils_params - free fils params
2238 * @roam_info: roam info
2239 *
2240 * Return: void
2241 */
Jeff Johnson172237b2017-11-07 15:32:59 -08002242void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info);
Vignesh Viswanathanc6d1e1c2017-09-18 12:32:49 +05302243#else
2244static inline QDF_STATUS sme_update_fils_config(tHalHandle hal,
2245 uint8_t session_id,
Jeff Johnson66ee8a92018-03-17 15:24:26 -07002246 struct csr_roam_profile *src_profile)
Vignesh Viswanathanc6d1e1c2017-09-18 12:32:49 +05302247{
2248 return QDF_STATUS_SUCCESS;
2249}
2250
Jeff Johnson172237b2017-11-07 15:32:59 -08002251static inline
2252void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info)
Vignesh Viswanathanc6d1e1c2017-09-18 12:32:49 +05302253{}
2254
2255#endif
Padma, Santhosh Kumar22c462c2018-01-16 17:56:44 +05302256
Kiran Kumar Lokeree6476b22017-10-16 23:40:32 -07002257#ifdef WLAN_FEATURE_11AX_BSS_COLOR
2258/**
2259 * sme_set_he_bss_color() - Sets the HE BSS color
2260 *
2261 * @hal: The handle returned by mac_open
2262 * @session_id: session_id of the request
2263 * @bss_color: HE BSS color value to set
2264 *
2265 * Return: QDF_STATUS
2266 */
2267QDF_STATUS sme_set_he_bss_color(tHalHandle hal, uint8_t session_id,
2268 uint8_t bss_color);
2269#else
2270static inline QDF_STATUS sme_set_he_bss_color(tHalHandle hal,
2271 uint8_t session_id, uint8_t bss_color)
2272{
2273 return QDF_STATUS_SUCCESS;
2274}
2275#endif
Vignesh Viswanathan9dd88d32017-11-22 14:22:03 +05302276
2277/**
2278 * sme_scan_get_result_for_bssid - gets the scan result from scan cache for the
2279 * bssid specified
2280 * @hal: handle returned by mac_open
2281 * @bssid: bssid to get the scan result for
2282 * @res: pointer to tCsrScanResultInfo allocated from caller
2283 *
2284 * Return: QDF_STATUS
2285 */
2286QDF_STATUS sme_scan_get_result_for_bssid(tHalHandle hal_handle,
2287 struct qdf_mac_addr *bssid,
2288 tCsrScanResultInfo *res);
2289
2290/**
2291 * sme_get_bss_transition_status() - get bss transition status all cadidates
2292 * @hal: handle returned by mac_open
2293 * @transition_reason : Transition reason
2294 * @bssid: bssid to get BSS transition status
2295 * @info : bss candidate information
2296 * @n_candidates : number of candidates
2297 * @is_bt_in_progress: bt activity indicator
2298 *
2299 * Return : 0 on success otherwise errno
2300 */
2301int sme_get_bss_transition_status(tHalHandle hal,
2302 uint8_t transition_reason,
2303 struct qdf_mac_addr *bssid,
2304 struct bss_candidate_info *info,
2305 uint16_t n_candidates,
2306 bool is_bt_in_progress);
2307
Abhishek Singh7dcb85b2017-12-27 15:15:01 +05302308/**
2309 * sme_unpack_rsn_ie: wrapper to unpack RSN IE and update def RSN params
2310 * if optional fields are not present.
2311 * @hal: handle returned by mac_open
2312 * @buf: rsn ie buffer pointer
2313 * @buf_len: rsn ie buffer length
2314 * @rsn_ie: outframe rsn ie structure
2315 * @append_ie: flag to indicate if the rsn_ie need to be appended from buf
2316 *
2317 * Return: parse status
2318 */
2319uint32_t sme_unpack_rsn_ie(tHalHandle hal, uint8_t *buf,
2320 uint8_t buf_len, tDot11fIERSN *rsn_ie,
2321 bool append_ie);
Sandeep Puligilla063a4342018-01-10 02:50:14 -08002322/**
2323 * sme_get_oper_chan_freq - gets the operating channel freq
2324 * @vdev: vdev handle
2325 *
2326 * Return: operating channel frequency
2327 */
2328int16_t sme_get_oper_chan_freq(struct wlan_objmgr_vdev *vdev);
2329
2330/**
2331 * sme_get_oper_ch_width - gets the operating channel width
2332 * @vdev: vdev handle
2333 *
2334 * Return: operating channel width
2335 */
2336enum phy_ch_width sme_get_oper_ch_width(struct wlan_objmgr_vdev *vdev);
2337
2338/**
2339 * sme_get_oper_ch_width - gets the secondary channel frequency
2340 * @vdev: vdev handle
2341 * @sec20chan_freq: secondary channel frequency
2342 *
2343 * Return: secondary channel frequency
2344 */
2345int sme_get_sec20chan_freq_mhz(struct wlan_objmgr_vdev *vdev,
2346 uint16_t *sec20chan_freq);
Abhishek Singh7dcb85b2017-12-27 15:15:01 +05302347
Abhishek Singh1f217ec2017-12-22 11:48:27 +05302348/**
2349 * sme_enable_roaming_on_connected_sta() - Enable roaming on an connected sta
2350 * @hal: handle returned by mac_open
2351 *
2352 * The function check if any connected STA is present on which roaming is not
2353 * enabled and if present enabled roaming on that STA.
2354 *
2355 * Return: none
2356 */
2357void sme_enable_roaming_on_connected_sta(tHalHandle hal);
2358
Padma, Santhosh Kumar22c462c2018-01-16 17:56:44 +05302359/**
2360 * sme_send_mgmt_tx() - Sends mgmt frame from CSR to LIM
2361 * @hal: The handle returned by mac_open
2362 * @session_id: session id
2363 * @buf: pointer to frame
2364 * @len: frame length
2365 *
2366 * Return: QDF_STATUS
2367 */
2368QDF_STATUS sme_send_mgmt_tx(tHalHandle hal, uint8_t session_id,
2369 const uint8_t *buf, uint32_t len);
Padma, Santhosh Kumardd3f4852018-01-16 18:51:51 +05302370
2371#ifdef WLAN_FEATURE_SAE
2372/**
2373 * sme_handle_sae_msg() - Sends SAE message received from supplicant
2374 * @hal: The handle returned by mac_open
2375 * @session_id: session id
2376 * @sae_status: status of SAE authentication
2377 *
2378 * Return: QDF_STATUS
2379 */
2380QDF_STATUS sme_handle_sae_msg(tHalHandle hal, uint8_t session_id,
2381 uint8_t sae_status);
2382#else
2383static inline QDF_STATUS sme_handle_sae_msg(tHalHandle hal, uint8_t session_id,
2384 uint8_t sae_status)
2385{
2386 return QDF_STATUS_SUCCESS;
2387}
2388#endif
2389
Kiran Kumar Lokerebc87bec2018-02-27 20:06:42 -08002390/**
2391 * sme_set_ba_buff_size() - sets BA buffer size
2392 * @hal: Pointer to HAL
2393 * @session_id: SME session id
2394 * @buff_size: BA buffer size
2395 *
2396 * Return: 0 on success else err code
2397 */
2398int sme_set_ba_buff_size(tHalHandle hal, uint8_t session_id,
2399 uint16_t buff_size);
2400
2401/**
2402 * sme_send_addba_req() - send ADDBA request with user config
2403 * @hal: Pointer to HAL
2404 * @session_id: SME session id
2405 * @tid: tid val for BA session
2406 * @buff_size: BA buffer size
2407 *
2408 * Return: 0 on success else err code
2409 */
2410int sme_send_addba_req(tHalHandle hal, uint8_t session_id, uint8_t tid,
2411 uint16_t buff_size);
2412
Kiran Kumar Lokere3324f632018-03-01 21:43:21 -08002413/**
2414 * sme_set_no_ack_policy() - Sets no ack policy for AC
2415 * @hal: Pointer to HAL
2416 * @session_id: SME session id
2417 * @val: no ack policy value
2418 * @ac: access category
2419 *
2420 * Return: 0 on success else err code
2421 */
2422int sme_set_no_ack_policy(tHalHandle hal, uint8_t session_id,
2423 uint8_t val, uint8_t ac);
2424
Kiran Kumar Lokerea006a302018-03-07 20:58:13 -08002425/**
2426 * sme_set_auto_rate_he_sgi() - Sets SGI for auto rate
2427 * @hal: Pointer to HAL
2428 * @session_id: SME session id
2429 * @cfg_val: SGI configuration value
2430 *
2431 * Return: 0 on success else err code
2432 */
2433int sme_set_auto_rate_he_sgi(tHalHandle hal, uint8_t session_id,
2434 uint8_t cfg_val);
2435
2436/**
2437 * sme_set_auto_rate_he_ltf() - Sets HE LTF for auto rate
2438 * @hal: Pointer to HAL
2439 * @session_id: SME session id
2440 * @cfg_val: LTF configuration value
2441 *
2442 * Return: 0 on success else err code
2443 */
2444int sme_set_auto_rate_he_ltf(tHalHandle hal, uint8_t session_id,
2445 uint8_t cfg_val);
2446
Kiran Kumar Lokere44a29432018-01-24 16:10:30 -08002447#ifdef WLAN_FEATURE_11AX
2448/**
Jinwei Chen998a1a02018-06-20 17:20:34 +08002449 * sme_update_tgt_he_cap() - sets the HE caps to pmac
Jinwei Chenef742dc2018-06-27 12:57:50 +08002450 * @mac_handle: Pointer to MAC handle
2451 * @cfg: Pointer to WMA target CFG
Jinwei Chen998a1a02018-06-20 17:20:34 +08002452 *
2453 * Return: None
2454 */
Jinwei Chenef742dc2018-06-27 12:57:50 +08002455void sme_update_tgt_he_cap(mac_handle_t mac_handle, struct wma_tgt_cfg *cfg);
Jinwei Chen998a1a02018-06-20 17:20:34 +08002456
2457/**
Kiran Kumar Lokere44a29432018-01-24 16:10:30 -08002458 * sme_update_he_cap_nss() - sets the nss based on user request
2459 * @hal: Pointer to HAL
2460 * @session_id: SME session id
2461 * @nss: no.of spatial streams value
2462 *
2463 * Return: None
2464 */
2465void sme_update_he_cap_nss(tHalHandle hal, uint8_t session_id,
2466 uint8_t nss);
Kiran Kumar Lokere96246e52018-01-24 16:44:35 -08002467
2468/**
Kiran Kumar Lokere6c7f3fa2018-05-14 18:12:27 -07002469 * sme_update_he_tx_bfee_supp() - sets the HE Tx Bfee support
2470 * @hal: Pointer to HAL
2471 * @session_id: SME session id
2472 * @cfg_val: Tx Bfee config value
2473 *
2474 * Return: 0 on success else err code
2475 */
2476int sme_update_he_tx_bfee_supp(tHalHandle hal, uint8_t session_id,
2477 uint8_t cfg_val);
Kiran Kumar Lokeref3044852018-06-27 14:14:24 -07002478
2479/**
2480 * sme_update_he_tx_bfee_nsts() - sets the HE Tx Bfee NSTS
2481 * @hal: MAC handle
2482 * @session_id: SME session id
2483 * @cfg_val: Tx Bfee NSTS value
2484 *
2485 * Return: 0 on success else err code
2486 */
2487int sme_update_he_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
2488 uint8_t cfg_val);
Kiran Kumar Lokere86e85592018-07-18 15:34:24 -07002489
2490/**
2491 * sme_set_he_tx_bf_cbf_rates() - sets the HE Tx Bfee CBF frame rates to FW
2492 * @session_id: SME session id
2493 *
2494 * Return: None
2495 */
2496void sme_set_he_tx_bf_cbf_rates(uint8_t session_id);
2497
Kiran Kumar Lokere6c7f3fa2018-05-14 18:12:27 -07002498/**
Kiran Kumar Lokere96246e52018-01-24 16:44:35 -08002499 * sme_update_he_mcs() - sets the HE MCS based on user request
2500 * @hal: Pointer to HAL
2501 * @session_id: SME session id
2502 * @he_mcs: HE MCS value
2503 *
2504 * Return: 0 on success else err code
2505 */
2506int sme_update_he_mcs(tHalHandle hal, uint8_t session_id, uint16_t he_mcs);
Kiran Kumar Lokerefba20632018-07-05 16:51:27 -07002507
2508/**
Kiran Kumar Lokeref54b8552018-07-10 00:53:38 -07002509 * sme_update_he_trigger_frm_mac_pad() - sets the HE MAC padding capability
2510 * @hal: Pointer to HAL
2511 * @session_id: SME session id
2512 * @cfg_val: HE MAC padding duration value
2513 *
2514 * Return: 0 on success else err code
2515 */
2516int sme_update_he_trigger_frm_mac_pad(mac_handle_t hal, uint8_t session_id,
2517 uint8_t cfg_val);
2518/**
2519 * sme_set_usr_cfg_mu_edca() - sets the user cfg MU EDCA params flag
2520 * @hal: Pointer to HAL
2521 * @val: value to be set
2522 *
2523 * Return: none
2524 */
2525void sme_set_usr_cfg_mu_edca(mac_handle_t hal, bool val);
2526
2527/**
Kiran Kumar Lokerefba20632018-07-05 16:51:27 -07002528 * sme_set_he_mu_edca_def_cfg() - sets the default MU EDCA params values
2529 * @hal: Pointer to HAL
2530 *
2531 * Return: none
2532 */
2533void sme_set_he_mu_edca_def_cfg(mac_handle_t hal);
2534
2535/**
2536 * sme_update_mu_edca_params() - updates MU EDCA params values
2537 * @hal: Pointer to HAL
2538 * @session_id: SME session id
2539 *
2540 * Return: 0 on success else err code
2541 */
2542int sme_update_mu_edca_params(mac_handle_t hal, uint8_t session_id);
2543
Kiran Kumar Lokere13dedac2018-02-05 19:51:59 -08002544/**
2545 * sme_update_he_tx_stbc_cap() - Sets the HE Tx STBC capability
2546 * @hal: Pointer to HAL
2547 * @session_id: SME session id
2548 * @value: set value
2549 *
2550 * Return: 0 on success else err code
2551 */
2552int sme_update_he_tx_stbc_cap(tHalHandle hal, uint8_t session_id, int value);
2553
2554/**
2555 * sme_update_he_rx_stbc_cap() - Sets the HE Rx STBC capability
2556 * @hal: Pointer to HAL
2557 * @session_id: SME session id
2558 * @value: set value
2559 *
2560 * Return: 0 on success else err code
2561 */
2562int sme_update_he_rx_stbc_cap(tHalHandle hal, uint8_t session_id, int value);
Kiran Kumar Lokere5cc2f0d2018-02-08 17:10:05 -08002563
2564/**
2565 * sme_update_he_frag_supp() - sets the HE fragmentation support
2566 * @hal: Pointer to HAL
2567 * @session_id: SME session id
2568 * @he_frag: HE fragmention support value
2569 *
2570 * Return: 0 on success else err code
2571 */
2572int sme_update_he_frag_supp(tHalHandle hal, uint8_t session_id,
2573 uint16_t he_frag);
Kiran Kumar Lokeree43a4582018-05-08 19:54:03 -07002574
2575/**
2576 * sme_update_he_ldpc_supp() - sets the HE LDPC support
2577 * @hal: Pointer to HAL
2578 * @session_id: SME session id
2579 * @he_ldpc: HE LDPC support value
2580 *
2581 * Return: 0 on success else err code
2582 */
2583int sme_update_he_ldpc_supp(tHalHandle hal, uint8_t session_id,
2584 uint16_t he_ldpc);
Kiran Kumar Lokere44a29432018-01-24 16:10:30 -08002585#else
Jinwei Chenef742dc2018-06-27 12:57:50 +08002586static inline void sme_update_tgt_he_cap(mac_handle_t mac_handle,
2587 struct wma_tgt_cfg *cfg)
Jinwei Chen998a1a02018-06-20 17:20:34 +08002588{}
Kiran Kumar Lokere44a29432018-01-24 16:10:30 -08002589static inline void sme_update_he_cap_nss(tHalHandle hal, uint8_t session_id,
2590 uint8_t nss)
2591{}
Kiran Kumar Lokere96246e52018-01-24 16:44:35 -08002592static inline int sme_update_he_mcs(tHalHandle hal, uint8_t session_id,
2593 uint16_t he_mcs)
2594{
2595 return 0;
2596}
Kiran Kumar Lokerefba20632018-07-05 16:51:27 -07002597
2598static inline void sme_set_he_mu_edca_def_cfg(mac_handle_t hal)
2599{
2600}
2601
2602static inline int sme_update_mu_edca_params(mac_handle_t hal,
2603 uint8_t session_id)
2604{
2605 return 0;
2606}
Kiran Kumar Lokeref54b8552018-07-10 00:53:38 -07002607static inline int sme_update_he_trigger_frm_mac_pad(mac_handle_t hal,
2608 uint8_t session_id,
2609 uint8_t cfg_val)
2610{
2611 return 0;
2612}
2613
2614static inline void sme_set_usr_cfg_mu_edca(mac_handle_t hal, bool val)
2615{
2616}
2617
Kiran Kumar Lokere13dedac2018-02-05 19:51:59 -08002618static inline int sme_update_he_tx_stbc_cap(tHalHandle hal, uint8_t session_id,
2619 int value)
2620{
2621 return 0;
2622}
2623
2624static inline int sme_update_he_rx_stbc_cap(tHalHandle hal, uint8_t session_id,
2625 int value)
2626{
2627 return 0;
2628}
Kiran Kumar Lokere5cc2f0d2018-02-08 17:10:05 -08002629
2630static inline int sme_update_he_frag_supp(tHalHandle hal, uint8_t session_id,
2631 uint16_t he_frag)
2632{
2633 return 0;
2634}
Kiran Kumar Lokere6c7f3fa2018-05-14 18:12:27 -07002635
Kiran Kumar Lokeree43a4582018-05-08 19:54:03 -07002636static inline int sme_update_he_ldpc_supp(tHalHandle hal, uint8_t session_id,
2637 uint16_t he_ldpc)
2638{
2639 return 0;
2640}
Kiran Kumar Lokere6c7f3fa2018-05-14 18:12:27 -07002641
2642static inline int sme_update_he_tx_bfee_supp(tHalHandle hal, uint8_t session_id,
2643 uint8_t cfg_val)
2644{
2645 return 0;
2646}
Kiran Kumar Lokeref3044852018-06-27 14:14:24 -07002647static inline int sme_update_he_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
2648 uint8_t cfg_val)
2649{
2650 return 0;
2651}
Kiran Kumar Lokere86e85592018-07-18 15:34:24 -07002652
2653static inline void sme_set_he_tx_bf_cbf_rates(uint8_t session_id)
2654{
2655}
Kiran Kumar Lokere44a29432018-01-24 16:10:30 -08002656#endif
2657
Vignesh Viswanathan0a569292018-02-14 15:34:47 +05302658/**
2659 * sme_is_sta_key_exchange_in_progress() - checks whether the STA/P2P client
2660 * session has key exchange in progress
2661 *
2662 * @hal: global hal handle
2663 * @session_id: session id
2664 *
2665 * Return: true - if key exchange in progress
2666 * false - if not in progress
2667 */
2668bool sme_is_sta_key_exchange_in_progress(tHalHandle hal, uint8_t session_id);
2669
Vignesh Viswanathana2f5ce582018-05-09 20:38:39 +05302670/*
2671 * sme_validate_channel_list() - Validate the given channel list
2672 * @hal: handle to global hal context
2673 * @chan_list: Pointer to the channel list
2674 * @num_channels: number of channels present in the chan_list
2675 *
2676 * Validates the given channel list with base channels in mac context
2677 *
2678 * Return: True if all channels in the list are valid, false otherwise
2679 */
2680bool sme_validate_channel_list(tHalHandle hal,
2681 uint8_t *chan_list,
2682 uint8_t num_channels);
Arif Hussain0e246802018-05-01 18:13:44 -07002683/**
2684 * sme_set_amsdu() - set amsdu enable/disable based on user cfg
2685 * @hal: Pointer to HAL
2686 * @enable: enable or disable
2687 *
2688 * Return: None
2689 */
2690void sme_set_amsdu(tHalHandle hal, bool enable);
Vignesh Viswanathana2f5ce582018-05-09 20:38:39 +05302691
Naveen Rawatfa2a1002018-05-17 16:06:37 -07002692/**
2693 * sme_get_mcs_idx() - gets mcs index
2694 * @max_rate: max rate
2695 * @rate_flags: rate flags
2696 * @nss: number of nss
2697 * @mcs_rate_flags: mcs rate flag
2698 *
2699 * Return: return mcs index
2700 */
2701uint8_t sme_get_mcs_idx(uint16_t max_rate, uint8_t rate_flags,
Hanumanth Reddy Pothula834f9432018-05-30 14:20:32 +05302702 uint8_t *nss, uint8_t *mcs_rate_flags);
Naveen Rawatfa2a1002018-05-17 16:06:37 -07002703
Varun Reddy Yeturud33033f2018-06-11 10:58:30 -07002704#ifdef WLAN_SUPPORT_TWT
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002705/**
2706 * sme_register_twt_enable_complete_cb() - TWT enable registrar
Jeff Johnson3a08ff92018-07-03 19:40:44 -07002707 * @mac_handle: MAC handle
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002708 * @twt_enable_cb: Function callback to handle enable event
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002709 *
2710 * Return: QDF Status
2711 */
Jeff Johnson3a08ff92018-07-03 19:40:44 -07002712QDF_STATUS sme_register_twt_enable_complete_cb(mac_handle_t mac_handle,
2713 twt_enable_cb twt_enable_cb);
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002714
2715/**
2716 * sme_register_twt_disable_complete_cb - TWT disable registrar
Jeff Johnson3a08ff92018-07-03 19:40:44 -07002717 * @mac_handle: MAC handle
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002718 * @twt_disable_cb: Function callback to handle disable event
2719 *
2720 * Return: QDF Status
2721 */
Jeff Johnson3a08ff92018-07-03 19:40:44 -07002722QDF_STATUS sme_register_twt_disable_complete_cb(mac_handle_t mac_handle,
2723 twt_disable_cb twt_disable_cb);
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002724
2725/**
2726 * sme_deregister_twt_enable_complete_cb() - TWT enable deregistrar
2727 * @hal: HAL handle
2728 *
2729 * Return: QDF Status
2730 */
Jeff Johnson3a08ff92018-07-03 19:40:44 -07002731QDF_STATUS sme_deregister_twt_enable_complete_cb(mac_handle_t mac_handle);
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002732
2733/**
2734 * sme_deregister_twt_disable_complete_cb - TWT disable deregistrar
2735 * @hal: HAL handle
2736 *
2737 * Return: QDF Status
2738 */
Jeff Johnson3a08ff92018-07-03 19:40:44 -07002739QDF_STATUS sme_deregister_twt_disable_complete_cb(mac_handle_t mac_handle);
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002740
2741#else
Jeff Johnson3a08ff92018-07-03 19:40:44 -07002742static inline
2743QDF_STATUS sme_register_twt_enable_complete_cb(mac_handle_t mac_handle,
2744 twt_enable_cb twt_enable_cb)
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002745{
2746 return QDF_STATUS_SUCCESS;
2747}
2748
Jeff Johnson3a08ff92018-07-03 19:40:44 -07002749static inline
2750QDF_STATUS sme_register_twt_disable_complete_cb(mac_handle_t mac_handle,
2751 twt_disable_cb twt_disable_cb)
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002752{
2753 return QDF_STATUS_SUCCESS;
2754}
2755
Jeff Johnson3a08ff92018-07-03 19:40:44 -07002756static inline
2757QDF_STATUS sme_deregister_twt_enable_complete_cb(mac_handle_t mac_handle)
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002758{
2759 return QDF_STATUS_SUCCESS;
2760}
2761
Jeff Johnson3a08ff92018-07-03 19:40:44 -07002762static inline
2763QDF_STATUS sme_deregister_twt_disable_complete_cb(mac_handle_t mac_handle)
Varun Reddy Yeturu3c9f89c2018-04-18 19:10:34 -07002764{
2765 return QDF_STATUS_SUCCESS;
2766}
2767#endif
2768
Chaoli Zhou75b062f2018-06-11 12:36:54 +08002769/**
2770 * sme_find_session_by_bssid() - checks whether has session
2771 * with given bssid
2772 * @hal: global hal handle
2773 * @bssid: bssid
2774 * Return: true - if has the session
2775 * false - if not has the session
2776 */
2777bool sme_find_session_by_bssid(tHalHandle hal, uint8_t *bssid);
Rajeev Kumar Sirasanagandla4f20b672018-03-12 13:52:50 +05302778
2779/**
2780 * sme_get_roam_scan_stats() - Send roam scan stats cmd to wma
2781 * @hal: handle returned by mac_open
2782 * @cb: call-back invoked for roam scan stats response
2783 * @context: context of callback
2784 * @vdev_id: vdev id
2785 *
2786 * Return: QDF_STATUS
2787 */
2788QDF_STATUS
2789sme_get_roam_scan_stats(tHalHandle hal, roam_scan_stats_cb cb, void *context,
2790 uint32_t vdev_id);
2791
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002792#endif /* #if !defined( __SME_API_H ) */