blob: df5dc9e4dcedada707b0d97aea60a7c4cc6b533b [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Abhishek Singh7996eb72015-12-30 17:24:02 +05302 * Copyright (c) 2012-2016 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"
41#include "cds_mq.h"
42#include "cdf_lock.h"
43#include "cdf_types.h"
44#include "sir_api.h"
45#include "cds_reg_service.h"
46#include "p2p_api.h"
47#include "cds_regdomain.h"
48#include "sme_internal.h"
Krishna Kumaar Natarajan052c6e62015-09-28 15:32:55 -070049#include "wma_tgt_cfg.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080050
51#ifdef FEATURE_OEM_DATA_SUPPORT
52#include "oem_data_api.h"
53#endif
54
55#if defined WLAN_FEATURE_VOWIFI
56#include "sme_rrm_internal.h"
57#endif
58#include "sir_types.h"
59/*--------------------------------------------------------------------------
60 Preprocessor definitions and constants
61 ------------------------------------------------------------------------*/
62
63#define SME_SUMMARY_STATS 1
64#define SME_GLOBAL_CLASSA_STATS 2
65#define SME_GLOBAL_CLASSB_STATS 4
66#define SME_GLOBAL_CLASSC_STATS 8
67#define SME_GLOBAL_CLASSD_STATS 16
68#define SME_PER_STA_STATS 32
69
70#define SME_SESSION_ID_ANY 50
71
72#define SME_INVALID_COUNTRY_CODE "XX"
73
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080074#define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \
75 reg_info_1 &= 0xff00ffff; \
76 reg_info_1 |= ((val & 0xff) << 16); \
77} while (0)
78
79#define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \
80 reg_info_2 &= 0xffff00ff; \
81 reg_info_2 |= ((val & 0xff) << 8); \
82} while (0)
83
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -070084#define SME_CONFIG_TO_ROAM_CONFIG 1
85#define ROAM_CONFIG_TO_SME_CONFIG 2
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080086
87/*--------------------------------------------------------------------------
88 Type declarations
89 ------------------------------------------------------------------------*/
90typedef void (*hdd_ftm_msg_processor)(void *);
91typedef struct _smeConfigParams {
92 tCsrConfigParam csrConfig;
93#if defined WLAN_FEATURE_VOWIFI
Krishna Kumaar Natarajanf599c6e2015-11-03 11:44:03 -080094 struct rrm_config_param rrmConfig;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080095#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080096} tSmeConfigParams, *tpSmeConfigParams;
97
98#ifdef FEATURE_WLAN_TDLS
99#define SME_TDLS_MAX_SUPP_CHANNELS 128
100#define SME_TDLS_MAX_SUPP_OPER_CLASSES 32
101
102typedef struct _smeTdlsPeerCapParams {
103 uint8_t isPeerResponder;
104 uint8_t peerUapsdQueue;
105 uint8_t peerMaxSp;
106 uint8_t peerBuffStaSupport;
107 uint8_t peerOffChanSupport;
108 uint8_t peerCurrOperClass;
109 uint8_t selfCurrOperClass;
110 uint8_t peerChanLen;
111 uint8_t peerChan[SME_TDLS_MAX_SUPP_CHANNELS];
112 uint8_t peerOperClassLen;
113 uint8_t peerOperClass[SME_TDLS_MAX_SUPP_OPER_CLASSES];
114 uint8_t prefOffChanNum;
115 uint8_t prefOffChanBandwidth;
116 uint8_t opClassForPrefOffChan;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800117} tSmeTdlsPeerCapParams;
118
Kabilan Kannan421714b2015-11-23 04:44:59 -0800119/**
120 * eSmeTdlsPeerState - tdls peer state
121 * @eSME_TDLS_PEER_STATE_PEERING: tdls connection in progress
122 * @eSME_TDLS_PEER_STATE_CONNECTED: tdls peer is connected
123 * @eSME_TDLS_PEER_STATE_TEARDOWN: tdls peer is tear down
124 * @eSME_TDLS_PEER_ADD_MAC_ADDR: add peer mac into connection table
125 * @eSME_TDLS_PEER_REMOVE_MAC_ADDR: remove peer mac from connection table
126 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800127typedef enum {
128 eSME_TDLS_PEER_STATE_PEERING,
129 eSME_TDLS_PEER_STATE_CONNECTED,
Kabilan Kannan421714b2015-11-23 04:44:59 -0800130 eSME_TDLS_PEER_STATE_TEARDOWN,
131 eSME_TDLS_PEER_ADD_MAC_ADDR,
132 eSME_TDLS_PEER_REMOVE_MAC_ADDR,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800133} eSmeTdlsPeerState;
134
135typedef struct _smeTdlsPeerStateParams {
136 uint32_t vdevId;
137 tSirMacAddr peerMacAddr;
138 uint32_t peerState;
139 tSmeTdlsPeerCapParams peerCap;
140} tSmeTdlsPeerStateParams;
141
142#define ENABLE_CHANSWITCH 1
143#define DISABLE_CHANSWITCH 2
144#define BW_20_OFFSET_BIT 0
145#define BW_40_OFFSET_BIT 1
146#define BW_80_OFFSET_BIT 2
147#define BW_160_OFFSET_BIT 3
148typedef struct sme_tdls_chan_switch_params_struct {
149 uint32_t vdev_id;
150 tSirMacAddr peer_mac_addr;
151 uint16_t tdls_off_ch_bw_offset;/* Target Off Channel Bandwidth offset */
152 uint8_t tdls_off_channel; /* Target Off Channel */
153 uint8_t tdls_off_ch_mode; /* TDLS Off Channel Mode */
154 uint8_t is_responder; /* is peer responder or initiator */
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +0530155 uint8_t opclass; /* tdls operating class */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800156} sme_tdls_chan_switch_params;
157#endif /* FEATURE_WLAN_TDLS */
158
159/* Thermal Mitigation*/
160typedef struct {
161 uint16_t smeMinTempThreshold;
162 uint16_t smeMaxTempThreshold;
163} tSmeThermalLevelInfo;
164
165#define SME_MAX_THERMAL_LEVELS (4)
166typedef struct {
167 /* Array of thermal levels */
168 tSmeThermalLevelInfo smeThermalLevels[SME_MAX_THERMAL_LEVELS];
169 uint8_t smeThermalMgmtEnabled;
170 uint32_t smeThrottlePeriod;
171} tSmeThermalParams;
172
173typedef enum {
174 SME_AC_BK = 0,
175 SME_AC_BE = 1,
176 SME_AC_VI = 2,
177 SME_AC_VO = 3
178} sme_ac_enum_type;
179
180/* TSPEC Direction Enum Type */
181typedef enum {
182 /* uplink */
183 SME_TX_DIR = 0,
184 /* downlink */
185 SME_RX_DIR = 1,
186 /* bidirectional */
187 SME_BI_DIR = 2,
188} sme_tspec_dir_type;
189
190/*-------------------------------------------------------------------------
191 Function declarations and documenation
192 ------------------------------------------------------------------------*/
193CDF_STATUS sme_open(tHalHandle hHal);
194CDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2,
Amar Singhala297bfa2015-10-15 15:07:29 -0700195 enum country_src cc_src);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800196CDF_STATUS sme_close(tHalHandle hHal);
197CDF_STATUS sme_start(tHalHandle hHal);
198CDF_STATUS sme_stop(tHalHandle hHal, tHalStopType stopType);
199CDF_STATUS sme_open_session(tHalHandle hHal, csr_roam_completeCallback callback,
200 void *pContext, uint8_t *pSelfMacAddr,
201 uint8_t *pbSessionId, uint32_t type,
202 uint32_t subType);
Peng Xuf5d60c82015-10-02 17:17:03 -0700203void sme_set_curr_device_mode(tHalHandle hHal,
204 enum tCDF_ADAPTER_MODE currDeviceMode);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800205CDF_STATUS sme_close_session(tHalHandle hHal, uint8_t sessionId,
206 csr_roamSessionCloseCallback callback,
207 void *pContext);
208CDF_STATUS sme_update_roam_params(tHalHandle hHal, uint8_t session_id,
209 struct roam_ext_params roam_params_src, int update_param);
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -0700210#ifdef FEATURE_WLAN_SCAN_PNO
211void sme_update_roam_pno_channel_prediction_config(
Krunal Soni1878d3a2016-01-14 13:00:44 -0800212 tHalHandle hal, tCsrConfigParam * csr_config,
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -0700213 uint8_t copy_from_to);
214#else
215static inline void sme_update_roam_pno_channel_prediction_config(
Krunal Soni1878d3a2016-01-14 13:00:44 -0800216 tHalHandle hal, tCsrConfigParam *csr_config,
Varun Reddy Yeturub43fda12015-09-10 18:16:21 -0700217 uint8_t copy_from_to)
218{}
219#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800220CDF_STATUS sme_update_config(tHalHandle hHal,
221 tpSmeConfigParams pSmeConfigParams);
222
223#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
224CDF_STATUS sme_set_plm_request(tHalHandle hHal, tpSirPlmReq pPlm);
225#endif
226
227CDF_STATUS sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
228CDF_STATUS sme_get_soft_ap_domain(tHalHandle hHal,
229 v_REGDOMAIN_t *domainIdSoftAp);
230CDF_STATUS sme_set_reg_info(tHalHandle hHal, uint8_t *apCntryCode);
231CDF_STATUS sme_change_config_params(tHalHandle hHal,
232 tCsrUpdateConfigParam *pUpdateConfigParam);
233CDF_STATUS sme_hdd_ready_ind(tHalHandle hHal);
234CDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg);
235void sme_free_msg(tHalHandle hHal, cds_msg_t *pMsg);
236CDF_STATUS sme_scan_request(tHalHandle hHal, uint8_t sessionId,
237 tCsrScanRequest *, csr_scan_completeCallback callback,
238 void *pContext);
239CDF_STATUS sme_scan_get_result(tHalHandle hHal, uint8_t sessionId,
240 tCsrScanResultFilter *pFilter,
241 tScanResultHandle *phResult);
242CDF_STATUS sme_get_ap_channel_from_scan_cache(tHalHandle hHal,
243 tCsrRoamProfile *profile,
244 tScanResultHandle *scan_cache,
245 uint8_t *ap_chnl_id);
246bool sme_store_joinreq_param(tHalHandle hal_handle,
247 tCsrRoamProfile *profile,
248 tScanResultHandle scan_cache,
249 uint32_t *roam_id,
250 uint32_t session_id);
251bool sme_clear_joinreq_param(tHalHandle hal_handle,
252 uint32_t session_id);
253CDF_STATUS sme_issue_stored_joinreq(tHalHandle hal_handle,
254 uint32_t *roam_id,
255 uint32_t session_id);
256CDF_STATUS sme_scan_flush_result(tHalHandle hHal);
257CDF_STATUS sme_filter_scan_results(tHalHandle hHal, uint8_t sessionId);
258CDF_STATUS sme_scan_flush_p2p_result(tHalHandle hHal, uint8_t sessionId);
259tCsrScanResultInfo *sme_scan_result_get_first(tHalHandle,
260 tScanResultHandle hScanResult);
261tCsrScanResultInfo *sme_scan_result_get_next(tHalHandle,
262 tScanResultHandle hScanResult);
263CDF_STATUS sme_scan_result_purge(tHalHandle hHal,
264 tScanResultHandle hScanResult);
265CDF_STATUS sme_scan_get_pmkid_candidate_list(tHalHandle hHal, uint8_t sessionId,
266 tPmkidCandidateInfo *pPmkidList,
267 uint32_t *pNumItems);
268CDF_STATUS sme_roam_connect(tHalHandle hHal, uint8_t sessionId,
269 tCsrRoamProfile *pProfile, uint32_t *pRoamId);
270CDF_STATUS sme_roam_reassoc(tHalHandle hHal, uint8_t sessionId,
271 tCsrRoamProfile *pProfile,
272 tCsrRoamModifyProfileFields modProfileFields,
273 uint32_t *pRoamId, bool fForce);
274CDF_STATUS sme_roam_connect_to_last_profile(tHalHandle hHal, uint8_t sessionId);
275CDF_STATUS sme_roam_disconnect(tHalHandle hHal, uint8_t sessionId,
276 eCsrRoamDisconnectReason reason);
277CDF_STATUS sme_roam_stop_bss(tHalHandle hHal, uint8_t sessionId);
278CDF_STATUS sme_roam_get_associated_stas(tHalHandle hHal, uint8_t sessionId,
279 CDF_MODULE_ID modId, void *pUsrContext,
280 void *pfnSapEventCallback,
281 uint8_t *pAssocStasBuf);
282CDF_STATUS sme_roam_disconnect_sta(tHalHandle hHal, uint8_t sessionId,
283 const uint8_t *pPeerMacAddr);
284CDF_STATUS sme_roam_deauth_sta(tHalHandle hHal, uint8_t sessionId,
285 struct tagCsrDelStaParams *pDelStaParams);
286CDF_STATUS sme_roam_tkip_counter_measures(tHalHandle hHal, uint8_t sessionId,
287 bool bEnable);
288CDF_STATUS sme_roam_get_wps_session_overlap(tHalHandle hHal, uint8_t sessionId,
289 void *pUsrContext,
290 void *pfnSapEventCallback,
291 struct cdf_mac_addr pRemoveMac);
292CDF_STATUS sme_roam_get_connect_state(tHalHandle hHal, uint8_t sessionId,
293 eCsrConnectState *pState);
294CDF_STATUS sme_roam_get_connect_profile(tHalHandle hHal, uint8_t sessionId,
295 tCsrRoamConnectedProfile *pProfile);
296CDF_STATUS sme_roam_free_connect_profile(tHalHandle hHal,
297 tCsrRoamConnectedProfile *pProfile);
298CDF_STATUS sme_roam_set_pmkid_cache(tHalHandle hHal, uint8_t sessionId,
299 tPmkidCacheInfo *pPMKIDCache,
300 uint32_t numItems,
301 bool update_entire_cache);
302
303#ifdef WLAN_FEATURE_ROAM_OFFLOAD
304CDF_STATUS sme_roam_set_psk_pmk(tHalHandle hHal, uint8_t sessionId,
305 uint8_t *pPSK_PMK, size_t pmk_len);
306#endif
307CDF_STATUS sme_roam_get_security_req_ie(tHalHandle hHal, uint8_t sessionId,
308 uint32_t *pLen, uint8_t *pBuf,
309 eCsrSecurityType secType);
310CDF_STATUS sme_roam_get_security_rsp_ie(tHalHandle hHal, uint8_t sessionId,
311 uint32_t *pLen, uint8_t *pBuf,
312 eCsrSecurityType secType);
313uint32_t sme_roam_get_num_pmkid_cache(tHalHandle hHal, uint8_t sessionId);
314CDF_STATUS sme_roam_get_pmkid_cache(tHalHandle hHal, uint8_t sessionId,
315 uint32_t *pNum,
316 tPmkidCacheInfo *pPmkidCache);
317CDF_STATUS sme_get_config_param(tHalHandle hHal, tSmeConfigParams *pParam);
318CDF_STATUS sme_get_statistics(tHalHandle hHal,
319 eCsrStatsRequesterType requesterId,
320 uint32_t statsMask, tCsrStatsCallback callback,
321 uint32_t periodicity, bool cache, uint8_t staId,
322 void *pContext, uint8_t sessionId);
323CDF_STATUS sme_get_rssi(tHalHandle hHal,
324 tCsrRssiCallback callback,
325 uint8_t staId, struct cdf_mac_addr bssId, int8_t lastRSSI,
326 void *pContext, void *p_cds_context);
327CDF_STATUS sme_get_snr(tHalHandle hHal,
328 tCsrSnrCallback callback,
329 uint8_t staId, struct cdf_mac_addr bssId, void *pContext);
330#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
331CDF_STATUS sme_get_tsm_stats(tHalHandle hHal,
332 tCsrTsmStatsCallback callback,
333 uint8_t staId, struct cdf_mac_addr bssId,
334 void *pContext, void *p_cds_context, uint8_t tid);
335CDF_STATUS sme_set_cckm_ie(tHalHandle hHal,
336 uint8_t sessionId,
337 uint8_t *pCckmIe, uint8_t cckmIeLen);
338CDF_STATUS sme_set_ese_beacon_request(tHalHandle hHal, const uint8_t sessionId,
339 const tCsrEseBeaconReq *pEseBcnReq);
340#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
341CDF_STATUS sme_cfg_set_int(tHalHandle hal, uint16_t cfg_id, uint32_t value);
342CDF_STATUS sme_cfg_set_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str,
343 uint32_t length);
344CDF_STATUS sme_cfg_get_int(tHalHandle hal, uint16_t cfg_id,
345 uint32_t *cfg_value);
346CDF_STATUS sme_cfg_get_str(tHalHandle hal, uint16_t cfg_id, uint8_t *str,
347 uint32_t *length);
348CDF_STATUS sme_get_modify_profile_fields(tHalHandle hHal, uint8_t sessionId,
349 tCsrRoamModifyProfileFields *
350 pModifyProfileFields);
351
352extern CDF_STATUS sme_set_host_power_save(tHalHandle hHal, bool psMode);
353
354void sme_set_dhcp_till_power_active_flag(tHalHandle hHal, uint8_t flag);
355extern CDF_STATUS sme_register11d_scan_done_callback(tHalHandle hHal,
356 csr_scan_completeCallback);
357#ifdef FEATURE_OEM_DATA_SUPPORT
358extern CDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle h_hal,
359 sme_send_oem_data_rsp_msg callback);
360#endif
361
362extern CDF_STATUS sme_wow_add_pattern(tHalHandle hHal,
363 struct wow_add_pattern *pattern, uint8_t sessionId);
364extern CDF_STATUS sme_wow_delete_pattern(tHalHandle hHal,
365 struct wow_delete_pattern *pattern, uint8_t sessionId);
366
367void sme_register_ftm_msg_processor(tHalHandle hal,
368 hdd_ftm_msg_processor callback);
369
370extern CDF_STATUS sme_enter_wowl(tHalHandle hHal,
371 void (*enter_wowl_callback_routine)(void
372 *callbackContext,
373 CDF_STATUS status),
374 void *enter_wowl_callback_context,
375#ifdef WLAN_WAKEUP_EVENTS
376 void (*wake_reason_ind_cb)(void *callbackContext,
377 tpSirWakeReasonInd
378 wake_reason_ind),
379 void *wake_reason_ind_cb_ctx,
380#endif /* WLAN_WAKEUP_EVENTS */
381 tpSirSmeWowlEnterParams wowl_enter_params,
382 uint8_t sessionId);
383
384extern CDF_STATUS sme_exit_wowl(tHalHandle hHal,
385 tpSirSmeWowlExitParams wowl_exit_params);
386CDF_STATUS sme_roam_set_key(tHalHandle, uint8_t sessionId,
387 tCsrRoamSetKey *pSetKey, uint32_t *pRoamId);
388CDF_STATUS sme_get_country_code(tHalHandle hHal, uint8_t *pBuf, uint8_t *pbLen);
389
390
391void sme_apply_channel_power_info_to_fw(tHalHandle hHal);
392
393/* some support functions */
394bool sme_is11d_supported(tHalHandle hHal);
395bool sme_is11h_supported(tHalHandle hHal);
396bool sme_is_wmm_supported(tHalHandle hHal);
397
398typedef void (*tSmeChangeCountryCallback)(void *pContext);
399CDF_STATUS sme_change_country_code(tHalHandle hHal,
400 tSmeChangeCountryCallback callback,
401 uint8_t *pCountry,
402 void *pContext,
403 void *p_cds_context,
404 tAniBool countryFromUserSpace,
405 tAniBool sendRegHint);
406CDF_STATUS sme_generic_change_country_code(tHalHandle hHal,
Amar Singhal7f1f3ec2015-10-13 17:14:08 -0700407 uint8_t *pCountry);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800408CDF_STATUS sme_dhcp_start_ind(tHalHandle hHal,
409 uint8_t device_mode,
410 uint8_t *macAddr, uint8_t sessionId);
411CDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal,
412 uint8_t device_mode,
413 uint8_t *macAddr, uint8_t sessionId);
414void sme_set_cfg_privacy(tHalHandle hHal, tCsrRoamProfile *pProfile,
415 bool fPrivacy);
416void sme_get_recovery_stats(tHalHandle hHal);
417#if defined WLAN_FEATURE_VOWIFI
418CDF_STATUS sme_neighbor_report_request(tHalHandle hHal, uint8_t sessionId,
419 tpRrmNeighborReq pRrmNeighborReq,
420 tpRrmNeighborRspCallbackInfo callbackInfo);
421#endif
422CDF_STATUS sme_get_wcnss_wlan_compiled_version(tHalHandle hHal,
423 tSirVersionType * pVersion);
424CDF_STATUS sme_get_wcnss_wlan_reported_version(tHalHandle hHal,
425 tSirVersionType *pVersion);
426CDF_STATUS sme_get_wcnss_software_version(tHalHandle hHal,
427 uint8_t *pVersion, uint32_t versionBufferSize);
428CDF_STATUS sme_get_wcnss_hardware_version(tHalHandle hHal,
429 uint8_t *pVersion, uint32_t versionBufferSize);
430#ifdef FEATURE_WLAN_WAPI
431CDF_STATUS sme_scan_get_bkid_candidate_list(tHalHandle hHal, uint32_t sessionId,
432 tBkidCandidateInfo * pBkidList,
433 uint32_t *pNumItems);
434#endif /* FEATURE_WLAN_WAPI */
435#ifdef FEATURE_OEM_DATA_SUPPORT
436CDF_STATUS sme_oem_data_req(tHalHandle hHal,
437 uint8_t sessionId,
438 tOemDataReqConfig *,
Jeff Johnsonf6358f12015-12-07 13:36:10 -0800439 uint32_t *pOemDataReqID);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800440#endif /*FEATURE_OEM_DATA_SUPPORT */
441CDF_STATUS sme_roam_update_apwpsie(tHalHandle, uint8_t sessionId,
442 tSirAPWPSIEs * pAPWPSIES);
443CDF_STATUS sme_roam_update_apwparsni_es(tHalHandle hHal, uint8_t sessionId,
444 tSirRSNie *pAPSirRSNie);
445CDF_STATUS sme_change_mcc_beacon_interval(tHalHandle hHal, uint8_t sessionId);
446CDF_STATUS sme_set_host_offload(tHalHandle hHal, uint8_t sessionId,
447 tpSirHostOffloadReq pRequest);
448CDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t sessionId,
449 tpSirKeepAliveReq pRequest);
450CDF_STATUS sme_get_operation_channel(tHalHandle hHal, uint32_t *pChannel,
451 uint8_t sessionId);
452CDF_STATUS sme_register_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
453 uint16_t frameType, uint8_t *matchData,
454 uint16_t matchLen);
455CDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
456 uint16_t frameType, uint8_t *matchData,
457 uint16_t matchLen);
458CDF_STATUS sme_configure_rxp_filter(tHalHandle hHal,
459 tpSirWlanSetRxpFilters wlanRxpFilterParam);
460CDF_STATUS sme_ConfigureAppsCpuWakeupState(tHalHandle hHal, bool isAppsAwake);
461CDF_STATUS sme_configure_suspend_ind(tHalHandle hHal,
Houston Hoffman7260ecb2015-10-05 18:43:07 -0700462 uint32_t conn_state_mask,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800463 csr_readyToSuspendCallback,
464 void *callbackContext);
465CDF_STATUS sme_configure_resume_req(tHalHandle hHal,
466 tpSirWlanResumeParam wlanResumeParam);
467#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
Krishna Kumaar Natarajand9131902015-10-19 11:52:47 -0700468CDF_STATUS sme_configure_ext_wow(tHalHandle hHal,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800469 tpSirExtWoWParams wlanExtParams,
470 csr_readyToSuspendCallback callback,
471 void *callbackContext);
472CDF_STATUS sme_configure_app_type1_params(tHalHandle hHal,
473 tpSirAppType1Params wlanAppType1Params);
474CDF_STATUS sme_configure_app_type2_params(tHalHandle hHal,
475 tpSirAppType2Params wlanAppType2Params);
476#endif
477int8_t sme_get_infra_session_id(tHalHandle hHal);
478uint8_t sme_get_infra_operation_channel(tHalHandle hHal, uint8_t sessionId);
479uint8_t sme_get_concurrent_operation_channel(tHalHandle hHal);
480#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
481uint16_t sme_check_concurrent_channel_overlap(tHalHandle hHal, uint16_t sap_ch,
482 eCsrPhyMode sapPhyMode,
483 uint8_t cc_switch_mode);
484#endif
485CDF_STATUS sme_abort_mac_scan(tHalHandle hHal, uint8_t sessionId,
486 eCsrAbortReason reason);
487CDF_STATUS sme_get_cfg_valid_channels(tHalHandle hHal, uint8_t *aValidChannels,
488 uint32_t *len);
489#ifdef FEATURE_WLAN_SCAN_PNO
490CDF_STATUS sme_set_preferred_network_list(tHalHandle hHal,
491 tpSirPNOScanReq pRequest,
492 uint8_t sessionId,
493 preferred_network_found_ind_cb
494 callbackRoutine, void *callbackContext);
495
496CDF_STATUS sme_preferred_network_found_ind(tHalHandle hHal, void *pMsg);
497#endif /* FEATURE_WLAN_SCAN_PNO */
498#ifdef WLAN_FEATURE_PACKET_FILTERING
499CDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId,
500 tpSirRcvFltMcAddrList pMulticastAddrs);
501CDF_STATUS sme_receive_filter_set_filter(tHalHandle hHal,
502 tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
503 uint8_t sessionId);
504CDF_STATUS sme_receive_filter_clear_filter(tHalHandle hHal,
505 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
506 uint8_t sessionId);
507#endif /* WLAN_FEATURE_PACKET_FILTERING */
508bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel);
509CDF_STATUS sme_set_freq_band(tHalHandle hHal, uint8_t sessionId,
510 eCsrBand eBand);
511CDF_STATUS sme_get_freq_band(tHalHandle hHal, eCsrBand *pBand);
512#ifdef WLAN_FEATURE_GTK_OFFLOAD
513CDF_STATUS sme_set_gtk_offload(tHalHandle hal_ctx,
514 tpSirGtkOffloadParams request,
515 uint8_t session_id);
516CDF_STATUS sme_get_gtk_offload(tHalHandle hal_ctx,
517 gtk_offload_get_info_callback callback_routine,
518 void *callback_context, uint8_t session_id);
519#endif /* WLAN_FEATURE_GTK_OFFLOAD */
520uint16_t sme_chn_to_freq(uint8_t chanNum);
521bool sme_is_channel_valid(tHalHandle hHal, uint8_t channel);
Srinivas Girigowda97215232015-09-24 12:26:28 -0700522CDF_STATUS sme_set_max_tx_power(tHalHandle hHal, struct cdf_mac_addr pBssid,
523 struct cdf_mac_addr pSelfMacAddress, int8_t dB);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800524CDF_STATUS sme_set_max_tx_power_per_band(eCsrBand band, int8_t db);
525CDF_STATUS sme_set_tx_power(tHalHandle hHal, uint8_t sessionId,
Srinivas Girigowda97215232015-09-24 12:26:28 -0700526 struct cdf_mac_addr bssid,
Peng Xuf5d60c82015-10-02 17:17:03 -0700527 enum tCDF_ADAPTER_MODE dev_mode, int power);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800528CDF_STATUS sme_set_custom_mac_addr(tSirMacAddr customMacAddr);
529CDF_STATUS sme_hide_ssid(tHalHandle hHal, uint8_t sessionId,
530 uint8_t ssidHidden);
531CDF_STATUS sme_set_tm_level(tHalHandle hHal, uint16_t newTMLevel,
532 uint16_t tmMode);
533void sme_feature_caps_exchange(tHalHandle hHal);
534void sme_disable_feature_capablity(uint8_t feature_index);
535void sme_reset_power_values_for5_g(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800536CDF_STATUS sme_update_roam_prefer5_g_hz(tHalHandle hHal, bool nRoamPrefer5GHz);
537CDF_STATUS sme_set_roam_intra_band(tHalHandle hHal, const bool nRoamIntraBand);
538CDF_STATUS sme_update_roam_scan_n_probes(tHalHandle hHal, uint8_t sessionId,
539 const uint8_t nProbes);
540CDF_STATUS sme_update_roam_scan_home_away_time(tHalHandle hHal,
541 uint8_t sessionId,
542 const uint16_t nRoamScanHomeAwayTime,
543 const bool bSendOffloadCmd);
544
545bool sme_get_roam_intra_band(tHalHandle hHal);
546uint8_t sme_get_roam_scan_n_probes(tHalHandle hHal);
547uint16_t sme_get_roam_scan_home_away_time(tHalHandle hHal);
548CDF_STATUS sme_update_roam_rssi_diff(tHalHandle hHal, uint8_t sessionId,
549 uint8_t RoamRssiDiff);
550CDF_STATUS sme_update_fast_transition_enabled(tHalHandle hHal,
551 bool isFastTransitionEnabled);
552CDF_STATUS sme_update_wes_mode(tHalHandle hHal, bool isWESModeEnabled,
553 uint8_t sessionId);
554CDF_STATUS sme_set_roam_scan_control(tHalHandle hHal, uint8_t sessionId,
555 bool roamScanControl);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800556
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800557CDF_STATUS sme_update_is_fast_roam_ini_feature_enabled(tHalHandle hHal,
558 uint8_t sessionId,
559 const bool
560 isFastRoamIniFeatureEnabled);
561CDF_STATUS sme_update_is_mawc_ini_feature_enabled(tHalHandle hHal,
562 const bool MAWCEnabled);
563CDF_STATUS sme_stop_roaming(tHalHandle hHal, uint8_t sessionId, uint8_t reason);
564CDF_STATUS sme_start_roaming(tHalHandle hHal, uint8_t sessionId,
565 uint8_t reason);
566CDF_STATUS sme_update_enable_fast_roam_in_concurrency(tHalHandle hHal,
567 bool bFastRoamInConIniFeatureEnabled);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800568#ifdef FEATURE_WLAN_ESE
569CDF_STATUS sme_update_is_ese_feature_enabled(tHalHandle hHal, uint8_t sessionId,
570 const bool isEseIniFeatureEnabled);
571#endif /* FEATURE_WLAN_ESE */
572CDF_STATUS sme_update_config_fw_rssi_monitoring(tHalHandle hHal,
573 bool fEnableFwRssiMonitoring);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800574CDF_STATUS sme_set_roam_rescan_rssi_diff(tHalHandle hHal,
575 uint8_t sessionId,
576 const uint8_t nRoamRescanRssiDiff);
577uint8_t sme_get_roam_rescan_rssi_diff(tHalHandle hHal);
578
579CDF_STATUS sme_set_roam_opportunistic_scan_threshold_diff(tHalHandle hHal,
580 uint8_t sessionId,
581 const uint8_t nOpportunisticThresholdDiff);
582uint8_t sme_get_roam_opportunistic_scan_threshold_diff(tHalHandle hHal);
583CDF_STATUS sme_set_neighbor_lookup_rssi_threshold(tHalHandle hHal,
584 uint8_t sessionId, uint8_t neighborLookupRssiThreshold);
585CDF_STATUS sme_set_delay_before_vdev_stop(tHalHandle hHal,
586 uint8_t sessionId, uint8_t delay_before_vdev_stop);
587uint8_t sme_get_neighbor_lookup_rssi_threshold(tHalHandle hHal);
588CDF_STATUS sme_set_neighbor_scan_refresh_period(tHalHandle hHal,
589 uint8_t sessionId, uint16_t neighborScanResultsRefreshPeriod);
590uint16_t sme_get_neighbor_scan_refresh_period(tHalHandle hHal);
591uint16_t sme_get_empty_scan_refresh_period(tHalHandle hHal);
592CDF_STATUS sme_update_empty_scan_refresh_period(tHalHandle hHal,
593 uint8_t sessionId, uint16_t nEmptyScanRefreshPeriod);
594CDF_STATUS sme_set_neighbor_scan_min_chan_time(tHalHandle hHal,
595 const uint16_t nNeighborScanMinChanTime,
596 uint8_t sessionId);
597CDF_STATUS sme_set_neighbor_scan_max_chan_time(tHalHandle hHal,
598 uint8_t sessionId, const uint16_t nNeighborScanMaxChanTime);
599uint16_t sme_get_neighbor_scan_min_chan_time(tHalHandle hHal,
600 uint8_t sessionId);
601uint32_t sme_get_neighbor_roam_state(tHalHandle hHal, uint8_t sessionId);
602uint32_t sme_get_current_roam_state(tHalHandle hHal, uint8_t sessionId);
603uint32_t sme_get_current_roam_sub_state(tHalHandle hHal, uint8_t sessionId);
604uint32_t sme_get_lim_sme_state(tHalHandle hHal);
605uint32_t sme_get_lim_mlm_state(tHalHandle hHal);
606bool sme_is_lim_session_valid(tHalHandle hHal, uint8_t sessionId);
607uint32_t sme_get_lim_sme_session_state(tHalHandle hHal, uint8_t sessionId);
608uint32_t sme_get_lim_mlm_session_state(tHalHandle hHal, uint8_t sessionId);
609uint16_t sme_get_neighbor_scan_max_chan_time(tHalHandle hHal,
610 uint8_t sessionId);
611CDF_STATUS sme_set_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId,
612 const uint16_t nNeighborScanPeriod);
613uint16_t sme_get_neighbor_scan_period(tHalHandle hHal, uint8_t sessionId);
614CDF_STATUS sme_set_roam_bmiss_first_bcnt(tHalHandle hHal,
615 uint8_t sessionId, const uint8_t nRoamBmissFirstBcnt);
616uint8_t sme_get_roam_bmiss_first_bcnt(tHalHandle hHal);
617CDF_STATUS sme_set_roam_bmiss_final_bcnt(tHalHandle hHal, uint8_t sessionId,
618 const uint8_t nRoamBmissFinalBcnt);
619uint8_t sme_get_roam_bmiss_final_bcnt(tHalHandle hHal);
620CDF_STATUS sme_set_roam_beacon_rssi_weight(tHalHandle hHal, uint8_t sessionId,
621 const uint8_t nRoamBeaconRssiWeight);
622uint8_t sme_get_roam_beacon_rssi_weight(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800623uint8_t sme_get_roam_rssi_diff(tHalHandle hHal);
624CDF_STATUS sme_change_roam_scan_channel_list(tHalHandle hHal, uint8_t sessionId,
625 uint8_t *pChannelList,
626 uint8_t numChannels);
627#ifdef FEATURE_WLAN_ESE_UPLOAD
628CDF_STATUS sme_set_ese_roam_scan_channel_list(tHalHandle hHal,
629 uint8_t sessionId, uint8_t *pChannelList,
630 uint8_t numChannels);
631#endif
632CDF_STATUS sme_get_roam_scan_channel_list(tHalHandle hHal,
633 uint8_t *pChannelList, uint8_t *pNumChannels,
634 uint8_t sessionId);
635bool sme_get_is_ese_feature_enabled(tHalHandle hHal);
636bool sme_get_wes_mode(tHalHandle hHal);
637bool sme_get_roam_scan_control(tHalHandle hHal);
638bool sme_get_is_lfr_feature_enabled(tHalHandle hHal);
639bool sme_get_is_ft_feature_enabled(tHalHandle hHal);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800640CDF_STATUS sme_update_roam_scan_offload_enabled(tHalHandle hHal,
641 bool nRoamScanOffloadEnabled);
642uint8_t sme_is_feature_supported_by_fw(uint8_t featEnumValue);
643#ifdef FEATURE_WLAN_TDLS
644CDF_STATUS sme_send_tdls_link_establish_params(tHalHandle hHal,
645 uint8_t sessionId,
646 const tSirMacAddr peerMac,
647 tCsrTdlsLinkEstablishParams *
648 tdlsLinkEstablishParams);
649CDF_STATUS sme_send_tdls_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
650 const tSirMacAddr peerMac, uint8_t frame_type,
651 uint8_t dialog, uint16_t status,
652 uint32_t peerCapability, uint8_t *buf,
653 uint8_t len, uint8_t responder);
654CDF_STATUS sme_change_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId,
655 const tSirMacAddr peerMac,
656 tCsrStaParams *pstaParams);
657CDF_STATUS sme_add_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId,
658 const tSirMacAddr peerMac);
659CDF_STATUS sme_delete_tdls_peer_sta(tHalHandle hHal, uint8_t sessionId,
660 const tSirMacAddr peerMac);
661void sme_set_tdls_power_save_prohibited(tHalHandle hHal, uint32_t sessionId,
662 bool val);
663CDF_STATUS sme_send_tdls_chan_switch_req(
664 tHalHandle hal,
665 sme_tdls_chan_switch_params *ch_switch_params);
666#endif
667
668/*
669 * SME API to enable/disable WLAN driver initiated SSR
670 */
671void sme_update_enable_ssr(tHalHandle hHal, bool enableSSR);
672CDF_STATUS sme_set_phy_mode(tHalHandle hHal, eCsrPhyMode phyMode);
673eCsrPhyMode sme_get_phy_mode(tHalHandle hHal);
674/*
675 * SME API to determine the channel bonding mode
676 */
677CDF_STATUS sme_set_ch_params(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
678 uint8_t channel, uint8_t ht_sec_ch, chan_params_t *ch_params);
679CDF_STATUS sme_handoff_request(tHalHandle hHal, uint8_t sessionId,
680 tCsrHandoffRequest *pHandoffInfo);
681CDF_STATUS sme_is_sta_p2p_client_connected(tHalHandle hHal);
682#ifdef FEATURE_WLAN_LPHB
683CDF_STATUS sme_lphb_config_req(tHalHandle hHal,
684 tSirLPHBReq * lphdReq,
685 void (*pCallbackfn)(void *pHddCtx,
686 tSirLPHBInd * indParam));
687#endif /* FEATURE_WLAN_LPHB */
688CDF_STATUS sme_add_periodic_tx_ptrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
689 *addPeriodicTxPtrnParams);
690CDF_STATUS sme_del_periodic_tx_ptrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
691 *delPeriodicTxPtrnParams);
692void sme_enable_disable_split_scan(tHalHandle hHal, uint8_t nNumStaChan,
693 uint8_t nNumP2PChan);
694CDF_STATUS sme_send_rate_update_ind(tHalHandle hHal,
695 tSirRateUpdateInd *rateUpdateParams);
696CDF_STATUS sme_roam_del_pmkid_from_cache(tHalHandle hHal, uint8_t sessionId,
697 const uint8_t *pBSSId, bool flush_cache);
698void sme_get_command_q_status(tHalHandle hHal);
699
700/*
701 * SME API to enable/disable idle mode powersave
702 * This should be called only if powersave offload
703 * is enabled
704 */
705CDF_STATUS sme_set_idle_powersave_config(void *cds_context,
706 tHalHandle hHal, uint32_t value);
707CDF_STATUS sme_notify_modem_power_state(tHalHandle hHal, uint32_t value);
708
709/*SME API to convert convert the ini value to the ENUM used in csr and MAC*/
710ePhyChanBondState sme_get_cb_phy_state_from_cb_ini_value(uint32_t cb_ini_value);
711int sme_update_ht_config(tHalHandle hHal, uint8_t sessionId, uint16_t htCapab,
712 int value);
713int16_t sme_get_ht_config(tHalHandle hHal, uint8_t session_id,
714 uint16_t ht_capab);
715#ifdef QCA_HT_2040_COEX
716CDF_STATUS sme_notify_ht2040_mode(tHalHandle hHal, uint16_t staId,
717 struct cdf_mac_addr macAddrSTA,
718 uint8_t sessionId,
719 uint8_t channel_type);
720CDF_STATUS sme_set_ht2040_mode(tHalHandle hHal, uint8_t sessionId,
721 uint8_t channel_type, bool obssEnabled);
722#endif
723CDF_STATUS sme_get_reg_info(tHalHandle hHal, uint8_t chanId,
724 uint32_t *regInfo1, uint32_t *regInfo2);
725#ifdef FEATURE_WLAN_TDLS
726CDF_STATUS sme_update_fw_tdls_state(tHalHandle hHal, void *psmeTdlsParams,
727 bool useSmeLock);
728CDF_STATUS sme_update_tdls_peer_state(tHalHandle hHal,
729 tSmeTdlsPeerStateParams *pPeerStateParams);
730#endif /* FEATURE_WLAN_TDLS */
731#ifdef FEATURE_WLAN_CH_AVOID
732CDF_STATUS sme_add_ch_avoid_callback(tHalHandle hHal,
733 void (*pCallbackfn)(void *hdd_context, void *indi_param));
734CDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal);
735#else
736static inline
737CDF_STATUS sme_add_ch_avoid_callback(tHalHandle hHal,
738 void (*pCallbackfn)(void *hdd_context, void *indi_param))
739{
740 return CDF_STATUS_E_NOSUPPORT;
741}
742
743static inline
744CDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal)
745{
746 return CDF_STATUS_E_NOSUPPORT;
747}
748#endif /* FEATURE_WLAN_CH_AVOID */
749#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
750CDF_STATUS sme_set_auto_shutdown_cb(tHalHandle hHal, void (*pCallbackfn)(void));
751CDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_value);
752#endif
753CDF_STATUS sme_roam_channel_change_req(tHalHandle hHal,
Kiran Kumar Lokere999e58c2016-01-07 02:18:39 -0800754 struct cdf_mac_addr bssid, chan_params_t *ch_params,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800755 tCsrRoamProfile *profile);
756CDF_STATUS sme_roam_start_beacon_req(tHalHandle hHal,
757 struct cdf_mac_addr bssid, uint8_t dfsCacWaitStatus);
758CDF_STATUS sme_roam_csa_ie_request(tHalHandle hHal, struct cdf_mac_addr bssid,
Kiran Kumar Lokere999e58c2016-01-07 02:18:39 -0800759 uint8_t targetChannel, uint8_t csaIeReqd,
760 chan_params_t *ch_params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800761CDF_STATUS sme_init_thermal_info(tHalHandle hHal,
762 tSmeThermalParams thermalParam);
763CDF_STATUS sme_set_thermal_level(tHalHandle hHal, uint8_t level);
764CDF_STATUS sme_txpower_limit(tHalHandle hHal, tSirTxPowerLimit *psmetx);
765CDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq,
766 void *plsContext,
767 void (*pCallbackfn)(tSirLinkSpeedInfo *indParam,
768 void *pContext));
769CDF_STATUS sme_modify_add_ie(tHalHandle hHal,
770 tSirModifyIE *pModifyIE, eUpdateIEsType updateType);
771CDF_STATUS sme_update_add_ie(tHalHandle hHal,
772 tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType);
773CDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value);
Sreelakshmi Konamki39acb132015-12-16 13:06:22 +0530774const char *sme_request_type_to_string(const uint8_t request_type);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800775CDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId,
776 bool disablefwd);
777uint32_t sme_get_channel_bonding_mode5_g(tHalHandle hHal);
778uint32_t sme_get_channel_bonding_mode24_g(tHalHandle hHal);
779#ifdef WLAN_FEATURE_STATS_EXT
780typedef struct sStatsExtRequestReq {
781 uint32_t request_data_len;
782 uint8_t *request_data;
783} tStatsExtRequestReq, *tpStatsExtRequestReq;
784typedef void (*StatsExtCallback)(void *, tStatsExtEvent *);
785void sme_stats_ext_register_callback(tHalHandle hHal,
786 StatsExtCallback callback);
787CDF_STATUS sme_stats_ext_request(uint8_t session_id,
788 tpStatsExtRequestReq input);
789CDF_STATUS sme_stats_ext_event(tHalHandle hHal, void *pMsg);
790#endif
791CDF_STATUS sme_update_dfs_scan_mode(tHalHandle hHal,
792 uint8_t sessionId,
793 uint8_t allowDFSChannelRoam);
794uint8_t sme_get_dfs_scan_mode(tHalHandle hHal);
795bool sme_sta_in_middle_of_roaming(tHalHandle hHal, uint8_t sessionId);
796
797#ifdef FEATURE_WLAN_EXTSCAN
798CDF_STATUS sme_get_valid_channels_by_band(tHalHandle hHal, uint8_t wifiBand,
799 uint32_t *aValidChannels,
800 uint8_t *pNumChannels);
801CDF_STATUS sme_ext_scan_get_capabilities(tHalHandle hHal,
802 tSirGetExtScanCapabilitiesReqParams *pReq);
803CDF_STATUS sme_ext_scan_start(tHalHandle hHal,
804 tSirWifiScanCmdReqParams *pStartCmd);
805CDF_STATUS sme_ext_scan_stop(tHalHandle hHal,
806 tSirExtScanStopReqParams *pStopReq);
807CDF_STATUS sme_set_bss_hotlist(tHalHandle hHal,
808 tSirExtScanSetBssidHotListReqParams *
809 pSetHotListReq);
810CDF_STATUS sme_reset_bss_hotlist(tHalHandle hHal,
811 tSirExtScanResetBssidHotlistReqParams *
812 pResetReq);
813CDF_STATUS sme_set_significant_change(tHalHandle hHal,
814 tSirExtScanSetSigChangeReqParams *
815 pSetSignificantChangeReq);
816CDF_STATUS sme_reset_significant_change(tHalHandle hHal,
817 tSirExtScanResetSignificantChangeReqParams
818 *pResetReq);
819CDF_STATUS sme_get_cached_results(tHalHandle hHal,
820 tSirExtScanGetCachedResultsReqParams *
821 pCachedResultsReq);
822
823CDF_STATUS sme_set_epno_list(tHalHandle hal,
824 struct wifi_epno_params *req_msg);
825CDF_STATUS sme_set_passpoint_list(tHalHandle hal,
826 struct wifi_passpoint_req *req_msg);
827CDF_STATUS sme_reset_passpoint_list(tHalHandle hal,
828 struct wifi_passpoint_req *req_msg);
829CDF_STATUS
830sme_set_ssid_hotlist(tHalHandle hal,
831 struct sir_set_ssid_hotlist_request *request);
832
833CDF_STATUS sme_ext_scan_register_callback(tHalHandle hHal,
834 void (*pExtScanIndCb)(void *, const uint16_t, void *));
835#endif /* FEATURE_WLAN_EXTSCAN */
836CDF_STATUS sme_abort_roam_scan(tHalHandle hHal, uint8_t sessionId);
837#ifdef WLAN_FEATURE_LINK_LAYER_STATS
838CDF_STATUS sme_ll_stats_clear_req(tHalHandle hHal,
839 tSirLLStatsClearReq * pclearStatsReq);
840CDF_STATUS sme_ll_stats_set_req(tHalHandle hHal,
841 tSirLLStatsSetReq *psetStatsReq);
842CDF_STATUS sme_ll_stats_get_req(tHalHandle hHal,
843 tSirLLStatsGetReq *pgetStatsReq);
844CDF_STATUS sme_set_link_layer_stats_ind_cb(tHalHandle hHal,
845 void (*callbackRoutine)(void *callbackCtx,
846 int indType, void *pRsp));
847#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
848
849CDF_STATUS sme_fw_mem_dump(tHalHandle hHal, void *recvd_req);
850CDF_STATUS sme_fw_mem_dump_register_cb(tHalHandle hHal,
851 void (*callback_routine)(void *cb_context,
852 struct fw_dump_rsp *rsp));
853CDF_STATUS sme_fw_mem_dump_unregister_cb(tHalHandle hHal);
854
855#ifdef WLAN_FEATURE_ROAM_OFFLOAD
856CDF_STATUS sme_update_roam_offload_enabled(tHalHandle hHal,
857 bool nRoamOffloadEnabled);
858CDF_STATUS sme_update_roam_key_mgmt_offload_enabled(tHalHandle hHal,
859 uint8_t sessionId,
860 bool nRoamKeyMgmtOffloadEnabled);
861#endif
862#ifdef WLAN_FEATURE_NAN
863CDF_STATUS sme_nan_event(tHalHandle hHal, void *pMsg);
864#endif /* WLAN_FEATURE_NAN */
865CDF_STATUS sme_get_link_status(tHalHandle hHal,
866 tCsrLinkStatusCallback callback,
867 void *pContext, uint8_t sessionId);
868CDF_STATUS sme_get_temperature(tHalHandle hHal,
869 void *tempContext,
870 void (*pCallbackfn)(int temperature,
871 void *pContext));
872CDF_STATUS sme_set_scanning_mac_oui(tHalHandle hHal,
873 tSirScanMacOui *pScanMacOui);
874
875#ifdef IPA_OFFLOAD
876/* ---------------------------------------------------------------------------
877 \fn sme_ipa_offload_enable_disable
878 \brief API to enable/disable IPA offload
879 \param hHal - The handle returned by macOpen.
880 \param sessionId - Session Identifier
881 \param pRequest - Pointer to the offload request.
882 \return eHalStatus
883 ---------------------------------------------------------------------------*/
884CDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal,
885 uint8_t session_id,
886 struct sir_ipa_offload_enable_disable *request);
887#else
888static inline CDF_STATUS sme_ipa_offload_enable_disable(tHalHandle hal,
889 uint8_t session_id,
890 struct sir_ipa_offload_enable_disable *request)
891{
892 return CDF_STATUS_SUCCESS;
893}
894#endif /* IPA_OFFLOAD */
895
896#ifdef DHCP_SERVER_OFFLOAD
897CDF_STATUS sme_set_dhcp_srv_offload(tHalHandle hHal,
898 tSirDhcpSrvOffloadInfo * pDhcpSrvInfo);
899#endif /* DHCP_SERVER_OFFLOAD */
900#ifdef WLAN_FEATURE_GPIO_LED_FLASHING
901CDF_STATUS sme_set_led_flashing(tHalHandle hHal, uint8_t type,
902 uint32_t x0, uint32_t x1);
903#endif
904CDF_STATUS sme_handle_dfs_chan_scan(tHalHandle hHal, uint8_t dfs_flag);
905CDF_STATUS sme_set_mas(uint32_t val);
906CDF_STATUS sme_set_miracast(tHalHandle hal, uint8_t filter_type);
Abhishek Singh518323d2015-10-19 17:42:01 +0530907CDF_STATUS sme_ext_change_channel(tHalHandle hHal, uint32_t channel,
908 uint8_t session_id);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800909
910CDF_STATUS sme_configure_modulated_dtim(tHalHandle hal, uint8_t session_id,
911 uint32_t modulated_dtim);
912
913CDF_STATUS sme_configure_stats_avg_factor(tHalHandle hal, uint8_t session_id,
914 uint16_t stats_avg_factor);
915
916CDF_STATUS sme_configure_guard_time(tHalHandle hal, uint8_t session_id,
917 uint32_t guard_time);
918
919CDF_STATUS sme_wifi_start_logger(tHalHandle hal,
920 struct sir_wifi_start_log start_log);
921
922bool sme_neighbor_middle_of_roaming(tHalHandle hHal,
923 uint8_t sessionId);
924
925CDF_STATUS sme_enable_uapsd_for_ac(void *cds_ctx, uint8_t sta_id,
926 sme_ac_enum_type ac, uint8_t tid,
927 uint8_t pri, uint32_t srvc_int,
928 uint32_t sus_int,
929 sme_tspec_dir_type dir,
930 uint8_t psb, uint32_t sessionId,
931 uint32_t delay_interval);
932
933CDF_STATUS sme_disable_uapsd_for_ac(void *cds_ctx, uint8_t sta_id,
934 sme_ac_enum_type ac,
935 uint32_t sessionId);
936
937CDF_STATUS sme_set_rssi_monitoring(tHalHandle hal,
938 struct rssi_monitor_req *input);
939CDF_STATUS sme_set_rssi_threshold_breached_cb(tHalHandle hal,
940 void (*cb)(void *, struct rssi_breach_event *));
941
Abhishek Singh7996eb72015-12-30 17:24:02 +0530942CDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal,
943 sir_mgmt_frame_ind_callback callback);
944
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800945CDF_STATUS sme_update_nss(tHalHandle h_hal, uint8_t nss);
946
947bool sme_is_any_session_in_connected_state(tHalHandle h_hal);
948
949CDF_STATUS sme_soc_set_pcl(tHalHandle hal,
950 struct sir_pcl_list msg);
951CDF_STATUS sme_soc_set_hw_mode(tHalHandle hal,
952 struct sir_hw_mode msg);
953void sme_register_hw_mode_trans_cb(tHalHandle hal,
954 hw_mode_transition_cb callback);
955CDF_STATUS sme_nss_update_request(tHalHandle hHal, uint32_t vdev_id,
956 uint8_t new_nss, void *cback,
957 uint8_t next_action, void *hdd_context);
958
959typedef void (*sme_peer_authorized_fp) (uint32_t vdev_id);
960CDF_STATUS sme_set_peer_authorized(uint8_t *peer_addr,
961 sme_peer_authorized_fp auth_fp,
962 uint32_t vdev_id);
963CDF_STATUS sme_soc_set_dual_mac_config(tHalHandle hal,
964 struct sir_dual_mac_config msg);
965
966void sme_set_scan_disable(tHalHandle h_hal, int value);
967void sme_setdef_dot11mode(tHalHandle hal);
968
969CDF_STATUS sme_disable_non_fcc_channel(tHalHandle hHal,
970 bool fcc_constraint);
971
972CDF_STATUS sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle,
973 uint8_t session_id,
974 uint32_t notify_id,
975 int32_t val);
976
977void wlan_sap_enable_phy_error_logs(tHalHandle hal, bool enable_log);
978void sme_set_dot11p_config(tHalHandle hal, bool enable_dot11p);
979
980CDF_STATUS sme_ocb_set_config(tHalHandle hHal, void *context,
981 ocb_callback callback,
982 struct sir_ocb_config *config);
983
984CDF_STATUS sme_ocb_set_utc_time(tHalHandle hHal, struct sir_ocb_utc *utc);
985
986CDF_STATUS sme_ocb_start_timing_advert(tHalHandle hHal,
987 struct sir_ocb_timing_advert *timing_advert);
988
989CDF_STATUS sme_ocb_stop_timing_advert(tHalHandle hHal,
990 struct sir_ocb_timing_advert *timing_advert);
991
Naveen Rawatb4d37622015-11-13 16:15:25 -0800992int sme_ocb_gen_timing_advert_frame(tHalHandle hHal, tSirMacAddr self_addr,
993 uint8_t **buf, uint32_t *timestamp_offset,
994 uint32_t *time_value_offset);
995
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800996CDF_STATUS sme_ocb_get_tsf_timer(tHalHandle hHal, void *context,
997 ocb_callback callback,
998 struct sir_ocb_get_tsf_timer *request);
999
1000CDF_STATUS sme_dcc_get_stats(tHalHandle hHal, void *context,
1001 ocb_callback callback,
1002 struct sir_dcc_get_stats *request);
1003
1004CDF_STATUS sme_dcc_clear_stats(tHalHandle hHal, uint32_t vdev_id,
1005 uint32_t dcc_stats_bitmap);
1006
1007CDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context,
1008 ocb_callback callback,
1009 struct sir_dcc_update_ndl *request);
1010
1011CDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context,
1012 ocb_callback callback);
1013void sme_add_set_thermal_level_callback(tHalHandle hal,
1014 sme_set_thermal_level_callback callback);
1015
Krishna Kumaar Natarajan052c6e62015-09-28 15:32:55 -07001016void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg);
Edhar, Mahesh Kumardf2ec122015-11-16 11:33:16 +05301017bool sme_validate_sap_channel_switch(tHalHandle hal,
1018 uint16_t sap_ch, eCsrPhyMode sap_phy_mode,
1019 uint8_t cc_switch_mode, uint8_t session_id);
Masti, Narayanraddic4a7ab82015-11-25 15:41:10 +05301020
1021#ifdef FEATURE_WLAN_TDLS
1022void sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset,
1023 uint8_t *opclass);
1024#else
1025static inline void
1026sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset,
1027 uint8_t *opclass)
1028{
1029}
1030#endif
1031
Ravi Joshi61c3c7a2015-11-09 18:41:20 -08001032#ifdef FEATURE_LFR_SUBNET_DETECTION
1033CDF_STATUS sme_gateway_param_update(tHalHandle hHal,
1034 struct gateway_param_update_req *request);
1035#endif
1036
Ryan Hsu3c8f79f2015-12-02 16:45:09 -08001037#ifdef FEATURE_GREEN_AP
1038CDF_STATUS sme_send_egap_conf_params(uint32_t enable,
1039 uint32_t inactivity_time,
1040 uint32_t wait_time,
1041 uint32_t flags);
1042#else
1043static inline CDF_STATUS sme_send_egap_conf_params(uint32_t enable,
1044 uint32_t inactivity_time,
1045 uint32_t wait_time,
1046 uint32_t flags)
1047{
1048 return CDF_STATUS_E_NOSUPPORT;
1049}
1050#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001051#endif /* #if !defined( __SME_API_H ) */