blob: d8defd9eb5bd08c807de2dd977296c6b3726fe16 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Siddharth Bhald8a95e82015-02-12 20:14:52 +05302 * Copyright (c) 2012-2015 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 ------------------------------------------------------------------------*/
49#include "ccmApi.h"
50#include "csrApi.h"
51#include "pmcApi.h"
52#include "vos_mq.h"
53#include "vos_lock.h"
54#include "halTypes.h"
55#include "sirApi.h"
56#include "btcApi.h"
57#include "vos_nvitem.h"
58#include "p2p_Api.h"
Sushant Kaushik83392fa2015-05-05 17:44:40 +053059#include "smeInternal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070060
Jeff Johnsone7245742012-09-05 17:12:55 -070061#ifdef FEATURE_OEM_DATA_SUPPORT
62#include "oemDataApi.h"
63#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070064
65#if defined WLAN_FEATURE_VOWIFI
66#include "smeRrmInternal.h"
67#endif
Srinivas Dasari030bad32015-02-18 23:23:54 +053068#include "nan_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070069
70/*--------------------------------------------------------------------------
71 Preprocessor definitions and constants
72 ------------------------------------------------------------------------*/
73
74#define SME_SUMMARY_STATS 1
75#define SME_GLOBAL_CLASSA_STATS 2
76#define SME_GLOBAL_CLASSB_STATS 4
77#define SME_GLOBAL_CLASSC_STATS 8
78#define SME_GLOBAL_CLASSD_STATS 16
79#define SME_PER_STA_STATS 32
80
81#define SME_INVALID_COUNTRY_CODE "XX"
82
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070083//Macro to disable split scan
84#define SME_DISABLE_SPLIT_SCAN 255
Padma, Santhosh Kumar859d3712014-11-13 18:00:41 +053085
86//Macro to indicate invalid no of tspecs
87#define INVALID_TSPEC 100
88
Jeff Johnson295189b2012-06-20 16:38:30 -070089/*--------------------------------------------------------------------------
90 Type declarations
91 ------------------------------------------------------------------------*/
92typedef struct _smeConfigParams
93{
94 tCsrConfigParam csrConfig;
95#if defined WLAN_FEATURE_VOWIFI
96 tRrmConfigParam rrmConfig;
97#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070098#if defined FEATURE_WLAN_LFR
99 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800100 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700101#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800102#if defined FEATURE_WLAN_ESE
103 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700104#endif
105#if defined WLAN_FEATURE_P2P_INTERNAL
106 tP2PConfigParam p2pConfig;
107#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800108#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700109 tANI_U8 isFastTransitionEnabled;
110 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700111 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700112#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530113 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700114 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800115 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530116 tANI_U32 fDeferIMPSTime;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +0530117 tANI_U8 fBtcEnableIndTimerVal;
Jeff Johnson295189b2012-06-20 16:38:30 -0700118} tSmeConfigParams, *tpSmeConfigParams;
119
Sunil Duttc69bccb2014-05-26 21:30:20 +0530120#ifdef WLAN_FEATURE_LINK_LAYER_STATS
121
122/* ---------------------------------------------------------------------------
123 \fn sme_LLStatsSetReq
124 \brief API to set link layer stats request to FW
125 \param hHal - The handle returned by macOpen.
126
127 \Param pStatsReq - a pointer to a caller allocated object of
128 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
129 stats set.
130
131 \return eHalStatus
132 ---------------------------------------------------------------------------*/
133eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
134
135/* ---------------------------------------------------------------------------
136 \fn sme_LLStatsGetReq
137 \brief API to get link layer stats request to FW
138 \param hHal - The handle returned by macOpen.
139
140 \Param pStatsReq - a pointer to a caller allocated object of
141 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
142 stats get.
143
144 \return eHalStatus
145 ---------------------------------------------------------------------------*/
146eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
147
148/* ---------------------------------------------------------------------------
149 \fn sme_LLStatsClearReq
150 \brief API to clear link layer stats request to FW
151 \param hHal - The handle returned by macOpen.
152
153 \Param pStatsReq - a pointer to a caller allocated object of
154 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
155 stats clear.
156
157 \return eHalStatus
158 ---------------------------------------------------------------------------*/
159eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
160
161/* ---------------------------------------------------------------------------
162 \fn sme_SetLinkLayerStatsIndCB
163 \brief API to trigger Link Layer stats result indications from from FW
164 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530165 \param callbackRoutine - HDD callback which needs to be invoked after
166 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530167 \return eHalStatus
168 ---------------------------------------------------------------------------*/
169eHalStatus
170sme_SetLinkLayerStatsIndCB
171(
Dino Mycled3d50022014-07-07 12:58:25 +0530172 tHalHandle hHal,
173 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
174 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530175);
176
177
178#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
179
Dino Mycle2c198072014-06-10 10:15:52 +0530180#ifdef WLAN_FEATURE_EXTSCAN
181/* ---------------------------------------------------------------------------
182 \fn sme_GetValidChannelsByBand
183 \brief SME API to fetch all valid channel filtered by band
184 \param hHal
185 \param wifiBand: RF band information
186 \param aValidChannels: Array to store channel info
187 \param len: number of channels
188 \- return eHalStatus
189 -------------------------------------------------------------------------*/
190eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
191 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
192
193/* ---------------------------------------------------------------------------
194 \fn sme_EXTScanGetCapabilities
195 \brief SME API to fetch Extented Scan capabilities
196 \param hHal
197 \param pReq: Extented Scan capabilities structure
198 \- return eHalStatus
199 -------------------------------------------------------------------------*/
200eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
201 tSirGetEXTScanCapabilitiesReqParams *pReq);
202
203/* ---------------------------------------------------------------------------
204 \fn sme_EXTScanStart
205 \brief SME API to issue Extented Scan start
206 \param hHal
207 \param pStartCmd: Extented Scan start structure
208 \- return eHalStatus
209 -------------------------------------------------------------------------*/
210eHalStatus sme_EXTScanStart (tHalHandle hHal,
211 tSirEXTScanStartReqParams *pStartCmd);
212
213/* ---------------------------------------------------------------------------
214 \fn sme_EXTScanStop
215 \brief SME API to issue Extented Scan stop
216 \param hHal
217 \param pStopReq: Extented Scan stop structure
218 \- return eHalStatus
219 -------------------------------------------------------------------------*/
220eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
221
222/* ---------------------------------------------------------------------------
223 \fn sme_SetBssHotlist
224 \brief SME API to set BSSID hotlist
225 \param hHal
226 \param pSetHotListReq: Extented Scan set hotlist structure
227 \- return eHalStatus
228 -------------------------------------------------------------------------*/
229eHalStatus sme_SetBssHotlist (tHalHandle hHal,
230 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
231
232/* ---------------------------------------------------------------------------
233 \fn sme_ResetBssHotlist
234 \brief SME API to reset BSSID hotlist
235 \param hHal
236 \param pSetHotListReq: Extented Scan set hotlist structure
237 \- return eHalStatus
238 -------------------------------------------------------------------------*/
239eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
240 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
241
242/* ---------------------------------------------------------------------------
243 \fn sme_SetSignificantChange
244 \brief SME API to set significant change
245 \param hHal
246 \param pSetSignificantChangeReq: Extented Scan set significant
247 change structure
248 \- return eHalStatus
249 -------------------------------------------------------------------------*/
250eHalStatus sme_SetSignificantChange (tHalHandle hHal,
251 tSirEXTScanSetSignificantChangeReqParams* pSetSignificantChangeReq);
252
253/* ---------------------------------------------------------------------------
254 \fn sme_ResetSignificantChange
255 \brief SME API to reset significant change
256 \param hHal
257 \param pResetReq: Extented Scan reset significant change structure
258 \- return eHalStatus
259 -------------------------------------------------------------------------*/
260eHalStatus sme_ResetSignificantChange (tHalHandle hHal,
261 tSirEXTScanResetSignificantChangeReqParams *pResetReq);
262
263/* ---------------------------------------------------------------------------
264 \fn sme_getCachedResults
265 \brief SME API to get cached results
266 \param hHal
267 \param pCachedResultsReq: Extented Scan get cached results structure
268 \- return eHalStatus
269 -------------------------------------------------------------------------*/
270eHalStatus sme_getCachedResults (tHalHandle hHal,
271 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
272
273/* ---------------------------------------------------------------------------
274 \fn sme_EXTScanRegisterCallback
275 \brief SME API to register Extented Scan notification callback
276 \param pEXTScanIndCb
277 \- return void
278 -------------------------------------------------------------------------*/
279eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
280 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
281 void *);
282
283#endif /* WLAN_FEATURE_EXTSCAN */
Siddharth Bhald8a95e82015-02-12 20:14:52 +0530284/* ---------------------------------------------------------------------------
285 \fn sme_SpoofMacAddrReq
286 \brief SME API to send Spoof Mac Addr req to HAL
287 \param macaddr: mac address to be sent
288 \- return eHalStatus
289 -------------------------------------------------------------------------*/
290eHalStatus sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530291
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530292typedef enum
293{
294 eSME_ROAM_TRIGGER_NONE = 0,
295 eSME_ROAM_TRIGGER_SCAN = 1,
296 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
297 eSME_ROAM_TRIGGER_MAX
298} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700299
300/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530301 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700302 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700303/*--------------------------------------------------------------------------
304
305 \brief sme_Open() - Initialze all SME modules and put them at idle state
306
307 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
308 successfully return, all modules are at idle state ready to start.
309
310 smeOpen must be called before any other SME APIs can be involved.
311 smeOpen must be called after macOpen.
312
313 \param hHal - The handle returned by macOpen.
314
315 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
316
317 Other status means SME is failed to be initialized
318 \sa
319
320 --------------------------------------------------------------------------*/
321eHalStatus sme_Open(tHalHandle hHal);
322
323/*--------------------------------------------------------------------------
324
325 \brief sme_Close() - Release all SME modules and their resources.
326
327 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
328 return, all modules are at closed state.
329
330 No SME APIs can be involved after sme_Close except sme_Open.
331 sme_Close must be called before macClose.
332
333 \param hHal - The handle returned by macOpen.
334
335 \return eHAL_STATUS_SUCCESS - SME is successfully close.
336
337 Other status means SME is failed to be closed but caller still cannot
338 call any other SME functions except smeOpen.
339 \sa
340
341 --------------------------------------------------------------------------*/
342eHalStatus sme_Close(tHalHandle hHal);
343
344/*--------------------------------------------------------------------------
Hema Aparna Medicharlaa6cf65e2015-06-01 16:23:28 +0530345
346 \brief sme_PreClose() - Stop SME resources prior to final sme_Stop.
347
348 The function stops resources in SME, PMC, CCM, CSR, etc. as needed
349 to handle fast closure during SSR/unload-load cases.
350
351 \param hHal - The handle returned by macOpen.
352 \return v_VOID_t
353
354 \sa
355
356 --------------------------------------------------------------------------*/
357v_VOID_t sme_PreClose(tHalHandle hHal);
358
359/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700360
361 \brief sme_Start() - Put all SME modules at ready state.
362
363 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
364 successfully return, all modules are ready to run.
365
366 \param hHal - The handle returned by macOpen.
367
368 \return eHAL_STATUS_SUCCESS - SME is ready.
369
370 Other status means SME is failed to start.
371 \sa
372
373 --------------------------------------------------------------------------*/
374eHalStatus sme_Start(tHalHandle hHal);
375
376/*--------------------------------------------------------------------------
377
378 \brief sme_Stop() - Stop all SME modules and put them at idle state
379
380 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
381 return, all modules are at idle state ready to start.
382
383
384 \param hHal - The handle returned by macOpen.
385
Kiet Lama72a2322013-11-15 11:18:11 +0530386 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700387
388 \return eHAL_STATUS_SUCCESS - SME is stopped.
389
390 Other status means SME is failed to stop but caller should still consider
391 SME is stopped.
392 \sa
393
394 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530395eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700396
397
398/*--------------------------------------------------------------------------
399
400 \brief sme_OpenSession() - Open a session for scan/roam operation.
401
402 This is a synchronous API.
403
404
405 \param hHal - The handle returned by macOpen.
406 \param callback - A pointer to the function caller specifies for roam/connect status indication
407 \param pContext - The context passed with callback
408 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
409 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
410
411 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
412
413 Other status means SME is failed to open the session.
414 eHAL_STATUS_RESOURCES - no more session available.
415 \sa
416
417 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700418eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
419 void *pContext, tANI_U8 *pSelfMacAddr,
420 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700421
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700422/*--------------------------------------------------------------------------
423
424 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
425 \param hHal - The handle returned by macOpen.
426 \param currDeviceMode - Current operating device mode.
427 --------------------------------------------------------------------------*/
428
429void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700430
431/*--------------------------------------------------------------------------
432
433 \brief sme_CloseSession() - Open a session for scan/roam operation.
434
435 This is a synchronous API.
436
Jeff Johnson295189b2012-06-20 16:38:30 -0700437 \param hHal - The handle returned by macOpen.
438
439 \param sessionId - A previous opened session's ID.
mukul sharmabab477d2015-06-11 17:14:55 +0530440
441 \param bPurgeSmeCmdList - Whether sme cmd list purging is required or not.
442 TRUE -Purging require FALSE - Purging not require
443
Jeff Johnson295189b2012-06-20 16:38:30 -0700444 \return eHAL_STATUS_SUCCESS - session is closed.
445
446 Other status means SME is failed to open the session.
447 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
448 \sa
mukul sharmabab477d2015-06-11 17:14:55 +0530449
450
Jeff Johnson295189b2012-06-20 16:38:30 -0700451 --------------------------------------------------------------------------*/
452eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
mukul sharmabab477d2015-06-11 17:14:55 +0530453 tANI_U8 bPurgeSmeCmdList,
454 csrRoamSessionCloseCallback callback,
455 void *pContext);
456/*--------------------------------------------------------------------------
457
458 \brief sme_PurgeCmdList() - Purge all the sme cmd list
459
460 This is a synchronous API.
Jeff Johnson295189b2012-06-20 16:38:30 -0700461
462
mukul sharmabab477d2015-06-11 17:14:55 +0530463 \param hHal - The handle returned by macOpen.
464
465 \param sessionId - A previous opened session's ID.
466
467--------------------------------------------------------------------------*/
468
469eHalStatus sme_PurgeCmdList(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700470
471/*--------------------------------------------------------------------------
472
473 \brief sme_UpdateConfig() - Change configurations for all SME moduels
474
475 The function updates some configuration for modules in SME, CCM, CSR, etc
476 during SMEs close -> open sequence.
477
478 Modules inside SME apply the new configuration at the next transaction.
479
480
481 \param hHal - The handle returned by macOpen.
482 \Param pSmeConfigParams - a pointer to a caller allocated object of
483 typedef struct _smeConfigParams.
484
485 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
486
487 Other status means SME is failed to update the config parameters.
488 \sa
489
490 --------------------------------------------------------------------------*/
491eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
492
493#ifdef FEATURE_WLAN_SCAN_PNO
494/*--------------------------------------------------------------------------
495
496 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
497
498 It is used at driver start up to inform RIVA of the default channel
499 configuration.
500
501 This is a synchronuous call
502
503 \param hHal - The handle returned by macOpen.
504
505 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
506
507 Other status means SME is failed to update the channel config.
508 \sa
509
510 --------------------------------------------------------------------------*/
511eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
512
513#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700514/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530515
516 \brief sme_UpdateChannelList() - Update channel List in FW.
517
518
519 \param hHal - The handle returned by macOpen.
520
521 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
522
523 Other status means SME is failed to update the channel config.
524 \sa
525
526 --------------------------------------------------------------------------*/
527eHalStatus sme_UpdateChannelList(tHalHandle hHal);
528
529/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700530
531 \brief sme_set11dinfo() - Set the 11d information about valid channels
532 and there power using information from nvRAM
533 This function is called only for AP.
534
535 This is a synchronuous call
536
537 \param hHal - The handle returned by macOpen.
538 \Param pSmeConfigParams - a pointer to a caller allocated object of
539 typedef struct _smeConfigParams.
540
541 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
542
543 Other status means SME is failed to update the config parameters.
544 \sa
545--------------------------------------------------------------------------*/
546
547eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
548
549/*--------------------------------------------------------------------------
550
551 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
552
553 This is a synchronuous call
554
555 \param hHal - The handle returned by HostapdAdapter.
556 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
557
558 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
559
560 Other status means, failed to get the current regulatory domain.
561 \sa
562--------------------------------------------------------------------------*/
563
564eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
565
566eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
567
Jeff Johnson295189b2012-06-20 16:38:30 -0700568
569/* ---------------------------------------------------------------------------
570 \fn sme_ChangeConfigParams
571 \brief The SME API exposed for HDD to provide config params to SME during
572 SMEs stop -> start sequence.
573
574 If HDD changed the domain that will cause a reset. This function will
575 provide the new set of 11d information for the new domain. Currrently this
576 API provides info regarding 11d only at reset but we can extend this for
577 other params (PMC, QoS) which needs to be initialized again at reset.
578
579 This is a synchronuous call
580
581 \param hHal - The handle returned by macOpen.
582
583 \Param
584 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
585 currently provides 11d related information like Country code,
586 Regulatory domain, valid channel list, Tx power per channel, a
587 list with active/passive scan allowed per valid channel.
588
589 \return eHalStatus
590 ---------------------------------------------------------------------------*/
591eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
592 tCsrUpdateConfigParam *pUpdateConfigParam);
593
594/*--------------------------------------------------------------------------
595
596 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
597 is ready tio run.
598
599 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
600 to running state.
601
602
603 \param hHal - The handle returned by macOpen.
604
605 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
606
607 Other status means SME failed to send the message to PE.
608 \sa
609
610 --------------------------------------------------------------------------*/
611eHalStatus sme_HDDReadyInd(tHalHandle hHal);
612
613
614/*--------------------------------------------------------------------------
615
616 \brief sme_ProcessMsg() - The main message processor for SME.
617
618 The function is called by a message dispatcher when to process a message
619 targeted for SME.
620
621
622 \param hHal - The handle returned by macOpen.
623 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
624
625 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
626
627 Other status means SME failed to process the message.
628 \sa
629
630 --------------------------------------------------------------------------*/
631eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
632
633v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
634
635/* ---------------------------------------------------------------------------
636 \fn sme_ScanRequest
637 \brief a wrapper function to Request a 11d or full scan from CSR.
638 \param pScanRequestID - pointer to an object to get back the request ID
639 \param callback - a callback function that scan calls upon finish, will not
640 be called if csrScanRequest returns error
641 \param pContext - a pointer passed in for the callback
642 \return eHalStatus
643 ---------------------------------------------------------------------------*/
644eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
645 tANI_U32 *pScanRequestID,
646 csrScanCompleteCallback callback, void *pContext);
647
648
649/* ---------------------------------------------------------------------------
650 \fn sme_ScanSetBGScanparams
651 \brief a wrapper function to request CSR to set BG scan params in PE
652 \param pScanReq - BG scan request structure
653 \return eHalStatus
654 ---------------------------------------------------------------------------*/
655eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
656
657
658/* ---------------------------------------------------------------------------
659 \fn sme_ScanGetResult
660 \brief a wrapper function to request scan results from CSR.
661 \param pFilter - If pFilter is NULL, all cached results are returned
662 \param phResult - an object for the result.
663 \return eHalStatus
664 ---------------------------------------------------------------------------*/
665eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
666 tScanResultHandle *phResult);
667
668
669/* ---------------------------------------------------------------------------
670 \fn sme_ScanFlushResult
671 \brief a wrapper function to request CSR to clear scan results.
672 \return eHalStatus
673 ---------------------------------------------------------------------------*/
674eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530675
676/*
677 * ---------------------------------------------------------------------------
678 * \fn sme_FilterScanResults
679 * \brief a wrapper function to request CSR to filter the scan results based
680 * on valid chennel list.
681 * \return eHalStatus
682 *---------------------------------------------------------------------------
683 */
684eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
685
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530686/*
687 * ---------------------------------------------------------------------------
688 * \fn sme_FilterScanDFSResults
689 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
690 * from the scan results.
691 * \return eHalStatus
692 *---------------------------------------------------------------------------
693 */
694eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
695
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700696eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700697
698/* ---------------------------------------------------------------------------
699 \fn sme_ScanResultGetFirst
700 \brief a wrapper function to request CSR to returns the first element of
701 scan result.
702 \param hScanResult - returned from csrScanGetResult
703 \return tCsrScanResultInfo * - NULL if no result
704 ---------------------------------------------------------------------------*/
705tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
706 tScanResultHandle hScanResult);
707
708/* ---------------------------------------------------------------------------
709 \fn sme_ScanResultGetNext
710 \brief a wrapper function to request CSR to returns the next element of
711 scan result. It can be called without calling csrScanResultGetFirst
712 first
713 \param hScanResult - returned from csrScanGetResult
714 \return Null if no result or reach the end
715 ---------------------------------------------------------------------------*/
716tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
717 tScanResultHandle hScanResult);
718
719/* ---------------------------------------------------------------------------
720 \fn sme_ScanResultPurge
721 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
722 in the list and free memory for each item
723 \param hScanResult - returned from csrScanGetResult. hScanResult is
724 considered gone by
725 calling this function and even before this function reutrns.
726 \return eHalStatus
727 ---------------------------------------------------------------------------*/
728eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
729
730/* ---------------------------------------------------------------------------
731 \fn sme_ScanGetPMKIDCandidateList
732 \brief a wrapper function to return the PMKID candidate list
733 \param pPmkidList - caller allocated buffer point to an array of
734 tPmkidCandidateInfo
735 \param pNumItems - pointer to a variable that has the number of
736 tPmkidCandidateInfo allocated when retruning, this is
737 either the number needed or number of items put into
738 pPmkidList
739 \return eHalStatus - when fail, it usually means the buffer allocated is not
740 big enough and pNumItems
741 has the number of tPmkidCandidateInfo.
742 \Note: pNumItems is a number of tPmkidCandidateInfo,
743 not sizeof(tPmkidCandidateInfo) * something
744 ---------------------------------------------------------------------------*/
745eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
746 tPmkidCandidateInfo *pPmkidList,
747 tANI_U32 *pNumItems );
748
749
750/*----------------------------------------------------------------------------
751 \fn sme_RoamRegisterLinkQualityIndCallback
752
753 \brief
754 a wrapper function to allow HDD to register a callback handler with CSR for
755 link quality indications.
756
757 Only one callback may be registered at any time.
758 In order to deregister the callback, a NULL cback may be provided.
759
760 Registration happens in the task context of the caller.
761
762 \param callback - Call back being registered
763 \param pContext - user data
764
765 DEPENDENCIES: After CSR open
766
767 \return eHalStatus
768-----------------------------------------------------------------------------*/
769eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
770 csrRoamLinkQualityIndCallback callback,
771 void *pContext);
772
773
774/* ---------------------------------------------------------------------------
775 \fn sme_RoamConnect
776 \brief a wrapper function to request CSR to inititiate an association
777 \param sessionId - the sessionId returned by sme_OpenSession.
778 \param pProfile - can be NULL to join to any open ones
779 \param pRoamId - to get back the request ID
780 \return eHalStatus
781 ---------------------------------------------------------------------------*/
782eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
783 tANI_U32 *pRoamId);
784
785/* ---------------------------------------------------------------------------
786 \fn sme_RoamReassoc
787 \brief a wrapper function to request CSR to inititiate a re-association
788 \param pProfile - can be NULL to join the currently connected AP. In that
789 case modProfileFields should carry the modified field(s) which could trigger
790 reassoc
791 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
792 that might need modification dynamically once STA is up & running and this
793 could trigger a reassoc
794 \param pRoamId - to get back the request ID
795 \return eHalStatus
796 -------------------------------------------------------------------------------*/
797eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
798 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700799 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700800
801/* ---------------------------------------------------------------------------
802 \fn sme_RoamConnectToLastProfile
803 \brief a wrapper function to request CSR to disconnect and reconnect with
804 the same profile
805 \return eHalStatus. It returns fail if currently connected
806 ---------------------------------------------------------------------------*/
807eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
808
809/* ---------------------------------------------------------------------------
810 \fn sme_RoamDisconnect
811 \brief a wrapper function to request CSR to disconnect from a network
812 \param reason -- To indicate the reason for disconnecting. Currently, only
813 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
814 \return eHalStatus
815 ---------------------------------------------------------------------------*/
816eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
817
Jeff Johnson295189b2012-06-20 16:38:30 -0700818/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530819 \fn.sme_abortConnection
820 \brief a wrapper function to request CSR to stop from connecting a network
821 \retun void.
822---------------------------------------------------------------------------*/
823
824void sme_abortConnection(tHalHandle hHal, tANI_U8 sessionId);
825
826/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700827 \fn sme_RoamStopBss
828 \brief a wrapper function to request CSR to stop bss
829 \param sessionId - sessionId of SoftAP
830 \return eHalStatus
831 ---------------------------------------------------------------------------*/
832eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
833
834/* ---------------------------------------------------------------------------
835 \fn sme_RoamGetAssociatedStas
836 \brief To probe the list of associated stations from various modules of CORE stack.
837 \This is an asynchronous API.
838 \param sessionId - sessionId of SoftAP
839 \param modId - Module from whom list of associtated stations is to be probed.
840 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
841 \param pUsrContext - Opaque HDD context
842 \param pfnSapEventCallback - Sap event callback in HDD
843 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
844 \return eHalStatus
845 -------------------------------------------------------------------------------*/
846eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
847 VOS_MODULE_ID modId, void *pUsrContext,
848 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
849
850/* ---------------------------------------------------------------------------
851 \fn sme_RoamDisconnectSta
852 \brief To disassociate a station. This is an asynchronous API.
853 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
854 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
855 -------------------------------------------------------------------------------*/
856eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
857
858/* ---------------------------------------------------------------------------
859 \fn sme_RoamDeauthSta
860 \brief To disassociate a station. This is an asynchronous API.
861 \param hHal - Global structure
862 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530863 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700864 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
865 -------------------------------------------------------------------------------*/
866eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530867 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700868
869/* ---------------------------------------------------------------------------
870 \fn sme_RoamTKIPCounterMeasures
871 \brief To start or stop TKIP counter measures. This is an asynchronous API.
872 \param sessionId - sessionId of SoftAP
873 \param bEnable - Flag to start/stop TKIP countermeasures
874 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
875 -------------------------------------------------------------------------------*/
876eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
877
878/* ---------------------------------------------------------------------------
879 \fn sme_RoamGetWpsSessionOverlap
880 \brief To get the WPS PBC session overlap information.
881 \This is an asynchronous API.
882 \param sessionId - sessionId of SoftAP
883 \param pUsrContext - Opaque HDD context
884 \param pfnSapEventCallback - Sap event callback in HDD
885 \return eHalStatus
886 -------------------------------------------------------------------------------*/
887eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
888 void *pUsrContext, void *pfnSapEventCallback,
889 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700890
891/* ---------------------------------------------------------------------------
892 \fn sme_RoamGetConnectState
893 \brief a wrapper function to request CSR to return the current connect state
894 of Roaming
895 \return eHalStatus
896 ---------------------------------------------------------------------------*/
897eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
898
899/* ---------------------------------------------------------------------------
900 \fn sme_RoamGetConnectProfile
901 \brief a wrapper function to request CSR to return the current connect
902 profile. Caller must call csrRoamFreeConnectProfile after it is done
903 and before reuse for another csrRoamGetConnectProfile call.
904 \param pProfile - pointer to a caller allocated structure
905 tCsrRoamConnectedProfile
906 \return eHalStatus. Failure if not connected
907 ---------------------------------------------------------------------------*/
908eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
909 tCsrRoamConnectedProfile *pProfile);
910
911/* ---------------------------------------------------------------------------
912 \fn sme_RoamFreeConnectProfile
913 \brief a wrapper function to request CSR to free and reinitialize the
914 profile returned previously by csrRoamGetConnectProfile.
915 \param pProfile - pointer to a caller allocated structure
916 tCsrRoamConnectedProfile
917 \return eHalStatus.
918 ---------------------------------------------------------------------------*/
919eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
920 tCsrRoamConnectedProfile *pProfile);
921
922/* ---------------------------------------------------------------------------
923 \fn sme_RoamSetPMKIDCache
924 \brief a wrapper function to request CSR to return the PMKID candidate list
925 \param pPMKIDCache - caller allocated buffer point to an array of
926 tPmkidCacheInfo
927 \param numItems - a variable that has the number of tPmkidCacheInfo
928 allocated when retruning, this is either the number needed
929 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530930 \param update_entire_cache - if TRUE, then it overwrites the entire cache
931 with pPMKIDCache, else it updates entry by
932 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700933 \return eHalStatus - when fail, it usually means the buffer allocated is not
934 big enough and pNumItems has the number of
935 tPmkidCacheInfo.
936 \Note: pNumItems is a number of tPmkidCacheInfo,
937 not sizeof(tPmkidCacheInfo) * something
938 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530939eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
940 tPmkidCacheInfo *pPMKIDCache,
941 tANI_U32 numItems,
942 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700943
944/* ---------------------------------------------------------------------------
945 \fn sme_RoamGetSecurityReqIE
946 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
947 passes to PE to JOIN request or START_BSS request
948 This is a synchronuous call.
949 \param sessionId - returned by sme_OpenSession.
950 \param pLen - caller allocated memory that has the length of pBuf as input.
951 Upon returned, *pLen has the needed or IE length in pBuf.
952 \param pBuf - Caller allocated memory that contain the IE field, if any,
953 upon return
954 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
955 \return eHalStatus - when fail, it usually means the buffer allocated is not
956 big enough
957 ---------------------------------------------------------------------------*/
958eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
959 tANI_U8 *pBuf, eCsrSecurityType secType);
960
961/* ---------------------------------------------------------------------------
962 \fn sme_RoamGetSecurityRspIE
963 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
964 the beacon or probe rsp if connected
965 \param sessionId - returned by sme_OpenSession.
966 \param pLen - caller allocated memory that has the length of pBuf as input.
967 Upon returned, *pLen has the needed or IE length in pBuf.
968 \param pBuf - Caller allocated memory that contain the IE field, if any,
969 upon return
970 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
971 \return eHalStatus - when fail, it usually means the buffer allocated is not
972 big enough
973 ---------------------------------------------------------------------------*/
974eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
975 tANI_U8 *pBuf, eCsrSecurityType secType);
976
977
978/* ---------------------------------------------------------------------------
979 \fn sme_RoamGetNumPMKIDCache
980 \brief a wrapper function to request CSR to return number of PMKID cache
981 entries
982 \return tANI_U32 - the number of PMKID cache entries
983 ---------------------------------------------------------------------------*/
984tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
985
986/* ---------------------------------------------------------------------------
987 \fn sme_RoamGetPMKIDCache
988 \brief a wrapper function to request CSR to return PMKID cache from CSR
989 \param pNum - caller allocated memory that has the space of the number of
990 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
991 needed or actually number in tPmkidCacheInfo.
992 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
993 any, upon return
994 \return eHalStatus - when fail, it usually means the buffer allocated is not
995 big enough
996 ---------------------------------------------------------------------------*/
997eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
998 tPmkidCacheInfo *pPmkidCache);
999
1000/* ---------------------------------------------------------------------------
1001 \fn sme_GetConfigParam
1002 \brief a wrapper function that HDD calls to get the global settings
1003 currently maintained by CSR.
1004 \param pParam - caller allocated memory
1005 \return eHalStatus
1006 ---------------------------------------------------------------------------*/
1007eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
1008
1009/* ---------------------------------------------------------------------------
1010 \fn sme_GetStatistics
1011 \brief a wrapper function that client calls to register a callback to get
1012 different PHY level statistics from CSR.
1013
1014 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1015 \param statsMask - The different category/categories of stats requester is looking for
1016 The order in which you set the bits in the statsMask for requesting
1017 different type of stats is:
1018
1019 eCsrSummaryStats = bit 0
1020 eCsrGlobalClassAStats = bit 1
1021 eCsrGlobalClassBStats = bit 2
1022 eCsrGlobalClassCStats = bit 3
1023 eCsrGlobalClassDStats = bit 4
1024 eCsrPerStaStats = bit 5
1025
1026 \param callback - SME sends back the requested stats using the callback
1027 \param periodicity - If requester needs periodic update, 0 means it's an one
1028 time request
1029 \param cache - If requester is happy with cached stats
1030 \param staId - The station ID for which the stats is requested for
1031 \param pContext - user context to be passed back along with the callback
1032 \return eHalStatus
1033 ---------------------------------------------------------------------------*/
1034eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1035 tANI_U32 statsMask,
1036 tCsrStatsCallback callback,
1037 tANI_U32 periodicity, tANI_BOOLEAN cache,
1038 tANI_U8 staId, void *pContext);
1039
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301040/* ---------------------------------------------------------------------------
1041 \fn smeGetTLSTAState
1042 \helper function to get teh TL STA State whenever the function is called.
1043
1044 \param staId - The staID to be passed to the TL
1045 to get the relevant TL STA State
1046 \return the state as tANI_U16
1047 ---------------------------------------------------------------------------*/
1048tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1049
Jeff Johnson295189b2012-06-20 16:38:30 -07001050eHalStatus sme_GetRssi(tHalHandle hHal,
1051 tCsrRssiCallback callback,
1052 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301053
1054/* ---------------------------------------------------------------------------
1055 \fn sme_GetSnr
1056 \brief a wrapper function that client calls to register a callback to get
1057 SNR from FW
1058
1059 \param callback - SME sends back the requested stats using the callback
1060 \param staId - The station ID for which the stats is requested for
1061 \param bssid - The bssid of the connected session
1062 \param pContext - user context to be passed back along with the callback
1063 ---------------------------------------------------------------------------*/
1064eHalStatus sme_GetSnr(tHalHandle hHal,
1065 tCsrSnrCallback callback,
1066 tANI_U8 staId, tCsrBssid bssId,
1067 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001068#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001069eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1070 tCsrRssiCallback callback,
1071 tANI_U8 staId,
1072 tCsrBssid bssId,
1073 void *pContext,
1074 void* pVosContext);
1075#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001076
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001077#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001078/* ---------------------------------------------------------------------------
1079 \fn sme_GetTsmStats
1080 \brief a wrapper function that client calls to register a callback to get TSM Stats
1081
1082 \param callback - SME sends back the requested stats using the callback
1083 \param staId - The station ID for which the stats is requested for
1084 \param pContext - user context to be passed back along with the callback
1085 \param pVosContext - vos context
1086 \return eHalStatus
1087 ---------------------------------------------------------------------------*/
1088eHalStatus sme_GetTsmStats(tHalHandle hHal,
1089 tCsrTsmStatsCallback callback,
1090 tANI_U8 staId, tCsrBssid bssId,
1091 void *pContext, void* pVosContext, tANI_U8 tid);
1092
1093/* ---------------------------------------------------------------------------
1094 \fn sme_SetCCKMIe
1095 \brief function to store the CCKM IE passed from supplicant and use it while packing
1096 reassociation request
1097 \param hHal - HAL handle for device
1098 \param pCckmIe - pointer to CCKM IE data
1099 \param pCckmIeLen - length of the CCKM IE
1100 \- return Success or failure
1101 -------------------------------------------------------------------------*/
1102eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1103
1104
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001105/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001106 \fn sme_SetEseBeaconRequest
1107 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001108 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001109 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001110 \- return Success or failure
1111 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001112eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1113 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001114
1115
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001116#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001117/* ---------------------------------------------------------------------------
1118 \fn sme_CfgSetInt
1119 \brief a wrapper function that HDD calls to set parameters in CFG.
1120 \param cfgId - Configuration Parameter ID (type) for STA.
1121 \param ccmValue - The information related to Configuration Parameter ID
1122 which needs to be saved in CFG
1123 \param callback - To be registered by CSR with CCM. Once the CFG done with
1124 saving the information in the database, it notifies CCM &
1125 then the callback will be invoked to notify.
1126 \param toBeSaved - To save the request for future reference
1127 \return eHalStatus
1128 ---------------------------------------------------------------------------*/
1129eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1130 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1131
1132/* ---------------------------------------------------------------------------
1133 \fn sme_CfgSetStr
1134 \brief a wrapper function that HDD calls to set parameters in CFG.
1135 \param cfgId - Configuration Parameter ID (type) for STA.
1136 \param pStr - Pointer to the byte array which carries the information needs
1137 to be saved in CFG
1138 \param length - Length of the data to be saved
1139 \param callback - To be registered by CSR with CCM. Once the CFG done with
1140 saving the information in the database, it notifies CCM &
1141 then the callback will be invoked to notify.
1142 \param toBeSaved - To save the request for future reference
1143 \return eHalStatus
1144 ---------------------------------------------------------------------------*/
1145eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1146 tANI_U32 length, tCcmCfgSetCallback callback,
1147 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301148/* ---------------------------------------------------------------------------
1149 \fn sme_GetModifyProfileFields
1150 \brief HDD or SME - QOS calls this function to get the current values of
1151 connected profile fields, changing which can cause reassoc.
1152 This function must be called after CFG is downloaded and STA is in connected
1153 state. Also, make sure to call this function to get the current profile
1154 fields before calling the reassoc. So that pModifyProfileFields will have
1155 all the latest values plus the one(s) has been updated as part of reassoc
1156 request.
1157 \param pModifyProfileFields - pointer to the connected profile fields
1158 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001159
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301160 \return eHalStatus
1161 -------------------------------------------------------------------------------*/
1162eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1163 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301164/* ---------------------------------------------------------------------------
1165 \fn sme_HT40StopOBSSScan
1166 \brief HDD or SME - Command to stop the OBSS scan
1167 THis is implemented only for debugging purpose.
1168 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1169 \param sessionId - sessionId
1170 changing which can cause reassoc
1171
1172 \return eHalStatus
1173 -------------------------------------------------------------------------------*/
1174eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001175
1176/*--------------------------------------------------------------------------
1177 \fn sme_SetConfigPowerSave
1178 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1179 For BMPS related configuration, this function also updates the CFG
1180 and sends a message to FW to pick up the new values. Note: Calling
1181 this function only updates the configuration and does not enable
1182 the specified power save mode.
1183 \param hHal - The handle returned by macOpen.
1184 \param psMode - Power Saving mode being modified
1185 \param pConfigParams - a pointer to a caller allocated object of type
1186 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1187 \return eHalStatus
1188 --------------------------------------------------------------------------*/
1189eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1190 void *pConfigParams);
1191
1192/*--------------------------------------------------------------------------
1193 \fn sme_GetConfigPowerSave
1194 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1195 \param hHal - The handle returned by macOpen.
1196 \param psMode - Power Saving mode
1197 \param pConfigParams - a pointer to a caller allocated object of type
1198 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1199 \return eHalStatus
1200 --------------------------------------------------------------------------*/
1201eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1202 void *pConfigParams);
1203
1204/* ---------------------------------------------------------------------------
1205 \fn sme_SignalPowerEvent
1206 \brief Signals to PMC that a power event has occurred. Used for putting
1207 the chip into deep sleep mode.
1208 \param hHal - The handle returned by macOpen.
1209 \param event - the event that has occurred
1210 \return eHalStatus
1211 ---------------------------------------------------------------------------*/
1212extern eHalStatus sme_SignalPowerEvent (
1213 tHalHandle hHal,
1214 tPmcPowerEvent event);
1215
1216/* ---------------------------------------------------------------------------
1217 \fn sme_EnablePowerSave
1218 \brief Enables one of the power saving modes. This API does not cause a
1219 device state change. This is purely a configuration API.
1220 \param hHal - The handle returned by macOpen.
1221 \param psMode - The power saving mode to enable.
1222 \return eHalStatus
1223 ---------------------------------------------------------------------------*/
1224extern eHalStatus sme_EnablePowerSave (
1225 tHalHandle hHal,
1226 tPmcPowerSavingMode psMode);
1227
1228/* ---------------------------------------------------------------------------
1229 \fn sme_DisablePowerSave
1230 \brief Disables one of the power saving modes.Disabling does not imply
1231 that device will be brought out of the current PS mode. This is
1232 purely a configuration API.
1233 \param hHal - The handle returned by macOpen.
1234 \param psMode - The power saving mode to disable.
1235 \return eHalStatus
1236 ---------------------------------------------------------------------------*/
1237extern eHalStatus sme_DisablePowerSave (
1238 tHalHandle hHal,
1239 tPmcPowerSavingMode psMode);
1240
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301241 /* ---------------------------------------------------------------------------
1242 \fn sme_SetHostPowerSave
1243 \brief The BMPS logic is controlled by the User level Apps
1244 \param hHal - The handle returned by macOpen.
1245 \param psMode - The power saving mode to enable.
1246 \return eHalStatus
1247 ---------------------------------------------------------------------------*/
1248extern eHalStatus sme_SetHostPowerSave (
1249 tHalHandle hHal,
1250 v_BOOL_t psMode);
1251
Jeff Johnson295189b2012-06-20 16:38:30 -07001252/* ---------------------------------------------------------------------------
1253 \fn sme_StartAutoBmpsTimer
1254 \brief Starts a timer that periodically polls all the registered
1255 module for entry into Bmps mode. This timer is started only if BMPS is
1256 enabled and whenever the device is in full power.
1257 \param hHal - The handle returned by macOpen.
1258 \return eHalStatus
1259 ---------------------------------------------------------------------------*/
1260extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1261
1262/* ---------------------------------------------------------------------------
1263 \fn sme_StopAutoBmpsTimer
1264 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1265 Stopping the timer does not cause a device state change. Only the timer
1266 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1267 \param hHal - The handle returned by macOpen.
1268 \return eHalStatus
1269 ---------------------------------------------------------------------------*/
1270extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1271
1272/* ---------------------------------------------------------------------------
1273 \fn sme_QueryPowerState
1274 \brief Returns the current power state of the device.
1275 \param hHal - The handle returned by macOpen.
1276 \param pPowerState - pointer to location to return power state
1277 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1278 \return eHalStatus
1279 ---------------------------------------------------------------------------*/
1280extern eHalStatus sme_QueryPowerState (
1281 tHalHandle hHal,
1282 tPmcPowerState *pPowerState,
1283 tPmcSwitchState *pSwWlanSwitchState);
1284
1285/* ---------------------------------------------------------------------------
1286 \fn sme_IsPowerSaveEnabled
1287 \brief Checks if the device is able to enter a particular power save mode
1288 This does not imply that the device is in a particular PS mode
1289 \param hHal - The handle returned by macOpen.
1290 \param psMode - the power saving mode
1291 \return eHalStatus
1292 ---------------------------------------------------------------------------*/
1293extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1294 tHalHandle hHal,
1295 tPmcPowerSavingMode psMode);
1296
1297/* ---------------------------------------------------------------------------
1298 \fn sme_RequestFullPower
1299 \brief Request that the device be brought to full power state.
1300 Note 1: If "fullPowerReason" specificied in this API is set to
1301 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1302 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1303 HDD is requesting full power, we need to undo any previous HDD requests for
1304 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1305 specified anything other than above, the buffered requests for BMPS and WoWL
1306 will not be cleared.
1307 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1308 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1309 request".
1310 Note 3: When the device finally enters Full Power PMC will start a timer
1311 if any of the following holds true:
1312 - Auto BMPS mode is enabled
1313 - Uapsd request is pending
1314 - HDD's request for BMPS is pending
1315 - HDD's request for WoWL is pending
1316 On timer expiry PMC will attempt to put the device in BMPS mode if following
1317 (in addition to those listed above) holds true:
1318 - Polling of all modules through the Power Save Check routine passes
1319 - STA is associated to an access point
1320 \param hHal - The handle returned by macOpen.
1321 \param - callbackRoutine Callback routine invoked in case of success/failure
1322 \param - callbackContext - Cookie to be passed back during callback
1323 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1324 distinguish between BAP and HDD requests
1325 \return eHalStatus - status
1326 eHAL_STATUS_SUCCESS - device brought to full power state
1327 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1328 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1329 ---------------------------------------------------------------------------*/
1330extern eHalStatus sme_RequestFullPower (
1331 tHalHandle hHal,
1332 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1333 void *callbackContext,
1334 tRequestFullPowerReason fullPowerReason);
1335
1336/* ---------------------------------------------------------------------------
1337 \fn sme_RequestBmps
1338 \brief Request that the device be put in BMPS state. Request will be
1339 accepted only if BMPS mode is enabled and power save check routine
1340 passes. Only HDD should invoke this API.
1341 \param hHal - The handle returned by macOpen.
1342 \param - callbackRoutine Callback routine invoked in case of success/failure
1343 \param - callbackContext - Cookie to be passed back during callback
1344 \return eHalStatus
1345 eHAL_STATUS_SUCCESS - device is in BMPS state
1346 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1347 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1348 ---------------------------------------------------------------------------*/
1349extern eHalStatus sme_RequestBmps (
1350 tHalHandle hHal,
1351 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1352 void *callbackContext);
1353
1354/* ---------------------------------------------------------------------------
1355 \fn sme_SetDHCPTillPowerActiveFlag
1356 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1357 entry by PMC
1358 \param hHal - The handle returned by macOpen.
1359 ---------------------------------------------------------------------------*/
1360void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1361
1362
1363/* ---------------------------------------------------------------------------
1364 \fn sme_StartUapsd
1365 \brief Request that the device be put in UAPSD state. If the device is in
1366 Full Power it will be put in BMPS mode first and then into UAPSD
1367 mode.
1368 \param hHal - The handle returned by macOpen.
1369 \param - callbackRoutine Callback routine invoked in case of success/failure
1370 \param - callbackContext - Cookie to be passed back during callback
1371 eHAL_STATUS_SUCCESS - device is in UAPSD state
1372 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1373 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1374 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1375 \return eHalStatus
1376 ---------------------------------------------------------------------------*/
1377extern eHalStatus sme_StartUapsd (
1378 tHalHandle hHal,
1379 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1380 void *callbackContext);
1381
1382/* ---------------------------------------------------------------------------
1383 \fn sme_StopUapsd
1384 \brief Request that the device be put out of UAPSD state. Device will be
1385 put in in BMPS state after stop UAPSD completes. Buffered requests for
1386 UAPSD will be cleared after this.
1387 \param hHal - The handle returned by macOpen.
1388 \return eHalStatus
1389 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1390 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1391 ---------------------------------------------------------------------------*/
1392extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1393
1394/* ---------------------------------------------------------------------------
1395 \fn sme_RequestStandby
1396 \brief Request that the device be put in standby. It is HDD's responsibility
1397 to bring the chip to full power and do a discconnect before calling
1398 this API. Request for standby will be rejected if STA is associated
1399 to an AP.
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 Standby mode
1405 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1406 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1407 ---------------------------------------------------------------------------*/
1408extern eHalStatus sme_RequestStandby (
1409 tHalHandle hHal,
1410 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1411 void *callbackContext);
1412
1413/* ---------------------------------------------------------------------------
1414 \fn sme_RegisterPowerSaveCheck
1415 \brief Register a power save check routine that is called whenever
1416 the device is about to enter one of the power save modes.
1417 \param hHal - The handle returned by macOpen.
1418 \param checkRoutine - Power save check routine to be registered
1419 \param callbackContext - Cookie to be passed back during callback
1420 \return eHalStatus
1421 eHAL_STATUS_SUCCESS - successfully registered
1422 eHAL_STATUS_FAILURE - not successfully registered
1423 ---------------------------------------------------------------------------*/
1424extern eHalStatus sme_RegisterPowerSaveCheck (
1425 tHalHandle hHal,
1426 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1427
1428/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301429 \fn sme_Register11dScanDoneCallback
1430 \brief Register a routine of type csrScanCompleteCallback which is
1431 called whenever an 11d scan is done
1432 \param hHal - The handle returned by macOpen.
1433 \param callback - 11d scan complete routine to be registered
1434 \return eHalStatus
1435 ---------------------------------------------------------------------------*/
1436extern eHalStatus sme_Register11dScanDoneCallback (
1437 tHalHandle hHal,
1438 csrScanCompleteCallback);
1439
1440/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001441 \fn sme_DeregisterPowerSaveCheck
1442 \brief Deregister a power save check routine
1443 \param hHal - The handle returned by macOpen.
1444 \param checkRoutine - Power save check routine to be deregistered
1445 \return eHalStatus
1446 eHAL_STATUS_SUCCESS - successfully deregistered
1447 eHAL_STATUS_FAILURE - not successfully deregistered
1448 ---------------------------------------------------------------------------*/
1449extern eHalStatus sme_DeregisterPowerSaveCheck (
1450 tHalHandle hHal,
1451 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1452
1453/* ---------------------------------------------------------------------------
1454 \fn sme_RegisterDeviceStateUpdateInd
1455 \brief Register a callback routine that is called whenever
1456 the device enters a new device state (Full Power, BMPS, UAPSD)
1457 \param hHal - The handle returned by macOpen.
1458 \param callbackRoutine - Callback routine to be registered
1459 \param callbackContext - Cookie to be passed back during callback
1460 \return eHalStatus
1461 eHAL_STATUS_SUCCESS - successfully registered
1462 eHAL_STATUS_FAILURE - not successfully registered
1463 ---------------------------------------------------------------------------*/
1464extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1465 tHalHandle hHal,
1466 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1467 void *callbackContext);
1468
1469/* ---------------------------------------------------------------------------
1470 \fn sme_DeregisterDeviceStateUpdateInd
1471 \brief Deregister a routine that was registered for device state changes
1472 \param hHal - The handle returned by macOpen.
1473 \param callbackRoutine - Callback routine to be deregistered
1474 \return eHalStatus
1475 eHAL_STATUS_SUCCESS - successfully deregistered
1476 eHAL_STATUS_FAILURE - not successfully deregistered
1477 ---------------------------------------------------------------------------*/
1478extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1479 tHalHandle hHal,
1480 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1481
1482/* ---------------------------------------------------------------------------
1483 \fn sme_WowlAddBcastPattern
1484 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1485 do a pattern match on these patterns when Wowl is enabled during BMPS
1486 mode.
1487 \param hHal - The handle returned by macOpen.
1488 \param pattern - Pattern to be added
1489 \return eHalStatus
1490 eHAL_STATUS_FAILURE Cannot add pattern
1491 eHAL_STATUS_SUCCESS Request accepted.
1492 ---------------------------------------------------------------------------*/
1493extern eHalStatus sme_WowlAddBcastPattern (
1494 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001495 tpSirWowlAddBcastPtrn pattern,
1496 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001497
1498/* ---------------------------------------------------------------------------
1499 \fn sme_WowlDelBcastPattern
1500 \brief Delete a pattern that was added for Pattern Byte Matching.
1501 \param hHal - The handle returned by macOpen.
1502 \param pattern - Pattern to be deleted
1503 \return eHalStatus
1504 eHAL_STATUS_FAILURE Cannot delete pattern
1505 eHAL_STATUS_SUCCESS Request accepted.
1506 ---------------------------------------------------------------------------*/
1507extern eHalStatus sme_WowlDelBcastPattern (
1508 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001509 tpSirWowlDelBcastPtrn pattern,
1510 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001511
1512/* ---------------------------------------------------------------------------
1513 \fn sme_EnterWowl
1514 \brief This is the API to request entry into WOWL mode.
1515 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1516 SME will will cache the information that WOWL has been requested and
1517 attempt to put the device in BMPS first. On entry into BMPS, SME will
1518 enter the WOWL mode.
1519 Note 1: After WoWL request is accepted, If module other than HDD requests
1520 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1521 and attempt to put the chip into BMPS+WOWL based on a timer.
1522 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1523 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1524 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1525 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1526 are required. Currently there is no requirement or use case to support UAPSD
1527 and WOWL at the same time.
1528 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1529 Note 5. Request for WoWL is rejected if BMPS is disabled.
1530
1531 \param hHal - The handle returned by macOpen.
1532 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1533 Used for success/failure notification by SME
1534 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1535 at the time of callback.
1536 \param wakeReasonIndCB - Callback routine provided by HDD.
1537 Used for Wake Reason Indication by SME
1538 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1539 at the time of callback.
1540 \return eHalStatus
1541 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1542 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1543 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1544 mode is entered.
1545 ---------------------------------------------------------------------------*/
1546extern eHalStatus sme_EnterWowl (
1547 tHalHandle hHal,
1548 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1549 void *enterWowlCallbackContext,
1550#ifdef WLAN_WAKEUP_EVENTS
1551 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1552 void *wakeReasonIndCBContext,
1553#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001554 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001555
1556/* ---------------------------------------------------------------------------
1557 \fn sme_ExitWowl
1558 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1559 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1560 mode. Any Buffered request for WoWL will be cleared after this API.
1561 \param hHal - The handle returned by macOpen.
1562 \return eHalStatus
1563 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1564 only if the previous "Enter WOWL" transaction has
1565 not even completed.
1566 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1567 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301568extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001569
1570/* ---------------------------------------------------------------------------
1571
1572 \fn sme_RoamSetKey
1573
1574 \brief To set encryption key. This function should be called only when connected
1575 This is an asynchronous API.
1576
1577 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1578
1579 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1580
1581 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1582
1583 FAILURE or RESOURCES The API finished and failed.
1584
1585 -------------------------------------------------------------------------------*/
1586eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1587
1588/* ---------------------------------------------------------------------------
1589
1590 \fn sme_RoamRemoveKey
1591
1592 \brief To set encryption key. This is an asynchronous API.
1593
1594 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1595
1596 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1597
1598 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1599
1600 FAILURE or RESOURCES The API finished and failed.
1601
1602 -------------------------------------------------------------------------------*/
1603eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1604
1605
1606/* ---------------------------------------------------------------------------
1607
1608 \fn sme_GetCountryCode
1609
1610 \brief To return the current country code. If no country code is applied, default country code is
1611 used to fill the buffer.
1612 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1613 This is a synchronous API.
1614
1615 \param pBuf - pointer to a caller allocated buffer for returned country code.
1616
1617 \param pbLen For input, this parameter indicates how big is the buffer.
1618 Upon return, this parameter has the number of bytes for country. If pBuf
1619 doesn't have enough space, this function returns
1620 fail status and this parameter contains the number that is needed.
1621
1622 \return eHalStatus SUCCESS.
1623
1624 FAILURE or RESOURCES The API finished and failed.
1625
1626 -------------------------------------------------------------------------------*/
1627eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1628
1629/* ---------------------------------------------------------------------------
1630
1631 \fn sme_SetCountryCode
1632
1633 \brief To change the current/default country code.
1634 If 11d supported is turned off, an error is return.
1635 This is a synchronous API.
1636
1637 \param pCountry - pointer to a caller allocated buffer for the country code.
1638
1639 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1640 whether a reset is required.
1641
1642 \return eHalStatus SUCCESS.
1643
1644 FAILURE or RESOURCES The API finished and failed.
1645
1646 -------------------------------------------------------------------------------*/
1647eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1648
1649/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301650
1651 \fn sme_InitChannels
1652
1653 \brief Used to initialize CSR channel lists while driver loading
1654
1655 \param hHal - global pMac structure
1656
1657 \return eHalStatus SUCCESS.
1658
1659 FAILURE or RESOURCES The API finished and failed.
1660
1661 -------------------------------------------------------------------------------*/
1662eHalStatus sme_InitChannels(tHalHandle hHal);
1663
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301664
Mihir Shete04206452014-11-20 17:50:58 +05301665#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301666/* ---------------------------------------------------------------------------
1667 \fn sme_InitChannelsForCC
1668
1669 \brief Used to issue regulatory hint to user
1670
1671 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301672 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301673
1674 \return eHalStatus SUCCESS.
1675
1676 FAILURE or RESOURCES The API finished and failed.
1677
1678 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301679eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301680#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301681
Mihir Shetee1093ba2014-01-21 20:13:32 +05301682/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001683 \fn sme_ResetCountryCodeInformation
1684 \brief this function is to reset the country code current being used back to EEPROM default
1685 this includes channel list and power setting. This is a synchronous API.
1686 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1687 a restart is needed to apply the change
1688 \return eHalStatus
1689 -------------------------------------------------------------------------------*/
1690eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1691
1692/* ---------------------------------------------------------------------------
1693 \fn sme_GetSupportedCountryCode
1694 \brief this function is to get a list of the country code current being supported
1695 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1696 this has the country code list. 3 bytes for each country code. This may be NULL if
1697 caller wants to know the needed byte count.
1698 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1699 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1700 \return eHalStatus
1701 -------------------------------------------------------------------------------*/
1702eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1703
1704/* ---------------------------------------------------------------------------
1705 \fn sme_GetCurrentRegulatoryDomain
1706 \brief this function is to get the current regulatory domain. This is a synchronous API.
1707 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1708 SME. The function fails if 11d support is turned off.
1709 \param pDomain - Caller allocated buffer to return the current domain.
1710 \return eHalStatus SUCCESS.
1711
1712 FAILURE or RESOURCES The API finished and failed.
1713 -------------------------------------------------------------------------------*/
1714eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1715
1716/* ---------------------------------------------------------------------------
1717 \fn sme_SetRegulatoryDomain
1718 \brief this function is to set the current regulatory domain.
1719 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1720 SME. This is a synchronous API.
1721 \param domainId - indicate the domain (defined in the driver) needs to set to.
1722 See v_REGDOMAIN_t for definition
1723 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1724 a restart is needed to apply the change
1725 \return eHalStatus
1726 -------------------------------------------------------------------------------*/
1727eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1728
1729/* ---------------------------------------------------------------------------
1730
1731 \fn sme_GetRegulatoryDomainForCountry
1732
1733 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1734
1735 \param pCountry - pointer to a caller allocated buffer for input country code.
1736
1737 \param pDomainId Upon successful return, it is the domain that country belongs to.
1738 If it is NULL, returning success means that the country code is known.
1739
1740 \return eHalStatus SUCCESS.
1741
1742 FAILURE or RESOURCES The API finished and failed.
1743
1744 -------------------------------------------------------------------------------*/
1745eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1746
1747
1748
1749/* ---------------------------------------------------------------------------
1750
1751 \fn sme_GetSupportedRegulatoryDomains
1752
1753 \brief To return a list of supported regulatory domains. This is a synchronous API.
1754
1755 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1756
1757 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1758 Upon return, this parameter has the number for supported domains. If pDomains
1759 doesn't have enough space for all the supported domains, this function returns
1760 fail status and this parameter contains the number that is needed.
1761
1762 \return eHalStatus SUCCESS.
1763
1764 FAILURE or RESOURCES The API finished and failed.
1765
1766 -------------------------------------------------------------------------------*/
1767eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1768
1769//some support functions
1770tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1771tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1772tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1773//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1774eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1775
1776typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1777/* ---------------------------------------------------------------------------
1778
1779 \fn sme_ChangeCountryCode
1780
1781 \brief Change Country code from upperlayer during WLAN driver operation.
1782 This is a synchronous API.
1783
1784 \param hHal - The handle returned by macOpen.
1785
1786 \param pCountry New Country Code String
1787
Abhishek Singha306a442013-11-07 18:39:01 +05301788 \param sendRegHint If we want to send reg hint to nl80211
1789
Jeff Johnson295189b2012-06-20 16:38:30 -07001790 \return eHalStatus SUCCESS.
1791
1792 FAILURE or RESOURCES The API finished and failed.
1793
1794 -------------------------------------------------------------------------------*/
1795eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1796 tSmeChangeCountryCallback callback,
1797 tANI_U8 *pCountry,
1798 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301799 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301800 tAniBool countryFromUserSpace,
1801 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001802
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301803/* ---------------------------------------------------------------------------
1804
Amar Singhal0d15bd52013-10-12 23:13:13 -07001805 \fn sme_GenericChangeCountryCode
1806
1807 \brief Generic API to change country code
1808
1809 \param hHal - The handle returned by macOpen.
1810
1811 \param pCountry New Country Code String
1812
1813 \param reg_domain Regulatory domain for the new country code
1814
1815 \return eHalStatus SUCCESS.
1816
1817 FAILURE or RESOURCES The API finished and failed.
1818
1819 -------------------------------------------------------------------------------*/
1820eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1821 tANI_U8 *pCountry,
1822 v_REGDOMAIN_t reg_domain);
1823
1824/* ---------------------------------------------------------------------------
1825
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301826 \fn sme_DHCPStartInd
1827
1828 \brief Indicate FW about DHCP start event.
1829
1830 \param hHal - The handle returned by macOpen.
1831
1832 \param device_mode the mode of the device
1833
c_hpothu0b0cab72014-02-13 21:52:40 +05301834 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301835
1836 \return eHalStatus SUCCESS.
1837
1838 FAILURE or RESOURCES The API finished and failed.
1839
1840 -------------------------------------------------------------------------------*/
1841
1842eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1843 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301844 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301845
1846/* ---------------------------------------------------------------------------
1847
1848 \fn sme_DHCPStopInd
1849
1850 \brief Indicate FW about DHCP stop event.
1851
1852 \param hHal - The handle returned by macOpen.
1853
1854 \param device_mode the mode of the device
1855
c_hpothu0b0cab72014-02-13 21:52:40 +05301856 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301857
1858 \return eHalStatus SUCCESS.
1859
1860 FAILURE or RESOURCES The API finished and failed.
1861
1862 -------------------------------------------------------------------------------*/
1863eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1864 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301865 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301866
Jeff Johnson295189b2012-06-20 16:38:30 -07001867
1868/* ---------------------------------------------------------------------------
1869 \fn sme_BtcSignalBtEvent
1870 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1871 BT event type and the current operating mode of Libra (full power,
1872 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1873 would be employed.
1874 \param hHal - The handle returned by macOpen.
1875 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1876 Caller owns the memory and is responsible for freeing it.
1877 \return VOS_STATUS
1878 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1879 if driver has not yet been initialized or if BTC
1880 Events Layer has been disabled.
1881 VOS_STATUS_SUCCESS BT Event passed to HAL
1882 ---------------------------------------------------------------------------*/
1883VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1884
1885/* ---------------------------------------------------------------------------
1886 \fn sme_BtcSetConfig
1887 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1888 This function should be invoked only after CFG download has completed.
1889 Calling it after sme_HDDReadyInd is recommended.
1890 \param hHal - The handle returned by macOpen.
1891 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1892 tSmeBtcConfig. Caller owns the memory and is responsible
1893 for freeing it.
1894 \return VOS_STATUS
1895 VOS_STATUS_E_FAILURE Config not passed to HAL.
1896 VOS_STATUS_SUCCESS Config passed to HAL
1897 ---------------------------------------------------------------------------*/
1898VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1899
1900/* ---------------------------------------------------------------------------
1901 \fn sme_BtcGetConfig
1902 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1903 \param hHal - The handle returned by macOpen.
1904 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1905 Caller owns the memory and is responsible for freeing it.
1906 \return VOS_STATUS
1907 VOS_STATUS_E_FAILURE - failure
1908 VOS_STATUS_SUCCESS success
1909 ---------------------------------------------------------------------------*/
1910VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1911
1912/* ---------------------------------------------------------------------------
1913 \fn sme_SetCfgPrivacy
1914 \brief API to set configure privacy parameters
1915 \param hHal - The handle returned by macOpen.
1916 \param pProfile - Pointer CSR Roam profile.
1917 \param fPrivacy - This parameter indicates status of privacy
1918
1919 \return void
1920 ---------------------------------------------------------------------------*/
1921void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1922
1923#if defined WLAN_FEATURE_VOWIFI
1924/* ---------------------------------------------------------------------------
1925 \fn sme_NeighborReportRequest
1926 \brief API to request neighbor report.
1927 \param hHal - The handle returned by macOpen.
1928 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1929 tRrmNeighborReq. Caller owns the memory and is responsible
1930 for freeing it.
1931 \return VOS_STATUS
1932 VOS_STATUS_E_FAILURE - failure
1933 VOS_STATUS_SUCCESS success
1934 ---------------------------------------------------------------------------*/
1935VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1936 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1937#endif
1938
1939//The following are debug APIs to support direct read/write register/memory
1940//They are placed in SME because HW cannot be access when in LOW_POWER state
1941//AND not connected. The knowledge and synchronization is done in SME
1942
1943//sme_DbgReadRegister
1944//Caller needs to validate the input values
1945VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1946
1947//sme_DbgWriteRegister
1948//Caller needs to validate the input values
1949VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1950
1951//sme_DbgReadMemory
1952//Caller needs to validate the input values
1953//pBuf caller allocated buffer has the length of nLen
1954VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1955
1956//sme_DbgWriteMemory
1957//Caller needs to validate the input values
1958VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1959
Jeff Johnson295189b2012-06-20 16:38:30 -07001960VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1961 tSirVersionType *pVersion);
1962VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1963 tSirVersionType *pVersion);
1964VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1965 tANI_U8 *pVersion,
1966 tANI_U32 versionBufferSize);
1967VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1968 tANI_U8 *pVersion,
1969 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001970eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1971 csrRoamCompleteCallback callback,
1972 void *pContext);
1973
1974#ifdef FEATURE_WLAN_WAPI
1975/* ---------------------------------------------------------------------------
1976 \fn sme_RoamSetBKIDCache
1977 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1978 candidate list.
1979 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1980 it is opened (by calling halOpen).
1981 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1982 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1983 when retruning, this is the number of items put into pBKIDCache
1984 \return eHalStatus - when fail, it usually means the buffer allocated is not
1985 big enough and pNumItems has the number of tBkidCacheInfo.
1986 ---------------------------------------------------------------------------*/
1987eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1988 tANI_U32 numItems );
1989
1990/* ---------------------------------------------------------------------------
1991 \fn sme_RoamGetBKIDCache
1992 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1993 BKID cache.
1994 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1995 it is opened (by calling halOpen).
1996 \param pNum - caller allocated memory that has the space of the number of
1997 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1998 in SME cache.
1999 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
2000 upon return
2001 \return eHalStatus - when fail, it usually means the buffer allocated is not
2002 big enough.
2003 ---------------------------------------------------------------------------*/
2004eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
2005 tBkidCacheInfo *pBkidCache);
2006
2007/* ---------------------------------------------------------------------------
2008 \fn sme_RoamGetNumBKIDCache
2009 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2010 number of BKID cache entries.
2011 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2012 it is opened (by calling halOpen).
2013 \return tANI_U32 - the number of BKID cache entries.
2014 ---------------------------------------------------------------------------*/
2015tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2016
2017/* ---------------------------------------------------------------------------
2018 \fn sme_ScanGetBKIDCandidateList
2019 \brief a wrapper function to return the BKID candidate list
2020 \param pBkidList - caller allocated buffer point to an array of
2021 tBkidCandidateInfo
2022 \param pNumItems - pointer to a variable that has the number of
2023 tBkidCandidateInfo allocated when retruning, this is
2024 either the number needed or number of items put into
2025 pPmkidList
2026 \return eHalStatus - when fail, it usually means the buffer allocated is not
2027 big enough and pNumItems
2028 has the number of tBkidCandidateInfo.
2029 \Note: pNumItems is a number of tBkidCandidateInfo,
2030 not sizeof(tBkidCandidateInfo) * something
2031 ---------------------------------------------------------------------------*/
2032eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2033 tBkidCandidateInfo *pBkidList,
2034 tANI_U32 *pNumItems );
2035#endif /* FEATURE_WLAN_WAPI */
2036
Jeff Johnsone7245742012-09-05 17:12:55 -07002037#ifdef FEATURE_OEM_DATA_SUPPORT
2038/********************************************************************************************
2039 Oem data related modifications
2040*********************************************************************************************/
2041/* ---------------------------------------------------------------------------
2042 \fn sme_OemDataReq
2043 \param sessionId - session id of session to be used for oem data req.
2044 \param pOemDataReqID - pointer to an object to get back the request ID
2045 \param callback - a callback function that is called upon finish
2046 \param pContext - a pointer passed in for the callback
2047 \return eHalStatus
2048 ---------------------------------------------------------------------------*/
2049eHalStatus sme_OemDataReq(tHalHandle hHal,
2050 tANI_U8 sessionId,
2051 tOemDataReqConfig *,
2052 tANI_U32 *pOemDataReqID,
2053 oemData_OemDataReqCompleteCallback callback,
2054 void *pContext);
2055
2056/* ---------------------------------------------------------------------------
2057 \fn sme_getOemDataRsp
2058 \param pOemDataRsp - A pointer to the response object
2059 \param pOemDataReqID - pointer to an object to get back the request ID
2060 \return eHalStatus
2061 ---------------------------------------------------------------------------*/
2062eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2063 tOemDataRsp **pOemDataRsp);
2064
2065#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002066
2067
Jeff Johnson295189b2012-06-20 16:38:30 -07002068
2069/* ---------------------------------------------------------------------------
2070
2071 \fn sme_RoamUpdateAPWPSIE
2072
2073 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2074 This is an asynchronous API.
2075
2076 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2077
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002078 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002079
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002080 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002081
2082 -------------------------------------------------------------------------------*/
2083
2084eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2085/* ---------------------------------------------------------------------------
2086
2087 \fn sme_RoamUpdateAPWPARSNIEs
2088
2089 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2090 This is an asynchronous API.
2091
2092 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2093
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002094 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002095
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002096 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002097
2098 -------------------------------------------------------------------------------*/
2099eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2100
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002101/* ---------------------------------------------------------------------------
2102
2103 sme_ChangeMCCBeaconInterval
2104
2105 \brief To update P2P-GO's beacon Interval.
2106
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002107 \return eHalStatus SUCCESS
2108 FAILURE or RESOURCES
2109 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002110 -------------------------------------------------------------------------------*/
2111eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2112
2113
Jeff Johnson295189b2012-06-20 16:38:30 -07002114
2115/* ---------------------------------------------------------------------------
2116 \fn sme_sendBTAmpEvent
2117 \brief API to send the btAMPstate to FW
2118 \param hHal - The handle returned by macOpen.
2119 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002120 \return eHalStatus SUCCESS
2121 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002122
2123--------------------------------------------------------------------------- */
2124
2125eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2126
2127
2128
2129/* ---------------------------------------------------------------------------
2130 \fn sme_SetHostOffload
2131 \brief API to set the host offload feature.
2132 \param hHal - The handle returned by macOpen.
2133 \param pRequest - Pointer to the offload request.
2134 \return eHalStatus
2135 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002136eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2137 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002138
2139/* ---------------------------------------------------------------------------
2140 \fn sme_SetKeepAlive
2141 \brief API to set the Keep Alive feature.
2142 \param hHal - The handle returned by macOpen.
2143 \param pRequest - Pointer to the Keep Alive request.
2144 \return eHalStatus
2145 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002146eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2147 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002148
Jeff Johnson295189b2012-06-20 16:38:30 -07002149/* ----------------------------------------------------------------------------
2150 \fn sme_GetOperationChannel
2151 \brief API to get current channel on which STA is parked
2152 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002153 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002154 \returns eHAL_STATUS_SUCCESS
2155 eHAL_STATUS_FAILURE
2156-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002157eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002158
Jeff Johnson295189b2012-06-20 16:38:30 -07002159/* ---------------------------------------------------------------------------
2160
2161 \fn sme_RegisterMgtFrame
2162
2163 \brief To register managment frame of specified type and subtype.
2164 \param frameType - type of the frame that needs to be passed to HDD.
2165 \param matchData - data which needs to be matched before passing frame
2166 to HDD.
2167 \param matchDataLen - Length of matched data.
2168 \return eHalStatus
2169 -------------------------------------------------------------------------------*/
2170eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2171 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2172
2173/* ---------------------------------------------------------------------------
2174
2175 \fn sme_DeregisterMgtFrame
2176
2177 \brief To De-register managment frame of specified type and subtype.
2178 \param frameType - type of the frame that needs to be passed to HDD.
2179 \param matchData - data which needs to be matched before passing frame
2180 to HDD.
2181 \param matchDataLen - Length of matched data.
2182 \return eHalStatus
2183 -------------------------------------------------------------------------------*/
2184eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2185 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302186/* ---------------------------------------------------------------------------
2187 \fn sme_GetFramesLog
2188 \brief a wrapper function that client calls to register a callback to get
2189 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302190 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302191 \return eHalStatus
2192 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302193eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002194/* ---------------------------------------------------------------------------
2195
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302196 \fn sme_InitMgmtFrameLogging
2197
2198 \brief
2199 SME will pass this request to lower mac to initialize Frame Logging.
2200
2201 \param
2202
2203 hHal - The handle returned by macOpen.
2204
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302205 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302206
2207 \return eHalStatus
2208--------------------------------------------------------------------------- */
2209eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302210 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302211
2212/* ---------------------------------------------------------------------------
2213
Jeff Johnson295189b2012-06-20 16:38:30 -07002214 \fn sme_ConfigureRxpFilter
2215
2216 \brief
2217 SME will pass this request to lower mac to set/reset the filter on RXP for
2218 multicast & broadcast traffic.
2219
2220 \param
2221
2222 hHal - The handle returned by macOpen.
2223
2224 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2225 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2226 on this param. In future we can use this as a mask to set various types of
2227 filters as suggested below:
2228 FILTER_ALL_MULTICAST:
2229 FILTER_ALL_BROADCAST:
2230 FILTER_ALL_MULTICAST_BROADCAST:
2231
2232
2233 \return eHalStatus
2234
2235
2236--------------------------------------------------------------------------- */
2237eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2238 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2239
2240/* ---------------------------------------------------------------------------
2241
2242 \fn sme_ConfigureAppsCpuWakeupState
2243
2244 \brief
2245 SME will pass this request to lower mac to dynamically adjusts the listen
2246 interval based on the WLAN/MSM activity. This feature is named as
2247 Telescopic Beacon wakeup feature.
2248
2249 \param
2250
2251 hHal - The handle returned by macOpen.
2252
2253 isAppsAwake- Depicts the state of the Apps CPU
2254
2255
2256 \return eHalStatus
2257
2258
2259--------------------------------------------------------------------------- */
2260eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2261
Jeff Johnson295189b2012-06-20 16:38:30 -07002262/* ---------------------------------------------------------------------------
2263
2264 \fn sme_ConfigureSuspendInd
2265
2266 \brief
2267 SME will pass this request to lower mac to Indicate that the wlan needs to
2268 be suspended
2269
2270 \param
2271
2272 hHal - The handle returned by macOpen.
2273
2274 wlanSuspendParam- Depicts the wlan suspend params
2275
2276
2277 \return eHalStatus
2278
2279
2280--------------------------------------------------------------------------- */
2281eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2282 tpSirWlanSuspendParam wlanSuspendParam);
2283
2284/* ---------------------------------------------------------------------------
2285
2286 \fn sme_ConfigureResumeReq
2287
2288 \brief
2289 SME will pass this request to lower mac to Indicate that the wlan needs to
2290 be Resumed
2291
2292 \param
2293
2294 hHal - The handle returned by macOpen.
2295
2296 wlanResumeParam- Depicts the wlan resume params
2297
2298
2299 \return eHalStatus
2300
2301
2302--------------------------------------------------------------------------- */
2303eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2304 tpSirWlanResumeParam wlanResumeParam);
2305
Jeff Johnson295189b2012-06-20 16:38:30 -07002306
2307/* ---------------------------------------------------------------------------
2308
2309 \fn sme_GetInfraSessionId
2310
2311 \brief To get the session ID for infra session, if connected
2312 This is a synchronous API.
2313
2314 \param hHal - The handle returned by macOpen.
2315
2316 \return sessionid, -1 if infra session is not connected
2317
2318 -------------------------------------------------------------------------------*/
2319tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2320
2321/* ---------------------------------------------------------------------------
2322
2323 \fn sme_GetInfraOperationChannel
2324
2325 \brief To get the operating channel for infra session, if connected
2326 This is a synchronous API.
2327
2328 \param hHal - The handle returned by macOpen.
2329 \param sessionId - the sessionId returned by sme_OpenSession.
2330
2331 \return operating channel, 0 if infra session is not connected
2332
2333 -------------------------------------------------------------------------------*/
2334tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2335/* ---------------------------------------------------------------------------
2336
2337 \fn sme_GetConcurrentOperationChannel
2338
2339 \brief To get the operating channel for other concurrent sessions, if connected
2340 This is a synchronous API.
2341
2342 \param hHal - The handle returned by macOpen.
2343 \param currentPersona - persona that is trying to come up.
2344
2345 \return operating channel, 0 if infra session is not connected
2346
2347 -------------------------------------------------------------------------------*/
2348tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2349
2350/* ---------------------------------------------------------------------------
2351 \fn sme_AbortMacScan
2352 \brief API to cancel MAC scan.
2353 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302354 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302355 \return tSirAbortScanStatus return status abort scan
2356
Jeff Johnson295189b2012-06-20 16:38:30 -07002357 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302358tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2359 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002360
2361/* ---------------------------------------------------------------------------
2362 \fn sme_GetCfgValidChannels
2363 \brief API to get valid channel list
2364 \param hHal - The handle returned by macOpen.
2365 \param aValidChannels - Pointer to the valid channel list
2366 \param len - valid channel list length
2367 \return eHalStatus
2368 ---------------------------------------------------------------------------*/
2369eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2370
2371#ifdef FEATURE_WLAN_SCAN_PNO
2372
2373/* ---------------------------------------------------------------------------
2374 \fn sme_SetPreferredNetworkList
2375 \brief API to set the Preferred Network List Offload feature.
2376 \param hHal - The handle returned by macOpen.
2377 \param pRequest - Pointer to the offload request.
2378 \return eHalStatus
2379 ---------------------------------------------------------------------------*/
2380eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2381
2382/* ---------------------------------------------------------------------------
2383 \fn sme_SetRSSIFilter
2384 \brief API to set RSSI Filter feature.
2385 \param hHal - The handle returned by macOpen.
2386 \param pRequest - Pointer to the offload request.
2387 \return eHalStatus
2388 ---------------------------------------------------------------------------*/
2389eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2390
2391/******************************************************************************
2392*
2393* Name: sme_PreferredNetworkFoundInd
2394*
2395* Description:
2396* Invoke Preferred Network Found Indication
2397*
2398* Parameters:
2399* hHal - HAL handle for device
2400* pMsg - found network description
2401*
2402* Returns: eHalStatus
2403*
2404******************************************************************************/
2405eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2406#endif // FEATURE_WLAN_SCAN_PNO
2407
2408/* ---------------------------------------------------------------------------
2409 \fn sme_SetPowerParams
2410 \brief API to set Power Parameters
2411 \param hHal - The handle returned by macOpen.
2412 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002413 \param forced - if true, not to be dropped silently in host, it must reach
2414 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2415 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002416 \return eHalStatus
2417 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002418eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002419
2420/* ---------------------------------------------------------------------------
2421 \fn sme_SetTxPerTracking
2422 \brief Set Tx PER tracking configuration parameters
2423 \param hHal - The handle returned by macOpen.
2424 \param pTxPerTrackingParam - Tx PER configuration parameters
2425 \return eHalStatus
2426 ---------------------------------------------------------------------------*/
2427eHalStatus sme_SetTxPerTracking (
2428 tHalHandle hHal,
2429 void (*pCallbackfn) (void *pCallbackContext),
2430 void *pCallbackContext,
2431 tpSirTxPerTrackingParam pTxPerTrackingParam);
2432
2433#ifdef WLAN_FEATURE_PACKET_FILTERING
2434/* ---------------------------------------------------------------------------
2435 \fn sme_ReceiveFilterSetFilter
2436 \brief API to set 8023 Multicast Address List
2437 \param hHal - The handle returned by macOpen.
2438 \param pMulticastAddrs - Pointer to the Multicast Address List
2439 \return eHalStatus
2440 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002441eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002442
2443/* ---------------------------------------------------------------------------
2444 \fn sme_ReceiveFilterSetFilter
2445 \brief API to set Receive Packet Filter
2446 \param hHal - The handle returned by macOpen.
2447 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2448 \return eHalStatus
2449 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002450eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2451 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002452
2453/* ---------------------------------------------------------------------------
2454 \fn sme_GetFilterMatchCount
2455 \brief API to get D0 PC Filter Match Count
2456 \param hHal - The handle returned by macOpen
2457 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2458 \param callbackContext - Cookie to be passed back during callback
2459 \return eHalStatus
2460 ---------------------------------------------------------------------------*/
2461eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2462 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002463 void *callbackContext,
2464 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002465
2466/* ---------------------------------------------------------------------------
2467 \fn sme_ReceiveFilterClearFilter
2468 \brief API to clear Receive Packet Filter
2469 \param hHal - The handle returned by macOpen.
2470 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2471 \return eHalStatus
2472 ---------------------------------------------------------------------------*/
2473eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002474 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2475 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002476#endif // WLAN_FEATURE_PACKET_FILTERING
2477/* ---------------------------------------------------------------------------
2478
2479 \fn sme_IsChannelValid
2480 \brief To check if the channel is valid for currently established domain
2481 This is a synchronous API.
2482
2483 \param hHal - The handle returned by macOpen.
2484 \param channel - channel to verify
2485
2486 \return TRUE/FALSE, TRUE if channel is valid
2487
2488 -------------------------------------------------------------------------------*/
2489tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2490
2491/* ---------------------------------------------------------------------------
2492 \fn sme_SetFreqBand
2493 \brief Used to set frequency band.
2494 \param hHal
2495 \eBand band value to be configured
2496 \- return eHalStatus
2497 -------------------------------------------------------------------------*/
2498eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2499
2500/* ---------------------------------------------------------------------------
2501 \fn sme_GetFreqBand
2502 \brief Used to get the current band settings.
2503 \param hHal
2504 \pBand pointer to hold the current band value
2505 \- return eHalStatus
2506 -------------------------------------------------------------------------*/
2507eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2508
2509/* ---------------------------------------------------------------------------
2510
2511 \fn sme_SetTxPerTracking
2512 \brief Set Tx PER tracking configuration parameters
2513 \param hHal - The handle returned by macOpen.
2514 \param pTxPerTrackingParam - Tx PER configuration parameters
2515 \return eHalStatus
2516 ---------------------------------------------------------------------------*/
2517eHalStatus sme_SetTxPerTracking (
2518 tHalHandle hHal,
2519 void (*pCallbackfn) (void *pCallbackContext),
2520 void *pCallbackContext,
2521 tpSirTxPerTrackingParam pTxPerTrackingParam);
2522
2523#ifdef WLAN_FEATURE_GTK_OFFLOAD
2524/* ---------------------------------------------------------------------------
2525 \fn sme_SetGTKOffload
2526 \brief API to set GTK offload feature.
2527 \param hHal - The handle returned by macOpen.
2528 \param pRequest - Pointer to the GTK offload request.
2529 \return eHalStatus
2530 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002531eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002532
2533/* ---------------------------------------------------------------------------
2534 \fn sme_GetGTKOffload
2535 \brief API to get GTK offload information.
2536 \param hHal - The handle returned by macOpen.
2537 \param pRequest - Pointer to the GTK offload response.
2538 \return eHalStatus
2539 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002540eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2541 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002542#endif // WLAN_FEATURE_GTK_OFFLOAD
2543
2544#ifdef WLAN_WAKEUP_EVENTS
2545eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2546#endif // WLAN_WAKEUP_EVENTS
2547
2548/* ---------------------------------------------------------------------------
2549 \fn sme_SetTxPerTracking
2550 \brief Set Tx PER tracking configuration parameters
2551 \param hHal - The handle returned by macOpen.
2552 \param pTxPerTrackingParam - Tx PER configuration parameters
2553 \return eHalStatus
2554 ---------------------------------------------------------------------------*/
2555eHalStatus sme_SetTxPerTracking (
2556 tHalHandle hHal,
2557 void (*pCallbackfn) (void *pCallbackContext),
2558 void *pCallbackContext,
2559 tpSirTxPerTrackingParam pTxPerTrackingParam);
2560
2561
2562//return frequency for a particular channel
2563tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2564
2565tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2566
2567#if defined WLAN_FEATURE_P2P_INTERNAL
2568
2569eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2570
2571/* ---------------------------------------------------------------------------
2572 \fn sme_p2pFlushDeviceList
2573 \brief Remove cached P2P result from scan results
2574 \param hHal - The handle returned by macOpen.
2575 \param HDDSessionId - HDD's sessionId. Currently unused.
2576 \return eHalStatus
2577 ---------------------------------------------------------------------------*/
2578eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2579
2580eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2581 tCsrScanResultFilter *pFilter);
2582
2583#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2584
2585/* ---------------------------------------------------------------------------
2586 \fn sme_SetMaxTxPower
2587 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2588 setting will not persist over reboots
2589 \param hHal
2590 \param pBssid BSSID to set the power cap for
2591 \param pBssid pSelfMacAddress self MAC Address
2592 \param pBssid power to set in dB
2593 \- return eHalStatus
2594 -------------------------------------------------------------------------*/
2595eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2596 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2597
Jeff Johnson295189b2012-06-20 16:38:30 -07002598/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002599 \fn sme_SetMaxTxPowerPerBand
2600 \brief Used to set the Maximum Transmit Power for
2601 specific band dynamically. Note: this setting will not persist over reboots
2602 \param band
2603 \param power to set in dB
2604 \- return eHalStatus
2605 -------------------------------------------------------------------------*/
2606eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2607
2608/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002609
schang86c22c42013-03-13 18:41:24 -07002610 \fn sme_SetTxPower
2611
2612 \brief Set Transmit Power dynamically. Note: this setting will
2613 not persist over reboots.
2614
2615 \param hHal
2616 \param sessionId Target Session ID
2617 \param mW power to set in mW
2618 \- return eHalStatus
2619
2620 -------------------------------------------------------------------------------*/
2621eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2622
2623/* ---------------------------------------------------------------------------
2624
Jeff Johnson295189b2012-06-20 16:38:30 -07002625 \fn sme_HideSSID
2626
2627 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2628 not persist over reboots.
2629
2630 \param hHal
2631 \param sessionId
2632 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2633 \- return eHalStatus
2634
2635 -------------------------------------------------------------------------------*/
2636eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002637
2638/* ---------------------------------------------------------------------------
2639
2640 \fn sme_SetTmLevel
2641 \brief Set Thermal Mitigation Level to RIVA
2642 \param hHal - The handle returned by macOpen.
2643 \param newTMLevel - new Thermal Mitigation Level
2644 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002645 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002646 ---------------------------------------------------------------------------*/
2647eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2648
2649/*---------------------------------------------------------------------------
2650
2651 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2652 Host and FW.
2653
2654 \param hHal - HAL handle for device
2655
2656 \return NONE
2657
2658---------------------------------------------------------------------------*/
2659void sme_featureCapsExchange(tHalHandle hHal);
2660
Jeff Johnsond13512a2012-07-17 11:42:19 -07002661/*---------------------------------------------------------------------------
2662
Yathish9f22e662012-12-10 14:21:35 -08002663 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2664 between in Host.
2665
2666 \param hHal - HAL handle for device
2667
2668 \return NONE
2669
2670---------------------------------------------------------------------------*/
2671void sme_disableFeatureCapablity(tANI_U8 feature_index);
2672
2673/*---------------------------------------------------------------------------
2674
Jeff Johnsond13512a2012-07-17 11:42:19 -07002675 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2676 country code
2677 Host and FW.
2678
2679 \param hHal - HAL handle for device
2680 \param pCountry - pointer to country code
2681
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002682 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002683
2684 ---------------------------------------------------------------------------*/
2685eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2686
2687/*---------------------------------------------------------------------------
2688
2689 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2690 country code.
2691
2692 \param hHal - HAL handle for device
2693 \param pCountry - pointer to country code
2694
2695 \return Success or failure
2696
2697 ---------------------------------------------------------------------------*/
2698eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2699
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002700/* ---------------------------------------------------------------------------
2701 \fn sme_transportDebug
2702 \brief Dynamically monitoring Transport channels
2703 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002704 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002705 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002706 \param toggleStallDetect Enable stall detect feature
2707 This feature will take effect to data performance
2708 Not integrate till fully verification
2709 \- return NONE
2710 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002711void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002712
Kiran4a17ebe2013-01-31 10:43:43 -08002713/* ---------------------------------------------------------------------------
2714 \fn sme_ResetPowerValuesFor5G
2715 \brief Reset the power values for 5G band with NV power values.
2716 \param hHal - HAL handle for device
2717 \- return NONE
2718 -------------------------------------------------------------------------*/
2719void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2720
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002721#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002722/* ---------------------------------------------------------------------------
2723 \fn sme_UpdateRoamPrefer5GHz
2724 \brief enable/disable Roam prefer 5G runtime option
2725 This function is called through dynamic setConfig callback function
2726 to configure the Roam prefer 5G runtime option
2727 \param hHal - HAL handle for device
2728 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2729 \- return Success or failure
2730 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002731eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002732
2733/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002734 \fn sme_setRoamIntraBand
2735 \brief enable/disable Intra band roaming
2736 This function is called through dynamic setConfig callback function
2737 to configure the intra band roaming
2738 \param hHal - HAL handle for device
2739 \param nRoamIntraBand Enable/Disable Intra band roaming
2740 \- return Success or failure
2741 -------------------------------------------------------------------------*/
2742eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2743
2744/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002745 \fn sme_UpdateRoamScanNProbes
2746 \brief function to update roam scan N probes
2747 This function is called through dynamic setConfig callback function
2748 to update roam scan N probes
2749 \param hHal - HAL handle for device
2750 \param nProbes number of probe requests to be sent out
2751 \- return Success or failure
2752 -------------------------------------------------------------------------*/
2753eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2754
2755/* ---------------------------------------------------------------------------
2756 \fn sme_UpdateRoamScanHomeAwayTime
2757 \brief function to update roam scan Home away time
2758 This function is called through dynamic setConfig callback function
2759 to update roam scan home away time
2760 \param hHal - HAL handle for device
2761 \param nRoamScanAwayTime Scan home away time
2762 \- return Success or failure
2763 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002764eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2765 const v_U16_t nRoamScanHomeAwayTime,
2766 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002767
2768/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002769 \fn sme_getRoamIntraBand
2770 \brief get Intra band roaming
2771 \param hHal - HAL handle for device
2772 \- return Success or failure
2773 -------------------------------------------------------------------------*/
2774v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2775
2776/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002777 \fn sme_getRoamScanNProbes
2778 \brief get N Probes
2779 \param hHal - HAL handle for device
2780 \- return Success or failure
2781 -------------------------------------------------------------------------*/
2782v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2783
2784/* ---------------------------------------------------------------------------
2785 \fn sme_getRoamScanHomeAwayTime
2786 \brief get Roam scan home away time
2787 \param hHal - HAL handle for device
2788 \- return Success or failure
2789 -------------------------------------------------------------------------*/
2790v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2791
2792/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002793 \fn sme_UpdateImmediateRoamRssiDiff
2794 \brief Update nImmediateRoamRssiDiff
2795 This function is called through dynamic setConfig callback function
2796 to configure nImmediateRoamRssiDiff
2797 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2798 \param hHal - HAL handle for device
2799 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2800 candidate and current AP.
2801 \- return Success or failure
2802 -------------------------------------------------------------------------*/
2803
2804eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002805
Srinivas Girigowdade697412013-02-14 16:31:48 -08002806/* ---------------------------------------------------------------------------
2807 \fn sme_UpdateRoamRssiDiff
2808 \brief Update RoamRssiDiff
2809 This function is called through dynamic setConfig callback function
2810 to configure RoamRssiDiff
2811 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2812 \param hHal - HAL handle for device
2813 \param RoamRssiDiff - minimum rssi difference between potential
2814 candidate and current AP.
2815 \- return Success or failure
2816 -------------------------------------------------------------------------*/
2817
2818eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2819
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002820/*--------------------------------------------------------------------------
2821 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2822 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2823 isFastTransitionEnabled.
2824 This is a synchronuous call
2825 \param hHal - The handle returned by macOpen.
2826 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2827 Other status means SME is failed to update isFastTransitionEnabled.
2828 \sa
2829 --------------------------------------------------------------------------*/
2830
2831eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2832 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002833
2834/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002835 \fn sme_UpdateWESMode
2836 \brief Update WESMode
2837 This function is called through dynamic setConfig callback function
2838 to configure isWESModeEnabled
2839 \param hHal - HAL handle for device
2840 \param isWESModeEnabled - Enable/Disable WES Mode
2841 \- return Success or failure
2842 -------------------------------------------------------------------------*/
2843eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2844
2845/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002846 \fn sme_SetRoamScanControl
2847 \brief Set roam scan control
2848 This function is called to set roam scan control
2849 if roam scan control is set to 0, roaming scan cache is cleared
2850 any value other than 0 is treated as invalid value
2851 \param hHal - HAL handle for device
2852 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2853 Other status means SME failure to update
2854 -------------------------------------------------------------------------*/
2855eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002856#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002857
2858#ifdef FEATURE_WLAN_LFR
2859/*--------------------------------------------------------------------------
2860 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002861 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002862 isFastRoamIniFeatureEnabled.
2863 This is a synchronuous call
2864 \param hHal - The handle returned by macOpen.
2865 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2866 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2867 \sa
2868 --------------------------------------------------------------------------*/
2869
Srinivas Girigowdade697412013-02-14 16:31:48 -08002870eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002871 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002872
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002873/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302874 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2875 When Supplicant issue enabled / disable fwr based roaming on the basis
2876 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2877
2878 This is a synchronous call
2879 \param hHal - The handle returned by macOpen.
2880 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2881 Other status means SME is failed to (enabled/disabled) offload scan.
2882 \sa
2883 --------------------------------------------------------------------------*/
2884
2885eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2886 const v_BOOL_t isFastRoamEnabled);
2887
2888/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002889 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2890 Enable/disable LFR MAWC support at runtime
2891 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2892 isMAWCIniFeatureEnabled.
2893 This is a synchronous call
2894 \param hHal - The handle returned by macOpen.
2895 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2896 Other status means SME is failed to update MAWCEnabled.
2897 \sa
2898 --------------------------------------------------------------------------*/
2899eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2900 const v_BOOL_t MAWCEnabled);
2901
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002902
2903#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2904/*--------------------------------------------------------------------------
2905 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2906 This is a synchronuous call
2907 \param hHal - The handle returned by macOpen.
2908 \return eHAL_STATUS_SUCCESS
2909 Other status means SME is failed
2910 \sa
2911 --------------------------------------------------------------------------*/
2912
2913eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2914 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2915#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002916#endif /* FEATURE_WLAN_LFR */
2917
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002918#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002919/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002920 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002921 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002922 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002923 This is a synchronuous call
2924 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002925 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2926 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002927 \sa
2928 --------------------------------------------------------------------------*/
2929
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002930eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2931 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002932
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002933#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002934
2935/*--------------------------------------------------------------------------
2936 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2937 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2938 fEnableFwRssiMonitoring.
2939 This is a synchronuous call
2940 \param hHal - The handle returned by macOpen.
2941 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2942 Other status means SME is failed to update
2943 \sa
2944 --------------------------------------------------------------------------*/
2945
2946eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2947 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002948
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002949#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002950/*--------------------------------------------------------------------------
2951 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2952 This is a synchronuous call
2953 \param hHal - The handle returned by macOpen.
2954 \return eHAL_STATUS_SUCCESS - SME update config successful.
2955 Other status means SME is failed to update
2956 \sa
2957 --------------------------------------------------------------------------*/
2958eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2959 v_U8_t neighborLookupRssiThreshold);
2960
2961/*--------------------------------------------------------------------------
2962 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2963 This is a synchronuous call
2964 \param hHal - The handle returned by macOpen.
2965 \return eHAL_STATUS_SUCCESS - SME update config successful.
2966 Other status means SME is failed to update
2967 \sa
2968 --------------------------------------------------------------------------*/
2969eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2970 v_U8_t neighborReassocRssiThreshold);
2971
2972/*--------------------------------------------------------------------------
2973 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2974 This is a synchronuous call
2975 \param hHal - The handle returned by macOpen.
2976 \return eHAL_STATUS_SUCCESS - SME update config successful.
2977 Other status means SME is failed to update
2978 \sa
2979 --------------------------------------------------------------------------*/
2980v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2981
2982/*--------------------------------------------------------------------------
2983 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2984 This is a synchronuous call
2985 \param hHal - The handle returned by macOpen.
2986 \return eHAL_STATUS_SUCCESS - SME update config successful.
2987 Other status means SME is failed to update
2988 \sa
2989 --------------------------------------------------------------------------*/
2990eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2991 v_U16_t neighborScanResultsRefreshPeriod);
2992
2993/*--------------------------------------------------------------------------
2994 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2995 This is a synchronuous call
2996 \param hHal - The handle returned by macOpen.
2997 \return eHAL_STATUS_SUCCESS - SME update config successful.
2998 Other status means SME is failed to update
2999 \sa
3000 --------------------------------------------------------------------------*/
3001v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
3002
3003/*--------------------------------------------------------------------------
3004 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3005 This is a synchronuous call
3006 \param hHal - The handle returned by macOpen.
3007 \return eHAL_STATUS_SUCCESS - SME update config successful.
3008 Other status means SME is failed to update
3009 \sa
3010 --------------------------------------------------------------------------*/
3011v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3012
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003013/* ---------------------------------------------------------------------------
3014 \fn sme_UpdateEmptyScanRefreshPeriod
3015 \brief Update nEmptyScanRefreshPeriod
3016 This function is called through dynamic setConfig callback function
3017 to configure nEmptyScanRefreshPeriod
3018 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3019 \param hHal - HAL handle for device
3020 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3021 \- return Success or failure
3022 -------------------------------------------------------------------------*/
3023eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3024
3025/* ---------------------------------------------------------------------------
3026 \fn sme_setNeighborScanMinChanTime
3027 \brief Update nNeighborScanMinChanTime
3028 This function is called through dynamic setConfig callback function
3029 to configure gNeighborScanChannelMinTime
3030 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3031 \param hHal - HAL handle for device
3032 \param nNeighborScanMinChanTime - Channel minimum dwell time
3033 \- return Success or failure
3034 -------------------------------------------------------------------------*/
3035eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3036
3037/* ---------------------------------------------------------------------------
3038 \fn sme_setNeighborScanMaxChanTime
3039 \brief Update nNeighborScanMaxChanTime
3040 This function is called through dynamic setConfig callback function
3041 to configure gNeighborScanChannelMaxTime
3042 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3043 \param hHal - HAL handle for device
3044 \param nNeighborScanMinChanTime - Channel maximum dwell time
3045 \- return Success or failure
3046 -------------------------------------------------------------------------*/
3047eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3048
3049/* ---------------------------------------------------------------------------
3050 \fn sme_getNeighborScanMinChanTime
3051 \brief get neighbor scan min channel time
3052 \param hHal - The handle returned by macOpen.
3053 \return v_U16_t - channel min time value
3054 -------------------------------------------------------------------------*/
3055v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3056
3057/* ---------------------------------------------------------------------------
3058 \fn sme_getNeighborScanMaxChanTime
3059 \brief get neighbor scan max channel time
3060 \param hHal - The handle returned by macOpen.
3061 \return v_U16_t - channel max time value
3062 -------------------------------------------------------------------------*/
3063v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3064
3065/* ---------------------------------------------------------------------------
3066 \fn sme_setNeighborScanPeriod
3067 \brief Update nNeighborScanPeriod
3068 This function is called through dynamic setConfig callback function
3069 to configure nNeighborScanPeriod
3070 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3071 \param hHal - HAL handle for device
3072 \param nNeighborScanPeriod - neighbor scan period
3073 \- return Success or failure
3074 -------------------------------------------------------------------------*/
3075eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3076
3077/* ---------------------------------------------------------------------------
3078 \fn sme_getNeighborScanPeriod
3079 \brief get neighbor scan period
3080 \param hHal - The handle returned by macOpen.
3081 \return v_U16_t - neighbor scan period
3082 -------------------------------------------------------------------------*/
3083v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3084
3085#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003086
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003087#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003088/*--------------------------------------------------------------------------
3089 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3090 This is a synchronuous call
3091 \param hHal - The handle returned by macOpen.
3092 \return eHAL_STATUS_SUCCESS - SME update config successful.
3093 Other status means SME is failed to update
3094 \sa
3095 --------------------------------------------------------------------------*/
3096v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3097
3098/*--------------------------------------------------------------------------
3099 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3100 This is a synchronuous call
3101 \param hHal - The handle returned by macOpen.
3102 \return eHAL_STATUS_SUCCESS - SME update config successful.
3103 Other status means SME is failed to update
3104 \sa
3105 --------------------------------------------------------------------------*/
3106eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3107 tANI_U8 numChannels);
3108
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003109#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003110/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003111 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003112 This is a synchronuous call
3113 \param hHal - The handle returned by macOpen.
3114 \return eHAL_STATUS_SUCCESS - SME update config successful.
3115 Other status means SME is failed to update
3116 \sa
3117 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003118eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003119 tANI_U8 *pChannelList,
3120 tANI_U8 numChannels);
3121#endif
3122
Srinivas Girigowdade697412013-02-14 16:31:48 -08003123/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003124 \brief sme_getRoamScanChannelList() - get roam scan channel list
3125 This is a synchronuous call
3126 \param hHal - The handle returned by macOpen.
3127 \return eHAL_STATUS_SUCCESS - SME update config successful.
3128 Other status means SME is failed to update
3129 \sa
3130 --------------------------------------------------------------------------*/
3131eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3132 tANI_U8 *pNumChannels);
3133
3134/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003135 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003136 This is a synchronuous call
3137 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003138 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003139 FALSE (0) - if feature is disabled (compile or runtime)
3140 \sa
3141 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003142tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003143
3144/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003145 \brief sme_getWESMode() - getWES Mode
3146 This is a synchronous call
3147 \param hHal - The handle returned by macOpen.
3148 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3149 \sa
3150 --------------------------------------------------------------------------*/
3151v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3152
3153/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003154 \brief sme_GetRoamScanControl() - get scan control
3155 This is a synchronous call
3156 \param hHal - The handle returned by macOpen.
3157 \return v_BOOL_t - Enabled(1)/Disabled(0)
3158 \sa
3159 --------------------------------------------------------------------------*/
3160v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3161
3162/* ---------------------------------------------------------------------------
3163 \fn sme_UpdateEmptyScanRefreshPeriod
3164 \brief Update nnEmptyScanRefreshPeriod
3165 This function is called through dynamic setConfig callback function
3166 to configure nnEmptyScanRefreshPeriod
3167 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3168 \param hHal - HAL handle for device
3169 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3170 \- return Success or failure
3171 -------------------------------------------------------------------------*/
3172
3173/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003174 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3175 This is a synchronuous call
3176 \param hHal - The handle returned by macOpen.
3177 \return TRUE (1) - if the feature is enabled
3178 FALSE (0) - if feature is disabled (compile or runtime)
3179 \sa
3180 --------------------------------------------------------------------------*/
3181tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3182
3183/*--------------------------------------------------------------------------
3184 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3185 This is a synchronuous call
3186 \param hHal - The handle returned by macOpen.
3187 \return TRUE (1) - if the feature is enabled
3188 FALSE (0) - if feature is disabled (compile or runtime)
3189 \sa
3190 --------------------------------------------------------------------------*/
3191tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3192
Srinivas Girigowdade697412013-02-14 16:31:48 -08003193#endif
3194
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003195#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3196/*--------------------------------------------------------------------------
3197 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3198 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3199 gRoamScanOffloadEnabled.
3200 This is a synchronous call
3201 \param hHal - The handle returned by macOpen.
3202 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3203 Other status means SME is failed to update.
3204 \sa
3205 --------------------------------------------------------------------------*/
3206
3207eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3208#endif
3209
3210
Srinivas Girigowdade697412013-02-14 16:31:48 -08003211/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003212 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303213 \brief Check if a feature is enabled by FW
3214
3215 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003216 A value from enum placeHolderInCapBitmap
3217
3218 \- return 1/0 (TRUE/FALSE)
3219 -------------------------------------------------------------------------*/
3220tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303221
3222/* ---------------------------------------------------------------------------
3223 \fn sme_IsFeatureSupportedByDriver
3224 \brief Check if a feature is enabled by driver
3225
3226 \param featEnumValue - Enumeration value of the feature to be checked.
3227 A value from enum placeHolderInCapBitmap
3228
3229 \- return 1/0 (TRUE/FALSE)
3230 -------------------------------------------------------------------------*/
3231tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3232
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003233#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303234
3235/* ---------------------------------------------------------------------------
3236 \fn sme_SendTdlsLinkEstablishParams
3237 \brief API to send TDLS Link Establishment Parameters.
3238
3239 \param peerMac - peer's Mac Adress.
3240 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3241 \- return VOS_STATUS_SUCCES
3242 -------------------------------------------------------------------------*/
3243
3244VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
3245 tANI_U8 sessionId,
3246 tSirMacAddr peerMac,
3247 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
3248
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003249/* ---------------------------------------------------------------------------
3250 \fn sme_SendTdlsMgmtFrame
3251 \brief API to send TDLS management frames.
3252
3253 \param peerMac - peer's Mac Adress.
3254 \param frame_type - Type of TDLS mgmt frame to be sent.
3255 \param dialog - dialog token used in the frame.
3256 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303257 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003258 \param buf - additional IEs to be included
3259 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003260 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003261 \- return VOS_STATUS_SUCCES
3262 -------------------------------------------------------------------------*/
3263VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303264 tANI_U8 frame_type, tANI_U8 dialog, tANI_U16 status, tANI_U32 peerCapability, tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003265/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003266 \fn sme_ChangeTdlsPeerSta
3267 \brief API to Update TDLS peer sta parameters.
3268
3269 \param peerMac - peer's Mac Adress.
3270 \param staParams - Peer Station Parameters.
3271 \- return VOS_STATUS_SUCCES
3272 -------------------------------------------------------------------------*/
3273VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
3274 tCsrStaParams *pstaParams);
3275/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003276 \fn sme_AddTdlsPeerSta
3277 \brief API to Add TDLS peer sta entry.
3278
3279 \param peerMac - peer's Mac Adress.
3280 \- return VOS_STATUS_SUCCES
3281 -------------------------------------------------------------------------*/
3282VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3283/* ---------------------------------------------------------------------------
3284 \fn sme_DeleteTdlsPeerSta
3285 \brief API to Delete TDLS peer sta entry.
3286
3287 \param peerMac - peer's Mac Adress.
3288 \- return VOS_STATUS_SUCCES
3289 -------------------------------------------------------------------------*/
3290VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003291/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003292 \fn sme_SetTdlsPowerSaveProhibited
3293 \API to set/reset the isTdlsPowerSaveProhibited.
3294
3295 \- return void
3296 -------------------------------------------------------------------------*/
3297void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003298#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303299/* ---------------------------------------------------------------------------
3300 \fn sme_IsPmcBmps
3301 \brief API to Check if PMC state is BMPS.
3302
3303 \- return v_BOOL_t
3304 -------------------------------------------------------------------------*/
3305v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3306
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003307eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003308
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303309/* ---------------------------------------------------------------------------
3310 \fn sme_UpdateDFSRoamMode
3311 \brief Update DFS roam scan mode
3312 This function is called to configure allowDFSChannelRoam
3313 dynamically
3314 \param hHal - HAL handle for device
3315 \param allowDFSChannelRoam - DFS roaming scan mode
3316 mode 0 disable roam scan on DFS channels
3317 mode 1 enables roam scan (passive/active) on DFS channels
3318 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3319 successfully.
3320 Other status means SME failed to update DFS roaming scan config.
3321 \sa
3322 -------------------------------------------------------------------------*/
3323eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3324
3325/* ---------------------------------------------------------------------------
3326 \fn sme_UpdateDFSScanMode
3327 \brief Update DFS scan mode
3328 This function is called to configure fEnableDFSChnlScan.
3329 \param hHal - HAL handle for device
3330 \param dfsScanMode - DFS scan mode
3331 mode 0 disable scan on DFS channels
3332 mode 1 enables passive scan on DFS channels
3333 mode 2 enables active scan on DFS channels for static list
3334 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3335 successfully.
3336 Other status means SME failed to update DFS scan config.
3337 \sa
3338 -------------------------------------------------------------------------*/
3339eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3340
3341/*--------------------------------------------------------------------------
3342 \brief sme_GetDFSScanMode() - get DFS scan mode
3343 \param hHal - The handle returned by macOpen.
3344 \return DFS scan mode
3345 mode 0 disable scan on DFS channels
3346 mode 1 enables passive scan on DFS channels
3347 mode 2 enables active scan on DFS channels for static list
3348 \sa
3349 --------------------------------------------------------------------------*/
3350v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3351
3352/* ---------------------------------------------------------------------------
3353 \fn sme_HandleDFSChanScan
3354 \brief Gets Valid channel list and updates scan control list according to
3355 dfsScanMode
3356 \param hHal - HAL handle for device
3357 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3358 Otherwise eHAL_STATUS_SUCCESS -
3359 \sa
3360 -------------------------------------------------------------------------*/
3361eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3362
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003363/*
3364 * SME API to enable/disable WLAN driver initiated SSR
3365 */
3366void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3367
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303368/* ---------------------------------------------------------------------------
3369
3370 \fn sme_SetPhyMode
3371
3372 \brief Changes the PhyMode.
3373
3374 \param hHal - The handle returned by macOpen.
3375
3376 \param phyMode new phyMode which is to set
3377
3378 \return eHalStatus SUCCESS.
3379
3380 -------------------------------------------------------------------------------*/
3381eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3382
3383/* ---------------------------------------------------------------------------
3384
3385 \fn sme_GetPhyMode
3386
3387 \brief gets current PhyMode.
3388
3389 \param hHal - The handle returned by macOpen.
3390
3391 \return eHalStatus PhyMode
3392
3393 -------------------------------------------------------------------------------*/
3394eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3395
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003396/*
3397 * SME API to determine the channel bonding mode
3398 */
3399VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3400
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003401#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3402/*--------------------------------------------------------------------------
3403 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3404 from CSR.
3405 This is a synchronous call
3406 \param hHal - The handle returned by macOpen
3407 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3408 BSSID, channel etc.)
3409 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3410 Other status means SME is failed to send the request.
3411 \sa
3412 --------------------------------------------------------------------------*/
3413
3414eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3415#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003416/*--------------------------------------------------------------------------
3417 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3418 is any connected session .
3419 This is a synchronous call
3420 \param hHal - The handle returned by macOpen
3421 \return VOS_STATUS - SME passed the request to CSR successfully.
3422 Other status means SME is failed to send the request.
3423 \sa
3424 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003425VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003426
Agarwal Ashish57e84372014-12-05 18:26:53 +05303427/*--------------------------------------------------------------------------
3428 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3429 is any connected session .
3430 This is a synchronous call
3431 \param hHal - The handle returned by macOpen
3432 \return VOS_STATUS - SME passed the request to CSR successfully.
3433 Other status means SME is failed to send the request.
3434 \sa
3435 --------------------------------------------------------------------------*/
3436VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3437
Leo Chang9056f462013-08-01 19:21:11 -07003438#ifdef FEATURE_WLAN_LPHB
3439/* ---------------------------------------------------------------------------
3440 \fn sme_LPHBConfigReq
3441 \API to make configuration LPHB within FW.
3442 \param hHal - The handle returned by macOpen
3443 \param lphdReq - LPHB request argument by client
3444 \param pCallbackfn - LPHB timeout notification callback function pointer
3445 \- return Configuration message posting status, SUCCESS or Fail
3446 -------------------------------------------------------------------------*/
3447eHalStatus sme_LPHBConfigReq(
3448 tHalHandle hHal,
3449 tSirLPHBReq *lphdReq,
3450 void (*pCallbackfn)(void *pAdapter, void *indParam));
3451#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003452
3453/* ---------------------------------------------------------------------------
3454 \fn sme_AddPeriodicTxPtrn
3455 \brief API to Periodic TX Pattern Offload feature
3456 \param hHal - The handle returned by macOpen
3457 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3458 \return eHalStatus
3459 ---------------------------------------------------------------------------*/
3460eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3461 *addPeriodicTxPtrnParams);
3462
3463/* ---------------------------------------------------------------------------
3464 \fn sme_DelPeriodicTxPtrn
3465 \brief API to Periodic TX Pattern Offload feature
3466 \param hHal - The handle returned by macOpen
3467 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3468 \return eHalStatus
3469 ---------------------------------------------------------------------------*/
3470eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3471 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003472/*--------------------------------------------------------------------------
3473 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3474 scan parameter.
3475 This is a synchronous call
3476 \param hHal - The handle returned by macOpen
3477 \return None.
3478 \sa
3479 --------------------------------------------------------------------------*/
3480void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3481 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303482
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003483/* ---------------------------------------------------------------------------
3484 \fn sme_SendRateUpdateInd
3485 \brief API to Update rate
3486 \param hHal - The handle returned by macOpen
3487 \param rateUpdateParams - Pointer to rate update params
3488 \return eHalStatus
3489 ---------------------------------------------------------------------------*/
3490eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3491
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303492/*
3493 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3494 * triggers
3495 * return status
3496*/
3497eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3498 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303499 tSmeFastRoamTrigger fastRoamTrig,
3500 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303501
3502eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
3503 tANI_U8 *pBSSId,
3504 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003505
3506void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303507
3508#ifdef FEATURE_WLAN_BATCH_SCAN
3509/* ---------------------------------------------------------------------------
3510 \fn sme_SetBatchScanReq
3511 \brief API to set batch scan request in FW
3512 \param hHal - The handle returned by macOpen.
3513 \param pRequest - Pointer to the batch request.
3514 \param sessionId - session ID
3515 \param callbackRoutine - HDD callback which needs to be invoked after
3516 getting set batch scan response from FW
3517 \param callbackContext - pAdapter context
3518 \return eHalStatus
3519 ---------------------------------------------------------------------------*/
3520eHalStatus
3521sme_SetBatchScanReq
3522(
3523 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3524 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3525 void *callbackContext
3526);
3527
3528/* ---------------------------------------------------------------------------
3529 \fn sme_TriggerBatchScanResultInd
3530 \brief API to trigger batch scan result indications from from FW
3531 \param hHal - The handle returned by macOpen.
3532 \param pRequest - Pointer to get batch request.
3533 \param sessionId - session ID
3534 \param callbackRoutine - HDD callback which needs to be invoked after
3535 getting get batch scan response from FW
3536 \param callbackContext - pAdapter context
3537 \return eHalStatus
3538 ---------------------------------------------------------------------------*/
3539eHalStatus
3540sme_TriggerBatchScanResultInd
3541(
3542 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3543 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3544 void *callbackContext
3545);
3546
3547/* ---------------------------------------------------------------------------
3548 \fn sme_StopBatchScanInd
3549 \brief API to stop batch scan request in FW
3550 \param hHal - The handle returned by macOpen.
3551 \param pRequest - Pointer to stop batch indication
3552 \return eHalStatus
3553 ---------------------------------------------------------------------------*/
3554eHalStatus
3555sme_StopBatchScanInd
3556(
3557 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3558);
3559
3560#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003561
3562#ifdef FEATURE_WLAN_CH_AVOID
3563/* ---------------------------------------------------------------------------
3564 \fn sme_AddChAvoidCallback
3565 \brief Used to plug in callback function
3566 Which notify channel may not be used with SAP or P2PGO mode.
3567 Notification come from FW.
3568 \param hHal
3569 \param pCallbackfn : callback function pointer should be plugged in
3570 \- return eHalStatus
3571 -------------------------------------------------------------------------*/
3572eHalStatus sme_AddChAvoidCallback
3573(
3574 tHalHandle hHal,
3575 void (*pCallbackfn)(void *pAdapter, void *indParam)
3576);
3577#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003578eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303579/* ---------------------------------------------------------------------------
3580 \fn sme_requestTypetoString
3581 \brief API to convert requestType enum values
3582 to string.
3583 ---------------------------------------------------------------------------*/
3584const char * sme_requestTypetoString(const v_U8_t requestType);
3585/* ---------------------------------------------------------------------------
3586 \fn sme_PmcStatetoString
3587 \brief API to convert PmcState enum values
3588 to string.
3589 ---------------------------------------------------------------------------*/
3590const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303591
3592eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3593
Agarwal Ashish5e414792014-06-08 15:25:23 +05303594tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303595
3596// tdlsoffchan
3597VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3598 tANI_U8 sessionId,
3599 tSirMacAddr peerMac,
3600 tANI_S32 tdlsOffCh,
3601 tANI_S32 tdlsOffChBwOffset,
3602 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303603eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3604 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303605void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303606
3607void sme_resetCoexEevent(tHalHandle hHal);
3608
Peng Xu117eab42014-09-25 13:33:27 +05303609tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3610tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303611#ifdef WLAN_FEATURE_AP_HT40_24G
3612void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3613 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303614eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3615 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303616#endif
Peng Xu117eab42014-09-25 13:33:27 +05303617
Agarwal Ashish738843c2014-09-25 12:27:56 +05303618void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3619
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303620/* HDD Callback function */
3621typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3622
3623eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3624 u8 *pCmd,
3625 int length,
3626 pEncryptMsgRSPCb encCB);
3627
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303628/* ---------------------------------------------------------------------------
3629 \fn sme_RegisterBtCoexTDLSCallback
3630 \brief Used to plug in callback function
3631 Which notify btcoex on or off.
3632 Notification come from FW.
3633 \param hHal
3634 \param pCallbackfn : callback function pointer should be plugged in
3635 \- return eHalStatus
3636 -------------------------------------------------------------------------*/
3637eHalStatus sme_RegisterBtCoexTDLSCallback
3638(
3639 tHalHandle hHal,
3640 void (*pCallbackfn)(void *pAdapter, int)
3641);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303642
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303643/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303644 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303645
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303646 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303647
3648 \param hHal - The handle returned by macOpen.
3649
3650 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3651 eANI_BOOLEAN_FALSE otherwise
3652---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303653tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303654
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303655/* ---------------------------------------------------------------------------
3656
3657 \fn sme_IsTdlsOffChannelValid
3658 \brief To check if the channel is valid for currently established domain
3659 This is a synchronous API.
3660
3661 \param hHal - The handle returned by macOpen.
3662 \param channel - channel to verify
3663
3664 \return TRUE/FALSE, TRUE if channel is valid
3665
3666 -------------------------------------------------------------------------------*/
3667tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3668
Mukul Sharma4be88422015-03-09 20:29:07 +05303669/* --------------------------------------------------------------------------
3670
3671 \fn sme_IsCoexScoIndicationSet
3672 \brief To check if the BTC module in fwr has sent the SCO
3673 indication to host or not
3674
3675 \param hHal - The handle returned by macOpen.
3676 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3677
3678 --------------------------------------------------------------------------*/
3679tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3680
Abhishek Singh01c73d12015-03-12 15:13:44 +05303681eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3682 tANI_U32 iniNumBuffAdvert,
3683 tANI_U32 set_value);
3684
Mukul Sharma45063942015-04-01 20:07:59 +05303685void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303686
3687/* ---------------------------------------------------------------------------
3688 \fn sme_SetTdls2040BSSCoexistence
3689 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3690
3691 \param isEnabled - Enable or Disable.
3692 \- return VOS_STATUS_SUCCES
3693 -------------------------------------------------------------------------*/
3694eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3695
Abhishek Singh41988ba2015-05-25 19:42:29 +05303696/* ---------------------------------------------------------------------------
3697 \fn sme_SetRtsCtsHtVht
3698 \brief API to to enable/disable RTS/CTS for different modes.
3699
3700 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3701 \- return VOS_STATUS_SUCCES if INdication is posted to
3702 WDA else return eHAL_STATUS_FAILURE
3703 -------------------------------------------------------------------------*/
3704eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3705
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303706tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
3707 tANI_U8 fcc_constraint);
3708
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303709eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303710eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
3711 tANI_U32 indicator, tANI_U32 reason_code);
3712
Jeff Johnson295189b2012-06-20 16:38:30 -07003713#endif //#if !defined( __SME_API_H )