blob: 86f7f1e058196ea5619947ee498203a360a26a00 [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/* ---------------------------------------------------------------------------
819 \fn sme_RoamStopBss
820 \brief a wrapper function to request CSR to stop bss
821 \param sessionId - sessionId of SoftAP
822 \return eHalStatus
823 ---------------------------------------------------------------------------*/
824eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
825
826/* ---------------------------------------------------------------------------
827 \fn sme_RoamGetAssociatedStas
828 \brief To probe the list of associated stations from various modules of CORE stack.
829 \This is an asynchronous API.
830 \param sessionId - sessionId of SoftAP
831 \param modId - Module from whom list of associtated stations is to be probed.
832 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
833 \param pUsrContext - Opaque HDD context
834 \param pfnSapEventCallback - Sap event callback in HDD
835 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
836 \return eHalStatus
837 -------------------------------------------------------------------------------*/
838eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
839 VOS_MODULE_ID modId, void *pUsrContext,
840 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
841
842/* ---------------------------------------------------------------------------
843 \fn sme_RoamDisconnectSta
844 \brief To disassociate a station. This is an asynchronous API.
845 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
846 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
847 -------------------------------------------------------------------------------*/
848eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
849
850/* ---------------------------------------------------------------------------
851 \fn sme_RoamDeauthSta
852 \brief To disassociate a station. This is an asynchronous API.
853 \param hHal - Global structure
854 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530855 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700856 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
857 -------------------------------------------------------------------------------*/
858eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530859 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700860
861/* ---------------------------------------------------------------------------
862 \fn sme_RoamTKIPCounterMeasures
863 \brief To start or stop TKIP counter measures. This is an asynchronous API.
864 \param sessionId - sessionId of SoftAP
865 \param bEnable - Flag to start/stop TKIP countermeasures
866 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
867 -------------------------------------------------------------------------------*/
868eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
869
870/* ---------------------------------------------------------------------------
871 \fn sme_RoamGetWpsSessionOverlap
872 \brief To get the WPS PBC session overlap information.
873 \This is an asynchronous API.
874 \param sessionId - sessionId of SoftAP
875 \param pUsrContext - Opaque HDD context
876 \param pfnSapEventCallback - Sap event callback in HDD
877 \return eHalStatus
878 -------------------------------------------------------------------------------*/
879eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
880 void *pUsrContext, void *pfnSapEventCallback,
881 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700882
883/* ---------------------------------------------------------------------------
884 \fn sme_RoamGetConnectState
885 \brief a wrapper function to request CSR to return the current connect state
886 of Roaming
887 \return eHalStatus
888 ---------------------------------------------------------------------------*/
889eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
890
891/* ---------------------------------------------------------------------------
892 \fn sme_RoamGetConnectProfile
893 \brief a wrapper function to request CSR to return the current connect
894 profile. Caller must call csrRoamFreeConnectProfile after it is done
895 and before reuse for another csrRoamGetConnectProfile call.
896 \param pProfile - pointer to a caller allocated structure
897 tCsrRoamConnectedProfile
898 \return eHalStatus. Failure if not connected
899 ---------------------------------------------------------------------------*/
900eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
901 tCsrRoamConnectedProfile *pProfile);
902
903/* ---------------------------------------------------------------------------
904 \fn sme_RoamFreeConnectProfile
905 \brief a wrapper function to request CSR to free and reinitialize the
906 profile returned previously by csrRoamGetConnectProfile.
907 \param pProfile - pointer to a caller allocated structure
908 tCsrRoamConnectedProfile
909 \return eHalStatus.
910 ---------------------------------------------------------------------------*/
911eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
912 tCsrRoamConnectedProfile *pProfile);
913
914/* ---------------------------------------------------------------------------
915 \fn sme_RoamSetPMKIDCache
916 \brief a wrapper function to request CSR to return the PMKID candidate list
917 \param pPMKIDCache - caller allocated buffer point to an array of
918 tPmkidCacheInfo
919 \param numItems - a variable that has the number of tPmkidCacheInfo
920 allocated when retruning, this is either the number needed
921 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530922 \param update_entire_cache - if TRUE, then it overwrites the entire cache
923 with pPMKIDCache, else it updates entry by
924 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700925 \return eHalStatus - when fail, it usually means the buffer allocated is not
926 big enough and pNumItems has the number of
927 tPmkidCacheInfo.
928 \Note: pNumItems is a number of tPmkidCacheInfo,
929 not sizeof(tPmkidCacheInfo) * something
930 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530931eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
932 tPmkidCacheInfo *pPMKIDCache,
933 tANI_U32 numItems,
934 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700935
936/* ---------------------------------------------------------------------------
937 \fn sme_RoamGetSecurityReqIE
938 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
939 passes to PE to JOIN request or START_BSS request
940 This is a synchronuous call.
941 \param sessionId - returned by sme_OpenSession.
942 \param pLen - caller allocated memory that has the length of pBuf as input.
943 Upon returned, *pLen has the needed or IE length in pBuf.
944 \param pBuf - Caller allocated memory that contain the IE field, if any,
945 upon return
946 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
947 \return eHalStatus - when fail, it usually means the buffer allocated is not
948 big enough
949 ---------------------------------------------------------------------------*/
950eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
951 tANI_U8 *pBuf, eCsrSecurityType secType);
952
953/* ---------------------------------------------------------------------------
954 \fn sme_RoamGetSecurityRspIE
955 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
956 the beacon or probe rsp if connected
957 \param sessionId - returned by sme_OpenSession.
958 \param pLen - caller allocated memory that has the length of pBuf as input.
959 Upon returned, *pLen has the needed or IE length in pBuf.
960 \param pBuf - Caller allocated memory that contain the IE field, if any,
961 upon return
962 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
963 \return eHalStatus - when fail, it usually means the buffer allocated is not
964 big enough
965 ---------------------------------------------------------------------------*/
966eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
967 tANI_U8 *pBuf, eCsrSecurityType secType);
968
969
970/* ---------------------------------------------------------------------------
971 \fn sme_RoamGetNumPMKIDCache
972 \brief a wrapper function to request CSR to return number of PMKID cache
973 entries
974 \return tANI_U32 - the number of PMKID cache entries
975 ---------------------------------------------------------------------------*/
976tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
977
978/* ---------------------------------------------------------------------------
979 \fn sme_RoamGetPMKIDCache
980 \brief a wrapper function to request CSR to return PMKID cache from CSR
981 \param pNum - caller allocated memory that has the space of the number of
982 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
983 needed or actually number in tPmkidCacheInfo.
984 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
985 any, upon return
986 \return eHalStatus - when fail, it usually means the buffer allocated is not
987 big enough
988 ---------------------------------------------------------------------------*/
989eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
990 tPmkidCacheInfo *pPmkidCache);
991
992/* ---------------------------------------------------------------------------
993 \fn sme_GetConfigParam
994 \brief a wrapper function that HDD calls to get the global settings
995 currently maintained by CSR.
996 \param pParam - caller allocated memory
997 \return eHalStatus
998 ---------------------------------------------------------------------------*/
999eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
1000
1001/* ---------------------------------------------------------------------------
1002 \fn sme_GetStatistics
1003 \brief a wrapper function that client calls to register a callback to get
1004 different PHY level statistics from CSR.
1005
1006 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1007 \param statsMask - The different category/categories of stats requester is looking for
1008 The order in which you set the bits in the statsMask for requesting
1009 different type of stats is:
1010
1011 eCsrSummaryStats = bit 0
1012 eCsrGlobalClassAStats = bit 1
1013 eCsrGlobalClassBStats = bit 2
1014 eCsrGlobalClassCStats = bit 3
1015 eCsrGlobalClassDStats = bit 4
1016 eCsrPerStaStats = bit 5
1017
1018 \param callback - SME sends back the requested stats using the callback
1019 \param periodicity - If requester needs periodic update, 0 means it's an one
1020 time request
1021 \param cache - If requester is happy with cached stats
1022 \param staId - The station ID for which the stats is requested for
1023 \param pContext - user context to be passed back along with the callback
1024 \return eHalStatus
1025 ---------------------------------------------------------------------------*/
1026eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1027 tANI_U32 statsMask,
1028 tCsrStatsCallback callback,
1029 tANI_U32 periodicity, tANI_BOOLEAN cache,
1030 tANI_U8 staId, void *pContext);
1031
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301032/* ---------------------------------------------------------------------------
1033 \fn smeGetTLSTAState
1034 \helper function to get teh TL STA State whenever the function is called.
1035
1036 \param staId - The staID to be passed to the TL
1037 to get the relevant TL STA State
1038 \return the state as tANI_U16
1039 ---------------------------------------------------------------------------*/
1040tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1041
Jeff Johnson295189b2012-06-20 16:38:30 -07001042eHalStatus sme_GetRssi(tHalHandle hHal,
1043 tCsrRssiCallback callback,
1044 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301045
1046/* ---------------------------------------------------------------------------
1047 \fn sme_GetSnr
1048 \brief a wrapper function that client calls to register a callback to get
1049 SNR from FW
1050
1051 \param callback - SME sends back the requested stats using the callback
1052 \param staId - The station ID for which the stats is requested for
1053 \param bssid - The bssid of the connected session
1054 \param pContext - user context to be passed back along with the callback
1055 ---------------------------------------------------------------------------*/
1056eHalStatus sme_GetSnr(tHalHandle hHal,
1057 tCsrSnrCallback callback,
1058 tANI_U8 staId, tCsrBssid bssId,
1059 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001060#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001061eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1062 tCsrRssiCallback callback,
1063 tANI_U8 staId,
1064 tCsrBssid bssId,
1065 void *pContext,
1066 void* pVosContext);
1067#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001068
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001069#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001070/* ---------------------------------------------------------------------------
1071 \fn sme_GetTsmStats
1072 \brief a wrapper function that client calls to register a callback to get TSM Stats
1073
1074 \param callback - SME sends back the requested stats using the callback
1075 \param staId - The station ID for which the stats is requested for
1076 \param pContext - user context to be passed back along with the callback
1077 \param pVosContext - vos context
1078 \return eHalStatus
1079 ---------------------------------------------------------------------------*/
1080eHalStatus sme_GetTsmStats(tHalHandle hHal,
1081 tCsrTsmStatsCallback callback,
1082 tANI_U8 staId, tCsrBssid bssId,
1083 void *pContext, void* pVosContext, tANI_U8 tid);
1084
1085/* ---------------------------------------------------------------------------
1086 \fn sme_SetCCKMIe
1087 \brief function to store the CCKM IE passed from supplicant and use it while packing
1088 reassociation request
1089 \param hHal - HAL handle for device
1090 \param pCckmIe - pointer to CCKM IE data
1091 \param pCckmIeLen - length of the CCKM IE
1092 \- return Success or failure
1093 -------------------------------------------------------------------------*/
1094eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1095
1096
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001097/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001098 \fn sme_SetEseBeaconRequest
1099 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001100 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001101 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001102 \- return Success or failure
1103 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001104eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1105 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001106
1107
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001108#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001109/* ---------------------------------------------------------------------------
1110 \fn sme_CfgSetInt
1111 \brief a wrapper function that HDD calls to set parameters in CFG.
1112 \param cfgId - Configuration Parameter ID (type) for STA.
1113 \param ccmValue - The information related to Configuration Parameter ID
1114 which needs to be saved in CFG
1115 \param callback - To be registered by CSR with CCM. Once the CFG done with
1116 saving the information in the database, it notifies CCM &
1117 then the callback will be invoked to notify.
1118 \param toBeSaved - To save the request for future reference
1119 \return eHalStatus
1120 ---------------------------------------------------------------------------*/
1121eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1122 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1123
1124/* ---------------------------------------------------------------------------
1125 \fn sme_CfgSetStr
1126 \brief a wrapper function that HDD calls to set parameters in CFG.
1127 \param cfgId - Configuration Parameter ID (type) for STA.
1128 \param pStr - Pointer to the byte array which carries the information needs
1129 to be saved in CFG
1130 \param length - Length of the data to be saved
1131 \param callback - To be registered by CSR with CCM. Once the CFG done with
1132 saving the information in the database, it notifies CCM &
1133 then the callback will be invoked to notify.
1134 \param toBeSaved - To save the request for future reference
1135 \return eHalStatus
1136 ---------------------------------------------------------------------------*/
1137eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1138 tANI_U32 length, tCcmCfgSetCallback callback,
1139 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301140/* ---------------------------------------------------------------------------
1141 \fn sme_GetModifyProfileFields
1142 \brief HDD or SME - QOS calls this function to get the current values of
1143 connected profile fields, changing which can cause reassoc.
1144 This function must be called after CFG is downloaded and STA is in connected
1145 state. Also, make sure to call this function to get the current profile
1146 fields before calling the reassoc. So that pModifyProfileFields will have
1147 all the latest values plus the one(s) has been updated as part of reassoc
1148 request.
1149 \param pModifyProfileFields - pointer to the connected profile fields
1150 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001151
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301152 \return eHalStatus
1153 -------------------------------------------------------------------------------*/
1154eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1155 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301156/* ---------------------------------------------------------------------------
1157 \fn sme_HT40StopOBSSScan
1158 \brief HDD or SME - Command to stop the OBSS scan
1159 THis is implemented only for debugging purpose.
1160 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1161 \param sessionId - sessionId
1162 changing which can cause reassoc
1163
1164 \return eHalStatus
1165 -------------------------------------------------------------------------------*/
1166eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001167
1168/*--------------------------------------------------------------------------
1169 \fn sme_SetConfigPowerSave
1170 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1171 For BMPS related configuration, this function also updates the CFG
1172 and sends a message to FW to pick up the new values. Note: Calling
1173 this function only updates the configuration and does not enable
1174 the specified power save mode.
1175 \param hHal - The handle returned by macOpen.
1176 \param psMode - Power Saving mode being modified
1177 \param pConfigParams - a pointer to a caller allocated object of type
1178 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1179 \return eHalStatus
1180 --------------------------------------------------------------------------*/
1181eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1182 void *pConfigParams);
1183
1184/*--------------------------------------------------------------------------
1185 \fn sme_GetConfigPowerSave
1186 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1187 \param hHal - The handle returned by macOpen.
1188 \param psMode - Power Saving mode
1189 \param pConfigParams - a pointer to a caller allocated object of type
1190 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1191 \return eHalStatus
1192 --------------------------------------------------------------------------*/
1193eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1194 void *pConfigParams);
1195
1196/* ---------------------------------------------------------------------------
1197 \fn sme_SignalPowerEvent
1198 \brief Signals to PMC that a power event has occurred. Used for putting
1199 the chip into deep sleep mode.
1200 \param hHal - The handle returned by macOpen.
1201 \param event - the event that has occurred
1202 \return eHalStatus
1203 ---------------------------------------------------------------------------*/
1204extern eHalStatus sme_SignalPowerEvent (
1205 tHalHandle hHal,
1206 tPmcPowerEvent event);
1207
1208/* ---------------------------------------------------------------------------
1209 \fn sme_EnablePowerSave
1210 \brief Enables one of the power saving modes. This API does not cause a
1211 device state change. This is purely a configuration API.
1212 \param hHal - The handle returned by macOpen.
1213 \param psMode - The power saving mode to enable.
1214 \return eHalStatus
1215 ---------------------------------------------------------------------------*/
1216extern eHalStatus sme_EnablePowerSave (
1217 tHalHandle hHal,
1218 tPmcPowerSavingMode psMode);
1219
1220/* ---------------------------------------------------------------------------
1221 \fn sme_DisablePowerSave
1222 \brief Disables one of the power saving modes.Disabling does not imply
1223 that device will be brought out of the current PS mode. This is
1224 purely a configuration API.
1225 \param hHal - The handle returned by macOpen.
1226 \param psMode - The power saving mode to disable.
1227 \return eHalStatus
1228 ---------------------------------------------------------------------------*/
1229extern eHalStatus sme_DisablePowerSave (
1230 tHalHandle hHal,
1231 tPmcPowerSavingMode psMode);
1232
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301233 /* ---------------------------------------------------------------------------
1234 \fn sme_SetHostPowerSave
1235 \brief The BMPS logic is controlled by the User level Apps
1236 \param hHal - The handle returned by macOpen.
1237 \param psMode - The power saving mode to enable.
1238 \return eHalStatus
1239 ---------------------------------------------------------------------------*/
1240extern eHalStatus sme_SetHostPowerSave (
1241 tHalHandle hHal,
1242 v_BOOL_t psMode);
1243
Jeff Johnson295189b2012-06-20 16:38:30 -07001244/* ---------------------------------------------------------------------------
1245 \fn sme_StartAutoBmpsTimer
1246 \brief Starts a timer that periodically polls all the registered
1247 module for entry into Bmps mode. This timer is started only if BMPS is
1248 enabled and whenever the device is in full power.
1249 \param hHal - The handle returned by macOpen.
1250 \return eHalStatus
1251 ---------------------------------------------------------------------------*/
1252extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1253
1254/* ---------------------------------------------------------------------------
1255 \fn sme_StopAutoBmpsTimer
1256 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1257 Stopping the timer does not cause a device state change. Only the timer
1258 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1259 \param hHal - The handle returned by macOpen.
1260 \return eHalStatus
1261 ---------------------------------------------------------------------------*/
1262extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1263
1264/* ---------------------------------------------------------------------------
1265 \fn sme_QueryPowerState
1266 \brief Returns the current power state of the device.
1267 \param hHal - The handle returned by macOpen.
1268 \param pPowerState - pointer to location to return power state
1269 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1270 \return eHalStatus
1271 ---------------------------------------------------------------------------*/
1272extern eHalStatus sme_QueryPowerState (
1273 tHalHandle hHal,
1274 tPmcPowerState *pPowerState,
1275 tPmcSwitchState *pSwWlanSwitchState);
1276
1277/* ---------------------------------------------------------------------------
1278 \fn sme_IsPowerSaveEnabled
1279 \brief Checks if the device is able to enter a particular power save mode
1280 This does not imply that the device is in a particular PS mode
1281 \param hHal - The handle returned by macOpen.
1282 \param psMode - the power saving mode
1283 \return eHalStatus
1284 ---------------------------------------------------------------------------*/
1285extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1286 tHalHandle hHal,
1287 tPmcPowerSavingMode psMode);
1288
1289/* ---------------------------------------------------------------------------
1290 \fn sme_RequestFullPower
1291 \brief Request that the device be brought to full power state.
1292 Note 1: If "fullPowerReason" specificied in this API is set to
1293 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1294 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1295 HDD is requesting full power, we need to undo any previous HDD requests for
1296 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1297 specified anything other than above, the buffered requests for BMPS and WoWL
1298 will not be cleared.
1299 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1300 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1301 request".
1302 Note 3: When the device finally enters Full Power PMC will start a timer
1303 if any of the following holds true:
1304 - Auto BMPS mode is enabled
1305 - Uapsd request is pending
1306 - HDD's request for BMPS is pending
1307 - HDD's request for WoWL is pending
1308 On timer expiry PMC will attempt to put the device in BMPS mode if following
1309 (in addition to those listed above) holds true:
1310 - Polling of all modules through the Power Save Check routine passes
1311 - STA is associated to an access point
1312 \param hHal - The handle returned by macOpen.
1313 \param - callbackRoutine Callback routine invoked in case of success/failure
1314 \param - callbackContext - Cookie to be passed back during callback
1315 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1316 distinguish between BAP and HDD requests
1317 \return eHalStatus - status
1318 eHAL_STATUS_SUCCESS - device brought to full power state
1319 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1320 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1321 ---------------------------------------------------------------------------*/
1322extern eHalStatus sme_RequestFullPower (
1323 tHalHandle hHal,
1324 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1325 void *callbackContext,
1326 tRequestFullPowerReason fullPowerReason);
1327
1328/* ---------------------------------------------------------------------------
1329 \fn sme_RequestBmps
1330 \brief Request that the device be put in BMPS state. Request will be
1331 accepted only if BMPS mode is enabled and power save check routine
1332 passes. Only HDD should invoke this API.
1333 \param hHal - The handle returned by macOpen.
1334 \param - callbackRoutine Callback routine invoked in case of success/failure
1335 \param - callbackContext - Cookie to be passed back during callback
1336 \return eHalStatus
1337 eHAL_STATUS_SUCCESS - device is in BMPS state
1338 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1339 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1340 ---------------------------------------------------------------------------*/
1341extern eHalStatus sme_RequestBmps (
1342 tHalHandle hHal,
1343 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1344 void *callbackContext);
1345
1346/* ---------------------------------------------------------------------------
1347 \fn sme_SetDHCPTillPowerActiveFlag
1348 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1349 entry by PMC
1350 \param hHal - The handle returned by macOpen.
1351 ---------------------------------------------------------------------------*/
1352void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1353
1354
1355/* ---------------------------------------------------------------------------
1356 \fn sme_StartUapsd
1357 \brief Request that the device be put in UAPSD state. If the device is in
1358 Full Power it will be put in BMPS mode first and then into UAPSD
1359 mode.
1360 \param hHal - The handle returned by macOpen.
1361 \param - callbackRoutine Callback routine invoked in case of success/failure
1362 \param - callbackContext - Cookie to be passed back during callback
1363 eHAL_STATUS_SUCCESS - device is in UAPSD state
1364 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1365 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1366 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1367 \return eHalStatus
1368 ---------------------------------------------------------------------------*/
1369extern eHalStatus sme_StartUapsd (
1370 tHalHandle hHal,
1371 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1372 void *callbackContext);
1373
1374/* ---------------------------------------------------------------------------
1375 \fn sme_StopUapsd
1376 \brief Request that the device be put out of UAPSD state. Device will be
1377 put in in BMPS state after stop UAPSD completes. Buffered requests for
1378 UAPSD will be cleared after this.
1379 \param hHal - The handle returned by macOpen.
1380 \return eHalStatus
1381 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1382 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1383 ---------------------------------------------------------------------------*/
1384extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1385
1386/* ---------------------------------------------------------------------------
1387 \fn sme_RequestStandby
1388 \brief Request that the device be put in standby. It is HDD's responsibility
1389 to bring the chip to full power and do a discconnect before calling
1390 this API. Request for standby will be rejected if STA is associated
1391 to an AP.
1392 \param hHal - The handle returned by macOpen.
1393 \param - callbackRoutine Callback routine invoked in case of success/failure
1394 \param - callbackContext - Cookie to be passed back during callback
1395 \return eHalStatus
1396 eHAL_STATUS_SUCCESS - device is in Standby mode
1397 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1398 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1399 ---------------------------------------------------------------------------*/
1400extern eHalStatus sme_RequestStandby (
1401 tHalHandle hHal,
1402 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1403 void *callbackContext);
1404
1405/* ---------------------------------------------------------------------------
1406 \fn sme_RegisterPowerSaveCheck
1407 \brief Register a power save check routine that is called whenever
1408 the device is about to enter one of the power save modes.
1409 \param hHal - The handle returned by macOpen.
1410 \param checkRoutine - Power save check routine to be registered
1411 \param callbackContext - Cookie to be passed back during callback
1412 \return eHalStatus
1413 eHAL_STATUS_SUCCESS - successfully registered
1414 eHAL_STATUS_FAILURE - not successfully registered
1415 ---------------------------------------------------------------------------*/
1416extern eHalStatus sme_RegisterPowerSaveCheck (
1417 tHalHandle hHal,
1418 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1419
1420/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301421 \fn sme_Register11dScanDoneCallback
1422 \brief Register a routine of type csrScanCompleteCallback which is
1423 called whenever an 11d scan is done
1424 \param hHal - The handle returned by macOpen.
1425 \param callback - 11d scan complete routine to be registered
1426 \return eHalStatus
1427 ---------------------------------------------------------------------------*/
1428extern eHalStatus sme_Register11dScanDoneCallback (
1429 tHalHandle hHal,
1430 csrScanCompleteCallback);
1431
1432/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001433 \fn sme_DeregisterPowerSaveCheck
1434 \brief Deregister a power save check routine
1435 \param hHal - The handle returned by macOpen.
1436 \param checkRoutine - Power save check routine to be deregistered
1437 \return eHalStatus
1438 eHAL_STATUS_SUCCESS - successfully deregistered
1439 eHAL_STATUS_FAILURE - not successfully deregistered
1440 ---------------------------------------------------------------------------*/
1441extern eHalStatus sme_DeregisterPowerSaveCheck (
1442 tHalHandle hHal,
1443 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1444
1445/* ---------------------------------------------------------------------------
1446 \fn sme_RegisterDeviceStateUpdateInd
1447 \brief Register a callback routine that is called whenever
1448 the device enters a new device state (Full Power, BMPS, UAPSD)
1449 \param hHal - The handle returned by macOpen.
1450 \param callbackRoutine - Callback routine to be registered
1451 \param callbackContext - Cookie to be passed back during callback
1452 \return eHalStatus
1453 eHAL_STATUS_SUCCESS - successfully registered
1454 eHAL_STATUS_FAILURE - not successfully registered
1455 ---------------------------------------------------------------------------*/
1456extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1457 tHalHandle hHal,
1458 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1459 void *callbackContext);
1460
1461/* ---------------------------------------------------------------------------
1462 \fn sme_DeregisterDeviceStateUpdateInd
1463 \brief Deregister a routine that was registered for device state changes
1464 \param hHal - The handle returned by macOpen.
1465 \param callbackRoutine - Callback routine to be deregistered
1466 \return eHalStatus
1467 eHAL_STATUS_SUCCESS - successfully deregistered
1468 eHAL_STATUS_FAILURE - not successfully deregistered
1469 ---------------------------------------------------------------------------*/
1470extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1471 tHalHandle hHal,
1472 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1473
1474/* ---------------------------------------------------------------------------
1475 \fn sme_WowlAddBcastPattern
1476 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1477 do a pattern match on these patterns when Wowl is enabled during BMPS
1478 mode.
1479 \param hHal - The handle returned by macOpen.
1480 \param pattern - Pattern to be added
1481 \return eHalStatus
1482 eHAL_STATUS_FAILURE Cannot add pattern
1483 eHAL_STATUS_SUCCESS Request accepted.
1484 ---------------------------------------------------------------------------*/
1485extern eHalStatus sme_WowlAddBcastPattern (
1486 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001487 tpSirWowlAddBcastPtrn pattern,
1488 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001489
1490/* ---------------------------------------------------------------------------
1491 \fn sme_WowlDelBcastPattern
1492 \brief Delete a pattern that was added for Pattern Byte Matching.
1493 \param hHal - The handle returned by macOpen.
1494 \param pattern - Pattern to be deleted
1495 \return eHalStatus
1496 eHAL_STATUS_FAILURE Cannot delete pattern
1497 eHAL_STATUS_SUCCESS Request accepted.
1498 ---------------------------------------------------------------------------*/
1499extern eHalStatus sme_WowlDelBcastPattern (
1500 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001501 tpSirWowlDelBcastPtrn pattern,
1502 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001503
1504/* ---------------------------------------------------------------------------
1505 \fn sme_EnterWowl
1506 \brief This is the API to request entry into WOWL mode.
1507 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1508 SME will will cache the information that WOWL has been requested and
1509 attempt to put the device in BMPS first. On entry into BMPS, SME will
1510 enter the WOWL mode.
1511 Note 1: After WoWL request is accepted, If module other than HDD requests
1512 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1513 and attempt to put the chip into BMPS+WOWL based on a timer.
1514 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1515 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1516 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1517 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1518 are required. Currently there is no requirement or use case to support UAPSD
1519 and WOWL at the same time.
1520 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1521 Note 5. Request for WoWL is rejected if BMPS is disabled.
1522
1523 \param hHal - The handle returned by macOpen.
1524 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1525 Used for success/failure notification by SME
1526 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1527 at the time of callback.
1528 \param wakeReasonIndCB - Callback routine provided by HDD.
1529 Used for Wake Reason Indication by SME
1530 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1531 at the time of callback.
1532 \return eHalStatus
1533 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1534 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1535 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1536 mode is entered.
1537 ---------------------------------------------------------------------------*/
1538extern eHalStatus sme_EnterWowl (
1539 tHalHandle hHal,
1540 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1541 void *enterWowlCallbackContext,
1542#ifdef WLAN_WAKEUP_EVENTS
1543 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1544 void *wakeReasonIndCBContext,
1545#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001546 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001547
1548/* ---------------------------------------------------------------------------
1549 \fn sme_ExitWowl
1550 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1551 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1552 mode. Any Buffered request for WoWL will be cleared after this API.
1553 \param hHal - The handle returned by macOpen.
1554 \return eHalStatus
1555 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1556 only if the previous "Enter WOWL" transaction has
1557 not even completed.
1558 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1559 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301560extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001561
1562/* ---------------------------------------------------------------------------
1563
1564 \fn sme_RoamSetKey
1565
1566 \brief To set encryption key. This function should be called only when connected
1567 This is an asynchronous API.
1568
1569 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1570
1571 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1572
1573 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1574
1575 FAILURE or RESOURCES The API finished and failed.
1576
1577 -------------------------------------------------------------------------------*/
1578eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1579
1580/* ---------------------------------------------------------------------------
1581
1582 \fn sme_RoamRemoveKey
1583
1584 \brief To set encryption key. This is an asynchronous API.
1585
1586 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1587
1588 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1589
1590 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1591
1592 FAILURE or RESOURCES The API finished and failed.
1593
1594 -------------------------------------------------------------------------------*/
1595eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1596
1597
1598/* ---------------------------------------------------------------------------
1599
1600 \fn sme_GetCountryCode
1601
1602 \brief To return the current country code. If no country code is applied, default country code is
1603 used to fill the buffer.
1604 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1605 This is a synchronous API.
1606
1607 \param pBuf - pointer to a caller allocated buffer for returned country code.
1608
1609 \param pbLen For input, this parameter indicates how big is the buffer.
1610 Upon return, this parameter has the number of bytes for country. If pBuf
1611 doesn't have enough space, this function returns
1612 fail status and this parameter contains the number that is needed.
1613
1614 \return eHalStatus SUCCESS.
1615
1616 FAILURE or RESOURCES The API finished and failed.
1617
1618 -------------------------------------------------------------------------------*/
1619eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1620
1621/* ---------------------------------------------------------------------------
1622
1623 \fn sme_SetCountryCode
1624
1625 \brief To change the current/default country code.
1626 If 11d supported is turned off, an error is return.
1627 This is a synchronous API.
1628
1629 \param pCountry - pointer to a caller allocated buffer for the country code.
1630
1631 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1632 whether a reset is required.
1633
1634 \return eHalStatus SUCCESS.
1635
1636 FAILURE or RESOURCES The API finished and failed.
1637
1638 -------------------------------------------------------------------------------*/
1639eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1640
1641/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301642
1643 \fn sme_InitChannels
1644
1645 \brief Used to initialize CSR channel lists while driver loading
1646
1647 \param hHal - global pMac structure
1648
1649 \return eHalStatus SUCCESS.
1650
1651 FAILURE or RESOURCES The API finished and failed.
1652
1653 -------------------------------------------------------------------------------*/
1654eHalStatus sme_InitChannels(tHalHandle hHal);
1655
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301656
Mihir Shete04206452014-11-20 17:50:58 +05301657#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301658/* ---------------------------------------------------------------------------
1659 \fn sme_InitChannelsForCC
1660
1661 \brief Used to issue regulatory hint to user
1662
1663 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301664 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301665
1666 \return eHalStatus SUCCESS.
1667
1668 FAILURE or RESOURCES The API finished and failed.
1669
1670 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301671eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301672#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301673
Mihir Shetee1093ba2014-01-21 20:13:32 +05301674/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001675 \fn sme_ResetCountryCodeInformation
1676 \brief this function is to reset the country code current being used back to EEPROM default
1677 this includes channel list and power setting. This is a synchronous API.
1678 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1679 a restart is needed to apply the change
1680 \return eHalStatus
1681 -------------------------------------------------------------------------------*/
1682eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1683
1684/* ---------------------------------------------------------------------------
1685 \fn sme_GetSupportedCountryCode
1686 \brief this function is to get a list of the country code current being supported
1687 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1688 this has the country code list. 3 bytes for each country code. This may be NULL if
1689 caller wants to know the needed byte count.
1690 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1691 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1692 \return eHalStatus
1693 -------------------------------------------------------------------------------*/
1694eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1695
1696/* ---------------------------------------------------------------------------
1697 \fn sme_GetCurrentRegulatoryDomain
1698 \brief this function is to get the current regulatory domain. This is a synchronous API.
1699 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1700 SME. The function fails if 11d support is turned off.
1701 \param pDomain - Caller allocated buffer to return the current domain.
1702 \return eHalStatus SUCCESS.
1703
1704 FAILURE or RESOURCES The API finished and failed.
1705 -------------------------------------------------------------------------------*/
1706eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1707
1708/* ---------------------------------------------------------------------------
1709 \fn sme_SetRegulatoryDomain
1710 \brief this function is to set the current regulatory domain.
1711 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1712 SME. This is a synchronous API.
1713 \param domainId - indicate the domain (defined in the driver) needs to set to.
1714 See v_REGDOMAIN_t for definition
1715 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1716 a restart is needed to apply the change
1717 \return eHalStatus
1718 -------------------------------------------------------------------------------*/
1719eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1720
1721/* ---------------------------------------------------------------------------
1722
1723 \fn sme_GetRegulatoryDomainForCountry
1724
1725 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1726
1727 \param pCountry - pointer to a caller allocated buffer for input country code.
1728
1729 \param pDomainId Upon successful return, it is the domain that country belongs to.
1730 If it is NULL, returning success means that the country code is known.
1731
1732 \return eHalStatus SUCCESS.
1733
1734 FAILURE or RESOURCES The API finished and failed.
1735
1736 -------------------------------------------------------------------------------*/
1737eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1738
1739
1740
1741/* ---------------------------------------------------------------------------
1742
1743 \fn sme_GetSupportedRegulatoryDomains
1744
1745 \brief To return a list of supported regulatory domains. This is a synchronous API.
1746
1747 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1748
1749 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1750 Upon return, this parameter has the number for supported domains. If pDomains
1751 doesn't have enough space for all the supported domains, this function returns
1752 fail status and this parameter contains the number that is needed.
1753
1754 \return eHalStatus SUCCESS.
1755
1756 FAILURE or RESOURCES The API finished and failed.
1757
1758 -------------------------------------------------------------------------------*/
1759eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1760
1761//some support functions
1762tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1763tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1764tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1765//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1766eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1767
1768typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1769/* ---------------------------------------------------------------------------
1770
1771 \fn sme_ChangeCountryCode
1772
1773 \brief Change Country code from upperlayer during WLAN driver operation.
1774 This is a synchronous API.
1775
1776 \param hHal - The handle returned by macOpen.
1777
1778 \param pCountry New Country Code String
1779
Abhishek Singha306a442013-11-07 18:39:01 +05301780 \param sendRegHint If we want to send reg hint to nl80211
1781
Jeff Johnson295189b2012-06-20 16:38:30 -07001782 \return eHalStatus SUCCESS.
1783
1784 FAILURE or RESOURCES The API finished and failed.
1785
1786 -------------------------------------------------------------------------------*/
1787eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1788 tSmeChangeCountryCallback callback,
1789 tANI_U8 *pCountry,
1790 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301791 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301792 tAniBool countryFromUserSpace,
1793 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001794
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301795/* ---------------------------------------------------------------------------
1796
Amar Singhal0d15bd52013-10-12 23:13:13 -07001797 \fn sme_GenericChangeCountryCode
1798
1799 \brief Generic API to change country code
1800
1801 \param hHal - The handle returned by macOpen.
1802
1803 \param pCountry New Country Code String
1804
1805 \param reg_domain Regulatory domain for the new country code
1806
1807 \return eHalStatus SUCCESS.
1808
1809 FAILURE or RESOURCES The API finished and failed.
1810
1811 -------------------------------------------------------------------------------*/
1812eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1813 tANI_U8 *pCountry,
1814 v_REGDOMAIN_t reg_domain);
1815
1816/* ---------------------------------------------------------------------------
1817
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301818 \fn sme_DHCPStartInd
1819
1820 \brief Indicate FW about DHCP start event.
1821
1822 \param hHal - The handle returned by macOpen.
1823
1824 \param device_mode the mode of the device
1825
c_hpothu0b0cab72014-02-13 21:52:40 +05301826 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301827
1828 \return eHalStatus SUCCESS.
1829
1830 FAILURE or RESOURCES The API finished and failed.
1831
1832 -------------------------------------------------------------------------------*/
1833
1834eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1835 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301836 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301837
1838/* ---------------------------------------------------------------------------
1839
1840 \fn sme_DHCPStopInd
1841
1842 \brief Indicate FW about DHCP stop event.
1843
1844 \param hHal - The handle returned by macOpen.
1845
1846 \param device_mode the mode of the device
1847
c_hpothu0b0cab72014-02-13 21:52:40 +05301848 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301849
1850 \return eHalStatus SUCCESS.
1851
1852 FAILURE or RESOURCES The API finished and failed.
1853
1854 -------------------------------------------------------------------------------*/
1855eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1856 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301857 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301858
Jeff Johnson295189b2012-06-20 16:38:30 -07001859
1860/* ---------------------------------------------------------------------------
1861 \fn sme_BtcSignalBtEvent
1862 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1863 BT event type and the current operating mode of Libra (full power,
1864 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1865 would be employed.
1866 \param hHal - The handle returned by macOpen.
1867 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1868 Caller owns the memory and is responsible for freeing it.
1869 \return VOS_STATUS
1870 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1871 if driver has not yet been initialized or if BTC
1872 Events Layer has been disabled.
1873 VOS_STATUS_SUCCESS BT Event passed to HAL
1874 ---------------------------------------------------------------------------*/
1875VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1876
1877/* ---------------------------------------------------------------------------
1878 \fn sme_BtcSetConfig
1879 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1880 This function should be invoked only after CFG download has completed.
1881 Calling it after sme_HDDReadyInd is recommended.
1882 \param hHal - The handle returned by macOpen.
1883 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1884 tSmeBtcConfig. Caller owns the memory and is responsible
1885 for freeing it.
1886 \return VOS_STATUS
1887 VOS_STATUS_E_FAILURE Config not passed to HAL.
1888 VOS_STATUS_SUCCESS Config passed to HAL
1889 ---------------------------------------------------------------------------*/
1890VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1891
1892/* ---------------------------------------------------------------------------
1893 \fn sme_BtcGetConfig
1894 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1895 \param hHal - The handle returned by macOpen.
1896 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1897 Caller owns the memory and is responsible for freeing it.
1898 \return VOS_STATUS
1899 VOS_STATUS_E_FAILURE - failure
1900 VOS_STATUS_SUCCESS success
1901 ---------------------------------------------------------------------------*/
1902VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1903
1904/* ---------------------------------------------------------------------------
1905 \fn sme_SetCfgPrivacy
1906 \brief API to set configure privacy parameters
1907 \param hHal - The handle returned by macOpen.
1908 \param pProfile - Pointer CSR Roam profile.
1909 \param fPrivacy - This parameter indicates status of privacy
1910
1911 \return void
1912 ---------------------------------------------------------------------------*/
1913void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1914
1915#if defined WLAN_FEATURE_VOWIFI
1916/* ---------------------------------------------------------------------------
1917 \fn sme_NeighborReportRequest
1918 \brief API to request neighbor report.
1919 \param hHal - The handle returned by macOpen.
1920 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1921 tRrmNeighborReq. Caller owns the memory and is responsible
1922 for freeing it.
1923 \return VOS_STATUS
1924 VOS_STATUS_E_FAILURE - failure
1925 VOS_STATUS_SUCCESS success
1926 ---------------------------------------------------------------------------*/
1927VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1928 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1929#endif
1930
1931//The following are debug APIs to support direct read/write register/memory
1932//They are placed in SME because HW cannot be access when in LOW_POWER state
1933//AND not connected. The knowledge and synchronization is done in SME
1934
1935//sme_DbgReadRegister
1936//Caller needs to validate the input values
1937VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1938
1939//sme_DbgWriteRegister
1940//Caller needs to validate the input values
1941VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1942
1943//sme_DbgReadMemory
1944//Caller needs to validate the input values
1945//pBuf caller allocated buffer has the length of nLen
1946VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1947
1948//sme_DbgWriteMemory
1949//Caller needs to validate the input values
1950VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1951
Jeff Johnson295189b2012-06-20 16:38:30 -07001952VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1953 tSirVersionType *pVersion);
1954VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1955 tSirVersionType *pVersion);
1956VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1957 tANI_U8 *pVersion,
1958 tANI_U32 versionBufferSize);
1959VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1960 tANI_U8 *pVersion,
1961 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001962eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1963 csrRoamCompleteCallback callback,
1964 void *pContext);
1965
1966#ifdef FEATURE_WLAN_WAPI
1967/* ---------------------------------------------------------------------------
1968 \fn sme_RoamSetBKIDCache
1969 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1970 candidate list.
1971 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1972 it is opened (by calling halOpen).
1973 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1974 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1975 when retruning, this is the number of items put into pBKIDCache
1976 \return eHalStatus - when fail, it usually means the buffer allocated is not
1977 big enough and pNumItems has the number of tBkidCacheInfo.
1978 ---------------------------------------------------------------------------*/
1979eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1980 tANI_U32 numItems );
1981
1982/* ---------------------------------------------------------------------------
1983 \fn sme_RoamGetBKIDCache
1984 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1985 BKID cache.
1986 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1987 it is opened (by calling halOpen).
1988 \param pNum - caller allocated memory that has the space of the number of
1989 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1990 in SME cache.
1991 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1992 upon return
1993 \return eHalStatus - when fail, it usually means the buffer allocated is not
1994 big enough.
1995 ---------------------------------------------------------------------------*/
1996eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1997 tBkidCacheInfo *pBkidCache);
1998
1999/* ---------------------------------------------------------------------------
2000 \fn sme_RoamGetNumBKIDCache
2001 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2002 number of BKID cache entries.
2003 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2004 it is opened (by calling halOpen).
2005 \return tANI_U32 - the number of BKID cache entries.
2006 ---------------------------------------------------------------------------*/
2007tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2008
2009/* ---------------------------------------------------------------------------
2010 \fn sme_ScanGetBKIDCandidateList
2011 \brief a wrapper function to return the BKID candidate list
2012 \param pBkidList - caller allocated buffer point to an array of
2013 tBkidCandidateInfo
2014 \param pNumItems - pointer to a variable that has the number of
2015 tBkidCandidateInfo allocated when retruning, this is
2016 either the number needed or number of items put into
2017 pPmkidList
2018 \return eHalStatus - when fail, it usually means the buffer allocated is not
2019 big enough and pNumItems
2020 has the number of tBkidCandidateInfo.
2021 \Note: pNumItems is a number of tBkidCandidateInfo,
2022 not sizeof(tBkidCandidateInfo) * something
2023 ---------------------------------------------------------------------------*/
2024eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2025 tBkidCandidateInfo *pBkidList,
2026 tANI_U32 *pNumItems );
2027#endif /* FEATURE_WLAN_WAPI */
2028
Jeff Johnsone7245742012-09-05 17:12:55 -07002029#ifdef FEATURE_OEM_DATA_SUPPORT
2030/********************************************************************************************
2031 Oem data related modifications
2032*********************************************************************************************/
2033/* ---------------------------------------------------------------------------
2034 \fn sme_OemDataReq
2035 \param sessionId - session id of session to be used for oem data req.
2036 \param pOemDataReqID - pointer to an object to get back the request ID
2037 \param callback - a callback function that is called upon finish
2038 \param pContext - a pointer passed in for the callback
2039 \return eHalStatus
2040 ---------------------------------------------------------------------------*/
2041eHalStatus sme_OemDataReq(tHalHandle hHal,
2042 tANI_U8 sessionId,
2043 tOemDataReqConfig *,
2044 tANI_U32 *pOemDataReqID,
2045 oemData_OemDataReqCompleteCallback callback,
2046 void *pContext);
2047
2048/* ---------------------------------------------------------------------------
2049 \fn sme_getOemDataRsp
2050 \param pOemDataRsp - A pointer to the response object
2051 \param pOemDataReqID - pointer to an object to get back the request ID
2052 \return eHalStatus
2053 ---------------------------------------------------------------------------*/
2054eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2055 tOemDataRsp **pOemDataRsp);
2056
2057#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002058
2059
Jeff Johnson295189b2012-06-20 16:38:30 -07002060
2061/* ---------------------------------------------------------------------------
2062
2063 \fn sme_RoamUpdateAPWPSIE
2064
2065 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2066 This is an asynchronous API.
2067
2068 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2069
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002070 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002071
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002072 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002073
2074 -------------------------------------------------------------------------------*/
2075
2076eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2077/* ---------------------------------------------------------------------------
2078
2079 \fn sme_RoamUpdateAPWPARSNIEs
2080
2081 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2082 This is an asynchronous API.
2083
2084 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2085
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002086 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002087
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002088 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002089
2090 -------------------------------------------------------------------------------*/
2091eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2092
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002093/* ---------------------------------------------------------------------------
2094
2095 sme_ChangeMCCBeaconInterval
2096
2097 \brief To update P2P-GO's beacon Interval.
2098
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002099 \return eHalStatus SUCCESS
2100 FAILURE or RESOURCES
2101 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002102 -------------------------------------------------------------------------------*/
2103eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2104
2105
Jeff Johnson295189b2012-06-20 16:38:30 -07002106
2107/* ---------------------------------------------------------------------------
2108 \fn sme_sendBTAmpEvent
2109 \brief API to send the btAMPstate to FW
2110 \param hHal - The handle returned by macOpen.
2111 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002112 \return eHalStatus SUCCESS
2113 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002114
2115--------------------------------------------------------------------------- */
2116
2117eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2118
2119
2120
2121/* ---------------------------------------------------------------------------
2122 \fn sme_SetHostOffload
2123 \brief API to set the host offload feature.
2124 \param hHal - The handle returned by macOpen.
2125 \param pRequest - Pointer to the offload request.
2126 \return eHalStatus
2127 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002128eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2129 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002130
2131/* ---------------------------------------------------------------------------
2132 \fn sme_SetKeepAlive
2133 \brief API to set the Keep Alive feature.
2134 \param hHal - The handle returned by macOpen.
2135 \param pRequest - Pointer to the Keep Alive request.
2136 \return eHalStatus
2137 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002138eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2139 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002140
Jeff Johnson295189b2012-06-20 16:38:30 -07002141/* ----------------------------------------------------------------------------
2142 \fn sme_GetOperationChannel
2143 \brief API to get current channel on which STA is parked
2144 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002145 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002146 \returns eHAL_STATUS_SUCCESS
2147 eHAL_STATUS_FAILURE
2148-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002149eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002150
Jeff Johnson295189b2012-06-20 16:38:30 -07002151/* ---------------------------------------------------------------------------
2152
2153 \fn sme_RegisterMgtFrame
2154
2155 \brief To register managment frame of specified type and subtype.
2156 \param frameType - type of the frame that needs to be passed to HDD.
2157 \param matchData - data which needs to be matched before passing frame
2158 to HDD.
2159 \param matchDataLen - Length of matched data.
2160 \return eHalStatus
2161 -------------------------------------------------------------------------------*/
2162eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2163 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2164
2165/* ---------------------------------------------------------------------------
2166
2167 \fn sme_DeregisterMgtFrame
2168
2169 \brief To De-register managment frame of specified type and subtype.
2170 \param frameType - type of the frame that needs to be passed to HDD.
2171 \param matchData - data which needs to be matched before passing frame
2172 to HDD.
2173 \param matchDataLen - Length of matched data.
2174 \return eHalStatus
2175 -------------------------------------------------------------------------------*/
2176eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2177 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302178/* ---------------------------------------------------------------------------
2179 \fn sme_GetFramesLog
2180 \brief a wrapper function that client calls to register a callback to get
2181 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302182 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302183 \return eHalStatus
2184 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302185eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002186/* ---------------------------------------------------------------------------
2187
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302188 \fn sme_InitMgmtFrameLogging
2189
2190 \brief
2191 SME will pass this request to lower mac to initialize Frame Logging.
2192
2193 \param
2194
2195 hHal - The handle returned by macOpen.
2196
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302197 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302198
2199 \return eHalStatus
2200--------------------------------------------------------------------------- */
2201eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302202 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302203
2204/* ---------------------------------------------------------------------------
2205
Jeff Johnson295189b2012-06-20 16:38:30 -07002206 \fn sme_ConfigureRxpFilter
2207
2208 \brief
2209 SME will pass this request to lower mac to set/reset the filter on RXP for
2210 multicast & broadcast traffic.
2211
2212 \param
2213
2214 hHal - The handle returned by macOpen.
2215
2216 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2217 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2218 on this param. In future we can use this as a mask to set various types of
2219 filters as suggested below:
2220 FILTER_ALL_MULTICAST:
2221 FILTER_ALL_BROADCAST:
2222 FILTER_ALL_MULTICAST_BROADCAST:
2223
2224
2225 \return eHalStatus
2226
2227
2228--------------------------------------------------------------------------- */
2229eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2230 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2231
2232/* ---------------------------------------------------------------------------
2233
2234 \fn sme_ConfigureAppsCpuWakeupState
2235
2236 \brief
2237 SME will pass this request to lower mac to dynamically adjusts the listen
2238 interval based on the WLAN/MSM activity. This feature is named as
2239 Telescopic Beacon wakeup feature.
2240
2241 \param
2242
2243 hHal - The handle returned by macOpen.
2244
2245 isAppsAwake- Depicts the state of the Apps CPU
2246
2247
2248 \return eHalStatus
2249
2250
2251--------------------------------------------------------------------------- */
2252eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2253
Jeff Johnson295189b2012-06-20 16:38:30 -07002254/* ---------------------------------------------------------------------------
2255
2256 \fn sme_ConfigureSuspendInd
2257
2258 \brief
2259 SME will pass this request to lower mac to Indicate that the wlan needs to
2260 be suspended
2261
2262 \param
2263
2264 hHal - The handle returned by macOpen.
2265
2266 wlanSuspendParam- Depicts the wlan suspend params
2267
2268
2269 \return eHalStatus
2270
2271
2272--------------------------------------------------------------------------- */
2273eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2274 tpSirWlanSuspendParam wlanSuspendParam);
2275
2276/* ---------------------------------------------------------------------------
2277
2278 \fn sme_ConfigureResumeReq
2279
2280 \brief
2281 SME will pass this request to lower mac to Indicate that the wlan needs to
2282 be Resumed
2283
2284 \param
2285
2286 hHal - The handle returned by macOpen.
2287
2288 wlanResumeParam- Depicts the wlan resume params
2289
2290
2291 \return eHalStatus
2292
2293
2294--------------------------------------------------------------------------- */
2295eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2296 tpSirWlanResumeParam wlanResumeParam);
2297
Jeff Johnson295189b2012-06-20 16:38:30 -07002298
2299/* ---------------------------------------------------------------------------
2300
2301 \fn sme_GetInfraSessionId
2302
2303 \brief To get the session ID for infra session, if connected
2304 This is a synchronous API.
2305
2306 \param hHal - The handle returned by macOpen.
2307
2308 \return sessionid, -1 if infra session is not connected
2309
2310 -------------------------------------------------------------------------------*/
2311tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2312
2313/* ---------------------------------------------------------------------------
2314
2315 \fn sme_GetInfraOperationChannel
2316
2317 \brief To get the operating channel for infra session, if connected
2318 This is a synchronous API.
2319
2320 \param hHal - The handle returned by macOpen.
2321 \param sessionId - the sessionId returned by sme_OpenSession.
2322
2323 \return operating channel, 0 if infra session is not connected
2324
2325 -------------------------------------------------------------------------------*/
2326tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2327/* ---------------------------------------------------------------------------
2328
2329 \fn sme_GetConcurrentOperationChannel
2330
2331 \brief To get the operating channel for other concurrent sessions, if connected
2332 This is a synchronous API.
2333
2334 \param hHal - The handle returned by macOpen.
2335 \param currentPersona - persona that is trying to come up.
2336
2337 \return operating channel, 0 if infra session is not connected
2338
2339 -------------------------------------------------------------------------------*/
2340tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2341
2342/* ---------------------------------------------------------------------------
2343 \fn sme_AbortMacScan
2344 \brief API to cancel MAC scan.
2345 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302346 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302347 \return tSirAbortScanStatus return status abort scan
2348
Jeff Johnson295189b2012-06-20 16:38:30 -07002349 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302350tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2351 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002352
2353/* ---------------------------------------------------------------------------
2354 \fn sme_GetCfgValidChannels
2355 \brief API to get valid channel list
2356 \param hHal - The handle returned by macOpen.
2357 \param aValidChannels - Pointer to the valid channel list
2358 \param len - valid channel list length
2359 \return eHalStatus
2360 ---------------------------------------------------------------------------*/
2361eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2362
2363#ifdef FEATURE_WLAN_SCAN_PNO
2364
2365/* ---------------------------------------------------------------------------
2366 \fn sme_SetPreferredNetworkList
2367 \brief API to set the Preferred Network List Offload feature.
2368 \param hHal - The handle returned by macOpen.
2369 \param pRequest - Pointer to the offload request.
2370 \return eHalStatus
2371 ---------------------------------------------------------------------------*/
2372eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2373
2374/* ---------------------------------------------------------------------------
2375 \fn sme_SetRSSIFilter
2376 \brief API to set RSSI Filter feature.
2377 \param hHal - The handle returned by macOpen.
2378 \param pRequest - Pointer to the offload request.
2379 \return eHalStatus
2380 ---------------------------------------------------------------------------*/
2381eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2382
2383/******************************************************************************
2384*
2385* Name: sme_PreferredNetworkFoundInd
2386*
2387* Description:
2388* Invoke Preferred Network Found Indication
2389*
2390* Parameters:
2391* hHal - HAL handle for device
2392* pMsg - found network description
2393*
2394* Returns: eHalStatus
2395*
2396******************************************************************************/
2397eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2398#endif // FEATURE_WLAN_SCAN_PNO
2399
2400/* ---------------------------------------------------------------------------
2401 \fn sme_SetPowerParams
2402 \brief API to set Power Parameters
2403 \param hHal - The handle returned by macOpen.
2404 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002405 \param forced - if true, not to be dropped silently in host, it must reach
2406 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2407 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002408 \return eHalStatus
2409 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002410eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002411
2412/* ---------------------------------------------------------------------------
2413 \fn sme_SetTxPerTracking
2414 \brief Set Tx PER tracking configuration parameters
2415 \param hHal - The handle returned by macOpen.
2416 \param pTxPerTrackingParam - Tx PER configuration parameters
2417 \return eHalStatus
2418 ---------------------------------------------------------------------------*/
2419eHalStatus sme_SetTxPerTracking (
2420 tHalHandle hHal,
2421 void (*pCallbackfn) (void *pCallbackContext),
2422 void *pCallbackContext,
2423 tpSirTxPerTrackingParam pTxPerTrackingParam);
2424
2425#ifdef WLAN_FEATURE_PACKET_FILTERING
2426/* ---------------------------------------------------------------------------
2427 \fn sme_ReceiveFilterSetFilter
2428 \brief API to set 8023 Multicast Address List
2429 \param hHal - The handle returned by macOpen.
2430 \param pMulticastAddrs - Pointer to the Multicast Address List
2431 \return eHalStatus
2432 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002433eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002434
2435/* ---------------------------------------------------------------------------
2436 \fn sme_ReceiveFilterSetFilter
2437 \brief API to set Receive Packet Filter
2438 \param hHal - The handle returned by macOpen.
2439 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2440 \return eHalStatus
2441 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002442eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2443 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002444
2445/* ---------------------------------------------------------------------------
2446 \fn sme_GetFilterMatchCount
2447 \brief API to get D0 PC Filter Match Count
2448 \param hHal - The handle returned by macOpen
2449 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2450 \param callbackContext - Cookie to be passed back during callback
2451 \return eHalStatus
2452 ---------------------------------------------------------------------------*/
2453eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2454 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002455 void *callbackContext,
2456 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002457
2458/* ---------------------------------------------------------------------------
2459 \fn sme_ReceiveFilterClearFilter
2460 \brief API to clear Receive Packet Filter
2461 \param hHal - The handle returned by macOpen.
2462 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2463 \return eHalStatus
2464 ---------------------------------------------------------------------------*/
2465eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002466 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2467 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002468#endif // WLAN_FEATURE_PACKET_FILTERING
2469/* ---------------------------------------------------------------------------
2470
2471 \fn sme_IsChannelValid
2472 \brief To check if the channel is valid for currently established domain
2473 This is a synchronous API.
2474
2475 \param hHal - The handle returned by macOpen.
2476 \param channel - channel to verify
2477
2478 \return TRUE/FALSE, TRUE if channel is valid
2479
2480 -------------------------------------------------------------------------------*/
2481tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2482
2483/* ---------------------------------------------------------------------------
2484 \fn sme_SetFreqBand
2485 \brief Used to set frequency band.
2486 \param hHal
2487 \eBand band value to be configured
2488 \- return eHalStatus
2489 -------------------------------------------------------------------------*/
2490eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2491
2492/* ---------------------------------------------------------------------------
2493 \fn sme_GetFreqBand
2494 \brief Used to get the current band settings.
2495 \param hHal
2496 \pBand pointer to hold the current band value
2497 \- return eHalStatus
2498 -------------------------------------------------------------------------*/
2499eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2500
2501/* ---------------------------------------------------------------------------
2502
2503 \fn sme_SetTxPerTracking
2504 \brief Set Tx PER tracking configuration parameters
2505 \param hHal - The handle returned by macOpen.
2506 \param pTxPerTrackingParam - Tx PER configuration parameters
2507 \return eHalStatus
2508 ---------------------------------------------------------------------------*/
2509eHalStatus sme_SetTxPerTracking (
2510 tHalHandle hHal,
2511 void (*pCallbackfn) (void *pCallbackContext),
2512 void *pCallbackContext,
2513 tpSirTxPerTrackingParam pTxPerTrackingParam);
2514
2515#ifdef WLAN_FEATURE_GTK_OFFLOAD
2516/* ---------------------------------------------------------------------------
2517 \fn sme_SetGTKOffload
2518 \brief API to set GTK offload feature.
2519 \param hHal - The handle returned by macOpen.
2520 \param pRequest - Pointer to the GTK offload request.
2521 \return eHalStatus
2522 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002523eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002524
2525/* ---------------------------------------------------------------------------
2526 \fn sme_GetGTKOffload
2527 \brief API to get GTK offload information.
2528 \param hHal - The handle returned by macOpen.
2529 \param pRequest - Pointer to the GTK offload response.
2530 \return eHalStatus
2531 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002532eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2533 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002534#endif // WLAN_FEATURE_GTK_OFFLOAD
2535
2536#ifdef WLAN_WAKEUP_EVENTS
2537eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2538#endif // WLAN_WAKEUP_EVENTS
2539
2540/* ---------------------------------------------------------------------------
2541 \fn sme_SetTxPerTracking
2542 \brief Set Tx PER tracking configuration parameters
2543 \param hHal - The handle returned by macOpen.
2544 \param pTxPerTrackingParam - Tx PER configuration parameters
2545 \return eHalStatus
2546 ---------------------------------------------------------------------------*/
2547eHalStatus sme_SetTxPerTracking (
2548 tHalHandle hHal,
2549 void (*pCallbackfn) (void *pCallbackContext),
2550 void *pCallbackContext,
2551 tpSirTxPerTrackingParam pTxPerTrackingParam);
2552
2553
2554//return frequency for a particular channel
2555tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2556
2557tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2558
2559#if defined WLAN_FEATURE_P2P_INTERNAL
2560
2561eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2562
2563/* ---------------------------------------------------------------------------
2564 \fn sme_p2pFlushDeviceList
2565 \brief Remove cached P2P result from scan results
2566 \param hHal - The handle returned by macOpen.
2567 \param HDDSessionId - HDD's sessionId. Currently unused.
2568 \return eHalStatus
2569 ---------------------------------------------------------------------------*/
2570eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2571
2572eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2573 tCsrScanResultFilter *pFilter);
2574
2575#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2576
2577/* ---------------------------------------------------------------------------
2578 \fn sme_SetMaxTxPower
2579 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2580 setting will not persist over reboots
2581 \param hHal
2582 \param pBssid BSSID to set the power cap for
2583 \param pBssid pSelfMacAddress self MAC Address
2584 \param pBssid power to set in dB
2585 \- return eHalStatus
2586 -------------------------------------------------------------------------*/
2587eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2588 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2589
Jeff Johnson295189b2012-06-20 16:38:30 -07002590/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002591 \fn sme_SetMaxTxPowerPerBand
2592 \brief Used to set the Maximum Transmit Power for
2593 specific band dynamically. Note: this setting will not persist over reboots
2594 \param band
2595 \param power to set in dB
2596 \- return eHalStatus
2597 -------------------------------------------------------------------------*/
2598eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2599
2600/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002601
schang86c22c42013-03-13 18:41:24 -07002602 \fn sme_SetTxPower
2603
2604 \brief Set Transmit Power dynamically. Note: this setting will
2605 not persist over reboots.
2606
2607 \param hHal
2608 \param sessionId Target Session ID
2609 \param mW power to set in mW
2610 \- return eHalStatus
2611
2612 -------------------------------------------------------------------------------*/
2613eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2614
2615/* ---------------------------------------------------------------------------
2616
Jeff Johnson295189b2012-06-20 16:38:30 -07002617 \fn sme_HideSSID
2618
2619 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2620 not persist over reboots.
2621
2622 \param hHal
2623 \param sessionId
2624 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2625 \- return eHalStatus
2626
2627 -------------------------------------------------------------------------------*/
2628eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002629
2630/* ---------------------------------------------------------------------------
2631
2632 \fn sme_SetTmLevel
2633 \brief Set Thermal Mitigation Level to RIVA
2634 \param hHal - The handle returned by macOpen.
2635 \param newTMLevel - new Thermal Mitigation Level
2636 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002637 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002638 ---------------------------------------------------------------------------*/
2639eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2640
2641/*---------------------------------------------------------------------------
2642
2643 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2644 Host and FW.
2645
2646 \param hHal - HAL handle for device
2647
2648 \return NONE
2649
2650---------------------------------------------------------------------------*/
2651void sme_featureCapsExchange(tHalHandle hHal);
2652
Jeff Johnsond13512a2012-07-17 11:42:19 -07002653/*---------------------------------------------------------------------------
2654
Yathish9f22e662012-12-10 14:21:35 -08002655 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2656 between in Host.
2657
2658 \param hHal - HAL handle for device
2659
2660 \return NONE
2661
2662---------------------------------------------------------------------------*/
2663void sme_disableFeatureCapablity(tANI_U8 feature_index);
2664
2665/*---------------------------------------------------------------------------
2666
Jeff Johnsond13512a2012-07-17 11:42:19 -07002667 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2668 country code
2669 Host and FW.
2670
2671 \param hHal - HAL handle for device
2672 \param pCountry - pointer to country code
2673
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002674 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002675
2676 ---------------------------------------------------------------------------*/
2677eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2678
2679/*---------------------------------------------------------------------------
2680
2681 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2682 country code.
2683
2684 \param hHal - HAL handle for device
2685 \param pCountry - pointer to country code
2686
2687 \return Success or failure
2688
2689 ---------------------------------------------------------------------------*/
2690eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2691
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002692/* ---------------------------------------------------------------------------
2693 \fn sme_transportDebug
2694 \brief Dynamically monitoring Transport channels
2695 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002696 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002697 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002698 \param toggleStallDetect Enable stall detect feature
2699 This feature will take effect to data performance
2700 Not integrate till fully verification
2701 \- return NONE
2702 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002703void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002704
Kiran4a17ebe2013-01-31 10:43:43 -08002705/* ---------------------------------------------------------------------------
2706 \fn sme_ResetPowerValuesFor5G
2707 \brief Reset the power values for 5G band with NV power values.
2708 \param hHal - HAL handle for device
2709 \- return NONE
2710 -------------------------------------------------------------------------*/
2711void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2712
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002713#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002714/* ---------------------------------------------------------------------------
2715 \fn sme_UpdateRoamPrefer5GHz
2716 \brief enable/disable Roam prefer 5G runtime option
2717 This function is called through dynamic setConfig callback function
2718 to configure the Roam prefer 5G runtime option
2719 \param hHal - HAL handle for device
2720 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2721 \- return Success or failure
2722 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002723eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002724
2725/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002726 \fn sme_setRoamIntraBand
2727 \brief enable/disable Intra band roaming
2728 This function is called through dynamic setConfig callback function
2729 to configure the intra band roaming
2730 \param hHal - HAL handle for device
2731 \param nRoamIntraBand Enable/Disable Intra band roaming
2732 \- return Success or failure
2733 -------------------------------------------------------------------------*/
2734eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2735
2736/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002737 \fn sme_UpdateRoamScanNProbes
2738 \brief function to update roam scan N probes
2739 This function is called through dynamic setConfig callback function
2740 to update roam scan N probes
2741 \param hHal - HAL handle for device
2742 \param nProbes number of probe requests to be sent out
2743 \- return Success or failure
2744 -------------------------------------------------------------------------*/
2745eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2746
2747/* ---------------------------------------------------------------------------
2748 \fn sme_UpdateRoamScanHomeAwayTime
2749 \brief function to update roam scan Home away time
2750 This function is called through dynamic setConfig callback function
2751 to update roam scan home away time
2752 \param hHal - HAL handle for device
2753 \param nRoamScanAwayTime Scan home away time
2754 \- return Success or failure
2755 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002756eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2757 const v_U16_t nRoamScanHomeAwayTime,
2758 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002759
2760/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002761 \fn sme_getRoamIntraBand
2762 \brief get Intra band roaming
2763 \param hHal - HAL handle for device
2764 \- return Success or failure
2765 -------------------------------------------------------------------------*/
2766v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2767
2768/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002769 \fn sme_getRoamScanNProbes
2770 \brief get N Probes
2771 \param hHal - HAL handle for device
2772 \- return Success or failure
2773 -------------------------------------------------------------------------*/
2774v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2775
2776/* ---------------------------------------------------------------------------
2777 \fn sme_getRoamScanHomeAwayTime
2778 \brief get Roam scan home away time
2779 \param hHal - HAL handle for device
2780 \- return Success or failure
2781 -------------------------------------------------------------------------*/
2782v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2783
2784/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002785 \fn sme_UpdateImmediateRoamRssiDiff
2786 \brief Update nImmediateRoamRssiDiff
2787 This function is called through dynamic setConfig callback function
2788 to configure nImmediateRoamRssiDiff
2789 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2790 \param hHal - HAL handle for device
2791 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2792 candidate and current AP.
2793 \- return Success or failure
2794 -------------------------------------------------------------------------*/
2795
2796eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002797
Srinivas Girigowdade697412013-02-14 16:31:48 -08002798/* ---------------------------------------------------------------------------
2799 \fn sme_UpdateRoamRssiDiff
2800 \brief Update RoamRssiDiff
2801 This function is called through dynamic setConfig callback function
2802 to configure RoamRssiDiff
2803 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2804 \param hHal - HAL handle for device
2805 \param RoamRssiDiff - minimum rssi difference between potential
2806 candidate and current AP.
2807 \- return Success or failure
2808 -------------------------------------------------------------------------*/
2809
2810eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2811
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002812/*--------------------------------------------------------------------------
2813 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2814 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2815 isFastTransitionEnabled.
2816 This is a synchronuous call
2817 \param hHal - The handle returned by macOpen.
2818 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2819 Other status means SME is failed to update isFastTransitionEnabled.
2820 \sa
2821 --------------------------------------------------------------------------*/
2822
2823eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2824 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002825
2826/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002827 \fn sme_UpdateWESMode
2828 \brief Update WESMode
2829 This function is called through dynamic setConfig callback function
2830 to configure isWESModeEnabled
2831 \param hHal - HAL handle for device
2832 \param isWESModeEnabled - Enable/Disable WES Mode
2833 \- return Success or failure
2834 -------------------------------------------------------------------------*/
2835eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2836
2837/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002838 \fn sme_SetRoamScanControl
2839 \brief Set roam scan control
2840 This function is called to set roam scan control
2841 if roam scan control is set to 0, roaming scan cache is cleared
2842 any value other than 0 is treated as invalid value
2843 \param hHal - HAL handle for device
2844 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2845 Other status means SME failure to update
2846 -------------------------------------------------------------------------*/
2847eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002848#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002849
2850#ifdef FEATURE_WLAN_LFR
2851/*--------------------------------------------------------------------------
2852 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002853 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002854 isFastRoamIniFeatureEnabled.
2855 This is a synchronuous call
2856 \param hHal - The handle returned by macOpen.
2857 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2858 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2859 \sa
2860 --------------------------------------------------------------------------*/
2861
Srinivas Girigowdade697412013-02-14 16:31:48 -08002862eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002863 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002864
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002865/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302866 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2867 When Supplicant issue enabled / disable fwr based roaming on the basis
2868 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2869
2870 This is a synchronous call
2871 \param hHal - The handle returned by macOpen.
2872 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2873 Other status means SME is failed to (enabled/disabled) offload scan.
2874 \sa
2875 --------------------------------------------------------------------------*/
2876
2877eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2878 const v_BOOL_t isFastRoamEnabled);
2879
2880/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002881 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2882 Enable/disable LFR MAWC support at runtime
2883 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2884 isMAWCIniFeatureEnabled.
2885 This is a synchronous call
2886 \param hHal - The handle returned by macOpen.
2887 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2888 Other status means SME is failed to update MAWCEnabled.
2889 \sa
2890 --------------------------------------------------------------------------*/
2891eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2892 const v_BOOL_t MAWCEnabled);
2893
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002894
2895#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2896/*--------------------------------------------------------------------------
2897 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2898 This is a synchronuous call
2899 \param hHal - The handle returned by macOpen.
2900 \return eHAL_STATUS_SUCCESS
2901 Other status means SME is failed
2902 \sa
2903 --------------------------------------------------------------------------*/
2904
2905eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2906 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2907#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002908#endif /* FEATURE_WLAN_LFR */
2909
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002910#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002911/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002912 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002913 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002914 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002915 This is a synchronuous call
2916 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002917 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2918 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002919 \sa
2920 --------------------------------------------------------------------------*/
2921
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002922eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2923 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002924
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002925#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002926
2927/*--------------------------------------------------------------------------
2928 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2929 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2930 fEnableFwRssiMonitoring.
2931 This is a synchronuous call
2932 \param hHal - The handle returned by macOpen.
2933 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2934 Other status means SME is failed to update
2935 \sa
2936 --------------------------------------------------------------------------*/
2937
2938eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2939 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002940
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002941#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002942/*--------------------------------------------------------------------------
2943 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2944 This is a synchronuous call
2945 \param hHal - The handle returned by macOpen.
2946 \return eHAL_STATUS_SUCCESS - SME update config successful.
2947 Other status means SME is failed to update
2948 \sa
2949 --------------------------------------------------------------------------*/
2950eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2951 v_U8_t neighborLookupRssiThreshold);
2952
2953/*--------------------------------------------------------------------------
2954 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2955 This is a synchronuous call
2956 \param hHal - The handle returned by macOpen.
2957 \return eHAL_STATUS_SUCCESS - SME update config successful.
2958 Other status means SME is failed to update
2959 \sa
2960 --------------------------------------------------------------------------*/
2961eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2962 v_U8_t neighborReassocRssiThreshold);
2963
2964/*--------------------------------------------------------------------------
2965 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2966 This is a synchronuous call
2967 \param hHal - The handle returned by macOpen.
2968 \return eHAL_STATUS_SUCCESS - SME update config successful.
2969 Other status means SME is failed to update
2970 \sa
2971 --------------------------------------------------------------------------*/
2972v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2973
2974/*--------------------------------------------------------------------------
2975 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2976 This is a synchronuous call
2977 \param hHal - The handle returned by macOpen.
2978 \return eHAL_STATUS_SUCCESS - SME update config successful.
2979 Other status means SME is failed to update
2980 \sa
2981 --------------------------------------------------------------------------*/
2982eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2983 v_U16_t neighborScanResultsRefreshPeriod);
2984
2985/*--------------------------------------------------------------------------
2986 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2987 This is a synchronuous call
2988 \param hHal - The handle returned by macOpen.
2989 \return eHAL_STATUS_SUCCESS - SME update config successful.
2990 Other status means SME is failed to update
2991 \sa
2992 --------------------------------------------------------------------------*/
2993v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2994
2995/*--------------------------------------------------------------------------
2996 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2997 This is a synchronuous call
2998 \param hHal - The handle returned by macOpen.
2999 \return eHAL_STATUS_SUCCESS - SME update config successful.
3000 Other status means SME is failed to update
3001 \sa
3002 --------------------------------------------------------------------------*/
3003v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3004
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003005/* ---------------------------------------------------------------------------
3006 \fn sme_UpdateEmptyScanRefreshPeriod
3007 \brief Update nEmptyScanRefreshPeriod
3008 This function is called through dynamic setConfig callback function
3009 to configure nEmptyScanRefreshPeriod
3010 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3011 \param hHal - HAL handle for device
3012 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3013 \- return Success or failure
3014 -------------------------------------------------------------------------*/
3015eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3016
3017/* ---------------------------------------------------------------------------
3018 \fn sme_setNeighborScanMinChanTime
3019 \brief Update nNeighborScanMinChanTime
3020 This function is called through dynamic setConfig callback function
3021 to configure gNeighborScanChannelMinTime
3022 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3023 \param hHal - HAL handle for device
3024 \param nNeighborScanMinChanTime - Channel minimum dwell time
3025 \- return Success or failure
3026 -------------------------------------------------------------------------*/
3027eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3028
3029/* ---------------------------------------------------------------------------
3030 \fn sme_setNeighborScanMaxChanTime
3031 \brief Update nNeighborScanMaxChanTime
3032 This function is called through dynamic setConfig callback function
3033 to configure gNeighborScanChannelMaxTime
3034 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3035 \param hHal - HAL handle for device
3036 \param nNeighborScanMinChanTime - Channel maximum dwell time
3037 \- return Success or failure
3038 -------------------------------------------------------------------------*/
3039eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3040
3041/* ---------------------------------------------------------------------------
3042 \fn sme_getNeighborScanMinChanTime
3043 \brief get neighbor scan min channel time
3044 \param hHal - The handle returned by macOpen.
3045 \return v_U16_t - channel min time value
3046 -------------------------------------------------------------------------*/
3047v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3048
3049/* ---------------------------------------------------------------------------
3050 \fn sme_getNeighborScanMaxChanTime
3051 \brief get neighbor scan max channel time
3052 \param hHal - The handle returned by macOpen.
3053 \return v_U16_t - channel max time value
3054 -------------------------------------------------------------------------*/
3055v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3056
3057/* ---------------------------------------------------------------------------
3058 \fn sme_setNeighborScanPeriod
3059 \brief Update nNeighborScanPeriod
3060 This function is called through dynamic setConfig callback function
3061 to configure nNeighborScanPeriod
3062 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3063 \param hHal - HAL handle for device
3064 \param nNeighborScanPeriod - neighbor scan period
3065 \- return Success or failure
3066 -------------------------------------------------------------------------*/
3067eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3068
3069/* ---------------------------------------------------------------------------
3070 \fn sme_getNeighborScanPeriod
3071 \brief get neighbor scan period
3072 \param hHal - The handle returned by macOpen.
3073 \return v_U16_t - neighbor scan period
3074 -------------------------------------------------------------------------*/
3075v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3076
3077#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003078
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003079#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003080/*--------------------------------------------------------------------------
3081 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3082 This is a synchronuous call
3083 \param hHal - The handle returned by macOpen.
3084 \return eHAL_STATUS_SUCCESS - SME update config successful.
3085 Other status means SME is failed to update
3086 \sa
3087 --------------------------------------------------------------------------*/
3088v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3089
3090/*--------------------------------------------------------------------------
3091 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3092 This is a synchronuous call
3093 \param hHal - The handle returned by macOpen.
3094 \return eHAL_STATUS_SUCCESS - SME update config successful.
3095 Other status means SME is failed to update
3096 \sa
3097 --------------------------------------------------------------------------*/
3098eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3099 tANI_U8 numChannels);
3100
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003101#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003102/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003103 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003104 This is a synchronuous call
3105 \param hHal - The handle returned by macOpen.
3106 \return eHAL_STATUS_SUCCESS - SME update config successful.
3107 Other status means SME is failed to update
3108 \sa
3109 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003110eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003111 tANI_U8 *pChannelList,
3112 tANI_U8 numChannels);
3113#endif
3114
Srinivas Girigowdade697412013-02-14 16:31:48 -08003115/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003116 \brief sme_getRoamScanChannelList() - get roam scan channel list
3117 This is a synchronuous call
3118 \param hHal - The handle returned by macOpen.
3119 \return eHAL_STATUS_SUCCESS - SME update config successful.
3120 Other status means SME is failed to update
3121 \sa
3122 --------------------------------------------------------------------------*/
3123eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3124 tANI_U8 *pNumChannels);
3125
3126/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003127 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003128 This is a synchronuous call
3129 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003130 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003131 FALSE (0) - if feature is disabled (compile or runtime)
3132 \sa
3133 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003134tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003135
3136/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003137 \brief sme_getWESMode() - getWES Mode
3138 This is a synchronous call
3139 \param hHal - The handle returned by macOpen.
3140 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3141 \sa
3142 --------------------------------------------------------------------------*/
3143v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3144
3145/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003146 \brief sme_GetRoamScanControl() - get scan control
3147 This is a synchronous call
3148 \param hHal - The handle returned by macOpen.
3149 \return v_BOOL_t - Enabled(1)/Disabled(0)
3150 \sa
3151 --------------------------------------------------------------------------*/
3152v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3153
3154/* ---------------------------------------------------------------------------
3155 \fn sme_UpdateEmptyScanRefreshPeriod
3156 \brief Update nnEmptyScanRefreshPeriod
3157 This function is called through dynamic setConfig callback function
3158 to configure nnEmptyScanRefreshPeriod
3159 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3160 \param hHal - HAL handle for device
3161 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3162 \- return Success or failure
3163 -------------------------------------------------------------------------*/
3164
3165/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003166 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3167 This is a synchronuous call
3168 \param hHal - The handle returned by macOpen.
3169 \return TRUE (1) - if the feature is enabled
3170 FALSE (0) - if feature is disabled (compile or runtime)
3171 \sa
3172 --------------------------------------------------------------------------*/
3173tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3174
3175/*--------------------------------------------------------------------------
3176 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3177 This is a synchronuous call
3178 \param hHal - The handle returned by macOpen.
3179 \return TRUE (1) - if the feature is enabled
3180 FALSE (0) - if feature is disabled (compile or runtime)
3181 \sa
3182 --------------------------------------------------------------------------*/
3183tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3184
Srinivas Girigowdade697412013-02-14 16:31:48 -08003185#endif
3186
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003187#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3188/*--------------------------------------------------------------------------
3189 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3190 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3191 gRoamScanOffloadEnabled.
3192 This is a synchronous call
3193 \param hHal - The handle returned by macOpen.
3194 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3195 Other status means SME is failed to update.
3196 \sa
3197 --------------------------------------------------------------------------*/
3198
3199eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3200#endif
3201
3202
Srinivas Girigowdade697412013-02-14 16:31:48 -08003203/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003204 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303205 \brief Check if a feature is enabled by FW
3206
3207 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003208 A value from enum placeHolderInCapBitmap
3209
3210 \- return 1/0 (TRUE/FALSE)
3211 -------------------------------------------------------------------------*/
3212tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303213
3214/* ---------------------------------------------------------------------------
3215 \fn sme_IsFeatureSupportedByDriver
3216 \brief Check if a feature is enabled by driver
3217
3218 \param featEnumValue - Enumeration value of the feature to be checked.
3219 A value from enum placeHolderInCapBitmap
3220
3221 \- return 1/0 (TRUE/FALSE)
3222 -------------------------------------------------------------------------*/
3223tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3224
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003225#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303226
3227/* ---------------------------------------------------------------------------
3228 \fn sme_SendTdlsLinkEstablishParams
3229 \brief API to send TDLS Link Establishment Parameters.
3230
3231 \param peerMac - peer's Mac Adress.
3232 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3233 \- return VOS_STATUS_SUCCES
3234 -------------------------------------------------------------------------*/
3235
3236VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
3237 tANI_U8 sessionId,
3238 tSirMacAddr peerMac,
3239 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
3240
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003241/* ---------------------------------------------------------------------------
3242 \fn sme_SendTdlsMgmtFrame
3243 \brief API to send TDLS management frames.
3244
3245 \param peerMac - peer's Mac Adress.
3246 \param frame_type - Type of TDLS mgmt frame to be sent.
3247 \param dialog - dialog token used in the frame.
3248 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303249 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003250 \param buf - additional IEs to be included
3251 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003252 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003253 \- return VOS_STATUS_SUCCES
3254 -------------------------------------------------------------------------*/
3255VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303256 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 -08003257/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003258 \fn sme_ChangeTdlsPeerSta
3259 \brief API to Update TDLS peer sta parameters.
3260
3261 \param peerMac - peer's Mac Adress.
3262 \param staParams - Peer Station Parameters.
3263 \- return VOS_STATUS_SUCCES
3264 -------------------------------------------------------------------------*/
3265VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
3266 tCsrStaParams *pstaParams);
3267/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003268 \fn sme_AddTdlsPeerSta
3269 \brief API to Add TDLS peer sta entry.
3270
3271 \param peerMac - peer's Mac Adress.
3272 \- return VOS_STATUS_SUCCES
3273 -------------------------------------------------------------------------*/
3274VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3275/* ---------------------------------------------------------------------------
3276 \fn sme_DeleteTdlsPeerSta
3277 \brief API to Delete TDLS peer sta entry.
3278
3279 \param peerMac - peer's Mac Adress.
3280 \- return VOS_STATUS_SUCCES
3281 -------------------------------------------------------------------------*/
3282VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003283/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003284 \fn sme_SetTdlsPowerSaveProhibited
3285 \API to set/reset the isTdlsPowerSaveProhibited.
3286
3287 \- return void
3288 -------------------------------------------------------------------------*/
3289void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003290#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303291/* ---------------------------------------------------------------------------
3292 \fn sme_IsPmcBmps
3293 \brief API to Check if PMC state is BMPS.
3294
3295 \- return v_BOOL_t
3296 -------------------------------------------------------------------------*/
3297v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3298
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003299eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003300
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303301/* ---------------------------------------------------------------------------
3302 \fn sme_UpdateDFSRoamMode
3303 \brief Update DFS roam scan mode
3304 This function is called to configure allowDFSChannelRoam
3305 dynamically
3306 \param hHal - HAL handle for device
3307 \param allowDFSChannelRoam - DFS roaming scan mode
3308 mode 0 disable roam scan on DFS channels
3309 mode 1 enables roam scan (passive/active) on DFS channels
3310 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3311 successfully.
3312 Other status means SME failed to update DFS roaming scan config.
3313 \sa
3314 -------------------------------------------------------------------------*/
3315eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3316
3317/* ---------------------------------------------------------------------------
3318 \fn sme_UpdateDFSScanMode
3319 \brief Update DFS scan mode
3320 This function is called to configure fEnableDFSChnlScan.
3321 \param hHal - HAL handle for device
3322 \param dfsScanMode - DFS scan mode
3323 mode 0 disable scan on DFS channels
3324 mode 1 enables passive scan on DFS channels
3325 mode 2 enables active scan on DFS channels for static list
3326 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3327 successfully.
3328 Other status means SME failed to update DFS scan config.
3329 \sa
3330 -------------------------------------------------------------------------*/
3331eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3332
3333/*--------------------------------------------------------------------------
3334 \brief sme_GetDFSScanMode() - get DFS scan mode
3335 \param hHal - The handle returned by macOpen.
3336 \return DFS scan mode
3337 mode 0 disable scan on DFS channels
3338 mode 1 enables passive scan on DFS channels
3339 mode 2 enables active scan on DFS channels for static list
3340 \sa
3341 --------------------------------------------------------------------------*/
3342v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3343
3344/* ---------------------------------------------------------------------------
3345 \fn sme_HandleDFSChanScan
3346 \brief Gets Valid channel list and updates scan control list according to
3347 dfsScanMode
3348 \param hHal - HAL handle for device
3349 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3350 Otherwise eHAL_STATUS_SUCCESS -
3351 \sa
3352 -------------------------------------------------------------------------*/
3353eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3354
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003355/*
3356 * SME API to enable/disable WLAN driver initiated SSR
3357 */
3358void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3359
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303360/* ---------------------------------------------------------------------------
3361
3362 \fn sme_SetPhyMode
3363
3364 \brief Changes the PhyMode.
3365
3366 \param hHal - The handle returned by macOpen.
3367
3368 \param phyMode new phyMode which is to set
3369
3370 \return eHalStatus SUCCESS.
3371
3372 -------------------------------------------------------------------------------*/
3373eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3374
3375/* ---------------------------------------------------------------------------
3376
3377 \fn sme_GetPhyMode
3378
3379 \brief gets current PhyMode.
3380
3381 \param hHal - The handle returned by macOpen.
3382
3383 \return eHalStatus PhyMode
3384
3385 -------------------------------------------------------------------------------*/
3386eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3387
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003388/*
3389 * SME API to determine the channel bonding mode
3390 */
3391VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3392
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003393#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3394/*--------------------------------------------------------------------------
3395 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3396 from CSR.
3397 This is a synchronous call
3398 \param hHal - The handle returned by macOpen
3399 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3400 BSSID, channel etc.)
3401 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3402 Other status means SME is failed to send the request.
3403 \sa
3404 --------------------------------------------------------------------------*/
3405
3406eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3407#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003408/*--------------------------------------------------------------------------
3409 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3410 is any connected session .
3411 This is a synchronous call
3412 \param hHal - The handle returned by macOpen
3413 \return VOS_STATUS - SME passed the request to CSR successfully.
3414 Other status means SME is failed to send the request.
3415 \sa
3416 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003417VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003418
Agarwal Ashish57e84372014-12-05 18:26:53 +05303419/*--------------------------------------------------------------------------
3420 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3421 is any connected session .
3422 This is a synchronous call
3423 \param hHal - The handle returned by macOpen
3424 \return VOS_STATUS - SME passed the request to CSR successfully.
3425 Other status means SME is failed to send the request.
3426 \sa
3427 --------------------------------------------------------------------------*/
3428VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3429
Leo Chang9056f462013-08-01 19:21:11 -07003430#ifdef FEATURE_WLAN_LPHB
3431/* ---------------------------------------------------------------------------
3432 \fn sme_LPHBConfigReq
3433 \API to make configuration LPHB within FW.
3434 \param hHal - The handle returned by macOpen
3435 \param lphdReq - LPHB request argument by client
3436 \param pCallbackfn - LPHB timeout notification callback function pointer
3437 \- return Configuration message posting status, SUCCESS or Fail
3438 -------------------------------------------------------------------------*/
3439eHalStatus sme_LPHBConfigReq(
3440 tHalHandle hHal,
3441 tSirLPHBReq *lphdReq,
3442 void (*pCallbackfn)(void *pAdapter, void *indParam));
3443#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003444
3445/* ---------------------------------------------------------------------------
3446 \fn sme_AddPeriodicTxPtrn
3447 \brief API to Periodic TX Pattern Offload feature
3448 \param hHal - The handle returned by macOpen
3449 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3450 \return eHalStatus
3451 ---------------------------------------------------------------------------*/
3452eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3453 *addPeriodicTxPtrnParams);
3454
3455/* ---------------------------------------------------------------------------
3456 \fn sme_DelPeriodicTxPtrn
3457 \brief API to Periodic TX Pattern Offload feature
3458 \param hHal - The handle returned by macOpen
3459 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3460 \return eHalStatus
3461 ---------------------------------------------------------------------------*/
3462eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3463 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003464/*--------------------------------------------------------------------------
3465 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3466 scan parameter.
3467 This is a synchronous call
3468 \param hHal - The handle returned by macOpen
3469 \return None.
3470 \sa
3471 --------------------------------------------------------------------------*/
3472void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3473 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303474
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003475/* ---------------------------------------------------------------------------
3476 \fn sme_SendRateUpdateInd
3477 \brief API to Update rate
3478 \param hHal - The handle returned by macOpen
3479 \param rateUpdateParams - Pointer to rate update params
3480 \return eHalStatus
3481 ---------------------------------------------------------------------------*/
3482eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3483
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303484/*
3485 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3486 * triggers
3487 * return status
3488*/
3489eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3490 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303491 tSmeFastRoamTrigger fastRoamTrig,
3492 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303493
3494eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
3495 tANI_U8 *pBSSId,
3496 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003497
3498void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303499
3500#ifdef FEATURE_WLAN_BATCH_SCAN
3501/* ---------------------------------------------------------------------------
3502 \fn sme_SetBatchScanReq
3503 \brief API to set batch scan request in FW
3504 \param hHal - The handle returned by macOpen.
3505 \param pRequest - Pointer to the batch request.
3506 \param sessionId - session ID
3507 \param callbackRoutine - HDD callback which needs to be invoked after
3508 getting set batch scan response from FW
3509 \param callbackContext - pAdapter context
3510 \return eHalStatus
3511 ---------------------------------------------------------------------------*/
3512eHalStatus
3513sme_SetBatchScanReq
3514(
3515 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3516 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3517 void *callbackContext
3518);
3519
3520/* ---------------------------------------------------------------------------
3521 \fn sme_TriggerBatchScanResultInd
3522 \brief API to trigger batch scan result indications from from FW
3523 \param hHal - The handle returned by macOpen.
3524 \param pRequest - Pointer to get batch request.
3525 \param sessionId - session ID
3526 \param callbackRoutine - HDD callback which needs to be invoked after
3527 getting get batch scan response from FW
3528 \param callbackContext - pAdapter context
3529 \return eHalStatus
3530 ---------------------------------------------------------------------------*/
3531eHalStatus
3532sme_TriggerBatchScanResultInd
3533(
3534 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3535 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3536 void *callbackContext
3537);
3538
3539/* ---------------------------------------------------------------------------
3540 \fn sme_StopBatchScanInd
3541 \brief API to stop batch scan request in FW
3542 \param hHal - The handle returned by macOpen.
3543 \param pRequest - Pointer to stop batch indication
3544 \return eHalStatus
3545 ---------------------------------------------------------------------------*/
3546eHalStatus
3547sme_StopBatchScanInd
3548(
3549 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3550);
3551
3552#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003553
3554#ifdef FEATURE_WLAN_CH_AVOID
3555/* ---------------------------------------------------------------------------
3556 \fn sme_AddChAvoidCallback
3557 \brief Used to plug in callback function
3558 Which notify channel may not be used with SAP or P2PGO mode.
3559 Notification come from FW.
3560 \param hHal
3561 \param pCallbackfn : callback function pointer should be plugged in
3562 \- return eHalStatus
3563 -------------------------------------------------------------------------*/
3564eHalStatus sme_AddChAvoidCallback
3565(
3566 tHalHandle hHal,
3567 void (*pCallbackfn)(void *pAdapter, void *indParam)
3568);
3569#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003570eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303571/* ---------------------------------------------------------------------------
3572 \fn sme_requestTypetoString
3573 \brief API to convert requestType enum values
3574 to string.
3575 ---------------------------------------------------------------------------*/
3576const char * sme_requestTypetoString(const v_U8_t requestType);
3577/* ---------------------------------------------------------------------------
3578 \fn sme_PmcStatetoString
3579 \brief API to convert PmcState enum values
3580 to string.
3581 ---------------------------------------------------------------------------*/
3582const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303583
3584eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3585
Agarwal Ashish5e414792014-06-08 15:25:23 +05303586tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303587
3588// tdlsoffchan
3589VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3590 tANI_U8 sessionId,
3591 tSirMacAddr peerMac,
3592 tANI_S32 tdlsOffCh,
3593 tANI_S32 tdlsOffChBwOffset,
3594 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303595eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3596 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303597void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303598
3599void sme_resetCoexEevent(tHalHandle hHal);
3600
Peng Xu117eab42014-09-25 13:33:27 +05303601tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3602tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303603#ifdef WLAN_FEATURE_AP_HT40_24G
3604void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3605 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303606eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3607 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303608#endif
Peng Xu117eab42014-09-25 13:33:27 +05303609
Agarwal Ashish738843c2014-09-25 12:27:56 +05303610void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3611
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303612/* HDD Callback function */
3613typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3614
3615eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3616 u8 *pCmd,
3617 int length,
3618 pEncryptMsgRSPCb encCB);
3619
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303620/* ---------------------------------------------------------------------------
3621 \fn sme_RegisterBtCoexTDLSCallback
3622 \brief Used to plug in callback function
3623 Which notify btcoex on or off.
3624 Notification come from FW.
3625 \param hHal
3626 \param pCallbackfn : callback function pointer should be plugged in
3627 \- return eHalStatus
3628 -------------------------------------------------------------------------*/
3629eHalStatus sme_RegisterBtCoexTDLSCallback
3630(
3631 tHalHandle hHal,
3632 void (*pCallbackfn)(void *pAdapter, int)
3633);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303634
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303635/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303636 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303637
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303638 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303639
3640 \param hHal - The handle returned by macOpen.
3641
3642 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3643 eANI_BOOLEAN_FALSE otherwise
3644---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303645tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303646
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303647/* ---------------------------------------------------------------------------
3648
3649 \fn sme_IsTdlsOffChannelValid
3650 \brief To check if the channel is valid for currently established domain
3651 This is a synchronous API.
3652
3653 \param hHal - The handle returned by macOpen.
3654 \param channel - channel to verify
3655
3656 \return TRUE/FALSE, TRUE if channel is valid
3657
3658 -------------------------------------------------------------------------------*/
3659tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3660
Mukul Sharma4be88422015-03-09 20:29:07 +05303661/* --------------------------------------------------------------------------
3662
3663 \fn sme_IsCoexScoIndicationSet
3664 \brief To check if the BTC module in fwr has sent the SCO
3665 indication to host or not
3666
3667 \param hHal - The handle returned by macOpen.
3668 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3669
3670 --------------------------------------------------------------------------*/
3671tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3672
Abhishek Singh01c73d12015-03-12 15:13:44 +05303673eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3674 tANI_U32 iniNumBuffAdvert,
3675 tANI_U32 set_value);
3676
Mukul Sharma45063942015-04-01 20:07:59 +05303677void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303678
3679/* ---------------------------------------------------------------------------
3680 \fn sme_SetTdls2040BSSCoexistence
3681 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3682
3683 \param isEnabled - Enable or Disable.
3684 \- return VOS_STATUS_SUCCES
3685 -------------------------------------------------------------------------*/
3686eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3687
Abhishek Singh41988ba2015-05-25 19:42:29 +05303688/* ---------------------------------------------------------------------------
3689 \fn sme_SetRtsCtsHtVht
3690 \brief API to to enable/disable RTS/CTS for different modes.
3691
3692 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3693 \- return VOS_STATUS_SUCCES if INdication is posted to
3694 WDA else return eHAL_STATUS_FAILURE
3695 -------------------------------------------------------------------------*/
3696eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3697
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303698tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
3699 tANI_U8 fcc_constraint);
3700
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303701eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07003702#endif //#if !defined( __SME_API_H )