blob: bbf1a8e81456e2634f480c0c006dae81635b66a1 [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 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28#if !defined(__SME_API_H)
29#define __SME_API_H
30
31/**
32 * file smeApi.h
33 *
34 * brief prototype for SME APIs
35 */
36
37/*--------------------------------------------------------------------------
38 Include Files
39 ------------------------------------------------------------------------*/
40#include "csr_api.h"
Anurag Chouhana37b5b72016-02-21 14:53:42 +053041#include "qdf_lock.h"
Anurag Chouhan6d760662016-02-20 16:05:43 +053042#include "qdf_types.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080043#include "sir_api.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080044#include "cds_regdomain.h"
45#include "sme_internal.h"
Krishna Kumaar Natarajan052c6e62015-09-28 15:32:55 -070046#include "wma_tgt_cfg.h"
Jeff Johnson6136fb92017-03-30 15:21:49 -070047#include "wma_fips_public_structs.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080048
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080049#include "sme_rrm_internal.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080050#include "sir_types.h"
Krunal Sonid32c6bc2016-10-18 18:00:21 -070051#include "scheduler_api.h"
Varun Reddy Yeturu35c07f92017-02-28 10:35:00 -080052#include "wlan_serialization_legacy_api.h"
Krunal Sonid32c6bc2016-10-18 18:00:21 -070053
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080054/*--------------------------------------------------------------------------
55 Preprocessor definitions and constants
56 ------------------------------------------------------------------------*/
57
Jeff Johnson97fdfd02017-03-13 09:25:31 -070058#define SME_SUMMARY_STATS (1 << eCsrSummaryStats)
59#define SME_GLOBAL_CLASSA_STATS (1 << eCsrGlobalClassAStats)
Jeff Johnson97fdfd02017-03-13 09:25:31 -070060#define SME_GLOBAL_CLASSD_STATS (1 << eCsrGlobalClassDStats)
Jeff Johnson97fdfd02017-03-13 09:25:31 -070061#define SME_PER_CHAIN_RSSI_STATS (1 << csr_per_chain_rssi_stats)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080062
Srinivas Girigowdaaf487f62017-03-16 15:53:46 -070063#define sme_log(level, args...) QDF_TRACE(QDF_MODULE_ID_SME, level, ## args)
64#define sme_logfl(level, format, args...) sme_log(level, FL(format), ## args)
65
66#define sme_alert(format, args...) \
67 sme_logfl(QDF_TRACE_LEVEL_FATAL, format, ## args)
68#define sme_err(format, args...) \
69 sme_logfl(QDF_TRACE_LEVEL_ERROR, format, ## args)
70#define sme_warn(format, args...) \
71 sme_logfl(QDF_TRACE_LEVEL_WARN, format, ## args)
72#define sme_info(format, args...) \
73 sme_logfl(QDF_TRACE_LEVEL_INFO, format, ## args)
74#define sme_debug(format, args...) \
75 sme_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args)
76
77#define SME_ENTER() sme_logfl(QDF_TRACE_LEVEL_DEBUG, "enter")
78#define SME_EXIT() sme_logfl(QDF_TRACE_LEVEL_DEBUG, "exit")
79
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080080#define SME_SESSION_ID_ANY 50
Wu Gaoa0230a62018-01-04 20:56:57 +080081#define SME_SESSION_ID_BROADCAST 0xFF
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080082
83#define SME_INVALID_COUNTRY_CODE "XX"
Krunal Sonibfd05492017-10-03 15:48:37 -070084#define INVALID_ROAM_ID 0
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080085
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080086#define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \
87 reg_info_1 &= 0xff00ffff; \
88 reg_info_1 |= ((val & 0xff) << 16); \
89} while (0)
90
91#define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \
92 reg_info_2 &= 0xffff00ff; \
93 reg_info_2 |= ((val & 0xff) << 8); \
94} while (0)
95
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -070096#define SME_CONFIG_TO_ROAM_CONFIG 1
97#define ROAM_CONFIG_TO_SME_CONFIG 2
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080098
Kiran Kumar Lokere666bf852016-05-02 12:23:02 -070099#define NUM_OF_BANDS 2
Naveen Rawatb56880c2016-12-13 17:56:03 -0800100
101#define SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE (30*1000)
102#define SME_CMD_TIMEOUT_VALUE (SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE + 1000)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800103/*--------------------------------------------------------------------------
104 Type declarations
105 ------------------------------------------------------------------------*/
106typedef void (*hdd_ftm_msg_processor)(void *);
107typedef 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
246 * @self_mac_addr: Self mac address
247 * @sme_session_id: SME session id
248 * @type_of_persona: person type
249 * @subtype_of_persona: sub type of persona
250 */
251struct sme_session_params {
252 csr_session_open_cb session_open_cb;
253 csr_session_close_cb session_close_cb;
254 csr_roam_completeCallback callback;
255 void *callback_ctx;
256 uint8_t *self_mac_addr;
257 uint8_t sme_session_id;
258 uint32_t type_of_persona;
259 uint32_t subtype_of_persona;
260};
261
Vignesh Viswanathan9dd88d32017-11-22 14:22:03 +0530262#define MAX_CANDIDATE_INFO 10
263
264/**
265 * struct bss_candidate_info - Candidate bss information
266 *
267 * @bssid : BSSID of candidate bss
268 * @status : status code for candidate bss
269 */
270struct bss_candidate_info {
271 struct qdf_mac_addr bssid;
272 uint32_t status;
273};
274
275/*
276 * MBO transition reason codes
277 */
278enum {
279 MBO_TRANSITION_REASON_UNSPECIFIED,
280 MBO_TRANSITION_REASON_EXCESSIVE_FRAME_LOSS_RATE,
281 MBO_TRANSITION_REASON_EXCESSIVE_DELAY_FOR_CURRENT_TRAFFIC,
282 MBO_TRANSITION_REASON_INSUFFICIENT_BANDWIDTH_FOR_CURRENT_TRAFFIC,
283 MBO_TRANSITION_REASON_LOAD_BALANCING,
284 MBO_TRANSITION_REASON_LOW_RSSI,
285 MBO_TRANSITION_REASON_RECEIVED_EXCESSIVE_RETRANSMISSIONS,
286 MBO_TRANSITION_REASON_HIGH_INTERFERENCE,
287 MBO_TRANSITION_REASON_GRAY_ZONE,
288 MBO_TRANSITION_REASON_TRANSITIONING_TO_PREMIUM_AP,
289};
290
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800291/*-------------------------------------------------------------------------
292 Function declarations and documenation
293 ------------------------------------------------------------------------*/
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530294QDF_STATUS sme_open(tHalHandle hHal);
295QDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2,
Amar Singhala297bfa2015-10-15 15:07:29 -0700296 enum country_src cc_src);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530297QDF_STATUS sme_close(tHalHandle hHal);
298QDF_STATUS sme_start(tHalHandle hHal);
299QDF_STATUS sme_stop(tHalHandle hHal, tHalStopType stopType);
Krunal Soni8d184fa2017-11-20 21:52:05 -0800300/*
301 * sme_open_session() - Open a session for given persona
302 *
303 * This is a synchronous API. For any protocol stack related activity
304 * requires session to be opened. This API needs to be called to open
305 * the session in SME module.
306 *
307 * hal: The handle returned by mac_open.
308 * params: to initialize the session open params
309 *
310 * Return:
311 * QDF_STATUS_SUCCESS - session is opened.
312 * Other status means SME is failed to open the session.
313 */
314QDF_STATUS sme_open_session(tHalHandle hal, struct sme_session_params *params);
315
316/*
317 * sme_close_session() - Close a session for given persona
318 *
319 * This is a synchronous API. This API needs to be called to close the session
320 * in SME module before terminating the session completely.
321 *
322 * hal: The handle returned by mac_open.
323 * session_id: A previous opened session's ID.
324 *
325 * Return:
326 * QDF_STATUS_SUCCESS - session is closed.
327 * Other status means SME is failed to open the session.
328 */
329QDF_STATUS sme_close_session(tHalHandle hal, uint8_t sessionId);
Peng Xuf5d60c82015-10-02 17:17:03 -0700330void sme_set_curr_device_mode(tHalHandle hHal,
Jeff Johnsonc1e62782017-11-09 09:50:17 -0800331 enum QDF_OPMODE currDeviceMode);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530332QDF_STATUS sme_update_roam_params(tHalHandle hHal, uint8_t session_id,
Srinivas Girigowda72f30392017-07-13 18:55:09 -0700333 struct roam_ext_params *roam_params_src, int update_param);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530334QDF_STATUS sme_update_config(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800335 tpSmeConfigParams pSmeConfigParams);
336
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530337QDF_STATUS sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
338QDF_STATUS sme_get_soft_ap_domain(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800339 v_REGDOMAIN_t *domainIdSoftAp);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530340QDF_STATUS sme_hdd_ready_ind(tHalHandle hHal);
Krunal Sonia8270f52017-02-23 19:51:25 -0800341/**
342 * sme_ser_cmd_callback() - callback from serialization module
343 * @buf: serialization command buffer
344 * @reason: reason why serialization module has given this callback
345 *
346 * Serialization module will give callback to SME for why it triggered
347 * the callback
348 *
349 * Return: QDF_STATUS_SUCCESS
350 */
351QDF_STATUS sme_ser_cmd_callback(void *buf,
352 enum wlan_serialization_cb_reason reason);
Rajeev Kumar8eaedf62017-01-21 11:03:13 -0800353QDF_STATUS sme_process_msg(tHalHandle hHal, struct scheduler_msg *pMsg);
Krunal Sonid32c6bc2016-10-18 18:00:21 -0700354QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg);
Rajeev Kumar8eaedf62017-01-21 11:03:13 -0800355void sme_free_msg(tHalHandle hHal, struct scheduler_msg *pMsg);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530356QDF_STATUS sme_scan_get_result(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800357 tCsrScanResultFilter *pFilter,
358 tScanResultHandle *phResult);
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700359QDF_STATUS sme_get_ap_channel_from_scan_cache(
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800360 tCsrRoamProfile *profile,
361 tScanResultHandle *scan_cache,
362 uint8_t *ap_chnl_id);
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700363QDF_STATUS sme_get_ap_channel_from_scan(void *profile,
364 tScanResultHandle *scan_cache,
365 uint8_t *ap_chnl_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800366bool sme_store_joinreq_param(tHalHandle hal_handle,
367 tCsrRoamProfile *profile,
368 tScanResultHandle scan_cache,
369 uint32_t *roam_id,
370 uint32_t session_id);
371bool sme_clear_joinreq_param(tHalHandle hal_handle,
372 uint32_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530373QDF_STATUS sme_issue_stored_joinreq(tHalHandle hal_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800374 uint32_t *roam_id,
375 uint32_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530376QDF_STATUS sme_scan_flush_result(tHalHandle hHal);
377QDF_STATUS sme_filter_scan_results(tHalHandle hHal, uint8_t sessionId);
378QDF_STATUS sme_scan_flush_p2p_result(tHalHandle hHal, uint8_t sessionId);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800379tCsrScanResultInfo *sme_scan_result_get_first(tHalHandle,
380 tScanResultHandle hScanResult);
381tCsrScanResultInfo *sme_scan_result_get_next(tHalHandle,
382 tScanResultHandle hScanResult);
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700383QDF_STATUS sme_scan_result_purge(tScanResultHandle hScanResult);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530384QDF_STATUS sme_scan_get_pmkid_candidate_list(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800385 tPmkidCandidateInfo *pPmkidList,
386 uint32_t *pNumItems);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530387QDF_STATUS sme_roam_connect(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800388 tCsrRoamProfile *pProfile, uint32_t *pRoamId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530389QDF_STATUS sme_roam_reassoc(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800390 tCsrRoamProfile *pProfile,
391 tCsrRoamModifyProfileFields modProfileFields,
392 uint32_t *pRoamId, bool fForce);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530393QDF_STATUS sme_roam_connect_to_last_profile(tHalHandle hHal, uint8_t sessionId);
394QDF_STATUS sme_roam_disconnect(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800395 eCsrRoamDisconnectReason reason);
Abhishek Singhca408032016-09-13 15:26:12 +0530396void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530397QDF_STATUS sme_roam_stop_bss(tHalHandle hHal, uint8_t sessionId);
398QDF_STATUS sme_roam_get_associated_stas(tHalHandle hHal, uint8_t sessionId,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530399 QDF_MODULE_ID modId, void *pUsrContext,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800400 void *pfnSapEventCallback,
401 uint8_t *pAssocStasBuf);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530402QDF_STATUS sme_roam_disconnect_sta(tHalHandle hHal, uint8_t sessionId,
Jeff Johnsone6bf7192017-11-07 15:16:09 -0800403 struct csr_del_sta_params *p_del_sta_params);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530404QDF_STATUS sme_roam_deauth_sta(tHalHandle hHal, uint8_t sessionId,
Jeff Johnsone6bf7192017-11-07 15:16:09 -0800405 struct csr_del_sta_params *pDelStaParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530406QDF_STATUS sme_roam_get_connect_state(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800407 eCsrConnectState *pState);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530408QDF_STATUS sme_roam_get_connect_profile(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800409 tCsrRoamConnectedProfile *pProfile);
Naveen Rawatdf0a7e72016-01-06 18:35:53 -0800410void sme_roam_free_connect_profile(tCsrRoamConnectedProfile *profile);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530411QDF_STATUS sme_roam_set_pmkid_cache(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800412 tPmkidCacheInfo *pPMKIDCache,
413 uint32_t numItems,
414 bool update_entire_cache);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800415#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530416QDF_STATUS sme_roam_set_psk_pmk(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800417 uint8_t *pPSK_PMK, size_t pmk_len);
418#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530419QDF_STATUS sme_roam_get_security_req_ie(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800420 uint32_t *pLen, uint8_t *pBuf,
421 eCsrSecurityType secType);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530422QDF_STATUS sme_roam_get_security_rsp_ie(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800423 uint32_t *pLen, uint8_t *pBuf,
424 eCsrSecurityType secType);
425uint32_t sme_roam_get_num_pmkid_cache(tHalHandle hHal, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530426QDF_STATUS sme_roam_get_pmkid_cache(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800427 uint32_t *pNum,
428 tPmkidCacheInfo *pPmkidCache);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530429QDF_STATUS sme_get_config_param(tHalHandle hHal, tSmeConfigParams *pParam);
430QDF_STATUS sme_get_statistics(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800431 eCsrStatsRequesterType requesterId,
432 uint32_t statsMask, tCsrStatsCallback callback,
Naveen Rawatd0ca4412017-06-16 14:19:19 -0700433 uint8_t staId, void *pContext, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530434QDF_STATUS sme_get_rssi(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800435 tCsrRssiCallback callback,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530436 uint8_t staId, struct qdf_mac_addr bssId, int8_t lastRSSI,
Jeff Johnson8bd23352017-09-26 11:39:24 -0700437 void *pContext);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530438QDF_STATUS sme_get_snr(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800439 tCsrSnrCallback callback,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530440 uint8_t staId, struct qdf_mac_addr bssId, void *pContext);
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800441#ifdef FEATURE_WLAN_ESE
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530442QDF_STATUS sme_get_tsm_stats(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800443 tCsrTsmStatsCallback callback,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530444 uint8_t staId, struct qdf_mac_addr bssId,
Jeff Johnson30f84552017-09-13 14:55:25 -0700445 void *pContext, uint8_t tid);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530446QDF_STATUS sme_set_cckm_ie(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800447 uint8_t sessionId,
448 uint8_t *pCckmIe, uint8_t cckmIeLen);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530449QDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800450 const tCsrEseBeaconReq *pEseBcnReq);
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800451QDF_STATUS sme_set_plm_request(tHalHandle hHal, tpSirPlmReq pPlm);
452#endif /*FEATURE_WLAN_ESE */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530453QDF_STATUS sme_cfg_set_int(tHalHandle hal, uint16_t cfg_id, uint32_t value);
454QDF_STATUS sme_cfg_set_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800455 uint32_t length);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530456QDF_STATUS sme_cfg_get_int(tHalHandle hal, uint16_t cfg_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800457 uint32_t *cfg_value);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530458QDF_STATUS sme_cfg_get_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800459 uint32_t *length);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530460QDF_STATUS sme_get_modify_profile_fields(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800461 tCsrRoamModifyProfileFields *
462 pModifyProfileFields);
463
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530464extern QDF_STATUS sme_set_host_power_save(tHalHandle hHal, bool psMode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800465
466void sme_set_dhcp_till_power_active_flag(tHalHandle hHal, uint8_t flag);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530467extern QDF_STATUS sme_register11d_scan_done_callback(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800468 csr_scan_completeCallback);
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530469void sme_deregister11d_scan_done_callback(tHalHandle hHal);
470
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800471#ifdef FEATURE_OEM_DATA_SUPPORT
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530472extern QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle h_hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800473 sme_send_oem_data_rsp_msg callback);
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530474void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal);
475
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800476#else
Naveen Rawat910726a2017-03-06 11:42:51 -0800477static inline QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle hal,
478 void *callback)
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800479{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530480 return QDF_STATUS_SUCCESS;
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800481}
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530482static inline void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal)
483{
484}
485
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800486#endif
487
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530488extern QDF_STATUS sme_enter_wowl(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800489 void (*enter_wowl_callback_routine)(void
490 *callbackContext,
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530491 QDF_STATUS status),
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800492 void *enter_wowl_callback_context,
493#ifdef WLAN_WAKEUP_EVENTS
494 void (*wake_reason_ind_cb)(void *callbackContext,
495 tpSirWakeReasonInd
496 wake_reason_ind),
497 void *wake_reason_ind_cb_ctx,
498#endif /* WLAN_WAKEUP_EVENTS */
499 tpSirSmeWowlEnterParams wowl_enter_params,
500 uint8_t sessionId);
501
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530502extern QDF_STATUS sme_exit_wowl(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800503 tpSirSmeWowlExitParams wowl_exit_params);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530504QDF_STATUS sme_roam_set_key(tHalHandle, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800505 tCsrRoamSetKey *pSetKey, uint32_t *pRoamId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530506QDF_STATUS sme_get_country_code(tHalHandle hHal, uint8_t *pBuf, uint8_t *pbLen);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800507
508
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800509/* some support functions */
510bool sme_is11d_supported(tHalHandle hHal);
511bool sme_is11h_supported(tHalHandle hHal);
512bool sme_is_wmm_supported(tHalHandle hHal);
513
514typedef void (*tSmeChangeCountryCallback)(void *pContext);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530515QDF_STATUS sme_change_country_code(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800516 tSmeChangeCountryCallback callback,
517 uint8_t *pCountry,
518 void *pContext,
519 void *p_cds_context,
Srinivas Girigowda74a66d62017-06-21 23:28:25 -0700520 bool countryFromUserSpace,
521 bool sendRegHint);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530522QDF_STATUS sme_generic_change_country_code(tHalHandle hHal,
Amar Singhal7f1f3ec2015-10-13 17:14:08 -0700523 uint8_t *pCountry);
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800524QDF_STATUS sme_tx_fail_monitor_start_stop_ind(tHalHandle hHal,
525 uint8_t tx_fail_count,
526 void *txFailIndCallback);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530527QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800528 uint8_t device_mode,
529 uint8_t *macAddr, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530530QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800531 uint8_t device_mode,
532 uint8_t *macAddr, uint8_t sessionId);
533void sme_set_cfg_privacy(tHalHandle hHal, tCsrRoamProfile *pProfile,
534 bool fPrivacy);
535void sme_get_recovery_stats(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530536QDF_STATUS sme_neighbor_report_request(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800537 tpRrmNeighborReq pRrmNeighborReq,
538 tpRrmNeighborRspCallbackInfo callbackInfo);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530539QDF_STATUS sme_get_wcnss_wlan_compiled_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800540 tSirVersionType * pVersion);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530541QDF_STATUS sme_get_wcnss_wlan_reported_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800542 tSirVersionType *pVersion);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530543QDF_STATUS sme_get_wcnss_software_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800544 uint8_t *pVersion, uint32_t versionBufferSize);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530545QDF_STATUS sme_get_wcnss_hardware_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800546 uint8_t *pVersion, uint32_t versionBufferSize);
547#ifdef FEATURE_WLAN_WAPI
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530548QDF_STATUS sme_scan_get_bkid_candidate_list(tHalHandle hHal, uint32_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800549 tBkidCandidateInfo * pBkidList,
550 uint32_t *pNumItems);
551#endif /* FEATURE_WLAN_WAPI */
552#ifdef FEATURE_OEM_DATA_SUPPORT
Krishna Kumaar Natarajanc1fa17d2016-08-03 14:19:20 -0700553QDF_STATUS sme_oem_data_req(tHalHandle hHal, struct oem_data_req *);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530554QDF_STATUS sme_oem_update_capability(tHalHandle hHal,
Krishna Kumaar Natarajan53ca2902015-12-04 14:01:46 -0800555 struct sme_oem_capability *cap);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530556QDF_STATUS sme_oem_get_capability(tHalHandle hHal,
Krishna Kumaar Natarajan53ca2902015-12-04 14:01:46 -0800557 struct sme_oem_capability *cap);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800558#endif /*FEATURE_OEM_DATA_SUPPORT */
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700559QDF_STATUS sme_change_mcc_beacon_interval(uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530560QDF_STATUS sme_set_host_offload(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800561 tpSirHostOffloadReq pRequest);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530562QDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800563 tpSirKeepAliveReq pRequest);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530564QDF_STATUS sme_get_operation_channel(tHalHandle hHal, uint32_t *pChannel,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800565 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530566QDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800567 uint16_t frameType, uint8_t *matchData,
568 uint16_t matchLen);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530569QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800570 uint16_t frameType, uint8_t *matchData,
571 uint16_t matchLen);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530572QDF_STATUS sme_ConfigureAppsCpuWakeupState(tHalHandle hHal, bool isAppsAwake);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800573#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530574QDF_STATUS sme_configure_ext_wow(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800575 tpSirExtWoWParams wlanExtParams,
576 csr_readyToSuspendCallback callback,
577 void *callbackContext);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530578QDF_STATUS sme_configure_app_type1_params(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800579 tpSirAppType1Params wlanAppType1Params);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530580QDF_STATUS sme_configure_app_type2_params(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800581 tpSirAppType2Params wlanAppType2Params);
582#endif
583int8_t sme_get_infra_session_id(tHalHandle hHal);
584uint8_t sme_get_infra_operation_channel(tHalHandle hHal, uint8_t sessionId);
585uint8_t sme_get_concurrent_operation_channel(tHalHandle hHal);
586#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
587uint16_t sme_check_concurrent_channel_overlap(tHalHandle hHal, uint16_t sap_ch,
588 eCsrPhyMode sapPhyMode,
589 uint8_t cc_switch_mode);
590#endif
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -0800591QDF_STATUS sme_get_cfg_valid_channels(uint8_t *aValidChannels,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800592 uint32_t *len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800593#ifdef WLAN_FEATURE_PACKET_FILTERING
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530594QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800595 tpSirRcvFltMcAddrList pMulticastAddrs);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800596#endif /* WLAN_FEATURE_PACKET_FILTERING */
597bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530598QDF_STATUS sme_set_freq_band(tHalHandle hHal, uint8_t sessionId,
Varun Reddy Yeturua48bc412017-11-17 15:33:35 -0800599 enum band_info eBand);
600QDF_STATUS sme_get_freq_band(tHalHandle hHal, enum band_info *pBand);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800601uint16_t sme_chn_to_freq(uint8_t chanNum);
602bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel);
Anurag Chouhan6d760662016-02-20 16:05:43 +0530603QDF_STATUS sme_set_max_tx_power(tHalHandle hHal, struct qdf_mac_addr pBssid,
604 struct qdf_mac_addr pSelfMacAddress, int8_t dB);
Varun Reddy Yeturua48bc412017-11-17 15:33:35 -0800605QDF_STATUS sme_set_max_tx_power_per_band(enum band_info band, int8_t db);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530606QDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530607 struct qdf_mac_addr bssid,
Jeff Johnsonc1e62782017-11-09 09:50:17 -0800608 enum QDF_OPMODE dev_mode, int power);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530609QDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr);
610QDF_STATUS sme_hide_ssid(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800611 uint8_t ssidHidden);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530612QDF_STATUS sme_set_tm_level(tHalHandle hHal, uint16_t newTMLevel,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800613 uint16_t tmMode);
614void sme_feature_caps_exchange(tHalHandle hHal);
615void sme_disable_feature_capablity(uint8_t feature_index);
616void sme_reset_power_values_for5_g(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530617QDF_STATUS sme_update_roam_prefer5_g_hz(tHalHandle hHal, bool nRoamPrefer5GHz);
618QDF_STATUS sme_set_roam_intra_band(tHalHandle hHal, const bool nRoamIntraBand);
619QDF_STATUS sme_update_roam_scan_n_probes(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800620 const uint8_t nProbes);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530621QDF_STATUS sme_update_roam_scan_home_away_time(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800622 uint8_t sessionId,
623 const uint16_t nRoamScanHomeAwayTime,
624 const bool bSendOffloadCmd);
625
626bool sme_get_roam_intra_band(tHalHandle hHal);
627uint8_t sme_get_roam_scan_n_probes(tHalHandle hHal);
628uint16_t sme_get_roam_scan_home_away_time(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530629QDF_STATUS sme_update_roam_rssi_diff(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800630 uint8_t RoamRssiDiff);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530631QDF_STATUS sme_update_fast_transition_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800632 bool isFastTransitionEnabled);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530633QDF_STATUS sme_update_wes_mode(tHalHandle hHal, bool isWESModeEnabled,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800634 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530635QDF_STATUS sme_set_roam_scan_control(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800636 bool roamScanControl);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800637
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530638QDF_STATUS sme_update_is_fast_roam_ini_feature_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800639 uint8_t sessionId,
640 const bool
641 isFastRoamIniFeatureEnabled);
Mukul Sharma69c44cd2016-09-12 18:33:57 +0530642
643QDF_STATUS sme_config_fast_roaming(tHalHandle hal, uint8_t session_id,
644 const bool is_fast_roam_enabled);
645
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530646QDF_STATUS sme_update_is_mawc_ini_feature_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800647 const bool MAWCEnabled);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530648QDF_STATUS sme_stop_roaming(tHalHandle hHal, uint8_t sessionId, uint8_t reason);
Abhishek Singhd5686472017-09-20 15:18:50 +0530649
650/**
651 * sme_indicate_disconnect_inprogress() - Indicate to csr that disconnect is in
652 * progress
653 * @hal: The handle returned by mac_open
654 * @session_id: sessionId on which disconenct has started
655 *
656 * Return: void
657 */
658void sme_indicate_disconnect_inprogress(tHalHandle hal, uint8_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530659QDF_STATUS sme_start_roaming(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800660 uint8_t reason);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530661QDF_STATUS sme_update_enable_fast_roam_in_concurrency(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800662 bool bFastRoamInConIniFeatureEnabled);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800663#ifdef FEATURE_WLAN_ESE
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530664QDF_STATUS sme_update_is_ese_feature_enabled(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800665 const bool isEseIniFeatureEnabled);
666#endif /* FEATURE_WLAN_ESE */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530667QDF_STATUS sme_update_config_fw_rssi_monitoring(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800668 bool fEnableFwRssiMonitoring);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530669QDF_STATUS sme_set_roam_rescan_rssi_diff(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800670 uint8_t sessionId,
671 const uint8_t nRoamRescanRssiDiff);
672uint8_t sme_get_roam_rescan_rssi_diff(tHalHandle hHal);
673
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530674QDF_STATUS sme_set_roam_opportunistic_scan_threshold_diff(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800675 uint8_t sessionId,
676 const uint8_t nOpportunisticThresholdDiff);
677uint8_t sme_get_roam_opportunistic_scan_threshold_diff(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530678QDF_STATUS sme_set_neighbor_lookup_rssi_threshold(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800679 uint8_t sessionId, uint8_t neighborLookupRssiThreshold);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530680QDF_STATUS sme_set_delay_before_vdev_stop(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800681 uint8_t sessionId, uint8_t delay_before_vdev_stop);
682uint8_t sme_get_neighbor_lookup_rssi_threshold(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530683QDF_STATUS sme_set_neighbor_scan_refresh_period(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800684 uint8_t sessionId, uint16_t neighborScanResultsRefreshPeriod);
685uint16_t sme_get_neighbor_scan_refresh_period(tHalHandle hHal);
686uint16_t sme_get_empty_scan_refresh_period(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530687QDF_STATUS sme_update_empty_scan_refresh_period(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800688 uint8_t sessionId, uint16_t nEmptyScanRefreshPeriod);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530689QDF_STATUS sme_set_neighbor_scan_min_chan_time(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800690 const uint16_t nNeighborScanMinChanTime,
691 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530692QDF_STATUS sme_set_neighbor_scan_max_chan_time(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800693 uint8_t sessionId, const uint16_t nNeighborScanMaxChanTime);
694uint16_t sme_get_neighbor_scan_min_chan_time(tHalHandle hHal,
695 uint8_t sessionId);
696uint32_t sme_get_neighbor_roam_state(tHalHandle hHal, uint8_t sessionId);
697uint32_t sme_get_current_roam_state(tHalHandle hHal, uint8_t sessionId);
698uint32_t sme_get_current_roam_sub_state(tHalHandle hHal, uint8_t sessionId);
699uint32_t sme_get_lim_sme_state(tHalHandle hHal);
700uint32_t sme_get_lim_mlm_state(tHalHandle hHal);
701bool sme_is_lim_session_valid(tHalHandle hHal, uint8_t sessionId);
702uint32_t sme_get_lim_sme_session_state(tHalHandle hHal, uint8_t sessionId);
703uint32_t sme_get_lim_mlm_session_state(tHalHandle hHal, uint8_t sessionId);
704uint16_t sme_get_neighbor_scan_max_chan_time(tHalHandle hHal,
705 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530706QDF_STATUS sme_set_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800707 const uint16_t nNeighborScanPeriod);
708uint16_t sme_get_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId);
Sridhar Selvaraj1b2330c2017-07-21 15:16:42 +0530709QDF_STATUS sme_set_neighbor_scan_min_period(tHalHandle h_hal,
710 uint8_t session_id, const uint16_t neighbor_scan_min_period);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530711QDF_STATUS sme_set_roam_bmiss_first_bcnt(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800712 uint8_t sessionId, const uint8_t nRoamBmissFirstBcnt);
713uint8_t sme_get_roam_bmiss_first_bcnt(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530714QDF_STATUS sme_set_roam_bmiss_final_bcnt(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800715 const uint8_t nRoamBmissFinalBcnt);
716uint8_t sme_get_roam_bmiss_final_bcnt(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530717QDF_STATUS sme_set_roam_beacon_rssi_weight(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800718 const uint8_t nRoamBeaconRssiWeight);
719uint8_t sme_get_roam_beacon_rssi_weight(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800720uint8_t sme_get_roam_rssi_diff(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530721QDF_STATUS sme_change_roam_scan_channel_list(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800722 uint8_t *pChannelList,
723 uint8_t numChannels);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530724QDF_STATUS sme_set_ese_roam_scan_channel_list(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800725 uint8_t sessionId, uint8_t *pChannelList,
726 uint8_t numChannels);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530727QDF_STATUS sme_get_roam_scan_channel_list(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800728 uint8_t *pChannelList, uint8_t *pNumChannels,
729 uint8_t sessionId);
730bool sme_get_is_ese_feature_enabled(tHalHandle hHal);
731bool sme_get_wes_mode(tHalHandle hHal);
732bool sme_get_roam_scan_control(tHalHandle hHal);
733bool sme_get_is_lfr_feature_enabled(tHalHandle hHal);
734bool sme_get_is_ft_feature_enabled(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530735QDF_STATUS sme_update_roam_scan_offload_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800736 bool nRoamScanOffloadEnabled);
Krishna Kumaar Natarajand0bbb3c2017-03-13 17:04:58 -0700737bool sme_is_feature_supported_by_fw(enum cap_bitmap feature);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800738
739/*
740 * SME API to enable/disable WLAN driver initiated SSR
741 */
742void sme_update_enable_ssr(tHalHandle hHal, bool enableSSR);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530743QDF_STATUS sme_set_phy_mode(tHalHandle hHal, eCsrPhyMode phyMode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800744eCsrPhyMode sme_get_phy_mode(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530745QDF_STATUS sme_handoff_request(tHalHandle hHal, uint8_t sessionId,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700746 tCsrHandoffRequest *pHandoffInfo);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530747QDF_STATUS sme_is_sta_p2p_client_connected(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530748QDF_STATUS sme_add_periodic_tx_ptrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800749 *addPeriodicTxPtrnParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530750QDF_STATUS sme_del_periodic_tx_ptrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800751 *delPeriodicTxPtrnParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530752QDF_STATUS sme_send_rate_update_ind(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800753 tSirRateUpdateInd *rateUpdateParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530754QDF_STATUS sme_roam_del_pmkid_from_cache(tHalHandle hHal, uint8_t sessionId,
Sridhar Selvarajc3684c72017-08-21 14:32:47 +0530755 tPmkidCacheInfo *pmksa, bool flush_cache);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800756void sme_get_command_q_status(tHalHandle hHal);
757
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800758QDF_STATUS sme_enable_rmc(tHalHandle hHal, uint32_t sessionId);
759QDF_STATUS sme_disable_rmc(tHalHandle hHal, uint32_t sessionId);
760QDF_STATUS sme_send_rmc_action_period(tHalHandle hHal, uint32_t sessionId);
761QDF_STATUS sme_request_ibss_peer_info(tHalHandle hHal, void *pUserData,
762 pIbssPeerInfoCb peerInfoCbk, bool allPeerInfoReqd, uint8_t staIdx);
763QDF_STATUS sme_send_cesium_enable_ind(tHalHandle hHal, uint32_t sessionId);
764
Paul Zhang99fe8842017-12-08 14:43:46 +0800765/**
766 * sme_set_wlm_latency_level_ind() - Used to set the latency level to fw
767 * @hal
768 * @session_id
769 * @latency_level
770 *
771 * Return QDF_STATUS
772 */
773QDF_STATUS sme_set_wlm_latency_level(tHalHandle hal,
774 uint16_t session_id,
775 uint16_t latency_level);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800776/*
777 * SME API to enable/disable idle mode powersave
778 * This should be called only if powersave offload
779 * is enabled
780 */
Arunk Khandavalli847969d2017-09-25 15:15:36 +0530781QDF_STATUS sme_set_idle_powersave_config(bool value);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530782QDF_STATUS sme_notify_modem_power_state(tHalHandle hHal, uint32_t value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800783
784/*SME API to convert convert the ini value to the ENUM used in csr and MAC*/
785ePhyChanBondState sme_get_cb_phy_state_from_cb_ini_value(uint32_t cb_ini_value);
786int sme_update_ht_config(tHalHandle hHal, uint8_t sessionId, uint16_t htCapab,
787 int value);
788int16_t sme_get_ht_config(tHalHandle hHal, uint8_t session_id,
789 uint16_t ht_capab);
790#ifdef QCA_HT_2040_COEX
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530791QDF_STATUS sme_notify_ht2040_mode(tHalHandle hHal, uint16_t staId,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530792 struct qdf_mac_addr macAddrSTA,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800793 uint8_t sessionId,
794 uint8_t channel_type);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530795QDF_STATUS sme_set_ht2040_mode(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800796 uint8_t channel_type, bool obssEnabled);
797#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530798QDF_STATUS sme_get_reg_info(tHalHandle hHal, uint8_t chanId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800799 uint32_t *regInfo1, uint32_t *regInfo2);
800#ifdef FEATURE_WLAN_TDLS
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530801QDF_STATUS sme_update_fw_tdls_state(tHalHandle hHal, void *psmeTdlsParams,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800802 bool useSmeLock);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800803#endif /* FEATURE_WLAN_TDLS */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530804QDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800805#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530806QDF_STATUS sme_set_auto_shutdown_cb(tHalHandle hHal, void (*pCallbackfn)(void));
807QDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800808#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530809QDF_STATUS sme_roam_channel_change_req(tHalHandle hHal,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700810 struct qdf_mac_addr bssid,
Amar Singhal5cccafe2017-02-15 12:42:58 -0800811 struct ch_params *ch_params,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700812 tCsrRoamProfile *profile);
813
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530814QDF_STATUS sme_roam_start_beacon_req(tHalHandle hHal,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530815 struct qdf_mac_addr bssid, uint8_t dfsCacWaitStatus);
816QDF_STATUS sme_roam_csa_ie_request(tHalHandle hHal, struct qdf_mac_addr bssid,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700817 uint8_t targetChannel, uint8_t csaIeReqd,
Amar Singhal5cccafe2017-02-15 12:42:58 -0800818 struct ch_params *ch_params);
Amar Singhale4f28ee2015-10-21 14:36:56 -0700819
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530820QDF_STATUS sme_init_thermal_info(tHalHandle hHal,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700821 tSmeThermalParams thermalParam);
822
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530823QDF_STATUS sme_set_thermal_level(tHalHandle hHal, uint8_t level);
824QDF_STATUS sme_txpower_limit(tHalHandle hHal, tSirTxPowerLimit *psmetx);
825QDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800826 void *plsContext,
827 void (*pCallbackfn)(tSirLinkSpeedInfo *indParam,
828 void *pContext));
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530829QDF_STATUS sme_modify_add_ie(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800830 tSirModifyIE *pModifyIE, eUpdateIEsType updateType);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530831QDF_STATUS sme_update_add_ie(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800832 tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530833QDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value);
Sreelakshmi Konamki39acb132015-12-16 13:06:22 +0530834const char *sme_request_type_to_string(const uint8_t request_type);
Rajeev Kumar43e25b12016-04-15 16:26:36 -0700835const char *sme_scan_type_to_string(const uint8_t scan_type);
836const char *sme_bss_type_to_string(const uint8_t bss_type);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530837QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800838 bool disablefwd);
jiadbdefb252018-01-03 14:27:06 +0800839QDF_STATUS sme_get_channel_bonding_mode5_g(tHalHandle hHal, uint32_t *mode);
840QDF_STATUS sme_get_channel_bonding_mode24_g(tHalHandle hHal, uint32_t *mode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800841#ifdef WLAN_FEATURE_STATS_EXT
842typedef struct sStatsExtRequestReq {
843 uint32_t request_data_len;
844 uint8_t *request_data;
845} tStatsExtRequestReq, *tpStatsExtRequestReq;
846typedef void (*StatsExtCallback)(void *, tStatsExtEvent *);
847void sme_stats_ext_register_callback(tHalHandle hHal,
848 StatsExtCallback callback);
lifeng66831662017-05-19 16:01:35 +0800849/**
850 * sme_register_stats_ext2_callback() - Register stats ext2 register
851 * @hal_handle: hal handle for getting global mac struct
852 * @stats_ext2_cb: callback to be registered
853 *
854 * This function will register a callback for frame aggregation failure
855 * indications processing.
856 *
857 * Return: void
858 */
859void sme_stats_ext2_register_callback(tHalHandle hal_handle,
860 void (*stats_ext2_cb)(void *, struct sir_sme_rx_aggr_hole_ind *));
Krunal Soniaadaa272017-10-04 16:42:55 -0700861/**
862 * sme_send_unit_test_cmd() - send unit test command to lower layer
863 * @session_id: sme session id to be filled while forming the command
864 * @module_id: module id given by user to be filled in the command
865 * @arg_count: number of argument count
866 * @arg: pointer to argument list
867 *
868 * This API exposed to HDD layer which takes the argument from user and sends
869 * down to lower layer for further processing
870 *
871 * Return: QDF_STATUS based on overall success
872 */
873QDF_STATUS sme_send_unit_test_cmd(uint32_t vdev_id, uint32_t module_id,
874 uint32_t arg_count, uint32_t *arg);
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530875void sme_stats_ext_deregister_callback(tHalHandle hhal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530876QDF_STATUS sme_stats_ext_request(uint8_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800877 tpStatsExtRequestReq input);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530878QDF_STATUS sme_stats_ext_event(tHalHandle hHal, void *pMsg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800879#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530880QDF_STATUS sme_update_dfs_scan_mode(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800881 uint8_t sessionId,
882 uint8_t allowDFSChannelRoam);
883uint8_t sme_get_dfs_scan_mode(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800884
885#ifdef FEATURE_WLAN_EXTSCAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530886QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, uint8_t wifiBand,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800887 uint32_t *aValidChannels,
888 uint8_t *pNumChannels);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530889QDF_STATUS sme_ext_scan_get_capabilities(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800890 tSirGetExtScanCapabilitiesReqParams *pReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530891QDF_STATUS sme_ext_scan_start(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800892 tSirWifiScanCmdReqParams *pStartCmd);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530893QDF_STATUS sme_ext_scan_stop(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800894 tSirExtScanStopReqParams *pStopReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530895QDF_STATUS sme_set_bss_hotlist(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800896 tSirExtScanSetBssidHotListReqParams *
897 pSetHotListReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530898QDF_STATUS sme_reset_bss_hotlist(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800899 tSirExtScanResetBssidHotlistReqParams *
900 pResetReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530901QDF_STATUS sme_set_significant_change(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800902 tSirExtScanSetSigChangeReqParams *
903 pSetSignificantChangeReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530904QDF_STATUS sme_reset_significant_change(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800905 tSirExtScanResetSignificantChangeReqParams
906 *pResetReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530907QDF_STATUS sme_get_cached_results(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800908 tSirExtScanGetCachedResultsReqParams *
909 pCachedResultsReq);
910
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530911QDF_STATUS sme_set_epno_list(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800912 struct wifi_epno_params *req_msg);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530913QDF_STATUS sme_set_passpoint_list(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800914 struct wifi_passpoint_req *req_msg);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530915QDF_STATUS sme_reset_passpoint_list(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800916 struct wifi_passpoint_req *req_msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800917
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530918QDF_STATUS sme_ext_scan_register_callback(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800919 void (*pExtScanIndCb)(void *, const uint16_t, void *));
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800920#else
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530921static inline QDF_STATUS sme_ext_scan_register_callback(tHalHandle hHal,
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800922 void (*pExtScanIndCb)(void *, const uint16_t, void *))
923{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530924 return QDF_STATUS_SUCCESS;
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800925}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800926#endif /* FEATURE_WLAN_EXTSCAN */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530927QDF_STATUS sme_abort_roam_scan(tHalHandle hHal, uint8_t sessionId);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800928#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530929QDF_STATUS sme_ll_stats_clear_req(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800930 tSirLLStatsClearReq * pclearStatsReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530931QDF_STATUS sme_ll_stats_set_req(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800932 tSirLLStatsSetReq *psetStatsReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530933QDF_STATUS sme_ll_stats_get_req(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800934 tSirLLStatsGetReq *pgetStatsReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530935QDF_STATUS sme_set_link_layer_stats_ind_cb(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800936 void (*callbackRoutine)(void *callbackCtx,
937 int indType, void *pRsp));
Zhang Qiana6e9c102016-12-22 16:47:24 +0800938QDF_STATUS sme_set_link_layer_ext_cb(tHalHandle hal,
939 void (*ll_stats_ext_cb)(tHddHandle callback_ctx,
940 tSirLLStatsResults * rsp));
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530941QDF_STATUS sme_reset_link_layer_stats_ind_cb(tHalHandle hhal);
Zhang Qian73c348a2017-03-13 16:15:55 +0800942QDF_STATUS sme_ll_stats_set_thresh(tHalHandle hal,
943 struct sir_ll_ext_stats_threshold *threshold);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800944#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
945
Manikandan Mohan80dea792016-04-28 16:36:48 -0700946QDF_STATUS sme_set_wisa_params(tHalHandle hal,
947 struct sir_wisa_params *wisa_params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800948#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530949QDF_STATUS sme_update_roam_offload_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800950 bool nRoamOffloadEnabled);
Deepak Dhamdheref2a7d8b2016-08-19 16:17:38 -0700951QDF_STATUS sme_update_roam_key_mgmt_offload_enabled(tHalHandle hal_ctx,
952 uint8_t session_id,
953 bool key_mgmt_offload_enabled,
Deepak Dhamdhere828f1892017-02-09 11:51:19 -0800954 struct pmkid_mode_bits *pmkid_modes);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800955#endif
956#ifdef WLAN_FEATURE_NAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530957QDF_STATUS sme_nan_event(tHalHandle hHal, void *pMsg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800958#endif /* WLAN_FEATURE_NAN */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530959QDF_STATUS sme_get_link_status(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800960 tCsrLinkStatusCallback callback,
961 void *pContext, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530962QDF_STATUS sme_get_temperature(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800963 void *tempContext,
964 void (*pCallbackfn)(int temperature,
965 void *pContext));
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530966QDF_STATUS sme_set_scanning_mac_oui(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800967 tSirScanMacOui *pScanMacOui);
968
969#ifdef IPA_OFFLOAD
970/* ---------------------------------------------------------------------------
971 \fn sme_ipa_offload_enable_disable
972 \brief API to enable/disable IPA offload
973 \param hHal - The handle returned by macOpen.
974 \param sessionId - Session Identifier
975 \param pRequest - Pointer to the offload request.
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700976 \return QDF_STATUS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800977 ---------------------------------------------------------------------------*/
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530978QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800979 uint8_t session_id,
980 struct sir_ipa_offload_enable_disable *request);
981#else
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530982static inline QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800983 uint8_t session_id,
984 struct sir_ipa_offload_enable_disable *request)
985{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530986 return QDF_STATUS_SUCCESS;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800987}
988#endif /* IPA_OFFLOAD */
989
990#ifdef DHCP_SERVER_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530991QDF_STATUS sme_set_dhcp_srv_offload(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800992 tSirDhcpSrvOffloadInfo * pDhcpSrvInfo);
993#endif /* DHCP_SERVER_OFFLOAD */
994#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530995QDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800996 uint32_t x0, uint32_t x1);
997#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530998QDF_STATUS sme_handle_dfs_chan_scan(tHalHandle hHal, uint8_t dfs_flag);
999QDF_STATUS sme_set_mas(uint32_t val);
1000QDF_STATUS sme_set_miracast(tHalHandle hal, uint8_t filter_type);
1001QDF_STATUS sme_ext_change_channel(tHalHandle hHal, uint32_t channel,
Abhishek Singh518323d2015-10-19 17:42:01 +05301002 uint8_t session_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001003
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301004QDF_STATUS sme_configure_modulated_dtim(tHalHandle hal, uint8_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001005 uint32_t modulated_dtim);
1006
Mukul Sharma6398b252017-05-01 17:58:12 +05301007QDF_STATUS sme_override_listen_interval(tHalHandle h_hal, uint8_t session_id,
1008 uint32_t override_li);
1009
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301010QDF_STATUS sme_configure_stats_avg_factor(tHalHandle hal, uint8_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001011 uint16_t stats_avg_factor);
1012
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301013QDF_STATUS sme_configure_guard_time(tHalHandle hal, uint8_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001014 uint32_t guard_time);
1015
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301016QDF_STATUS sme_wifi_start_logger(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001017 struct sir_wifi_start_log start_log);
1018
1019bool sme_neighbor_middle_of_roaming(tHalHandle hHal,
1020 uint8_t sessionId);
1021
Jeff Johnsona1e92612017-09-24 15:33:44 -07001022/**
1023 * sme_enable_uapsd_for_ac() - enable uapsd for access catagory request to WMA
1024 * @sta_id: station id
1025 * @ac: access catagory
1026 * @tid: tid value
1027 * @pri: user priority
1028 * @srvc_int: service interval
1029 * @sus_int: suspend interval
1030 * @dir: tspec direction
1031 * @psb: PSB value
1032 * @sessionId: session id
1033 * @delay_interval: delay interval
1034 *
1035 * Return: QDF status
1036 */
1037QDF_STATUS sme_enable_uapsd_for_ac(uint8_t sta_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001038 sme_ac_enum_type ac, uint8_t tid,
1039 uint8_t pri, uint32_t srvc_int,
1040 uint32_t sus_int,
Abhishek Singh12be60f2017-08-11 13:52:42 +05301041 enum sme_qos_wmm_dir_type dir,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001042 uint8_t psb, uint32_t sessionId,
1043 uint32_t delay_interval);
1044
Jeff Johnsona1e92612017-09-24 15:33:44 -07001045/**
1046 * sme_disable_uapsd_for_ac() - disable uapsd access catagory request to WMA
1047 * @sta_id: station id
1048 * @ac: access catagory
1049 * @sessionId: session id
1050 *
1051 * Return: QDF status
1052 */
1053QDF_STATUS sme_disable_uapsd_for_ac(uint8_t sta_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001054 sme_ac_enum_type ac,
1055 uint32_t sessionId);
1056
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301057QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001058 struct rssi_monitor_req *input);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301059QDF_STATUS sme_set_rssi_threshold_breached_cb(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001060 void (*cb)(void *, struct rssi_breach_event *));
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301061QDF_STATUS sme_reset_rssi_threshold_breached_cb(tHalHandle hal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001062
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301063QDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal,
Abhishek Singh7996eb72015-12-30 17:24:02 +05301064 sir_mgmt_frame_ind_callback callback);
1065
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301066QDF_STATUS sme_update_nss(tHalHandle h_hal, uint8_t nss);
Archana Ramachandran5041b252016-04-25 14:29:25 -07001067void sme_update_user_configured_nss(tHalHandle hal, uint8_t nss);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001068
1069bool sme_is_any_session_in_connected_state(tHalHandle h_hal);
1070
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001071QDF_STATUS sme_pdev_set_pcl(struct policy_mgr_pcl_list msg);
1072QDF_STATUS sme_pdev_set_hw_mode(struct policy_mgr_hw_mode msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001073void sme_register_hw_mode_trans_cb(tHalHandle hal,
1074 hw_mode_transition_cb callback);
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001075QDF_STATUS sme_nss_update_request(uint32_t vdev_id,
1076 uint8_t new_nss, policy_mgr_nss_update_cback cback,
1077 uint8_t next_action, struct wlan_objmgr_psoc *psoc,
1078 enum policy_mgr_conn_update_reason reason);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001079
1080typedef void (*sme_peer_authorized_fp) (uint32_t vdev_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301081QDF_STATUS sme_set_peer_authorized(uint8_t *peer_addr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001082 sme_peer_authorized_fp auth_fp,
1083 uint32_t vdev_id);
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001084QDF_STATUS sme_soc_set_dual_mac_config(struct policy_mgr_dual_mac_config msg);
Archana Ramachandrand41c3ed2016-02-10 15:48:06 -08001085QDF_STATUS sme_soc_set_antenna_mode(tHalHandle hal,
1086 struct sir_antenna_mode_param *msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001087
1088void sme_set_scan_disable(tHalHandle h_hal, int value);
1089void sme_setdef_dot11mode(tHalHandle hal);
1090
Amar Singhal7c1e8982016-05-19 15:08:09 -07001091QDF_STATUS sme_handle_set_fcc_channel(tHalHandle hHal,
Amar Singhal83a047a2016-05-19 15:56:11 -07001092 bool fcc_constraint,
1093 bool scan_pending);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001094
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301095QDF_STATUS sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001096 uint8_t session_id,
1097 uint32_t notify_id,
1098 int32_t val);
1099
1100void wlan_sap_enable_phy_error_logs(tHalHandle hal, bool enable_log);
Agrawal Ashishb141b092016-09-02 19:59:26 +05301101#ifdef WLAN_FEATURE_DSRC
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001102void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p);
1103
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301104QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001105 ocb_callback callback,
1106 struct sir_ocb_config *config);
1107
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301108QDF_STATUS sme_ocb_set_utc_time(tHalHandle hHal, struct sir_ocb_utc *utc);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001109
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301110QDF_STATUS sme_ocb_start_timing_advert(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001111 struct sir_ocb_timing_advert *timing_advert);
1112
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301113QDF_STATUS sme_ocb_stop_timing_advert(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001114 struct sir_ocb_timing_advert *timing_advert);
1115
Naveen Rawatb4d37622015-11-13 16:15:25 -08001116int sme_ocb_gen_timing_advert_frame(tHalHandle hHal, tSirMacAddr self_addr,
1117 uint8_t **buf, uint32_t *timestamp_offset,
1118 uint32_t *time_value_offset);
1119
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301120QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001121 ocb_callback callback,
1122 struct sir_ocb_get_tsf_timer *request);
1123
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301124QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001125 ocb_callback callback,
1126 struct sir_dcc_get_stats *request);
1127
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301128QDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001129 uint32_t dcc_stats_bitmap);
1130
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301131QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001132 ocb_callback callback,
1133 struct sir_dcc_update_ndl *request);
1134
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301135QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001136 ocb_callback callback);
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301137QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal);
1138
Agrawal Ashishb141b092016-09-02 19:59:26 +05301139#else
1140static inline void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p)
1141{
1142 return;
1143}
1144
1145static inline QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context,
1146 ocb_callback callback,
1147 struct sir_ocb_config *config)
1148{
1149 return QDF_STATUS_SUCCESS;
1150}
1151
1152static inline QDF_STATUS sme_ocb_set_utc_time(struct sir_ocb_utc *utc)
1153{
1154 return QDF_STATUS_SUCCESS;
1155}
1156
1157static inline QDF_STATUS sme_ocb_start_timing_advert(
1158 struct sir_ocb_timing_advert *timing_advert)
1159{
1160 return QDF_STATUS_SUCCESS;
1161}
1162
1163static inline QDF_STATUS sme_ocb_stop_timing_advert(struct sir_ocb_timing_advert
1164 *timing_advert)
1165{
1166 return QDF_STATUS_SUCCESS;
1167}
1168
1169static inline int sme_ocb_gen_timing_advert_frame(tHalHandle hHal,
1170 tSirMacAddr self_addr, uint8_t **buf,
1171 uint32_t *timestamp_offset,
1172 uint32_t *time_value_offset)
1173{
1174 return 0;
1175}
1176
1177static inline QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context,
1178 ocb_callback callback,
1179 struct sir_ocb_get_tsf_timer *request)
1180{
1181 return QDF_STATUS_SUCCESS;
1182}
1183
1184static inline QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context,
1185 ocb_callback callback,
1186 struct sir_dcc_get_stats *request)
1187{
1188 return QDF_STATUS_SUCCESS;
1189}
1190
1191static inline QDF_STATUS sme_dcc_clear_stats(uint32_t vdev_id,
1192 uint32_t dcc_stats_bitmap)
1193{
1194 return QDF_STATUS_SUCCESS;
1195}
1196
1197static inline QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context,
1198 ocb_callback callback,
1199 struct sir_dcc_update_ndl *request)
1200{
1201 return QDF_STATUS_SUCCESS;
1202}
1203
1204static inline QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal,
1205 void *context, ocb_callback callback)
1206{
1207 return QDF_STATUS_SUCCESS;
1208}
1209static inline QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal)
1210{
1211 return QDF_STATUS_SUCCESS;
1212}
1213#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001214void sme_add_set_thermal_level_callback(tHalHandle hal,
1215 sme_set_thermal_level_callback callback);
1216
Krishna Kumaar Natarajan052c6e62015-09-28 15:32:55 -07001217void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg);
Edhar, Mahesh Kumardf2ec122015-11-16 11:33:16 +05301218bool sme_validate_sap_channel_switch(tHalHandle hal,
1219 uint16_t sap_ch, eCsrPhyMode sap_phy_mode,
1220 uint8_t cc_switch_mode, uint8_t session_id);
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +05301221
Chandrasekaran, Manishekar2859de42016-02-11 16:17:38 +05301222bool sme_is_session_id_valid(tHalHandle hal, uint32_t session_id);
1223
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +05301224#ifdef FEATURE_WLAN_TDLS
1225void sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset,
1226 uint8_t *opclass);
1227#else
1228static inline void
1229sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset,
1230 uint8_t *opclass)
1231{
1232}
1233#endif
1234
Ravi Joshi61c3c7a2015-11-09 18:41:20 -08001235#ifdef FEATURE_LFR_SUBNET_DETECTION
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301236QDF_STATUS sme_gateway_param_update(tHalHandle hHal,
Ravi Joshi61c3c7a2015-11-09 18:41:20 -08001237 struct gateway_param_update_req *request);
1238#endif
1239
Selvaraj, Sridhar57bb4d02016-08-31 16:14:15 +05301240void sme_update_fine_time_measurement_capab(tHalHandle hal, uint8_t session_id,
1241 uint32_t val);
Sandeep Puligillae0875662016-02-12 16:09:21 -08001242QDF_STATUS sme_ht40_stop_obss_scan(tHalHandle hHal, uint32_t vdev_id);
Anurag Chouhanbf5e0e22016-09-12 12:54:09 +05301243QDF_STATUS sme_set_fw_test(struct set_fwtest_params *fw_test);
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001244QDF_STATUS sme_set_tsfcb(tHalHandle hHal,
1245 int (*cb_fn)(void *cb_ctx, struct stsf *ptsf), void *cb_ctx);
Krunal Sonie3531942016-04-12 17:43:53 -07001246
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301247QDF_STATUS sme_reset_tsfcb(tHalHandle h_hal);
1248
Manikandan Mohan976e7562016-03-15 16:33:31 -07001249#ifdef WLAN_FEATURE_TSF
1250QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue);
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301251QDF_STATUS sme_reset_tsf_gpio(tHalHandle h_hal);
1252
Manikandan Mohan976e7562016-03-15 16:33:31 -07001253#else
1254static inline QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue)
1255{
1256 return QDF_STATUS_E_FAILURE;
1257}
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301258static inline QDF_STATUS sme_reset_tsf_gpio(tHalHandle h_hal)
1259{
1260 return QDF_STATUS_E_FAILURE;
1261}
1262
Manikandan Mohan976e7562016-03-15 16:33:31 -07001263#endif
1264
Archana Ramachandran20d2e232016-02-11 16:58:40 -08001265QDF_STATUS sme_update_mimo_power_save(tHalHandle hHal,
1266 uint8_t is_ht_smps_enabled,
Archana Ramachandranfec24812016-02-16 16:31:56 -08001267 uint8_t ht_smps_mode,
1268 bool send_smps_action);
Archana Ramachandran20d2e232016-02-11 16:58:40 -08001269
1270bool sme_is_sta_smps_allowed(tHalHandle hHal, uint8_t session_id);
Gupta, Kapil4cb1d7d2016-04-16 18:16:25 -07001271QDF_STATUS sme_add_beacon_filter(tHalHandle hal,
1272 uint32_t session_id, uint32_t *ie_map);
1273QDF_STATUS sme_remove_beacon_filter(tHalHandle hal, uint32_t session_id);
Arun Khandavalli2476ef52016-04-26 20:19:43 +05301274
Jeff Johnsona867e0c2017-01-26 13:43:51 -08001275/**
1276 * sme_get_bpf_offload_capabilities() - Get BPF offload capabilities
1277 * @hal: Global HAL handle
1278 * @callback: Callback function to be called with the result
1279 * @context: Opaque context to be used by the caller to associate the
1280 * request with the response
1281 *
1282 * This function constructs the cds message and fill in message type,
1283 * post the same to WDA.
1284 *
1285 * Return: QDF_STATUS enumeration
1286 */
1287QDF_STATUS sme_get_bpf_offload_capabilities(tHalHandle hal,
1288 bpf_get_offload_cb callback,
1289 void *context);
1290
Arun Khandavalli2476ef52016-04-26 20:19:43 +05301291QDF_STATUS sme_set_bpf_instructions(tHalHandle hal,
1292 struct sir_bpf_set_offload *);
Abhishek Singh1c676222016-05-09 14:20:28 +05301293uint32_t sme_get_wni_dot11_mode(tHalHandle hal);
Manjunathappa Prakash59f861d2016-04-21 10:33:31 -07001294QDF_STATUS sme_create_mon_session(tHalHandle hal_handle, uint8_t *bssid);
Gupta, Kapil96c7f2f2016-04-25 19:13:41 +05301295QDF_STATUS sme_set_adaptive_dwelltime_config(tHalHandle hal,
1296 struct adaptive_dwelltime_params *dwelltime_params);
Naveen Rawata410c5a2016-09-19 14:22:33 -07001297
1298void sme_set_vdev_ies_per_band(tHalHandle hal, uint8_t vdev_id);
Kiran Kumar Lokere666bf852016-05-02 12:23:02 -07001299void sme_set_pdev_ht_vht_ies(tHalHandle hHal, bool enable2x2);
1300
1301void sme_update_vdev_type_nss(tHalHandle hal, uint8_t max_supp_nss,
Varun Reddy Yeturua48bc412017-11-17 15:33:35 -08001302 uint32_t vdev_type_nss, enum band_info band);
Nitesh Shahdb5ea0d2017-03-22 15:17:47 +05301303void sme_update_hw_dbs_capable(tHalHandle hal, uint8_t hw_dbs_capable);
Peng Xu8fdaa492016-06-22 10:20:47 -07001304void sme_register_p2p_lo_event(tHalHandle hHal, void *context,
1305 p2p_lo_callback callback);
Manjeet Singhf82ed072016-07-08 11:40:00 +05301306
Abhishek Singhc9941602016-08-09 16:06:22 +05301307QDF_STATUS sme_remove_bssid_from_scan_list(tHalHandle hal,
1308 tSirMacAddr bssid);
1309
Manjeet Singhf82ed072016-07-08 11:40:00 +05301310QDF_STATUS sme_process_mac_pwr_dbg_cmd(tHalHandle hal, uint32_t session_id,
1311 struct sir_mac_pwr_dbg_cmd*
1312 dbg_args);
1313
Jeff Johnsonc1e62782017-11-09 09:50:17 -08001314void sme_get_vdev_type_nss(enum QDF_OPMODE dev_mode,
1315 uint8_t *nss_2g, uint8_t *nss_5g);
Masti, Narayanraddiab712a72016-08-04 11:59:11 +05301316QDF_STATUS sme_roam_set_default_key_index(tHalHandle hal, uint8_t session_id,
1317 uint8_t default_idx);
Kondabattini, Ganesh3f2d02c2016-09-13 12:23:47 +05301318void sme_send_disassoc_req_frame(tHalHandle hal, uint8_t session_id, uint8_t
1319 *peer_mac, uint16_t reason, uint8_t
1320 wait_for_ack);
Kondabattini, Ganeshe4f18e02016-09-13 13:01:22 +05301321QDF_STATUS sme_update_access_policy_vendor_ie(tHalHandle hal,
1322 uint8_t session_id, uint8_t *vendor_ie,
1323 int access_policy);
1324
Krishna Kumaar Natarajanf1581df2017-02-21 13:42:08 -08001325/**
1326 * sme_set_peer_param() - set peer param
1327 * @vdev_id: vdev ID
1328 * @peer_addr: peer MAC address
1329 * @param_id: param ID to be updated
1330 * @param_Value: paraam value
1331 *
1332 * This SME API is used to send the peer param to WMA to be sent to FW.
1333 *
1334 * Return: QDF_STATUS
1335 */
1336QDF_STATUS sme_set_peer_param(uint8_t *peer_addr, uint32_t param_id,
1337 uint32_t param_value, uint32_t vdev_id);
1338
Agrawal Ashish21ba2572016-09-03 16:40:10 +05301339QDF_STATUS sme_update_sta_roam_policy(tHalHandle hal,
1340 enum sta_roam_policy_dfs_mode dfs_mode,
1341 bool skip_unsafe_channels,
Agrawal, Ashish9f84c402016-11-30 16:19:44 +05301342 uint8_t session_id, uint8_t sap_operating_band);
Selvaraj, Sridharebda0f22016-08-29 16:05:23 +05301343QDF_STATUS sme_enable_disable_chanavoidind_event(tHalHandle hal,
1344 uint8_t set_value);
Deepak Dhamdhereb106ae52016-08-10 20:55:30 +05301345QDF_STATUS sme_set_default_scan_ie(tHalHandle hal, uint16_t session_id,
1346 uint8_t *ie_data, uint16_t ie_len);
Selvaraj, Sridhar7231c5f2016-09-28 12:42:33 +05301347/**
1348 * sme_update_session_param() - API to update PE session param
1349 * @hal: HAL handle for device
1350 * @session_id: Session ID
1351 * @param_type: Param type to be updated
1352 * @param_val: Param value to be update
1353 *
1354 * Note: this setting will not persist over reboots.
1355 *
1356 * Return: QDF_STATUS
1357 */
1358QDF_STATUS sme_update_session_param(tHalHandle hal, uint8_t session_id,
1359 uint32_t param_type, uint32_t param_val);
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301360
Vignesh Viswanathan32761e42017-09-25 17:10:54 +05301361/**
1362 * sme_update_fils_setting() - API to update PE FILS setting
1363 * @hal: HAL handle for device
1364 * @session_id: Session ID
1365 * @param_val: Param value to be update
1366 *
1367 * Return: QDF_STATUS
1368 */
1369QDF_STATUS sme_update_fils_setting(tHalHandle hal, uint8_t session_id,
1370 uint8_t param_val);
Jeff Johnson6136fb92017-03-30 15:21:49 -07001371#ifdef WLAN_FEATURE_FIPS
1372/**
1373 * sme_fips_request() - Perform a FIPS certification operation
1374 * @hal: Hal handle for the object being certified
1375 * @param: The FIPS certification parameters
1376 * @callback: Callback function to invoke with the results
1377 * @context: Opaque context to pass back to caller in the callback
1378 *
1379 * Return: QDF_STATUS_SUCCESS if the request is successfully sent
1380 * to firmware for processing, otherwise an error status.
1381 */
1382QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param,
1383 wma_fips_cb callback, void *context);
1384#else
1385static inline
1386QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param,
1387 wma_fips_cb callback, void *context)
1388{
1389 return QDF_STATUS_E_NOSUPPORT;
1390}
1391#endif /* WLAN_FEATURE_FIPS */
1392
Agrawal Ashishb2d1a452016-05-05 12:23:58 +05301393/**
1394 * sme_set_cts2self_for_p2p_go() - sme function to set ini parms to FW.
1395 * @hal: reference to the HAL
1396 *
1397 * Return: QDF_STATUS
1398 */
1399QDF_STATUS sme_set_cts2self_for_p2p_go(tHalHandle hal);
Kiran Kumar Lokere1aa9c9a2016-10-05 18:50:59 -07001400void sme_set_prefer_80MHz_over_160MHz(tHalHandle hal,
1401 bool sta_prefer_80MHz_over_160MHz);
Agrawal, Ashish35b251d2016-09-08 19:21:03 +05301402QDF_STATUS sme_update_tx_fail_cnt_threshold(tHalHandle hal_handle,
1403 uint8_t session_id, uint32_t tx_fail_count);
Agrawal Ashishda3e9502016-09-21 17:43:51 +05301404QDF_STATUS sme_update_short_retry_limit_threshold(tHalHandle hal_handle,
1405 struct sme_short_retry_limit *short_retry_limit_th);
1406QDF_STATUS sme_update_long_retry_limit_threshold(tHalHandle hal_handle,
1407 struct sme_long_retry_limit *long_retry_limit_th);
yeshwanth sriram guntukaa1ba9a22017-02-28 16:17:32 +05301408/**
1409 * sme_roam_is_ese_assoc() - Check if association type is ESE
1410 * @roam_info: Pointer to roam info
1411 *
1412 * Return: true if ESE Association, false otherwise.
1413 */
1414#ifdef FEATURE_WLAN_ESE
Jeff Johnson172237b2017-11-07 15:32:59 -08001415bool sme_roam_is_ese_assoc(struct csr_roam_info *roam_info);
yeshwanth sriram guntukaa1ba9a22017-02-28 16:17:32 +05301416#else
Jeff Johnson172237b2017-11-07 15:32:59 -08001417static inline bool sme_roam_is_ese_assoc(struct csr_roam_info *roam_info)
yeshwanth sriram guntukaa1ba9a22017-02-28 16:17:32 +05301418{
1419 return false;
1420}
1421#endif
1422/**
1423 * sme_neighbor_roam_is11r_assoc() - Check if association type is 11R
1424 * @hal_ctx: HAL handle
1425 * @session_id: session id
1426 *
1427 * Return: true if 11r Association, false otherwise.
1428 */
1429bool sme_neighbor_roam_is11r_assoc(tHalHandle hal_ctx, uint8_t session_id);
Agrawal, Ashish4e5fa1c2016-09-21 19:03:43 +05301430
1431/**
1432 * sme_update_sta_inactivity_timeout(): Update sta_inactivity_timeout to FW
1433 * @hal: Handle returned by mac_open
1434 * @sta_inactivity_timer: struct for sta inactivity timer
1435 *
1436 * If a station does not send anything in sta_inactivity_timeout seconds, an
1437 * empty data frame is sent to it in order to verify whether it is
1438 * still in range. If this frame is not ACKed, the station will be
1439 * disassociated and then deauthenticated.
1440 *
1441 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1442*/
1443QDF_STATUS sme_update_sta_inactivity_timeout(tHalHandle hal_handle,
1444 struct sme_sta_inactivity_timeout *sta_inactivity_timer);
1445
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +05301446/**
1447 * sme_set_lost_link_info_cb() - plug in callback function for receiving
1448 * @hal: HAL handle
1449 * @cb: callback function
1450 *
1451 * Return: HAL status
1452 */
1453QDF_STATUS sme_set_lost_link_info_cb(tHalHandle hal,
1454 void (*cb)(void *, struct sir_lost_link_info *));
Yingying Tang95409972016-10-20 15:16:15 +08001455
Kapil Gupta8878ad92017-02-13 11:56:04 +05301456/**
1457 * sme_update_new_channel_event() - update new channel event for sapFsm
1458 * @hal: HAL handle
1459 * @session_id: session id
1460 *
1461 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1462 */
1463QDF_STATUS sme_update_new_channel_event(tHalHandle hal, uint8_t session_id);
Sridhar Selvarajdc400d22016-10-18 17:18:03 +05301464#ifdef WLAN_POWER_DEBUGFS
1465QDF_STATUS sme_power_debug_stats_req(tHalHandle hal, void (*callback_fn)
1466 (struct power_stats_response *response,
1467 void *context), void *power_stats_context);
1468#endif
Kabilan Kannan3c0a7352016-12-02 18:49:38 -08001469/**
1470 * sme_set_sar_power_limits() - set sar limits
1471 * @hal: HAL handle
1472 * @sar_limit_cmd: struct to send sar limit cmd.
1473 *
1474 * Return: QDF_STATUS enumeration.
1475 */
1476QDF_STATUS sme_set_sar_power_limits(tHalHandle hal,
1477 struct sar_limit_cmd_params *sar_limit_cmd);
Amar Singhal6edf9732016-11-20 21:43:40 -08001478void sme_set_cc_src(tHalHandle hal_handle, enum country_src);
Yingying Tang95409972016-10-20 15:16:15 +08001479
1480
1481#ifdef WLAN_FEATURE_WOW_PULSE
1482QDF_STATUS sme_set_wow_pulse(struct wow_pulse_mode *wow_pulse_set_info);
1483#endif
1484
Anurag Chouhan3920c0f2017-09-11 17:10:56 +05301485/* ARP DEBUG STATS */
1486QDF_STATUS sme_set_nud_debug_stats(tHalHandle hal,
1487 struct set_arp_stats_params
1488 *set_stats_param);
1489QDF_STATUS sme_get_nud_debug_stats(tHalHandle hal,
1490 struct get_arp_stats_params
1491 *get_stats_param);
1492QDF_STATUS sme_set_nud_debug_stats_cb(tHalHandle hal,
1493 void (*cb)(void *, struct rsp_stats *));
1494
Kapil Gupta4f0c0c12017-02-07 15:21:15 +05301495/**
1496 * sme_set_chan_info_callback() - Register chan info callback
1497 * @hal - MAC global handle
1498 * @callback_routine - callback routine from HDD
1499 *
1500 * This API is invoked by HDD to register its callback to mac
1501 *
1502 * Return: QDF_STATUS
1503 */
1504void sme_set_chan_info_callback(tHalHandle hal_handle,
1505 void (*callback)(struct scan_chan_info *chan_info));
Naveen Rawat664a7cb2017-01-19 17:58:14 -08001506
1507/**
Hanumanth Reddy Pothula90051782017-05-04 22:14:43 +05301508 * sme_get_rssi_snr_by_bssid() - gets the rssi and snr by bssid from scan cache
1509 * @hal: handle returned by mac_open
1510 * @profile: current connected profile
1511 * @bssid: bssid to look for in scan cache
1512 * @rssi: rssi value found
1513 * @snr: snr value found
1514 *
1515 * Return: QDF_STATUS
1516 */
1517QDF_STATUS sme_get_rssi_snr_by_bssid(tHalHandle hal, tCsrRoamProfile *profile,
1518 const uint8_t *bssid, int8_t *rssi,
1519 int8_t *snr);
1520
1521/**
Naveen Rawat664a7cb2017-01-19 17:58:14 -08001522 * sme_get_beacon_frm() - gets the bss descriptor from scan cache and prepares
1523 * beacon frame
1524 * @hal: handle returned by mac_open
1525 * @profile: current connected profile
1526 * @bssid: bssid to look for in scan cache
1527 * @frame_buf: frame buffer to populate
1528 * @frame_len: length of constructed frame
Selvaraj, Sridhar64b0a9c2017-05-11 16:50:15 +05301529 * @channel: Pointer to channel info to be filled
Naveen Rawat664a7cb2017-01-19 17:58:14 -08001530 *
1531 * Return: QDF_STATUS
1532 */
1533QDF_STATUS sme_get_beacon_frm(tHalHandle hal, tCsrRoamProfile *profile,
1534 const tSirMacAddr bssid,
Selvaraj, Sridhar64b0a9c2017-05-11 16:50:15 +05301535 uint8_t **frame_buf, uint32_t *frame_len,
1536 int *channel);
Paul Zhangc3fc0a82018-01-09 16:38:20 +08001537
1538#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Naveen Rawat4195c5e2017-05-22 17:07:45 -07001539/**
1540 * sme_fast_reassoc() - invokes FAST REASSOC command
1541 * @hal: handle returned by mac_open
1542 * @profile: current connected profile
1543 * @bssid: bssid to look for in scan cache
1544 * @channel: channel on which reassoc should be send
1545 * @vdev_id: vdev id
Krunal Soni332f4af2017-06-01 14:36:17 -07001546 * @connected_bssid: bssid of currently connected profile
Naveen Rawat4195c5e2017-05-22 17:07:45 -07001547 *
1548 * Return: QDF_STATUS
1549 */
1550QDF_STATUS sme_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile,
1551 const tSirMacAddr bssid, int channel,
Krunal Soni332f4af2017-06-01 14:36:17 -07001552 uint8_t vdev_id, const tSirMacAddr connected_bssid);
Paul Zhangc3fc0a82018-01-09 16:38:20 +08001553#endif
Padma, Santhosh Kumar16dacfb2017-03-21 19:05:40 +05301554/**
1555 * sme_congestion_register_callback(): registers congestion callback
1556 * @hal: handler for HAL
1557 * @congestion_cb: congestion callback
1558 *
1559 * Return: QDF_STATUS
1560 */
1561QDF_STATUS sme_congestion_register_callback(tHalHandle hal,
1562 void (*congestion_cb)(void *, uint32_t congestion, uint32_t vdev_id));
1563
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001564/**
Sreelakshmi Konamki88a2a412017-04-14 15:11:55 +05301565 * sme_rso_cmd_status_cb() - Set RSO cmd status callback
1566 * @hal: HAL Handle
1567 * @cb: HDD Callback to rso comman status read
1568 *
1569 * This function is used to save HDD RSO Command status callback in MAC
1570 *
1571 * Return: QDF_STATUS
1572 */
1573QDF_STATUS sme_rso_cmd_status_cb(tHalHandle hal,
1574 void (*cb)(void *, struct rso_cmd_status *));
1575
1576/**
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001577 * sme_register_set_connection_info_cb() - Register connection
1578 * info callback
1579 * @hal - MAC global handle
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001580 * @set_connection_info_cb - callback routine from HDD to set
1581 * connection info flag
1582 * @get_connection_info_cb - callback routine from HDD to get
1583 * connection info
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001584 *
1585 * This API is invoked by HDD to register its callback to mac
1586 *
1587 * Return: QDF_STATUS
1588 */
1589QDF_STATUS sme_register_set_connection_info_cb(tHalHandle hHal,
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001590 bool (*set_connection_info_cb)(bool),
1591 bool (*get_connection_info_cb)(uint8_t *session_id,
1592 enum scan_reject_states *reason));
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001593
Kiran Kumar Lokerea3de2262017-04-12 12:15:04 -07001594/**
Nitesh Shahf9a09ff2017-05-22 15:46:25 +05301595 * sme_set_dbs_scan_selection_config() - Update DBS scan selection
1596 * configuration
1597 * @hal: The handle returned by macOpen
1598 * @params: wmi_dbs_scan_sel_params config
1599 *
1600 * Return: QDF_STATUS if DBS scan selection update
1601 * configuration success else failure status
1602 */
1603QDF_STATUS sme_set_dbs_scan_selection_config(tHalHandle hal,
1604 struct wmi_dbs_scan_sel_params *params);
1605
1606/**
Kiran Kumar Lokerea3de2262017-04-12 12:15:04 -07001607 * sme_store_pdev() - store pdev
1608 * @hal - MAC global handle
1609 * @pdev - pdev ptr
1610 *
1611 * Return: QDF_STATUS
1612 */
1613void sme_store_pdev(tHalHandle hal, struct wlan_objmgr_pdev *pdev);
1614
Sandeep Puligillaf587adf2017-04-27 19:53:21 -07001615/**
1616 * sme_ipa_uc_stat_request() - set ipa config parameters
1617 * @vdev_id: virtual device for the command
1618 * @param_id: parameter id
1619 * @param_val: parameter value
1620 * @req_cat: parameter category
1621 *
1622 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1623 */
1624QDF_STATUS sme_ipa_uc_stat_request(tHalHandle hal,
1625 uint32_t vdev_id, uint32_t param_id,
1626 uint32_t param_val, uint32_t req_cat);
lifeng66831662017-05-19 16:01:35 +08001627
1628/**
1629 * sme_set_reorder_timeout() - set reorder timeout value
1630 * including Voice,Video,Besteffort,Background parameters
1631 * @hal: hal handle for getting global mac struct
1632 * @reg: struct sir_set_rx_reorder_timeout_val
1633 *
1634 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1635 */
1636QDF_STATUS sme_set_reorder_timeout(tHalHandle hal,
1637 struct sir_set_rx_reorder_timeout_val *req);
1638
1639/**
1640 * sme_set_rx_set_blocksize() - set blocksize value
1641 * including mac_addr and win_limit parameters
1642 * @hal: hal handle for getting global mac struct
1643 * @reg: struct sir_peer_set_rx_blocksize
1644 *
1645 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1646 */
1647
1648QDF_STATUS sme_set_rx_set_blocksize(tHalHandle hal,
1649 struct sir_peer_set_rx_blocksize *req);
1650
Rajeev Kumar Sirasanagandla996e5292016-11-22 21:20:33 +05301651/**
1652 * sme_get_rcpi() - gets the rcpi value for peer mac addr
1653 * @hal: handle returned by mac_open
1654 * @rcpi: rcpi request containing peer mac addr, callback and related info
1655 *
1656 * This function posts the rcpi measurement request message to wma queue
1657 *
1658 * Return: QDF_STATUS
1659 */
1660QDF_STATUS sme_get_rcpi(tHalHandle hal, struct sme_rcpi_req *rcpi);
1661
Ravi Kumar Bokka05c14e52017-03-27 14:48:23 +05301662/*
1663 * sme_set_chip_pwr_save_fail_cb() - set chip power save failure callback
1664 * @hal: global hal handle
1665 * @cb: callback function pointer
1666 *
1667 * This function stores the chip power save failure callback function.
1668 *
1669 * Return: QDF_STATUS enumeration.
1670 */
1671
1672QDF_STATUS sme_set_chip_pwr_save_fail_cb(tHalHandle hal, void (*cb)(void *,
1673 struct chip_pwr_save_fail_detected_params *));
Naveen Rawat247a8682017-06-05 15:00:31 -07001674/**
1675 * sme_cli_set_command() - SME wrapper API over WMA "set" command
1676 * processor cmd
1677 * @vdev_id: virtual device for the command
1678 * @param_id: parameter id
1679 * @sval: parameter value
1680 * @vpdev: parameter category
1681 *
1682 * Command handler for set operations
1683 *
1684 * Return: 0 on success, errno on failure
1685 */
1686int sme_cli_set_command(int vdev_id, int param_id, int sval, int vpdev);
Ravi Kumar Bokka05c14e52017-03-27 14:48:23 +05301687
Vidyullatha Kanchanapallybe0ebb32017-03-23 14:36:21 +05301688/**
1689 * sme_set_bt_activity_info_cb - set the callback handler for bt events
1690 * @hal: handle returned by mac_open
1691 * @cb: callback handler
1692 *
1693 * Return: QDF_STATUS
1694 */
1695QDF_STATUS sme_set_bt_activity_info_cb(tHalHandle hal,
1696 void (*cb)(void *, uint32_t profile_info));
1697
Will Huang558f8082017-05-31 16:22:24 +08001698/**
Ashish Kumar Dhanotiyab28338c2017-07-21 20:12:34 +05301699 * sme_set_smps_cfg() - set SMPS config params
1700 * @vdev_id: virtual device for the command
1701 * @param_id: parameter id
1702 * @param_val: parameter value
1703 *
1704 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1705 */
1706
1707QDF_STATUS sme_set_smps_cfg(uint32_t vdev_id, uint32_t param_id,
1708 uint32_t param_val);
Ashish Kumar Dhanotiya443d31f2017-10-13 12:41:19 +05301709
1710/**
1711 * sme_get_peer_stats() - sme api to post peer info request
1712 * @mac: mac handle
1713 * @req: peer info request struct send to wma
1714 *
1715 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1716 */
1717
1718QDF_STATUS sme_get_peer_stats(tpAniSirGlobal mac,
1719 struct sir_peer_info_req req);
1720
Ashish Kumar Dhanotiyab28338c2017-07-21 20:12:34 +05301721/**
Will Huang558f8082017-05-31 16:22:24 +08001722 * sme_get_peer_info() - sme api to get peer info
1723 * @hal: hal handle for getting global mac struct
1724 * @req: peer info request struct send to wma
1725 * @context: context of callback function
1726 * @callbackfn: hdd callback function when receive response
1727 *
1728 * This function will send WMA_GET_PEER_INFO to WMA
1729 *
1730 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1731 */
1732QDF_STATUS sme_get_peer_info(tHalHandle hal,
1733 struct sir_peer_info_req req,
1734 void *context,
1735 void (*callbackfn)(struct sir_peer_info_resp *param,
1736 void *pcontext));
1737
1738/**
1739 * sme_get_peer_info_ext() - sme api to get peer ext info
1740 * @hal: hal handle for getting global mac struct
1741 * @req: peer ext info request struct send to wma
1742 * @context: context of callback function
1743 * @callbackfn: hdd callback function when receive response
1744 *
1745 * This function will send WMA_GET_PEER_INFO_EXT to WMA
1746 *
1747 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1748 */
1749QDF_STATUS sme_get_peer_info_ext(tHalHandle hal,
1750 struct sir_peer_info_ext_req *req,
1751 void *context,
1752 void (*callbackfn)(struct sir_peer_info_ext_resp *param,
1753 void *pcontext));
Manjeet Singha9cae432017-02-28 11:58:22 +05301754
Tushnim Bhattacharyya518e80f2017-08-30 17:35:33 -07001755/**
1756 * sme_set_5g_band_pref() - sme api to set 5Ghz preference
1757 * @hal: hal handle for getting global mac struct
1758 * @pref_params: preference info request struct
1759 *
1760 * This function will set 5Ghz preference for STA connection
1761 *
1762 * Return: None
1763 */
Manjeet Singha9cae432017-02-28 11:58:22 +05301764void sme_set_5g_band_pref(tHalHandle hal_handle,
1765 struct sme_5g_band_pref_params *pref_params);
lifengd217d192017-05-09 19:44:16 +08001766/**
1767 * sme_get_chain_rssi() - Get chain rssi
1768 * @hal: Global HAL handle
1769 * @input: get chain rssi req params
1770 * @callback: Callback function to be called with the result
1771 * @context: Opaque context to be used by the caller to associate the
1772 * request with the response
1773 *
1774 * This function constructs the cds message and fill in message type,
1775 * post the same to WDA.
1776 *
1777 * Return: QDF_STATUS enumeration
1778 */
1779QDF_STATUS sme_get_chain_rssi(tHalHandle hal,
1780 struct get_chain_rssi_req_params *input,
1781 get_chain_rssi_callback callback,
1782 void *context);
Tushnim Bhattacharyyac3c375e2017-08-04 23:39:55 -07001783
1784/**
1785 * sme_get_valid_channels() - sme api to get valid channels for
1786 * current regulatory domain
1787 * @chan_list: list of the valid channels
1788 * @list_len: length of the channel list
1789 *
1790 * This function will get valid channels for current regulatory
1791 * domain
1792 *
1793 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1794 */
1795QDF_STATUS sme_get_valid_channels(uint8_t *chan_list, uint32_t *list_len);
Tushnim Bhattacharyya518e80f2017-08-30 17:35:33 -07001796
1797/**
1798 * sme_get_mac_context() - sme api to get the pmac context
1799 *
1800 * This function will return the pmac context
1801 *
1802 * Return: pointer to pmac context
1803 */
1804tpAniSirGlobal sme_get_mac_context(void);
Vignesh Viswanathan66c951d2017-09-06 12:23:42 +05301805
1806/**
1807 * sme_display_disconnect_stats() - Display per session Disconnect stats
1808 * @hal: hal global context
1809 * session_id: SME session id
1810 *
1811 * Return: None
1812 */
1813void sme_display_disconnect_stats(tHalHandle hal, uint8_t session_id);
Sandeep Puligilla1426d612017-04-12 18:22:06 -07001814
1815/**
1816 * sme_process_msg_callback() - process callback message from LIM
1817 * @hal: global hal handle
1818 * @msg: scheduler message
1819 *
1820 * This function process the callback messages from LIM.
1821 *
1822 * Return: QDF_STATUS enumeration.
1823 */
1824QDF_STATUS sme_process_msg_callback(tHalHandle hal,
1825 struct scheduler_msg *msg);
Nachiket Kukadeaaf8a712017-07-27 19:15:36 +05301826
1827/**
1828 * sme_set_bmiss_bcnt() - set bmiss config parameters
1829 * @vdev_id: virtual device for the command
1830 * @first_cnt: bmiss first value
1831 * @final_cnt: bmiss final value
1832 *
1833 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1834 */
1835QDF_STATUS sme_set_bmiss_bcnt(uint32_t vdev_id, uint32_t first_cnt,
1836 uint32_t final_cnt);
1837
Ganesh Kondabattini479a8ae2017-10-03 16:49:24 +05301838/**
1839 * sme_send_limit_off_channel_params() - send limit off channel parameters
1840 * @hal: global hal handle
1841 * @vdev_id: vdev id
1842 * @is_tos_active: tos active or inactive
1843 * @max_off_chan_time: max off channel time
1844 * @rest_time: rest time
1845 * @skip_dfs_chan: skip dfs channel
1846 *
1847 * This function sends command to WMA for setting limit off channel command
1848 * parameters.
1849 *
1850 * Return: QDF_STATUS enumeration.
1851 */
1852QDF_STATUS sme_send_limit_off_channel_params(tHalHandle hal, uint8_t vdev_id,
1853 bool is_tos_active, uint32_t max_off_chan_time,
1854 uint32_t rest_time, bool skip_dfs_chan);
1855
Nachiket Kukade8983cf62017-10-12 18:14:48 +05301856/**
1857 * sme_set_vc_mode_config() - Set voltage corner config to FW.
1858 * @bitmap: Bitmap that refers to voltage corner config with
1859 * different phymode and bw configuration
1860 *
1861 * Return: QDF_STATUS
1862 */
1863QDF_STATUS sme_set_vc_mode_config(uint32_t vc_bitmap);
1864
Vignesh Viswanathanc6d1e1c2017-09-18 12:32:49 +05301865/**
1866 * sme_set_del_pmkid_cache() - API to update PMKID cache
1867 * @hal: HAL handle for device
1868 * @session_id: Session id
1869 * @pmk_cache_info: Pointer to PMK cache info
1870 * @is_add: boolean that implies whether to add or delete PMKID entry
1871 *
1872 * Return: QDF_STATUS
1873 */
1874QDF_STATUS sme_set_del_pmkid_cache(tHalHandle hal, uint8_t session_id,
1875 tPmkidCacheInfo *pmk_cache_info,
1876 bool is_add);
1877
1878/**
1879 * sme_send_hlp_ie_info() - API to send HLP IE info to fw
1880 * @hal: HAL handle for device
1881 * @session_id: Session id
1882 * @profile: CSR Roam profile
1883 * @if_addr: IP address
1884 *
1885 * This API is used to send HLP IE info along with IP address
1886 * to fw if LFR3 is enabled.
1887 *
1888 * Return: QDF_STATUS
1889 */
1890void sme_send_hlp_ie_info(tHalHandle hal, uint8_t session_id,
1891 tCsrRoamProfile *profile, uint32_t if_addr);
1892
1893#if defined(WLAN_FEATURE_FILS_SK)
1894/**
1895 * sme_update_fils_config - Update FILS config to CSR roam session
1896 * @hal: HAL handle for device
1897 * @session_id: session id
1898 * @src_profile: Source profile having latest FILS config
1899 *
1900 * API to update FILS config to roam csr session and update the same
1901 * to fw if LFR3 is enabled.
1902 *
1903 * Return: QDF_STATUS
1904 */
1905QDF_STATUS sme_update_fils_config(tHalHandle hal, uint8_t session_id,
1906 tCsrRoamProfile *src_profile);
1907
1908/**
1909 * sme_free_join_rsp_fils_params - free fils params
1910 * @roam_info: roam info
1911 *
1912 * Return: void
1913 */
Jeff Johnson172237b2017-11-07 15:32:59 -08001914void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info);
Vignesh Viswanathanc6d1e1c2017-09-18 12:32:49 +05301915#else
1916static inline QDF_STATUS sme_update_fils_config(tHalHandle hal,
1917 uint8_t session_id,
1918 tCsrRoamProfile *src_profile)
1919{
1920 return QDF_STATUS_SUCCESS;
1921}
1922
Jeff Johnson172237b2017-11-07 15:32:59 -08001923static inline
1924void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info)
Vignesh Viswanathanc6d1e1c2017-09-18 12:32:49 +05301925{}
1926
1927#endif
Kiran Kumar Lokeree6476b22017-10-16 23:40:32 -07001928#ifdef WLAN_FEATURE_11AX_BSS_COLOR
1929/**
1930 * sme_set_he_bss_color() - Sets the HE BSS color
1931 *
1932 * @hal: The handle returned by mac_open
1933 * @session_id: session_id of the request
1934 * @bss_color: HE BSS color value to set
1935 *
1936 * Return: QDF_STATUS
1937 */
1938QDF_STATUS sme_set_he_bss_color(tHalHandle hal, uint8_t session_id,
1939 uint8_t bss_color);
1940#else
1941static inline QDF_STATUS sme_set_he_bss_color(tHalHandle hal,
1942 uint8_t session_id, uint8_t bss_color)
1943{
1944 return QDF_STATUS_SUCCESS;
1945}
1946#endif
Vignesh Viswanathan9dd88d32017-11-22 14:22:03 +05301947
1948/**
1949 * sme_scan_get_result_for_bssid - gets the scan result from scan cache for the
1950 * bssid specified
1951 * @hal: handle returned by mac_open
1952 * @bssid: bssid to get the scan result for
1953 * @res: pointer to tCsrScanResultInfo allocated from caller
1954 *
1955 * Return: QDF_STATUS
1956 */
1957QDF_STATUS sme_scan_get_result_for_bssid(tHalHandle hal_handle,
1958 struct qdf_mac_addr *bssid,
1959 tCsrScanResultInfo *res);
1960
1961/**
1962 * sme_get_bss_transition_status() - get bss transition status all cadidates
1963 * @hal: handle returned by mac_open
1964 * @transition_reason : Transition reason
1965 * @bssid: bssid to get BSS transition status
1966 * @info : bss candidate information
1967 * @n_candidates : number of candidates
1968 * @is_bt_in_progress: bt activity indicator
1969 *
1970 * Return : 0 on success otherwise errno
1971 */
1972int sme_get_bss_transition_status(tHalHandle hal,
1973 uint8_t transition_reason,
1974 struct qdf_mac_addr *bssid,
1975 struct bss_candidate_info *info,
1976 uint16_t n_candidates,
1977 bool is_bt_in_progress);
1978
Abhishek Singh7dcb85b2017-12-27 15:15:01 +05301979/**
1980 * sme_unpack_rsn_ie: wrapper to unpack RSN IE and update def RSN params
1981 * if optional fields are not present.
1982 * @hal: handle returned by mac_open
1983 * @buf: rsn ie buffer pointer
1984 * @buf_len: rsn ie buffer length
1985 * @rsn_ie: outframe rsn ie structure
1986 * @append_ie: flag to indicate if the rsn_ie need to be appended from buf
1987 *
1988 * Return: parse status
1989 */
1990uint32_t sme_unpack_rsn_ie(tHalHandle hal, uint8_t *buf,
1991 uint8_t buf_len, tDot11fIERSN *rsn_ie,
1992 bool append_ie);
Sandeep Puligilla063a4342018-01-10 02:50:14 -08001993/**
1994 * sme_get_oper_chan_freq - gets the operating channel freq
1995 * @vdev: vdev handle
1996 *
1997 * Return: operating channel frequency
1998 */
1999int16_t sme_get_oper_chan_freq(struct wlan_objmgr_vdev *vdev);
2000
2001/**
2002 * sme_get_oper_ch_width - gets the operating channel width
2003 * @vdev: vdev handle
2004 *
2005 * Return: operating channel width
2006 */
2007enum phy_ch_width sme_get_oper_ch_width(struct wlan_objmgr_vdev *vdev);
2008
2009/**
2010 * sme_get_oper_ch_width - gets the secondary channel frequency
2011 * @vdev: vdev handle
2012 * @sec20chan_freq: secondary channel frequency
2013 *
2014 * Return: secondary channel frequency
2015 */
2016int sme_get_sec20chan_freq_mhz(struct wlan_objmgr_vdev *vdev,
2017 uint16_t *sec20chan_freq);
Abhishek Singh7dcb85b2017-12-27 15:15:01 +05302018
Abhishek Singh1f217ec2017-12-22 11:48:27 +05302019/**
2020 * sme_enable_roaming_on_connected_sta() - Enable roaming on an connected sta
2021 * @hal: handle returned by mac_open
2022 *
2023 * The function check if any connected STA is present on which roaming is not
2024 * enabled and if present enabled roaming on that STA.
2025 *
2026 * Return: none
2027 */
2028void sme_enable_roaming_on_connected_sta(tHalHandle hal);
2029
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002030#endif /* #if !defined( __SME_API_H ) */