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