blob: 5ceca8dec4af3c3010593cb33ac7b45af948df59 [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 ------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +053049#include <linux/version.h>
Jeff Johnson295189b2012-06-20 16:38:30 -070050#include "ccmApi.h"
51#include "csrApi.h"
52#include "pmcApi.h"
53#include "vos_mq.h"
54#include "vos_lock.h"
55#include "halTypes.h"
56#include "sirApi.h"
57#include "btcApi.h"
58#include "vos_nvitem.h"
59#include "p2p_Api.h"
Sushant Kaushik83392fa2015-05-05 17:44:40 +053060#include "smeInternal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070061
Jeff Johnsone7245742012-09-05 17:12:55 -070062#ifdef FEATURE_OEM_DATA_SUPPORT
63#include "oemDataApi.h"
64#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070065
66#if defined WLAN_FEATURE_VOWIFI
67#include "smeRrmInternal.h"
68#endif
Srinivas Dasari030bad32015-02-18 23:23:54 +053069#include "nan_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070070
71/*--------------------------------------------------------------------------
72 Preprocessor definitions and constants
73 ------------------------------------------------------------------------*/
74
75#define SME_SUMMARY_STATS 1
76#define SME_GLOBAL_CLASSA_STATS 2
77#define SME_GLOBAL_CLASSB_STATS 4
78#define SME_GLOBAL_CLASSC_STATS 8
79#define SME_GLOBAL_CLASSD_STATS 16
80#define SME_PER_STA_STATS 32
81
82#define SME_INVALID_COUNTRY_CODE "XX"
83
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070084//Macro to disable split scan
85#define SME_DISABLE_SPLIT_SCAN 255
Padma, Santhosh Kumar859d3712014-11-13 18:00:41 +053086
87//Macro to indicate invalid no of tspecs
88#define INVALID_TSPEC 100
89
Jeff Johnson295189b2012-06-20 16:38:30 -070090/*--------------------------------------------------------------------------
91 Type declarations
92 ------------------------------------------------------------------------*/
93typedef struct _smeConfigParams
94{
95 tCsrConfigParam csrConfig;
96#if defined WLAN_FEATURE_VOWIFI
97 tRrmConfigParam rrmConfig;
98#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070099#if defined FEATURE_WLAN_LFR
100 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800101 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700102#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800103#if defined FEATURE_WLAN_ESE
104 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700105#endif
106#if defined WLAN_FEATURE_P2P_INTERNAL
107 tP2PConfigParam p2pConfig;
108#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800109#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700110 tANI_U8 isFastTransitionEnabled;
111 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700112 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700113#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530114 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700115 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800116 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530117 tANI_U32 fDeferIMPSTime;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +0530118 tANI_U8 fBtcEnableIndTimerVal;
Jeff Johnson295189b2012-06-20 16:38:30 -0700119} tSmeConfigParams, *tpSmeConfigParams;
120
Sunil Duttc69bccb2014-05-26 21:30:20 +0530121#ifdef WLAN_FEATURE_LINK_LAYER_STATS
122
123/* ---------------------------------------------------------------------------
124 \fn sme_LLStatsSetReq
125 \brief API to set link layer stats request to FW
126 \param hHal - The handle returned by macOpen.
127
128 \Param pStatsReq - a pointer to a caller allocated object of
129 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
130 stats set.
131
132 \return eHalStatus
133 ---------------------------------------------------------------------------*/
134eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
135
136/* ---------------------------------------------------------------------------
137 \fn sme_LLStatsGetReq
138 \brief API to get link layer stats request to FW
139 \param hHal - The handle returned by macOpen.
140
141 \Param pStatsReq - a pointer to a caller allocated object of
142 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
143 stats get.
144
145 \return eHalStatus
146 ---------------------------------------------------------------------------*/
147eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
148
149/* ---------------------------------------------------------------------------
150 \fn sme_LLStatsClearReq
151 \brief API to clear link layer stats request to FW
152 \param hHal - The handle returned by macOpen.
153
154 \Param pStatsReq - a pointer to a caller allocated object of
155 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
156 stats clear.
157
158 \return eHalStatus
159 ---------------------------------------------------------------------------*/
160eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
161
162/* ---------------------------------------------------------------------------
163 \fn sme_SetLinkLayerStatsIndCB
164 \brief API to trigger Link Layer stats result indications from from FW
165 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530166 \param callbackRoutine - HDD callback which needs to be invoked after
167 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530168 \return eHalStatus
169 ---------------------------------------------------------------------------*/
170eHalStatus
171sme_SetLinkLayerStatsIndCB
172(
Dino Mycled3d50022014-07-07 12:58:25 +0530173 tHalHandle hHal,
174 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
175 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530176);
177
178
179#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
180
Dino Mycle2c198072014-06-10 10:15:52 +0530181#ifdef WLAN_FEATURE_EXTSCAN
182/* ---------------------------------------------------------------------------
183 \fn sme_GetValidChannelsByBand
184 \brief SME API to fetch all valid channel filtered by band
185 \param hHal
186 \param wifiBand: RF band information
187 \param aValidChannels: Array to store channel info
188 \param len: number of channels
189 \- return eHalStatus
190 -------------------------------------------------------------------------*/
191eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
192 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
193
194/* ---------------------------------------------------------------------------
195 \fn sme_EXTScanGetCapabilities
196 \brief SME API to fetch Extented Scan capabilities
197 \param hHal
198 \param pReq: Extented Scan capabilities structure
199 \- return eHalStatus
200 -------------------------------------------------------------------------*/
201eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
202 tSirGetEXTScanCapabilitiesReqParams *pReq);
203
204/* ---------------------------------------------------------------------------
205 \fn sme_EXTScanStart
206 \brief SME API to issue Extented Scan start
207 \param hHal
208 \param pStartCmd: Extented Scan start structure
209 \- return eHalStatus
210 -------------------------------------------------------------------------*/
211eHalStatus sme_EXTScanStart (tHalHandle hHal,
212 tSirEXTScanStartReqParams *pStartCmd);
213
214/* ---------------------------------------------------------------------------
215 \fn sme_EXTScanStop
216 \brief SME API to issue Extented Scan stop
217 \param hHal
218 \param pStopReq: Extented Scan stop structure
219 \- return eHalStatus
220 -------------------------------------------------------------------------*/
221eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
222
223/* ---------------------------------------------------------------------------
224 \fn sme_SetBssHotlist
225 \brief SME API to set BSSID hotlist
226 \param hHal
227 \param pSetHotListReq: Extented Scan set hotlist structure
228 \- return eHalStatus
229 -------------------------------------------------------------------------*/
230eHalStatus sme_SetBssHotlist (tHalHandle hHal,
231 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
232
233/* ---------------------------------------------------------------------------
234 \fn sme_ResetBssHotlist
235 \brief SME API to reset BSSID hotlist
236 \param hHal
237 \param pSetHotListReq: Extented Scan set hotlist structure
238 \- return eHalStatus
239 -------------------------------------------------------------------------*/
240eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
241 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
242
243/* ---------------------------------------------------------------------------
244 \fn sme_SetSignificantChange
245 \brief SME API to set significant change
246 \param hHal
247 \param pSetSignificantChangeReq: Extented Scan set significant
248 change structure
249 \- return eHalStatus
250 -------------------------------------------------------------------------*/
251eHalStatus sme_SetSignificantChange (tHalHandle hHal,
252 tSirEXTScanSetSignificantChangeReqParams* pSetSignificantChangeReq);
253
254/* ---------------------------------------------------------------------------
255 \fn sme_ResetSignificantChange
256 \brief SME API to reset significant change
257 \param hHal
258 \param pResetReq: Extented Scan reset significant change structure
259 \- return eHalStatus
260 -------------------------------------------------------------------------*/
261eHalStatus sme_ResetSignificantChange (tHalHandle hHal,
262 tSirEXTScanResetSignificantChangeReqParams *pResetReq);
263
264/* ---------------------------------------------------------------------------
265 \fn sme_getCachedResults
266 \brief SME API to get cached results
267 \param hHal
268 \param pCachedResultsReq: Extented Scan get cached results structure
269 \- return eHalStatus
270 -------------------------------------------------------------------------*/
271eHalStatus sme_getCachedResults (tHalHandle hHal,
272 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
273
274/* ---------------------------------------------------------------------------
275 \fn sme_EXTScanRegisterCallback
276 \brief SME API to register Extented Scan notification callback
277 \param pEXTScanIndCb
278 \- return void
279 -------------------------------------------------------------------------*/
280eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
281 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
282 void *);
283
284#endif /* WLAN_FEATURE_EXTSCAN */
Siddharth Bhald8a95e82015-02-12 20:14:52 +0530285/* ---------------------------------------------------------------------------
286 \fn sme_SpoofMacAddrReq
287 \brief SME API to send Spoof Mac Addr req to HAL
288 \param macaddr: mac address to be sent
289 \- return eHalStatus
290 -------------------------------------------------------------------------*/
291eHalStatus sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530292
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530293typedef enum
294{
295 eSME_ROAM_TRIGGER_NONE = 0,
296 eSME_ROAM_TRIGGER_SCAN = 1,
297 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
298 eSME_ROAM_TRIGGER_MAX
299} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700300
301/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530302 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700303 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700304/*--------------------------------------------------------------------------
305
306 \brief sme_Open() - Initialze all SME modules and put them at idle state
307
308 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
309 successfully return, all modules are at idle state ready to start.
310
311 smeOpen must be called before any other SME APIs can be involved.
312 smeOpen must be called after macOpen.
313
314 \param hHal - The handle returned by macOpen.
315
316 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
317
318 Other status means SME is failed to be initialized
319 \sa
320
321 --------------------------------------------------------------------------*/
322eHalStatus sme_Open(tHalHandle hHal);
323
324/*--------------------------------------------------------------------------
325
326 \brief sme_Close() - Release all SME modules and their resources.
327
328 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
329 return, all modules are at closed state.
330
331 No SME APIs can be involved after sme_Close except sme_Open.
332 sme_Close must be called before macClose.
333
334 \param hHal - The handle returned by macOpen.
335
336 \return eHAL_STATUS_SUCCESS - SME is successfully close.
337
338 Other status means SME is failed to be closed but caller still cannot
339 call any other SME functions except smeOpen.
340 \sa
341
342 --------------------------------------------------------------------------*/
343eHalStatus sme_Close(tHalHandle hHal);
344
345/*--------------------------------------------------------------------------
Hema Aparna Medicharlaa6cf65e2015-06-01 16:23:28 +0530346
347 \brief sme_PreClose() - Stop SME resources prior to final sme_Stop.
348
349 The function stops resources in SME, PMC, CCM, CSR, etc. as needed
350 to handle fast closure during SSR/unload-load cases.
351
352 \param hHal - The handle returned by macOpen.
353 \return v_VOID_t
354
355 \sa
356
357 --------------------------------------------------------------------------*/
358v_VOID_t sme_PreClose(tHalHandle hHal);
359
360/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700361
362 \brief sme_Start() - Put all SME modules at ready state.
363
364 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
365 successfully return, all modules are ready to run.
366
367 \param hHal - The handle returned by macOpen.
368
369 \return eHAL_STATUS_SUCCESS - SME is ready.
370
371 Other status means SME is failed to start.
372 \sa
373
374 --------------------------------------------------------------------------*/
375eHalStatus sme_Start(tHalHandle hHal);
376
377/*--------------------------------------------------------------------------
378
379 \brief sme_Stop() - Stop all SME modules and put them at idle state
380
381 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
382 return, all modules are at idle state ready to start.
383
384
385 \param hHal - The handle returned by macOpen.
386
Kiet Lama72a2322013-11-15 11:18:11 +0530387 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700388
389 \return eHAL_STATUS_SUCCESS - SME is stopped.
390
391 Other status means SME is failed to stop but caller should still consider
392 SME is stopped.
393 \sa
394
395 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530396eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700397
398
399/*--------------------------------------------------------------------------
400
401 \brief sme_OpenSession() - Open a session for scan/roam operation.
402
403 This is a synchronous API.
404
405
406 \param hHal - The handle returned by macOpen.
407 \param callback - A pointer to the function caller specifies for roam/connect status indication
408 \param pContext - The context passed with callback
409 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
410 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
411
412 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
413
414 Other status means SME is failed to open the session.
415 eHAL_STATUS_RESOURCES - no more session available.
416 \sa
417
418 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700419eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
420 void *pContext, tANI_U8 *pSelfMacAddr,
421 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700422
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700423/*--------------------------------------------------------------------------
424
425 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
426 \param hHal - The handle returned by macOpen.
427 \param currDeviceMode - Current operating device mode.
428 --------------------------------------------------------------------------*/
429
430void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700431
432/*--------------------------------------------------------------------------
433
434 \brief sme_CloseSession() - Open a session for scan/roam operation.
435
436 This is a synchronous API.
437
Jeff Johnson295189b2012-06-20 16:38:30 -0700438 \param hHal - The handle returned by macOpen.
439
440 \param sessionId - A previous opened session's ID.
mukul sharmabab477d2015-06-11 17:14:55 +0530441
442 \param bPurgeSmeCmdList - Whether sme cmd list purging is required or not.
443 TRUE -Purging require FALSE - Purging not require
444
Jeff Johnson295189b2012-06-20 16:38:30 -0700445 \return eHAL_STATUS_SUCCESS - session is closed.
446
447 Other status means SME is failed to open the session.
448 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
449 \sa
mukul sharmabab477d2015-06-11 17:14:55 +0530450
451
Jeff Johnson295189b2012-06-20 16:38:30 -0700452 --------------------------------------------------------------------------*/
453eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
mukul sharmabab477d2015-06-11 17:14:55 +0530454 tANI_U8 bPurgeSmeCmdList,
455 csrRoamSessionCloseCallback callback,
456 void *pContext);
457/*--------------------------------------------------------------------------
458
459 \brief sme_PurgeCmdList() - Purge all the sme cmd list
460
461 This is a synchronous API.
Jeff Johnson295189b2012-06-20 16:38:30 -0700462
463
mukul sharmabab477d2015-06-11 17:14:55 +0530464 \param hHal - The handle returned by macOpen.
465
466 \param sessionId - A previous opened session's ID.
467
468--------------------------------------------------------------------------*/
469
470eHalStatus sme_PurgeCmdList(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700471
472/*--------------------------------------------------------------------------
473
474 \brief sme_UpdateConfig() - Change configurations for all SME moduels
475
476 The function updates some configuration for modules in SME, CCM, CSR, etc
477 during SMEs close -> open sequence.
478
479 Modules inside SME apply the new configuration at the next transaction.
480
481
482 \param hHal - The handle returned by macOpen.
483 \Param pSmeConfigParams - a pointer to a caller allocated object of
484 typedef struct _smeConfigParams.
485
486 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
487
488 Other status means SME is failed to update the config parameters.
489 \sa
490
491 --------------------------------------------------------------------------*/
492eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
493
494#ifdef FEATURE_WLAN_SCAN_PNO
495/*--------------------------------------------------------------------------
496
497 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
498
499 It is used at driver start up to inform RIVA of the default channel
500 configuration.
501
502 This is a synchronuous call
503
504 \param hHal - The handle returned by macOpen.
505
506 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
507
508 Other status means SME is failed to update the channel config.
509 \sa
510
511 --------------------------------------------------------------------------*/
512eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
513
514#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700515/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530516
517 \brief sme_UpdateChannelList() - Update channel List in FW.
518
519
520 \param hHal - The handle returned by macOpen.
521
522 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
523
524 Other status means SME is failed to update the channel config.
525 \sa
526
527 --------------------------------------------------------------------------*/
528eHalStatus sme_UpdateChannelList(tHalHandle hHal);
529
530/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700531
532 \brief sme_set11dinfo() - Set the 11d information about valid channels
533 and there power using information from nvRAM
534 This function is called only for AP.
535
536 This is a synchronuous call
537
538 \param hHal - The handle returned by macOpen.
539 \Param pSmeConfigParams - a pointer to a caller allocated object of
540 typedef struct _smeConfigParams.
541
542 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
543
544 Other status means SME is failed to update the config parameters.
545 \sa
546--------------------------------------------------------------------------*/
547
548eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
549
550/*--------------------------------------------------------------------------
551
552 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
553
554 This is a synchronuous call
555
556 \param hHal - The handle returned by HostapdAdapter.
557 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
558
559 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
560
561 Other status means, failed to get the current regulatory domain.
562 \sa
563--------------------------------------------------------------------------*/
564
565eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
566
567eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
568
Jeff Johnson295189b2012-06-20 16:38:30 -0700569
570/* ---------------------------------------------------------------------------
571 \fn sme_ChangeConfigParams
572 \brief The SME API exposed for HDD to provide config params to SME during
573 SMEs stop -> start sequence.
574
575 If HDD changed the domain that will cause a reset. This function will
576 provide the new set of 11d information for the new domain. Currrently this
577 API provides info regarding 11d only at reset but we can extend this for
578 other params (PMC, QoS) which needs to be initialized again at reset.
579
580 This is a synchronuous call
581
582 \param hHal - The handle returned by macOpen.
583
584 \Param
585 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
586 currently provides 11d related information like Country code,
587 Regulatory domain, valid channel list, Tx power per channel, a
588 list with active/passive scan allowed per valid channel.
589
590 \return eHalStatus
591 ---------------------------------------------------------------------------*/
592eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
593 tCsrUpdateConfigParam *pUpdateConfigParam);
594
595/*--------------------------------------------------------------------------
596
597 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
598 is ready tio run.
599
600 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
601 to running state.
602
603
604 \param hHal - The handle returned by macOpen.
605
606 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
607
608 Other status means SME failed to send the message to PE.
609 \sa
610
611 --------------------------------------------------------------------------*/
612eHalStatus sme_HDDReadyInd(tHalHandle hHal);
613
614
615/*--------------------------------------------------------------------------
616
617 \brief sme_ProcessMsg() - The main message processor for SME.
618
619 The function is called by a message dispatcher when to process a message
620 targeted for SME.
621
622
623 \param hHal - The handle returned by macOpen.
624 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
625
626 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
627
628 Other status means SME failed to process the message.
629 \sa
630
631 --------------------------------------------------------------------------*/
632eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
633
634v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
635
636/* ---------------------------------------------------------------------------
637 \fn sme_ScanRequest
638 \brief a wrapper function to Request a 11d or full scan from CSR.
639 \param pScanRequestID - pointer to an object to get back the request ID
640 \param callback - a callback function that scan calls upon finish, will not
641 be called if csrScanRequest returns error
642 \param pContext - a pointer passed in for the callback
643 \return eHalStatus
644 ---------------------------------------------------------------------------*/
645eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
646 tANI_U32 *pScanRequestID,
647 csrScanCompleteCallback callback, void *pContext);
648
649
650/* ---------------------------------------------------------------------------
651 \fn sme_ScanSetBGScanparams
652 \brief a wrapper function to request CSR to set BG scan params in PE
653 \param pScanReq - BG scan request structure
654 \return eHalStatus
655 ---------------------------------------------------------------------------*/
656eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
657
658
659/* ---------------------------------------------------------------------------
660 \fn sme_ScanGetResult
661 \brief a wrapper function to request scan results from CSR.
662 \param pFilter - If pFilter is NULL, all cached results are returned
663 \param phResult - an object for the result.
664 \return eHalStatus
665 ---------------------------------------------------------------------------*/
666eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
667 tScanResultHandle *phResult);
668
669
670/* ---------------------------------------------------------------------------
671 \fn sme_ScanFlushResult
672 \brief a wrapper function to request CSR to clear scan results.
673 \return eHalStatus
674 ---------------------------------------------------------------------------*/
675eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530676
677/*
678 * ---------------------------------------------------------------------------
679 * \fn sme_FilterScanResults
680 * \brief a wrapper function to request CSR to filter the scan results based
681 * on valid chennel list.
682 * \return eHalStatus
683 *---------------------------------------------------------------------------
684 */
685eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
686
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530687/*
688 * ---------------------------------------------------------------------------
689 * \fn sme_FilterScanDFSResults
690 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
691 * from the scan results.
692 * \return eHalStatus
693 *---------------------------------------------------------------------------
694 */
695eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
696
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700697eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700698
699/* ---------------------------------------------------------------------------
700 \fn sme_ScanResultGetFirst
701 \brief a wrapper function to request CSR to returns the first element of
702 scan result.
703 \param hScanResult - returned from csrScanGetResult
704 \return tCsrScanResultInfo * - NULL if no result
705 ---------------------------------------------------------------------------*/
706tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
707 tScanResultHandle hScanResult);
708
709/* ---------------------------------------------------------------------------
710 \fn sme_ScanResultGetNext
711 \brief a wrapper function to request CSR to returns the next element of
712 scan result. It can be called without calling csrScanResultGetFirst
713 first
714 \param hScanResult - returned from csrScanGetResult
715 \return Null if no result or reach the end
716 ---------------------------------------------------------------------------*/
717tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
718 tScanResultHandle hScanResult);
719
720/* ---------------------------------------------------------------------------
721 \fn sme_ScanResultPurge
722 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
723 in the list and free memory for each item
724 \param hScanResult - returned from csrScanGetResult. hScanResult is
725 considered gone by
726 calling this function and even before this function reutrns.
727 \return eHalStatus
728 ---------------------------------------------------------------------------*/
729eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
730
731/* ---------------------------------------------------------------------------
732 \fn sme_ScanGetPMKIDCandidateList
733 \brief a wrapper function to return the PMKID candidate list
734 \param pPmkidList - caller allocated buffer point to an array of
735 tPmkidCandidateInfo
736 \param pNumItems - pointer to a variable that has the number of
737 tPmkidCandidateInfo allocated when retruning, this is
738 either the number needed or number of items put into
739 pPmkidList
740 \return eHalStatus - when fail, it usually means the buffer allocated is not
741 big enough and pNumItems
742 has the number of tPmkidCandidateInfo.
743 \Note: pNumItems is a number of tPmkidCandidateInfo,
744 not sizeof(tPmkidCandidateInfo) * something
745 ---------------------------------------------------------------------------*/
746eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
747 tPmkidCandidateInfo *pPmkidList,
748 tANI_U32 *pNumItems );
749
750
751/*----------------------------------------------------------------------------
752 \fn sme_RoamRegisterLinkQualityIndCallback
753
754 \brief
755 a wrapper function to allow HDD to register a callback handler with CSR for
756 link quality indications.
757
758 Only one callback may be registered at any time.
759 In order to deregister the callback, a NULL cback may be provided.
760
761 Registration happens in the task context of the caller.
762
763 \param callback - Call back being registered
764 \param pContext - user data
765
766 DEPENDENCIES: After CSR open
767
768 \return eHalStatus
769-----------------------------------------------------------------------------*/
770eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
771 csrRoamLinkQualityIndCallback callback,
772 void *pContext);
773
774
775/* ---------------------------------------------------------------------------
776 \fn sme_RoamConnect
777 \brief a wrapper function to request CSR to inititiate an association
778 \param sessionId - the sessionId returned by sme_OpenSession.
779 \param pProfile - can be NULL to join to any open ones
780 \param pRoamId - to get back the request ID
781 \return eHalStatus
782 ---------------------------------------------------------------------------*/
783eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
784 tANI_U32 *pRoamId);
785
786/* ---------------------------------------------------------------------------
787 \fn sme_RoamReassoc
788 \brief a wrapper function to request CSR to inititiate a re-association
789 \param pProfile - can be NULL to join the currently connected AP. In that
790 case modProfileFields should carry the modified field(s) which could trigger
791 reassoc
792 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
793 that might need modification dynamically once STA is up & running and this
794 could trigger a reassoc
795 \param pRoamId - to get back the request ID
796 \return eHalStatus
797 -------------------------------------------------------------------------------*/
798eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
799 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700800 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700801
802/* ---------------------------------------------------------------------------
803 \fn sme_RoamConnectToLastProfile
804 \brief a wrapper function to request CSR to disconnect and reconnect with
805 the same profile
806 \return eHalStatus. It returns fail if currently connected
807 ---------------------------------------------------------------------------*/
808eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
809
810/* ---------------------------------------------------------------------------
811 \fn sme_RoamDisconnect
812 \brief a wrapper function to request CSR to disconnect from a network
813 \param reason -- To indicate the reason for disconnecting. Currently, only
814 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
815 \return eHalStatus
816 ---------------------------------------------------------------------------*/
817eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
818
Jeff Johnson295189b2012-06-20 16:38:30 -0700819/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530820 \fn.sme_abortConnection
821 \brief a wrapper function to request CSR to stop from connecting a network
822 \retun void.
823---------------------------------------------------------------------------*/
824
825void sme_abortConnection(tHalHandle hHal, tANI_U8 sessionId);
826
827/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700828 \fn sme_RoamStopBss
829 \brief a wrapper function to request CSR to stop bss
830 \param sessionId - sessionId of SoftAP
831 \return eHalStatus
832 ---------------------------------------------------------------------------*/
833eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
834
835/* ---------------------------------------------------------------------------
836 \fn sme_RoamGetAssociatedStas
837 \brief To probe the list of associated stations from various modules of CORE stack.
838 \This is an asynchronous API.
839 \param sessionId - sessionId of SoftAP
840 \param modId - Module from whom list of associtated stations is to be probed.
841 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
842 \param pUsrContext - Opaque HDD context
843 \param pfnSapEventCallback - Sap event callback in HDD
844 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
845 \return eHalStatus
846 -------------------------------------------------------------------------------*/
847eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
848 VOS_MODULE_ID modId, void *pUsrContext,
849 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
850
851/* ---------------------------------------------------------------------------
852 \fn sme_RoamDisconnectSta
853 \brief To disassociate a station. This is an asynchronous API.
854 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
855 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
856 -------------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +0530857eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId,
858#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
859 const tANI_U8 *pPeerMacAddr
860#else
861 tANI_U8 *pPeerMacAddr
862#endif
863 );
Jeff Johnson295189b2012-06-20 16:38:30 -0700864
865/* ---------------------------------------------------------------------------
866 \fn sme_RoamDeauthSta
867 \brief To disassociate a station. This is an asynchronous API.
868 \param hHal - Global structure
869 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530870 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700871 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
872 -------------------------------------------------------------------------------*/
873eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530874 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700875
876/* ---------------------------------------------------------------------------
877 \fn sme_RoamTKIPCounterMeasures
878 \brief To start or stop TKIP counter measures. This is an asynchronous API.
879 \param sessionId - sessionId of SoftAP
880 \param bEnable - Flag to start/stop TKIP countermeasures
881 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
882 -------------------------------------------------------------------------------*/
883eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
884
885/* ---------------------------------------------------------------------------
886 \fn sme_RoamGetWpsSessionOverlap
887 \brief To get the WPS PBC session overlap information.
888 \This is an asynchronous API.
889 \param sessionId - sessionId of SoftAP
890 \param pUsrContext - Opaque HDD context
891 \param pfnSapEventCallback - Sap event callback in HDD
892 \return eHalStatus
893 -------------------------------------------------------------------------------*/
894eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
895 void *pUsrContext, void *pfnSapEventCallback,
896 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700897
898/* ---------------------------------------------------------------------------
899 \fn sme_RoamGetConnectState
900 \brief a wrapper function to request CSR to return the current connect state
901 of Roaming
902 \return eHalStatus
903 ---------------------------------------------------------------------------*/
904eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
905
906/* ---------------------------------------------------------------------------
907 \fn sme_RoamGetConnectProfile
908 \brief a wrapper function to request CSR to return the current connect
909 profile. Caller must call csrRoamFreeConnectProfile after it is done
910 and before reuse for another csrRoamGetConnectProfile call.
911 \param pProfile - pointer to a caller allocated structure
912 tCsrRoamConnectedProfile
913 \return eHalStatus. Failure if not connected
914 ---------------------------------------------------------------------------*/
915eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
916 tCsrRoamConnectedProfile *pProfile);
917
918/* ---------------------------------------------------------------------------
919 \fn sme_RoamFreeConnectProfile
920 \brief a wrapper function to request CSR to free and reinitialize the
921 profile returned previously by csrRoamGetConnectProfile.
922 \param pProfile - pointer to a caller allocated structure
923 tCsrRoamConnectedProfile
924 \return eHalStatus.
925 ---------------------------------------------------------------------------*/
926eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
927 tCsrRoamConnectedProfile *pProfile);
928
929/* ---------------------------------------------------------------------------
930 \fn sme_RoamSetPMKIDCache
931 \brief a wrapper function to request CSR to return the PMKID candidate list
932 \param pPMKIDCache - caller allocated buffer point to an array of
933 tPmkidCacheInfo
934 \param numItems - a variable that has the number of tPmkidCacheInfo
935 allocated when retruning, this is either the number needed
936 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530937 \param update_entire_cache - if TRUE, then it overwrites the entire cache
938 with pPMKIDCache, else it updates entry by
939 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700940 \return eHalStatus - when fail, it usually means the buffer allocated is not
941 big enough and pNumItems has the number of
942 tPmkidCacheInfo.
943 \Note: pNumItems is a number of tPmkidCacheInfo,
944 not sizeof(tPmkidCacheInfo) * something
945 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530946eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
947 tPmkidCacheInfo *pPMKIDCache,
948 tANI_U32 numItems,
949 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700950
951/* ---------------------------------------------------------------------------
952 \fn sme_RoamGetSecurityReqIE
953 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
954 passes to PE to JOIN request or START_BSS request
955 This is a synchronuous call.
956 \param sessionId - returned by sme_OpenSession.
957 \param pLen - caller allocated memory that has the length of pBuf as input.
958 Upon returned, *pLen has the needed or IE length in pBuf.
959 \param pBuf - Caller allocated memory that contain the IE field, if any,
960 upon return
961 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
962 \return eHalStatus - when fail, it usually means the buffer allocated is not
963 big enough
964 ---------------------------------------------------------------------------*/
965eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
966 tANI_U8 *pBuf, eCsrSecurityType secType);
967
968/* ---------------------------------------------------------------------------
969 \fn sme_RoamGetSecurityRspIE
970 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
971 the beacon or probe rsp if connected
972 \param sessionId - returned by sme_OpenSession.
973 \param pLen - caller allocated memory that has the length of pBuf as input.
974 Upon returned, *pLen has the needed or IE length in pBuf.
975 \param pBuf - Caller allocated memory that contain the IE field, if any,
976 upon return
977 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
978 \return eHalStatus - when fail, it usually means the buffer allocated is not
979 big enough
980 ---------------------------------------------------------------------------*/
981eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
982 tANI_U8 *pBuf, eCsrSecurityType secType);
983
984
985/* ---------------------------------------------------------------------------
986 \fn sme_RoamGetNumPMKIDCache
987 \brief a wrapper function to request CSR to return number of PMKID cache
988 entries
989 \return tANI_U32 - the number of PMKID cache entries
990 ---------------------------------------------------------------------------*/
991tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
992
993/* ---------------------------------------------------------------------------
994 \fn sme_RoamGetPMKIDCache
995 \brief a wrapper function to request CSR to return PMKID cache from CSR
996 \param pNum - caller allocated memory that has the space of the number of
997 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
998 needed or actually number in tPmkidCacheInfo.
999 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
1000 any, upon return
1001 \return eHalStatus - when fail, it usually means the buffer allocated is not
1002 big enough
1003 ---------------------------------------------------------------------------*/
1004eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
1005 tPmkidCacheInfo *pPmkidCache);
1006
1007/* ---------------------------------------------------------------------------
1008 \fn sme_GetConfigParam
1009 \brief a wrapper function that HDD calls to get the global settings
1010 currently maintained by CSR.
1011 \param pParam - caller allocated memory
1012 \return eHalStatus
1013 ---------------------------------------------------------------------------*/
1014eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
1015
1016/* ---------------------------------------------------------------------------
1017 \fn sme_GetStatistics
1018 \brief a wrapper function that client calls to register a callback to get
1019 different PHY level statistics from CSR.
1020
1021 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1022 \param statsMask - The different category/categories of stats requester is looking for
1023 The order in which you set the bits in the statsMask for requesting
1024 different type of stats is:
1025
1026 eCsrSummaryStats = bit 0
1027 eCsrGlobalClassAStats = bit 1
1028 eCsrGlobalClassBStats = bit 2
1029 eCsrGlobalClassCStats = bit 3
1030 eCsrGlobalClassDStats = bit 4
1031 eCsrPerStaStats = bit 5
1032
1033 \param callback - SME sends back the requested stats using the callback
1034 \param periodicity - If requester needs periodic update, 0 means it's an one
1035 time request
1036 \param cache - If requester is happy with cached stats
1037 \param staId - The station ID for which the stats is requested for
1038 \param pContext - user context to be passed back along with the callback
1039 \return eHalStatus
1040 ---------------------------------------------------------------------------*/
1041eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1042 tANI_U32 statsMask,
1043 tCsrStatsCallback callback,
1044 tANI_U32 periodicity, tANI_BOOLEAN cache,
1045 tANI_U8 staId, void *pContext);
1046
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301047/* ---------------------------------------------------------------------------
1048 \fn smeGetTLSTAState
1049 \helper function to get teh TL STA State whenever the function is called.
1050
1051 \param staId - The staID to be passed to the TL
1052 to get the relevant TL STA State
1053 \return the state as tANI_U16
1054 ---------------------------------------------------------------------------*/
1055tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1056
Jeff Johnson295189b2012-06-20 16:38:30 -07001057eHalStatus sme_GetRssi(tHalHandle hHal,
1058 tCsrRssiCallback callback,
1059 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301060
1061/* ---------------------------------------------------------------------------
1062 \fn sme_GetSnr
1063 \brief a wrapper function that client calls to register a callback to get
1064 SNR from FW
1065
1066 \param callback - SME sends back the requested stats using the callback
1067 \param staId - The station ID for which the stats is requested for
1068 \param bssid - The bssid of the connected session
1069 \param pContext - user context to be passed back along with the callback
1070 ---------------------------------------------------------------------------*/
1071eHalStatus sme_GetSnr(tHalHandle hHal,
1072 tCsrSnrCallback callback,
1073 tANI_U8 staId, tCsrBssid bssId,
1074 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001075#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001076eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1077 tCsrRssiCallback callback,
1078 tANI_U8 staId,
1079 tCsrBssid bssId,
1080 void *pContext,
1081 void* pVosContext);
1082#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001083
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001084#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001085/* ---------------------------------------------------------------------------
1086 \fn sme_GetTsmStats
1087 \brief a wrapper function that client calls to register a callback to get TSM Stats
1088
1089 \param callback - SME sends back the requested stats using the callback
1090 \param staId - The station ID for which the stats is requested for
1091 \param pContext - user context to be passed back along with the callback
1092 \param pVosContext - vos context
1093 \return eHalStatus
1094 ---------------------------------------------------------------------------*/
1095eHalStatus sme_GetTsmStats(tHalHandle hHal,
1096 tCsrTsmStatsCallback callback,
1097 tANI_U8 staId, tCsrBssid bssId,
1098 void *pContext, void* pVosContext, tANI_U8 tid);
1099
1100/* ---------------------------------------------------------------------------
1101 \fn sme_SetCCKMIe
1102 \brief function to store the CCKM IE passed from supplicant and use it while packing
1103 reassociation request
1104 \param hHal - HAL handle for device
1105 \param pCckmIe - pointer to CCKM IE data
1106 \param pCckmIeLen - length of the CCKM IE
1107 \- return Success or failure
1108 -------------------------------------------------------------------------*/
1109eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1110
1111
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001112/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001113 \fn sme_SetEseBeaconRequest
1114 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001115 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001116 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001117 \- return Success or failure
1118 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001119eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1120 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001121
1122
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001123#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001124/* ---------------------------------------------------------------------------
1125 \fn sme_CfgSetInt
1126 \brief a wrapper function that HDD calls to set parameters in CFG.
1127 \param cfgId - Configuration Parameter ID (type) for STA.
1128 \param ccmValue - The information related to Configuration Parameter ID
1129 which needs to be saved in CFG
1130 \param callback - To be registered by CSR with CCM. Once the CFG done with
1131 saving the information in the database, it notifies CCM &
1132 then the callback will be invoked to notify.
1133 \param toBeSaved - To save the request for future reference
1134 \return eHalStatus
1135 ---------------------------------------------------------------------------*/
1136eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1137 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1138
1139/* ---------------------------------------------------------------------------
1140 \fn sme_CfgSetStr
1141 \brief a wrapper function that HDD calls to set parameters in CFG.
1142 \param cfgId - Configuration Parameter ID (type) for STA.
1143 \param pStr - Pointer to the byte array which carries the information needs
1144 to be saved in CFG
1145 \param length - Length of the data to be saved
1146 \param callback - To be registered by CSR with CCM. Once the CFG done with
1147 saving the information in the database, it notifies CCM &
1148 then the callback will be invoked to notify.
1149 \param toBeSaved - To save the request for future reference
1150 \return eHalStatus
1151 ---------------------------------------------------------------------------*/
1152eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1153 tANI_U32 length, tCcmCfgSetCallback callback,
1154 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301155/* ---------------------------------------------------------------------------
1156 \fn sme_GetModifyProfileFields
1157 \brief HDD or SME - QOS calls this function to get the current values of
1158 connected profile fields, changing which can cause reassoc.
1159 This function must be called after CFG is downloaded and STA is in connected
1160 state. Also, make sure to call this function to get the current profile
1161 fields before calling the reassoc. So that pModifyProfileFields will have
1162 all the latest values plus the one(s) has been updated as part of reassoc
1163 request.
1164 \param pModifyProfileFields - pointer to the connected profile fields
1165 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001166
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301167 \return eHalStatus
1168 -------------------------------------------------------------------------------*/
1169eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1170 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301171/* ---------------------------------------------------------------------------
1172 \fn sme_HT40StopOBSSScan
1173 \brief HDD or SME - Command to stop the OBSS scan
1174 THis is implemented only for debugging purpose.
1175 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1176 \param sessionId - sessionId
1177 changing which can cause reassoc
1178
1179 \return eHalStatus
1180 -------------------------------------------------------------------------------*/
1181eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001182
1183/*--------------------------------------------------------------------------
1184 \fn sme_SetConfigPowerSave
1185 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1186 For BMPS related configuration, this function also updates the CFG
1187 and sends a message to FW to pick up the new values. Note: Calling
1188 this function only updates the configuration and does not enable
1189 the specified power save mode.
1190 \param hHal - The handle returned by macOpen.
1191 \param psMode - Power Saving mode being modified
1192 \param pConfigParams - a pointer to a caller allocated object of type
1193 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1194 \return eHalStatus
1195 --------------------------------------------------------------------------*/
1196eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1197 void *pConfigParams);
1198
1199/*--------------------------------------------------------------------------
1200 \fn sme_GetConfigPowerSave
1201 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1202 \param hHal - The handle returned by macOpen.
1203 \param psMode - Power Saving mode
1204 \param pConfigParams - a pointer to a caller allocated object of type
1205 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1206 \return eHalStatus
1207 --------------------------------------------------------------------------*/
1208eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1209 void *pConfigParams);
1210
1211/* ---------------------------------------------------------------------------
1212 \fn sme_SignalPowerEvent
1213 \brief Signals to PMC that a power event has occurred. Used for putting
1214 the chip into deep sleep mode.
1215 \param hHal - The handle returned by macOpen.
1216 \param event - the event that has occurred
1217 \return eHalStatus
1218 ---------------------------------------------------------------------------*/
1219extern eHalStatus sme_SignalPowerEvent (
1220 tHalHandle hHal,
1221 tPmcPowerEvent event);
1222
1223/* ---------------------------------------------------------------------------
1224 \fn sme_EnablePowerSave
1225 \brief Enables one of the power saving modes. This API does not cause a
1226 device state change. This is purely a configuration API.
1227 \param hHal - The handle returned by macOpen.
1228 \param psMode - The power saving mode to enable.
1229 \return eHalStatus
1230 ---------------------------------------------------------------------------*/
1231extern eHalStatus sme_EnablePowerSave (
1232 tHalHandle hHal,
1233 tPmcPowerSavingMode psMode);
1234
1235/* ---------------------------------------------------------------------------
1236 \fn sme_DisablePowerSave
1237 \brief Disables one of the power saving modes.Disabling does not imply
1238 that device will be brought out of the current PS mode. This is
1239 purely a configuration API.
1240 \param hHal - The handle returned by macOpen.
1241 \param psMode - The power saving mode to disable.
1242 \return eHalStatus
1243 ---------------------------------------------------------------------------*/
1244extern eHalStatus sme_DisablePowerSave (
1245 tHalHandle hHal,
1246 tPmcPowerSavingMode psMode);
1247
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301248 /* ---------------------------------------------------------------------------
1249 \fn sme_SetHostPowerSave
1250 \brief The BMPS logic is controlled by the User level Apps
1251 \param hHal - The handle returned by macOpen.
1252 \param psMode - The power saving mode to enable.
1253 \return eHalStatus
1254 ---------------------------------------------------------------------------*/
1255extern eHalStatus sme_SetHostPowerSave (
1256 tHalHandle hHal,
1257 v_BOOL_t psMode);
1258
Jeff Johnson295189b2012-06-20 16:38:30 -07001259/* ---------------------------------------------------------------------------
1260 \fn sme_StartAutoBmpsTimer
1261 \brief Starts a timer that periodically polls all the registered
1262 module for entry into Bmps mode. This timer is started only if BMPS is
1263 enabled and whenever the device is in full power.
1264 \param hHal - The handle returned by macOpen.
1265 \return eHalStatus
1266 ---------------------------------------------------------------------------*/
1267extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1268
1269/* ---------------------------------------------------------------------------
1270 \fn sme_StopAutoBmpsTimer
1271 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1272 Stopping the timer does not cause a device state change. Only the timer
1273 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1274 \param hHal - The handle returned by macOpen.
1275 \return eHalStatus
1276 ---------------------------------------------------------------------------*/
1277extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1278
1279/* ---------------------------------------------------------------------------
1280 \fn sme_QueryPowerState
1281 \brief Returns the current power state of the device.
1282 \param hHal - The handle returned by macOpen.
1283 \param pPowerState - pointer to location to return power state
1284 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1285 \return eHalStatus
1286 ---------------------------------------------------------------------------*/
1287extern eHalStatus sme_QueryPowerState (
1288 tHalHandle hHal,
1289 tPmcPowerState *pPowerState,
1290 tPmcSwitchState *pSwWlanSwitchState);
1291
1292/* ---------------------------------------------------------------------------
1293 \fn sme_IsPowerSaveEnabled
1294 \brief Checks if the device is able to enter a particular power save mode
1295 This does not imply that the device is in a particular PS mode
1296 \param hHal - The handle returned by macOpen.
1297 \param psMode - the power saving mode
1298 \return eHalStatus
1299 ---------------------------------------------------------------------------*/
1300extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1301 tHalHandle hHal,
1302 tPmcPowerSavingMode psMode);
1303
1304/* ---------------------------------------------------------------------------
1305 \fn sme_RequestFullPower
1306 \brief Request that the device be brought to full power state.
1307 Note 1: If "fullPowerReason" specificied in this API is set to
1308 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1309 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1310 HDD is requesting full power, we need to undo any previous HDD requests for
1311 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1312 specified anything other than above, the buffered requests for BMPS and WoWL
1313 will not be cleared.
1314 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1315 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1316 request".
1317 Note 3: When the device finally enters Full Power PMC will start a timer
1318 if any of the following holds true:
1319 - Auto BMPS mode is enabled
1320 - Uapsd request is pending
1321 - HDD's request for BMPS is pending
1322 - HDD's request for WoWL is pending
1323 On timer expiry PMC will attempt to put the device in BMPS mode if following
1324 (in addition to those listed above) holds true:
1325 - Polling of all modules through the Power Save Check routine passes
1326 - STA is associated to an access point
1327 \param hHal - The handle returned by macOpen.
1328 \param - callbackRoutine Callback routine invoked in case of success/failure
1329 \param - callbackContext - Cookie to be passed back during callback
1330 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1331 distinguish between BAP and HDD requests
1332 \return eHalStatus - status
1333 eHAL_STATUS_SUCCESS - device brought to full power state
1334 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1335 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1336 ---------------------------------------------------------------------------*/
1337extern eHalStatus sme_RequestFullPower (
1338 tHalHandle hHal,
1339 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1340 void *callbackContext,
1341 tRequestFullPowerReason fullPowerReason);
1342
1343/* ---------------------------------------------------------------------------
1344 \fn sme_RequestBmps
1345 \brief Request that the device be put in BMPS state. Request will be
1346 accepted only if BMPS mode is enabled and power save check routine
1347 passes. Only HDD should invoke this API.
1348 \param hHal - The handle returned by macOpen.
1349 \param - callbackRoutine Callback routine invoked in case of success/failure
1350 \param - callbackContext - Cookie to be passed back during callback
1351 \return eHalStatus
1352 eHAL_STATUS_SUCCESS - device is in BMPS state
1353 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1354 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1355 ---------------------------------------------------------------------------*/
1356extern eHalStatus sme_RequestBmps (
1357 tHalHandle hHal,
1358 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1359 void *callbackContext);
1360
1361/* ---------------------------------------------------------------------------
1362 \fn sme_SetDHCPTillPowerActiveFlag
1363 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1364 entry by PMC
1365 \param hHal - The handle returned by macOpen.
1366 ---------------------------------------------------------------------------*/
1367void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1368
1369
1370/* ---------------------------------------------------------------------------
1371 \fn sme_StartUapsd
1372 \brief Request that the device be put in UAPSD state. If the device is in
1373 Full Power it will be put in BMPS mode first and then into UAPSD
1374 mode.
1375 \param hHal - The handle returned by macOpen.
1376 \param - callbackRoutine Callback routine invoked in case of success/failure
1377 \param - callbackContext - Cookie to be passed back during callback
1378 eHAL_STATUS_SUCCESS - device is in UAPSD state
1379 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1380 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1381 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1382 \return eHalStatus
1383 ---------------------------------------------------------------------------*/
1384extern eHalStatus sme_StartUapsd (
1385 tHalHandle hHal,
1386 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1387 void *callbackContext);
1388
1389/* ---------------------------------------------------------------------------
1390 \fn sme_StopUapsd
1391 \brief Request that the device be put out of UAPSD state. Device will be
1392 put in in BMPS state after stop UAPSD completes. Buffered requests for
1393 UAPSD will be cleared after this.
1394 \param hHal - The handle returned by macOpen.
1395 \return eHalStatus
1396 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1397 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1398 ---------------------------------------------------------------------------*/
1399extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1400
1401/* ---------------------------------------------------------------------------
1402 \fn sme_RequestStandby
1403 \brief Request that the device be put in standby. It is HDD's responsibility
1404 to bring the chip to full power and do a discconnect before calling
1405 this API. Request for standby will be rejected if STA is associated
1406 to an AP.
1407 \param hHal - The handle returned by macOpen.
1408 \param - callbackRoutine Callback routine invoked in case of success/failure
1409 \param - callbackContext - Cookie to be passed back during callback
1410 \return eHalStatus
1411 eHAL_STATUS_SUCCESS - device is in Standby mode
1412 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1413 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1414 ---------------------------------------------------------------------------*/
1415extern eHalStatus sme_RequestStandby (
1416 tHalHandle hHal,
1417 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1418 void *callbackContext);
1419
1420/* ---------------------------------------------------------------------------
1421 \fn sme_RegisterPowerSaveCheck
1422 \brief Register a power save check routine that is called whenever
1423 the device is about to enter one of the power save modes.
1424 \param hHal - The handle returned by macOpen.
1425 \param checkRoutine - Power save check routine to be registered
1426 \param callbackContext - Cookie to be passed back during callback
1427 \return eHalStatus
1428 eHAL_STATUS_SUCCESS - successfully registered
1429 eHAL_STATUS_FAILURE - not successfully registered
1430 ---------------------------------------------------------------------------*/
1431extern eHalStatus sme_RegisterPowerSaveCheck (
1432 tHalHandle hHal,
1433 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1434
1435/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301436 \fn sme_Register11dScanDoneCallback
1437 \brief Register a routine of type csrScanCompleteCallback which is
1438 called whenever an 11d scan is done
1439 \param hHal - The handle returned by macOpen.
1440 \param callback - 11d scan complete routine to be registered
1441 \return eHalStatus
1442 ---------------------------------------------------------------------------*/
1443extern eHalStatus sme_Register11dScanDoneCallback (
1444 tHalHandle hHal,
1445 csrScanCompleteCallback);
1446
1447/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001448 \fn sme_DeregisterPowerSaveCheck
1449 \brief Deregister a power save check routine
1450 \param hHal - The handle returned by macOpen.
1451 \param checkRoutine - Power save check routine to be deregistered
1452 \return eHalStatus
1453 eHAL_STATUS_SUCCESS - successfully deregistered
1454 eHAL_STATUS_FAILURE - not successfully deregistered
1455 ---------------------------------------------------------------------------*/
1456extern eHalStatus sme_DeregisterPowerSaveCheck (
1457 tHalHandle hHal,
1458 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1459
1460/* ---------------------------------------------------------------------------
1461 \fn sme_RegisterDeviceStateUpdateInd
1462 \brief Register a callback routine that is called whenever
1463 the device enters a new device state (Full Power, BMPS, UAPSD)
1464 \param hHal - The handle returned by macOpen.
1465 \param callbackRoutine - Callback routine to be registered
1466 \param callbackContext - Cookie to be passed back during callback
1467 \return eHalStatus
1468 eHAL_STATUS_SUCCESS - successfully registered
1469 eHAL_STATUS_FAILURE - not successfully registered
1470 ---------------------------------------------------------------------------*/
1471extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1472 tHalHandle hHal,
1473 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1474 void *callbackContext);
1475
1476/* ---------------------------------------------------------------------------
1477 \fn sme_DeregisterDeviceStateUpdateInd
1478 \brief Deregister a routine that was registered for device state changes
1479 \param hHal - The handle returned by macOpen.
1480 \param callbackRoutine - Callback routine to be deregistered
1481 \return eHalStatus
1482 eHAL_STATUS_SUCCESS - successfully deregistered
1483 eHAL_STATUS_FAILURE - not successfully deregistered
1484 ---------------------------------------------------------------------------*/
1485extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1486 tHalHandle hHal,
1487 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1488
1489/* ---------------------------------------------------------------------------
1490 \fn sme_WowlAddBcastPattern
1491 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1492 do a pattern match on these patterns when Wowl is enabled during BMPS
1493 mode.
1494 \param hHal - The handle returned by macOpen.
1495 \param pattern - Pattern to be added
1496 \return eHalStatus
1497 eHAL_STATUS_FAILURE Cannot add pattern
1498 eHAL_STATUS_SUCCESS Request accepted.
1499 ---------------------------------------------------------------------------*/
1500extern eHalStatus sme_WowlAddBcastPattern (
1501 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001502 tpSirWowlAddBcastPtrn pattern,
1503 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001504
1505/* ---------------------------------------------------------------------------
1506 \fn sme_WowlDelBcastPattern
1507 \brief Delete a pattern that was added for Pattern Byte Matching.
1508 \param hHal - The handle returned by macOpen.
1509 \param pattern - Pattern to be deleted
1510 \return eHalStatus
1511 eHAL_STATUS_FAILURE Cannot delete pattern
1512 eHAL_STATUS_SUCCESS Request accepted.
1513 ---------------------------------------------------------------------------*/
1514extern eHalStatus sme_WowlDelBcastPattern (
1515 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001516 tpSirWowlDelBcastPtrn pattern,
1517 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001518
1519/* ---------------------------------------------------------------------------
1520 \fn sme_EnterWowl
1521 \brief This is the API to request entry into WOWL mode.
1522 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1523 SME will will cache the information that WOWL has been requested and
1524 attempt to put the device in BMPS first. On entry into BMPS, SME will
1525 enter the WOWL mode.
1526 Note 1: After WoWL request is accepted, If module other than HDD requests
1527 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1528 and attempt to put the chip into BMPS+WOWL based on a timer.
1529 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1530 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1531 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1532 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1533 are required. Currently there is no requirement or use case to support UAPSD
1534 and WOWL at the same time.
1535 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1536 Note 5. Request for WoWL is rejected if BMPS is disabled.
1537
1538 \param hHal - The handle returned by macOpen.
1539 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1540 Used for success/failure notification by SME
1541 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1542 at the time of callback.
1543 \param wakeReasonIndCB - Callback routine provided by HDD.
1544 Used for Wake Reason Indication by SME
1545 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1546 at the time of callback.
1547 \return eHalStatus
1548 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1549 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1550 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1551 mode is entered.
1552 ---------------------------------------------------------------------------*/
1553extern eHalStatus sme_EnterWowl (
1554 tHalHandle hHal,
1555 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1556 void *enterWowlCallbackContext,
1557#ifdef WLAN_WAKEUP_EVENTS
1558 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1559 void *wakeReasonIndCBContext,
1560#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001561 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001562
1563/* ---------------------------------------------------------------------------
1564 \fn sme_ExitWowl
1565 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1566 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1567 mode. Any Buffered request for WoWL will be cleared after this API.
1568 \param hHal - The handle returned by macOpen.
1569 \return eHalStatus
1570 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1571 only if the previous "Enter WOWL" transaction has
1572 not even completed.
1573 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1574 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301575extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001576
1577/* ---------------------------------------------------------------------------
1578
1579 \fn sme_RoamSetKey
1580
1581 \brief To set encryption key. This function should be called only when connected
1582 This is an asynchronous API.
1583
1584 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1585
1586 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1587
1588 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1589
1590 FAILURE or RESOURCES The API finished and failed.
1591
1592 -------------------------------------------------------------------------------*/
1593eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1594
1595/* ---------------------------------------------------------------------------
1596
1597 \fn sme_RoamRemoveKey
1598
1599 \brief To set encryption key. This is an asynchronous API.
1600
1601 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1602
1603 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1604
1605 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1606
1607 FAILURE or RESOURCES The API finished and failed.
1608
1609 -------------------------------------------------------------------------------*/
1610eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1611
1612
1613/* ---------------------------------------------------------------------------
1614
1615 \fn sme_GetCountryCode
1616
1617 \brief To return the current country code. If no country code is applied, default country code is
1618 used to fill the buffer.
1619 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1620 This is a synchronous API.
1621
1622 \param pBuf - pointer to a caller allocated buffer for returned country code.
1623
1624 \param pbLen For input, this parameter indicates how big is the buffer.
1625 Upon return, this parameter has the number of bytes for country. If pBuf
1626 doesn't have enough space, this function returns
1627 fail status and this parameter contains the number that is needed.
1628
1629 \return eHalStatus SUCCESS.
1630
1631 FAILURE or RESOURCES The API finished and failed.
1632
1633 -------------------------------------------------------------------------------*/
1634eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1635
1636/* ---------------------------------------------------------------------------
1637
1638 \fn sme_SetCountryCode
1639
1640 \brief To change the current/default country code.
1641 If 11d supported is turned off, an error is return.
1642 This is a synchronous API.
1643
1644 \param pCountry - pointer to a caller allocated buffer for the country code.
1645
1646 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1647 whether a reset is required.
1648
1649 \return eHalStatus SUCCESS.
1650
1651 FAILURE or RESOURCES The API finished and failed.
1652
1653 -------------------------------------------------------------------------------*/
1654eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1655
1656/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301657
1658 \fn sme_InitChannels
1659
1660 \brief Used to initialize CSR channel lists while driver loading
1661
1662 \param hHal - global pMac structure
1663
1664 \return eHalStatus SUCCESS.
1665
1666 FAILURE or RESOURCES The API finished and failed.
1667
1668 -------------------------------------------------------------------------------*/
1669eHalStatus sme_InitChannels(tHalHandle hHal);
1670
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301671
Mihir Shete04206452014-11-20 17:50:58 +05301672#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301673/* ---------------------------------------------------------------------------
1674 \fn sme_InitChannelsForCC
1675
1676 \brief Used to issue regulatory hint to user
1677
1678 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301679 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301680
1681 \return eHalStatus SUCCESS.
1682
1683 FAILURE or RESOURCES The API finished and failed.
1684
1685 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301686eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301687#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301688
Mihir Shetee1093ba2014-01-21 20:13:32 +05301689/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001690 \fn sme_ResetCountryCodeInformation
1691 \brief this function is to reset the country code current being used back to EEPROM default
1692 this includes channel list and power setting. This is a synchronous API.
1693 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1694 a restart is needed to apply the change
1695 \return eHalStatus
1696 -------------------------------------------------------------------------------*/
1697eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1698
1699/* ---------------------------------------------------------------------------
1700 \fn sme_GetSupportedCountryCode
1701 \brief this function is to get a list of the country code current being supported
1702 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1703 this has the country code list. 3 bytes for each country code. This may be NULL if
1704 caller wants to know the needed byte count.
1705 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1706 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1707 \return eHalStatus
1708 -------------------------------------------------------------------------------*/
1709eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1710
1711/* ---------------------------------------------------------------------------
1712 \fn sme_GetCurrentRegulatoryDomain
1713 \brief this function is to get the current regulatory domain. This is a synchronous API.
1714 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1715 SME. The function fails if 11d support is turned off.
1716 \param pDomain - Caller allocated buffer to return the current domain.
1717 \return eHalStatus SUCCESS.
1718
1719 FAILURE or RESOURCES The API finished and failed.
1720 -------------------------------------------------------------------------------*/
1721eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1722
1723/* ---------------------------------------------------------------------------
1724 \fn sme_SetRegulatoryDomain
1725 \brief this function is to set the current regulatory domain.
1726 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1727 SME. This is a synchronous API.
1728 \param domainId - indicate the domain (defined in the driver) needs to set to.
1729 See v_REGDOMAIN_t for definition
1730 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1731 a restart is needed to apply the change
1732 \return eHalStatus
1733 -------------------------------------------------------------------------------*/
1734eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1735
1736/* ---------------------------------------------------------------------------
1737
1738 \fn sme_GetRegulatoryDomainForCountry
1739
1740 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1741
1742 \param pCountry - pointer to a caller allocated buffer for input country code.
1743
1744 \param pDomainId Upon successful return, it is the domain that country belongs to.
1745 If it is NULL, returning success means that the country code is known.
1746
1747 \return eHalStatus SUCCESS.
1748
1749 FAILURE or RESOURCES The API finished and failed.
1750
1751 -------------------------------------------------------------------------------*/
1752eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1753
1754
1755
1756/* ---------------------------------------------------------------------------
1757
1758 \fn sme_GetSupportedRegulatoryDomains
1759
1760 \brief To return a list of supported regulatory domains. This is a synchronous API.
1761
1762 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1763
1764 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1765 Upon return, this parameter has the number for supported domains. If pDomains
1766 doesn't have enough space for all the supported domains, this function returns
1767 fail status and this parameter contains the number that is needed.
1768
1769 \return eHalStatus SUCCESS.
1770
1771 FAILURE or RESOURCES The API finished and failed.
1772
1773 -------------------------------------------------------------------------------*/
1774eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1775
1776//some support functions
1777tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1778tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1779tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1780//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1781eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1782
1783typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1784/* ---------------------------------------------------------------------------
1785
1786 \fn sme_ChangeCountryCode
1787
1788 \brief Change Country code from upperlayer during WLAN driver operation.
1789 This is a synchronous API.
1790
1791 \param hHal - The handle returned by macOpen.
1792
1793 \param pCountry New Country Code String
1794
Abhishek Singha306a442013-11-07 18:39:01 +05301795 \param sendRegHint If we want to send reg hint to nl80211
1796
Jeff Johnson295189b2012-06-20 16:38:30 -07001797 \return eHalStatus SUCCESS.
1798
1799 FAILURE or RESOURCES The API finished and failed.
1800
1801 -------------------------------------------------------------------------------*/
1802eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1803 tSmeChangeCountryCallback callback,
1804 tANI_U8 *pCountry,
1805 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301806 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301807 tAniBool countryFromUserSpace,
1808 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001809
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301810/* ---------------------------------------------------------------------------
1811
Amar Singhal0d15bd52013-10-12 23:13:13 -07001812 \fn sme_GenericChangeCountryCode
1813
1814 \brief Generic API to change country code
1815
1816 \param hHal - The handle returned by macOpen.
1817
1818 \param pCountry New Country Code String
1819
1820 \param reg_domain Regulatory domain for the new country code
1821
1822 \return eHalStatus SUCCESS.
1823
1824 FAILURE or RESOURCES The API finished and failed.
1825
1826 -------------------------------------------------------------------------------*/
1827eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1828 tANI_U8 *pCountry,
1829 v_REGDOMAIN_t reg_domain);
1830
1831/* ---------------------------------------------------------------------------
1832
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301833 \fn sme_DHCPStartInd
1834
1835 \brief Indicate FW about DHCP start event.
1836
1837 \param hHal - The handle returned by macOpen.
1838
1839 \param device_mode the mode of the device
1840
c_hpothu0b0cab72014-02-13 21:52:40 +05301841 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301842
1843 \return eHalStatus SUCCESS.
1844
1845 FAILURE or RESOURCES The API finished and failed.
1846
1847 -------------------------------------------------------------------------------*/
1848
1849eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1850 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301851 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301852
1853/* ---------------------------------------------------------------------------
1854
1855 \fn sme_DHCPStopInd
1856
1857 \brief Indicate FW about DHCP stop event.
1858
1859 \param hHal - The handle returned by macOpen.
1860
1861 \param device_mode the mode of the device
1862
c_hpothu0b0cab72014-02-13 21:52:40 +05301863 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301864
1865 \return eHalStatus SUCCESS.
1866
1867 FAILURE or RESOURCES The API finished and failed.
1868
1869 -------------------------------------------------------------------------------*/
1870eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1871 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301872 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301873
Jeff Johnson295189b2012-06-20 16:38:30 -07001874
1875/* ---------------------------------------------------------------------------
1876 \fn sme_BtcSignalBtEvent
1877 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1878 BT event type and the current operating mode of Libra (full power,
1879 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1880 would be employed.
1881 \param hHal - The handle returned by macOpen.
1882 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1883 Caller owns the memory and is responsible for freeing it.
1884 \return VOS_STATUS
1885 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1886 if driver has not yet been initialized or if BTC
1887 Events Layer has been disabled.
1888 VOS_STATUS_SUCCESS BT Event passed to HAL
1889 ---------------------------------------------------------------------------*/
1890VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1891
1892/* ---------------------------------------------------------------------------
1893 \fn sme_BtcSetConfig
1894 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1895 This function should be invoked only after CFG download has completed.
1896 Calling it after sme_HDDReadyInd is recommended.
1897 \param hHal - The handle returned by macOpen.
1898 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1899 tSmeBtcConfig. Caller owns the memory and is responsible
1900 for freeing it.
1901 \return VOS_STATUS
1902 VOS_STATUS_E_FAILURE Config not passed to HAL.
1903 VOS_STATUS_SUCCESS Config passed to HAL
1904 ---------------------------------------------------------------------------*/
1905VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1906
1907/* ---------------------------------------------------------------------------
1908 \fn sme_BtcGetConfig
1909 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1910 \param hHal - The handle returned by macOpen.
1911 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1912 Caller owns the memory and is responsible for freeing it.
1913 \return VOS_STATUS
1914 VOS_STATUS_E_FAILURE - failure
1915 VOS_STATUS_SUCCESS success
1916 ---------------------------------------------------------------------------*/
1917VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1918
1919/* ---------------------------------------------------------------------------
1920 \fn sme_SetCfgPrivacy
1921 \brief API to set configure privacy parameters
1922 \param hHal - The handle returned by macOpen.
1923 \param pProfile - Pointer CSR Roam profile.
1924 \param fPrivacy - This parameter indicates status of privacy
1925
1926 \return void
1927 ---------------------------------------------------------------------------*/
1928void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1929
1930#if defined WLAN_FEATURE_VOWIFI
1931/* ---------------------------------------------------------------------------
1932 \fn sme_NeighborReportRequest
1933 \brief API to request neighbor report.
1934 \param hHal - The handle returned by macOpen.
1935 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1936 tRrmNeighborReq. Caller owns the memory and is responsible
1937 for freeing it.
1938 \return VOS_STATUS
1939 VOS_STATUS_E_FAILURE - failure
1940 VOS_STATUS_SUCCESS success
1941 ---------------------------------------------------------------------------*/
1942VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1943 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1944#endif
1945
1946//The following are debug APIs to support direct read/write register/memory
1947//They are placed in SME because HW cannot be access when in LOW_POWER state
1948//AND not connected. The knowledge and synchronization is done in SME
1949
1950//sme_DbgReadRegister
1951//Caller needs to validate the input values
1952VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1953
1954//sme_DbgWriteRegister
1955//Caller needs to validate the input values
1956VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1957
1958//sme_DbgReadMemory
1959//Caller needs to validate the input values
1960//pBuf caller allocated buffer has the length of nLen
1961VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1962
1963//sme_DbgWriteMemory
1964//Caller needs to validate the input values
1965VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1966
Jeff Johnson295189b2012-06-20 16:38:30 -07001967VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1968 tSirVersionType *pVersion);
1969VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1970 tSirVersionType *pVersion);
1971VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1972 tANI_U8 *pVersion,
1973 tANI_U32 versionBufferSize);
1974VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1975 tANI_U8 *pVersion,
1976 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001977eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1978 csrRoamCompleteCallback callback,
1979 void *pContext);
1980
1981#ifdef FEATURE_WLAN_WAPI
1982/* ---------------------------------------------------------------------------
1983 \fn sme_RoamSetBKIDCache
1984 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1985 candidate list.
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 pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1989 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1990 when retruning, this is the number of items put into pBKIDCache
1991 \return eHalStatus - when fail, it usually means the buffer allocated is not
1992 big enough and pNumItems has the number of tBkidCacheInfo.
1993 ---------------------------------------------------------------------------*/
1994eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1995 tANI_U32 numItems );
1996
1997/* ---------------------------------------------------------------------------
1998 \fn sme_RoamGetBKIDCache
1999 \brief The SME API exposed to HDD to allow HDD to request SME to return its
2000 BKID cache.
2001 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2002 it is opened (by calling halOpen).
2003 \param pNum - caller allocated memory that has the space of the number of
2004 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
2005 in SME cache.
2006 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
2007 upon return
2008 \return eHalStatus - when fail, it usually means the buffer allocated is not
2009 big enough.
2010 ---------------------------------------------------------------------------*/
2011eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
2012 tBkidCacheInfo *pBkidCache);
2013
2014/* ---------------------------------------------------------------------------
2015 \fn sme_RoamGetNumBKIDCache
2016 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2017 number of BKID cache entries.
2018 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2019 it is opened (by calling halOpen).
2020 \return tANI_U32 - the number of BKID cache entries.
2021 ---------------------------------------------------------------------------*/
2022tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2023
2024/* ---------------------------------------------------------------------------
2025 \fn sme_ScanGetBKIDCandidateList
2026 \brief a wrapper function to return the BKID candidate list
2027 \param pBkidList - caller allocated buffer point to an array of
2028 tBkidCandidateInfo
2029 \param pNumItems - pointer to a variable that has the number of
2030 tBkidCandidateInfo allocated when retruning, this is
2031 either the number needed or number of items put into
2032 pPmkidList
2033 \return eHalStatus - when fail, it usually means the buffer allocated is not
2034 big enough and pNumItems
2035 has the number of tBkidCandidateInfo.
2036 \Note: pNumItems is a number of tBkidCandidateInfo,
2037 not sizeof(tBkidCandidateInfo) * something
2038 ---------------------------------------------------------------------------*/
2039eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2040 tBkidCandidateInfo *pBkidList,
2041 tANI_U32 *pNumItems );
2042#endif /* FEATURE_WLAN_WAPI */
2043
Jeff Johnsone7245742012-09-05 17:12:55 -07002044#ifdef FEATURE_OEM_DATA_SUPPORT
2045/********************************************************************************************
2046 Oem data related modifications
2047*********************************************************************************************/
2048/* ---------------------------------------------------------------------------
2049 \fn sme_OemDataReq
2050 \param sessionId - session id of session to be used for oem data req.
2051 \param pOemDataReqID - pointer to an object to get back the request ID
2052 \param callback - a callback function that is called upon finish
2053 \param pContext - a pointer passed in for the callback
2054 \return eHalStatus
2055 ---------------------------------------------------------------------------*/
2056eHalStatus sme_OemDataReq(tHalHandle hHal,
2057 tANI_U8 sessionId,
2058 tOemDataReqConfig *,
2059 tANI_U32 *pOemDataReqID,
2060 oemData_OemDataReqCompleteCallback callback,
2061 void *pContext);
2062
2063/* ---------------------------------------------------------------------------
2064 \fn sme_getOemDataRsp
2065 \param pOemDataRsp - A pointer to the response object
2066 \param pOemDataReqID - pointer to an object to get back the request ID
2067 \return eHalStatus
2068 ---------------------------------------------------------------------------*/
2069eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2070 tOemDataRsp **pOemDataRsp);
2071
2072#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002073
2074
Jeff Johnson295189b2012-06-20 16:38:30 -07002075
2076/* ---------------------------------------------------------------------------
2077
2078 \fn sme_RoamUpdateAPWPSIE
2079
2080 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2081 This is an asynchronous API.
2082
2083 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2084
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002085 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002086
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002087 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002088
2089 -------------------------------------------------------------------------------*/
2090
2091eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2092/* ---------------------------------------------------------------------------
2093
2094 \fn sme_RoamUpdateAPWPARSNIEs
2095
2096 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2097 This is an asynchronous API.
2098
2099 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2100
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002101 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002102
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002103 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002104
2105 -------------------------------------------------------------------------------*/
2106eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2107
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002108/* ---------------------------------------------------------------------------
2109
2110 sme_ChangeMCCBeaconInterval
2111
2112 \brief To update P2P-GO's beacon Interval.
2113
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002114 \return eHalStatus SUCCESS
2115 FAILURE or RESOURCES
2116 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002117 -------------------------------------------------------------------------------*/
2118eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2119
2120
Jeff Johnson295189b2012-06-20 16:38:30 -07002121
2122/* ---------------------------------------------------------------------------
2123 \fn sme_sendBTAmpEvent
2124 \brief API to send the btAMPstate to FW
2125 \param hHal - The handle returned by macOpen.
2126 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002127 \return eHalStatus SUCCESS
2128 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002129
2130--------------------------------------------------------------------------- */
2131
2132eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2133
2134
2135
2136/* ---------------------------------------------------------------------------
2137 \fn sme_SetHostOffload
2138 \brief API to set the host offload feature.
2139 \param hHal - The handle returned by macOpen.
2140 \param pRequest - Pointer to the offload request.
2141 \return eHalStatus
2142 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002143eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2144 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002145
2146/* ---------------------------------------------------------------------------
2147 \fn sme_SetKeepAlive
2148 \brief API to set the Keep Alive feature.
2149 \param hHal - The handle returned by macOpen.
2150 \param pRequest - Pointer to the Keep Alive request.
2151 \return eHalStatus
2152 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002153eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2154 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002155
Jeff Johnson295189b2012-06-20 16:38:30 -07002156/* ----------------------------------------------------------------------------
2157 \fn sme_GetOperationChannel
2158 \brief API to get current channel on which STA is parked
2159 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002160 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002161 \returns eHAL_STATUS_SUCCESS
2162 eHAL_STATUS_FAILURE
2163-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002164eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002165
Jeff Johnson295189b2012-06-20 16:38:30 -07002166/* ---------------------------------------------------------------------------
2167
2168 \fn sme_RegisterMgtFrame
2169
2170 \brief To register managment frame of specified type and subtype.
2171 \param frameType - type of the frame that needs to be passed to HDD.
2172 \param matchData - data which needs to be matched before passing frame
2173 to HDD.
2174 \param matchDataLen - Length of matched data.
2175 \return eHalStatus
2176 -------------------------------------------------------------------------------*/
2177eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2178 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2179
2180/* ---------------------------------------------------------------------------
2181
2182 \fn sme_DeregisterMgtFrame
2183
2184 \brief To De-register managment frame of specified type and subtype.
2185 \param frameType - type of the frame that needs to be passed to HDD.
2186 \param matchData - data which needs to be matched before passing frame
2187 to HDD.
2188 \param matchDataLen - Length of matched data.
2189 \return eHalStatus
2190 -------------------------------------------------------------------------------*/
2191eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2192 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302193/* ---------------------------------------------------------------------------
2194 \fn sme_GetFramesLog
2195 \brief a wrapper function that client calls to register a callback to get
2196 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302197 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302198 \return eHalStatus
2199 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302200eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002201/* ---------------------------------------------------------------------------
2202
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302203 \fn sme_InitMgmtFrameLogging
2204
2205 \brief
2206 SME will pass this request to lower mac to initialize Frame Logging.
2207
2208 \param
2209
2210 hHal - The handle returned by macOpen.
2211
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302212 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302213
2214 \return eHalStatus
2215--------------------------------------------------------------------------- */
2216eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302217 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302218
2219/* ---------------------------------------------------------------------------
2220
Jeff Johnson295189b2012-06-20 16:38:30 -07002221 \fn sme_ConfigureRxpFilter
2222
2223 \brief
2224 SME will pass this request to lower mac to set/reset the filter on RXP for
2225 multicast & broadcast traffic.
2226
2227 \param
2228
2229 hHal - The handle returned by macOpen.
2230
2231 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2232 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2233 on this param. In future we can use this as a mask to set various types of
2234 filters as suggested below:
2235 FILTER_ALL_MULTICAST:
2236 FILTER_ALL_BROADCAST:
2237 FILTER_ALL_MULTICAST_BROADCAST:
2238
2239
2240 \return eHalStatus
2241
2242
2243--------------------------------------------------------------------------- */
2244eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2245 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2246
2247/* ---------------------------------------------------------------------------
2248
2249 \fn sme_ConfigureAppsCpuWakeupState
2250
2251 \brief
2252 SME will pass this request to lower mac to dynamically adjusts the listen
2253 interval based on the WLAN/MSM activity. This feature is named as
2254 Telescopic Beacon wakeup feature.
2255
2256 \param
2257
2258 hHal - The handle returned by macOpen.
2259
2260 isAppsAwake- Depicts the state of the Apps CPU
2261
2262
2263 \return eHalStatus
2264
2265
2266--------------------------------------------------------------------------- */
2267eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2268
Jeff Johnson295189b2012-06-20 16:38:30 -07002269/* ---------------------------------------------------------------------------
2270
2271 \fn sme_ConfigureSuspendInd
2272
2273 \brief
2274 SME will pass this request to lower mac to Indicate that the wlan needs to
2275 be suspended
2276
2277 \param
2278
2279 hHal - The handle returned by macOpen.
2280
2281 wlanSuspendParam- Depicts the wlan suspend params
2282
2283
2284 \return eHalStatus
2285
2286
2287--------------------------------------------------------------------------- */
2288eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2289 tpSirWlanSuspendParam wlanSuspendParam);
2290
2291/* ---------------------------------------------------------------------------
2292
2293 \fn sme_ConfigureResumeReq
2294
2295 \brief
2296 SME will pass this request to lower mac to Indicate that the wlan needs to
2297 be Resumed
2298
2299 \param
2300
2301 hHal - The handle returned by macOpen.
2302
2303 wlanResumeParam- Depicts the wlan resume params
2304
2305
2306 \return eHalStatus
2307
2308
2309--------------------------------------------------------------------------- */
2310eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2311 tpSirWlanResumeParam wlanResumeParam);
2312
Jeff Johnson295189b2012-06-20 16:38:30 -07002313
2314/* ---------------------------------------------------------------------------
2315
2316 \fn sme_GetInfraSessionId
2317
2318 \brief To get the session ID for infra session, if connected
2319 This is a synchronous API.
2320
2321 \param hHal - The handle returned by macOpen.
2322
2323 \return sessionid, -1 if infra session is not connected
2324
2325 -------------------------------------------------------------------------------*/
2326tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2327
2328/* ---------------------------------------------------------------------------
2329
2330 \fn sme_GetInfraOperationChannel
2331
2332 \brief To get the operating channel for infra session, if connected
2333 This is a synchronous API.
2334
2335 \param hHal - The handle returned by macOpen.
2336 \param sessionId - the sessionId returned by sme_OpenSession.
2337
2338 \return operating channel, 0 if infra session is not connected
2339
2340 -------------------------------------------------------------------------------*/
2341tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2342/* ---------------------------------------------------------------------------
2343
2344 \fn sme_GetConcurrentOperationChannel
2345
2346 \brief To get the operating channel for other concurrent sessions, if connected
2347 This is a synchronous API.
2348
2349 \param hHal - The handle returned by macOpen.
2350 \param currentPersona - persona that is trying to come up.
2351
2352 \return operating channel, 0 if infra session is not connected
2353
2354 -------------------------------------------------------------------------------*/
2355tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2356
2357/* ---------------------------------------------------------------------------
2358 \fn sme_AbortMacScan
2359 \brief API to cancel MAC scan.
2360 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302361 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302362 \return tSirAbortScanStatus return status abort scan
2363
Jeff Johnson295189b2012-06-20 16:38:30 -07002364 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302365tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2366 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002367
2368/* ---------------------------------------------------------------------------
2369 \fn sme_GetCfgValidChannels
2370 \brief API to get valid channel list
2371 \param hHal - The handle returned by macOpen.
2372 \param aValidChannels - Pointer to the valid channel list
2373 \param len - valid channel list length
2374 \return eHalStatus
2375 ---------------------------------------------------------------------------*/
2376eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2377
2378#ifdef FEATURE_WLAN_SCAN_PNO
2379
2380/* ---------------------------------------------------------------------------
2381 \fn sme_SetPreferredNetworkList
2382 \brief API to set the Preferred Network List Offload feature.
2383 \param hHal - The handle returned by macOpen.
2384 \param pRequest - Pointer to the offload request.
2385 \return eHalStatus
2386 ---------------------------------------------------------------------------*/
2387eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2388
2389/* ---------------------------------------------------------------------------
2390 \fn sme_SetRSSIFilter
2391 \brief API to set RSSI Filter feature.
2392 \param hHal - The handle returned by macOpen.
2393 \param pRequest - Pointer to the offload request.
2394 \return eHalStatus
2395 ---------------------------------------------------------------------------*/
2396eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2397
2398/******************************************************************************
2399*
2400* Name: sme_PreferredNetworkFoundInd
2401*
2402* Description:
2403* Invoke Preferred Network Found Indication
2404*
2405* Parameters:
2406* hHal - HAL handle for device
2407* pMsg - found network description
2408*
2409* Returns: eHalStatus
2410*
2411******************************************************************************/
2412eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2413#endif // FEATURE_WLAN_SCAN_PNO
2414
2415/* ---------------------------------------------------------------------------
2416 \fn sme_SetPowerParams
2417 \brief API to set Power Parameters
2418 \param hHal - The handle returned by macOpen.
2419 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002420 \param forced - if true, not to be dropped silently in host, it must reach
2421 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2422 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002423 \return eHalStatus
2424 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002425eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002426
2427/* ---------------------------------------------------------------------------
2428 \fn sme_SetTxPerTracking
2429 \brief Set Tx PER tracking configuration parameters
2430 \param hHal - The handle returned by macOpen.
2431 \param pTxPerTrackingParam - Tx PER configuration parameters
2432 \return eHalStatus
2433 ---------------------------------------------------------------------------*/
2434eHalStatus sme_SetTxPerTracking (
2435 tHalHandle hHal,
2436 void (*pCallbackfn) (void *pCallbackContext),
2437 void *pCallbackContext,
2438 tpSirTxPerTrackingParam pTxPerTrackingParam);
2439
2440#ifdef WLAN_FEATURE_PACKET_FILTERING
2441/* ---------------------------------------------------------------------------
2442 \fn sme_ReceiveFilterSetFilter
2443 \brief API to set 8023 Multicast Address List
2444 \param hHal - The handle returned by macOpen.
2445 \param pMulticastAddrs - Pointer to the Multicast Address List
2446 \return eHalStatus
2447 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002448eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002449
2450/* ---------------------------------------------------------------------------
2451 \fn sme_ReceiveFilterSetFilter
2452 \brief API to set Receive Packet Filter
2453 \param hHal - The handle returned by macOpen.
2454 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2455 \return eHalStatus
2456 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002457eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2458 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002459
2460/* ---------------------------------------------------------------------------
2461 \fn sme_GetFilterMatchCount
2462 \brief API to get D0 PC Filter Match Count
2463 \param hHal - The handle returned by macOpen
2464 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2465 \param callbackContext - Cookie to be passed back during callback
2466 \return eHalStatus
2467 ---------------------------------------------------------------------------*/
2468eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2469 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002470 void *callbackContext,
2471 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002472
2473/* ---------------------------------------------------------------------------
2474 \fn sme_ReceiveFilterClearFilter
2475 \brief API to clear Receive Packet Filter
2476 \param hHal - The handle returned by macOpen.
2477 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2478 \return eHalStatus
2479 ---------------------------------------------------------------------------*/
2480eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002481 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2482 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002483#endif // WLAN_FEATURE_PACKET_FILTERING
2484/* ---------------------------------------------------------------------------
2485
2486 \fn sme_IsChannelValid
2487 \brief To check if the channel is valid for currently established domain
2488 This is a synchronous API.
2489
2490 \param hHal - The handle returned by macOpen.
2491 \param channel - channel to verify
2492
2493 \return TRUE/FALSE, TRUE if channel is valid
2494
2495 -------------------------------------------------------------------------------*/
2496tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2497
2498/* ---------------------------------------------------------------------------
2499 \fn sme_SetFreqBand
2500 \brief Used to set frequency band.
2501 \param hHal
2502 \eBand band value to be configured
2503 \- return eHalStatus
2504 -------------------------------------------------------------------------*/
2505eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2506
2507/* ---------------------------------------------------------------------------
2508 \fn sme_GetFreqBand
2509 \brief Used to get the current band settings.
2510 \param hHal
2511 \pBand pointer to hold the current band value
2512 \- return eHalStatus
2513 -------------------------------------------------------------------------*/
2514eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2515
2516/* ---------------------------------------------------------------------------
2517
2518 \fn sme_SetTxPerTracking
2519 \brief Set Tx PER tracking configuration parameters
2520 \param hHal - The handle returned by macOpen.
2521 \param pTxPerTrackingParam - Tx PER configuration parameters
2522 \return eHalStatus
2523 ---------------------------------------------------------------------------*/
2524eHalStatus sme_SetTxPerTracking (
2525 tHalHandle hHal,
2526 void (*pCallbackfn) (void *pCallbackContext),
2527 void *pCallbackContext,
2528 tpSirTxPerTrackingParam pTxPerTrackingParam);
2529
2530#ifdef WLAN_FEATURE_GTK_OFFLOAD
2531/* ---------------------------------------------------------------------------
2532 \fn sme_SetGTKOffload
2533 \brief API to set GTK offload feature.
2534 \param hHal - The handle returned by macOpen.
2535 \param pRequest - Pointer to the GTK offload request.
2536 \return eHalStatus
2537 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002538eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002539
2540/* ---------------------------------------------------------------------------
2541 \fn sme_GetGTKOffload
2542 \brief API to get GTK offload information.
2543 \param hHal - The handle returned by macOpen.
2544 \param pRequest - Pointer to the GTK offload response.
2545 \return eHalStatus
2546 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002547eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2548 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002549#endif // WLAN_FEATURE_GTK_OFFLOAD
2550
2551#ifdef WLAN_WAKEUP_EVENTS
2552eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2553#endif // WLAN_WAKEUP_EVENTS
2554
2555/* ---------------------------------------------------------------------------
2556 \fn sme_SetTxPerTracking
2557 \brief Set Tx PER tracking configuration parameters
2558 \param hHal - The handle returned by macOpen.
2559 \param pTxPerTrackingParam - Tx PER configuration parameters
2560 \return eHalStatus
2561 ---------------------------------------------------------------------------*/
2562eHalStatus sme_SetTxPerTracking (
2563 tHalHandle hHal,
2564 void (*pCallbackfn) (void *pCallbackContext),
2565 void *pCallbackContext,
2566 tpSirTxPerTrackingParam pTxPerTrackingParam);
2567
2568
2569//return frequency for a particular channel
2570tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2571
2572tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2573
2574#if defined WLAN_FEATURE_P2P_INTERNAL
2575
2576eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2577
2578/* ---------------------------------------------------------------------------
2579 \fn sme_p2pFlushDeviceList
2580 \brief Remove cached P2P result from scan results
2581 \param hHal - The handle returned by macOpen.
2582 \param HDDSessionId - HDD's sessionId. Currently unused.
2583 \return eHalStatus
2584 ---------------------------------------------------------------------------*/
2585eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2586
2587eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2588 tCsrScanResultFilter *pFilter);
2589
2590#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2591
2592/* ---------------------------------------------------------------------------
2593 \fn sme_SetMaxTxPower
2594 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2595 setting will not persist over reboots
2596 \param hHal
2597 \param pBssid BSSID to set the power cap for
2598 \param pBssid pSelfMacAddress self MAC Address
2599 \param pBssid power to set in dB
2600 \- return eHalStatus
2601 -------------------------------------------------------------------------*/
2602eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2603 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2604
Jeff Johnson295189b2012-06-20 16:38:30 -07002605/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002606 \fn sme_SetMaxTxPowerPerBand
2607 \brief Used to set the Maximum Transmit Power for
2608 specific band dynamically. Note: this setting will not persist over reboots
2609 \param band
2610 \param power to set in dB
2611 \- return eHalStatus
2612 -------------------------------------------------------------------------*/
2613eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2614
2615/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002616
schang86c22c42013-03-13 18:41:24 -07002617 \fn sme_SetTxPower
2618
2619 \brief Set Transmit Power dynamically. Note: this setting will
2620 not persist over reboots.
2621
2622 \param hHal
2623 \param sessionId Target Session ID
2624 \param mW power to set in mW
2625 \- return eHalStatus
2626
2627 -------------------------------------------------------------------------------*/
2628eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2629
2630/* ---------------------------------------------------------------------------
2631
Jeff Johnson295189b2012-06-20 16:38:30 -07002632 \fn sme_HideSSID
2633
2634 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2635 not persist over reboots.
2636
2637 \param hHal
2638 \param sessionId
2639 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2640 \- return eHalStatus
2641
2642 -------------------------------------------------------------------------------*/
2643eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002644
2645/* ---------------------------------------------------------------------------
2646
2647 \fn sme_SetTmLevel
2648 \brief Set Thermal Mitigation Level to RIVA
2649 \param hHal - The handle returned by macOpen.
2650 \param newTMLevel - new Thermal Mitigation Level
2651 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002652 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002653 ---------------------------------------------------------------------------*/
2654eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2655
2656/*---------------------------------------------------------------------------
2657
2658 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2659 Host and FW.
2660
2661 \param hHal - HAL handle for device
2662
2663 \return NONE
2664
2665---------------------------------------------------------------------------*/
2666void sme_featureCapsExchange(tHalHandle hHal);
2667
Jeff Johnsond13512a2012-07-17 11:42:19 -07002668/*---------------------------------------------------------------------------
2669
Yathish9f22e662012-12-10 14:21:35 -08002670 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2671 between in Host.
2672
2673 \param hHal - HAL handle for device
2674
2675 \return NONE
2676
2677---------------------------------------------------------------------------*/
2678void sme_disableFeatureCapablity(tANI_U8 feature_index);
2679
2680/*---------------------------------------------------------------------------
2681
Jeff Johnsond13512a2012-07-17 11:42:19 -07002682 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2683 country code
2684 Host and FW.
2685
2686 \param hHal - HAL handle for device
2687 \param pCountry - pointer to country code
2688
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002689 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002690
2691 ---------------------------------------------------------------------------*/
2692eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2693
2694/*---------------------------------------------------------------------------
2695
2696 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2697 country code.
2698
2699 \param hHal - HAL handle for device
2700 \param pCountry - pointer to country code
2701
2702 \return Success or failure
2703
2704 ---------------------------------------------------------------------------*/
2705eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2706
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002707/* ---------------------------------------------------------------------------
2708 \fn sme_transportDebug
2709 \brief Dynamically monitoring Transport channels
2710 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002711 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002712 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002713 \param toggleStallDetect Enable stall detect feature
2714 This feature will take effect to data performance
2715 Not integrate till fully verification
2716 \- return NONE
2717 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002718void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002719
Kiran4a17ebe2013-01-31 10:43:43 -08002720/* ---------------------------------------------------------------------------
2721 \fn sme_ResetPowerValuesFor5G
2722 \brief Reset the power values for 5G band with NV power values.
2723 \param hHal - HAL handle for device
2724 \- return NONE
2725 -------------------------------------------------------------------------*/
2726void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2727
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002728#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002729/* ---------------------------------------------------------------------------
2730 \fn sme_UpdateRoamPrefer5GHz
2731 \brief enable/disable Roam prefer 5G runtime option
2732 This function is called through dynamic setConfig callback function
2733 to configure the Roam prefer 5G runtime option
2734 \param hHal - HAL handle for device
2735 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2736 \- return Success or failure
2737 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002738eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002739
2740/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002741 \fn sme_setRoamIntraBand
2742 \brief enable/disable Intra band roaming
2743 This function is called through dynamic setConfig callback function
2744 to configure the intra band roaming
2745 \param hHal - HAL handle for device
2746 \param nRoamIntraBand Enable/Disable Intra band roaming
2747 \- return Success or failure
2748 -------------------------------------------------------------------------*/
2749eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2750
2751/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002752 \fn sme_UpdateRoamScanNProbes
2753 \brief function to update roam scan N probes
2754 This function is called through dynamic setConfig callback function
2755 to update roam scan N probes
2756 \param hHal - HAL handle for device
2757 \param nProbes number of probe requests to be sent out
2758 \- return Success or failure
2759 -------------------------------------------------------------------------*/
2760eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2761
2762/* ---------------------------------------------------------------------------
2763 \fn sme_UpdateRoamScanHomeAwayTime
2764 \brief function to update roam scan Home away time
2765 This function is called through dynamic setConfig callback function
2766 to update roam scan home away time
2767 \param hHal - HAL handle for device
2768 \param nRoamScanAwayTime Scan home away time
2769 \- return Success or failure
2770 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002771eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2772 const v_U16_t nRoamScanHomeAwayTime,
2773 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002774
2775/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002776 \fn sme_getRoamIntraBand
2777 \brief get Intra band roaming
2778 \param hHal - HAL handle for device
2779 \- return Success or failure
2780 -------------------------------------------------------------------------*/
2781v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2782
2783/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002784 \fn sme_getRoamScanNProbes
2785 \brief get N Probes
2786 \param hHal - HAL handle for device
2787 \- return Success or failure
2788 -------------------------------------------------------------------------*/
2789v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2790
2791/* ---------------------------------------------------------------------------
2792 \fn sme_getRoamScanHomeAwayTime
2793 \brief get Roam scan home away time
2794 \param hHal - HAL handle for device
2795 \- return Success or failure
2796 -------------------------------------------------------------------------*/
2797v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2798
2799/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002800 \fn sme_UpdateImmediateRoamRssiDiff
2801 \brief Update nImmediateRoamRssiDiff
2802 This function is called through dynamic setConfig callback function
2803 to configure nImmediateRoamRssiDiff
2804 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2805 \param hHal - HAL handle for device
2806 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2807 candidate and current AP.
2808 \- return Success or failure
2809 -------------------------------------------------------------------------*/
2810
2811eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002812
Srinivas Girigowdade697412013-02-14 16:31:48 -08002813/* ---------------------------------------------------------------------------
2814 \fn sme_UpdateRoamRssiDiff
2815 \brief Update RoamRssiDiff
2816 This function is called through dynamic setConfig callback function
2817 to configure RoamRssiDiff
2818 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2819 \param hHal - HAL handle for device
2820 \param RoamRssiDiff - minimum rssi difference between potential
2821 candidate and current AP.
2822 \- return Success or failure
2823 -------------------------------------------------------------------------*/
2824
2825eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2826
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002827/*--------------------------------------------------------------------------
2828 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2829 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2830 isFastTransitionEnabled.
2831 This is a synchronuous call
2832 \param hHal - The handle returned by macOpen.
2833 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2834 Other status means SME is failed to update isFastTransitionEnabled.
2835 \sa
2836 --------------------------------------------------------------------------*/
2837
2838eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2839 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002840
2841/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002842 \fn sme_UpdateWESMode
2843 \brief Update WESMode
2844 This function is called through dynamic setConfig callback function
2845 to configure isWESModeEnabled
2846 \param hHal - HAL handle for device
2847 \param isWESModeEnabled - Enable/Disable WES Mode
2848 \- return Success or failure
2849 -------------------------------------------------------------------------*/
2850eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2851
2852/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002853 \fn sme_SetRoamScanControl
2854 \brief Set roam scan control
2855 This function is called to set roam scan control
2856 if roam scan control is set to 0, roaming scan cache is cleared
2857 any value other than 0 is treated as invalid value
2858 \param hHal - HAL handle for device
2859 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2860 Other status means SME failure to update
2861 -------------------------------------------------------------------------*/
2862eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002863#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002864
2865#ifdef FEATURE_WLAN_LFR
2866/*--------------------------------------------------------------------------
2867 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002868 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002869 isFastRoamIniFeatureEnabled.
2870 This is a synchronuous call
2871 \param hHal - The handle returned by macOpen.
2872 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2873 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2874 \sa
2875 --------------------------------------------------------------------------*/
2876
Srinivas Girigowdade697412013-02-14 16:31:48 -08002877eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002878 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002879
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002880/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302881 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2882 When Supplicant issue enabled / disable fwr based roaming on the basis
2883 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2884
2885 This is a synchronous call
2886 \param hHal - The handle returned by macOpen.
2887 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2888 Other status means SME is failed to (enabled/disabled) offload scan.
2889 \sa
2890 --------------------------------------------------------------------------*/
2891
2892eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2893 const v_BOOL_t isFastRoamEnabled);
2894
2895/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002896 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2897 Enable/disable LFR MAWC support at runtime
2898 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2899 isMAWCIniFeatureEnabled.
2900 This is a synchronous call
2901 \param hHal - The handle returned by macOpen.
2902 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2903 Other status means SME is failed to update MAWCEnabled.
2904 \sa
2905 --------------------------------------------------------------------------*/
2906eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2907 const v_BOOL_t MAWCEnabled);
2908
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002909
2910#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2911/*--------------------------------------------------------------------------
2912 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2913 This is a synchronuous call
2914 \param hHal - The handle returned by macOpen.
2915 \return eHAL_STATUS_SUCCESS
2916 Other status means SME is failed
2917 \sa
2918 --------------------------------------------------------------------------*/
2919
2920eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2921 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2922#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002923#endif /* FEATURE_WLAN_LFR */
2924
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002925#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002926/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002927 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002928 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002929 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002930 This is a synchronuous call
2931 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002932 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2933 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002934 \sa
2935 --------------------------------------------------------------------------*/
2936
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002937eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2938 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002939
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002940#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002941
2942/*--------------------------------------------------------------------------
2943 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2944 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2945 fEnableFwRssiMonitoring.
2946 This is a synchronuous call
2947 \param hHal - The handle returned by macOpen.
2948 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2949 Other status means SME is failed to update
2950 \sa
2951 --------------------------------------------------------------------------*/
2952
2953eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2954 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002955
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002956#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002957/*--------------------------------------------------------------------------
2958 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2959 This is a synchronuous call
2960 \param hHal - The handle returned by macOpen.
2961 \return eHAL_STATUS_SUCCESS - SME update config successful.
2962 Other status means SME is failed to update
2963 \sa
2964 --------------------------------------------------------------------------*/
2965eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2966 v_U8_t neighborLookupRssiThreshold);
2967
2968/*--------------------------------------------------------------------------
2969 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2970 This is a synchronuous call
2971 \param hHal - The handle returned by macOpen.
2972 \return eHAL_STATUS_SUCCESS - SME update config successful.
2973 Other status means SME is failed to update
2974 \sa
2975 --------------------------------------------------------------------------*/
2976eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2977 v_U8_t neighborReassocRssiThreshold);
2978
2979/*--------------------------------------------------------------------------
2980 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2981 This is a synchronuous call
2982 \param hHal - The handle returned by macOpen.
2983 \return eHAL_STATUS_SUCCESS - SME update config successful.
2984 Other status means SME is failed to update
2985 \sa
2986 --------------------------------------------------------------------------*/
2987v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2988
2989/*--------------------------------------------------------------------------
2990 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2991 This is a synchronuous call
2992 \param hHal - The handle returned by macOpen.
2993 \return eHAL_STATUS_SUCCESS - SME update config successful.
2994 Other status means SME is failed to update
2995 \sa
2996 --------------------------------------------------------------------------*/
2997eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2998 v_U16_t neighborScanResultsRefreshPeriod);
2999
3000/*--------------------------------------------------------------------------
3001 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
3002 This is a synchronuous call
3003 \param hHal - The handle returned by macOpen.
3004 \return eHAL_STATUS_SUCCESS - SME update config successful.
3005 Other status means SME is failed to update
3006 \sa
3007 --------------------------------------------------------------------------*/
3008v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
3009
3010/*--------------------------------------------------------------------------
3011 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3012 This is a synchronuous call
3013 \param hHal - The handle returned by macOpen.
3014 \return eHAL_STATUS_SUCCESS - SME update config successful.
3015 Other status means SME is failed to update
3016 \sa
3017 --------------------------------------------------------------------------*/
3018v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3019
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003020/* ---------------------------------------------------------------------------
3021 \fn sme_UpdateEmptyScanRefreshPeriod
3022 \brief Update nEmptyScanRefreshPeriod
3023 This function is called through dynamic setConfig callback function
3024 to configure nEmptyScanRefreshPeriod
3025 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3026 \param hHal - HAL handle for device
3027 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3028 \- return Success or failure
3029 -------------------------------------------------------------------------*/
3030eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3031
3032/* ---------------------------------------------------------------------------
3033 \fn sme_setNeighborScanMinChanTime
3034 \brief Update nNeighborScanMinChanTime
3035 This function is called through dynamic setConfig callback function
3036 to configure gNeighborScanChannelMinTime
3037 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3038 \param hHal - HAL handle for device
3039 \param nNeighborScanMinChanTime - Channel minimum dwell time
3040 \- return Success or failure
3041 -------------------------------------------------------------------------*/
3042eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3043
3044/* ---------------------------------------------------------------------------
3045 \fn sme_setNeighborScanMaxChanTime
3046 \brief Update nNeighborScanMaxChanTime
3047 This function is called through dynamic setConfig callback function
3048 to configure gNeighborScanChannelMaxTime
3049 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3050 \param hHal - HAL handle for device
3051 \param nNeighborScanMinChanTime - Channel maximum dwell time
3052 \- return Success or failure
3053 -------------------------------------------------------------------------*/
3054eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3055
3056/* ---------------------------------------------------------------------------
3057 \fn sme_getNeighborScanMinChanTime
3058 \brief get neighbor scan min channel time
3059 \param hHal - The handle returned by macOpen.
3060 \return v_U16_t - channel min time value
3061 -------------------------------------------------------------------------*/
3062v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3063
3064/* ---------------------------------------------------------------------------
3065 \fn sme_getNeighborScanMaxChanTime
3066 \brief get neighbor scan max channel time
3067 \param hHal - The handle returned by macOpen.
3068 \return v_U16_t - channel max time value
3069 -------------------------------------------------------------------------*/
3070v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3071
3072/* ---------------------------------------------------------------------------
3073 \fn sme_setNeighborScanPeriod
3074 \brief Update nNeighborScanPeriod
3075 This function is called through dynamic setConfig callback function
3076 to configure nNeighborScanPeriod
3077 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3078 \param hHal - HAL handle for device
3079 \param nNeighborScanPeriod - neighbor scan period
3080 \- return Success or failure
3081 -------------------------------------------------------------------------*/
3082eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3083
3084/* ---------------------------------------------------------------------------
3085 \fn sme_getNeighborScanPeriod
3086 \brief get neighbor scan period
3087 \param hHal - The handle returned by macOpen.
3088 \return v_U16_t - neighbor scan period
3089 -------------------------------------------------------------------------*/
3090v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3091
3092#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003093
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003094#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003095/*--------------------------------------------------------------------------
3096 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3097 This is a synchronuous call
3098 \param hHal - The handle returned by macOpen.
3099 \return eHAL_STATUS_SUCCESS - SME update config successful.
3100 Other status means SME is failed to update
3101 \sa
3102 --------------------------------------------------------------------------*/
3103v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3104
3105/*--------------------------------------------------------------------------
3106 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3107 This is a synchronuous call
3108 \param hHal - The handle returned by macOpen.
3109 \return eHAL_STATUS_SUCCESS - SME update config successful.
3110 Other status means SME is failed to update
3111 \sa
3112 --------------------------------------------------------------------------*/
3113eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3114 tANI_U8 numChannels);
3115
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003116#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003117/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003118 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003119 This is a synchronuous call
3120 \param hHal - The handle returned by macOpen.
3121 \return eHAL_STATUS_SUCCESS - SME update config successful.
3122 Other status means SME is failed to update
3123 \sa
3124 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003125eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003126 tANI_U8 *pChannelList,
3127 tANI_U8 numChannels);
3128#endif
3129
Srinivas Girigowdade697412013-02-14 16:31:48 -08003130/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003131 \brief sme_getRoamScanChannelList() - get roam scan channel list
3132 This is a synchronuous call
3133 \param hHal - The handle returned by macOpen.
3134 \return eHAL_STATUS_SUCCESS - SME update config successful.
3135 Other status means SME is failed to update
3136 \sa
3137 --------------------------------------------------------------------------*/
3138eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3139 tANI_U8 *pNumChannels);
3140
3141/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003142 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003143 This is a synchronuous call
3144 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003145 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003146 FALSE (0) - if feature is disabled (compile or runtime)
3147 \sa
3148 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003149tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003150
3151/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003152 \brief sme_getWESMode() - getWES Mode
3153 This is a synchronous call
3154 \param hHal - The handle returned by macOpen.
3155 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3156 \sa
3157 --------------------------------------------------------------------------*/
3158v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3159
3160/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003161 \brief sme_GetRoamScanControl() - get scan control
3162 This is a synchronous call
3163 \param hHal - The handle returned by macOpen.
3164 \return v_BOOL_t - Enabled(1)/Disabled(0)
3165 \sa
3166 --------------------------------------------------------------------------*/
3167v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3168
3169/* ---------------------------------------------------------------------------
3170 \fn sme_UpdateEmptyScanRefreshPeriod
3171 \brief Update nnEmptyScanRefreshPeriod
3172 This function is called through dynamic setConfig callback function
3173 to configure nnEmptyScanRefreshPeriod
3174 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3175 \param hHal - HAL handle for device
3176 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3177 \- return Success or failure
3178 -------------------------------------------------------------------------*/
3179
3180/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003181 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3182 This is a synchronuous call
3183 \param hHal - The handle returned by macOpen.
3184 \return TRUE (1) - if the feature is enabled
3185 FALSE (0) - if feature is disabled (compile or runtime)
3186 \sa
3187 --------------------------------------------------------------------------*/
3188tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3189
3190/*--------------------------------------------------------------------------
3191 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3192 This is a synchronuous call
3193 \param hHal - The handle returned by macOpen.
3194 \return TRUE (1) - if the feature is enabled
3195 FALSE (0) - if feature is disabled (compile or runtime)
3196 \sa
3197 --------------------------------------------------------------------------*/
3198tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3199
Srinivas Girigowdade697412013-02-14 16:31:48 -08003200#endif
3201
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003202#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3203/*--------------------------------------------------------------------------
3204 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3205 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3206 gRoamScanOffloadEnabled.
3207 This is a synchronous call
3208 \param hHal - The handle returned by macOpen.
3209 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3210 Other status means SME is failed to update.
3211 \sa
3212 --------------------------------------------------------------------------*/
3213
3214eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3215#endif
3216
3217
Srinivas Girigowdade697412013-02-14 16:31:48 -08003218/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003219 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303220 \brief Check if a feature is enabled by FW
3221
3222 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003223 A value from enum placeHolderInCapBitmap
3224
3225 \- return 1/0 (TRUE/FALSE)
3226 -------------------------------------------------------------------------*/
3227tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303228
3229/* ---------------------------------------------------------------------------
3230 \fn sme_IsFeatureSupportedByDriver
3231 \brief Check if a feature is enabled by driver
3232
3233 \param featEnumValue - Enumeration value of the feature to be checked.
3234 A value from enum placeHolderInCapBitmap
3235
3236 \- return 1/0 (TRUE/FALSE)
3237 -------------------------------------------------------------------------*/
3238tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3239
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003240#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303241
3242/* ---------------------------------------------------------------------------
3243 \fn sme_SendTdlsLinkEstablishParams
3244 \brief API to send TDLS Link Establishment Parameters.
3245
3246 \param peerMac - peer's Mac Adress.
3247 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3248 \- return VOS_STATUS_SUCCES
3249 -------------------------------------------------------------------------*/
3250
3251VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303252 tANI_U8 sessionId,
3253#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3254 const tSirMacAddr peerMac,
3255#else
3256 tSirMacAddr peerMac,
3257#endif
3258 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303259
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003260/* ---------------------------------------------------------------------------
3261 \fn sme_SendTdlsMgmtFrame
3262 \brief API to send TDLS management frames.
3263
3264 \param peerMac - peer's Mac Adress.
3265 \param frame_type - Type of TDLS mgmt frame to be sent.
3266 \param dialog - dialog token used in the frame.
3267 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303268 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003269 \param buf - additional IEs to be included
3270 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003271 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003272 \- return VOS_STATUS_SUCCES
3273 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303274VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3275#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3276 const tSirMacAddr peerMac,
3277#else
3278 tSirMacAddr peerMac,
3279#endif
3280 tANI_U8 frame_type, tANI_U8 dialog,
3281 tANI_U16 status, tANI_U32 peerCapability,
3282 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003283/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003284 \fn sme_ChangeTdlsPeerSta
3285 \brief API to Update TDLS peer sta parameters.
3286
3287 \param peerMac - peer's Mac Adress.
3288 \param staParams - Peer Station Parameters.
3289 \- return VOS_STATUS_SUCCES
3290 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303291VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3292#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3293 const tSirMacAddr peerMac,
3294#else
3295 tSirMacAddr peerMac,
3296#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003297 tCsrStaParams *pstaParams);
3298/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003299 \fn sme_AddTdlsPeerSta
3300 \brief API to Add TDLS peer sta entry.
3301
3302 \param peerMac - peer's Mac Adress.
3303 \- return VOS_STATUS_SUCCES
3304 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303305VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3306#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3307 const tSirMacAddr peerMac
3308#else
3309 tSirMacAddr peerMac
3310#endif
3311 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003312/* ---------------------------------------------------------------------------
3313 \fn sme_DeleteTdlsPeerSta
3314 \brief API to Delete TDLS peer sta entry.
3315
3316 \param peerMac - peer's Mac Adress.
3317 \- return VOS_STATUS_SUCCES
3318 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303319VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3320#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3321 const tSirMacAddr peerMac
3322#else
3323 tSirMacAddr peerMac
3324#endif
3325 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003326/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003327 \fn sme_SetTdlsPowerSaveProhibited
3328 \API to set/reset the isTdlsPowerSaveProhibited.
3329
3330 \- return void
3331 -------------------------------------------------------------------------*/
3332void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003333#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303334/* ---------------------------------------------------------------------------
3335 \fn sme_IsPmcBmps
3336 \brief API to Check if PMC state is BMPS.
3337
3338 \- return v_BOOL_t
3339 -------------------------------------------------------------------------*/
3340v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3341
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003342eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003343
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303344/* ---------------------------------------------------------------------------
3345 \fn sme_UpdateDFSRoamMode
3346 \brief Update DFS roam scan mode
3347 This function is called to configure allowDFSChannelRoam
3348 dynamically
3349 \param hHal - HAL handle for device
3350 \param allowDFSChannelRoam - DFS roaming scan mode
3351 mode 0 disable roam scan on DFS channels
3352 mode 1 enables roam scan (passive/active) on DFS channels
3353 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3354 successfully.
3355 Other status means SME failed to update DFS roaming scan config.
3356 \sa
3357 -------------------------------------------------------------------------*/
3358eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3359
3360/* ---------------------------------------------------------------------------
3361 \fn sme_UpdateDFSScanMode
3362 \brief Update DFS scan mode
3363 This function is called to configure fEnableDFSChnlScan.
3364 \param hHal - HAL handle for device
3365 \param dfsScanMode - DFS scan mode
3366 mode 0 disable scan on DFS channels
3367 mode 1 enables passive scan on DFS channels
3368 mode 2 enables active scan on DFS channels for static list
3369 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3370 successfully.
3371 Other status means SME failed to update DFS scan config.
3372 \sa
3373 -------------------------------------------------------------------------*/
3374eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3375
3376/*--------------------------------------------------------------------------
3377 \brief sme_GetDFSScanMode() - get DFS scan mode
3378 \param hHal - The handle returned by macOpen.
3379 \return DFS scan mode
3380 mode 0 disable scan on DFS channels
3381 mode 1 enables passive scan on DFS channels
3382 mode 2 enables active scan on DFS channels for static list
3383 \sa
3384 --------------------------------------------------------------------------*/
3385v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3386
3387/* ---------------------------------------------------------------------------
3388 \fn sme_HandleDFSChanScan
3389 \brief Gets Valid channel list and updates scan control list according to
3390 dfsScanMode
3391 \param hHal - HAL handle for device
3392 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3393 Otherwise eHAL_STATUS_SUCCESS -
3394 \sa
3395 -------------------------------------------------------------------------*/
3396eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3397
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003398/*
3399 * SME API to enable/disable WLAN driver initiated SSR
3400 */
3401void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3402
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303403/* ---------------------------------------------------------------------------
3404
3405 \fn sme_SetPhyMode
3406
3407 \brief Changes the PhyMode.
3408
3409 \param hHal - The handle returned by macOpen.
3410
3411 \param phyMode new phyMode which is to set
3412
3413 \return eHalStatus SUCCESS.
3414
3415 -------------------------------------------------------------------------------*/
3416eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3417
3418/* ---------------------------------------------------------------------------
3419
3420 \fn sme_GetPhyMode
3421
3422 \brief gets current PhyMode.
3423
3424 \param hHal - The handle returned by macOpen.
3425
3426 \return eHalStatus PhyMode
3427
3428 -------------------------------------------------------------------------------*/
3429eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3430
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003431/*
3432 * SME API to determine the channel bonding mode
3433 */
3434VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3435
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003436#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3437/*--------------------------------------------------------------------------
3438 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3439 from CSR.
3440 This is a synchronous call
3441 \param hHal - The handle returned by macOpen
3442 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3443 BSSID, channel etc.)
3444 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3445 Other status means SME is failed to send the request.
3446 \sa
3447 --------------------------------------------------------------------------*/
3448
3449eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3450#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003451/*--------------------------------------------------------------------------
3452 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3453 is any connected session .
3454 This is a synchronous call
3455 \param hHal - The handle returned by macOpen
3456 \return VOS_STATUS - SME passed the request to CSR successfully.
3457 Other status means SME is failed to send the request.
3458 \sa
3459 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003460VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003461
Agarwal Ashish57e84372014-12-05 18:26:53 +05303462/*--------------------------------------------------------------------------
3463 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3464 is any connected session .
3465 This is a synchronous call
3466 \param hHal - The handle returned by macOpen
3467 \return VOS_STATUS - SME passed the request to CSR successfully.
3468 Other status means SME is failed to send the request.
3469 \sa
3470 --------------------------------------------------------------------------*/
3471VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3472
Leo Chang9056f462013-08-01 19:21:11 -07003473#ifdef FEATURE_WLAN_LPHB
3474/* ---------------------------------------------------------------------------
3475 \fn sme_LPHBConfigReq
3476 \API to make configuration LPHB within FW.
3477 \param hHal - The handle returned by macOpen
3478 \param lphdReq - LPHB request argument by client
3479 \param pCallbackfn - LPHB timeout notification callback function pointer
3480 \- return Configuration message posting status, SUCCESS or Fail
3481 -------------------------------------------------------------------------*/
3482eHalStatus sme_LPHBConfigReq(
3483 tHalHandle hHal,
3484 tSirLPHBReq *lphdReq,
3485 void (*pCallbackfn)(void *pAdapter, void *indParam));
3486#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003487
3488/* ---------------------------------------------------------------------------
3489 \fn sme_AddPeriodicTxPtrn
3490 \brief API to Periodic TX Pattern Offload feature
3491 \param hHal - The handle returned by macOpen
3492 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3493 \return eHalStatus
3494 ---------------------------------------------------------------------------*/
3495eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3496 *addPeriodicTxPtrnParams);
3497
3498/* ---------------------------------------------------------------------------
3499 \fn sme_DelPeriodicTxPtrn
3500 \brief API to Periodic TX Pattern Offload feature
3501 \param hHal - The handle returned by macOpen
3502 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3503 \return eHalStatus
3504 ---------------------------------------------------------------------------*/
3505eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3506 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003507/*--------------------------------------------------------------------------
3508 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3509 scan parameter.
3510 This is a synchronous call
3511 \param hHal - The handle returned by macOpen
3512 \return None.
3513 \sa
3514 --------------------------------------------------------------------------*/
3515void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3516 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303517
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003518/* ---------------------------------------------------------------------------
3519 \fn sme_SendRateUpdateInd
3520 \brief API to Update rate
3521 \param hHal - The handle returned by macOpen
3522 \param rateUpdateParams - Pointer to rate update params
3523 \return eHalStatus
3524 ---------------------------------------------------------------------------*/
3525eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3526
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303527/*
3528 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3529 * triggers
3530 * return status
3531*/
3532eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3533 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303534 tSmeFastRoamTrigger fastRoamTrig,
3535 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303536
3537eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303538#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3539 const tANI_U8 *pBSSId,
3540#else
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303541 tANI_U8 *pBSSId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303542#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303543 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003544
3545void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303546
3547#ifdef FEATURE_WLAN_BATCH_SCAN
3548/* ---------------------------------------------------------------------------
3549 \fn sme_SetBatchScanReq
3550 \brief API to set batch scan request in FW
3551 \param hHal - The handle returned by macOpen.
3552 \param pRequest - Pointer to the batch request.
3553 \param sessionId - session ID
3554 \param callbackRoutine - HDD callback which needs to be invoked after
3555 getting set batch scan response from FW
3556 \param callbackContext - pAdapter context
3557 \return eHalStatus
3558 ---------------------------------------------------------------------------*/
3559eHalStatus
3560sme_SetBatchScanReq
3561(
3562 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3563 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3564 void *callbackContext
3565);
3566
3567/* ---------------------------------------------------------------------------
3568 \fn sme_TriggerBatchScanResultInd
3569 \brief API to trigger batch scan result indications from from FW
3570 \param hHal - The handle returned by macOpen.
3571 \param pRequest - Pointer to get batch request.
3572 \param sessionId - session ID
3573 \param callbackRoutine - HDD callback which needs to be invoked after
3574 getting get batch scan response from FW
3575 \param callbackContext - pAdapter context
3576 \return eHalStatus
3577 ---------------------------------------------------------------------------*/
3578eHalStatus
3579sme_TriggerBatchScanResultInd
3580(
3581 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3582 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3583 void *callbackContext
3584);
3585
3586/* ---------------------------------------------------------------------------
3587 \fn sme_StopBatchScanInd
3588 \brief API to stop batch scan request in FW
3589 \param hHal - The handle returned by macOpen.
3590 \param pRequest - Pointer to stop batch indication
3591 \return eHalStatus
3592 ---------------------------------------------------------------------------*/
3593eHalStatus
3594sme_StopBatchScanInd
3595(
3596 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3597);
3598
3599#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003600
3601#ifdef FEATURE_WLAN_CH_AVOID
3602/* ---------------------------------------------------------------------------
3603 \fn sme_AddChAvoidCallback
3604 \brief Used to plug in callback function
3605 Which notify channel may not be used with SAP or P2PGO mode.
3606 Notification come from FW.
3607 \param hHal
3608 \param pCallbackfn : callback function pointer should be plugged in
3609 \- return eHalStatus
3610 -------------------------------------------------------------------------*/
3611eHalStatus sme_AddChAvoidCallback
3612(
3613 tHalHandle hHal,
3614 void (*pCallbackfn)(void *pAdapter, void *indParam)
3615);
3616#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003617eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303618
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303619/* ---------------------------------------------------------------------------
3620 \fn sme_requestTypetoString
3621 \brief API to convert requestType enum values
3622 to string.
3623 ---------------------------------------------------------------------------*/
3624const char * sme_requestTypetoString(const v_U8_t requestType);
3625/* ---------------------------------------------------------------------------
3626 \fn sme_PmcStatetoString
3627 \brief API to convert PmcState enum values
3628 to string.
3629 ---------------------------------------------------------------------------*/
3630const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303631
3632eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3633
Agarwal Ashish5e414792014-06-08 15:25:23 +05303634tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303635
3636// tdlsoffchan
3637VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3638 tANI_U8 sessionId,
3639 tSirMacAddr peerMac,
3640 tANI_S32 tdlsOffCh,
3641 tANI_S32 tdlsOffChBwOffset,
3642 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303643eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3644 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303645void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303646
3647void sme_resetCoexEevent(tHalHandle hHal);
3648
Peng Xu117eab42014-09-25 13:33:27 +05303649tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3650tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303651#ifdef WLAN_FEATURE_AP_HT40_24G
3652void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3653 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303654eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3655 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303656#endif
Peng Xu117eab42014-09-25 13:33:27 +05303657
Agarwal Ashish738843c2014-09-25 12:27:56 +05303658void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3659
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303660/* HDD Callback function */
3661typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3662
3663eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3664 u8 *pCmd,
3665 int length,
3666 pEncryptMsgRSPCb encCB);
3667
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303668/* ---------------------------------------------------------------------------
3669 \fn sme_RegisterBtCoexTDLSCallback
3670 \brief Used to plug in callback function
3671 Which notify btcoex on or off.
3672 Notification come from FW.
3673 \param hHal
3674 \param pCallbackfn : callback function pointer should be plugged in
3675 \- return eHalStatus
3676 -------------------------------------------------------------------------*/
3677eHalStatus sme_RegisterBtCoexTDLSCallback
3678(
3679 tHalHandle hHal,
3680 void (*pCallbackfn)(void *pAdapter, int)
3681);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303682
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303683/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303684 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303685
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303686 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303687
3688 \param hHal - The handle returned by macOpen.
3689
3690 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3691 eANI_BOOLEAN_FALSE otherwise
3692---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303693tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303694
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303695/* ---------------------------------------------------------------------------
3696
3697 \fn sme_IsTdlsOffChannelValid
3698 \brief To check if the channel is valid for currently established domain
3699 This is a synchronous API.
3700
3701 \param hHal - The handle returned by macOpen.
3702 \param channel - channel to verify
3703
3704 \return TRUE/FALSE, TRUE if channel is valid
3705
3706 -------------------------------------------------------------------------------*/
3707tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3708
Mukul Sharma4be88422015-03-09 20:29:07 +05303709/* --------------------------------------------------------------------------
3710
3711 \fn sme_IsCoexScoIndicationSet
3712 \brief To check if the BTC module in fwr has sent the SCO
3713 indication to host or not
3714
3715 \param hHal - The handle returned by macOpen.
3716 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3717
3718 --------------------------------------------------------------------------*/
3719tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3720
Abhishek Singh01c73d12015-03-12 15:13:44 +05303721eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3722 tANI_U32 iniNumBuffAdvert,
3723 tANI_U32 set_value);
3724
Mukul Sharma45063942015-04-01 20:07:59 +05303725void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303726
3727/* ---------------------------------------------------------------------------
3728 \fn sme_SetTdls2040BSSCoexistence
3729 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3730
3731 \param isEnabled - Enable or Disable.
3732 \- return VOS_STATUS_SUCCES
3733 -------------------------------------------------------------------------*/
3734eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3735
Abhishek Singh41988ba2015-05-25 19:42:29 +05303736/* ---------------------------------------------------------------------------
3737 \fn sme_SetRtsCtsHtVht
3738 \brief API to to enable/disable RTS/CTS for different modes.
3739
3740 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3741 \- return VOS_STATUS_SUCCES if INdication is posted to
3742 WDA else return eHAL_STATUS_FAILURE
3743 -------------------------------------------------------------------------*/
3744eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3745
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303746tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
3747 tANI_U8 fcc_constraint);
3748
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303749eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303750eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
3751 tANI_U32 indicator, tANI_U32 reason_code);
3752
Jeff Johnson295189b2012-06-20 16:38:30 -07003753#endif //#if !defined( __SME_API_H )