blob: 76de33117009d9a35cac3e0434dd45d6fbeb092a [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
yeshwanth sriram guntuka310b3ac2016-11-15 23:25:26 +05302 * Copyright (c) 2012-2017 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
81
82#define SME_INVALID_COUNTRY_CODE "XX"
Krunal Sonibfd05492017-10-03 15:48:37 -070083#define INVALID_ROAM_ID 0
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080084
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080085#define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \
86 reg_info_1 &= 0xff00ffff; \
87 reg_info_1 |= ((val & 0xff) << 16); \
88} while (0)
89
90#define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \
91 reg_info_2 &= 0xffff00ff; \
92 reg_info_2 |= ((val & 0xff) << 8); \
93} while (0)
94
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -070095#define SME_CONFIG_TO_ROAM_CONFIG 1
96#define ROAM_CONFIG_TO_SME_CONFIG 2
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080097
Kiran Kumar Lokere666bf852016-05-02 12:23:02 -070098#define NUM_OF_BANDS 2
Naveen Rawatb56880c2016-12-13 17:56:03 -080099
100#define SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE (30*1000)
101#define SME_CMD_TIMEOUT_VALUE (SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE + 1000)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800102/*--------------------------------------------------------------------------
103 Type declarations
104 ------------------------------------------------------------------------*/
105typedef void (*hdd_ftm_msg_processor)(void *);
106typedef struct _smeConfigParams {
107 tCsrConfigParam csrConfig;
Krishna Kumaar Natarajanf599c6e2015-11-03 11:44:03 -0800108 struct rrm_config_param rrmConfig;
Kapil Gupta4f0c0c12017-02-07 15:21:15 +0530109 bool snr_monitor_enabled;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800110} tSmeConfigParams, *tpSmeConfigParams;
111
112#ifdef FEATURE_WLAN_TDLS
113#define SME_TDLS_MAX_SUPP_CHANNELS 128
114#define SME_TDLS_MAX_SUPP_OPER_CLASSES 32
115
116typedef struct _smeTdlsPeerCapParams {
117 uint8_t isPeerResponder;
118 uint8_t peerUapsdQueue;
119 uint8_t peerMaxSp;
120 uint8_t peerBuffStaSupport;
121 uint8_t peerOffChanSupport;
122 uint8_t peerCurrOperClass;
123 uint8_t selfCurrOperClass;
124 uint8_t peerChanLen;
125 uint8_t peerChan[SME_TDLS_MAX_SUPP_CHANNELS];
126 uint8_t peerOperClassLen;
127 uint8_t peerOperClass[SME_TDLS_MAX_SUPP_OPER_CLASSES];
128 uint8_t prefOffChanNum;
129 uint8_t prefOffChanBandwidth;
130 uint8_t opClassForPrefOffChan;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800131} tSmeTdlsPeerCapParams;
132
Kabilan Kannan421714b2015-11-23 04:44:59 -0800133/**
134 * eSmeTdlsPeerState - tdls peer state
135 * @eSME_TDLS_PEER_STATE_PEERING: tdls connection in progress
136 * @eSME_TDLS_PEER_STATE_CONNECTED: tdls peer is connected
137 * @eSME_TDLS_PEER_STATE_TEARDOWN: tdls peer is tear down
138 * @eSME_TDLS_PEER_ADD_MAC_ADDR: add peer mac into connection table
139 * @eSME_TDLS_PEER_REMOVE_MAC_ADDR: remove peer mac from connection table
140 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800141typedef enum {
142 eSME_TDLS_PEER_STATE_PEERING,
143 eSME_TDLS_PEER_STATE_CONNECTED,
Kabilan Kannan421714b2015-11-23 04:44:59 -0800144 eSME_TDLS_PEER_STATE_TEARDOWN,
145 eSME_TDLS_PEER_ADD_MAC_ADDR,
146 eSME_TDLS_PEER_REMOVE_MAC_ADDR,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800147} eSmeTdlsPeerState;
148
149typedef struct _smeTdlsPeerStateParams {
150 uint32_t vdevId;
151 tSirMacAddr peerMacAddr;
152 uint32_t peerState;
153 tSmeTdlsPeerCapParams peerCap;
154} tSmeTdlsPeerStateParams;
155
156#define ENABLE_CHANSWITCH 1
157#define DISABLE_CHANSWITCH 2
158#define BW_20_OFFSET_BIT 0
159#define BW_40_OFFSET_BIT 1
160#define BW_80_OFFSET_BIT 2
161#define BW_160_OFFSET_BIT 3
Kiran Kumar Lokerea3de2262017-04-12 12:15:04 -0700162typedef struct sme_tdls_chan_switch_param_struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800163 uint32_t vdev_id;
164 tSirMacAddr peer_mac_addr;
165 uint16_t tdls_off_ch_bw_offset;/* Target Off Channel Bandwidth offset */
166 uint8_t tdls_off_channel; /* Target Off Channel */
167 uint8_t tdls_off_ch_mode; /* TDLS Off Channel Mode */
168 uint8_t is_responder; /* is peer responder or initiator */
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +0530169 uint8_t opclass; /* tdls operating class */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800170} sme_tdls_chan_switch_params;
171#endif /* FEATURE_WLAN_TDLS */
172
173/* Thermal Mitigation*/
174typedef struct {
175 uint16_t smeMinTempThreshold;
176 uint16_t smeMaxTempThreshold;
177} tSmeThermalLevelInfo;
178
179#define SME_MAX_THERMAL_LEVELS (4)
Poddar, Siddarth83905022016-04-16 17:56:08 -0700180#define SME_MAX_THROTTLE_LEVELS (4)
181
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800182typedef struct {
183 /* Array of thermal levels */
184 tSmeThermalLevelInfo smeThermalLevels[SME_MAX_THERMAL_LEVELS];
185 uint8_t smeThermalMgmtEnabled;
186 uint32_t smeThrottlePeriod;
Poddar, Siddarth83905022016-04-16 17:56:08 -0700187 uint8_t sme_throttle_duty_cycle_tbl[SME_MAX_THROTTLE_LEVELS];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800188} tSmeThermalParams;
189
190typedef enum {
191 SME_AC_BK = 0,
192 SME_AC_BE = 1,
193 SME_AC_VI = 2,
194 SME_AC_VO = 3
195} sme_ac_enum_type;
196
Abhishek Singh12be60f2017-08-11 13:52:42 +0530197/*
198 * Enumeration of the various TSPEC directions
199 * From 802.11e/WMM specifications
200 */
201enum sme_qos_wmm_dir_type {
Naveen Rawatd9dd4b32017-07-05 14:32:54 -0700202 SME_QOS_WMM_TS_DIR_UPLINK = 0,
203 SME_QOS_WMM_TS_DIR_DOWNLINK = 1,
204 SME_QOS_WMM_TS_DIR_RESV = 2, /* Reserved */
205 SME_QOS_WMM_TS_DIR_BOTH = 3,
Abhishek Singh12be60f2017-08-11 13:52:42 +0530206};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800207
Krishna Kumaar Natarajan53ca2902015-12-04 14:01:46 -0800208/**
209 * struct sme_oem_capability - OEM capability to be exchanged between host
210 * and userspace
211 * @ftm_rr: FTM range report capability bit
212 * @lci_capability: LCI capability bit
213 * @reserved1: reserved
214 * @reserved2: reserved
215 */
216struct sme_oem_capability {
217 uint32_t ftm_rr:1;
218 uint32_t lci_capability:1;
219 uint32_t reserved1:30;
220 uint32_t reserved2;
221};
222
Manjeet Singha9cae432017-02-28 11:58:22 +0530223/**
224 * struct sme_5g_pref_params : 5G preference params to be read from ini
225 * @rssi_boost_threshold_5g: RSSI threshold above which 5 GHz is favored
226 * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted
227 * @max_rssi_boost_5g: Maximum boost that can be applied to 5GHz RSSI
228 * @rssi_penalize_threshold_5g: RSSI threshold below which 5G is not favored
229 * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalized
230 * @max_rssi_penalize_5g: Maximum penalty that can be applied to 5G RSSI
231 */
232struct sme_5g_band_pref_params {
233 int8_t rssi_boost_threshold_5g;
234 uint8_t rssi_boost_factor_5g;
235 uint8_t max_rssi_boost_5g;
236 int8_t rssi_penalize_threshold_5g;
237 uint8_t rssi_penalize_factor_5g;
238 uint8_t max_rssi_penalize_5g;
239};
240
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800241/*-------------------------------------------------------------------------
242 Function declarations and documenation
243 ------------------------------------------------------------------------*/
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530244QDF_STATUS sme_open(tHalHandle hHal);
245QDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2,
Amar Singhala297bfa2015-10-15 15:07:29 -0700246 enum country_src cc_src);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530247QDF_STATUS sme_close(tHalHandle hHal);
248QDF_STATUS sme_start(tHalHandle hHal);
249QDF_STATUS sme_stop(tHalHandle hHal, tHalStopType stopType);
250QDF_STATUS sme_open_session(tHalHandle hHal, csr_roam_completeCallback callback,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800251 void *pContext, uint8_t *pSelfMacAddr,
Dustin Brownd28772b2017-03-17 14:16:07 -0700252 uint8_t session_id, uint32_t type,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800253 uint32_t subType);
Peng Xuf5d60c82015-10-02 17:17:03 -0700254void sme_set_curr_device_mode(tHalHandle hHal,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530255 enum tQDF_ADAPTER_MODE currDeviceMode);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530256QDF_STATUS sme_close_session(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800257 csr_roamSessionCloseCallback callback,
258 void *pContext);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530259QDF_STATUS sme_update_roam_params(tHalHandle hHal, uint8_t session_id,
Srinivas Girigowda72f30392017-07-13 18:55:09 -0700260 struct roam_ext_params *roam_params_src, int update_param);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530261QDF_STATUS sme_update_config(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800262 tpSmeConfigParams pSmeConfigParams);
263
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530264QDF_STATUS sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
265QDF_STATUS sme_get_soft_ap_domain(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800266 v_REGDOMAIN_t *domainIdSoftAp);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530267QDF_STATUS sme_hdd_ready_ind(tHalHandle hHal);
Krunal Sonia8270f52017-02-23 19:51:25 -0800268/**
269 * sme_ser_cmd_callback() - callback from serialization module
270 * @buf: serialization command buffer
271 * @reason: reason why serialization module has given this callback
272 *
273 * Serialization module will give callback to SME for why it triggered
274 * the callback
275 *
276 * Return: QDF_STATUS_SUCCESS
277 */
278QDF_STATUS sme_ser_cmd_callback(void *buf,
279 enum wlan_serialization_cb_reason reason);
Rajeev Kumar8eaedf62017-01-21 11:03:13 -0800280QDF_STATUS sme_process_msg(tHalHandle hHal, struct scheduler_msg *pMsg);
Krunal Sonid32c6bc2016-10-18 18:00:21 -0700281QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg);
Rajeev Kumar8eaedf62017-01-21 11:03:13 -0800282void sme_free_msg(tHalHandle hHal, struct scheduler_msg *pMsg);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530283QDF_STATUS sme_scan_request(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800284 tCsrScanRequest *, csr_scan_completeCallback callback,
285 void *pContext);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530286QDF_STATUS sme_scan_get_result(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800287 tCsrScanResultFilter *pFilter,
288 tScanResultHandle *phResult);
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700289QDF_STATUS sme_get_ap_channel_from_scan_cache(
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800290 tCsrRoamProfile *profile,
291 tScanResultHandle *scan_cache,
292 uint8_t *ap_chnl_id);
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700293QDF_STATUS sme_get_ap_channel_from_scan(void *profile,
294 tScanResultHandle *scan_cache,
295 uint8_t *ap_chnl_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800296bool sme_store_joinreq_param(tHalHandle hal_handle,
297 tCsrRoamProfile *profile,
298 tScanResultHandle scan_cache,
299 uint32_t *roam_id,
300 uint32_t session_id);
301bool sme_clear_joinreq_param(tHalHandle hal_handle,
302 uint32_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530303QDF_STATUS sme_issue_stored_joinreq(tHalHandle hal_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800304 uint32_t *roam_id,
305 uint32_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530306QDF_STATUS sme_scan_flush_result(tHalHandle hHal);
307QDF_STATUS sme_filter_scan_results(tHalHandle hHal, uint8_t sessionId);
308QDF_STATUS sme_scan_flush_p2p_result(tHalHandle hHal, uint8_t sessionId);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800309tCsrScanResultInfo *sme_scan_result_get_first(tHalHandle,
310 tScanResultHandle hScanResult);
311tCsrScanResultInfo *sme_scan_result_get_next(tHalHandle,
312 tScanResultHandle hScanResult);
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700313QDF_STATUS sme_scan_result_purge(tScanResultHandle hScanResult);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530314QDF_STATUS sme_scan_get_pmkid_candidate_list(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800315 tPmkidCandidateInfo *pPmkidList,
316 uint32_t *pNumItems);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530317QDF_STATUS sme_roam_connect(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800318 tCsrRoamProfile *pProfile, uint32_t *pRoamId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530319QDF_STATUS sme_roam_reassoc(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800320 tCsrRoamProfile *pProfile,
321 tCsrRoamModifyProfileFields modProfileFields,
322 uint32_t *pRoamId, bool fForce);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530323QDF_STATUS sme_roam_connect_to_last_profile(tHalHandle hHal, uint8_t sessionId);
324QDF_STATUS sme_roam_disconnect(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800325 eCsrRoamDisconnectReason reason);
Abhishek Singhca408032016-09-13 15:26:12 +0530326void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530327QDF_STATUS sme_roam_stop_bss(tHalHandle hHal, uint8_t sessionId);
328QDF_STATUS sme_roam_get_associated_stas(tHalHandle hHal, uint8_t sessionId,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530329 QDF_MODULE_ID modId, void *pUsrContext,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800330 void *pfnSapEventCallback,
331 uint8_t *pAssocStasBuf);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530332QDF_STATUS sme_roam_disconnect_sta(tHalHandle hHal, uint8_t sessionId,
Deepthi Gowrib3bfefd2016-09-13 15:14:34 +0530333 struct tagCsrDelStaParams *p_del_sta_params);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530334QDF_STATUS sme_roam_deauth_sta(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800335 struct tagCsrDelStaParams *pDelStaParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530336QDF_STATUS sme_roam_get_wps_session_overlap(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800337 void *pUsrContext,
338 void *pfnSapEventCallback,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530339 struct qdf_mac_addr pRemoveMac);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530340QDF_STATUS sme_roam_get_connect_state(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800341 eCsrConnectState *pState);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530342QDF_STATUS sme_roam_get_connect_profile(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800343 tCsrRoamConnectedProfile *pProfile);
Naveen Rawatdf0a7e72016-01-06 18:35:53 -0800344void sme_roam_free_connect_profile(tCsrRoamConnectedProfile *profile);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530345QDF_STATUS sme_roam_set_pmkid_cache(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800346 tPmkidCacheInfo *pPMKIDCache,
347 uint32_t numItems,
348 bool update_entire_cache);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800349#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530350QDF_STATUS sme_roam_set_psk_pmk(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800351 uint8_t *pPSK_PMK, size_t pmk_len);
352#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530353QDF_STATUS sme_roam_get_security_req_ie(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800354 uint32_t *pLen, uint8_t *pBuf,
355 eCsrSecurityType secType);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530356QDF_STATUS sme_roam_get_security_rsp_ie(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800357 uint32_t *pLen, uint8_t *pBuf,
358 eCsrSecurityType secType);
359uint32_t sme_roam_get_num_pmkid_cache(tHalHandle hHal, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530360QDF_STATUS sme_roam_get_pmkid_cache(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800361 uint32_t *pNum,
362 tPmkidCacheInfo *pPmkidCache);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530363QDF_STATUS sme_get_config_param(tHalHandle hHal, tSmeConfigParams *pParam);
364QDF_STATUS sme_get_statistics(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800365 eCsrStatsRequesterType requesterId,
366 uint32_t statsMask, tCsrStatsCallback callback,
Naveen Rawatd0ca4412017-06-16 14:19:19 -0700367 uint8_t staId, void *pContext, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530368QDF_STATUS sme_get_rssi(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800369 tCsrRssiCallback callback,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530370 uint8_t staId, struct qdf_mac_addr bssId, int8_t lastRSSI,
Jeff Johnson8bd23352017-09-26 11:39:24 -0700371 void *pContext);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530372QDF_STATUS sme_get_snr(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800373 tCsrSnrCallback callback,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530374 uint8_t staId, struct qdf_mac_addr bssId, void *pContext);
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800375#ifdef FEATURE_WLAN_ESE
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530376QDF_STATUS sme_get_tsm_stats(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800377 tCsrTsmStatsCallback callback,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530378 uint8_t staId, struct qdf_mac_addr bssId,
Jeff Johnson30f84552017-09-13 14:55:25 -0700379 void *pContext, uint8_t tid);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530380QDF_STATUS sme_set_cckm_ie(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800381 uint8_t sessionId,
382 uint8_t *pCckmIe, uint8_t cckmIeLen);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530383QDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800384 const tCsrEseBeaconReq *pEseBcnReq);
Srinivas Girigowda515a9ef2015-12-11 11:00:48 -0800385QDF_STATUS sme_set_plm_request(tHalHandle hHal, tpSirPlmReq pPlm);
386#endif /*FEATURE_WLAN_ESE */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530387QDF_STATUS sme_cfg_set_int(tHalHandle hal, uint16_t cfg_id, uint32_t value);
388QDF_STATUS sme_cfg_set_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800389 uint32_t length);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530390QDF_STATUS sme_cfg_get_int(tHalHandle hal, uint16_t cfg_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800391 uint32_t *cfg_value);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530392QDF_STATUS sme_cfg_get_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800393 uint32_t *length);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530394QDF_STATUS sme_get_modify_profile_fields(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800395 tCsrRoamModifyProfileFields *
396 pModifyProfileFields);
397
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530398extern QDF_STATUS sme_set_host_power_save(tHalHandle hHal, bool psMode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800399
400void sme_set_dhcp_till_power_active_flag(tHalHandle hHal, uint8_t flag);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530401extern QDF_STATUS sme_register11d_scan_done_callback(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800402 csr_scan_completeCallback);
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530403void sme_deregister11d_scan_done_callback(tHalHandle hHal);
404
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800405#ifdef FEATURE_OEM_DATA_SUPPORT
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530406extern QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle h_hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800407 sme_send_oem_data_rsp_msg callback);
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530408void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal);
409
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800410#else
Naveen Rawat910726a2017-03-06 11:42:51 -0800411static inline QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle hal,
412 void *callback)
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800413{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530414 return QDF_STATUS_SUCCESS;
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800415}
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530416static inline void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal)
417{
418}
419
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800420#endif
421
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530422extern QDF_STATUS sme_wow_add_pattern(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800423 struct wow_add_pattern *pattern, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530424extern QDF_STATUS sme_wow_delete_pattern(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800425 struct wow_delete_pattern *pattern, uint8_t sessionId);
426
427void sme_register_ftm_msg_processor(tHalHandle hal,
428 hdd_ftm_msg_processor callback);
429
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530430extern QDF_STATUS sme_enter_wowl(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800431 void (*enter_wowl_callback_routine)(void
432 *callbackContext,
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530433 QDF_STATUS status),
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800434 void *enter_wowl_callback_context,
435#ifdef WLAN_WAKEUP_EVENTS
436 void (*wake_reason_ind_cb)(void *callbackContext,
437 tpSirWakeReasonInd
438 wake_reason_ind),
439 void *wake_reason_ind_cb_ctx,
440#endif /* WLAN_WAKEUP_EVENTS */
441 tpSirSmeWowlEnterParams wowl_enter_params,
442 uint8_t sessionId);
443
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530444extern QDF_STATUS sme_exit_wowl(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800445 tpSirSmeWowlExitParams wowl_exit_params);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530446QDF_STATUS sme_roam_set_key(tHalHandle, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800447 tCsrRoamSetKey *pSetKey, uint32_t *pRoamId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530448QDF_STATUS sme_get_country_code(tHalHandle hHal, uint8_t *pBuf, uint8_t *pbLen);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800449
450
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800451/* some support functions */
452bool sme_is11d_supported(tHalHandle hHal);
453bool sme_is11h_supported(tHalHandle hHal);
454bool sme_is_wmm_supported(tHalHandle hHal);
455
456typedef void (*tSmeChangeCountryCallback)(void *pContext);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530457QDF_STATUS sme_change_country_code(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800458 tSmeChangeCountryCallback callback,
459 uint8_t *pCountry,
460 void *pContext,
461 void *p_cds_context,
Srinivas Girigowda74a66d62017-06-21 23:28:25 -0700462 bool countryFromUserSpace,
463 bool sendRegHint);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530464QDF_STATUS sme_generic_change_country_code(tHalHandle hHal,
Amar Singhal7f1f3ec2015-10-13 17:14:08 -0700465 uint8_t *pCountry);
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800466QDF_STATUS sme_tx_fail_monitor_start_stop_ind(tHalHandle hHal,
467 uint8_t tx_fail_count,
468 void *txFailIndCallback);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530469QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800470 uint8_t device_mode,
471 uint8_t *macAddr, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530472QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800473 uint8_t device_mode,
474 uint8_t *macAddr, uint8_t sessionId);
475void sme_set_cfg_privacy(tHalHandle hHal, tCsrRoamProfile *pProfile,
476 bool fPrivacy);
477void sme_get_recovery_stats(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530478QDF_STATUS sme_neighbor_report_request(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800479 tpRrmNeighborReq pRrmNeighborReq,
480 tpRrmNeighborRspCallbackInfo callbackInfo);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530481QDF_STATUS sme_get_wcnss_wlan_compiled_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800482 tSirVersionType * pVersion);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530483QDF_STATUS sme_get_wcnss_wlan_reported_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800484 tSirVersionType *pVersion);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530485QDF_STATUS sme_get_wcnss_software_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800486 uint8_t *pVersion, uint32_t versionBufferSize);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530487QDF_STATUS sme_get_wcnss_hardware_version(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800488 uint8_t *pVersion, uint32_t versionBufferSize);
489#ifdef FEATURE_WLAN_WAPI
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530490QDF_STATUS sme_scan_get_bkid_candidate_list(tHalHandle hHal, uint32_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800491 tBkidCandidateInfo * pBkidList,
492 uint32_t *pNumItems);
493#endif /* FEATURE_WLAN_WAPI */
494#ifdef FEATURE_OEM_DATA_SUPPORT
Krishna Kumaar Natarajanc1fa17d2016-08-03 14:19:20 -0700495QDF_STATUS sme_oem_data_req(tHalHandle hHal, struct oem_data_req *);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530496QDF_STATUS sme_oem_update_capability(tHalHandle hHal,
Krishna Kumaar Natarajan53ca2902015-12-04 14:01:46 -0800497 struct sme_oem_capability *cap);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530498QDF_STATUS sme_oem_get_capability(tHalHandle hHal,
Krishna Kumaar Natarajan53ca2902015-12-04 14:01:46 -0800499 struct sme_oem_capability *cap);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800500#endif /*FEATURE_OEM_DATA_SUPPORT */
Archana Ramachandran2eb7a612017-03-23 22:58:42 -0700501QDF_STATUS sme_change_mcc_beacon_interval(uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530502QDF_STATUS sme_set_host_offload(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800503 tpSirHostOffloadReq pRequest);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530504QDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800505 tpSirKeepAliveReq pRequest);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530506QDF_STATUS sme_get_operation_channel(tHalHandle hHal, uint32_t *pChannel,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800507 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530508QDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800509 uint16_t frameType, uint8_t *matchData,
510 uint16_t matchLen);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530511QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800512 uint16_t frameType, uint8_t *matchData,
513 uint16_t matchLen);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530514QDF_STATUS sme_ConfigureAppsCpuWakeupState(tHalHandle hHal, bool isAppsAwake);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800515#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530516QDF_STATUS sme_configure_ext_wow(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800517 tpSirExtWoWParams wlanExtParams,
518 csr_readyToSuspendCallback callback,
519 void *callbackContext);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530520QDF_STATUS sme_configure_app_type1_params(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800521 tpSirAppType1Params wlanAppType1Params);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530522QDF_STATUS sme_configure_app_type2_params(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800523 tpSirAppType2Params wlanAppType2Params);
524#endif
525int8_t sme_get_infra_session_id(tHalHandle hHal);
526uint8_t sme_get_infra_operation_channel(tHalHandle hHal, uint8_t sessionId);
527uint8_t sme_get_concurrent_operation_channel(tHalHandle hHal);
528#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
529uint16_t sme_check_concurrent_channel_overlap(tHalHandle hHal, uint16_t sap_ch,
530 eCsrPhyMode sapPhyMode,
531 uint8_t cc_switch_mode);
532#endif
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -0800533QDF_STATUS sme_get_cfg_valid_channels(uint8_t *aValidChannels,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800534 uint32_t *len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800535#ifdef WLAN_FEATURE_PACKET_FILTERING
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530536QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800537 tpSirRcvFltMcAddrList pMulticastAddrs);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800538#endif /* WLAN_FEATURE_PACKET_FILTERING */
539bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530540QDF_STATUS sme_set_freq_band(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800541 eCsrBand eBand);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530542QDF_STATUS sme_get_freq_band(tHalHandle hHal, eCsrBand *pBand);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800543uint16_t sme_chn_to_freq(uint8_t chanNum);
544bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel);
Anurag Chouhan6d760662016-02-20 16:05:43 +0530545QDF_STATUS sme_set_max_tx_power(tHalHandle hHal, struct qdf_mac_addr pBssid,
546 struct qdf_mac_addr pSelfMacAddress, int8_t dB);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530547QDF_STATUS sme_set_max_tx_power_per_band(eCsrBand band, int8_t db);
548QDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530549 struct qdf_mac_addr bssid,
550 enum tQDF_ADAPTER_MODE dev_mode, int power);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530551QDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr);
552QDF_STATUS sme_hide_ssid(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800553 uint8_t ssidHidden);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530554QDF_STATUS sme_set_tm_level(tHalHandle hHal, uint16_t newTMLevel,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800555 uint16_t tmMode);
556void sme_feature_caps_exchange(tHalHandle hHal);
557void sme_disable_feature_capablity(uint8_t feature_index);
558void sme_reset_power_values_for5_g(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530559QDF_STATUS sme_update_roam_prefer5_g_hz(tHalHandle hHal, bool nRoamPrefer5GHz);
560QDF_STATUS sme_set_roam_intra_band(tHalHandle hHal, const bool nRoamIntraBand);
561QDF_STATUS sme_update_roam_scan_n_probes(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800562 const uint8_t nProbes);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530563QDF_STATUS sme_update_roam_scan_home_away_time(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800564 uint8_t sessionId,
565 const uint16_t nRoamScanHomeAwayTime,
566 const bool bSendOffloadCmd);
567
568bool sme_get_roam_intra_band(tHalHandle hHal);
569uint8_t sme_get_roam_scan_n_probes(tHalHandle hHal);
570uint16_t sme_get_roam_scan_home_away_time(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530571QDF_STATUS sme_update_roam_rssi_diff(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800572 uint8_t RoamRssiDiff);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530573QDF_STATUS sme_update_fast_transition_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800574 bool isFastTransitionEnabled);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530575QDF_STATUS sme_update_wes_mode(tHalHandle hHal, bool isWESModeEnabled,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800576 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530577QDF_STATUS sme_set_roam_scan_control(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800578 bool roamScanControl);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800579
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530580QDF_STATUS sme_update_is_fast_roam_ini_feature_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800581 uint8_t sessionId,
582 const bool
583 isFastRoamIniFeatureEnabled);
Mukul Sharma69c44cd2016-09-12 18:33:57 +0530584
585QDF_STATUS sme_config_fast_roaming(tHalHandle hal, uint8_t session_id,
586 const bool is_fast_roam_enabled);
587
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530588QDF_STATUS sme_update_is_mawc_ini_feature_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800589 const bool MAWCEnabled);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530590QDF_STATUS sme_stop_roaming(tHalHandle hHal, uint8_t sessionId, uint8_t reason);
Abhishek Singhd5686472017-09-20 15:18:50 +0530591
592/**
593 * sme_indicate_disconnect_inprogress() - Indicate to csr that disconnect is in
594 * progress
595 * @hal: The handle returned by mac_open
596 * @session_id: sessionId on which disconenct has started
597 *
598 * Return: void
599 */
600void sme_indicate_disconnect_inprogress(tHalHandle hal, uint8_t session_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530601QDF_STATUS sme_start_roaming(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800602 uint8_t reason);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530603QDF_STATUS sme_update_enable_fast_roam_in_concurrency(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800604 bool bFastRoamInConIniFeatureEnabled);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800605#ifdef FEATURE_WLAN_ESE
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530606QDF_STATUS sme_update_is_ese_feature_enabled(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800607 const bool isEseIniFeatureEnabled);
608#endif /* FEATURE_WLAN_ESE */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530609QDF_STATUS sme_update_config_fw_rssi_monitoring(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800610 bool fEnableFwRssiMonitoring);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530611QDF_STATUS sme_set_roam_rescan_rssi_diff(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800612 uint8_t sessionId,
613 const uint8_t nRoamRescanRssiDiff);
614uint8_t sme_get_roam_rescan_rssi_diff(tHalHandle hHal);
615
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530616QDF_STATUS sme_set_roam_opportunistic_scan_threshold_diff(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800617 uint8_t sessionId,
618 const uint8_t nOpportunisticThresholdDiff);
619uint8_t sme_get_roam_opportunistic_scan_threshold_diff(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530620QDF_STATUS sme_set_neighbor_lookup_rssi_threshold(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800621 uint8_t sessionId, uint8_t neighborLookupRssiThreshold);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530622QDF_STATUS sme_set_delay_before_vdev_stop(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800623 uint8_t sessionId, uint8_t delay_before_vdev_stop);
624uint8_t sme_get_neighbor_lookup_rssi_threshold(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530625QDF_STATUS sme_set_neighbor_scan_refresh_period(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800626 uint8_t sessionId, uint16_t neighborScanResultsRefreshPeriod);
627uint16_t sme_get_neighbor_scan_refresh_period(tHalHandle hHal);
628uint16_t sme_get_empty_scan_refresh_period(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530629QDF_STATUS sme_update_empty_scan_refresh_period(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800630 uint8_t sessionId, uint16_t nEmptyScanRefreshPeriod);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530631QDF_STATUS sme_set_neighbor_scan_min_chan_time(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800632 const uint16_t nNeighborScanMinChanTime,
633 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530634QDF_STATUS sme_set_neighbor_scan_max_chan_time(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800635 uint8_t sessionId, const uint16_t nNeighborScanMaxChanTime);
636uint16_t sme_get_neighbor_scan_min_chan_time(tHalHandle hHal,
637 uint8_t sessionId);
638uint32_t sme_get_neighbor_roam_state(tHalHandle hHal, uint8_t sessionId);
639uint32_t sme_get_current_roam_state(tHalHandle hHal, uint8_t sessionId);
640uint32_t sme_get_current_roam_sub_state(tHalHandle hHal, uint8_t sessionId);
641uint32_t sme_get_lim_sme_state(tHalHandle hHal);
642uint32_t sme_get_lim_mlm_state(tHalHandle hHal);
643bool sme_is_lim_session_valid(tHalHandle hHal, uint8_t sessionId);
644uint32_t sme_get_lim_sme_session_state(tHalHandle hHal, uint8_t sessionId);
645uint32_t sme_get_lim_mlm_session_state(tHalHandle hHal, uint8_t sessionId);
646uint16_t sme_get_neighbor_scan_max_chan_time(tHalHandle hHal,
647 uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530648QDF_STATUS sme_set_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800649 const uint16_t nNeighborScanPeriod);
650uint16_t sme_get_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId);
Sridhar Selvaraj1b2330c2017-07-21 15:16:42 +0530651QDF_STATUS sme_set_neighbor_scan_min_period(tHalHandle h_hal,
652 uint8_t session_id, const uint16_t neighbor_scan_min_period);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530653QDF_STATUS sme_set_roam_bmiss_first_bcnt(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800654 uint8_t sessionId, const uint8_t nRoamBmissFirstBcnt);
655uint8_t sme_get_roam_bmiss_first_bcnt(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530656QDF_STATUS sme_set_roam_bmiss_final_bcnt(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800657 const uint8_t nRoamBmissFinalBcnt);
658uint8_t sme_get_roam_bmiss_final_bcnt(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530659QDF_STATUS sme_set_roam_beacon_rssi_weight(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800660 const uint8_t nRoamBeaconRssiWeight);
661uint8_t sme_get_roam_beacon_rssi_weight(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800662uint8_t sme_get_roam_rssi_diff(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530663QDF_STATUS sme_change_roam_scan_channel_list(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800664 uint8_t *pChannelList,
665 uint8_t numChannels);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530666QDF_STATUS sme_set_ese_roam_scan_channel_list(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800667 uint8_t sessionId, uint8_t *pChannelList,
668 uint8_t numChannels);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530669QDF_STATUS sme_get_roam_scan_channel_list(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800670 uint8_t *pChannelList, uint8_t *pNumChannels,
671 uint8_t sessionId);
672bool sme_get_is_ese_feature_enabled(tHalHandle hHal);
673bool sme_get_wes_mode(tHalHandle hHal);
674bool sme_get_roam_scan_control(tHalHandle hHal);
675bool sme_get_is_lfr_feature_enabled(tHalHandle hHal);
676bool sme_get_is_ft_feature_enabled(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530677QDF_STATUS sme_update_roam_scan_offload_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800678 bool nRoamScanOffloadEnabled);
Krishna Kumaar Natarajand0bbb3c2017-03-13 17:04:58 -0700679bool sme_is_feature_supported_by_fw(enum cap_bitmap feature);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800680
681/*
682 * SME API to enable/disable WLAN driver initiated SSR
683 */
684void sme_update_enable_ssr(tHalHandle hHal, bool enableSSR);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530685QDF_STATUS sme_set_phy_mode(tHalHandle hHal, eCsrPhyMode phyMode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800686eCsrPhyMode sme_get_phy_mode(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530687QDF_STATUS sme_handoff_request(tHalHandle hHal, uint8_t sessionId,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700688 tCsrHandoffRequest *pHandoffInfo);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530689QDF_STATUS sme_is_sta_p2p_client_connected(tHalHandle hHal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530690QDF_STATUS sme_add_periodic_tx_ptrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800691 *addPeriodicTxPtrnParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530692QDF_STATUS sme_del_periodic_tx_ptrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800693 *delPeriodicTxPtrnParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530694QDF_STATUS sme_send_rate_update_ind(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800695 tSirRateUpdateInd *rateUpdateParams);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530696QDF_STATUS sme_roam_del_pmkid_from_cache(tHalHandle hHal, uint8_t sessionId,
Sridhar Selvarajc3684c72017-08-21 14:32:47 +0530697 tPmkidCacheInfo *pmksa, bool flush_cache);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800698void sme_get_command_q_status(tHalHandle hHal);
699
Rajeev Kumar8e3e2832015-11-06 16:02:54 -0800700QDF_STATUS sme_enable_rmc(tHalHandle hHal, uint32_t sessionId);
701QDF_STATUS sme_disable_rmc(tHalHandle hHal, uint32_t sessionId);
702QDF_STATUS sme_send_rmc_action_period(tHalHandle hHal, uint32_t sessionId);
703QDF_STATUS sme_request_ibss_peer_info(tHalHandle hHal, void *pUserData,
704 pIbssPeerInfoCb peerInfoCbk, bool allPeerInfoReqd, uint8_t staIdx);
705QDF_STATUS sme_send_cesium_enable_ind(tHalHandle hHal, uint32_t sessionId);
706
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800707/*
708 * SME API to enable/disable idle mode powersave
709 * This should be called only if powersave offload
710 * is enabled
711 */
Arunk Khandavalli847969d2017-09-25 15:15:36 +0530712QDF_STATUS sme_set_idle_powersave_config(bool value);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530713QDF_STATUS sme_notify_modem_power_state(tHalHandle hHal, uint32_t value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800714
715/*SME API to convert convert the ini value to the ENUM used in csr and MAC*/
716ePhyChanBondState sme_get_cb_phy_state_from_cb_ini_value(uint32_t cb_ini_value);
717int sme_update_ht_config(tHalHandle hHal, uint8_t sessionId, uint16_t htCapab,
718 int value);
719int16_t sme_get_ht_config(tHalHandle hHal, uint8_t session_id,
720 uint16_t ht_capab);
721#ifdef QCA_HT_2040_COEX
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530722QDF_STATUS sme_notify_ht2040_mode(tHalHandle hHal, uint16_t staId,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530723 struct qdf_mac_addr macAddrSTA,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800724 uint8_t sessionId,
725 uint8_t channel_type);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530726QDF_STATUS sme_set_ht2040_mode(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800727 uint8_t channel_type, bool obssEnabled);
728#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530729QDF_STATUS sme_get_reg_info(tHalHandle hHal, uint8_t chanId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800730 uint32_t *regInfo1, uint32_t *regInfo2);
731#ifdef FEATURE_WLAN_TDLS
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530732QDF_STATUS sme_update_fw_tdls_state(tHalHandle hHal, void *psmeTdlsParams,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800733 bool useSmeLock);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800734#endif /* FEATURE_WLAN_TDLS */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530735QDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800736#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530737QDF_STATUS sme_set_auto_shutdown_cb(tHalHandle hHal, void (*pCallbackfn)(void));
738QDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800739#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530740QDF_STATUS sme_roam_channel_change_req(tHalHandle hHal,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700741 struct qdf_mac_addr bssid,
Amar Singhal5cccafe2017-02-15 12:42:58 -0800742 struct ch_params *ch_params,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700743 tCsrRoamProfile *profile);
744
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530745QDF_STATUS sme_roam_start_beacon_req(tHalHandle hHal,
Anurag Chouhan6d760662016-02-20 16:05:43 +0530746 struct qdf_mac_addr bssid, uint8_t dfsCacWaitStatus);
747QDF_STATUS sme_roam_csa_ie_request(tHalHandle hHal, struct qdf_mac_addr bssid,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700748 uint8_t targetChannel, uint8_t csaIeReqd,
Amar Singhal5cccafe2017-02-15 12:42:58 -0800749 struct ch_params *ch_params);
Amar Singhale4f28ee2015-10-21 14:36:56 -0700750
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530751QDF_STATUS sme_init_thermal_info(tHalHandle hHal,
Amar Singhale4f28ee2015-10-21 14:36:56 -0700752 tSmeThermalParams thermalParam);
753
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530754QDF_STATUS sme_set_thermal_level(tHalHandle hHal, uint8_t level);
755QDF_STATUS sme_txpower_limit(tHalHandle hHal, tSirTxPowerLimit *psmetx);
756QDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800757 void *plsContext,
758 void (*pCallbackfn)(tSirLinkSpeedInfo *indParam,
759 void *pContext));
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530760QDF_STATUS sme_modify_add_ie(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800761 tSirModifyIE *pModifyIE, eUpdateIEsType updateType);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530762QDF_STATUS sme_update_add_ie(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800763 tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530764QDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value);
Sreelakshmi Konamki39acb132015-12-16 13:06:22 +0530765const char *sme_request_type_to_string(const uint8_t request_type);
Rajeev Kumar43e25b12016-04-15 16:26:36 -0700766const char *sme_scan_type_to_string(const uint8_t scan_type);
767const char *sme_bss_type_to_string(const uint8_t bss_type);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530768QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800769 bool disablefwd);
770uint32_t sme_get_channel_bonding_mode5_g(tHalHandle hHal);
771uint32_t sme_get_channel_bonding_mode24_g(tHalHandle hHal);
772#ifdef WLAN_FEATURE_STATS_EXT
773typedef struct sStatsExtRequestReq {
774 uint32_t request_data_len;
775 uint8_t *request_data;
776} tStatsExtRequestReq, *tpStatsExtRequestReq;
777typedef void (*StatsExtCallback)(void *, tStatsExtEvent *);
778void sme_stats_ext_register_callback(tHalHandle hHal,
779 StatsExtCallback callback);
lifeng66831662017-05-19 16:01:35 +0800780/**
781 * sme_register_stats_ext2_callback() - Register stats ext2 register
782 * @hal_handle: hal handle for getting global mac struct
783 * @stats_ext2_cb: callback to be registered
784 *
785 * This function will register a callback for frame aggregation failure
786 * indications processing.
787 *
788 * Return: void
789 */
790void sme_stats_ext2_register_callback(tHalHandle hal_handle,
791 void (*stats_ext2_cb)(void *, struct sir_sme_rx_aggr_hole_ind *));
Krunal Soniaadaa272017-10-04 16:42:55 -0700792/**
793 * sme_send_unit_test_cmd() - send unit test command to lower layer
794 * @session_id: sme session id to be filled while forming the command
795 * @module_id: module id given by user to be filled in the command
796 * @arg_count: number of argument count
797 * @arg: pointer to argument list
798 *
799 * This API exposed to HDD layer which takes the argument from user and sends
800 * down to lower layer for further processing
801 *
802 * Return: QDF_STATUS based on overall success
803 */
804QDF_STATUS sme_send_unit_test_cmd(uint32_t vdev_id, uint32_t module_id,
805 uint32_t arg_count, uint32_t *arg);
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530806void sme_stats_ext_deregister_callback(tHalHandle hhal);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530807QDF_STATUS sme_stats_ext_request(uint8_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800808 tpStatsExtRequestReq input);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530809QDF_STATUS sme_stats_ext_event(tHalHandle hHal, void *pMsg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800810#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530811QDF_STATUS sme_update_dfs_scan_mode(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800812 uint8_t sessionId,
813 uint8_t allowDFSChannelRoam);
814uint8_t sme_get_dfs_scan_mode(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800815
816#ifdef FEATURE_WLAN_EXTSCAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530817QDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, uint8_t wifiBand,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800818 uint32_t *aValidChannels,
819 uint8_t *pNumChannels);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530820QDF_STATUS sme_ext_scan_get_capabilities(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800821 tSirGetExtScanCapabilitiesReqParams *pReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530822QDF_STATUS sme_ext_scan_start(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800823 tSirWifiScanCmdReqParams *pStartCmd);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530824QDF_STATUS sme_ext_scan_stop(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800825 tSirExtScanStopReqParams *pStopReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530826QDF_STATUS sme_set_bss_hotlist(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800827 tSirExtScanSetBssidHotListReqParams *
828 pSetHotListReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530829QDF_STATUS sme_reset_bss_hotlist(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800830 tSirExtScanResetBssidHotlistReqParams *
831 pResetReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530832QDF_STATUS sme_set_significant_change(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800833 tSirExtScanSetSigChangeReqParams *
834 pSetSignificantChangeReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530835QDF_STATUS sme_reset_significant_change(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800836 tSirExtScanResetSignificantChangeReqParams
837 *pResetReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530838QDF_STATUS sme_get_cached_results(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800839 tSirExtScanGetCachedResultsReqParams *
840 pCachedResultsReq);
841
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530842QDF_STATUS sme_set_epno_list(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800843 struct wifi_epno_params *req_msg);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530844QDF_STATUS sme_set_passpoint_list(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800845 struct wifi_passpoint_req *req_msg);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530846QDF_STATUS sme_reset_passpoint_list(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800847 struct wifi_passpoint_req *req_msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800848
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530849QDF_STATUS sme_ext_scan_register_callback(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800850 void (*pExtScanIndCb)(void *, const uint16_t, void *));
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800851#else
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530852static inline QDF_STATUS sme_ext_scan_register_callback(tHalHandle hHal,
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800853 void (*pExtScanIndCb)(void *, const uint16_t, void *))
854{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530855 return QDF_STATUS_SUCCESS;
Prashanth Bhatta75fa9a12016-01-11 18:30:08 -0800856}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800857#endif /* FEATURE_WLAN_EXTSCAN */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530858QDF_STATUS sme_abort_roam_scan(tHalHandle hHal, uint8_t sessionId);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800859#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530860QDF_STATUS sme_ll_stats_clear_req(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800861 tSirLLStatsClearReq * pclearStatsReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530862QDF_STATUS sme_ll_stats_set_req(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800863 tSirLLStatsSetReq *psetStatsReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530864QDF_STATUS sme_ll_stats_get_req(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800865 tSirLLStatsGetReq *pgetStatsReq);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530866QDF_STATUS sme_set_link_layer_stats_ind_cb(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800867 void (*callbackRoutine)(void *callbackCtx,
868 int indType, void *pRsp));
Zhang Qiana6e9c102016-12-22 16:47:24 +0800869QDF_STATUS sme_set_link_layer_ext_cb(tHalHandle hal,
870 void (*ll_stats_ext_cb)(tHddHandle callback_ctx,
871 tSirLLStatsResults * rsp));
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530872QDF_STATUS sme_reset_link_layer_stats_ind_cb(tHalHandle hhal);
Zhang Qian73c348a2017-03-13 16:15:55 +0800873QDF_STATUS sme_ll_stats_set_thresh(tHalHandle hal,
874 struct sir_ll_ext_stats_threshold *threshold);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800875#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
876
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530877QDF_STATUS sme_fw_mem_dump(tHalHandle hHal, void *recvd_req);
878QDF_STATUS sme_fw_mem_dump_register_cb(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800879 void (*callback_routine)(void *cb_context,
880 struct fw_dump_rsp *rsp));
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530881QDF_STATUS sme_fw_mem_dump_unregister_cb(tHalHandle hHal);
Manikandan Mohan80dea792016-04-28 16:36:48 -0700882QDF_STATUS sme_set_wisa_params(tHalHandle hal,
883 struct sir_wisa_params *wisa_params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800884#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530885QDF_STATUS sme_update_roam_offload_enabled(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800886 bool nRoamOffloadEnabled);
Deepak Dhamdheref2a7d8b2016-08-19 16:17:38 -0700887QDF_STATUS sme_update_roam_key_mgmt_offload_enabled(tHalHandle hal_ctx,
888 uint8_t session_id,
889 bool key_mgmt_offload_enabled,
Deepak Dhamdhere828f1892017-02-09 11:51:19 -0800890 struct pmkid_mode_bits *pmkid_modes);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800891#endif
892#ifdef WLAN_FEATURE_NAN
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530893QDF_STATUS sme_nan_event(tHalHandle hHal, void *pMsg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800894#endif /* WLAN_FEATURE_NAN */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530895QDF_STATUS sme_get_link_status(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800896 tCsrLinkStatusCallback callback,
897 void *pContext, uint8_t sessionId);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530898QDF_STATUS sme_get_temperature(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800899 void *tempContext,
900 void (*pCallbackfn)(int temperature,
901 void *pContext));
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530902QDF_STATUS sme_set_scanning_mac_oui(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800903 tSirScanMacOui *pScanMacOui);
904
905#ifdef IPA_OFFLOAD
906/* ---------------------------------------------------------------------------
907 \fn sme_ipa_offload_enable_disable
908 \brief API to enable/disable IPA offload
909 \param hHal - The handle returned by macOpen.
910 \param sessionId - Session Identifier
911 \param pRequest - Pointer to the offload request.
Deepak Dhamdhere0f076bd2016-06-02 11:29:21 -0700912 \return QDF_STATUS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800913 ---------------------------------------------------------------------------*/
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530914QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800915 uint8_t session_id,
916 struct sir_ipa_offload_enable_disable *request);
917#else
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530918static inline QDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800919 uint8_t session_id,
920 struct sir_ipa_offload_enable_disable *request)
921{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530922 return QDF_STATUS_SUCCESS;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800923}
924#endif /* IPA_OFFLOAD */
925
926#ifdef DHCP_SERVER_OFFLOAD
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530927QDF_STATUS sme_set_dhcp_srv_offload(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800928 tSirDhcpSrvOffloadInfo * pDhcpSrvInfo);
929#endif /* DHCP_SERVER_OFFLOAD */
930#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530931QDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800932 uint32_t x0, uint32_t x1);
933#endif
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530934QDF_STATUS sme_handle_dfs_chan_scan(tHalHandle hHal, uint8_t dfs_flag);
935QDF_STATUS sme_set_mas(uint32_t val);
936QDF_STATUS sme_set_miracast(tHalHandle hal, uint8_t filter_type);
937QDF_STATUS sme_ext_change_channel(tHalHandle hHal, uint32_t channel,
Abhishek Singh518323d2015-10-19 17:42:01 +0530938 uint8_t session_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800939
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530940QDF_STATUS sme_configure_modulated_dtim(tHalHandle hal, uint8_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800941 uint32_t modulated_dtim);
942
Mukul Sharma6398b252017-05-01 17:58:12 +0530943QDF_STATUS sme_override_listen_interval(tHalHandle h_hal, uint8_t session_id,
944 uint32_t override_li);
945
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530946QDF_STATUS sme_configure_stats_avg_factor(tHalHandle hal, uint8_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800947 uint16_t stats_avg_factor);
948
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530949QDF_STATUS sme_configure_guard_time(tHalHandle hal, uint8_t session_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800950 uint32_t guard_time);
951
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530952QDF_STATUS sme_wifi_start_logger(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800953 struct sir_wifi_start_log start_log);
954
955bool sme_neighbor_middle_of_roaming(tHalHandle hHal,
956 uint8_t sessionId);
957
Jeff Johnsona1e92612017-09-24 15:33:44 -0700958/**
959 * sme_enable_uapsd_for_ac() - enable uapsd for access catagory request to WMA
960 * @sta_id: station id
961 * @ac: access catagory
962 * @tid: tid value
963 * @pri: user priority
964 * @srvc_int: service interval
965 * @sus_int: suspend interval
966 * @dir: tspec direction
967 * @psb: PSB value
968 * @sessionId: session id
969 * @delay_interval: delay interval
970 *
971 * Return: QDF status
972 */
973QDF_STATUS sme_enable_uapsd_for_ac(uint8_t sta_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800974 sme_ac_enum_type ac, uint8_t tid,
975 uint8_t pri, uint32_t srvc_int,
976 uint32_t sus_int,
Abhishek Singh12be60f2017-08-11 13:52:42 +0530977 enum sme_qos_wmm_dir_type dir,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800978 uint8_t psb, uint32_t sessionId,
979 uint32_t delay_interval);
980
Jeff Johnsona1e92612017-09-24 15:33:44 -0700981/**
982 * sme_disable_uapsd_for_ac() - disable uapsd access catagory request to WMA
983 * @sta_id: station id
984 * @ac: access catagory
985 * @sessionId: session id
986 *
987 * Return: QDF status
988 */
989QDF_STATUS sme_disable_uapsd_for_ac(uint8_t sta_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800990 sme_ac_enum_type ac,
991 uint32_t sessionId);
992
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530993QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800994 struct rssi_monitor_req *input);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530995QDF_STATUS sme_set_rssi_threshold_breached_cb(tHalHandle hal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800996 void (*cb)(void *, struct rssi_breach_event *));
Arun Khandavalli4b55da72016-07-19 19:55:01 +0530997QDF_STATUS sme_reset_rssi_threshold_breached_cb(tHalHandle hal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800998
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530999QDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal,
Abhishek Singh7996eb72015-12-30 17:24:02 +05301000 sir_mgmt_frame_ind_callback callback);
1001
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301002QDF_STATUS sme_update_nss(tHalHandle h_hal, uint8_t nss);
Archana Ramachandran5041b252016-04-25 14:29:25 -07001003void sme_update_user_configured_nss(tHalHandle hal, uint8_t nss);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001004
1005bool sme_is_any_session_in_connected_state(tHalHandle h_hal);
1006
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001007QDF_STATUS sme_pdev_set_pcl(struct policy_mgr_pcl_list msg);
1008QDF_STATUS sme_pdev_set_hw_mode(struct policy_mgr_hw_mode msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001009void sme_register_hw_mode_trans_cb(tHalHandle hal,
1010 hw_mode_transition_cb callback);
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001011QDF_STATUS sme_nss_update_request(uint32_t vdev_id,
1012 uint8_t new_nss, policy_mgr_nss_update_cback cback,
1013 uint8_t next_action, struct wlan_objmgr_psoc *psoc,
1014 enum policy_mgr_conn_update_reason reason);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001015
1016typedef void (*sme_peer_authorized_fp) (uint32_t vdev_id);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301017QDF_STATUS sme_set_peer_authorized(uint8_t *peer_addr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001018 sme_peer_authorized_fp auth_fp,
1019 uint32_t vdev_id);
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001020QDF_STATUS sme_soc_set_dual_mac_config(struct policy_mgr_dual_mac_config msg);
Archana Ramachandrand41c3ed2016-02-10 15:48:06 -08001021QDF_STATUS sme_soc_set_antenna_mode(tHalHandle hal,
1022 struct sir_antenna_mode_param *msg);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001023
1024void sme_set_scan_disable(tHalHandle h_hal, int value);
1025void sme_setdef_dot11mode(tHalHandle hal);
1026
Amar Singhal7c1e8982016-05-19 15:08:09 -07001027QDF_STATUS sme_handle_set_fcc_channel(tHalHandle hHal,
Amar Singhal83a047a2016-05-19 15:56:11 -07001028 bool fcc_constraint,
1029 bool scan_pending);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001030
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301031QDF_STATUS sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001032 uint8_t session_id,
1033 uint32_t notify_id,
1034 int32_t val);
1035
1036void wlan_sap_enable_phy_error_logs(tHalHandle hal, bool enable_log);
Agrawal Ashishb141b092016-09-02 19:59:26 +05301037#ifdef WLAN_FEATURE_DSRC
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001038void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p);
1039
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301040QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001041 ocb_callback callback,
1042 struct sir_ocb_config *config);
1043
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301044QDF_STATUS sme_ocb_set_utc_time(tHalHandle hHal, struct sir_ocb_utc *utc);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001045
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301046QDF_STATUS sme_ocb_start_timing_advert(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001047 struct sir_ocb_timing_advert *timing_advert);
1048
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301049QDF_STATUS sme_ocb_stop_timing_advert(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001050 struct sir_ocb_timing_advert *timing_advert);
1051
Naveen Rawatb4d37622015-11-13 16:15:25 -08001052int sme_ocb_gen_timing_advert_frame(tHalHandle hHal, tSirMacAddr self_addr,
1053 uint8_t **buf, uint32_t *timestamp_offset,
1054 uint32_t *time_value_offset);
1055
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301056QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001057 ocb_callback callback,
1058 struct sir_ocb_get_tsf_timer *request);
1059
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301060QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001061 ocb_callback callback,
1062 struct sir_dcc_get_stats *request);
1063
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301064QDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001065 uint32_t dcc_stats_bitmap);
1066
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301067QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001068 ocb_callback callback,
1069 struct sir_dcc_update_ndl *request);
1070
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301071QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001072 ocb_callback callback);
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301073QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal);
1074
Agrawal Ashishb141b092016-09-02 19:59:26 +05301075#else
1076static inline void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p)
1077{
1078 return;
1079}
1080
1081static inline QDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context,
1082 ocb_callback callback,
1083 struct sir_ocb_config *config)
1084{
1085 return QDF_STATUS_SUCCESS;
1086}
1087
1088static inline QDF_STATUS sme_ocb_set_utc_time(struct sir_ocb_utc *utc)
1089{
1090 return QDF_STATUS_SUCCESS;
1091}
1092
1093static inline QDF_STATUS sme_ocb_start_timing_advert(
1094 struct sir_ocb_timing_advert *timing_advert)
1095{
1096 return QDF_STATUS_SUCCESS;
1097}
1098
1099static inline QDF_STATUS sme_ocb_stop_timing_advert(struct sir_ocb_timing_advert
1100 *timing_advert)
1101{
1102 return QDF_STATUS_SUCCESS;
1103}
1104
1105static inline int sme_ocb_gen_timing_advert_frame(tHalHandle hHal,
1106 tSirMacAddr self_addr, uint8_t **buf,
1107 uint32_t *timestamp_offset,
1108 uint32_t *time_value_offset)
1109{
1110 return 0;
1111}
1112
1113static inline QDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context,
1114 ocb_callback callback,
1115 struct sir_ocb_get_tsf_timer *request)
1116{
1117 return QDF_STATUS_SUCCESS;
1118}
1119
1120static inline QDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context,
1121 ocb_callback callback,
1122 struct sir_dcc_get_stats *request)
1123{
1124 return QDF_STATUS_SUCCESS;
1125}
1126
1127static inline QDF_STATUS sme_dcc_clear_stats(uint32_t vdev_id,
1128 uint32_t dcc_stats_bitmap)
1129{
1130 return QDF_STATUS_SUCCESS;
1131}
1132
1133static inline QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context,
1134 ocb_callback callback,
1135 struct sir_dcc_update_ndl *request)
1136{
1137 return QDF_STATUS_SUCCESS;
1138}
1139
1140static inline QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal,
1141 void *context, ocb_callback callback)
1142{
1143 return QDF_STATUS_SUCCESS;
1144}
1145static inline QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal)
1146{
1147 return QDF_STATUS_SUCCESS;
1148}
1149#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001150void sme_add_set_thermal_level_callback(tHalHandle hal,
1151 sme_set_thermal_level_callback callback);
1152
Krishna Kumaar Natarajan052c6e62015-09-28 15:32:55 -07001153void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg);
Edhar, Mahesh Kumardf2ec122015-11-16 11:33:16 +05301154bool sme_validate_sap_channel_switch(tHalHandle hal,
1155 uint16_t sap_ch, eCsrPhyMode sap_phy_mode,
1156 uint8_t cc_switch_mode, uint8_t session_id);
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +05301157
Chandrasekaran, Manishekar2859de42016-02-11 16:17:38 +05301158bool sme_is_session_id_valid(tHalHandle hal, uint32_t session_id);
1159
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +05301160#ifdef FEATURE_WLAN_TDLS
1161void sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset,
1162 uint8_t *opclass);
1163#else
1164static inline void
1165sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset,
1166 uint8_t *opclass)
1167{
1168}
1169#endif
1170
Ravi Joshi61c3c7a2015-11-09 18:41:20 -08001171#ifdef FEATURE_LFR_SUBNET_DETECTION
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301172QDF_STATUS sme_gateway_param_update(tHalHandle hHal,
Ravi Joshi61c3c7a2015-11-09 18:41:20 -08001173 struct gateway_param_update_req *request);
1174#endif
1175
Ryan Hsu3c8f79f2015-12-02 16:45:09 -08001176#ifdef FEATURE_GREEN_AP
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301177QDF_STATUS sme_send_egap_conf_params(uint32_t enable,
Ryan Hsu3c8f79f2015-12-02 16:45:09 -08001178 uint32_t inactivity_time,
1179 uint32_t wait_time,
1180 uint32_t flags);
1181#else
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301182static inline QDF_STATUS sme_send_egap_conf_params(uint32_t enable,
Ryan Hsu3c8f79f2015-12-02 16:45:09 -08001183 uint32_t inactivity_time,
1184 uint32_t wait_time,
1185 uint32_t flags)
1186{
Anurag Chouhanfb54ab02016-02-18 18:00:46 +05301187 return QDF_STATUS_E_NOSUPPORT;
Ryan Hsu3c8f79f2015-12-02 16:45:09 -08001188}
1189#endif
Krunal Sonie3531942016-04-12 17:43:53 -07001190
Selvaraj, Sridhar57bb4d02016-08-31 16:14:15 +05301191void sme_update_fine_time_measurement_capab(tHalHandle hal, uint8_t session_id,
1192 uint32_t val);
Sandeep Puligillae0875662016-02-12 16:09:21 -08001193QDF_STATUS sme_ht40_stop_obss_scan(tHalHandle hHal, uint32_t vdev_id);
Anurag Chouhanbf5e0e22016-09-12 12:54:09 +05301194QDF_STATUS sme_set_fw_test(struct set_fwtest_params *fw_test);
Manikandan Mohandcc21ba2016-03-15 14:31:56 -07001195QDF_STATUS sme_set_tsfcb(tHalHandle hHal,
1196 int (*cb_fn)(void *cb_ctx, struct stsf *ptsf), void *cb_ctx);
Krunal Sonie3531942016-04-12 17:43:53 -07001197
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301198QDF_STATUS sme_reset_tsfcb(tHalHandle h_hal);
1199
Manikandan Mohan976e7562016-03-15 16:33:31 -07001200#ifdef WLAN_FEATURE_TSF
1201QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue);
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301202QDF_STATUS sme_reset_tsf_gpio(tHalHandle h_hal);
1203
Manikandan Mohan976e7562016-03-15 16:33:31 -07001204#else
1205static inline QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue)
1206{
1207 return QDF_STATUS_E_FAILURE;
1208}
Arun Khandavalli4b55da72016-07-19 19:55:01 +05301209static inline QDF_STATUS sme_reset_tsf_gpio(tHalHandle h_hal)
1210{
1211 return QDF_STATUS_E_FAILURE;
1212}
1213
Manikandan Mohan976e7562016-03-15 16:33:31 -07001214#endif
1215
Archana Ramachandran20d2e232016-02-11 16:58:40 -08001216QDF_STATUS sme_update_mimo_power_save(tHalHandle hHal,
1217 uint8_t is_ht_smps_enabled,
Archana Ramachandranfec24812016-02-16 16:31:56 -08001218 uint8_t ht_smps_mode,
1219 bool send_smps_action);
Archana Ramachandran20d2e232016-02-11 16:58:40 -08001220
1221bool sme_is_sta_smps_allowed(tHalHandle hHal, uint8_t session_id);
Gupta, Kapil4cb1d7d2016-04-16 18:16:25 -07001222QDF_STATUS sme_add_beacon_filter(tHalHandle hal,
1223 uint32_t session_id, uint32_t *ie_map);
1224QDF_STATUS sme_remove_beacon_filter(tHalHandle hal, uint32_t session_id);
Arun Khandavalli2476ef52016-04-26 20:19:43 +05301225
Jeff Johnsona867e0c2017-01-26 13:43:51 -08001226/**
1227 * sme_get_bpf_offload_capabilities() - Get BPF offload capabilities
1228 * @hal: Global HAL handle
1229 * @callback: Callback function to be called with the result
1230 * @context: Opaque context to be used by the caller to associate the
1231 * request with the response
1232 *
1233 * This function constructs the cds message and fill in message type,
1234 * post the same to WDA.
1235 *
1236 * Return: QDF_STATUS enumeration
1237 */
1238QDF_STATUS sme_get_bpf_offload_capabilities(tHalHandle hal,
1239 bpf_get_offload_cb callback,
1240 void *context);
1241
Arun Khandavalli2476ef52016-04-26 20:19:43 +05301242QDF_STATUS sme_set_bpf_instructions(tHalHandle hal,
1243 struct sir_bpf_set_offload *);
Abhishek Singh1c676222016-05-09 14:20:28 +05301244uint32_t sme_get_wni_dot11_mode(tHalHandle hal);
Manjunathappa Prakash59f861d2016-04-21 10:33:31 -07001245QDF_STATUS sme_create_mon_session(tHalHandle hal_handle, uint8_t *bssid);
Gupta, Kapil96c7f2f2016-04-25 19:13:41 +05301246QDF_STATUS sme_set_adaptive_dwelltime_config(tHalHandle hal,
1247 struct adaptive_dwelltime_params *dwelltime_params);
Naveen Rawata410c5a2016-09-19 14:22:33 -07001248
1249void sme_set_vdev_ies_per_band(tHalHandle hal, uint8_t vdev_id);
Kiran Kumar Lokere666bf852016-05-02 12:23:02 -07001250void sme_set_pdev_ht_vht_ies(tHalHandle hHal, bool enable2x2);
1251
1252void sme_update_vdev_type_nss(tHalHandle hal, uint8_t max_supp_nss,
1253 uint32_t vdev_type_nss, eCsrBand band);
Nitesh Shahdb5ea0d2017-03-22 15:17:47 +05301254void sme_update_hw_dbs_capable(tHalHandle hal, uint8_t hw_dbs_capable);
Peng Xu8fdaa492016-06-22 10:20:47 -07001255void sme_register_p2p_lo_event(tHalHandle hHal, void *context,
1256 p2p_lo_callback callback);
Manjeet Singhf82ed072016-07-08 11:40:00 +05301257
Abhishek Singhc9941602016-08-09 16:06:22 +05301258QDF_STATUS sme_remove_bssid_from_scan_list(tHalHandle hal,
1259 tSirMacAddr bssid);
1260
Manjeet Singhf82ed072016-07-08 11:40:00 +05301261QDF_STATUS sme_process_mac_pwr_dbg_cmd(tHalHandle hal, uint32_t session_id,
1262 struct sir_mac_pwr_dbg_cmd*
1263 dbg_args);
1264
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001265void sme_get_vdev_type_nss(enum tQDF_ADAPTER_MODE dev_mode,
Tushnim Bhattacharyyaf44a9d82016-07-05 10:52:06 -07001266 uint8_t *nss_2g, uint8_t *nss_5g);
Masti, Narayanraddiab712a72016-08-04 11:59:11 +05301267QDF_STATUS sme_roam_set_default_key_index(tHalHandle hal, uint8_t session_id,
1268 uint8_t default_idx);
Kondabattini, Ganesh3f2d02c2016-09-13 12:23:47 +05301269void sme_send_disassoc_req_frame(tHalHandle hal, uint8_t session_id, uint8_t
1270 *peer_mac, uint16_t reason, uint8_t
1271 wait_for_ack);
Kondabattini, Ganeshe4f18e02016-09-13 13:01:22 +05301272QDF_STATUS sme_update_access_policy_vendor_ie(tHalHandle hal,
1273 uint8_t session_id, uint8_t *vendor_ie,
1274 int access_policy);
1275
Krishna Kumaar Natarajanf1581df2017-02-21 13:42:08 -08001276/**
1277 * sme_set_peer_param() - set peer param
1278 * @vdev_id: vdev ID
1279 * @peer_addr: peer MAC address
1280 * @param_id: param ID to be updated
1281 * @param_Value: paraam value
1282 *
1283 * This SME API is used to send the peer param to WMA to be sent to FW.
1284 *
1285 * Return: QDF_STATUS
1286 */
1287QDF_STATUS sme_set_peer_param(uint8_t *peer_addr, uint32_t param_id,
1288 uint32_t param_value, uint32_t vdev_id);
1289
Agrawal Ashish21ba2572016-09-03 16:40:10 +05301290QDF_STATUS sme_update_sta_roam_policy(tHalHandle hal,
1291 enum sta_roam_policy_dfs_mode dfs_mode,
1292 bool skip_unsafe_channels,
Agrawal, Ashish9f84c402016-11-30 16:19:44 +05301293 uint8_t session_id, uint8_t sap_operating_band);
Selvaraj, Sridharebda0f22016-08-29 16:05:23 +05301294QDF_STATUS sme_enable_disable_chanavoidind_event(tHalHandle hal,
1295 uint8_t set_value);
Deepak Dhamdhereb106ae52016-08-10 20:55:30 +05301296QDF_STATUS sme_set_default_scan_ie(tHalHandle hal, uint16_t session_id,
1297 uint8_t *ie_data, uint16_t ie_len);
Selvaraj, Sridhar7231c5f2016-09-28 12:42:33 +05301298/**
1299 * sme_update_session_param() - API to update PE session param
1300 * @hal: HAL handle for device
1301 * @session_id: Session ID
1302 * @param_type: Param type to be updated
1303 * @param_val: Param value to be update
1304 *
1305 * Note: this setting will not persist over reboots.
1306 *
1307 * Return: QDF_STATUS
1308 */
1309QDF_STATUS sme_update_session_param(tHalHandle hal, uint8_t session_id,
1310 uint32_t param_type, uint32_t param_val);
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301311
Padma, Santhosh Kumar72e7aec2016-10-12 17:23:44 +05301312#ifdef WLAN_FEATURE_DISA
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301313/**
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301314 * sme_encrypt_decrypt_msg() - handles encrypt/decrypt mesaage
1315 * @hal: HAL handle
1316 * @encrypt_decrypt_params: struct to set encryption/decryption params.
Jeff Johnsone8216e82017-01-26 15:54:51 -08001317 * @callback: callback function to be called with the result
1318 * @context: Opaque context to be passed to callback function
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301319 *
1320 * Return: QDF_STATUS enumeration.
1321 */
1322QDF_STATUS sme_encrypt_decrypt_msg(tHalHandle hal,
Jeff Johnsone8216e82017-01-26 15:54:51 -08001323 struct encrypt_decrypt_req_params *encrypt_decrypt_params,
1324 sme_encrypt_decrypt_callback callback,
1325 void *context);
Padma, Santhosh Kumar72e7aec2016-10-12 17:23:44 +05301326#endif
Padma, Santhosh Kumard7cc0792016-06-28 18:54:12 +05301327
Jeff Johnson6136fb92017-03-30 15:21:49 -07001328#ifdef WLAN_FEATURE_FIPS
1329/**
1330 * sme_fips_request() - Perform a FIPS certification operation
1331 * @hal: Hal handle for the object being certified
1332 * @param: The FIPS certification parameters
1333 * @callback: Callback function to invoke with the results
1334 * @context: Opaque context to pass back to caller in the callback
1335 *
1336 * Return: QDF_STATUS_SUCCESS if the request is successfully sent
1337 * to firmware for processing, otherwise an error status.
1338 */
1339QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param,
1340 wma_fips_cb callback, void *context);
1341#else
1342static inline
1343QDF_STATUS sme_fips_request(tHalHandle hal, struct fips_params *param,
1344 wma_fips_cb callback, void *context)
1345{
1346 return QDF_STATUS_E_NOSUPPORT;
1347}
1348#endif /* WLAN_FEATURE_FIPS */
1349
Agrawal Ashishb2d1a452016-05-05 12:23:58 +05301350/**
1351 * sme_set_cts2self_for_p2p_go() - sme function to set ini parms to FW.
1352 * @hal: reference to the HAL
1353 *
1354 * Return: QDF_STATUS
1355 */
1356QDF_STATUS sme_set_cts2self_for_p2p_go(tHalHandle hal);
Kiran Kumar Lokere1aa9c9a2016-10-05 18:50:59 -07001357void sme_set_prefer_80MHz_over_160MHz(tHalHandle hal,
1358 bool sta_prefer_80MHz_over_160MHz);
Agrawal, Ashish35b251d2016-09-08 19:21:03 +05301359QDF_STATUS sme_update_tx_fail_cnt_threshold(tHalHandle hal_handle,
1360 uint8_t session_id, uint32_t tx_fail_count);
Agrawal Ashishda3e9502016-09-21 17:43:51 +05301361QDF_STATUS sme_update_short_retry_limit_threshold(tHalHandle hal_handle,
1362 struct sme_short_retry_limit *short_retry_limit_th);
1363QDF_STATUS sme_update_long_retry_limit_threshold(tHalHandle hal_handle,
1364 struct sme_long_retry_limit *long_retry_limit_th);
yeshwanth sriram guntukaa1ba9a22017-02-28 16:17:32 +05301365/**
1366 * sme_roam_is_ese_assoc() - Check if association type is ESE
1367 * @roam_info: Pointer to roam info
1368 *
1369 * Return: true if ESE Association, false otherwise.
1370 */
1371#ifdef FEATURE_WLAN_ESE
1372bool sme_roam_is_ese_assoc(tCsrRoamInfo *roam_info);
1373#else
1374static inline bool sme_roam_is_ese_assoc(tCsrRoamInfo *roam_info)
1375{
1376 return false;
1377}
1378#endif
1379/**
1380 * sme_neighbor_roam_is11r_assoc() - Check if association type is 11R
1381 * @hal_ctx: HAL handle
1382 * @session_id: session id
1383 *
1384 * Return: true if 11r Association, false otherwise.
1385 */
1386bool sme_neighbor_roam_is11r_assoc(tHalHandle hal_ctx, uint8_t session_id);
Agrawal, Ashish4e5fa1c2016-09-21 19:03:43 +05301387
1388/**
1389 * sme_update_sta_inactivity_timeout(): Update sta_inactivity_timeout to FW
1390 * @hal: Handle returned by mac_open
1391 * @sta_inactivity_timer: struct for sta inactivity timer
1392 *
1393 * If a station does not send anything in sta_inactivity_timeout seconds, an
1394 * empty data frame is sent to it in order to verify whether it is
1395 * still in range. If this frame is not ACKed, the station will be
1396 * disassociated and then deauthenticated.
1397 *
1398 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1399*/
1400QDF_STATUS sme_update_sta_inactivity_timeout(tHalHandle hal_handle,
1401 struct sme_sta_inactivity_timeout *sta_inactivity_timer);
1402
Sreelakshmi Konamki58c72432016-11-09 17:06:44 +05301403/**
1404 * sme_set_lost_link_info_cb() - plug in callback function for receiving
1405 * @hal: HAL handle
1406 * @cb: callback function
1407 *
1408 * Return: HAL status
1409 */
1410QDF_STATUS sme_set_lost_link_info_cb(tHalHandle hal,
1411 void (*cb)(void *, struct sir_lost_link_info *));
Yingying Tang95409972016-10-20 15:16:15 +08001412
Kapil Gupta8878ad92017-02-13 11:56:04 +05301413/**
1414 * sme_update_new_channel_event() - update new channel event for sapFsm
1415 * @hal: HAL handle
1416 * @session_id: session id
1417 *
1418 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1419 */
1420QDF_STATUS sme_update_new_channel_event(tHalHandle hal, uint8_t session_id);
Sridhar Selvarajdc400d22016-10-18 17:18:03 +05301421#ifdef WLAN_POWER_DEBUGFS
1422QDF_STATUS sme_power_debug_stats_req(tHalHandle hal, void (*callback_fn)
1423 (struct power_stats_response *response,
1424 void *context), void *power_stats_context);
1425#endif
Kabilan Kannan3c0a7352016-12-02 18:49:38 -08001426/**
1427 * sme_set_sar_power_limits() - set sar limits
1428 * @hal: HAL handle
1429 * @sar_limit_cmd: struct to send sar limit cmd.
1430 *
1431 * Return: QDF_STATUS enumeration.
1432 */
1433QDF_STATUS sme_set_sar_power_limits(tHalHandle hal,
1434 struct sar_limit_cmd_params *sar_limit_cmd);
Amar Singhal6edf9732016-11-20 21:43:40 -08001435void sme_set_cc_src(tHalHandle hal_handle, enum country_src);
Yingying Tang95409972016-10-20 15:16:15 +08001436
1437
1438#ifdef WLAN_FEATURE_WOW_PULSE
1439QDF_STATUS sme_set_wow_pulse(struct wow_pulse_mode *wow_pulse_set_info);
1440#endif
1441
Anurag Chouhan3920c0f2017-09-11 17:10:56 +05301442/* ARP DEBUG STATS */
1443QDF_STATUS sme_set_nud_debug_stats(tHalHandle hal,
1444 struct set_arp_stats_params
1445 *set_stats_param);
1446QDF_STATUS sme_get_nud_debug_stats(tHalHandle hal,
1447 struct get_arp_stats_params
1448 *get_stats_param);
1449QDF_STATUS sme_set_nud_debug_stats_cb(tHalHandle hal,
1450 void (*cb)(void *, struct rsp_stats *));
1451
Kapil Gupta4f0c0c12017-02-07 15:21:15 +05301452/**
1453 * sme_set_chan_info_callback() - Register chan info callback
1454 * @hal - MAC global handle
1455 * @callback_routine - callback routine from HDD
1456 *
1457 * This API is invoked by HDD to register its callback to mac
1458 *
1459 * Return: QDF_STATUS
1460 */
1461void sme_set_chan_info_callback(tHalHandle hal_handle,
1462 void (*callback)(struct scan_chan_info *chan_info));
Naveen Rawat664a7cb2017-01-19 17:58:14 -08001463
1464/**
Hanumanth Reddy Pothula90051782017-05-04 22:14:43 +05301465 * sme_get_rssi_snr_by_bssid() - gets the rssi and snr by bssid from scan cache
1466 * @hal: handle returned by mac_open
1467 * @profile: current connected profile
1468 * @bssid: bssid to look for in scan cache
1469 * @rssi: rssi value found
1470 * @snr: snr value found
1471 *
1472 * Return: QDF_STATUS
1473 */
1474QDF_STATUS sme_get_rssi_snr_by_bssid(tHalHandle hal, tCsrRoamProfile *profile,
1475 const uint8_t *bssid, int8_t *rssi,
1476 int8_t *snr);
1477
1478/**
Naveen Rawat664a7cb2017-01-19 17:58:14 -08001479 * sme_get_beacon_frm() - gets the bss descriptor from scan cache and prepares
1480 * beacon frame
1481 * @hal: handle returned by mac_open
1482 * @profile: current connected profile
1483 * @bssid: bssid to look for in scan cache
1484 * @frame_buf: frame buffer to populate
1485 * @frame_len: length of constructed frame
Selvaraj, Sridhar64b0a9c2017-05-11 16:50:15 +05301486 * @channel: Pointer to channel info to be filled
Naveen Rawat664a7cb2017-01-19 17:58:14 -08001487 *
1488 * Return: QDF_STATUS
1489 */
1490QDF_STATUS sme_get_beacon_frm(tHalHandle hal, tCsrRoamProfile *profile,
1491 const tSirMacAddr bssid,
Selvaraj, Sridhar64b0a9c2017-05-11 16:50:15 +05301492 uint8_t **frame_buf, uint32_t *frame_len,
1493 int *channel);
Naveen Rawat4195c5e2017-05-22 17:07:45 -07001494/**
1495 * sme_fast_reassoc() - invokes FAST REASSOC command
1496 * @hal: handle returned by mac_open
1497 * @profile: current connected profile
1498 * @bssid: bssid to look for in scan cache
1499 * @channel: channel on which reassoc should be send
1500 * @vdev_id: vdev id
Krunal Soni332f4af2017-06-01 14:36:17 -07001501 * @connected_bssid: bssid of currently connected profile
Naveen Rawat4195c5e2017-05-22 17:07:45 -07001502 *
1503 * Return: QDF_STATUS
1504 */
1505QDF_STATUS sme_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile,
1506 const tSirMacAddr bssid, int channel,
Krunal Soni332f4af2017-06-01 14:36:17 -07001507 uint8_t vdev_id, const tSirMacAddr connected_bssid);
Naveen Rawat664a7cb2017-01-19 17:58:14 -08001508
Padma, Santhosh Kumar16dacfb2017-03-21 19:05:40 +05301509/**
1510 * sme_congestion_register_callback(): registers congestion callback
1511 * @hal: handler for HAL
1512 * @congestion_cb: congestion callback
1513 *
1514 * Return: QDF_STATUS
1515 */
1516QDF_STATUS sme_congestion_register_callback(tHalHandle hal,
1517 void (*congestion_cb)(void *, uint32_t congestion, uint32_t vdev_id));
1518
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001519/**
Sreelakshmi Konamki88a2a412017-04-14 15:11:55 +05301520 * sme_rso_cmd_status_cb() - Set RSO cmd status callback
1521 * @hal: HAL Handle
1522 * @cb: HDD Callback to rso comman status read
1523 *
1524 * This function is used to save HDD RSO Command status callback in MAC
1525 *
1526 * Return: QDF_STATUS
1527 */
1528QDF_STATUS sme_rso_cmd_status_cb(tHalHandle hal,
1529 void (*cb)(void *, struct rso_cmd_status *));
1530
1531/**
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001532 * sme_register_set_connection_info_cb() - Register connection
1533 * info callback
1534 * @hal - MAC global handle
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001535 * @set_connection_info_cb - callback routine from HDD to set
1536 * connection info flag
1537 * @get_connection_info_cb - callback routine from HDD to get
1538 * connection info
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001539 *
1540 * This API is invoked by HDD to register its callback to mac
1541 *
1542 * Return: QDF_STATUS
1543 */
1544QDF_STATUS sme_register_set_connection_info_cb(tHalHandle hHal,
Tushnim Bhattacharyya0c4ad2d2017-03-09 15:59:03 -08001545 bool (*set_connection_info_cb)(bool),
1546 bool (*get_connection_info_cb)(uint8_t *session_id,
1547 enum scan_reject_states *reason));
Tushnim Bhattacharyya9e81b4c2017-02-15 17:11:14 -08001548
Kiran Kumar Lokerea3de2262017-04-12 12:15:04 -07001549/**
Nitesh Shahf9a09ff2017-05-22 15:46:25 +05301550 * sme_set_dbs_scan_selection_config() - Update DBS scan selection
1551 * configuration
1552 * @hal: The handle returned by macOpen
1553 * @params: wmi_dbs_scan_sel_params config
1554 *
1555 * Return: QDF_STATUS if DBS scan selection update
1556 * configuration success else failure status
1557 */
1558QDF_STATUS sme_set_dbs_scan_selection_config(tHalHandle hal,
1559 struct wmi_dbs_scan_sel_params *params);
1560
1561/**
Kiran Kumar Lokerea3de2262017-04-12 12:15:04 -07001562 * sme_store_pdev() - store pdev
1563 * @hal - MAC global handle
1564 * @pdev - pdev ptr
1565 *
1566 * Return: QDF_STATUS
1567 */
1568void sme_store_pdev(tHalHandle hal, struct wlan_objmgr_pdev *pdev);
1569
Sandeep Puligillaf587adf2017-04-27 19:53:21 -07001570/**
1571 * sme_ipa_uc_stat_request() - set ipa config parameters
1572 * @vdev_id: virtual device for the command
1573 * @param_id: parameter id
1574 * @param_val: parameter value
1575 * @req_cat: parameter category
1576 *
1577 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1578 */
1579QDF_STATUS sme_ipa_uc_stat_request(tHalHandle hal,
1580 uint32_t vdev_id, uint32_t param_id,
1581 uint32_t param_val, uint32_t req_cat);
lifeng66831662017-05-19 16:01:35 +08001582
1583/**
1584 * sme_set_reorder_timeout() - set reorder timeout value
1585 * including Voice,Video,Besteffort,Background parameters
1586 * @hal: hal handle for getting global mac struct
1587 * @reg: struct sir_set_rx_reorder_timeout_val
1588 *
1589 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1590 */
1591QDF_STATUS sme_set_reorder_timeout(tHalHandle hal,
1592 struct sir_set_rx_reorder_timeout_val *req);
1593
1594/**
1595 * sme_set_rx_set_blocksize() - set blocksize value
1596 * including mac_addr and win_limit parameters
1597 * @hal: hal handle for getting global mac struct
1598 * @reg: struct sir_peer_set_rx_blocksize
1599 *
1600 * Return: QDF_STATUS_SUCCESS or non-zero on failure.
1601 */
1602
1603QDF_STATUS sme_set_rx_set_blocksize(tHalHandle hal,
1604 struct sir_peer_set_rx_blocksize *req);
1605
Ravi Kumar Bokka05c14e52017-03-27 14:48:23 +05301606/*
1607 * sme_set_chip_pwr_save_fail_cb() - set chip power save failure callback
1608 * @hal: global hal handle
1609 * @cb: callback function pointer
1610 *
1611 * This function stores the chip power save failure callback function.
1612 *
1613 * Return: QDF_STATUS enumeration.
1614 */
1615
1616QDF_STATUS sme_set_chip_pwr_save_fail_cb(tHalHandle hal, void (*cb)(void *,
1617 struct chip_pwr_save_fail_detected_params *));
Naveen Rawat247a8682017-06-05 15:00:31 -07001618/**
1619 * sme_cli_set_command() - SME wrapper API over WMA "set" command
1620 * processor cmd
1621 * @vdev_id: virtual device for the command
1622 * @param_id: parameter id
1623 * @sval: parameter value
1624 * @vpdev: parameter category
1625 *
1626 * Command handler for set operations
1627 *
1628 * Return: 0 on success, errno on failure
1629 */
1630int sme_cli_set_command(int vdev_id, int param_id, int sval, int vpdev);
Ravi Kumar Bokka05c14e52017-03-27 14:48:23 +05301631
Vidyullatha Kanchanapallybe0ebb32017-03-23 14:36:21 +05301632/**
1633 * sme_set_bt_activity_info_cb - set the callback handler for bt events
1634 * @hal: handle returned by mac_open
1635 * @cb: callback handler
1636 *
1637 * Return: QDF_STATUS
1638 */
1639QDF_STATUS sme_set_bt_activity_info_cb(tHalHandle hal,
1640 void (*cb)(void *, uint32_t profile_info));
1641
Will Huang558f8082017-05-31 16:22:24 +08001642/**
Ashish Kumar Dhanotiyab28338c2017-07-21 20:12:34 +05301643 * sme_set_smps_cfg() - set SMPS config params
1644 * @vdev_id: virtual device for the command
1645 * @param_id: parameter id
1646 * @param_val: parameter value
1647 *
1648 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1649 */
1650
1651QDF_STATUS sme_set_smps_cfg(uint32_t vdev_id, uint32_t param_id,
1652 uint32_t param_val);
1653/**
Will Huang558f8082017-05-31 16:22:24 +08001654 * sme_get_peer_info() - sme api to get peer info
1655 * @hal: hal handle for getting global mac struct
1656 * @req: peer info request struct send to wma
1657 * @context: context of callback function
1658 * @callbackfn: hdd callback function when receive response
1659 *
1660 * This function will send WMA_GET_PEER_INFO to WMA
1661 *
1662 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1663 */
1664QDF_STATUS sme_get_peer_info(tHalHandle hal,
1665 struct sir_peer_info_req req,
1666 void *context,
1667 void (*callbackfn)(struct sir_peer_info_resp *param,
1668 void *pcontext));
1669
1670/**
1671 * sme_get_peer_info_ext() - sme api to get peer ext info
1672 * @hal: hal handle for getting global mac struct
1673 * @req: peer ext info request struct send to wma
1674 * @context: context of callback function
1675 * @callbackfn: hdd callback function when receive response
1676 *
1677 * This function will send WMA_GET_PEER_INFO_EXT to WMA
1678 *
1679 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1680 */
1681QDF_STATUS sme_get_peer_info_ext(tHalHandle hal,
1682 struct sir_peer_info_ext_req *req,
1683 void *context,
1684 void (*callbackfn)(struct sir_peer_info_ext_resp *param,
1685 void *pcontext));
Manjeet Singha9cae432017-02-28 11:58:22 +05301686
Tushnim Bhattacharyya518e80f2017-08-30 17:35:33 -07001687/**
1688 * sme_set_5g_band_pref() - sme api to set 5Ghz preference
1689 * @hal: hal handle for getting global mac struct
1690 * @pref_params: preference info request struct
1691 *
1692 * This function will set 5Ghz preference for STA connection
1693 *
1694 * Return: None
1695 */
Manjeet Singha9cae432017-02-28 11:58:22 +05301696void sme_set_5g_band_pref(tHalHandle hal_handle,
1697 struct sme_5g_band_pref_params *pref_params);
lifengd217d192017-05-09 19:44:16 +08001698/**
1699 * sme_get_chain_rssi() - Get chain rssi
1700 * @hal: Global HAL handle
1701 * @input: get chain rssi req params
1702 * @callback: Callback function to be called with the result
1703 * @context: Opaque context to be used by the caller to associate the
1704 * request with the response
1705 *
1706 * This function constructs the cds message and fill in message type,
1707 * post the same to WDA.
1708 *
1709 * Return: QDF_STATUS enumeration
1710 */
1711QDF_STATUS sme_get_chain_rssi(tHalHandle hal,
1712 struct get_chain_rssi_req_params *input,
1713 get_chain_rssi_callback callback,
1714 void *context);
Tushnim Bhattacharyyac3c375e2017-08-04 23:39:55 -07001715
1716/**
1717 * sme_get_valid_channels() - sme api to get valid channels for
1718 * current regulatory domain
1719 * @chan_list: list of the valid channels
1720 * @list_len: length of the channel list
1721 *
1722 * This function will get valid channels for current regulatory
1723 * domain
1724 *
1725 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1726 */
1727QDF_STATUS sme_get_valid_channels(uint8_t *chan_list, uint32_t *list_len);
Tushnim Bhattacharyya518e80f2017-08-30 17:35:33 -07001728
1729/**
1730 * sme_get_mac_context() - sme api to get the pmac context
1731 *
1732 * This function will return the pmac context
1733 *
1734 * Return: pointer to pmac context
1735 */
1736tpAniSirGlobal sme_get_mac_context(void);
Vignesh Viswanathan66c951d2017-09-06 12:23:42 +05301737
1738/**
1739 * sme_display_disconnect_stats() - Display per session Disconnect stats
1740 * @hal: hal global context
1741 * session_id: SME session id
1742 *
1743 * Return: None
1744 */
1745void sme_display_disconnect_stats(tHalHandle hal, uint8_t session_id);
Sandeep Puligilla1426d612017-04-12 18:22:06 -07001746
1747/**
1748 * sme_process_msg_callback() - process callback message from LIM
1749 * @hal: global hal handle
1750 * @msg: scheduler message
1751 *
1752 * This function process the callback messages from LIM.
1753 *
1754 * Return: QDF_STATUS enumeration.
1755 */
1756QDF_STATUS sme_process_msg_callback(tHalHandle hal,
1757 struct scheduler_msg *msg);
Nachiket Kukadeaaf8a712017-07-27 19:15:36 +05301758
1759/**
1760 * sme_set_bmiss_bcnt() - set bmiss config parameters
1761 * @vdev_id: virtual device for the command
1762 * @first_cnt: bmiss first value
1763 * @final_cnt: bmiss final value
1764 *
1765 * Return: QDF_STATUS_SUCCESS or non-zero on failure
1766 */
1767QDF_STATUS sme_set_bmiss_bcnt(uint32_t vdev_id, uint32_t first_cnt,
1768 uint32_t final_cnt);
1769
Ganesh Kondabattini479a8ae2017-10-03 16:49:24 +05301770/**
1771 * sme_send_limit_off_channel_params() - send limit off channel parameters
1772 * @hal: global hal handle
1773 * @vdev_id: vdev id
1774 * @is_tos_active: tos active or inactive
1775 * @max_off_chan_time: max off channel time
1776 * @rest_time: rest time
1777 * @skip_dfs_chan: skip dfs channel
1778 *
1779 * This function sends command to WMA for setting limit off channel command
1780 * parameters.
1781 *
1782 * Return: QDF_STATUS enumeration.
1783 */
1784QDF_STATUS sme_send_limit_off_channel_params(tHalHandle hal, uint8_t vdev_id,
1785 bool is_tos_active, uint32_t max_off_chan_time,
1786 uint32_t rest_time, bool skip_dfs_chan);
1787
Nachiket Kukade8983cf62017-10-12 18:14:48 +05301788/**
1789 * sme_set_vc_mode_config() - Set voltage corner config to FW.
1790 * @bitmap: Bitmap that refers to voltage corner config with
1791 * different phymode and bw configuration
1792 *
1793 * Return: QDF_STATUS
1794 */
1795QDF_STATUS sme_set_vc_mode_config(uint32_t vc_bitmap);
1796
Vignesh Viswanathanc6d1e1c2017-09-18 12:32:49 +05301797/**
1798 * sme_set_del_pmkid_cache() - API to update PMKID cache
1799 * @hal: HAL handle for device
1800 * @session_id: Session id
1801 * @pmk_cache_info: Pointer to PMK cache info
1802 * @is_add: boolean that implies whether to add or delete PMKID entry
1803 *
1804 * Return: QDF_STATUS
1805 */
1806QDF_STATUS sme_set_del_pmkid_cache(tHalHandle hal, uint8_t session_id,
1807 tPmkidCacheInfo *pmk_cache_info,
1808 bool is_add);
1809
1810/**
1811 * sme_send_hlp_ie_info() - API to send HLP IE info to fw
1812 * @hal: HAL handle for device
1813 * @session_id: Session id
1814 * @profile: CSR Roam profile
1815 * @if_addr: IP address
1816 *
1817 * This API is used to send HLP IE info along with IP address
1818 * to fw if LFR3 is enabled.
1819 *
1820 * Return: QDF_STATUS
1821 */
1822void sme_send_hlp_ie_info(tHalHandle hal, uint8_t session_id,
1823 tCsrRoamProfile *profile, uint32_t if_addr);
1824
1825#if defined(WLAN_FEATURE_FILS_SK)
1826/**
1827 * sme_update_fils_config - Update FILS config to CSR roam session
1828 * @hal: HAL handle for device
1829 * @session_id: session id
1830 * @src_profile: Source profile having latest FILS config
1831 *
1832 * API to update FILS config to roam csr session and update the same
1833 * to fw if LFR3 is enabled.
1834 *
1835 * Return: QDF_STATUS
1836 */
1837QDF_STATUS sme_update_fils_config(tHalHandle hal, uint8_t session_id,
1838 tCsrRoamProfile *src_profile);
1839
1840/**
1841 * sme_free_join_rsp_fils_params - free fils params
1842 * @roam_info: roam info
1843 *
1844 * Return: void
1845 */
1846void sme_free_join_rsp_fils_params(tCsrRoamInfo *roam_info);
1847#else
1848static inline QDF_STATUS sme_update_fils_config(tHalHandle hal,
1849 uint8_t session_id,
1850 tCsrRoamProfile *src_profile)
1851{
1852 return QDF_STATUS_SUCCESS;
1853}
1854
1855static inline void sme_free_join_rsp_fils_params(tCsrRoamInfo *roam_info)
1856{}
1857
1858#endif
Kiran Kumar Lokeree6476b22017-10-16 23:40:32 -07001859#ifdef WLAN_FEATURE_11AX_BSS_COLOR
1860/**
1861 * sme_set_he_bss_color() - Sets the HE BSS color
1862 *
1863 * @hal: The handle returned by mac_open
1864 * @session_id: session_id of the request
1865 * @bss_color: HE BSS color value to set
1866 *
1867 * Return: QDF_STATUS
1868 */
1869QDF_STATUS sme_set_he_bss_color(tHalHandle hal, uint8_t session_id,
1870 uint8_t bss_color);
1871#else
1872static inline QDF_STATUS sme_set_he_bss_color(tHalHandle hal,
1873 uint8_t session_id, uint8_t bss_color)
1874{
1875 return QDF_STATUS_SUCCESS;
1876}
1877#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001878#endif /* #if !defined( __SME_API_H ) */