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