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