blob: 144d828d12511a7ea65153b470c59788dc124e04 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Pankaj Singh6e549ab2020-06-05 02:26:41 +05302 * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
Kiet Lam0fb93dd2014-02-19 00:32:59 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Kiet Lam0fb93dd2014-02-19 00:32:59 -080026 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Jeff Johnson295189b2012-06-20 16:38:30 -070031#if !defined( __SME_API_H )
32#define __SME_API_H
33
34
35/**=========================================================================
36
37 \file smeApi.h
38
39 \brief prototype for SME APIs
40
Jeff Johnson295189b2012-06-20 16:38:30 -070041
42 ========================================================================*/
43
44/* $Header$ */
45
46/*--------------------------------------------------------------------------
47 Include Files
48 ------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +053049#include <linux/version.h>
Jeff Johnson295189b2012-06-20 16:38:30 -070050#include "ccmApi.h"
51#include "csrApi.h"
52#include "pmcApi.h"
53#include "vos_mq.h"
54#include "vos_lock.h"
55#include "halTypes.h"
56#include "sirApi.h"
57#include "btcApi.h"
58#include "vos_nvitem.h"
59#include "p2p_Api.h"
Abhishek Singh00b71972016-01-07 10:51:04 +053060#ifdef WLAN_FEATURE_RMC
Sushant Kaushik83392fa2015-05-05 17:44:40 +053061#include "smeInternal.h"
Abhishek Singh00b71972016-01-07 10:51:04 +053062#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070063
Jeff Johnsone7245742012-09-05 17:12:55 -070064#ifdef FEATURE_OEM_DATA_SUPPORT
65#include "oemDataApi.h"
66#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070067
68#if defined WLAN_FEATURE_VOWIFI
69#include "smeRrmInternal.h"
70#endif
Srinivas Dasari030bad32015-02-18 23:23:54 +053071#include "nan_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070072
73/*--------------------------------------------------------------------------
74 Preprocessor definitions and constants
75 ------------------------------------------------------------------------*/
76
77#define SME_SUMMARY_STATS 1
78#define SME_GLOBAL_CLASSA_STATS 2
79#define SME_GLOBAL_CLASSB_STATS 4
80#define SME_GLOBAL_CLASSC_STATS 8
81#define SME_GLOBAL_CLASSD_STATS 16
82#define SME_PER_STA_STATS 32
Sushant Kaushik33200572015-08-05 16:46:20 +053083#define SME_PER_PKT_STATS 64
Jeff Johnson295189b2012-06-20 16:38:30 -070084
85#define SME_INVALID_COUNTRY_CODE "XX"
86
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070087//Macro to disable split scan
88#define SME_DISABLE_SPLIT_SCAN 255
Padma, Santhosh Kumar859d3712014-11-13 18:00:41 +053089
90//Macro to indicate invalid no of tspecs
91#define INVALID_TSPEC 100
92
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +053093#define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \
94 reg_info_1 &= 0xff00ffff; \
95 reg_info_1 |= ((val & 0xff) << 16); \
96} while(0)
97
98#define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \
99 reg_info_2 &= 0xffff00ff; \
100 reg_info_2 |= ((val & 0xff) << 8); \
101} while(0)
102
Selvaraj, Sridharc045b8b2016-04-06 12:22:35 +0530103/**
104 * ALLOWED_ACTION_FRAMES_BITMAP
105 *
106 * Bitmask is based on the below.The frames with 0's
107 * set to their corresponding bit can be dropped in FW.
108 *
109 * -----------------------------+-----+-------+
110 * Type | Bit | Allow |
111 * -----------------------------+-----+-------+
112 * SIR_MAC_ACTION_SPECTRUM_MGMT 0 1
113 * SIR_MAC_ACTION_QOS_MGMT 1 1
114 * SIR_MAC_ACTION_DLP 2 0
115 * SIR_MAC_ACTION_BLKACK 3 1
116 * SIR_MAC_ACTION_PUBLIC_USAGE 4 1
117 * SIR_MAC_ACTION_RRM 5 1
118 * SIR_MAC_ACTION_FAST_BSS_TRNST 6 0
119 * SIR_MAC_ACTION_HT 7 0
120 * SIR_MAC_ACTION_SA_QUERY 8 1
121 * SIR_MAC_ACTION_PROT_DUAL_PUB 9 0
122 * SIR_MAC_ACTION_WNM 10 1
123 * SIR_MAC_ACTION_UNPROT_WNM 11 0
124 * SIR_MAC_ACTION_TDLS 12 0
125 * SIR_MAC_ACITON_MESH 13 0
126 * SIR_MAC_ACTION_MHF 14 0
127 * SIR_MAC_SELF_PROTECTED 15 0
128 * SIR_MAC_ACTION_WME 17 1
129 * SIR_MAC_ACTION_FST 18 0
130 * SIR_MAC_ACTION_VHT 21 1
131 * ----------------------------+------+-------+
132 */
133#define ALLOWED_ACTION_FRAMES_BITMAP \
134 ((1 << SIR_MAC_ACTION_SPECTRUM_MGMT) | \
135 (1 << SIR_MAC_ACTION_QOS_MGMT) | \
136 (1 << SIR_MAC_ACTION_BLKACK) | \
137 (1 << SIR_MAC_ACTION_PUBLIC_USAGE) | \
138 (1 << SIR_MAC_ACTION_RRM) | \
139 (1 << SIR_MAC_ACTION_SA_QUERY) | \
140 (1 << SIR_MAC_ACTION_WNM) | \
141 (1 << SIR_MAC_ACTION_WME) | \
142 (1 << SIR_MAC_ACTION_VHT))
Jeff Johnson295189b2012-06-20 16:38:30 -0700143/*--------------------------------------------------------------------------
144 Type declarations
145 ------------------------------------------------------------------------*/
146typedef struct _smeConfigParams
147{
148 tCsrConfigParam csrConfig;
149#if defined WLAN_FEATURE_VOWIFI
150 tRrmConfigParam rrmConfig;
151#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700152#if defined FEATURE_WLAN_LFR
153 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800154 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700155#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800156#if defined FEATURE_WLAN_ESE
157 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700158#endif
159#if defined WLAN_FEATURE_P2P_INTERNAL
160 tP2PConfigParam p2pConfig;
161#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800162#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700163 tANI_U8 isFastTransitionEnabled;
164 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700165 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700166#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530167 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700168 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800169 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530170 tANI_U32 fDeferIMPSTime;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +0530171 tANI_U8 fBtcEnableIndTimerVal;
Jeff Johnson295189b2012-06-20 16:38:30 -0700172} tSmeConfigParams, *tpSmeConfigParams;
173
Sunil Duttc69bccb2014-05-26 21:30:20 +0530174#ifdef WLAN_FEATURE_LINK_LAYER_STATS
175
176/* ---------------------------------------------------------------------------
177 \fn sme_LLStatsSetReq
178 \brief API to set link layer stats request to FW
179 \param hHal - The handle returned by macOpen.
180
181 \Param pStatsReq - a pointer to a caller allocated object of
182 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
183 stats set.
184
185 \return eHalStatus
186 ---------------------------------------------------------------------------*/
187eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
188
189/* ---------------------------------------------------------------------------
190 \fn sme_LLStatsGetReq
191 \brief API to get link layer stats request to FW
192 \param hHal - The handle returned by macOpen.
193
194 \Param pStatsReq - a pointer to a caller allocated object of
195 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
196 stats get.
197
198 \return eHalStatus
199 ---------------------------------------------------------------------------*/
200eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
201
202/* ---------------------------------------------------------------------------
203 \fn sme_LLStatsClearReq
204 \brief API to clear link layer stats request to FW
205 \param hHal - The handle returned by macOpen.
206
207 \Param pStatsReq - a pointer to a caller allocated object of
208 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
209 stats clear.
210
211 \return eHalStatus
212 ---------------------------------------------------------------------------*/
213eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
214
215/* ---------------------------------------------------------------------------
216 \fn sme_SetLinkLayerStatsIndCB
217 \brief API to trigger Link Layer stats result indications from from FW
218 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530219 \param callbackRoutine - HDD callback which needs to be invoked after
220 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530221 \return eHalStatus
222 ---------------------------------------------------------------------------*/
223eHalStatus
224sme_SetLinkLayerStatsIndCB
225(
Dino Mycled3d50022014-07-07 12:58:25 +0530226 tHalHandle hHal,
227 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
228 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530229);
230
231
232#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
233
Sourav Mohapatra2416e0e2018-03-05 18:44:21 +0530234void sme_set_vowifi_mode(tpAniSirGlobal pMac, bool enable);
Ashish Kumar Dhanotiyaf59c7762018-04-10 17:54:25 +0530235void sme_set_qpower(tpAniSirGlobal pMac, uint8_t enable);
Sourav Mohapatra9d963282018-02-08 20:03:05 +0530236void sme_set_olpc_mode(tpAniSirGlobal pMac, bool enable);
Ashish Kumar Dhanotiyaf59c7762018-04-10 17:54:25 +0530237
Dino Mycle2c198072014-06-10 10:15:52 +0530238#ifdef WLAN_FEATURE_EXTSCAN
239/* ---------------------------------------------------------------------------
240 \fn sme_GetValidChannelsByBand
241 \brief SME API to fetch all valid channel filtered by band
242 \param hHal
243 \param wifiBand: RF band information
244 \param aValidChannels: Array to store channel info
245 \param len: number of channels
246 \- return eHalStatus
247 -------------------------------------------------------------------------*/
248eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
249 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
250
251/* ---------------------------------------------------------------------------
252 \fn sme_EXTScanGetCapabilities
253 \brief SME API to fetch Extented Scan capabilities
254 \param hHal
255 \param pReq: Extented Scan capabilities structure
256 \- return eHalStatus
257 -------------------------------------------------------------------------*/
258eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
259 tSirGetEXTScanCapabilitiesReqParams *pReq);
260
261/* ---------------------------------------------------------------------------
262 \fn sme_EXTScanStart
263 \brief SME API to issue Extented Scan start
264 \param hHal
265 \param pStartCmd: Extented Scan start structure
266 \- return eHalStatus
267 -------------------------------------------------------------------------*/
268eHalStatus sme_EXTScanStart (tHalHandle hHal,
269 tSirEXTScanStartReqParams *pStartCmd);
270
271/* ---------------------------------------------------------------------------
272 \fn sme_EXTScanStop
273 \brief SME API to issue Extented Scan stop
274 \param hHal
275 \param pStopReq: Extented Scan stop structure
276 \- return eHalStatus
277 -------------------------------------------------------------------------*/
278eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
279
280/* ---------------------------------------------------------------------------
281 \fn sme_SetBssHotlist
282 \brief SME API to set BSSID hotlist
283 \param hHal
284 \param pSetHotListReq: Extented Scan set hotlist structure
285 \- return eHalStatus
286 -------------------------------------------------------------------------*/
287eHalStatus sme_SetBssHotlist (tHalHandle hHal,
288 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
289
290/* ---------------------------------------------------------------------------
291 \fn sme_ResetBssHotlist
292 \brief SME API to reset BSSID hotlist
293 \param hHal
294 \param pSetHotListReq: Extented Scan set hotlist structure
295 \- return eHalStatus
296 -------------------------------------------------------------------------*/
297eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
298 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
299
300/* ---------------------------------------------------------------------------
Dino Mycle2c198072014-06-10 10:15:52 +0530301 \fn sme_getCachedResults
302 \brief SME API to get cached results
303 \param hHal
304 \param pCachedResultsReq: Extented Scan get cached results structure
305 \- return eHalStatus
306 -------------------------------------------------------------------------*/
307eHalStatus sme_getCachedResults (tHalHandle hHal,
308 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
309
310/* ---------------------------------------------------------------------------
311 \fn sme_EXTScanRegisterCallback
312 \brief SME API to register Extented Scan notification callback
313 \param pEXTScanIndCb
314 \- return void
315 -------------------------------------------------------------------------*/
316eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
317 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
318 void *);
319
320#endif /* WLAN_FEATURE_EXTSCAN */
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530321
322#ifdef FEATURE_OEM_DATA_SUPPORT
323eHalStatus sme_OemDataRegisterCallback (tHalHandle hHal,
Padma, Santhosh Kumaree7c3d22016-01-25 10:36:08 +0530324 void (*pOemDataIndCb)(void *, const tANI_U16, void *, tANI_U32),
325 void *callbackContext);
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530326#endif
327
Rajeev Kumar Sirasanagandla2bb30b82019-01-07 22:30:16 +0530328/**
329 * sme_SpoofMacAddrReq() - SME API to send Spoof Mac Addr req to HAL
330 * @hHal: Hal handle
331 * @macaddr: Spoof mac address to be sent
332 * @spoof_mac_oui: If spoof request is from VENDOR_SUBCMD_MAC_OUI
333 *
334 * Return: eHalStatus
335 */
336eHalStatus
337sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr, bool spoof_mac_oui);
Dino Mycle2c198072014-06-10 10:15:52 +0530338
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530339typedef enum
340{
341 eSME_ROAM_TRIGGER_NONE = 0,
342 eSME_ROAM_TRIGGER_SCAN = 1,
343 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
344 eSME_ROAM_TRIGGER_MAX
345} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700346
Kapil Gupta3d923fb2016-12-20 18:59:27 +0530347#ifdef WLAN_FEATURE_APFIND
348struct sme_ap_find_request_req
349{
350 u_int16_t request_data_len;
351 const u_int8_t* request_data;
352};
353#endif /* WLAN_FEATURE_APFIND */
354
355
Jeff Johnson295189b2012-06-20 16:38:30 -0700356/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530357 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700358 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700359/*--------------------------------------------------------------------------
360
361 \brief sme_Open() - Initialze all SME modules and put them at idle state
362
363 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
364 successfully return, all modules are at idle state ready to start.
365
366 smeOpen must be called before any other SME APIs can be involved.
367 smeOpen must be called after macOpen.
368
369 \param hHal - The handle returned by macOpen.
370
371 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
372
373 Other status means SME is failed to be initialized
374 \sa
375
376 --------------------------------------------------------------------------*/
377eHalStatus sme_Open(tHalHandle hHal);
378
379/*--------------------------------------------------------------------------
380
381 \brief sme_Close() - Release all SME modules and their resources.
382
383 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
384 return, all modules are at closed state.
385
386 No SME APIs can be involved after sme_Close except sme_Open.
387 sme_Close must be called before macClose.
388
389 \param hHal - The handle returned by macOpen.
390
391 \return eHAL_STATUS_SUCCESS - SME is successfully close.
392
393 Other status means SME is failed to be closed but caller still cannot
394 call any other SME functions except smeOpen.
395 \sa
396
397 --------------------------------------------------------------------------*/
398eHalStatus sme_Close(tHalHandle hHal);
399
400/*--------------------------------------------------------------------------
Hema Aparna Medicharlaa6cf65e2015-06-01 16:23:28 +0530401
402 \brief sme_PreClose() - Stop SME resources prior to final sme_Stop.
403
404 The function stops resources in SME, PMC, CCM, CSR, etc. as needed
405 to handle fast closure during SSR/unload-load cases.
406
407 \param hHal - The handle returned by macOpen.
408 \return v_VOID_t
409
410 \sa
411
412 --------------------------------------------------------------------------*/
413v_VOID_t sme_PreClose(tHalHandle hHal);
414
415/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700416
417 \brief sme_Start() - Put all SME modules at ready state.
418
419 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
420 successfully return, all modules are ready to run.
421
422 \param hHal - The handle returned by macOpen.
423
424 \return eHAL_STATUS_SUCCESS - SME is ready.
425
426 Other status means SME is failed to start.
427 \sa
428
429 --------------------------------------------------------------------------*/
430eHalStatus sme_Start(tHalHandle hHal);
431
432/*--------------------------------------------------------------------------
433
434 \brief sme_Stop() - Stop all SME modules and put them at idle state
435
436 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
437 return, all modules are at idle state ready to start.
438
439
440 \param hHal - The handle returned by macOpen.
441
Kiet Lama72a2322013-11-15 11:18:11 +0530442 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700443
444 \return eHAL_STATUS_SUCCESS - SME is stopped.
445
446 Other status means SME is failed to stop but caller should still consider
447 SME is stopped.
448 \sa
449
450 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530451eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700452
453
454/*--------------------------------------------------------------------------
455
456 \brief sme_OpenSession() - Open a session for scan/roam operation.
457
458 This is a synchronous API.
459
460
461 \param hHal - The handle returned by macOpen.
462 \param callback - A pointer to the function caller specifies for roam/connect status indication
463 \param pContext - The context passed with callback
464 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
465 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
466
467 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
468
469 Other status means SME is failed to open the session.
470 eHAL_STATUS_RESOURCES - no more session available.
471 \sa
472
473 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700474eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
475 void *pContext, tANI_U8 *pSelfMacAddr,
476 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700477
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700478/*--------------------------------------------------------------------------
479
480 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
481 \param hHal - The handle returned by macOpen.
482 \param currDeviceMode - Current operating device mode.
483 --------------------------------------------------------------------------*/
484
485void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700486
487/*--------------------------------------------------------------------------
488
489 \brief sme_CloseSession() - Open a session for scan/roam operation.
490
491 This is a synchronous API.
492
Jeff Johnson295189b2012-06-20 16:38:30 -0700493 \param hHal - The handle returned by macOpen.
494
495 \param sessionId - A previous opened session's ID.
mukul sharmabab477d2015-06-11 17:14:55 +0530496
497 \param bPurgeSmeCmdList - Whether sme cmd list purging is required or not.
498 TRUE -Purging require FALSE - Purging not require
499
Jeff Johnson295189b2012-06-20 16:38:30 -0700500 \return eHAL_STATUS_SUCCESS - session is closed.
501
502 Other status means SME is failed to open the session.
503 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
504 \sa
mukul sharmabab477d2015-06-11 17:14:55 +0530505
506
Jeff Johnson295189b2012-06-20 16:38:30 -0700507 --------------------------------------------------------------------------*/
508eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
Agrawal Ashish5a3522c2016-03-02 15:08:28 +0530509 tANI_BOOLEAN fSync,
mukul sharmabab477d2015-06-11 17:14:55 +0530510 tANI_U8 bPurgeSmeCmdList,
511 csrRoamSessionCloseCallback callback,
512 void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -0700513
514/*--------------------------------------------------------------------------
515
516 \brief sme_UpdateConfig() - Change configurations for all SME moduels
517
518 The function updates some configuration for modules in SME, CCM, CSR, etc
519 during SMEs close -> open sequence.
520
521 Modules inside SME apply the new configuration at the next transaction.
522
523
524 \param hHal - The handle returned by macOpen.
525 \Param pSmeConfigParams - a pointer to a caller allocated object of
526 typedef struct _smeConfigParams.
527
528 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
529
530 Other status means SME is failed to update the config parameters.
531 \sa
532
533 --------------------------------------------------------------------------*/
534eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
535
536#ifdef FEATURE_WLAN_SCAN_PNO
537/*--------------------------------------------------------------------------
538
539 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
540
541 It is used at driver start up to inform RIVA of the default channel
542 configuration.
543
544 This is a synchronuous call
545
546 \param hHal - The handle returned by macOpen.
547
548 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
549
550 Other status means SME is failed to update the channel config.
551 \sa
552
553 --------------------------------------------------------------------------*/
554eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
555
556#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700557/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530558
559 \brief sme_UpdateChannelList() - Update channel List in FW.
560
561
562 \param hHal - The handle returned by macOpen.
563
564 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
565
566 Other status means SME is failed to update the channel config.
567 \sa
568
569 --------------------------------------------------------------------------*/
570eHalStatus sme_UpdateChannelList(tHalHandle hHal);
571
572/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700573
574 \brief sme_set11dinfo() - Set the 11d information about valid channels
575 and there power using information from nvRAM
576 This function is called only for AP.
577
578 This is a synchronuous call
579
580 \param hHal - The handle returned by macOpen.
581 \Param pSmeConfigParams - a pointer to a caller allocated object of
582 typedef struct _smeConfigParams.
583
584 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
585
586 Other status means SME is failed to update the config parameters.
587 \sa
588--------------------------------------------------------------------------*/
589
590eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
591
592/*--------------------------------------------------------------------------
593
594 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
595
596 This is a synchronuous call
597
598 \param hHal - The handle returned by HostapdAdapter.
599 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
600
601 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
602
603 Other status means, failed to get the current regulatory domain.
604 \sa
605--------------------------------------------------------------------------*/
606
607eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
608
609eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
610
Jeff Johnson295189b2012-06-20 16:38:30 -0700611
612/* ---------------------------------------------------------------------------
613 \fn sme_ChangeConfigParams
614 \brief The SME API exposed for HDD to provide config params to SME during
615 SMEs stop -> start sequence.
616
617 If HDD changed the domain that will cause a reset. This function will
618 provide the new set of 11d information for the new domain. Currrently this
619 API provides info regarding 11d only at reset but we can extend this for
620 other params (PMC, QoS) which needs to be initialized again at reset.
621
622 This is a synchronuous call
623
624 \param hHal - The handle returned by macOpen.
625
626 \Param
627 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
628 currently provides 11d related information like Country code,
629 Regulatory domain, valid channel list, Tx power per channel, a
630 list with active/passive scan allowed per valid channel.
631
632 \return eHalStatus
633 ---------------------------------------------------------------------------*/
634eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
635 tCsrUpdateConfigParam *pUpdateConfigParam);
636
637/*--------------------------------------------------------------------------
638
639 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
640 is ready tio run.
641
642 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
643 to running state.
644
645
646 \param hHal - The handle returned by macOpen.
647
648 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
649
650 Other status means SME failed to send the message to PE.
651 \sa
652
653 --------------------------------------------------------------------------*/
654eHalStatus sme_HDDReadyInd(tHalHandle hHal);
655
656
657/*--------------------------------------------------------------------------
658
659 \brief sme_ProcessMsg() - The main message processor for SME.
660
661 The function is called by a message dispatcher when to process a message
662 targeted for SME.
663
664
665 \param hHal - The handle returned by macOpen.
666 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
667
668 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
669
670 Other status means SME failed to process the message.
671 \sa
672
673 --------------------------------------------------------------------------*/
674eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
675
676v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
677
678/* ---------------------------------------------------------------------------
679 \fn sme_ScanRequest
680 \brief a wrapper function to Request a 11d or full scan from CSR.
681 \param pScanRequestID - pointer to an object to get back the request ID
682 \param callback - a callback function that scan calls upon finish, will not
683 be called if csrScanRequest returns error
684 \param pContext - a pointer passed in for the callback
685 \return eHalStatus
686 ---------------------------------------------------------------------------*/
687eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
688 tANI_U32 *pScanRequestID,
689 csrScanCompleteCallback callback, void *pContext);
690
691
692/* ---------------------------------------------------------------------------
693 \fn sme_ScanSetBGScanparams
694 \brief a wrapper function to request CSR to set BG scan params in PE
695 \param pScanReq - BG scan request structure
696 \return eHalStatus
697 ---------------------------------------------------------------------------*/
698eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
699
700
701/* ---------------------------------------------------------------------------
702 \fn sme_ScanGetResult
703 \brief a wrapper function to request scan results from CSR.
704 \param pFilter - If pFilter is NULL, all cached results are returned
705 \param phResult - an object for the result.
706 \return eHalStatus
707 ---------------------------------------------------------------------------*/
708eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
709 tScanResultHandle *phResult);
710
711
712/* ---------------------------------------------------------------------------
713 \fn sme_ScanFlushResult
714 \brief a wrapper function to request CSR to clear scan results.
715 \return eHalStatus
716 ---------------------------------------------------------------------------*/
717eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530718
719/*
720 * ---------------------------------------------------------------------------
721 * \fn sme_FilterScanResults
722 * \brief a wrapper function to request CSR to filter the scan results based
723 * on valid chennel list.
724 * \return eHalStatus
725 *---------------------------------------------------------------------------
726 */
727eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
728
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530729/*
730 * ---------------------------------------------------------------------------
731 * \fn sme_FilterScanDFSResults
732 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
733 * from the scan results.
734 * \return eHalStatus
735 *---------------------------------------------------------------------------
736 */
737eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
738
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700739eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700740
741/* ---------------------------------------------------------------------------
742 \fn sme_ScanResultGetFirst
743 \brief a wrapper function to request CSR to returns the first element of
744 scan result.
745 \param hScanResult - returned from csrScanGetResult
746 \return tCsrScanResultInfo * - NULL if no result
747 ---------------------------------------------------------------------------*/
748tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
749 tScanResultHandle hScanResult);
750
751/* ---------------------------------------------------------------------------
752 \fn sme_ScanResultGetNext
753 \brief a wrapper function to request CSR to returns the next element of
754 scan result. It can be called without calling csrScanResultGetFirst
755 first
756 \param hScanResult - returned from csrScanGetResult
757 \return Null if no result or reach the end
758 ---------------------------------------------------------------------------*/
759tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
760 tScanResultHandle hScanResult);
761
762/* ---------------------------------------------------------------------------
763 \fn sme_ScanResultPurge
764 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
765 in the list and free memory for each item
766 \param hScanResult - returned from csrScanGetResult. hScanResult is
767 considered gone by
768 calling this function and even before this function reutrns.
769 \return eHalStatus
770 ---------------------------------------------------------------------------*/
771eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
772
Sourav Mohapatra5817dc42017-12-18 17:45:16 +0530773VOS_STATUS sme_update_channel_list(tpAniSirGlobal pMac);
774
775
Jeff Johnson295189b2012-06-20 16:38:30 -0700776/* ---------------------------------------------------------------------------
777 \fn sme_ScanGetPMKIDCandidateList
778 \brief a wrapper function to return the PMKID candidate list
779 \param pPmkidList - caller allocated buffer point to an array of
780 tPmkidCandidateInfo
781 \param pNumItems - pointer to a variable that has the number of
782 tPmkidCandidateInfo allocated when retruning, this is
783 either the number needed or number of items put into
784 pPmkidList
785 \return eHalStatus - when fail, it usually means the buffer allocated is not
786 big enough and pNumItems
787 has the number of tPmkidCandidateInfo.
788 \Note: pNumItems is a number of tPmkidCandidateInfo,
789 not sizeof(tPmkidCandidateInfo) * something
790 ---------------------------------------------------------------------------*/
791eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
792 tPmkidCandidateInfo *pPmkidList,
793 tANI_U32 *pNumItems );
794
795
796/*----------------------------------------------------------------------------
797 \fn sme_RoamRegisterLinkQualityIndCallback
798
799 \brief
800 a wrapper function to allow HDD to register a callback handler with CSR for
801 link quality indications.
802
803 Only one callback may be registered at any time.
804 In order to deregister the callback, a NULL cback may be provided.
805
806 Registration happens in the task context of the caller.
807
808 \param callback - Call back being registered
809 \param pContext - user data
810
811 DEPENDENCIES: After CSR open
812
813 \return eHalStatus
814-----------------------------------------------------------------------------*/
815eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
816 csrRoamLinkQualityIndCallback callback,
817 void *pContext);
818
819
820/* ---------------------------------------------------------------------------
821 \fn sme_RoamConnect
822 \brief a wrapper function to request CSR to inititiate an association
823 \param sessionId - the sessionId returned by sme_OpenSession.
824 \param pProfile - can be NULL to join to any open ones
825 \param pRoamId - to get back the request ID
826 \return eHalStatus
827 ---------------------------------------------------------------------------*/
828eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
829 tANI_U32 *pRoamId);
830
831/* ---------------------------------------------------------------------------
832 \fn sme_RoamReassoc
833 \brief a wrapper function to request CSR to inititiate a re-association
834 \param pProfile - can be NULL to join the currently connected AP. In that
835 case modProfileFields should carry the modified field(s) which could trigger
836 reassoc
837 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
838 that might need modification dynamically once STA is up & running and this
839 could trigger a reassoc
840 \param pRoamId - to get back the request ID
841 \return eHalStatus
842 -------------------------------------------------------------------------------*/
843eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
844 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700845 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700846
847/* ---------------------------------------------------------------------------
848 \fn sme_RoamConnectToLastProfile
849 \brief a wrapper function to request CSR to disconnect and reconnect with
850 the same profile
851 \return eHalStatus. It returns fail if currently connected
852 ---------------------------------------------------------------------------*/
853eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
854
855/* ---------------------------------------------------------------------------
856 \fn sme_RoamDisconnect
857 \brief a wrapper function to request CSR to disconnect from a network
858 \param reason -- To indicate the reason for disconnecting. Currently, only
859 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
860 \return eHalStatus
861 ---------------------------------------------------------------------------*/
862eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
863
Jeff Johnson295189b2012-06-20 16:38:30 -0700864/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530865 \fn.sme_abortConnection
866 \brief a wrapper function to request CSR to stop from connecting a network
867 \retun void.
868---------------------------------------------------------------------------*/
869
870void sme_abortConnection(tHalHandle hHal, tANI_U8 sessionId);
871
872/* ---------------------------------------------------------------------------
Abhishek Singhe0bc0992016-05-20 17:58:18 +0530873 \fn.sme_dhcp_done_ind
874 \brief a wrapper function to set dhcp done ind in sme session
875 \retun void.
876---------------------------------------------------------------------------*/
877void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id);
878
879/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700880 \fn sme_RoamStopBss
881 \brief a wrapper function to request CSR to stop bss
882 \param sessionId - sessionId of SoftAP
883 \return eHalStatus
884 ---------------------------------------------------------------------------*/
885eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
886
887/* ---------------------------------------------------------------------------
888 \fn sme_RoamGetAssociatedStas
889 \brief To probe the list of associated stations from various modules of CORE stack.
890 \This is an asynchronous API.
891 \param sessionId - sessionId of SoftAP
892 \param modId - Module from whom list of associtated stations is to be probed.
893 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
894 \param pUsrContext - Opaque HDD context
895 \param pfnSapEventCallback - Sap event callback in HDD
896 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
897 \return eHalStatus
898 -------------------------------------------------------------------------------*/
899eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
900 VOS_MODULE_ID modId, void *pUsrContext,
901 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
902
903/* ---------------------------------------------------------------------------
904 \fn sme_RoamDisconnectSta
905 \brief To disassociate a station. This is an asynchronous API.
906 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
907 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
908 -------------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +0530909eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId,
910#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
911 const tANI_U8 *pPeerMacAddr
912#else
913 tANI_U8 *pPeerMacAddr
914#endif
915 );
Jeff Johnson295189b2012-06-20 16:38:30 -0700916
917/* ---------------------------------------------------------------------------
918 \fn sme_RoamDeauthSta
919 \brief To disassociate a station. This is an asynchronous API.
920 \param hHal - Global structure
921 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530922 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700923 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
924 -------------------------------------------------------------------------------*/
925eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530926 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700927
928/* ---------------------------------------------------------------------------
929 \fn sme_RoamTKIPCounterMeasures
930 \brief To start or stop TKIP counter measures. This is an asynchronous API.
931 \param sessionId - sessionId of SoftAP
932 \param bEnable - Flag to start/stop TKIP countermeasures
933 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
934 -------------------------------------------------------------------------------*/
935eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
936
937/* ---------------------------------------------------------------------------
938 \fn sme_RoamGetWpsSessionOverlap
939 \brief To get the WPS PBC session overlap information.
940 \This is an asynchronous API.
941 \param sessionId - sessionId of SoftAP
942 \param pUsrContext - Opaque HDD context
943 \param pfnSapEventCallback - Sap event callback in HDD
944 \return eHalStatus
945 -------------------------------------------------------------------------------*/
946eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
947 void *pUsrContext, void *pfnSapEventCallback,
948 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700949
950/* ---------------------------------------------------------------------------
951 \fn sme_RoamGetConnectState
952 \brief a wrapper function to request CSR to return the current connect state
953 of Roaming
954 \return eHalStatus
955 ---------------------------------------------------------------------------*/
956eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
957
958/* ---------------------------------------------------------------------------
959 \fn sme_RoamGetConnectProfile
960 \brief a wrapper function to request CSR to return the current connect
961 profile. Caller must call csrRoamFreeConnectProfile after it is done
962 and before reuse for another csrRoamGetConnectProfile call.
963 \param pProfile - pointer to a caller allocated structure
964 tCsrRoamConnectedProfile
965 \return eHalStatus. Failure if not connected
966 ---------------------------------------------------------------------------*/
967eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
968 tCsrRoamConnectedProfile *pProfile);
969
970/* ---------------------------------------------------------------------------
971 \fn sme_RoamFreeConnectProfile
972 \brief a wrapper function to request CSR to free and reinitialize the
973 profile returned previously by csrRoamGetConnectProfile.
974 \param pProfile - pointer to a caller allocated structure
975 tCsrRoamConnectedProfile
976 \return eHalStatus.
977 ---------------------------------------------------------------------------*/
978eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
979 tCsrRoamConnectedProfile *pProfile);
980
981/* ---------------------------------------------------------------------------
982 \fn sme_RoamSetPMKIDCache
983 \brief a wrapper function to request CSR to return the PMKID candidate list
984 \param pPMKIDCache - caller allocated buffer point to an array of
985 tPmkidCacheInfo
986 \param numItems - a variable that has the number of tPmkidCacheInfo
987 allocated when retruning, this is either the number needed
988 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530989 \param update_entire_cache - if TRUE, then it overwrites the entire cache
990 with pPMKIDCache, else it updates entry by
991 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700992 \return eHalStatus - when fail, it usually means the buffer allocated is not
993 big enough and pNumItems has the number of
994 tPmkidCacheInfo.
995 \Note: pNumItems is a number of tPmkidCacheInfo,
996 not sizeof(tPmkidCacheInfo) * something
997 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530998eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
999 tPmkidCacheInfo *pPMKIDCache,
1000 tANI_U32 numItems,
1001 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -07001002
1003/* ---------------------------------------------------------------------------
1004 \fn sme_RoamGetSecurityReqIE
1005 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
1006 passes to PE to JOIN request or START_BSS request
1007 This is a synchronuous call.
1008 \param sessionId - returned by sme_OpenSession.
1009 \param pLen - caller allocated memory that has the length of pBuf as input.
1010 Upon returned, *pLen has the needed or IE length in pBuf.
1011 \param pBuf - Caller allocated memory that contain the IE field, if any,
1012 upon return
1013 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1014 \return eHalStatus - when fail, it usually means the buffer allocated is not
1015 big enough
1016 ---------------------------------------------------------------------------*/
1017eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1018 tANI_U8 *pBuf, eCsrSecurityType secType);
1019
1020/* ---------------------------------------------------------------------------
1021 \fn sme_RoamGetSecurityRspIE
1022 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
1023 the beacon or probe rsp if connected
1024 \param sessionId - returned by sme_OpenSession.
1025 \param pLen - caller allocated memory that has the length of pBuf as input.
1026 Upon returned, *pLen has the needed or IE length in pBuf.
1027 \param pBuf - Caller allocated memory that contain the IE field, if any,
1028 upon return
1029 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1030 \return eHalStatus - when fail, it usually means the buffer allocated is not
1031 big enough
1032 ---------------------------------------------------------------------------*/
1033eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1034 tANI_U8 *pBuf, eCsrSecurityType secType);
1035
1036
1037/* ---------------------------------------------------------------------------
1038 \fn sme_RoamGetNumPMKIDCache
1039 \brief a wrapper function to request CSR to return number of PMKID cache
1040 entries
1041 \return tANI_U32 - the number of PMKID cache entries
1042 ---------------------------------------------------------------------------*/
1043tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
1044
1045/* ---------------------------------------------------------------------------
1046 \fn sme_RoamGetPMKIDCache
1047 \brief a wrapper function to request CSR to return PMKID cache from CSR
1048 \param pNum - caller allocated memory that has the space of the number of
1049 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
1050 needed or actually number in tPmkidCacheInfo.
1051 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
1052 any, upon return
1053 \return eHalStatus - when fail, it usually means the buffer allocated is not
1054 big enough
1055 ---------------------------------------------------------------------------*/
1056eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
1057 tPmkidCacheInfo *pPmkidCache);
1058
1059/* ---------------------------------------------------------------------------
1060 \fn sme_GetConfigParam
1061 \brief a wrapper function that HDD calls to get the global settings
1062 currently maintained by CSR.
1063 \param pParam - caller allocated memory
1064 \return eHalStatus
1065 ---------------------------------------------------------------------------*/
1066eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
1067
1068/* ---------------------------------------------------------------------------
1069 \fn sme_GetStatistics
1070 \brief a wrapper function that client calls to register a callback to get
1071 different PHY level statistics from CSR.
1072
1073 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1074 \param statsMask - The different category/categories of stats requester is looking for
1075 The order in which you set the bits in the statsMask for requesting
1076 different type of stats is:
1077
1078 eCsrSummaryStats = bit 0
1079 eCsrGlobalClassAStats = bit 1
1080 eCsrGlobalClassBStats = bit 2
1081 eCsrGlobalClassCStats = bit 3
1082 eCsrGlobalClassDStats = bit 4
1083 eCsrPerStaStats = bit 5
1084
1085 \param callback - SME sends back the requested stats using the callback
1086 \param periodicity - If requester needs periodic update, 0 means it's an one
1087 time request
1088 \param cache - If requester is happy with cached stats
1089 \param staId - The station ID for which the stats is requested for
1090 \param pContext - user context to be passed back along with the callback
1091 \return eHalStatus
1092 ---------------------------------------------------------------------------*/
1093eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1094 tANI_U32 statsMask,
1095 tCsrStatsCallback callback,
1096 tANI_U32 periodicity, tANI_BOOLEAN cache,
1097 tANI_U8 staId, void *pContext);
1098
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301099/* ---------------------------------------------------------------------------
1100 \fn smeGetTLSTAState
1101 \helper function to get teh TL STA State whenever the function is called.
1102
1103 \param staId - The staID to be passed to the TL
1104 to get the relevant TL STA State
1105 \return the state as tANI_U16
1106 ---------------------------------------------------------------------------*/
1107tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1108
Jeff Johnson295189b2012-06-20 16:38:30 -07001109eHalStatus sme_GetRssi(tHalHandle hHal,
1110 tCsrRssiCallback callback,
1111 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301112
1113/* ---------------------------------------------------------------------------
1114 \fn sme_GetSnr
1115 \brief a wrapper function that client calls to register a callback to get
1116 SNR from FW
1117
1118 \param callback - SME sends back the requested stats using the callback
1119 \param staId - The station ID for which the stats is requested for
1120 \param bssid - The bssid of the connected session
1121 \param pContext - user context to be passed back along with the callback
1122 ---------------------------------------------------------------------------*/
1123eHalStatus sme_GetSnr(tHalHandle hHal,
1124 tCsrSnrCallback callback,
1125 tANI_U8 staId, tCsrBssid bssId,
1126 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001127#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001128eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1129 tCsrRssiCallback callback,
1130 tANI_U8 staId,
1131 tCsrBssid bssId,
1132 void *pContext,
1133 void* pVosContext);
1134#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001135
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001136#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001137/* ---------------------------------------------------------------------------
1138 \fn sme_GetTsmStats
1139 \brief a wrapper function that client calls to register a callback to get TSM Stats
1140
1141 \param callback - SME sends back the requested stats using the callback
1142 \param staId - The station ID for which the stats is requested for
1143 \param pContext - user context to be passed back along with the callback
1144 \param pVosContext - vos context
1145 \return eHalStatus
1146 ---------------------------------------------------------------------------*/
1147eHalStatus sme_GetTsmStats(tHalHandle hHal,
1148 tCsrTsmStatsCallback callback,
1149 tANI_U8 staId, tCsrBssid bssId,
1150 void *pContext, void* pVosContext, tANI_U8 tid);
1151
1152/* ---------------------------------------------------------------------------
1153 \fn sme_SetCCKMIe
1154 \brief function to store the CCKM IE passed from supplicant and use it while packing
1155 reassociation request
1156 \param hHal - HAL handle for device
1157 \param pCckmIe - pointer to CCKM IE data
1158 \param pCckmIeLen - length of the CCKM IE
1159 \- return Success or failure
1160 -------------------------------------------------------------------------*/
1161eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1162
1163
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001164/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001165 \fn sme_SetEseBeaconRequest
1166 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001167 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001168 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001169 \- return Success or failure
1170 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001171eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1172 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001173
1174
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001175#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001176/* ---------------------------------------------------------------------------
1177 \fn sme_CfgSetInt
1178 \brief a wrapper function that HDD calls to set parameters in CFG.
1179 \param cfgId - Configuration Parameter ID (type) for STA.
1180 \param ccmValue - The information related to Configuration Parameter ID
1181 which needs to be saved in CFG
1182 \param callback - To be registered by CSR with CCM. Once the CFG done with
1183 saving the information in the database, it notifies CCM &
1184 then the callback will be invoked to notify.
1185 \param toBeSaved - To save the request for future reference
1186 \return eHalStatus
1187 ---------------------------------------------------------------------------*/
1188eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1189 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1190
1191/* ---------------------------------------------------------------------------
1192 \fn sme_CfgSetStr
1193 \brief a wrapper function that HDD calls to set parameters in CFG.
1194 \param cfgId - Configuration Parameter ID (type) for STA.
1195 \param pStr - Pointer to the byte array which carries the information needs
1196 to be saved in CFG
1197 \param length - Length of the data to be saved
1198 \param callback - To be registered by CSR with CCM. Once the CFG done with
1199 saving the information in the database, it notifies CCM &
1200 then the callback will be invoked to notify.
1201 \param toBeSaved - To save the request for future reference
1202 \return eHalStatus
1203 ---------------------------------------------------------------------------*/
1204eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1205 tANI_U32 length, tCcmCfgSetCallback callback,
1206 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301207/* ---------------------------------------------------------------------------
1208 \fn sme_GetModifyProfileFields
1209 \brief HDD or SME - QOS calls this function to get the current values of
1210 connected profile fields, changing which can cause reassoc.
1211 This function must be called after CFG is downloaded and STA is in connected
1212 state. Also, make sure to call this function to get the current profile
1213 fields before calling the reassoc. So that pModifyProfileFields will have
1214 all the latest values plus the one(s) has been updated as part of reassoc
1215 request.
1216 \param pModifyProfileFields - pointer to the connected profile fields
1217 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001218
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301219 \return eHalStatus
1220 -------------------------------------------------------------------------------*/
1221eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1222 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301223/* ---------------------------------------------------------------------------
1224 \fn sme_HT40StopOBSSScan
1225 \brief HDD or SME - Command to stop the OBSS scan
1226 THis is implemented only for debugging purpose.
1227 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1228 \param sessionId - sessionId
1229 changing which can cause reassoc
1230
1231 \return eHalStatus
1232 -------------------------------------------------------------------------------*/
1233eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001234
1235/*--------------------------------------------------------------------------
1236 \fn sme_SetConfigPowerSave
1237 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1238 For BMPS related configuration, this function also updates the CFG
1239 and sends a message to FW to pick up the new values. Note: Calling
1240 this function only updates the configuration and does not enable
1241 the specified power save mode.
1242 \param hHal - The handle returned by macOpen.
1243 \param psMode - Power Saving mode being modified
1244 \param pConfigParams - a pointer to a caller allocated object of type
1245 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1246 \return eHalStatus
1247 --------------------------------------------------------------------------*/
1248eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1249 void *pConfigParams);
1250
1251/*--------------------------------------------------------------------------
1252 \fn sme_GetConfigPowerSave
1253 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1254 \param hHal - The handle returned by macOpen.
1255 \param psMode - Power Saving mode
1256 \param pConfigParams - a pointer to a caller allocated object of type
1257 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1258 \return eHalStatus
1259 --------------------------------------------------------------------------*/
1260eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1261 void *pConfigParams);
1262
1263/* ---------------------------------------------------------------------------
1264 \fn sme_SignalPowerEvent
1265 \brief Signals to PMC that a power event has occurred. Used for putting
1266 the chip into deep sleep mode.
1267 \param hHal - The handle returned by macOpen.
1268 \param event - the event that has occurred
1269 \return eHalStatus
1270 ---------------------------------------------------------------------------*/
1271extern eHalStatus sme_SignalPowerEvent (
1272 tHalHandle hHal,
1273 tPmcPowerEvent event);
1274
1275/* ---------------------------------------------------------------------------
1276 \fn sme_EnablePowerSave
1277 \brief Enables one of the power saving modes. This API does not cause a
1278 device state change. This is purely a configuration API.
1279 \param hHal - The handle returned by macOpen.
1280 \param psMode - The power saving mode to enable.
1281 \return eHalStatus
1282 ---------------------------------------------------------------------------*/
1283extern eHalStatus sme_EnablePowerSave (
1284 tHalHandle hHal,
1285 tPmcPowerSavingMode psMode);
1286
1287/* ---------------------------------------------------------------------------
1288 \fn sme_DisablePowerSave
1289 \brief Disables one of the power saving modes.Disabling does not imply
1290 that device will be brought out of the current PS mode. This is
1291 purely a configuration API.
1292 \param hHal - The handle returned by macOpen.
1293 \param psMode - The power saving mode to disable.
1294 \return eHalStatus
1295 ---------------------------------------------------------------------------*/
1296extern eHalStatus sme_DisablePowerSave (
1297 tHalHandle hHal,
1298 tPmcPowerSavingMode psMode);
1299
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301300 /* ---------------------------------------------------------------------------
1301 \fn sme_SetHostPowerSave
1302 \brief The BMPS logic is controlled by the User level Apps
1303 \param hHal - The handle returned by macOpen.
1304 \param psMode - The power saving mode to enable.
1305 \return eHalStatus
1306 ---------------------------------------------------------------------------*/
1307extern eHalStatus sme_SetHostPowerSave (
1308 tHalHandle hHal,
1309 v_BOOL_t psMode);
1310
Jeff Johnson295189b2012-06-20 16:38:30 -07001311/* ---------------------------------------------------------------------------
1312 \fn sme_StartAutoBmpsTimer
1313 \brief Starts a timer that periodically polls all the registered
1314 module for entry into Bmps mode. This timer is started only if BMPS is
1315 enabled and whenever the device is in full power.
1316 \param hHal - The handle returned by macOpen.
1317 \return eHalStatus
1318 ---------------------------------------------------------------------------*/
1319extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1320
1321/* ---------------------------------------------------------------------------
1322 \fn sme_StopAutoBmpsTimer
1323 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1324 Stopping the timer does not cause a device state change. Only the timer
1325 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1326 \param hHal - The handle returned by macOpen.
1327 \return eHalStatus
1328 ---------------------------------------------------------------------------*/
1329extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1330
1331/* ---------------------------------------------------------------------------
1332 \fn sme_QueryPowerState
1333 \brief Returns the current power state of the device.
1334 \param hHal - The handle returned by macOpen.
1335 \param pPowerState - pointer to location to return power state
1336 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1337 \return eHalStatus
1338 ---------------------------------------------------------------------------*/
1339extern eHalStatus sme_QueryPowerState (
1340 tHalHandle hHal,
1341 tPmcPowerState *pPowerState,
1342 tPmcSwitchState *pSwWlanSwitchState);
1343
1344/* ---------------------------------------------------------------------------
1345 \fn sme_IsPowerSaveEnabled
1346 \brief Checks if the device is able to enter a particular power save mode
1347 This does not imply that the device is in a particular PS mode
1348 \param hHal - The handle returned by macOpen.
1349 \param psMode - the power saving mode
1350 \return eHalStatus
1351 ---------------------------------------------------------------------------*/
1352extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1353 tHalHandle hHal,
1354 tPmcPowerSavingMode psMode);
1355
1356/* ---------------------------------------------------------------------------
1357 \fn sme_RequestFullPower
1358 \brief Request that the device be brought to full power state.
1359 Note 1: If "fullPowerReason" specificied in this API is set to
1360 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1361 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1362 HDD is requesting full power, we need to undo any previous HDD requests for
1363 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1364 specified anything other than above, the buffered requests for BMPS and WoWL
1365 will not be cleared.
1366 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1367 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1368 request".
1369 Note 3: When the device finally enters Full Power PMC will start a timer
1370 if any of the following holds true:
1371 - Auto BMPS mode is enabled
1372 - Uapsd request is pending
1373 - HDD's request for BMPS is pending
1374 - HDD's request for WoWL is pending
1375 On timer expiry PMC will attempt to put the device in BMPS mode if following
1376 (in addition to those listed above) holds true:
1377 - Polling of all modules through the Power Save Check routine passes
1378 - STA is associated to an access point
1379 \param hHal - The handle returned by macOpen.
1380 \param - callbackRoutine Callback routine invoked in case of success/failure
1381 \param - callbackContext - Cookie to be passed back during callback
1382 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1383 distinguish between BAP and HDD requests
1384 \return eHalStatus - status
1385 eHAL_STATUS_SUCCESS - device brought to full power state
1386 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1387 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1388 ---------------------------------------------------------------------------*/
1389extern eHalStatus sme_RequestFullPower (
1390 tHalHandle hHal,
1391 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1392 void *callbackContext,
1393 tRequestFullPowerReason fullPowerReason);
1394
1395/* ---------------------------------------------------------------------------
1396 \fn sme_RequestBmps
1397 \brief Request that the device be put in BMPS state. Request will be
1398 accepted only if BMPS mode is enabled and power save check routine
1399 passes. Only HDD should invoke this API.
1400 \param hHal - The handle returned by macOpen.
1401 \param - callbackRoutine Callback routine invoked in case of success/failure
1402 \param - callbackContext - Cookie to be passed back during callback
1403 \return eHalStatus
1404 eHAL_STATUS_SUCCESS - device is in BMPS state
1405 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1406 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1407 ---------------------------------------------------------------------------*/
1408extern eHalStatus sme_RequestBmps (
1409 tHalHandle hHal,
1410 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1411 void *callbackContext);
1412
1413/* ---------------------------------------------------------------------------
1414 \fn sme_SetDHCPTillPowerActiveFlag
1415 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1416 entry by PMC
1417 \param hHal - The handle returned by macOpen.
1418 ---------------------------------------------------------------------------*/
1419void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1420
1421
1422/* ---------------------------------------------------------------------------
1423 \fn sme_StartUapsd
1424 \brief Request that the device be put in UAPSD state. If the device is in
1425 Full Power it will be put in BMPS mode first and then into UAPSD
1426 mode.
1427 \param hHal - The handle returned by macOpen.
1428 \param - callbackRoutine Callback routine invoked in case of success/failure
1429 \param - callbackContext - Cookie to be passed back during callback
1430 eHAL_STATUS_SUCCESS - device is in UAPSD state
1431 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1432 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1433 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1434 \return eHalStatus
1435 ---------------------------------------------------------------------------*/
1436extern eHalStatus sme_StartUapsd (
1437 tHalHandle hHal,
1438 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1439 void *callbackContext);
1440
1441/* ---------------------------------------------------------------------------
1442 \fn sme_StopUapsd
1443 \brief Request that the device be put out of UAPSD state. Device will be
1444 put in in BMPS state after stop UAPSD completes. Buffered requests for
1445 UAPSD will be cleared after this.
1446 \param hHal - The handle returned by macOpen.
1447 \return eHalStatus
1448 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1449 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1450 ---------------------------------------------------------------------------*/
1451extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1452
1453/* ---------------------------------------------------------------------------
1454 \fn sme_RequestStandby
1455 \brief Request that the device be put in standby. It is HDD's responsibility
1456 to bring the chip to full power and do a discconnect before calling
1457 this API. Request for standby will be rejected if STA is associated
1458 to an AP.
1459 \param hHal - The handle returned by macOpen.
1460 \param - callbackRoutine Callback routine invoked in case of success/failure
1461 \param - callbackContext - Cookie to be passed back during callback
1462 \return eHalStatus
1463 eHAL_STATUS_SUCCESS - device is in Standby mode
1464 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1465 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1466 ---------------------------------------------------------------------------*/
1467extern eHalStatus sme_RequestStandby (
1468 tHalHandle hHal,
1469 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1470 void *callbackContext);
1471
1472/* ---------------------------------------------------------------------------
1473 \fn sme_RegisterPowerSaveCheck
1474 \brief Register a power save check routine that is called whenever
1475 the device is about to enter one of the power save modes.
1476 \param hHal - The handle returned by macOpen.
1477 \param checkRoutine - Power save check routine to be registered
1478 \param callbackContext - Cookie to be passed back during callback
1479 \return eHalStatus
1480 eHAL_STATUS_SUCCESS - successfully registered
1481 eHAL_STATUS_FAILURE - not successfully registered
1482 ---------------------------------------------------------------------------*/
1483extern eHalStatus sme_RegisterPowerSaveCheck (
1484 tHalHandle hHal,
1485 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1486
1487/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301488 \fn sme_Register11dScanDoneCallback
1489 \brief Register a routine of type csrScanCompleteCallback which is
1490 called whenever an 11d scan is done
1491 \param hHal - The handle returned by macOpen.
1492 \param callback - 11d scan complete routine to be registered
1493 \return eHalStatus
1494 ---------------------------------------------------------------------------*/
1495extern eHalStatus sme_Register11dScanDoneCallback (
1496 tHalHandle hHal,
1497 csrScanCompleteCallback);
1498
1499/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001500 \fn sme_DeregisterPowerSaveCheck
1501 \brief Deregister a power save check routine
1502 \param hHal - The handle returned by macOpen.
1503 \param checkRoutine - Power save check routine to be deregistered
1504 \return eHalStatus
1505 eHAL_STATUS_SUCCESS - successfully deregistered
1506 eHAL_STATUS_FAILURE - not successfully deregistered
1507 ---------------------------------------------------------------------------*/
1508extern eHalStatus sme_DeregisterPowerSaveCheck (
1509 tHalHandle hHal,
1510 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1511
1512/* ---------------------------------------------------------------------------
1513 \fn sme_RegisterDeviceStateUpdateInd
1514 \brief Register a callback routine that is called whenever
1515 the device enters a new device state (Full Power, BMPS, UAPSD)
1516 \param hHal - The handle returned by macOpen.
1517 \param callbackRoutine - Callback routine to be registered
1518 \param callbackContext - Cookie to be passed back during callback
1519 \return eHalStatus
1520 eHAL_STATUS_SUCCESS - successfully registered
1521 eHAL_STATUS_FAILURE - not successfully registered
1522 ---------------------------------------------------------------------------*/
1523extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1524 tHalHandle hHal,
1525 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1526 void *callbackContext);
1527
1528/* ---------------------------------------------------------------------------
1529 \fn sme_DeregisterDeviceStateUpdateInd
1530 \brief Deregister a routine that was registered for device state changes
1531 \param hHal - The handle returned by macOpen.
1532 \param callbackRoutine - Callback routine to be deregistered
1533 \return eHalStatus
1534 eHAL_STATUS_SUCCESS - successfully deregistered
1535 eHAL_STATUS_FAILURE - not successfully deregistered
1536 ---------------------------------------------------------------------------*/
1537extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1538 tHalHandle hHal,
1539 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1540
1541/* ---------------------------------------------------------------------------
1542 \fn sme_WowlAddBcastPattern
1543 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1544 do a pattern match on these patterns when Wowl is enabled during BMPS
1545 mode.
1546 \param hHal - The handle returned by macOpen.
1547 \param pattern - Pattern to be added
1548 \return eHalStatus
1549 eHAL_STATUS_FAILURE Cannot add pattern
1550 eHAL_STATUS_SUCCESS Request accepted.
1551 ---------------------------------------------------------------------------*/
1552extern eHalStatus sme_WowlAddBcastPattern (
1553 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001554 tpSirWowlAddBcastPtrn pattern,
1555 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001556
1557/* ---------------------------------------------------------------------------
1558 \fn sme_WowlDelBcastPattern
1559 \brief Delete a pattern that was added for Pattern Byte Matching.
1560 \param hHal - The handle returned by macOpen.
1561 \param pattern - Pattern to be deleted
1562 \return eHalStatus
1563 eHAL_STATUS_FAILURE Cannot delete pattern
1564 eHAL_STATUS_SUCCESS Request accepted.
1565 ---------------------------------------------------------------------------*/
1566extern eHalStatus sme_WowlDelBcastPattern (
1567 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001568 tpSirWowlDelBcastPtrn pattern,
1569 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001570
1571/* ---------------------------------------------------------------------------
1572 \fn sme_EnterWowl
1573 \brief This is the API to request entry into WOWL mode.
1574 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1575 SME will will cache the information that WOWL has been requested and
1576 attempt to put the device in BMPS first. On entry into BMPS, SME will
1577 enter the WOWL mode.
1578 Note 1: After WoWL request is accepted, If module other than HDD requests
1579 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1580 and attempt to put the chip into BMPS+WOWL based on a timer.
1581 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1582 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1583 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1584 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1585 are required. Currently there is no requirement or use case to support UAPSD
1586 and WOWL at the same time.
1587 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1588 Note 5. Request for WoWL is rejected if BMPS is disabled.
1589
1590 \param hHal - The handle returned by macOpen.
1591 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1592 Used for success/failure notification by SME
1593 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1594 at the time of callback.
1595 \param wakeReasonIndCB - Callback routine provided by HDD.
1596 Used for Wake Reason Indication by SME
1597 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1598 at the time of callback.
1599 \return eHalStatus
1600 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1601 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1602 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1603 mode is entered.
1604 ---------------------------------------------------------------------------*/
1605extern eHalStatus sme_EnterWowl (
1606 tHalHandle hHal,
1607 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1608 void *enterWowlCallbackContext,
1609#ifdef WLAN_WAKEUP_EVENTS
1610 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1611 void *wakeReasonIndCBContext,
1612#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001613 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001614
1615/* ---------------------------------------------------------------------------
1616 \fn sme_ExitWowl
1617 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1618 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1619 mode. Any Buffered request for WoWL will be cleared after this API.
1620 \param hHal - The handle returned by macOpen.
1621 \return eHalStatus
1622 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1623 only if the previous "Enter WOWL" transaction has
1624 not even completed.
1625 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1626 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301627extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001628
1629/* ---------------------------------------------------------------------------
1630
1631 \fn sme_RoamSetKey
1632
1633 \brief To set encryption key. This function should be called only when connected
1634 This is an asynchronous API.
1635
1636 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1637
1638 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1639
1640 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1641
1642 FAILURE or RESOURCES The API finished and failed.
1643
1644 -------------------------------------------------------------------------------*/
1645eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1646
1647/* ---------------------------------------------------------------------------
1648
1649 \fn sme_RoamRemoveKey
1650
1651 \brief To set encryption key. This is an asynchronous API.
1652
1653 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1654
1655 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1656
1657 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1658
1659 FAILURE or RESOURCES The API finished and failed.
1660
1661 -------------------------------------------------------------------------------*/
1662eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1663
1664
1665/* ---------------------------------------------------------------------------
1666
1667 \fn sme_GetCountryCode
1668
1669 \brief To return the current country code. If no country code is applied, default country code is
1670 used to fill the buffer.
1671 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1672 This is a synchronous API.
1673
1674 \param pBuf - pointer to a caller allocated buffer for returned country code.
1675
1676 \param pbLen For input, this parameter indicates how big is the buffer.
1677 Upon return, this parameter has the number of bytes for country. If pBuf
1678 doesn't have enough space, this function returns
1679 fail status and this parameter contains the number that is needed.
1680
1681 \return eHalStatus SUCCESS.
1682
1683 FAILURE or RESOURCES The API finished and failed.
1684
1685 -------------------------------------------------------------------------------*/
1686eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1687
1688/* ---------------------------------------------------------------------------
1689
1690 \fn sme_SetCountryCode
1691
1692 \brief To change the current/default country code.
1693 If 11d supported is turned off, an error is return.
1694 This is a synchronous API.
1695
1696 \param pCountry - pointer to a caller allocated buffer for the country code.
1697
1698 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1699 whether a reset is required.
1700
1701 \return eHalStatus SUCCESS.
1702
1703 FAILURE or RESOURCES The API finished and failed.
1704
1705 -------------------------------------------------------------------------------*/
1706eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1707
1708/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301709
1710 \fn sme_InitChannels
1711
1712 \brief Used to initialize CSR channel lists while driver loading
1713
1714 \param hHal - global pMac structure
1715
1716 \return eHalStatus SUCCESS.
1717
1718 FAILURE or RESOURCES The API finished and failed.
1719
1720 -------------------------------------------------------------------------------*/
1721eHalStatus sme_InitChannels(tHalHandle hHal);
1722
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301723
Mihir Shete04206452014-11-20 17:50:58 +05301724#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301725/* ---------------------------------------------------------------------------
1726 \fn sme_InitChannelsForCC
1727
1728 \brief Used to issue regulatory hint to user
1729
1730 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301731 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301732
1733 \return eHalStatus SUCCESS.
1734
1735 FAILURE or RESOURCES The API finished and failed.
1736
1737 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301738eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301739#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301740
Mihir Shetee1093ba2014-01-21 20:13:32 +05301741/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001742 \fn sme_ResetCountryCodeInformation
1743 \brief this function is to reset the country code current being used back to EEPROM default
1744 this includes channel list and power setting. This is a synchronous API.
1745 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1746 a restart is needed to apply the change
1747 \return eHalStatus
1748 -------------------------------------------------------------------------------*/
1749eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1750
1751/* ---------------------------------------------------------------------------
1752 \fn sme_GetSupportedCountryCode
1753 \brief this function is to get a list of the country code current being supported
1754 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1755 this has the country code list. 3 bytes for each country code. This may be NULL if
1756 caller wants to know the needed byte count.
1757 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1758 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1759 \return eHalStatus
1760 -------------------------------------------------------------------------------*/
1761eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1762
1763/* ---------------------------------------------------------------------------
1764 \fn sme_GetCurrentRegulatoryDomain
1765 \brief this function is to get the current regulatory domain. This is a synchronous API.
1766 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1767 SME. The function fails if 11d support is turned off.
1768 \param pDomain - Caller allocated buffer to return the current domain.
1769 \return eHalStatus SUCCESS.
1770
1771 FAILURE or RESOURCES The API finished and failed.
1772 -------------------------------------------------------------------------------*/
1773eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1774
1775/* ---------------------------------------------------------------------------
1776 \fn sme_SetRegulatoryDomain
1777 \brief this function is to set the current regulatory domain.
1778 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1779 SME. This is a synchronous API.
1780 \param domainId - indicate the domain (defined in the driver) needs to set to.
1781 See v_REGDOMAIN_t for definition
1782 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1783 a restart is needed to apply the change
1784 \return eHalStatus
1785 -------------------------------------------------------------------------------*/
1786eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1787
1788/* ---------------------------------------------------------------------------
1789
1790 \fn sme_GetRegulatoryDomainForCountry
1791
1792 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1793
1794 \param pCountry - pointer to a caller allocated buffer for input country code.
1795
1796 \param pDomainId Upon successful return, it is the domain that country belongs to.
1797 If it is NULL, returning success means that the country code is known.
1798
1799 \return eHalStatus SUCCESS.
1800
1801 FAILURE or RESOURCES The API finished and failed.
1802
1803 -------------------------------------------------------------------------------*/
1804eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1805
1806
1807
1808/* ---------------------------------------------------------------------------
1809
1810 \fn sme_GetSupportedRegulatoryDomains
1811
1812 \brief To return a list of supported regulatory domains. This is a synchronous API.
1813
1814 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1815
1816 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1817 Upon return, this parameter has the number for supported domains. If pDomains
1818 doesn't have enough space for all the supported domains, this function returns
1819 fail status and this parameter contains the number that is needed.
1820
1821 \return eHalStatus SUCCESS.
1822
1823 FAILURE or RESOURCES The API finished and failed.
1824
1825 -------------------------------------------------------------------------------*/
1826eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1827
1828//some support functions
1829tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1830tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1831tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1832//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1833eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1834
1835typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1836/* ---------------------------------------------------------------------------
1837
1838 \fn sme_ChangeCountryCode
1839
1840 \brief Change Country code from upperlayer during WLAN driver operation.
1841 This is a synchronous API.
1842
1843 \param hHal - The handle returned by macOpen.
1844
1845 \param pCountry New Country Code String
1846
Abhishek Singha306a442013-11-07 18:39:01 +05301847 \param sendRegHint If we want to send reg hint to nl80211
1848
Jeff Johnson295189b2012-06-20 16:38:30 -07001849 \return eHalStatus SUCCESS.
1850
1851 FAILURE or RESOURCES The API finished and failed.
1852
1853 -------------------------------------------------------------------------------*/
1854eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1855 tSmeChangeCountryCallback callback,
1856 tANI_U8 *pCountry,
1857 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301858 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301859 tAniBool countryFromUserSpace,
1860 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001861
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301862/* ---------------------------------------------------------------------------
1863
Amar Singhal0d15bd52013-10-12 23:13:13 -07001864 \fn sme_GenericChangeCountryCode
1865
1866 \brief Generic API to change country code
1867
1868 \param hHal - The handle returned by macOpen.
1869
1870 \param pCountry New Country Code String
1871
1872 \param reg_domain Regulatory domain for the new country code
1873
1874 \return eHalStatus SUCCESS.
1875
1876 FAILURE or RESOURCES The API finished and failed.
1877
1878 -------------------------------------------------------------------------------*/
1879eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1880 tANI_U8 *pCountry,
1881 v_REGDOMAIN_t reg_domain);
1882
Abhishek Singh00b71972016-01-07 10:51:04 +05301883#ifdef WLAN_FEATURE_RMC
1884/* ---------------------------------------------------------------------------
1885
1886 \fn sme_TXFailMonitorStartStopInd
1887
1888 \brief Indicate FW about TX Fail Monitor Indication`
1889
1890 \param hHal - The handle returned by macOpen.
1891
1892 \param tx_fail_count number of failures after which the firmware sends
1893 an indication to host
1894
1895 \param txFailIndCallback function to be called after receiving TX Fail
1896 indication
1897 \return eHalStatus SUCCESS.
1898
1899 FAILURE or RESOURCES The API finished and failed.
1900
1901 -------------------------------------------------------------------------------*/
1902eHalStatus sme_TXFailMonitorStartStopInd(tHalHandle hHal,
1903 tANI_U8 tx_fail_count,
1904 void * txFailIndCallback);
1905#endif /* WLAN_FEATURE_RMC */
1906
Kapil Gupta04ab1992016-06-26 13:36:51 +05301907#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1908VOS_STATUS sme_set_per_roam_rxconfig (tHalHandle hHal, v_U8_t sessionId,
1909 v_U16_t minRate, v_U16_t maxRate, v_U8_t minPercentage,
1910 v_U16_t minPktRequired, v_U64_t waitPeriodForNextPERScan);
1911
1912VOS_STATUS sme_unset_per_roam_rxconfig (tHalHandle hHal);
1913
1914void sme_PERRoamScanStartStop(void *hHal, tANI_U8 start);
1915#endif
1916
Amar Singhal0d15bd52013-10-12 23:13:13 -07001917/* ---------------------------------------------------------------------------
1918
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301919 \fn sme_DHCPStartInd
1920
1921 \brief Indicate FW about DHCP start event.
1922
1923 \param hHal - The handle returned by macOpen.
1924
1925 \param device_mode the mode of the device
1926
c_hpothu0b0cab72014-02-13 21:52:40 +05301927 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301928
1929 \return eHalStatus SUCCESS.
1930
1931 FAILURE or RESOURCES The API finished and failed.
1932
1933 -------------------------------------------------------------------------------*/
1934
1935eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1936 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301937 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301938
1939/* ---------------------------------------------------------------------------
1940
1941 \fn sme_DHCPStopInd
1942
1943 \brief Indicate FW about DHCP stop event.
1944
1945 \param hHal - The handle returned by macOpen.
1946
1947 \param device_mode the mode of the device
1948
c_hpothu0b0cab72014-02-13 21:52:40 +05301949 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301950
1951 \return eHalStatus SUCCESS.
1952
1953 FAILURE or RESOURCES The API finished and failed.
1954
1955 -------------------------------------------------------------------------------*/
1956eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1957 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301958 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301959
Jeff Johnson295189b2012-06-20 16:38:30 -07001960
1961/* ---------------------------------------------------------------------------
1962 \fn sme_BtcSignalBtEvent
1963 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1964 BT event type and the current operating mode of Libra (full power,
1965 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1966 would be employed.
1967 \param hHal - The handle returned by macOpen.
1968 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1969 Caller owns the memory and is responsible for freeing it.
1970 \return VOS_STATUS
1971 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1972 if driver has not yet been initialized or if BTC
1973 Events Layer has been disabled.
1974 VOS_STATUS_SUCCESS BT Event passed to HAL
1975 ---------------------------------------------------------------------------*/
1976VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1977
1978/* ---------------------------------------------------------------------------
1979 \fn sme_BtcSetConfig
1980 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1981 This function should be invoked only after CFG download has completed.
1982 Calling it after sme_HDDReadyInd is recommended.
1983 \param hHal - The handle returned by macOpen.
1984 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1985 tSmeBtcConfig. Caller owns the memory and is responsible
1986 for freeing it.
1987 \return VOS_STATUS
1988 VOS_STATUS_E_FAILURE Config not passed to HAL.
1989 VOS_STATUS_SUCCESS Config passed to HAL
1990 ---------------------------------------------------------------------------*/
1991VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1992
1993/* ---------------------------------------------------------------------------
1994 \fn sme_BtcGetConfig
1995 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1996 \param hHal - The handle returned by macOpen.
1997 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1998 Caller owns the memory and is responsible for freeing it.
1999 \return VOS_STATUS
2000 VOS_STATUS_E_FAILURE - failure
2001 VOS_STATUS_SUCCESS success
2002 ---------------------------------------------------------------------------*/
2003VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
2004
2005/* ---------------------------------------------------------------------------
2006 \fn sme_SetCfgPrivacy
2007 \brief API to set configure privacy parameters
2008 \param hHal - The handle returned by macOpen.
2009 \param pProfile - Pointer CSR Roam profile.
2010 \param fPrivacy - This parameter indicates status of privacy
2011
2012 \return void
2013 ---------------------------------------------------------------------------*/
2014void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
2015
2016#if defined WLAN_FEATURE_VOWIFI
2017/* ---------------------------------------------------------------------------
2018 \fn sme_NeighborReportRequest
2019 \brief API to request neighbor report.
2020 \param hHal - The handle returned by macOpen.
2021 \param pRrmNeighborReq - Pointer to a caller allocated object of type
2022 tRrmNeighborReq. Caller owns the memory and is responsible
2023 for freeing it.
2024 \return VOS_STATUS
2025 VOS_STATUS_E_FAILURE - failure
2026 VOS_STATUS_SUCCESS success
2027 ---------------------------------------------------------------------------*/
2028VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
2029 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
2030#endif
2031
2032//The following are debug APIs to support direct read/write register/memory
2033//They are placed in SME because HW cannot be access when in LOW_POWER state
2034//AND not connected. The knowledge and synchronization is done in SME
2035
2036//sme_DbgReadRegister
2037//Caller needs to validate the input values
2038VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
2039
2040//sme_DbgWriteRegister
2041//Caller needs to validate the input values
2042VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
2043
2044//sme_DbgReadMemory
2045//Caller needs to validate the input values
2046//pBuf caller allocated buffer has the length of nLen
2047VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2048
2049//sme_DbgWriteMemory
2050//Caller needs to validate the input values
2051VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2052
Jeff Johnson295189b2012-06-20 16:38:30 -07002053VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
2054 tSirVersionType *pVersion);
2055VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
2056 tSirVersionType *pVersion);
2057VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
2058 tANI_U8 *pVersion,
2059 tANI_U32 versionBufferSize);
2060VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
2061 tANI_U8 *pVersion,
2062 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07002063eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
2064 csrRoamCompleteCallback callback,
2065 void *pContext);
2066
2067#ifdef FEATURE_WLAN_WAPI
2068/* ---------------------------------------------------------------------------
2069 \fn sme_RoamSetBKIDCache
2070 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
2071 candidate list.
2072 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2073 it is opened (by calling halOpen).
2074 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
2075 \param numItems - a variable that has the number of tBkidCacheInfo allocated
2076 when retruning, this is the number of items put into pBKIDCache
2077 \return eHalStatus - when fail, it usually means the buffer allocated is not
2078 big enough and pNumItems has the number of tBkidCacheInfo.
2079 ---------------------------------------------------------------------------*/
2080eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
2081 tANI_U32 numItems );
2082
2083/* ---------------------------------------------------------------------------
2084 \fn sme_RoamGetBKIDCache
2085 \brief The SME API exposed to HDD to allow HDD to request SME to return its
2086 BKID cache.
2087 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2088 it is opened (by calling halOpen).
2089 \param pNum - caller allocated memory that has the space of the number of
2090 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
2091 in SME cache.
2092 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
2093 upon return
2094 \return eHalStatus - when fail, it usually means the buffer allocated is not
2095 big enough.
2096 ---------------------------------------------------------------------------*/
2097eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
2098 tBkidCacheInfo *pBkidCache);
2099
2100/* ---------------------------------------------------------------------------
2101 \fn sme_RoamGetNumBKIDCache
2102 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2103 number of BKID cache entries.
2104 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2105 it is opened (by calling halOpen).
2106 \return tANI_U32 - the number of BKID cache entries.
2107 ---------------------------------------------------------------------------*/
2108tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2109
2110/* ---------------------------------------------------------------------------
2111 \fn sme_ScanGetBKIDCandidateList
2112 \brief a wrapper function to return the BKID candidate list
2113 \param pBkidList - caller allocated buffer point to an array of
2114 tBkidCandidateInfo
2115 \param pNumItems - pointer to a variable that has the number of
2116 tBkidCandidateInfo allocated when retruning, this is
2117 either the number needed or number of items put into
2118 pPmkidList
2119 \return eHalStatus - when fail, it usually means the buffer allocated is not
2120 big enough and pNumItems
2121 has the number of tBkidCandidateInfo.
2122 \Note: pNumItems is a number of tBkidCandidateInfo,
2123 not sizeof(tBkidCandidateInfo) * something
2124 ---------------------------------------------------------------------------*/
2125eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2126 tBkidCandidateInfo *pBkidList,
2127 tANI_U32 *pNumItems );
2128#endif /* FEATURE_WLAN_WAPI */
2129
Jeff Johnsone7245742012-09-05 17:12:55 -07002130#ifdef FEATURE_OEM_DATA_SUPPORT
2131/********************************************************************************************
2132 Oem data related modifications
2133*********************************************************************************************/
2134/* ---------------------------------------------------------------------------
2135 \fn sme_OemDataReq
2136 \param sessionId - session id of session to be used for oem data req.
2137 \param pOemDataReqID - pointer to an object to get back the request ID
2138 \param callback - a callback function that is called upon finish
2139 \param pContext - a pointer passed in for the callback
2140 \return eHalStatus
2141 ---------------------------------------------------------------------------*/
2142eHalStatus sme_OemDataReq(tHalHandle hHal,
2143 tANI_U8 sessionId,
2144 tOemDataReqConfig *,
2145 tANI_U32 *pOemDataReqID,
2146 oemData_OemDataReqCompleteCallback callback,
2147 void *pContext);
2148
2149/* ---------------------------------------------------------------------------
2150 \fn sme_getOemDataRsp
2151 \param pOemDataRsp - A pointer to the response object
2152 \param pOemDataReqID - pointer to an object to get back the request ID
2153 \return eHalStatus
2154 ---------------------------------------------------------------------------*/
2155eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2156 tOemDataRsp **pOemDataRsp);
2157
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +05302158/* ---------------------------------------------------------------------------
2159 \fn sme_OemDataReqNew
2160 \brief a wrapper function for OEM DATA REQ NEW
2161 \param pOemDataReqNewConfig - Data to be passed to FW
2162 ---------------------------------------------------------------------------*/
2163void sme_OemDataReqNew(tHalHandle hHal,
2164 tOemDataReqNewConfig *pOemDataReqNewConfig);
2165
Jeff Johnsone7245742012-09-05 17:12:55 -07002166#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002167
2168
Jeff Johnson295189b2012-06-20 16:38:30 -07002169
2170/* ---------------------------------------------------------------------------
2171
2172 \fn sme_RoamUpdateAPWPSIE
2173
2174 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2175 This is an asynchronous API.
2176
2177 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2178
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002179 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002180
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002181 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002182
2183 -------------------------------------------------------------------------------*/
2184
2185eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2186/* ---------------------------------------------------------------------------
2187
2188 \fn sme_RoamUpdateAPWPARSNIEs
2189
2190 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2191 This is an asynchronous API.
2192
2193 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2194
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002195 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002196
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002197 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002198
2199 -------------------------------------------------------------------------------*/
2200eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2201
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002202/* ---------------------------------------------------------------------------
2203
2204 sme_ChangeMCCBeaconInterval
2205
2206 \brief To update P2P-GO's beacon Interval.
2207
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002208 \return eHalStatus SUCCESS
2209 FAILURE or RESOURCES
2210 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002211 -------------------------------------------------------------------------------*/
2212eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2213
2214
Jeff Johnson295189b2012-06-20 16:38:30 -07002215
2216/* ---------------------------------------------------------------------------
2217 \fn sme_sendBTAmpEvent
2218 \brief API to send the btAMPstate to FW
2219 \param hHal - The handle returned by macOpen.
2220 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002221 \return eHalStatus SUCCESS
2222 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002223
2224--------------------------------------------------------------------------- */
2225
2226eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2227
2228
2229
2230/* ---------------------------------------------------------------------------
2231 \fn sme_SetHostOffload
2232 \brief API to set the host offload feature.
2233 \param hHal - The handle returned by macOpen.
2234 \param pRequest - Pointer to the offload request.
2235 \return eHalStatus
2236 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002237eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2238 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002239
2240/* ---------------------------------------------------------------------------
2241 \fn sme_SetKeepAlive
2242 \brief API to set the Keep Alive feature.
2243 \param hHal - The handle returned by macOpen.
2244 \param pRequest - Pointer to the Keep Alive request.
2245 \return eHalStatus
2246 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002247eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2248 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002249
Jeff Johnson295189b2012-06-20 16:38:30 -07002250/* ----------------------------------------------------------------------------
2251 \fn sme_GetOperationChannel
2252 \brief API to get current channel on which STA is parked
2253 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002254 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002255 \returns eHAL_STATUS_SUCCESS
2256 eHAL_STATUS_FAILURE
2257-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002258eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002259
Abhishek Singh7d624e12015-11-30 14:29:27 +05302260eHalStatus sme_register_mgmt_frame_ind_callback(tHalHandle hHal,
2261 sir_mgmt_frame_ind_callback callback);
2262
Jeff Johnson295189b2012-06-20 16:38:30 -07002263/* ---------------------------------------------------------------------------
2264
2265 \fn sme_RegisterMgtFrame
2266
2267 \brief To register managment frame of specified type and subtype.
2268 \param frameType - type of the frame that needs to be passed to HDD.
2269 \param matchData - data which needs to be matched before passing frame
2270 to HDD.
2271 \param matchDataLen - Length of matched data.
2272 \return eHalStatus
2273 -------------------------------------------------------------------------------*/
2274eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2275 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2276
2277/* ---------------------------------------------------------------------------
2278
2279 \fn sme_DeregisterMgtFrame
2280
2281 \brief To De-register managment frame of specified type and subtype.
2282 \param frameType - type of the frame that needs to be passed to HDD.
2283 \param matchData - data which needs to be matched before passing frame
2284 to HDD.
2285 \param matchDataLen - Length of matched data.
2286 \return eHalStatus
2287 -------------------------------------------------------------------------------*/
2288eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2289 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302290/* ---------------------------------------------------------------------------
2291 \fn sme_GetFramesLog
2292 \brief a wrapper function that client calls to register a callback to get
2293 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302294 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302295 \return eHalStatus
2296 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302297eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002298/* ---------------------------------------------------------------------------
2299
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302300 \fn sme_InitMgmtFrameLogging
2301
2302 \brief
2303 SME will pass this request to lower mac to initialize Frame Logging.
2304
2305 \param
2306
2307 hHal - The handle returned by macOpen.
2308
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302309 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302310
2311 \return eHalStatus
2312--------------------------------------------------------------------------- */
2313eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302314 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302315
Pragaspathi Thilagarajd1b02df2018-06-26 17:08:05 +05302316/**
2317 * sme_unpack_rsn_ie: wrapper to unpack RSN IE and update def RSN params
2318 * if optional fields are not present.
2319 * @hal: handle returned by mac_open
2320 * @buf: rsn ie buffer pointer
2321 * @buf_len: rsn ie buffer length
2322 * @rsn_ie: outframe rsn ie structure
2323 * @append_ie: flag to indicate if the rsn_ie need to be appended from buf
2324 *
2325 * Return: parse status
2326 */
2327uint32_t sme_unpack_rsn_ie(tHalHandle hal, uint8_t *buf,
2328 uint8_t buf_len, tDot11fIERSN *rsn_ie);
Gupta, Kapil7c34b322015-09-30 13:12:35 +05302329
2330/* ---------------------------------------------------------------------------
2331
2332 \fn sme_StopRssiMonitoring
2333
2334 \brief
2335 SME will pass this request to lower mac to stop monitoring rssi range on
2336 a bssid.
2337
2338 \param
2339
2340 hHal - The handle returned by macOpen.
2341
2342 tSirRssiMonitorReq req- depict the monitor req params.
2343
2344 \return eHalStatus
2345
2346--------------------------------------------------------------------------- */
2347eHalStatus sme_StopRssiMonitoring(tHalHandle hHal,
2348 tSirRssiMonitorReq *req);
2349
2350/* ---------------------------------------------------------------------------
2351
2352 \fn sme_StartRssiMonitoring
2353
2354 \brief
2355 SME will pass this request to lower mac to start monitoring rssi range on
2356 a bssid.
2357
2358 \param
2359
2360 hHal - The handle returned by macOpen.
2361
2362 tSirRssiMonitorReq req- depict the monitor req params.
2363
2364 \return eHalStatus
2365
2366--------------------------------------------------------------------------- */
2367eHalStatus sme_StartRssiMonitoring(tHalHandle hHal,
2368 tSirRssiMonitorReq *req);
2369
2370
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302371/* ---------------------------------------------------------------------------
2372
Jeff Johnson295189b2012-06-20 16:38:30 -07002373 \fn sme_ConfigureRxpFilter
2374
2375 \brief
2376 SME will pass this request to lower mac to set/reset the filter on RXP for
2377 multicast & broadcast traffic.
2378
2379 \param
2380
2381 hHal - The handle returned by macOpen.
2382
2383 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2384 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2385 on this param. In future we can use this as a mask to set various types of
2386 filters as suggested below:
2387 FILTER_ALL_MULTICAST:
2388 FILTER_ALL_BROADCAST:
2389 FILTER_ALL_MULTICAST_BROADCAST:
2390
2391
2392 \return eHalStatus
2393
2394
2395--------------------------------------------------------------------------- */
2396eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2397 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2398
2399/* ---------------------------------------------------------------------------
2400
2401 \fn sme_ConfigureAppsCpuWakeupState
2402
2403 \brief
2404 SME will pass this request to lower mac to dynamically adjusts the listen
2405 interval based on the WLAN/MSM activity. This feature is named as
2406 Telescopic Beacon wakeup feature.
2407
2408 \param
2409
2410 hHal - The handle returned by macOpen.
2411
2412 isAppsAwake- Depicts the state of the Apps CPU
2413
2414
2415 \return eHalStatus
2416
2417
2418--------------------------------------------------------------------------- */
2419eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2420
Jeff Johnson295189b2012-06-20 16:38:30 -07002421/* ---------------------------------------------------------------------------
2422
2423 \fn sme_ConfigureSuspendInd
2424
2425 \brief
2426 SME will pass this request to lower mac to Indicate that the wlan needs to
2427 be suspended
2428
2429 \param
2430
2431 hHal - The handle returned by macOpen.
2432
2433 wlanSuspendParam- Depicts the wlan suspend params
2434
2435
2436 \return eHalStatus
2437
2438
2439--------------------------------------------------------------------------- */
2440eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2441 tpSirWlanSuspendParam wlanSuspendParam);
2442
2443/* ---------------------------------------------------------------------------
2444
2445 \fn sme_ConfigureResumeReq
2446
2447 \brief
2448 SME will pass this request to lower mac to Indicate that the wlan needs to
2449 be Resumed
2450
2451 \param
2452
2453 hHal - The handle returned by macOpen.
2454
2455 wlanResumeParam- Depicts the wlan resume params
2456
2457
2458 \return eHalStatus
2459
2460
2461--------------------------------------------------------------------------- */
2462eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2463 tpSirWlanResumeParam wlanResumeParam);
2464
Jeff Johnson295189b2012-06-20 16:38:30 -07002465
2466/* ---------------------------------------------------------------------------
2467
2468 \fn sme_GetInfraSessionId
2469
2470 \brief To get the session ID for infra session, if connected
2471 This is a synchronous API.
2472
2473 \param hHal - The handle returned by macOpen.
2474
2475 \return sessionid, -1 if infra session is not connected
2476
2477 -------------------------------------------------------------------------------*/
2478tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2479
2480/* ---------------------------------------------------------------------------
2481
2482 \fn sme_GetInfraOperationChannel
2483
2484 \brief To get the operating channel for infra session, if connected
2485 This is a synchronous API.
2486
2487 \param hHal - The handle returned by macOpen.
2488 \param sessionId - the sessionId returned by sme_OpenSession.
2489
2490 \return operating channel, 0 if infra session is not connected
2491
2492 -------------------------------------------------------------------------------*/
2493tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2494/* ---------------------------------------------------------------------------
2495
2496 \fn sme_GetConcurrentOperationChannel
2497
2498 \brief To get the operating channel for other concurrent sessions, if connected
2499 This is a synchronous API.
2500
2501 \param hHal - The handle returned by macOpen.
2502 \param currentPersona - persona that is trying to come up.
2503
2504 \return operating channel, 0 if infra session is not connected
2505
2506 -------------------------------------------------------------------------------*/
2507tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2508
2509/* ---------------------------------------------------------------------------
2510 \fn sme_AbortMacScan
2511 \brief API to cancel MAC scan.
2512 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302513 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302514 \return tSirAbortScanStatus return status abort scan
2515
Jeff Johnson295189b2012-06-20 16:38:30 -07002516 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302517tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2518 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002519
2520/* ---------------------------------------------------------------------------
2521 \fn sme_GetCfgValidChannels
2522 \brief API to get valid channel list
2523 \param hHal - The handle returned by macOpen.
2524 \param aValidChannels - Pointer to the valid channel list
2525 \param len - valid channel list length
2526 \return eHalStatus
2527 ---------------------------------------------------------------------------*/
2528eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2529
2530#ifdef FEATURE_WLAN_SCAN_PNO
2531
2532/* ---------------------------------------------------------------------------
2533 \fn sme_SetPreferredNetworkList
2534 \brief API to set the Preferred Network List Offload feature.
2535 \param hHal - The handle returned by macOpen.
2536 \param pRequest - Pointer to the offload request.
2537 \return eHalStatus
2538 ---------------------------------------------------------------------------*/
2539eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2540
2541/* ---------------------------------------------------------------------------
2542 \fn sme_SetRSSIFilter
2543 \brief API to set RSSI Filter feature.
2544 \param hHal - The handle returned by macOpen.
2545 \param pRequest - Pointer to the offload request.
2546 \return eHalStatus
2547 ---------------------------------------------------------------------------*/
2548eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2549
2550/******************************************************************************
2551*
2552* Name: sme_PreferredNetworkFoundInd
2553*
2554* Description:
2555* Invoke Preferred Network Found Indication
2556*
2557* Parameters:
2558* hHal - HAL handle for device
2559* pMsg - found network description
2560*
2561* Returns: eHalStatus
2562*
2563******************************************************************************/
2564eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2565#endif // FEATURE_WLAN_SCAN_PNO
2566
2567/* ---------------------------------------------------------------------------
2568 \fn sme_SetPowerParams
2569 \brief API to set Power Parameters
2570 \param hHal - The handle returned by macOpen.
2571 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002572 \param forced - if true, not to be dropped silently in host, it must reach
2573 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2574 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002575 \return eHalStatus
2576 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002577eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002578
2579/* ---------------------------------------------------------------------------
2580 \fn sme_SetTxPerTracking
2581 \brief Set Tx PER tracking configuration parameters
2582 \param hHal - The handle returned by macOpen.
2583 \param pTxPerTrackingParam - Tx PER configuration parameters
2584 \return eHalStatus
2585 ---------------------------------------------------------------------------*/
2586eHalStatus sme_SetTxPerTracking (
2587 tHalHandle hHal,
2588 void (*pCallbackfn) (void *pCallbackContext),
2589 void *pCallbackContext,
2590 tpSirTxPerTrackingParam pTxPerTrackingParam);
2591
2592#ifdef WLAN_FEATURE_PACKET_FILTERING
2593/* ---------------------------------------------------------------------------
2594 \fn sme_ReceiveFilterSetFilter
2595 \brief API to set 8023 Multicast Address List
2596 \param hHal - The handle returned by macOpen.
2597 \param pMulticastAddrs - Pointer to the Multicast Address List
2598 \return eHalStatus
2599 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002600eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002601
2602/* ---------------------------------------------------------------------------
2603 \fn sme_ReceiveFilterSetFilter
2604 \brief API to set Receive Packet Filter
2605 \param hHal - The handle returned by macOpen.
2606 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2607 \return eHalStatus
2608 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002609eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2610 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002611
2612/* ---------------------------------------------------------------------------
2613 \fn sme_GetFilterMatchCount
2614 \brief API to get D0 PC Filter Match Count
2615 \param hHal - The handle returned by macOpen
2616 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2617 \param callbackContext - Cookie to be passed back during callback
2618 \return eHalStatus
2619 ---------------------------------------------------------------------------*/
2620eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2621 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002622 void *callbackContext,
2623 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002624
2625/* ---------------------------------------------------------------------------
2626 \fn sme_ReceiveFilterClearFilter
2627 \brief API to clear Receive Packet Filter
2628 \param hHal - The handle returned by macOpen.
2629 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2630 \return eHalStatus
2631 ---------------------------------------------------------------------------*/
2632eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002633 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2634 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002635#endif // WLAN_FEATURE_PACKET_FILTERING
2636/* ---------------------------------------------------------------------------
2637
2638 \fn sme_IsChannelValid
2639 \brief To check if the channel is valid for currently established domain
2640 This is a synchronous API.
2641
2642 \param hHal - The handle returned by macOpen.
2643 \param channel - channel to verify
2644
2645 \return TRUE/FALSE, TRUE if channel is valid
2646
2647 -------------------------------------------------------------------------------*/
2648tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2649
2650/* ---------------------------------------------------------------------------
2651 \fn sme_SetFreqBand
2652 \brief Used to set frequency band.
2653 \param hHal
2654 \eBand band value to be configured
2655 \- return eHalStatus
2656 -------------------------------------------------------------------------*/
2657eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2658
2659/* ---------------------------------------------------------------------------
2660 \fn sme_GetFreqBand
2661 \brief Used to get the current band settings.
2662 \param hHal
2663 \pBand pointer to hold the current band value
2664 \- return eHalStatus
2665 -------------------------------------------------------------------------*/
2666eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2667
2668/* ---------------------------------------------------------------------------
2669
2670 \fn sme_SetTxPerTracking
2671 \brief Set Tx PER tracking configuration parameters
2672 \param hHal - The handle returned by macOpen.
2673 \param pTxPerTrackingParam - Tx PER configuration parameters
2674 \return eHalStatus
2675 ---------------------------------------------------------------------------*/
2676eHalStatus sme_SetTxPerTracking (
2677 tHalHandle hHal,
2678 void (*pCallbackfn) (void *pCallbackContext),
2679 void *pCallbackContext,
2680 tpSirTxPerTrackingParam pTxPerTrackingParam);
2681
2682#ifdef WLAN_FEATURE_GTK_OFFLOAD
2683/* ---------------------------------------------------------------------------
2684 \fn sme_SetGTKOffload
2685 \brief API to set GTK offload feature.
2686 \param hHal - The handle returned by macOpen.
2687 \param pRequest - Pointer to the GTK offload request.
2688 \return eHalStatus
2689 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002690eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002691
2692/* ---------------------------------------------------------------------------
2693 \fn sme_GetGTKOffload
2694 \brief API to get GTK offload information.
2695 \param hHal - The handle returned by macOpen.
2696 \param pRequest - Pointer to the GTK offload response.
2697 \return eHalStatus
2698 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002699eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2700 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002701#endif // WLAN_FEATURE_GTK_OFFLOAD
2702
2703#ifdef WLAN_WAKEUP_EVENTS
2704eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2705#endif // WLAN_WAKEUP_EVENTS
2706
2707/* ---------------------------------------------------------------------------
2708 \fn sme_SetTxPerTracking
2709 \brief Set Tx PER tracking configuration parameters
2710 \param hHal - The handle returned by macOpen.
2711 \param pTxPerTrackingParam - Tx PER configuration parameters
2712 \return eHalStatus
2713 ---------------------------------------------------------------------------*/
2714eHalStatus sme_SetTxPerTracking (
2715 tHalHandle hHal,
2716 void (*pCallbackfn) (void *pCallbackContext),
2717 void *pCallbackContext,
2718 tpSirTxPerTrackingParam pTxPerTrackingParam);
2719
2720
2721//return frequency for a particular channel
2722tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2723
2724tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2725
2726#if defined WLAN_FEATURE_P2P_INTERNAL
2727
2728eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2729
2730/* ---------------------------------------------------------------------------
2731 \fn sme_p2pFlushDeviceList
2732 \brief Remove cached P2P result from scan results
2733 \param hHal - The handle returned by macOpen.
2734 \param HDDSessionId - HDD's sessionId. Currently unused.
2735 \return eHalStatus
2736 ---------------------------------------------------------------------------*/
2737eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2738
2739eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2740 tCsrScanResultFilter *pFilter);
2741
2742#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2743
2744/* ---------------------------------------------------------------------------
2745 \fn sme_SetMaxTxPower
2746 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2747 setting will not persist over reboots
2748 \param hHal
2749 \param pBssid BSSID to set the power cap for
2750 \param pBssid pSelfMacAddress self MAC Address
2751 \param pBssid power to set in dB
2752 \- return eHalStatus
2753 -------------------------------------------------------------------------*/
2754eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2755 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2756
Padma, Santhosh Kumar98b5d252016-10-17 17:30:41 +05302757/**
2758 * sme_SetMaxTxPowerPerBand() - Set the Maximum Transmit Power
2759 * specific to band dynamically
2760 * @band: Band for which power needs to be applied
2761 * @dB: power to set in dB
2762 * @hal: HAL handle
2763 *
2764 * Set the maximum transmit power dynamically per band
2765 *
2766 * Return: eHalStatus
2767 */
2768eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t dB,
2769 tHalHandle hal);
Arif Hussaina5ebce02013-08-09 15:09:58 -07002770
2771/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002772
schang86c22c42013-03-13 18:41:24 -07002773 \fn sme_SetTxPower
2774
2775 \brief Set Transmit Power dynamically. Note: this setting will
2776 not persist over reboots.
2777
2778 \param hHal
2779 \param sessionId Target Session ID
2780 \param mW power to set in mW
2781 \- return eHalStatus
2782
2783 -------------------------------------------------------------------------------*/
2784eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2785
2786/* ---------------------------------------------------------------------------
2787
Jeff Johnson295189b2012-06-20 16:38:30 -07002788 \fn sme_HideSSID
2789
2790 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2791 not persist over reboots.
2792
2793 \param hHal
2794 \param sessionId
2795 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2796 \- return eHalStatus
2797
2798 -------------------------------------------------------------------------------*/
2799eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002800
2801/* ---------------------------------------------------------------------------
2802
2803 \fn sme_SetTmLevel
2804 \brief Set Thermal Mitigation Level to RIVA
2805 \param hHal - The handle returned by macOpen.
2806 \param newTMLevel - new Thermal Mitigation Level
2807 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002808 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002809 ---------------------------------------------------------------------------*/
2810eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2811
Rajeev Kumar Sirasanagandla4c068d42019-02-22 21:39:36 +05302812/**
2813 * sme_featureCapsExchange() - SME API to get firmware feature caps
2814 * @params: Pointer to hold HDD callback to be invoked for response
2815 * and associated user data.
2816 *
2817 * This function is used to exchange capabilities between Host and FW.
2818 *
2819 * Return: VOS_STATUS
2820 */
2821VOS_STATUS
2822sme_featureCapsExchange(struct sir_feature_caps_params *params);
Jeff Johnson295189b2012-06-20 16:38:30 -07002823
Jeff Johnsond13512a2012-07-17 11:42:19 -07002824/*---------------------------------------------------------------------------
2825
Yathish9f22e662012-12-10 14:21:35 -08002826 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2827 between in Host.
2828
2829 \param hHal - HAL handle for device
2830
2831 \return NONE
2832
2833---------------------------------------------------------------------------*/
2834void sme_disableFeatureCapablity(tANI_U8 feature_index);
2835
2836/*---------------------------------------------------------------------------
2837
Jeff Johnsond13512a2012-07-17 11:42:19 -07002838 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2839 country code
2840 Host and FW.
2841
2842 \param hHal - HAL handle for device
2843 \param pCountry - pointer to country code
2844
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002845 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002846
2847 ---------------------------------------------------------------------------*/
2848eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2849
2850/*---------------------------------------------------------------------------
2851
2852 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2853 country code.
2854
2855 \param hHal - HAL handle for device
2856 \param pCountry - pointer to country code
2857
2858 \return Success or failure
2859
2860 ---------------------------------------------------------------------------*/
2861eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2862
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002863/* ---------------------------------------------------------------------------
2864 \fn sme_transportDebug
2865 \brief Dynamically monitoring Transport channels
2866 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002867 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002868 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002869 \param toggleStallDetect Enable stall detect feature
2870 This feature will take effect to data performance
2871 Not integrate till fully verification
2872 \- return NONE
2873 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002874void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002875
Kiran4a17ebe2013-01-31 10:43:43 -08002876/* ---------------------------------------------------------------------------
2877 \fn sme_ResetPowerValuesFor5G
2878 \brief Reset the power values for 5G band with NV power values.
2879 \param hHal - HAL handle for device
2880 \- return NONE
2881 -------------------------------------------------------------------------*/
2882void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2883
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002884#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002885/* ---------------------------------------------------------------------------
2886 \fn sme_UpdateRoamPrefer5GHz
2887 \brief enable/disable Roam prefer 5G runtime option
2888 This function is called through dynamic setConfig callback function
2889 to configure the Roam prefer 5G runtime option
2890 \param hHal - HAL handle for device
2891 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2892 \- return Success or failure
2893 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002894eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002895
2896/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002897 \fn sme_setRoamIntraBand
2898 \brief enable/disable Intra band roaming
2899 This function is called through dynamic setConfig callback function
2900 to configure the intra band roaming
2901 \param hHal - HAL handle for device
2902 \param nRoamIntraBand Enable/Disable Intra band roaming
2903 \- return Success or failure
2904 -------------------------------------------------------------------------*/
2905eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2906
2907/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002908 \fn sme_UpdateRoamScanNProbes
2909 \brief function to update roam scan N probes
2910 This function is called through dynamic setConfig callback function
2911 to update roam scan N probes
2912 \param hHal - HAL handle for device
2913 \param nProbes number of probe requests to be sent out
2914 \- return Success or failure
2915 -------------------------------------------------------------------------*/
2916eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2917
2918/* ---------------------------------------------------------------------------
2919 \fn sme_UpdateRoamScanHomeAwayTime
2920 \brief function to update roam scan Home away time
2921 This function is called through dynamic setConfig callback function
2922 to update roam scan home away time
2923 \param hHal - HAL handle for device
2924 \param nRoamScanAwayTime Scan home away time
2925 \- return Success or failure
2926 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002927eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2928 const v_U16_t nRoamScanHomeAwayTime,
2929 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002930
2931/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002932 \fn sme_getRoamIntraBand
2933 \brief get Intra band roaming
2934 \param hHal - HAL handle for device
2935 \- return Success or failure
2936 -------------------------------------------------------------------------*/
2937v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2938
2939/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002940 \fn sme_getRoamScanNProbes
2941 \brief get N Probes
2942 \param hHal - HAL handle for device
2943 \- return Success or failure
2944 -------------------------------------------------------------------------*/
2945v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2946
2947/* ---------------------------------------------------------------------------
2948 \fn sme_getRoamScanHomeAwayTime
2949 \brief get Roam scan home away time
2950 \param hHal - HAL handle for device
2951 \- return Success or failure
2952 -------------------------------------------------------------------------*/
2953v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2954
2955/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002956 \fn sme_UpdateImmediateRoamRssiDiff
2957 \brief Update nImmediateRoamRssiDiff
2958 This function is called through dynamic setConfig callback function
2959 to configure nImmediateRoamRssiDiff
2960 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2961 \param hHal - HAL handle for device
2962 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2963 candidate and current AP.
2964 \- return Success or failure
2965 -------------------------------------------------------------------------*/
2966
2967eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002968
Srinivas Girigowdade697412013-02-14 16:31:48 -08002969/* ---------------------------------------------------------------------------
2970 \fn sme_UpdateRoamRssiDiff
2971 \brief Update RoamRssiDiff
2972 This function is called through dynamic setConfig callback function
2973 to configure RoamRssiDiff
2974 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2975 \param hHal - HAL handle for device
2976 \param RoamRssiDiff - minimum rssi difference between potential
2977 candidate and current AP.
2978 \- return Success or failure
2979 -------------------------------------------------------------------------*/
2980
2981eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2982
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002983/*--------------------------------------------------------------------------
2984 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2985 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2986 isFastTransitionEnabled.
2987 This is a synchronuous call
2988 \param hHal - The handle returned by macOpen.
2989 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2990 Other status means SME is failed to update isFastTransitionEnabled.
2991 \sa
2992 --------------------------------------------------------------------------*/
2993
2994eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2995 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002996
2997/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002998 \fn sme_UpdateWESMode
2999 \brief Update WESMode
3000 This function is called through dynamic setConfig callback function
3001 to configure isWESModeEnabled
3002 \param hHal - HAL handle for device
3003 \param isWESModeEnabled - Enable/Disable WES Mode
3004 \- return Success or failure
3005 -------------------------------------------------------------------------*/
3006eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
3007
3008/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003009 \fn sme_SetRoamScanControl
3010 \brief Set roam scan control
3011 This function is called to set roam scan control
3012 if roam scan control is set to 0, roaming scan cache is cleared
3013 any value other than 0 is treated as invalid value
3014 \param hHal - HAL handle for device
3015 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3016 Other status means SME failure to update
3017 -------------------------------------------------------------------------*/
3018eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003019#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003020
3021#ifdef FEATURE_WLAN_LFR
3022/*--------------------------------------------------------------------------
3023 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08003024 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003025 isFastRoamIniFeatureEnabled.
3026 This is a synchronuous call
3027 \param hHal - The handle returned by macOpen.
3028 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
3029 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
3030 \sa
3031 --------------------------------------------------------------------------*/
3032
Srinivas Girigowdade697412013-02-14 16:31:48 -08003033eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003034 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003035
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003036/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05303037 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
3038 When Supplicant issue enabled / disable fwr based roaming on the basis
3039 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
3040
3041 This is a synchronous call
3042 \param hHal - The handle returned by macOpen.
3043 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
3044 Other status means SME is failed to (enabled/disabled) offload scan.
3045 \sa
3046 --------------------------------------------------------------------------*/
3047
3048eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
3049 const v_BOOL_t isFastRoamEnabled);
3050
3051/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003052 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
3053 Enable/disable LFR MAWC support at runtime
3054 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3055 isMAWCIniFeatureEnabled.
3056 This is a synchronous call
3057 \param hHal - The handle returned by macOpen.
3058 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
3059 Other status means SME is failed to update MAWCEnabled.
3060 \sa
3061 --------------------------------------------------------------------------*/
3062eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
3063 const v_BOOL_t MAWCEnabled);
3064
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003065
3066#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3067/*--------------------------------------------------------------------------
3068 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
3069 This is a synchronuous call
3070 \param hHal - The handle returned by macOpen.
3071 \return eHAL_STATUS_SUCCESS
3072 Other status means SME is failed
3073 \sa
3074 --------------------------------------------------------------------------*/
3075
3076eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
3077 v_BOOL_t bFastRoamInConIniFeatureEnabled);
3078#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003079#endif /* FEATURE_WLAN_LFR */
3080
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003081#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003082/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003083 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003084 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003085 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003086 This is a synchronuous call
3087 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003088 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
3089 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003090 \sa
3091 --------------------------------------------------------------------------*/
3092
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003093eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
3094 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003095
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003096#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003097
3098/*--------------------------------------------------------------------------
3099 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
3100 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3101 fEnableFwRssiMonitoring.
3102 This is a synchronuous call
3103 \param hHal - The handle returned by macOpen.
3104 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
3105 Other status means SME is failed to update
3106 \sa
3107 --------------------------------------------------------------------------*/
3108
3109eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
3110 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08003111
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003112#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08003113/*--------------------------------------------------------------------------
3114 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
3115 This is a synchronuous call
3116 \param hHal - The handle returned by macOpen.
3117 \return eHAL_STATUS_SUCCESS - SME update config successful.
3118 Other status means SME is failed to update
3119 \sa
3120 --------------------------------------------------------------------------*/
3121eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
3122 v_U8_t neighborLookupRssiThreshold);
3123
3124/*--------------------------------------------------------------------------
3125 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
3126 This is a synchronuous call
3127 \param hHal - The handle returned by macOpen.
3128 \return eHAL_STATUS_SUCCESS - SME update config successful.
3129 Other status means SME is failed to update
3130 \sa
3131 --------------------------------------------------------------------------*/
3132eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
3133 v_U8_t neighborReassocRssiThreshold);
3134
3135/*--------------------------------------------------------------------------
3136 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
3137 This is a synchronuous call
3138 \param hHal - The handle returned by macOpen.
3139 \return eHAL_STATUS_SUCCESS - SME update config successful.
3140 Other status means SME is failed to update
3141 \sa
3142 --------------------------------------------------------------------------*/
3143v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
3144
3145/*--------------------------------------------------------------------------
3146 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
3147 This is a synchronuous call
3148 \param hHal - The handle returned by macOpen.
3149 \return eHAL_STATUS_SUCCESS - SME update config successful.
3150 Other status means SME is failed to update
3151 \sa
3152 --------------------------------------------------------------------------*/
3153eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
3154 v_U16_t neighborScanResultsRefreshPeriod);
3155
3156/*--------------------------------------------------------------------------
3157 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
3158 This is a synchronuous call
3159 \param hHal - The handle returned by macOpen.
3160 \return eHAL_STATUS_SUCCESS - SME update config successful.
3161 Other status means SME is failed to update
3162 \sa
3163 --------------------------------------------------------------------------*/
3164v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
3165
3166/*--------------------------------------------------------------------------
3167 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3168 This is a synchronuous call
3169 \param hHal - The handle returned by macOpen.
3170 \return eHAL_STATUS_SUCCESS - SME update config successful.
3171 Other status means SME is failed to update
3172 \sa
3173 --------------------------------------------------------------------------*/
3174v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3175
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003176/* ---------------------------------------------------------------------------
3177 \fn sme_UpdateEmptyScanRefreshPeriod
3178 \brief Update nEmptyScanRefreshPeriod
3179 This function is called through dynamic setConfig callback function
3180 to configure nEmptyScanRefreshPeriod
3181 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3182 \param hHal - HAL handle for device
3183 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3184 \- return Success or failure
3185 -------------------------------------------------------------------------*/
3186eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3187
3188/* ---------------------------------------------------------------------------
3189 \fn sme_setNeighborScanMinChanTime
3190 \brief Update nNeighborScanMinChanTime
3191 This function is called through dynamic setConfig callback function
3192 to configure gNeighborScanChannelMinTime
3193 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3194 \param hHal - HAL handle for device
3195 \param nNeighborScanMinChanTime - Channel minimum dwell time
3196 \- return Success or failure
3197 -------------------------------------------------------------------------*/
3198eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3199
3200/* ---------------------------------------------------------------------------
3201 \fn sme_setNeighborScanMaxChanTime
3202 \brief Update nNeighborScanMaxChanTime
3203 This function is called through dynamic setConfig callback function
3204 to configure gNeighborScanChannelMaxTime
3205 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3206 \param hHal - HAL handle for device
3207 \param nNeighborScanMinChanTime - Channel maximum dwell time
3208 \- return Success or failure
3209 -------------------------------------------------------------------------*/
3210eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3211
3212/* ---------------------------------------------------------------------------
3213 \fn sme_getNeighborScanMinChanTime
3214 \brief get neighbor scan min channel time
3215 \param hHal - The handle returned by macOpen.
3216 \return v_U16_t - channel min time value
3217 -------------------------------------------------------------------------*/
3218v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3219
3220/* ---------------------------------------------------------------------------
3221 \fn sme_getNeighborScanMaxChanTime
3222 \brief get neighbor scan max channel time
3223 \param hHal - The handle returned by macOpen.
3224 \return v_U16_t - channel max time value
3225 -------------------------------------------------------------------------*/
3226v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3227
3228/* ---------------------------------------------------------------------------
3229 \fn sme_setNeighborScanPeriod
3230 \brief Update nNeighborScanPeriod
3231 This function is called through dynamic setConfig callback function
3232 to configure nNeighborScanPeriod
3233 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3234 \param hHal - HAL handle for device
3235 \param nNeighborScanPeriod - neighbor scan period
3236 \- return Success or failure
3237 -------------------------------------------------------------------------*/
3238eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3239
3240/* ---------------------------------------------------------------------------
3241 \fn sme_getNeighborScanPeriod
3242 \brief get neighbor scan period
3243 \param hHal - The handle returned by macOpen.
3244 \return v_U16_t - neighbor scan period
3245 -------------------------------------------------------------------------*/
3246v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3247
3248#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003249
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003250#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003251/*--------------------------------------------------------------------------
3252 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3253 This is a synchronuous call
3254 \param hHal - The handle returned by macOpen.
3255 \return eHAL_STATUS_SUCCESS - SME update config successful.
3256 Other status means SME is failed to update
3257 \sa
3258 --------------------------------------------------------------------------*/
3259v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3260
3261/*--------------------------------------------------------------------------
3262 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3263 This is a synchronuous call
3264 \param hHal - The handle returned by macOpen.
3265 \return eHAL_STATUS_SUCCESS - SME update config successful.
3266 Other status means SME is failed to update
3267 \sa
3268 --------------------------------------------------------------------------*/
3269eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3270 tANI_U8 numChannels);
3271
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003272#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003273/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003274 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003275 This is a synchronuous call
3276 \param hHal - The handle returned by macOpen.
3277 \return eHAL_STATUS_SUCCESS - SME update config successful.
3278 Other status means SME is failed to update
3279 \sa
3280 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003281eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003282 tANI_U8 *pChannelList,
3283 tANI_U8 numChannels);
3284#endif
3285
Srinivas Girigowdade697412013-02-14 16:31:48 -08003286/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003287 \brief sme_getRoamScanChannelList() - get roam scan channel list
3288 This is a synchronuous call
3289 \param hHal - The handle returned by macOpen.
3290 \return eHAL_STATUS_SUCCESS - SME update config successful.
3291 Other status means SME is failed to update
3292 \sa
3293 --------------------------------------------------------------------------*/
3294eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3295 tANI_U8 *pNumChannels);
3296
3297/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003298 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003299 This is a synchronuous call
3300 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003301 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003302 FALSE (0) - if feature is disabled (compile or runtime)
3303 \sa
3304 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003305tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003306
3307/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003308 \brief sme_getWESMode() - getWES Mode
3309 This is a synchronous call
3310 \param hHal - The handle returned by macOpen.
3311 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3312 \sa
3313 --------------------------------------------------------------------------*/
3314v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3315
3316/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003317 \brief sme_GetRoamScanControl() - get scan control
3318 This is a synchronous call
3319 \param hHal - The handle returned by macOpen.
3320 \return v_BOOL_t - Enabled(1)/Disabled(0)
3321 \sa
3322 --------------------------------------------------------------------------*/
3323v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3324
3325/* ---------------------------------------------------------------------------
3326 \fn sme_UpdateEmptyScanRefreshPeriod
3327 \brief Update nnEmptyScanRefreshPeriod
3328 This function is called through dynamic setConfig callback function
3329 to configure nnEmptyScanRefreshPeriod
3330 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3331 \param hHal - HAL handle for device
3332 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3333 \- return Success or failure
3334 -------------------------------------------------------------------------*/
3335
3336/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003337 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3338 This is a synchronuous call
3339 \param hHal - The handle returned by macOpen.
3340 \return TRUE (1) - if the feature is enabled
3341 FALSE (0) - if feature is disabled (compile or runtime)
3342 \sa
3343 --------------------------------------------------------------------------*/
3344tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3345
3346/*--------------------------------------------------------------------------
3347 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3348 This is a synchronuous call
3349 \param hHal - The handle returned by macOpen.
3350 \return TRUE (1) - if the feature is enabled
3351 FALSE (0) - if feature is disabled (compile or runtime)
3352 \sa
3353 --------------------------------------------------------------------------*/
3354tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3355
Srinivas Girigowdade697412013-02-14 16:31:48 -08003356#endif
3357
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003358#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3359/*--------------------------------------------------------------------------
3360 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3361 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3362 gRoamScanOffloadEnabled.
3363 This is a synchronous call
3364 \param hHal - The handle returned by macOpen.
3365 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3366 Other status means SME is failed to update.
3367 \sa
3368 --------------------------------------------------------------------------*/
3369
3370eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3371#endif
3372
c_manjeecfd1efb2015-09-25 19:32:34 +05303373eHalStatus sme_FwMemDumpReq(tHalHandle hHal, tAniFwrDumpReq *recv_req);
3374
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003375
Srinivas Girigowdade697412013-02-14 16:31:48 -08003376/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003377 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303378 \brief Check if a feature is enabled by FW
3379
3380 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003381 A value from enum placeHolderInCapBitmap
3382
3383 \- return 1/0 (TRUE/FALSE)
3384 -------------------------------------------------------------------------*/
3385tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303386
3387/* ---------------------------------------------------------------------------
3388 \fn sme_IsFeatureSupportedByDriver
3389 \brief Check if a feature is enabled by driver
3390
3391 \param featEnumValue - Enumeration value of the feature to be checked.
3392 A value from enum placeHolderInCapBitmap
3393
3394 \- return 1/0 (TRUE/FALSE)
3395 -------------------------------------------------------------------------*/
3396tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3397
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003398#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303399
3400/* ---------------------------------------------------------------------------
3401 \fn sme_SendTdlsLinkEstablishParams
3402 \brief API to send TDLS Link Establishment Parameters.
3403
3404 \param peerMac - peer's Mac Adress.
3405 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3406 \- return VOS_STATUS_SUCCES
3407 -------------------------------------------------------------------------*/
3408
3409VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303410 tANI_U8 sessionId,
3411#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3412 const tSirMacAddr peerMac,
3413#else
3414 tSirMacAddr peerMac,
3415#endif
3416 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303417
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003418/* ---------------------------------------------------------------------------
3419 \fn sme_SendTdlsMgmtFrame
3420 \brief API to send TDLS management frames.
3421
3422 \param peerMac - peer's Mac Adress.
3423 \param frame_type - Type of TDLS mgmt frame to be sent.
3424 \param dialog - dialog token used in the frame.
3425 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303426 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003427 \param buf - additional IEs to be included
3428 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003429 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003430 \- return VOS_STATUS_SUCCES
3431 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303432VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3433#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3434 const tSirMacAddr peerMac,
3435#else
3436 tSirMacAddr peerMac,
3437#endif
3438 tANI_U8 frame_type, tANI_U8 dialog,
3439 tANI_U16 status, tANI_U32 peerCapability,
3440 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003441/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003442 \fn sme_ChangeTdlsPeerSta
3443 \brief API to Update TDLS peer sta parameters.
3444
3445 \param peerMac - peer's Mac Adress.
3446 \param staParams - Peer Station Parameters.
3447 \- return VOS_STATUS_SUCCES
3448 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303449VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3450#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3451 const tSirMacAddr peerMac,
3452#else
3453 tSirMacAddr peerMac,
3454#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003455 tCsrStaParams *pstaParams);
3456/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003457 \fn sme_AddTdlsPeerSta
3458 \brief API to Add TDLS peer sta entry.
3459
3460 \param peerMac - peer's Mac Adress.
3461 \- return VOS_STATUS_SUCCES
3462 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303463VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3464#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3465 const tSirMacAddr peerMac
3466#else
3467 tSirMacAddr peerMac
3468#endif
3469 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003470/* ---------------------------------------------------------------------------
3471 \fn sme_DeleteTdlsPeerSta
3472 \brief API to Delete TDLS peer sta entry.
3473
3474 \param peerMac - peer's Mac Adress.
3475 \- return VOS_STATUS_SUCCES
3476 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303477VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3478#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3479 const tSirMacAddr peerMac
3480#else
3481 tSirMacAddr peerMac
3482#endif
3483 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003484/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003485 \fn sme_SetTdlsPowerSaveProhibited
3486 \API to set/reset the isTdlsPowerSaveProhibited.
3487
3488 \- return void
3489 -------------------------------------------------------------------------*/
3490void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003491#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303492/* ---------------------------------------------------------------------------
3493 \fn sme_IsPmcBmps
3494 \brief API to Check if PMC state is BMPS.
3495
3496 \- return v_BOOL_t
3497 -------------------------------------------------------------------------*/
3498v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3499
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003500eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003501
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303502/* ---------------------------------------------------------------------------
3503 \fn sme_UpdateDFSRoamMode
3504 \brief Update DFS roam scan mode
3505 This function is called to configure allowDFSChannelRoam
3506 dynamically
3507 \param hHal - HAL handle for device
3508 \param allowDFSChannelRoam - DFS roaming scan mode
3509 mode 0 disable roam scan on DFS channels
3510 mode 1 enables roam scan (passive/active) on DFS channels
3511 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3512 successfully.
3513 Other status means SME failed to update DFS roaming scan config.
3514 \sa
3515 -------------------------------------------------------------------------*/
3516eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3517
3518/* ---------------------------------------------------------------------------
3519 \fn sme_UpdateDFSScanMode
3520 \brief Update DFS scan mode
3521 This function is called to configure fEnableDFSChnlScan.
3522 \param hHal - HAL handle for device
3523 \param dfsScanMode - DFS scan mode
3524 mode 0 disable scan on DFS channels
3525 mode 1 enables passive scan on DFS channels
3526 mode 2 enables active scan on DFS channels for static list
3527 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3528 successfully.
3529 Other status means SME failed to update DFS scan config.
3530 \sa
3531 -------------------------------------------------------------------------*/
3532eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3533
3534/*--------------------------------------------------------------------------
3535 \brief sme_GetDFSScanMode() - get DFS scan mode
3536 \param hHal - The handle returned by macOpen.
3537 \return DFS scan mode
3538 mode 0 disable scan on DFS channels
3539 mode 1 enables passive scan on DFS channels
3540 mode 2 enables active scan on DFS channels for static list
3541 \sa
3542 --------------------------------------------------------------------------*/
3543v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3544
3545/* ---------------------------------------------------------------------------
3546 \fn sme_HandleDFSChanScan
3547 \brief Gets Valid channel list and updates scan control list according to
3548 dfsScanMode
3549 \param hHal - HAL handle for device
3550 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3551 Otherwise eHAL_STATUS_SUCCESS -
3552 \sa
3553 -------------------------------------------------------------------------*/
3554eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3555
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003556/*
3557 * SME API to enable/disable WLAN driver initiated SSR
3558 */
3559void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3560
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303561/* ---------------------------------------------------------------------------
3562
3563 \fn sme_SetPhyMode
3564
3565 \brief Changes the PhyMode.
3566
3567 \param hHal - The handle returned by macOpen.
3568
3569 \param phyMode new phyMode which is to set
3570
3571 \return eHalStatus SUCCESS.
3572
3573 -------------------------------------------------------------------------------*/
3574eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3575
3576/* ---------------------------------------------------------------------------
3577
3578 \fn sme_GetPhyMode
3579
3580 \brief gets current PhyMode.
3581
3582 \param hHal - The handle returned by macOpen.
3583
3584 \return eHalStatus PhyMode
3585
3586 -------------------------------------------------------------------------------*/
3587eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3588
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003589/*
3590 * SME API to determine the channel bonding mode
3591 */
Abhishek Singh02b823e2017-10-30 17:53:20 +05303592VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
3593 tANI_U8 channel, enum eSirMacHTChannelWidth max_bw);
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003594
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003595#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3596/*--------------------------------------------------------------------------
3597 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3598 from CSR.
3599 This is a synchronous call
3600 \param hHal - The handle returned by macOpen
3601 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3602 BSSID, channel etc.)
3603 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3604 Other status means SME is failed to send the request.
3605 \sa
3606 --------------------------------------------------------------------------*/
3607
3608eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3609#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003610/*--------------------------------------------------------------------------
3611 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3612 is any connected session .
3613 This is a synchronous call
3614 \param hHal - The handle returned by macOpen
3615 \return VOS_STATUS - SME passed the request to CSR successfully.
3616 Other status means SME is failed to send the request.
3617 \sa
3618 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003619VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003620
Agarwal Ashish57e84372014-12-05 18:26:53 +05303621/*--------------------------------------------------------------------------
3622 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3623 is any connected session .
3624 This is a synchronous call
3625 \param hHal - The handle returned by macOpen
3626 \return VOS_STATUS - SME passed the request to CSR successfully.
3627 Other status means SME is failed to send the request.
3628 \sa
3629 --------------------------------------------------------------------------*/
3630VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3631
Leo Chang9056f462013-08-01 19:21:11 -07003632#ifdef FEATURE_WLAN_LPHB
3633/* ---------------------------------------------------------------------------
3634 \fn sme_LPHBConfigReq
3635 \API to make configuration LPHB within FW.
3636 \param hHal - The handle returned by macOpen
3637 \param lphdReq - LPHB request argument by client
3638 \param pCallbackfn - LPHB timeout notification callback function pointer
3639 \- return Configuration message posting status, SUCCESS or Fail
3640 -------------------------------------------------------------------------*/
3641eHalStatus sme_LPHBConfigReq(
3642 tHalHandle hHal,
3643 tSirLPHBReq *lphdReq,
3644 void (*pCallbackfn)(void *pAdapter, void *indParam));
3645#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003646
3647/* ---------------------------------------------------------------------------
3648 \fn sme_AddPeriodicTxPtrn
3649 \brief API to Periodic TX Pattern Offload feature
3650 \param hHal - The handle returned by macOpen
3651 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3652 \return eHalStatus
3653 ---------------------------------------------------------------------------*/
3654eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3655 *addPeriodicTxPtrnParams);
3656
3657/* ---------------------------------------------------------------------------
3658 \fn sme_DelPeriodicTxPtrn
3659 \brief API to Periodic TX Pattern Offload feature
3660 \param hHal - The handle returned by macOpen
3661 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3662 \return eHalStatus
3663 ---------------------------------------------------------------------------*/
3664eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3665 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003666/*--------------------------------------------------------------------------
3667 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3668 scan parameter.
3669 This is a synchronous call
3670 \param hHal - The handle returned by macOpen
3671 \return None.
3672 \sa
3673 --------------------------------------------------------------------------*/
3674void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3675 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303676
Abhishek Singh00b71972016-01-07 10:51:04 +05303677#ifdef WLAN_FEATURE_RMC
3678/* ---------------------------------------------------------------------------
3679 \fn sme_EnableRMC
3680 \brief Used to enable RMC
3681 setting will not persist over reboots
3682 \param hHal
3683 \param sessionId
3684 \- return eHalStatus
3685 -------------------------------------------------------------------------*/
3686eHalStatus sme_EnableRMC(tHalHandle hHal, tANI_U32 sessionId);
3687
3688/* ---------------------------------------------------------------------------
3689 \fn sme_DisableRMC
3690 \brief Used to disable RMC
3691 setting will not persist over reboots
3692 \param hHal
3693 \param sessionId
3694 \- return eHalStatus
3695 -------------------------------------------------------------------------*/
3696eHalStatus sme_DisableRMC(tHalHandle hHal, tANI_U32 sessionId);
3697#endif /* WLAN_FEATURE_RMC */
3698
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003699/* ---------------------------------------------------------------------------
3700 \fn sme_SendRateUpdateInd
3701 \brief API to Update rate
3702 \param hHal - The handle returned by macOpen
3703 \param rateUpdateParams - Pointer to rate update params
3704 \return eHalStatus
3705 ---------------------------------------------------------------------------*/
3706eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3707
Abhishek Singh00b71972016-01-07 10:51:04 +05303708#ifdef WLAN_FEATURE_RMC
3709/* ---------------------------------------------------------------------------
3710 \fn sme_GetIBSSPeerInfo
3711 \brief Used to disable RMC
3712 setting will not persist over reboots
3713 \param hHal
3714 \param ibssPeerInfoReq multicast Group IP address
3715 \- return eHalStatus
3716 -------------------------------------------------------------------------*/
3717eHalStatus sme_RequestIBSSPeerInfo(tHalHandle hHal, void *pUserData,
3718 pIbssPeerInfoCb peerInfoCbk,
3719 tANI_BOOLEAN allPeerInfoReqd,
3720 tANI_U8 staIdx);
3721#endif /* WLAN_FEATURE_RMC */
3722
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303723/*
3724 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3725 * triggers
3726 * return status
3727*/
3728eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3729 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303730 tSmeFastRoamTrigger fastRoamTrig,
3731 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303732
3733eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303734#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
Abhinav Kumar8c122592019-08-07 15:43:20 +05303735 tPmkidCacheInfo *pmksa,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303736#else
Abhinav Kumar8c122592019-08-07 15:43:20 +05303737 tPmkidCacheInfo *pmksa,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303738#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303739 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003740
3741void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303742
3743#ifdef FEATURE_WLAN_BATCH_SCAN
3744/* ---------------------------------------------------------------------------
3745 \fn sme_SetBatchScanReq
3746 \brief API to set batch scan request in FW
3747 \param hHal - The handle returned by macOpen.
3748 \param pRequest - Pointer to the batch request.
3749 \param sessionId - session ID
3750 \param callbackRoutine - HDD callback which needs to be invoked after
3751 getting set batch scan response from FW
3752 \param callbackContext - pAdapter context
3753 \return eHalStatus
3754 ---------------------------------------------------------------------------*/
3755eHalStatus
3756sme_SetBatchScanReq
3757(
3758 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3759 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3760 void *callbackContext
3761);
3762
3763/* ---------------------------------------------------------------------------
3764 \fn sme_TriggerBatchScanResultInd
3765 \brief API to trigger batch scan result indications from from FW
3766 \param hHal - The handle returned by macOpen.
3767 \param pRequest - Pointer to get batch request.
3768 \param sessionId - session ID
3769 \param callbackRoutine - HDD callback which needs to be invoked after
3770 getting get batch scan response from FW
3771 \param callbackContext - pAdapter context
3772 \return eHalStatus
3773 ---------------------------------------------------------------------------*/
3774eHalStatus
3775sme_TriggerBatchScanResultInd
3776(
3777 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3778 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3779 void *callbackContext
3780);
3781
3782/* ---------------------------------------------------------------------------
3783 \fn sme_StopBatchScanInd
3784 \brief API to stop batch scan request in FW
3785 \param hHal - The handle returned by macOpen.
3786 \param pRequest - Pointer to stop batch indication
3787 \return eHalStatus
3788 ---------------------------------------------------------------------------*/
3789eHalStatus
3790sme_StopBatchScanInd
3791(
3792 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3793);
3794
3795#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003796
3797#ifdef FEATURE_WLAN_CH_AVOID
3798/* ---------------------------------------------------------------------------
3799 \fn sme_AddChAvoidCallback
3800 \brief Used to plug in callback function
3801 Which notify channel may not be used with SAP or P2PGO mode.
3802 Notification come from FW.
3803 \param hHal
3804 \param pCallbackfn : callback function pointer should be plugged in
3805 \- return eHalStatus
3806 -------------------------------------------------------------------------*/
3807eHalStatus sme_AddChAvoidCallback
3808(
3809 tHalHandle hHal,
3810 void (*pCallbackfn)(void *pAdapter, void *indParam)
3811);
3812#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003813eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303814
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303815/* ---------------------------------------------------------------------------
3816 \fn sme_requestTypetoString
3817 \brief API to convert requestType enum values
3818 to string.
3819 ---------------------------------------------------------------------------*/
3820const char * sme_requestTypetoString(const v_U8_t requestType);
3821/* ---------------------------------------------------------------------------
3822 \fn sme_PmcStatetoString
3823 \brief API to convert PmcState enum values
3824 to string.
3825 ---------------------------------------------------------------------------*/
3826const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303827
3828eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3829
Agarwal Ashish5e414792014-06-08 15:25:23 +05303830tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303831
3832// tdlsoffchan
3833VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3834 tANI_U8 sessionId,
3835 tSirMacAddr peerMac,
3836 tANI_S32 tdlsOffCh,
3837 tANI_S32 tdlsOffChBwOffset,
3838 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303839eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3840 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303841void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303842
3843void sme_resetCoexEevent(tHalHandle hHal);
3844
Peng Xu117eab42014-09-25 13:33:27 +05303845tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3846tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303847#ifdef WLAN_FEATURE_AP_HT40_24G
3848void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3849 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303850eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3851 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303852#endif
Peng Xu117eab42014-09-25 13:33:27 +05303853
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303854eHalStatus sme_set_rssi_threshold_breached_cb(tHalHandle hal,
3855 void (*cb)(void *, struct rssi_breach_event *));
3856
Agarwal Ashish738843c2014-09-25 12:27:56 +05303857void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3858
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303859/* HDD Callback function */
3860typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3861
3862eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3863 u8 *pCmd,
3864 int length,
3865 pEncryptMsgRSPCb encCB);
3866
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303867/* ---------------------------------------------------------------------------
3868 \fn sme_RegisterBtCoexTDLSCallback
3869 \brief Used to plug in callback function
3870 Which notify btcoex on or off.
3871 Notification come from FW.
3872 \param hHal
3873 \param pCallbackfn : callback function pointer should be plugged in
3874 \- return eHalStatus
3875 -------------------------------------------------------------------------*/
3876eHalStatus sme_RegisterBtCoexTDLSCallback
3877(
3878 tHalHandle hHal,
3879 void (*pCallbackfn)(void *pAdapter, int)
3880);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303881
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303882/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303883 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303884
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303885 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303886
3887 \param hHal - The handle returned by macOpen.
3888
3889 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3890 eANI_BOOLEAN_FALSE otherwise
3891---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303892tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303893
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303894/* ---------------------------------------------------------------------------
3895
3896 \fn sme_IsTdlsOffChannelValid
3897 \brief To check if the channel is valid for currently established domain
3898 This is a synchronous API.
3899
3900 \param hHal - The handle returned by macOpen.
3901 \param channel - channel to verify
3902
3903 \return TRUE/FALSE, TRUE if channel is valid
3904
3905 -------------------------------------------------------------------------------*/
3906tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3907
Mukul Sharma4be88422015-03-09 20:29:07 +05303908/* --------------------------------------------------------------------------
3909
3910 \fn sme_IsCoexScoIndicationSet
3911 \brief To check if the BTC module in fwr has sent the SCO
3912 indication to host or not
3913
3914 \param hHal - The handle returned by macOpen.
3915 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3916
3917 --------------------------------------------------------------------------*/
3918tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3919
Abhishek Singh01c73d12015-03-12 15:13:44 +05303920eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3921 tANI_U32 iniNumBuffAdvert,
3922 tANI_U32 set_value);
3923
Mukul Sharma45063942015-04-01 20:07:59 +05303924void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303925
3926/* ---------------------------------------------------------------------------
3927 \fn sme_SetTdls2040BSSCoexistence
3928 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3929
3930 \param isEnabled - Enable or Disable.
3931 \- return VOS_STATUS_SUCCES
3932 -------------------------------------------------------------------------*/
3933eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3934
Abhishek Singh41988ba2015-05-25 19:42:29 +05303935/* ---------------------------------------------------------------------------
3936 \fn sme_SetRtsCtsHtVht
3937 \brief API to to enable/disable RTS/CTS for different modes.
3938
3939 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3940 \- return VOS_STATUS_SUCCES if INdication is posted to
3941 WDA else return eHAL_STATUS_FAILURE
3942 -------------------------------------------------------------------------*/
3943eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3944
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303945tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
Agrawal Ashish842eea82016-02-04 17:56:16 +05303946 tANI_U8 fcc_constraint,
3947 v_U32_t scan_pending);
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303948
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303949eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303950eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
Abhishek Singh837adf22015-10-01 17:37:37 +05303951 tANI_U32 indicator, tANI_U32 reason_code,
3952 tANI_BOOLEAN dump_vos_trace);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303953
Mahesh A Saptasagarbeca12c2015-09-07 16:21:06 +05303954eHalStatus sme_enableDisableChanAvoidIndEvent(tHalHandle hHal,
3955 tANI_U8 set_value);
3956
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303957/* ---------------------------------------------------------------------------
3958 \fn sme_set_wificonfig_params
3959 \brief API to set WifiConfiguration Parameters.
3960
3961 \param wifi_config_param - Wificonfig parameter 1.Averaging factor 2. Guard time
3962 \- return VOS_STATUS_SUCCES if INdication is posted to
3963 WDA else return eHAL_STATUS_FAILURE
3964 -------------------------------------------------------------------------*/
3965
3966eHalStatus sme_set_wificonfig_params(tHalHandle hHal, tSetWifiConfigParams *req);
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +05303967eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
3968 tANI_U32 *regInfo1, tANI_U32 *regInfo2);
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05303969eHalStatus sme_GetCurrentAntennaIndex(tHalHandle hHal,
3970 tCsrAntennaIndexCallback callback,
3971 void *pContext, tANI_U8 sessionId);
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303972
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05303973eHalStatus sme_setBcnMissPenaltyCount(tHalHandle hHal,
3974 tModifyRoamParamsReqParams *params);
Abhishek Singhbfb3c9e2016-07-22 11:25:43 +05303975eHalStatus sme_remove_bssid_from_scan_list(tHalHandle hal,
3976 tSirMacAddr bssid);
Agrawal Ashish0552be02016-03-02 18:03:43 +05303977void sme_set_mgmt_frm_via_wq5(tHalHandle hHal,
3978 tANI_BOOLEAN sendMgmtPktViaWQ5);
mukul sharma6b53e202016-11-23 19:29:18 +05303979eHalStatus sme_update_cfg_int_param(tHalHandle hHal, tANI_U32 cfg_id);
Kapil Gupta3d923fb2016-12-20 18:59:27 +05303980
3981#ifdef WLAN_FEATURE_APFIND
3982VOS_STATUS sme_apfind_set_cmd(struct sme_ap_find_request_req *input);
3983#endif /* WLAN_FEATURE_APFIND */
3984
Agrawal Ashish17ef5082016-10-17 18:33:21 +05303985#ifdef SAP_AUTH_OFFLOAD
3986/**
3987 * sme_set_sap_auth_offload() enable/disable SAP Auth Offload
3988 * @hHal: hal layer handler
3989 * @sap_auth_offload_info: the information of SAP Auth Offload
3990 *
3991 * This function provide enable/disable SAP authenticaiton offload
3992 * feature on target firmware
3993 *
3994 * Return: eHalStatus.
3995 */
3996eHalStatus sme_set_sap_auth_offload(tHalHandle hHal,
3997 struct tSirSapOffloadInfo *sap_auth_offload_info);
3998
3999#endif /* SAP_AUTH_OFFLOAD */
Anurag Chouhan83026002016-12-13 22:46:21 +05304000#ifdef DHCP_SERVER_OFFLOAD
4001eHalStatus sme_set_dhcp_srv_offload(tHalHandle hal,
Anurag Chouhan0b29de02016-12-16 13:18:40 +05304002 sir_dhcp_srv_offload_info_t *dhcp_srv_info);
Anurag Chouhan83026002016-12-13 22:46:21 +05304003#endif /* DHCP_SERVER_OFFLOAD */
4004
Anurag Chouhan0b29de02016-12-16 13:18:40 +05304005#ifdef MDNS_OFFLOAD
4006eHalStatus sme_set_mdns_offload(tHalHandle hal,
4007 sir_mdns_offload_info_t *mdns_info);
4008
4009eHalStatus sme_set_mdns_fqdn(tHalHandle hal,
4010 sir_mdns_fqdn_info_t *mdns_fqdn);
4011
4012eHalStatus sme_set_mdns_resp(tHalHandle hal,
4013 sir_mdns_resp_info_t *mdns_resp);
4014#endif /* MDNS_OFFLOAD */
Ravi Kumar bokka7d032762016-12-12 23:33:01 +05304015
4016eHalStatus sme_update_hb_threshold(tHalHandle hHal, tANI_U32 cfgId,
4017 tANI_U8 hbThresh, eCsrBand eBand);
Manjeet Singh3ed79242017-01-11 19:04:32 +05304018
4019eHalStatus sme_capture_tsf_req(tHalHandle hHal,
4020 tSirCapTsfParams capTsfParams);
4021
4022eHalStatus sme_get_tsf_req(tHalHandle hHal,
4023 tSirCapTsfParams capTsfParams);
4024
4025eHalStatus sme_set_tsfcb(tHalHandle hHal,
4026 tsf_rsp_cb rsp_cb, struct stsf *pTsf,
4027 void *pcallbackcontext);
4028
Anurag Chouhan6ee81542017-02-09 18:09:27 +05304029/* ARP DEBUG STATS */
4030eHalStatus sme_set_nud_debug_stats(tHalHandle hHal,
4031 psetArpStatsParams pSetStatsParam);
4032eHalStatus sme_get_nud_debug_stats(tHalHandle hHal,
4033 pgetArpStatsParams pGetStatsParam);
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05304034eHalStatus sme_del_sta_ba_session_req(tHalHandle hHal,
4035 tDelBaParams sta_del_params);
Abhishek Singh02605092017-10-25 14:06:12 +05304036/**
4037 * sme_roam_csa_ie_request() - request CSA IE transmission from PE
4038 * @hal: handle returned by mac_open
4039 * @bssid: SAP bssid
4040 * @new_chan: target channel information
4041 * @phy_mode: SAP phymode
Abhishek Singh02b823e2017-10-30 17:53:20 +05304042 * @sme_session_id: sme session id
Abhishek Singh02605092017-10-25 14:06:12 +05304043 *
4044 * Return: VOS_STATUS
4045 */
4046VOS_STATUS sme_roam_csa_ie_request(tHalHandle hal, tCsrBssid bssid,
Abhishek Singh02b823e2017-10-30 17:53:20 +05304047 uint8_t new_chan, uint32_t phy_mode,
4048 uint8_t sme_session_id);
Abhishek Singh02605092017-10-25 14:06:12 +05304049
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304050/**
4051 * sme_roam_channel_change_req() - Channel change to new target channel
4052 * @hal: handle returned by mac_open
4053 * @bssid: SAP bssid
4054 * @new_chan: target channel information
4055 * @profile: roam profile
Abhishek Singh02b823e2017-10-30 17:53:20 +05304056 * @sme_session_id: sme session id
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304057 *
4058 * API to Indicate Channel change to new target channel
4059 *
4060 * Return: VOS_STATUS
4061 */
4062VOS_STATUS sme_roam_channel_change_req(tHalHandle hal, tCsrBssid bssid,
Abhishek Singh02b823e2017-10-30 17:53:20 +05304063 uint8_t new_chan, tCsrRoamProfile *profile,
4064 uint8_t sme_session_id);
Abhishek Singh78c691f2017-11-30 13:48:44 +05304065/**
4066 * sme_get_connect_strt_time() - get the connection start time
4067 * @hal: hal context
4068 * @session_id: session id
4069 *
4070 * Return: void.
4071 */
4072v_TIME_t sme_get_connect_strt_time(tHalHandle hal,
4073 uint8_t session_id);
4074
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304075
Abhishek Singhe8ebb922017-11-01 13:30:26 +05304076/**
4077 * sme_get_cb_phy_mode_from_cb_ini_mode() - convert ini CB value to Phy CB val
4078 * @cb_ini_value: ini value of cb mode
4079 *
4080 * Return: phy CB val
4081 */
4082static inline ePhyChanBondState
4083sme_get_cb_phy_mode_from_cb_ini_mode(uint32_t cb_ini_value)
4084{
4085 return csrConvertCBIniValueToPhyCBState(cb_ini_value);
4086}
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304087
Yeshwanth Sriram Guntukab973f1c2018-03-29 19:35:49 +05304088/**
4089 * sme_request_imps() - Send IMPS request
4090 * @hal: hal context
4091 *
4092 * Return: void
4093 */
4094void sme_request_imps(tHalHandle hal);
4095
Vignesh Viswanathan0ac8e562018-06-14 17:24:10 +05304096
4097/**
4098 * sme_is_sta_key_exchange_in_progress() - checks whether the STA/P2P client
4099 * session has key exchange in progress
4100 *
4101 * @hal: global hal handle
4102 * @session_id: session id
4103 *
4104 * Return: true - if key exchange in progress
4105 * false - if not in progress
4106 */
4107bool sme_is_sta_key_exchange_in_progress(tHalHandle hal, uint8_t session_id);
Abhinav Kumarc00a7842018-06-13 16:07:31 +05304108/**
4109 * sme_process_msg_callback() - process callback message from LIM
4110 * @hal: global hal handle
4111 * @msg: vos message
4112 *
4113 * This function process the callback messages from LIM.
4114 *
4115 * Return: VOS_STATUS enumeration.
4116 */
4117VOS_STATUS sme_process_msg_callback(tHalHandle hal, vos_msg_t *msg);
4118
Abhinav Kumar8eed0362019-08-05 14:26:07 +05304119/**
4120 * sme_send_mgmt_tx() - Sends mgmt frame from CSR to LIM
4121 * @hal: The handle returned by mac_open
4122 * @session_id: session id
4123 * @buf: pointer to frame
4124 * @len: frame length
4125 *
4126 * Return: eHalStatus
4127 */
4128eHalStatus sme_send_mgmt_tx(tHalHandle hal, uint8_t session_id,
4129 const uint8_t *buf, uint32_t len);
4130
Dundi Raviteja7e7cdeb2020-09-17 21:32:59 +05304131#ifdef FEATURE_WLAN_SW_PTA
4132/**
4133 * sme_teardown_link_with_ap() - indicates teardown link with AP
4134 * @mac: mac context
4135 * @session_id: session id
4136 *
4137 * Return: eHalStatus
4138 */
4139eHalStatus sme_teardown_link_with_ap(tpAniSirGlobal mac, uint8_t session_id);
4140#endif
4141
Abhinav Kumard9664da2019-08-05 17:11:25 +05304142#ifdef WLAN_FEATURE_SAE
4143/**
4144 * sme_handle_sae_msg() - Sends SAE message received from supplicant
4145 * @hal: The handle returned by mac_open
4146 * @session_id: session id
4147 * @sae_status: status of SAE authentication
Pankaj Singh6e549ab2020-06-05 02:26:41 +05304148 * @peer_mac_addr: mac address of the peer to be authenticated
Abhinav Kumard9664da2019-08-05 17:11:25 +05304149 *
4150 * Return: HAL_STATUS
4151 */
4152eHalStatus sme_handle_sae_msg(tHalHandle hal, uint8_t session_id,
Pankaj Singh6e549ab2020-06-05 02:26:41 +05304153 uint8_t sae_status,
4154 tSirMacAddr peer_mac_addr);
Abhinav Kumard9664da2019-08-05 17:11:25 +05304155#else
4156static inline eHalStatus sme_handle_sae_msg(tHalHandle hal, uint8_t session_id,
Pankaj Singh6e549ab2020-06-05 02:26:41 +05304157 uint8_t sae_status,
4158 tSirMacAddr peer_mac_addr)
Abhinav Kumard9664da2019-08-05 17:11:25 +05304159{
4160 return eHAL_STATUS_SUCCESS;
4161}
4162#endif
4163
Ajit Vaishya1d5e41a2020-04-18 18:36:11 +05304164#define MAX_BSSID_AVOID_LIST 16
4165
4166struct roam_ext_params {
4167 uint8_t blacklist_timedout;
4168 uint8_t num_bssid_avoid_list;
4169 v_MACADDR_t bssid_avoid_list[MAX_BSSID_AVOID_LIST];
4170};
4171
Ajit Vaishya19ce45d2020-04-18 19:11:04 +05304172/**
4173 * sme_UpdateBlacklist() - Send blacklist bssid received from user space
4174 * @hal: The handle returned by mac_open
4175 * @session_id: session id
4176 * @roam_ext_params: list of blacklist Bssid
4177 *
4178 * Return: HAL_STATUS
4179 */
4180eHalStatus sme_UpdateBlacklist(tHalHandle hHal, uint8_t session_id,
4181 struct roam_ext_params *roam_params);
Sourav Mohapatra6334d0b2020-05-27 12:16:05 +05304182
4183/**
4184 * sme_update_olpc_mode() - Send OLPC mode command received from user space
4185 * @hal: The handle returned by mac_open
4186 * @enable: OLPC mode enable/disable
4187 *
4188 * Return: HAL_STATUS
4189 */
4190eHalStatus sme_update_olpc_mode(tHalHandle hHal, bool enable);
4191
Dundi Raviteja453d6f92020-09-16 11:54:27 +05304192#ifdef FEATURE_WLAN_SW_PTA
4193/**
4194 * sme_sw_pta_req() - Send sw pta coex params request to sme
4195 * @hal: The handle returned by mac_open
4196 * @resp_callback: callback to indicate sw pta response to hdd
4197 * @session_id: session id
Dundi Raviteja1982ed42020-11-05 17:25:57 +05304198 * @bt_enabled: BT status
4199 * @bt_adv: BT advertisement status
4200 * @ble_enabled: BLE status
4201 * @bt_a2dp: BT A2DP status
4202 * @bt_sco: BT SCO status
Dundi Raviteja453d6f92020-09-16 11:54:27 +05304203 *
4204 * Return: HAL_STATUS
4205 */
4206eHalStatus sme_sw_pta_req(tHalHandle hal,
4207 void (*resp_callback)(uint8_t resp_status),
Dundi Raviteja1982ed42020-11-05 17:25:57 +05304208 uint8_t session_id, bool bt_enabled, bool bt_adv,
4209 bool ble_enabled, bool bt_a2dp, bool bt_sco);
Dundi Raviteja453d6f92020-09-16 11:54:27 +05304210#endif /* FEATURE_WLAN_SW_PTA */
Jeff Johnson295189b2012-06-20 16:38:30 -07004211#endif //#if !defined( __SME_API_H )