blob: f1290a2d671d643351bff4ece0907452173e4c63 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Siddharth Bhald8a95e82015-02-12 20:14:52 +05302 * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
Kiet Lam0fb93dd2014-02-19 00:32:59 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Kiet Lam0fb93dd2014-02-19 00:32:59 -080026 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Jeff Johnson295189b2012-06-20 16:38:30 -070031#if !defined( __SME_API_H )
32#define __SME_API_H
33
34
35/**=========================================================================
36
37 \file smeApi.h
38
39 \brief prototype for SME APIs
40
Jeff Johnson295189b2012-06-20 16:38:30 -070041
42 ========================================================================*/
43
44/* $Header$ */
45
46/*--------------------------------------------------------------------------
47 Include Files
48 ------------------------------------------------------------------------*/
49#include "ccmApi.h"
50#include "csrApi.h"
51#include "pmcApi.h"
52#include "vos_mq.h"
53#include "vos_lock.h"
54#include "halTypes.h"
55#include "sirApi.h"
56#include "btcApi.h"
57#include "vos_nvitem.h"
58#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070059
Jeff Johnsone7245742012-09-05 17:12:55 -070060#ifdef FEATURE_OEM_DATA_SUPPORT
61#include "oemDataApi.h"
62#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070063
64#if defined WLAN_FEATURE_VOWIFI
65#include "smeRrmInternal.h"
66#endif
Srinivas Dasari030bad32015-02-18 23:23:54 +053067#include "nan_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070068
69/*--------------------------------------------------------------------------
70 Preprocessor definitions and constants
71 ------------------------------------------------------------------------*/
72
73#define SME_SUMMARY_STATS 1
74#define SME_GLOBAL_CLASSA_STATS 2
75#define SME_GLOBAL_CLASSB_STATS 4
76#define SME_GLOBAL_CLASSC_STATS 8
77#define SME_GLOBAL_CLASSD_STATS 16
78#define SME_PER_STA_STATS 32
79
80#define SME_INVALID_COUNTRY_CODE "XX"
81
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070082//Macro to disable split scan
83#define SME_DISABLE_SPLIT_SCAN 255
Padma, Santhosh Kumar859d3712014-11-13 18:00:41 +053084
85//Macro to indicate invalid no of tspecs
86#define INVALID_TSPEC 100
87
Jeff Johnson295189b2012-06-20 16:38:30 -070088/*--------------------------------------------------------------------------
89 Type declarations
90 ------------------------------------------------------------------------*/
91typedef struct _smeConfigParams
92{
93 tCsrConfigParam csrConfig;
94#if defined WLAN_FEATURE_VOWIFI
95 tRrmConfigParam rrmConfig;
96#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070097#if defined FEATURE_WLAN_LFR
98 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -080099 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700100#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800101#if defined FEATURE_WLAN_ESE
102 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700103#endif
104#if defined WLAN_FEATURE_P2P_INTERNAL
105 tP2PConfigParam p2pConfig;
106#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800107#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700108 tANI_U8 isFastTransitionEnabled;
109 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700110 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700111#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530112 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700113 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800114 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530115 tANI_U32 fDeferIMPSTime;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +0530116 tANI_U8 fBtcEnableIndTimerVal;
Jeff Johnson295189b2012-06-20 16:38:30 -0700117} tSmeConfigParams, *tpSmeConfigParams;
118
Sunil Duttc69bccb2014-05-26 21:30:20 +0530119#ifdef WLAN_FEATURE_LINK_LAYER_STATS
120
121/* ---------------------------------------------------------------------------
122 \fn sme_LLStatsSetReq
123 \brief API to set link layer stats request to FW
124 \param hHal - The handle returned by macOpen.
125
126 \Param pStatsReq - a pointer to a caller allocated object of
127 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
128 stats set.
129
130 \return eHalStatus
131 ---------------------------------------------------------------------------*/
132eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
133
134/* ---------------------------------------------------------------------------
135 \fn sme_LLStatsGetReq
136 \brief API to get link layer stats request to FW
137 \param hHal - The handle returned by macOpen.
138
139 \Param pStatsReq - a pointer to a caller allocated object of
140 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
141 stats get.
142
143 \return eHalStatus
144 ---------------------------------------------------------------------------*/
145eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
146
147/* ---------------------------------------------------------------------------
148 \fn sme_LLStatsClearReq
149 \brief API to clear link layer stats request to FW
150 \param hHal - The handle returned by macOpen.
151
152 \Param pStatsReq - a pointer to a caller allocated object of
153 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
154 stats clear.
155
156 \return eHalStatus
157 ---------------------------------------------------------------------------*/
158eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
159
160/* ---------------------------------------------------------------------------
161 \fn sme_SetLinkLayerStatsIndCB
162 \brief API to trigger Link Layer stats result indications from from FW
163 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530164 \param callbackRoutine - HDD callback which needs to be invoked after
165 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530166 \return eHalStatus
167 ---------------------------------------------------------------------------*/
168eHalStatus
169sme_SetLinkLayerStatsIndCB
170(
Dino Mycled3d50022014-07-07 12:58:25 +0530171 tHalHandle hHal,
172 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
173 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530174);
175
176
177#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
178
Dino Mycle2c198072014-06-10 10:15:52 +0530179#ifdef WLAN_FEATURE_EXTSCAN
180/* ---------------------------------------------------------------------------
181 \fn sme_GetValidChannelsByBand
182 \brief SME API to fetch all valid channel filtered by band
183 \param hHal
184 \param wifiBand: RF band information
185 \param aValidChannels: Array to store channel info
186 \param len: number of channels
187 \- return eHalStatus
188 -------------------------------------------------------------------------*/
189eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
190 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
191
192/* ---------------------------------------------------------------------------
193 \fn sme_EXTScanGetCapabilities
194 \brief SME API to fetch Extented Scan capabilities
195 \param hHal
196 \param pReq: Extented Scan capabilities structure
197 \- return eHalStatus
198 -------------------------------------------------------------------------*/
199eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
200 tSirGetEXTScanCapabilitiesReqParams *pReq);
201
202/* ---------------------------------------------------------------------------
203 \fn sme_EXTScanStart
204 \brief SME API to issue Extented Scan start
205 \param hHal
206 \param pStartCmd: Extented Scan start structure
207 \- return eHalStatus
208 -------------------------------------------------------------------------*/
209eHalStatus sme_EXTScanStart (tHalHandle hHal,
210 tSirEXTScanStartReqParams *pStartCmd);
211
212/* ---------------------------------------------------------------------------
213 \fn sme_EXTScanStop
214 \brief SME API to issue Extented Scan stop
215 \param hHal
216 \param pStopReq: Extented Scan stop structure
217 \- return eHalStatus
218 -------------------------------------------------------------------------*/
219eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
220
221/* ---------------------------------------------------------------------------
222 \fn sme_SetBssHotlist
223 \brief SME API to set BSSID hotlist
224 \param hHal
225 \param pSetHotListReq: Extented Scan set hotlist structure
226 \- return eHalStatus
227 -------------------------------------------------------------------------*/
228eHalStatus sme_SetBssHotlist (tHalHandle hHal,
229 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
230
231/* ---------------------------------------------------------------------------
232 \fn sme_ResetBssHotlist
233 \brief SME API to reset BSSID hotlist
234 \param hHal
235 \param pSetHotListReq: Extented Scan set hotlist structure
236 \- return eHalStatus
237 -------------------------------------------------------------------------*/
238eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
239 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
240
241/* ---------------------------------------------------------------------------
242 \fn sme_SetSignificantChange
243 \brief SME API to set significant change
244 \param hHal
245 \param pSetSignificantChangeReq: Extented Scan set significant
246 change structure
247 \- return eHalStatus
248 -------------------------------------------------------------------------*/
249eHalStatus sme_SetSignificantChange (tHalHandle hHal,
250 tSirEXTScanSetSignificantChangeReqParams* pSetSignificantChangeReq);
251
252/* ---------------------------------------------------------------------------
253 \fn sme_ResetSignificantChange
254 \brief SME API to reset significant change
255 \param hHal
256 \param pResetReq: Extented Scan reset significant change structure
257 \- return eHalStatus
258 -------------------------------------------------------------------------*/
259eHalStatus sme_ResetSignificantChange (tHalHandle hHal,
260 tSirEXTScanResetSignificantChangeReqParams *pResetReq);
261
262/* ---------------------------------------------------------------------------
263 \fn sme_getCachedResults
264 \brief SME API to get cached results
265 \param hHal
266 \param pCachedResultsReq: Extented Scan get cached results structure
267 \- return eHalStatus
268 -------------------------------------------------------------------------*/
269eHalStatus sme_getCachedResults (tHalHandle hHal,
270 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
271
272/* ---------------------------------------------------------------------------
273 \fn sme_EXTScanRegisterCallback
274 \brief SME API to register Extented Scan notification callback
275 \param pEXTScanIndCb
276 \- return void
277 -------------------------------------------------------------------------*/
278eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
279 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
280 void *);
281
282#endif /* WLAN_FEATURE_EXTSCAN */
Siddharth Bhald8a95e82015-02-12 20:14:52 +0530283/* ---------------------------------------------------------------------------
284 \fn sme_SpoofMacAddrReq
285 \brief SME API to send Spoof Mac Addr req to HAL
286 \param macaddr: mac address to be sent
287 \- return eHalStatus
288 -------------------------------------------------------------------------*/
289eHalStatus sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530290
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530291typedef enum
292{
293 eSME_ROAM_TRIGGER_NONE = 0,
294 eSME_ROAM_TRIGGER_SCAN = 1,
295 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
296 eSME_ROAM_TRIGGER_MAX
297} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700298
299/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530300 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700301 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700302/*--------------------------------------------------------------------------
303
304 \brief sme_Open() - Initialze all SME modules and put them at idle state
305
306 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
307 successfully return, all modules are at idle state ready to start.
308
309 smeOpen must be called before any other SME APIs can be involved.
310 smeOpen must be called after macOpen.
311
312 \param hHal - The handle returned by macOpen.
313
314 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
315
316 Other status means SME is failed to be initialized
317 \sa
318
319 --------------------------------------------------------------------------*/
320eHalStatus sme_Open(tHalHandle hHal);
321
322/*--------------------------------------------------------------------------
323
324 \brief sme_Close() - Release all SME modules and their resources.
325
326 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
327 return, all modules are at closed state.
328
329 No SME APIs can be involved after sme_Close except sme_Open.
330 sme_Close must be called before macClose.
331
332 \param hHal - The handle returned by macOpen.
333
334 \return eHAL_STATUS_SUCCESS - SME is successfully close.
335
336 Other status means SME is failed to be closed but caller still cannot
337 call any other SME functions except smeOpen.
338 \sa
339
340 --------------------------------------------------------------------------*/
341eHalStatus sme_Close(tHalHandle hHal);
342
343/*--------------------------------------------------------------------------
344
345 \brief sme_Start() - Put all SME modules at ready state.
346
347 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
348 successfully return, all modules are ready to run.
349
350 \param hHal - The handle returned by macOpen.
351
352 \return eHAL_STATUS_SUCCESS - SME is ready.
353
354 Other status means SME is failed to start.
355 \sa
356
357 --------------------------------------------------------------------------*/
358eHalStatus sme_Start(tHalHandle hHal);
359
360/*--------------------------------------------------------------------------
361
362 \brief sme_Stop() - Stop all SME modules and put them at idle state
363
364 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
365 return, all modules are at idle state ready to start.
366
367
368 \param hHal - The handle returned by macOpen.
369
Kiet Lama72a2322013-11-15 11:18:11 +0530370 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700371
372 \return eHAL_STATUS_SUCCESS - SME is stopped.
373
374 Other status means SME is failed to stop but caller should still consider
375 SME is stopped.
376 \sa
377
378 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530379eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700380
381
382/*--------------------------------------------------------------------------
383
384 \brief sme_OpenSession() - Open a session for scan/roam operation.
385
386 This is a synchronous API.
387
388
389 \param hHal - The handle returned by macOpen.
390 \param callback - A pointer to the function caller specifies for roam/connect status indication
391 \param pContext - The context passed with callback
392 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
393 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
394
395 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
396
397 Other status means SME is failed to open the session.
398 eHAL_STATUS_RESOURCES - no more session available.
399 \sa
400
401 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700402eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
403 void *pContext, tANI_U8 *pSelfMacAddr,
404 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700405
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700406/*--------------------------------------------------------------------------
407
408 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
409 \param hHal - The handle returned by macOpen.
410 \param currDeviceMode - Current operating device mode.
411 --------------------------------------------------------------------------*/
412
413void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700414
415/*--------------------------------------------------------------------------
416
417 \brief sme_CloseSession() - Open a session for scan/roam operation.
418
419 This is a synchronous API.
420
421
422 \param hHal - The handle returned by macOpen.
423
424 \param sessionId - A previous opened session's ID.
425
426 \return eHAL_STATUS_SUCCESS - session is closed.
427
428 Other status means SME is failed to open the session.
429 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
430 \sa
431
432 --------------------------------------------------------------------------*/
433eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
434 csrRoamSessionCloseCallback callback, void *pContext);
435
436
437
438/*--------------------------------------------------------------------------
439
440 \brief sme_UpdateConfig() - Change configurations for all SME moduels
441
442 The function updates some configuration for modules in SME, CCM, CSR, etc
443 during SMEs close -> open sequence.
444
445 Modules inside SME apply the new configuration at the next transaction.
446
447
448 \param hHal - The handle returned by macOpen.
449 \Param pSmeConfigParams - a pointer to a caller allocated object of
450 typedef struct _smeConfigParams.
451
452 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
453
454 Other status means SME is failed to update the config parameters.
455 \sa
456
457 --------------------------------------------------------------------------*/
458eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
459
460#ifdef FEATURE_WLAN_SCAN_PNO
461/*--------------------------------------------------------------------------
462
463 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
464
465 It is used at driver start up to inform RIVA of the default channel
466 configuration.
467
468 This is a synchronuous call
469
470 \param hHal - The handle returned by macOpen.
471
472 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
473
474 Other status means SME is failed to update the channel config.
475 \sa
476
477 --------------------------------------------------------------------------*/
478eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
479
480#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700481/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530482
483 \brief sme_UpdateChannelList() - Update channel List in FW.
484
485
486 \param hHal - The handle returned by macOpen.
487
488 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
489
490 Other status means SME is failed to update the channel config.
491 \sa
492
493 --------------------------------------------------------------------------*/
494eHalStatus sme_UpdateChannelList(tHalHandle hHal);
495
496/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700497
498 \brief sme_set11dinfo() - Set the 11d information about valid channels
499 and there power using information from nvRAM
500 This function is called only for AP.
501
502 This is a synchronuous call
503
504 \param hHal - The handle returned by macOpen.
505 \Param pSmeConfigParams - a pointer to a caller allocated object of
506 typedef struct _smeConfigParams.
507
508 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
509
510 Other status means SME is failed to update the config parameters.
511 \sa
512--------------------------------------------------------------------------*/
513
514eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
515
516/*--------------------------------------------------------------------------
517
518 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
519
520 This is a synchronuous call
521
522 \param hHal - The handle returned by HostapdAdapter.
523 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
524
525 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
526
527 Other status means, failed to get the current regulatory domain.
528 \sa
529--------------------------------------------------------------------------*/
530
531eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
532
533eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
534
Jeff Johnson295189b2012-06-20 16:38:30 -0700535
536/* ---------------------------------------------------------------------------
537 \fn sme_ChangeConfigParams
538 \brief The SME API exposed for HDD to provide config params to SME during
539 SMEs stop -> start sequence.
540
541 If HDD changed the domain that will cause a reset. This function will
542 provide the new set of 11d information for the new domain. Currrently this
543 API provides info regarding 11d only at reset but we can extend this for
544 other params (PMC, QoS) which needs to be initialized again at reset.
545
546 This is a synchronuous call
547
548 \param hHal - The handle returned by macOpen.
549
550 \Param
551 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
552 currently provides 11d related information like Country code,
553 Regulatory domain, valid channel list, Tx power per channel, a
554 list with active/passive scan allowed per valid channel.
555
556 \return eHalStatus
557 ---------------------------------------------------------------------------*/
558eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
559 tCsrUpdateConfigParam *pUpdateConfigParam);
560
561/*--------------------------------------------------------------------------
562
563 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
564 is ready tio run.
565
566 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
567 to running state.
568
569
570 \param hHal - The handle returned by macOpen.
571
572 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
573
574 Other status means SME failed to send the message to PE.
575 \sa
576
577 --------------------------------------------------------------------------*/
578eHalStatus sme_HDDReadyInd(tHalHandle hHal);
579
580
581/*--------------------------------------------------------------------------
582
583 \brief sme_ProcessMsg() - The main message processor for SME.
584
585 The function is called by a message dispatcher when to process a message
586 targeted for SME.
587
588
589 \param hHal - The handle returned by macOpen.
590 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
591
592 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
593
594 Other status means SME failed to process the message.
595 \sa
596
597 --------------------------------------------------------------------------*/
598eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
599
600v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
601
602/* ---------------------------------------------------------------------------
603 \fn sme_ScanRequest
604 \brief a wrapper function to Request a 11d or full scan from CSR.
605 \param pScanRequestID - pointer to an object to get back the request ID
606 \param callback - a callback function that scan calls upon finish, will not
607 be called if csrScanRequest returns error
608 \param pContext - a pointer passed in for the callback
609 \return eHalStatus
610 ---------------------------------------------------------------------------*/
611eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
612 tANI_U32 *pScanRequestID,
613 csrScanCompleteCallback callback, void *pContext);
614
615
616/* ---------------------------------------------------------------------------
617 \fn sme_ScanSetBGScanparams
618 \brief a wrapper function to request CSR to set BG scan params in PE
619 \param pScanReq - BG scan request structure
620 \return eHalStatus
621 ---------------------------------------------------------------------------*/
622eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
623
624
625/* ---------------------------------------------------------------------------
626 \fn sme_ScanGetResult
627 \brief a wrapper function to request scan results from CSR.
628 \param pFilter - If pFilter is NULL, all cached results are returned
629 \param phResult - an object for the result.
630 \return eHalStatus
631 ---------------------------------------------------------------------------*/
632eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
633 tScanResultHandle *phResult);
634
635
636/* ---------------------------------------------------------------------------
637 \fn sme_ScanFlushResult
638 \brief a wrapper function to request CSR to clear scan results.
639 \return eHalStatus
640 ---------------------------------------------------------------------------*/
641eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530642
643/*
644 * ---------------------------------------------------------------------------
645 * \fn sme_FilterScanResults
646 * \brief a wrapper function to request CSR to filter the scan results based
647 * on valid chennel list.
648 * \return eHalStatus
649 *---------------------------------------------------------------------------
650 */
651eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
652
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530653/*
654 * ---------------------------------------------------------------------------
655 * \fn sme_FilterScanDFSResults
656 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
657 * from the scan results.
658 * \return eHalStatus
659 *---------------------------------------------------------------------------
660 */
661eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
662
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700663eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700664
665/* ---------------------------------------------------------------------------
666 \fn sme_ScanResultGetFirst
667 \brief a wrapper function to request CSR to returns the first element of
668 scan result.
669 \param hScanResult - returned from csrScanGetResult
670 \return tCsrScanResultInfo * - NULL if no result
671 ---------------------------------------------------------------------------*/
672tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
673 tScanResultHandle hScanResult);
674
675/* ---------------------------------------------------------------------------
676 \fn sme_ScanResultGetNext
677 \brief a wrapper function to request CSR to returns the next element of
678 scan result. It can be called without calling csrScanResultGetFirst
679 first
680 \param hScanResult - returned from csrScanGetResult
681 \return Null if no result or reach the end
682 ---------------------------------------------------------------------------*/
683tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
684 tScanResultHandle hScanResult);
685
686/* ---------------------------------------------------------------------------
687 \fn sme_ScanResultPurge
688 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
689 in the list and free memory for each item
690 \param hScanResult - returned from csrScanGetResult. hScanResult is
691 considered gone by
692 calling this function and even before this function reutrns.
693 \return eHalStatus
694 ---------------------------------------------------------------------------*/
695eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
696
697/* ---------------------------------------------------------------------------
698 \fn sme_ScanGetPMKIDCandidateList
699 \brief a wrapper function to return the PMKID candidate list
700 \param pPmkidList - caller allocated buffer point to an array of
701 tPmkidCandidateInfo
702 \param pNumItems - pointer to a variable that has the number of
703 tPmkidCandidateInfo allocated when retruning, this is
704 either the number needed or number of items put into
705 pPmkidList
706 \return eHalStatus - when fail, it usually means the buffer allocated is not
707 big enough and pNumItems
708 has the number of tPmkidCandidateInfo.
709 \Note: pNumItems is a number of tPmkidCandidateInfo,
710 not sizeof(tPmkidCandidateInfo) * something
711 ---------------------------------------------------------------------------*/
712eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
713 tPmkidCandidateInfo *pPmkidList,
714 tANI_U32 *pNumItems );
715
716
717/*----------------------------------------------------------------------------
718 \fn sme_RoamRegisterLinkQualityIndCallback
719
720 \brief
721 a wrapper function to allow HDD to register a callback handler with CSR for
722 link quality indications.
723
724 Only one callback may be registered at any time.
725 In order to deregister the callback, a NULL cback may be provided.
726
727 Registration happens in the task context of the caller.
728
729 \param callback - Call back being registered
730 \param pContext - user data
731
732 DEPENDENCIES: After CSR open
733
734 \return eHalStatus
735-----------------------------------------------------------------------------*/
736eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
737 csrRoamLinkQualityIndCallback callback,
738 void *pContext);
739
740
741/* ---------------------------------------------------------------------------
742 \fn sme_RoamConnect
743 \brief a wrapper function to request CSR to inititiate an association
744 \param sessionId - the sessionId returned by sme_OpenSession.
745 \param pProfile - can be NULL to join to any open ones
746 \param pRoamId - to get back the request ID
747 \return eHalStatus
748 ---------------------------------------------------------------------------*/
749eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
750 tANI_U32 *pRoamId);
751
752/* ---------------------------------------------------------------------------
753 \fn sme_RoamReassoc
754 \brief a wrapper function to request CSR to inititiate a re-association
755 \param pProfile - can be NULL to join the currently connected AP. In that
756 case modProfileFields should carry the modified field(s) which could trigger
757 reassoc
758 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
759 that might need modification dynamically once STA is up & running and this
760 could trigger a reassoc
761 \param pRoamId - to get back the request ID
762 \return eHalStatus
763 -------------------------------------------------------------------------------*/
764eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
765 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700766 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700767
768/* ---------------------------------------------------------------------------
769 \fn sme_RoamConnectToLastProfile
770 \brief a wrapper function to request CSR to disconnect and reconnect with
771 the same profile
772 \return eHalStatus. It returns fail if currently connected
773 ---------------------------------------------------------------------------*/
774eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
775
776/* ---------------------------------------------------------------------------
777 \fn sme_RoamDisconnect
778 \brief a wrapper function to request CSR to disconnect from a network
779 \param reason -- To indicate the reason for disconnecting. Currently, only
780 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
781 \return eHalStatus
782 ---------------------------------------------------------------------------*/
783eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
784
Jeff Johnson295189b2012-06-20 16:38:30 -0700785/* ---------------------------------------------------------------------------
786 \fn sme_RoamStopBss
787 \brief a wrapper function to request CSR to stop bss
788 \param sessionId - sessionId of SoftAP
789 \return eHalStatus
790 ---------------------------------------------------------------------------*/
791eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
792
793/* ---------------------------------------------------------------------------
794 \fn sme_RoamGetAssociatedStas
795 \brief To probe the list of associated stations from various modules of CORE stack.
796 \This is an asynchronous API.
797 \param sessionId - sessionId of SoftAP
798 \param modId - Module from whom list of associtated stations is to be probed.
799 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
800 \param pUsrContext - Opaque HDD context
801 \param pfnSapEventCallback - Sap event callback in HDD
802 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
803 \return eHalStatus
804 -------------------------------------------------------------------------------*/
805eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
806 VOS_MODULE_ID modId, void *pUsrContext,
807 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
808
809/* ---------------------------------------------------------------------------
810 \fn sme_RoamDisconnectSta
811 \brief To disassociate a station. This is an asynchronous API.
812 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
813 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
814 -------------------------------------------------------------------------------*/
815eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
816
817/* ---------------------------------------------------------------------------
818 \fn sme_RoamDeauthSta
819 \brief To disassociate a station. This is an asynchronous API.
820 \param hHal - Global structure
821 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530822 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700823 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
824 -------------------------------------------------------------------------------*/
825eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530826 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700827
828/* ---------------------------------------------------------------------------
829 \fn sme_RoamTKIPCounterMeasures
830 \brief To start or stop TKIP counter measures. This is an asynchronous API.
831 \param sessionId - sessionId of SoftAP
832 \param bEnable - Flag to start/stop TKIP countermeasures
833 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
834 -------------------------------------------------------------------------------*/
835eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
836
837/* ---------------------------------------------------------------------------
838 \fn sme_RoamGetWpsSessionOverlap
839 \brief To get the WPS PBC session overlap information.
840 \This is an asynchronous API.
841 \param sessionId - sessionId of SoftAP
842 \param pUsrContext - Opaque HDD context
843 \param pfnSapEventCallback - Sap event callback in HDD
844 \return eHalStatus
845 -------------------------------------------------------------------------------*/
846eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
847 void *pUsrContext, void *pfnSapEventCallback,
848 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700849
850/* ---------------------------------------------------------------------------
851 \fn sme_RoamGetConnectState
852 \brief a wrapper function to request CSR to return the current connect state
853 of Roaming
854 \return eHalStatus
855 ---------------------------------------------------------------------------*/
856eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
857
858/* ---------------------------------------------------------------------------
859 \fn sme_RoamGetConnectProfile
860 \brief a wrapper function to request CSR to return the current connect
861 profile. Caller must call csrRoamFreeConnectProfile after it is done
862 and before reuse for another csrRoamGetConnectProfile call.
863 \param pProfile - pointer to a caller allocated structure
864 tCsrRoamConnectedProfile
865 \return eHalStatus. Failure if not connected
866 ---------------------------------------------------------------------------*/
867eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
868 tCsrRoamConnectedProfile *pProfile);
869
870/* ---------------------------------------------------------------------------
871 \fn sme_RoamFreeConnectProfile
872 \brief a wrapper function to request CSR to free and reinitialize the
873 profile returned previously by csrRoamGetConnectProfile.
874 \param pProfile - pointer to a caller allocated structure
875 tCsrRoamConnectedProfile
876 \return eHalStatus.
877 ---------------------------------------------------------------------------*/
878eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
879 tCsrRoamConnectedProfile *pProfile);
880
881/* ---------------------------------------------------------------------------
882 \fn sme_RoamSetPMKIDCache
883 \brief a wrapper function to request CSR to return the PMKID candidate list
884 \param pPMKIDCache - caller allocated buffer point to an array of
885 tPmkidCacheInfo
886 \param numItems - a variable that has the number of tPmkidCacheInfo
887 allocated when retruning, this is either the number needed
888 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530889 \param update_entire_cache - if TRUE, then it overwrites the entire cache
890 with pPMKIDCache, else it updates entry by
891 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700892 \return eHalStatus - when fail, it usually means the buffer allocated is not
893 big enough and pNumItems has the number of
894 tPmkidCacheInfo.
895 \Note: pNumItems is a number of tPmkidCacheInfo,
896 not sizeof(tPmkidCacheInfo) * something
897 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530898eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
899 tPmkidCacheInfo *pPMKIDCache,
900 tANI_U32 numItems,
901 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700902
903/* ---------------------------------------------------------------------------
904 \fn sme_RoamGetSecurityReqIE
905 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
906 passes to PE to JOIN request or START_BSS request
907 This is a synchronuous call.
908 \param sessionId - returned by sme_OpenSession.
909 \param pLen - caller allocated memory that has the length of pBuf as input.
910 Upon returned, *pLen has the needed or IE length in pBuf.
911 \param pBuf - Caller allocated memory that contain the IE field, if any,
912 upon return
913 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
914 \return eHalStatus - when fail, it usually means the buffer allocated is not
915 big enough
916 ---------------------------------------------------------------------------*/
917eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
918 tANI_U8 *pBuf, eCsrSecurityType secType);
919
920/* ---------------------------------------------------------------------------
921 \fn sme_RoamGetSecurityRspIE
922 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
923 the beacon or probe rsp if connected
924 \param sessionId - returned by sme_OpenSession.
925 \param pLen - caller allocated memory that has the length of pBuf as input.
926 Upon returned, *pLen has the needed or IE length in pBuf.
927 \param pBuf - Caller allocated memory that contain the IE field, if any,
928 upon return
929 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
930 \return eHalStatus - when fail, it usually means the buffer allocated is not
931 big enough
932 ---------------------------------------------------------------------------*/
933eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
934 tANI_U8 *pBuf, eCsrSecurityType secType);
935
936
937/* ---------------------------------------------------------------------------
938 \fn sme_RoamGetNumPMKIDCache
939 \brief a wrapper function to request CSR to return number of PMKID cache
940 entries
941 \return tANI_U32 - the number of PMKID cache entries
942 ---------------------------------------------------------------------------*/
943tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
944
945/* ---------------------------------------------------------------------------
946 \fn sme_RoamGetPMKIDCache
947 \brief a wrapper function to request CSR to return PMKID cache from CSR
948 \param pNum - caller allocated memory that has the space of the number of
949 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
950 needed or actually number in tPmkidCacheInfo.
951 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
952 any, upon return
953 \return eHalStatus - when fail, it usually means the buffer allocated is not
954 big enough
955 ---------------------------------------------------------------------------*/
956eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
957 tPmkidCacheInfo *pPmkidCache);
958
959/* ---------------------------------------------------------------------------
960 \fn sme_GetConfigParam
961 \brief a wrapper function that HDD calls to get the global settings
962 currently maintained by CSR.
963 \param pParam - caller allocated memory
964 \return eHalStatus
965 ---------------------------------------------------------------------------*/
966eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
967
968/* ---------------------------------------------------------------------------
969 \fn sme_GetStatistics
970 \brief a wrapper function that client calls to register a callback to get
971 different PHY level statistics from CSR.
972
973 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
974 \param statsMask - The different category/categories of stats requester is looking for
975 The order in which you set the bits in the statsMask for requesting
976 different type of stats is:
977
978 eCsrSummaryStats = bit 0
979 eCsrGlobalClassAStats = bit 1
980 eCsrGlobalClassBStats = bit 2
981 eCsrGlobalClassCStats = bit 3
982 eCsrGlobalClassDStats = bit 4
983 eCsrPerStaStats = bit 5
984
985 \param callback - SME sends back the requested stats using the callback
986 \param periodicity - If requester needs periodic update, 0 means it's an one
987 time request
988 \param cache - If requester is happy with cached stats
989 \param staId - The station ID for which the stats is requested for
990 \param pContext - user context to be passed back along with the callback
991 \return eHalStatus
992 ---------------------------------------------------------------------------*/
993eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
994 tANI_U32 statsMask,
995 tCsrStatsCallback callback,
996 tANI_U32 periodicity, tANI_BOOLEAN cache,
997 tANI_U8 staId, void *pContext);
998
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +0530999/* ---------------------------------------------------------------------------
1000 \fn smeGetTLSTAState
1001 \helper function to get teh TL STA State whenever the function is called.
1002
1003 \param staId - The staID to be passed to the TL
1004 to get the relevant TL STA State
1005 \return the state as tANI_U16
1006 ---------------------------------------------------------------------------*/
1007tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1008
Jeff Johnson295189b2012-06-20 16:38:30 -07001009eHalStatus sme_GetRssi(tHalHandle hHal,
1010 tCsrRssiCallback callback,
1011 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301012
1013/* ---------------------------------------------------------------------------
1014 \fn sme_GetSnr
1015 \brief a wrapper function that client calls to register a callback to get
1016 SNR from FW
1017
1018 \param callback - SME sends back the requested stats using the callback
1019 \param staId - The station ID for which the stats is requested for
1020 \param bssid - The bssid of the connected session
1021 \param pContext - user context to be passed back along with the callback
1022 ---------------------------------------------------------------------------*/
1023eHalStatus sme_GetSnr(tHalHandle hHal,
1024 tCsrSnrCallback callback,
1025 tANI_U8 staId, tCsrBssid bssId,
1026 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001027#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001028eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1029 tCsrRssiCallback callback,
1030 tANI_U8 staId,
1031 tCsrBssid bssId,
1032 void *pContext,
1033 void* pVosContext);
1034#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001035
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001036#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001037/* ---------------------------------------------------------------------------
1038 \fn sme_GetTsmStats
1039 \brief a wrapper function that client calls to register a callback to get TSM Stats
1040
1041 \param callback - SME sends back the requested stats using the callback
1042 \param staId - The station ID for which the stats is requested for
1043 \param pContext - user context to be passed back along with the callback
1044 \param pVosContext - vos context
1045 \return eHalStatus
1046 ---------------------------------------------------------------------------*/
1047eHalStatus sme_GetTsmStats(tHalHandle hHal,
1048 tCsrTsmStatsCallback callback,
1049 tANI_U8 staId, tCsrBssid bssId,
1050 void *pContext, void* pVosContext, tANI_U8 tid);
1051
1052/* ---------------------------------------------------------------------------
1053 \fn sme_SetCCKMIe
1054 \brief function to store the CCKM IE passed from supplicant and use it while packing
1055 reassociation request
1056 \param hHal - HAL handle for device
1057 \param pCckmIe - pointer to CCKM IE data
1058 \param pCckmIeLen - length of the CCKM IE
1059 \- return Success or failure
1060 -------------------------------------------------------------------------*/
1061eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1062
1063
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001064/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001065 \fn sme_SetEseBeaconRequest
1066 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001067 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001068 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001069 \- return Success or failure
1070 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001071eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1072 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001073
1074
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001075#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001076/* ---------------------------------------------------------------------------
1077 \fn sme_CfgSetInt
1078 \brief a wrapper function that HDD calls to set parameters in CFG.
1079 \param cfgId - Configuration Parameter ID (type) for STA.
1080 \param ccmValue - The information related to Configuration Parameter ID
1081 which needs to be saved in CFG
1082 \param callback - To be registered by CSR with CCM. Once the CFG done with
1083 saving the information in the database, it notifies CCM &
1084 then the callback will be invoked to notify.
1085 \param toBeSaved - To save the request for future reference
1086 \return eHalStatus
1087 ---------------------------------------------------------------------------*/
1088eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1089 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1090
1091/* ---------------------------------------------------------------------------
1092 \fn sme_CfgSetStr
1093 \brief a wrapper function that HDD calls to set parameters in CFG.
1094 \param cfgId - Configuration Parameter ID (type) for STA.
1095 \param pStr - Pointer to the byte array which carries the information needs
1096 to be saved in CFG
1097 \param length - Length of the data to be saved
1098 \param callback - To be registered by CSR with CCM. Once the CFG done with
1099 saving the information in the database, it notifies CCM &
1100 then the callback will be invoked to notify.
1101 \param toBeSaved - To save the request for future reference
1102 \return eHalStatus
1103 ---------------------------------------------------------------------------*/
1104eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1105 tANI_U32 length, tCcmCfgSetCallback callback,
1106 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301107/* ---------------------------------------------------------------------------
1108 \fn sme_GetModifyProfileFields
1109 \brief HDD or SME - QOS calls this function to get the current values of
1110 connected profile fields, changing which can cause reassoc.
1111 This function must be called after CFG is downloaded and STA is in connected
1112 state. Also, make sure to call this function to get the current profile
1113 fields before calling the reassoc. So that pModifyProfileFields will have
1114 all the latest values plus the one(s) has been updated as part of reassoc
1115 request.
1116 \param pModifyProfileFields - pointer to the connected profile fields
1117 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001118
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301119 \return eHalStatus
1120 -------------------------------------------------------------------------------*/
1121eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1122 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301123/* ---------------------------------------------------------------------------
1124 \fn sme_HT40StopOBSSScan
1125 \brief HDD or SME - Command to stop the OBSS scan
1126 THis is implemented only for debugging purpose.
1127 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1128 \param sessionId - sessionId
1129 changing which can cause reassoc
1130
1131 \return eHalStatus
1132 -------------------------------------------------------------------------------*/
1133eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001134
1135/*--------------------------------------------------------------------------
1136 \fn sme_SetConfigPowerSave
1137 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1138 For BMPS related configuration, this function also updates the CFG
1139 and sends a message to FW to pick up the new values. Note: Calling
1140 this function only updates the configuration and does not enable
1141 the specified power save mode.
1142 \param hHal - The handle returned by macOpen.
1143 \param psMode - Power Saving mode being modified
1144 \param pConfigParams - a pointer to a caller allocated object of type
1145 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1146 \return eHalStatus
1147 --------------------------------------------------------------------------*/
1148eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1149 void *pConfigParams);
1150
1151/*--------------------------------------------------------------------------
1152 \fn sme_GetConfigPowerSave
1153 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1154 \param hHal - The handle returned by macOpen.
1155 \param psMode - Power Saving mode
1156 \param pConfigParams - a pointer to a caller allocated object of type
1157 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1158 \return eHalStatus
1159 --------------------------------------------------------------------------*/
1160eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1161 void *pConfigParams);
1162
1163/* ---------------------------------------------------------------------------
1164 \fn sme_SignalPowerEvent
1165 \brief Signals to PMC that a power event has occurred. Used for putting
1166 the chip into deep sleep mode.
1167 \param hHal - The handle returned by macOpen.
1168 \param event - the event that has occurred
1169 \return eHalStatus
1170 ---------------------------------------------------------------------------*/
1171extern eHalStatus sme_SignalPowerEvent (
1172 tHalHandle hHal,
1173 tPmcPowerEvent event);
1174
1175/* ---------------------------------------------------------------------------
1176 \fn sme_EnablePowerSave
1177 \brief Enables one of the power saving modes. This API does not cause a
1178 device state change. This is purely a configuration API.
1179 \param hHal - The handle returned by macOpen.
1180 \param psMode - The power saving mode to enable.
1181 \return eHalStatus
1182 ---------------------------------------------------------------------------*/
1183extern eHalStatus sme_EnablePowerSave (
1184 tHalHandle hHal,
1185 tPmcPowerSavingMode psMode);
1186
1187/* ---------------------------------------------------------------------------
1188 \fn sme_DisablePowerSave
1189 \brief Disables one of the power saving modes.Disabling does not imply
1190 that device will be brought out of the current PS mode. This is
1191 purely a configuration API.
1192 \param hHal - The handle returned by macOpen.
1193 \param psMode - The power saving mode to disable.
1194 \return eHalStatus
1195 ---------------------------------------------------------------------------*/
1196extern eHalStatus sme_DisablePowerSave (
1197 tHalHandle hHal,
1198 tPmcPowerSavingMode psMode);
1199
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301200 /* ---------------------------------------------------------------------------
1201 \fn sme_SetHostPowerSave
1202 \brief The BMPS logic is controlled by the User level Apps
1203 \param hHal - The handle returned by macOpen.
1204 \param psMode - The power saving mode to enable.
1205 \return eHalStatus
1206 ---------------------------------------------------------------------------*/
1207extern eHalStatus sme_SetHostPowerSave (
1208 tHalHandle hHal,
1209 v_BOOL_t psMode);
1210
Jeff Johnson295189b2012-06-20 16:38:30 -07001211/* ---------------------------------------------------------------------------
1212 \fn sme_StartAutoBmpsTimer
1213 \brief Starts a timer that periodically polls all the registered
1214 module for entry into Bmps mode. This timer is started only if BMPS is
1215 enabled and whenever the device is in full power.
1216 \param hHal - The handle returned by macOpen.
1217 \return eHalStatus
1218 ---------------------------------------------------------------------------*/
1219extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1220
1221/* ---------------------------------------------------------------------------
1222 \fn sme_StopAutoBmpsTimer
1223 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1224 Stopping the timer does not cause a device state change. Only the timer
1225 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1226 \param hHal - The handle returned by macOpen.
1227 \return eHalStatus
1228 ---------------------------------------------------------------------------*/
1229extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1230
1231/* ---------------------------------------------------------------------------
1232 \fn sme_QueryPowerState
1233 \brief Returns the current power state of the device.
1234 \param hHal - The handle returned by macOpen.
1235 \param pPowerState - pointer to location to return power state
1236 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1237 \return eHalStatus
1238 ---------------------------------------------------------------------------*/
1239extern eHalStatus sme_QueryPowerState (
1240 tHalHandle hHal,
1241 tPmcPowerState *pPowerState,
1242 tPmcSwitchState *pSwWlanSwitchState);
1243
1244/* ---------------------------------------------------------------------------
1245 \fn sme_IsPowerSaveEnabled
1246 \brief Checks if the device is able to enter a particular power save mode
1247 This does not imply that the device is in a particular PS mode
1248 \param hHal - The handle returned by macOpen.
1249 \param psMode - the power saving mode
1250 \return eHalStatus
1251 ---------------------------------------------------------------------------*/
1252extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1253 tHalHandle hHal,
1254 tPmcPowerSavingMode psMode);
1255
1256/* ---------------------------------------------------------------------------
1257 \fn sme_RequestFullPower
1258 \brief Request that the device be brought to full power state.
1259 Note 1: If "fullPowerReason" specificied in this API is set to
1260 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1261 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1262 HDD is requesting full power, we need to undo any previous HDD requests for
1263 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1264 specified anything other than above, the buffered requests for BMPS and WoWL
1265 will not be cleared.
1266 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1267 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1268 request".
1269 Note 3: When the device finally enters Full Power PMC will start a timer
1270 if any of the following holds true:
1271 - Auto BMPS mode is enabled
1272 - Uapsd request is pending
1273 - HDD's request for BMPS is pending
1274 - HDD's request for WoWL is pending
1275 On timer expiry PMC will attempt to put the device in BMPS mode if following
1276 (in addition to those listed above) holds true:
1277 - Polling of all modules through the Power Save Check routine passes
1278 - STA is associated to an access point
1279 \param hHal - The handle returned by macOpen.
1280 \param - callbackRoutine Callback routine invoked in case of success/failure
1281 \param - callbackContext - Cookie to be passed back during callback
1282 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1283 distinguish between BAP and HDD requests
1284 \return eHalStatus - status
1285 eHAL_STATUS_SUCCESS - device brought to full power state
1286 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1287 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1288 ---------------------------------------------------------------------------*/
1289extern eHalStatus sme_RequestFullPower (
1290 tHalHandle hHal,
1291 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1292 void *callbackContext,
1293 tRequestFullPowerReason fullPowerReason);
1294
1295/* ---------------------------------------------------------------------------
1296 \fn sme_RequestBmps
1297 \brief Request that the device be put in BMPS state. Request will be
1298 accepted only if BMPS mode is enabled and power save check routine
1299 passes. Only HDD should invoke this API.
1300 \param hHal - The handle returned by macOpen.
1301 \param - callbackRoutine Callback routine invoked in case of success/failure
1302 \param - callbackContext - Cookie to be passed back during callback
1303 \return eHalStatus
1304 eHAL_STATUS_SUCCESS - device is in BMPS state
1305 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1306 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1307 ---------------------------------------------------------------------------*/
1308extern eHalStatus sme_RequestBmps (
1309 tHalHandle hHal,
1310 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1311 void *callbackContext);
1312
1313/* ---------------------------------------------------------------------------
1314 \fn sme_SetDHCPTillPowerActiveFlag
1315 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1316 entry by PMC
1317 \param hHal - The handle returned by macOpen.
1318 ---------------------------------------------------------------------------*/
1319void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1320
1321
1322/* ---------------------------------------------------------------------------
1323 \fn sme_StartUapsd
1324 \brief Request that the device be put in UAPSD state. If the device is in
1325 Full Power it will be put in BMPS mode first and then into UAPSD
1326 mode.
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 eHAL_STATUS_SUCCESS - device is in UAPSD state
1331 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1332 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1333 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1334 \return eHalStatus
1335 ---------------------------------------------------------------------------*/
1336extern eHalStatus sme_StartUapsd (
1337 tHalHandle hHal,
1338 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1339 void *callbackContext);
1340
1341/* ---------------------------------------------------------------------------
1342 \fn sme_StopUapsd
1343 \brief Request that the device be put out of UAPSD state. Device will be
1344 put in in BMPS state after stop UAPSD completes. Buffered requests for
1345 UAPSD will be cleared after this.
1346 \param hHal - The handle returned by macOpen.
1347 \return eHalStatus
1348 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1349 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1350 ---------------------------------------------------------------------------*/
1351extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1352
1353/* ---------------------------------------------------------------------------
1354 \fn sme_RequestStandby
1355 \brief Request that the device be put in standby. It is HDD's responsibility
1356 to bring the chip to full power and do a discconnect before calling
1357 this API. Request for standby will be rejected if STA is associated
1358 to an AP.
1359 \param hHal - The handle returned by macOpen.
1360 \param - callbackRoutine Callback routine invoked in case of success/failure
1361 \param - callbackContext - Cookie to be passed back during callback
1362 \return eHalStatus
1363 eHAL_STATUS_SUCCESS - device is in Standby mode
1364 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1365 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1366 ---------------------------------------------------------------------------*/
1367extern eHalStatus sme_RequestStandby (
1368 tHalHandle hHal,
1369 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1370 void *callbackContext);
1371
1372/* ---------------------------------------------------------------------------
1373 \fn sme_RegisterPowerSaveCheck
1374 \brief Register a power save check routine that is called whenever
1375 the device is about to enter one of the power save modes.
1376 \param hHal - The handle returned by macOpen.
1377 \param checkRoutine - Power save check routine to be registered
1378 \param callbackContext - Cookie to be passed back during callback
1379 \return eHalStatus
1380 eHAL_STATUS_SUCCESS - successfully registered
1381 eHAL_STATUS_FAILURE - not successfully registered
1382 ---------------------------------------------------------------------------*/
1383extern eHalStatus sme_RegisterPowerSaveCheck (
1384 tHalHandle hHal,
1385 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1386
1387/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301388 \fn sme_Register11dScanDoneCallback
1389 \brief Register a routine of type csrScanCompleteCallback which is
1390 called whenever an 11d scan is done
1391 \param hHal - The handle returned by macOpen.
1392 \param callback - 11d scan complete routine to be registered
1393 \return eHalStatus
1394 ---------------------------------------------------------------------------*/
1395extern eHalStatus sme_Register11dScanDoneCallback (
1396 tHalHandle hHal,
1397 csrScanCompleteCallback);
1398
1399/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001400 \fn sme_DeregisterPowerSaveCheck
1401 \brief Deregister a power save check routine
1402 \param hHal - The handle returned by macOpen.
1403 \param checkRoutine - Power save check routine to be deregistered
1404 \return eHalStatus
1405 eHAL_STATUS_SUCCESS - successfully deregistered
1406 eHAL_STATUS_FAILURE - not successfully deregistered
1407 ---------------------------------------------------------------------------*/
1408extern eHalStatus sme_DeregisterPowerSaveCheck (
1409 tHalHandle hHal,
1410 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1411
1412/* ---------------------------------------------------------------------------
1413 \fn sme_RegisterDeviceStateUpdateInd
1414 \brief Register a callback routine that is called whenever
1415 the device enters a new device state (Full Power, BMPS, UAPSD)
1416 \param hHal - The handle returned by macOpen.
1417 \param callbackRoutine - Callback routine to be registered
1418 \param callbackContext - Cookie to be passed back during callback
1419 \return eHalStatus
1420 eHAL_STATUS_SUCCESS - successfully registered
1421 eHAL_STATUS_FAILURE - not successfully registered
1422 ---------------------------------------------------------------------------*/
1423extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1424 tHalHandle hHal,
1425 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1426 void *callbackContext);
1427
1428/* ---------------------------------------------------------------------------
1429 \fn sme_DeregisterDeviceStateUpdateInd
1430 \brief Deregister a routine that was registered for device state changes
1431 \param hHal - The handle returned by macOpen.
1432 \param callbackRoutine - Callback routine to be deregistered
1433 \return eHalStatus
1434 eHAL_STATUS_SUCCESS - successfully deregistered
1435 eHAL_STATUS_FAILURE - not successfully deregistered
1436 ---------------------------------------------------------------------------*/
1437extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1438 tHalHandle hHal,
1439 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1440
1441/* ---------------------------------------------------------------------------
1442 \fn sme_WowlAddBcastPattern
1443 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1444 do a pattern match on these patterns when Wowl is enabled during BMPS
1445 mode.
1446 \param hHal - The handle returned by macOpen.
1447 \param pattern - Pattern to be added
1448 \return eHalStatus
1449 eHAL_STATUS_FAILURE Cannot add pattern
1450 eHAL_STATUS_SUCCESS Request accepted.
1451 ---------------------------------------------------------------------------*/
1452extern eHalStatus sme_WowlAddBcastPattern (
1453 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001454 tpSirWowlAddBcastPtrn pattern,
1455 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001456
1457/* ---------------------------------------------------------------------------
1458 \fn sme_WowlDelBcastPattern
1459 \brief Delete a pattern that was added for Pattern Byte Matching.
1460 \param hHal - The handle returned by macOpen.
1461 \param pattern - Pattern to be deleted
1462 \return eHalStatus
1463 eHAL_STATUS_FAILURE Cannot delete pattern
1464 eHAL_STATUS_SUCCESS Request accepted.
1465 ---------------------------------------------------------------------------*/
1466extern eHalStatus sme_WowlDelBcastPattern (
1467 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001468 tpSirWowlDelBcastPtrn pattern,
1469 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001470
1471/* ---------------------------------------------------------------------------
1472 \fn sme_EnterWowl
1473 \brief This is the API to request entry into WOWL mode.
1474 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1475 SME will will cache the information that WOWL has been requested and
1476 attempt to put the device in BMPS first. On entry into BMPS, SME will
1477 enter the WOWL mode.
1478 Note 1: After WoWL request is accepted, If module other than HDD requests
1479 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1480 and attempt to put the chip into BMPS+WOWL based on a timer.
1481 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1482 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1483 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1484 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1485 are required. Currently there is no requirement or use case to support UAPSD
1486 and WOWL at the same time.
1487 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1488 Note 5. Request for WoWL is rejected if BMPS is disabled.
1489
1490 \param hHal - The handle returned by macOpen.
1491 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1492 Used for success/failure notification by SME
1493 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1494 at the time of callback.
1495 \param wakeReasonIndCB - Callback routine provided by HDD.
1496 Used for Wake Reason Indication by SME
1497 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1498 at the time of callback.
1499 \return eHalStatus
1500 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1501 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1502 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1503 mode is entered.
1504 ---------------------------------------------------------------------------*/
1505extern eHalStatus sme_EnterWowl (
1506 tHalHandle hHal,
1507 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1508 void *enterWowlCallbackContext,
1509#ifdef WLAN_WAKEUP_EVENTS
1510 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1511 void *wakeReasonIndCBContext,
1512#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001513 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001514
1515/* ---------------------------------------------------------------------------
1516 \fn sme_ExitWowl
1517 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1518 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1519 mode. Any Buffered request for WoWL will be cleared after this API.
1520 \param hHal - The handle returned by macOpen.
1521 \return eHalStatus
1522 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1523 only if the previous "Enter WOWL" transaction has
1524 not even completed.
1525 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1526 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301527extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001528
1529/* ---------------------------------------------------------------------------
1530
1531 \fn sme_RoamSetKey
1532
1533 \brief To set encryption key. This function should be called only when connected
1534 This is an asynchronous API.
1535
1536 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1537
1538 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1539
1540 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1541
1542 FAILURE or RESOURCES The API finished and failed.
1543
1544 -------------------------------------------------------------------------------*/
1545eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1546
1547/* ---------------------------------------------------------------------------
1548
1549 \fn sme_RoamRemoveKey
1550
1551 \brief To set encryption key. This is an asynchronous API.
1552
1553 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1554
1555 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1556
1557 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1558
1559 FAILURE or RESOURCES The API finished and failed.
1560
1561 -------------------------------------------------------------------------------*/
1562eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1563
1564
1565/* ---------------------------------------------------------------------------
1566
1567 \fn sme_GetCountryCode
1568
1569 \brief To return the current country code. If no country code is applied, default country code is
1570 used to fill the buffer.
1571 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1572 This is a synchronous API.
1573
1574 \param pBuf - pointer to a caller allocated buffer for returned country code.
1575
1576 \param pbLen For input, this parameter indicates how big is the buffer.
1577 Upon return, this parameter has the number of bytes for country. If pBuf
1578 doesn't have enough space, this function returns
1579 fail status and this parameter contains the number that is needed.
1580
1581 \return eHalStatus SUCCESS.
1582
1583 FAILURE or RESOURCES The API finished and failed.
1584
1585 -------------------------------------------------------------------------------*/
1586eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1587
1588/* ---------------------------------------------------------------------------
1589
1590 \fn sme_SetCountryCode
1591
1592 \brief To change the current/default country code.
1593 If 11d supported is turned off, an error is return.
1594 This is a synchronous API.
1595
1596 \param pCountry - pointer to a caller allocated buffer for the country code.
1597
1598 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1599 whether a reset is required.
1600
1601 \return eHalStatus SUCCESS.
1602
1603 FAILURE or RESOURCES The API finished and failed.
1604
1605 -------------------------------------------------------------------------------*/
1606eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1607
1608/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301609
1610 \fn sme_InitChannels
1611
1612 \brief Used to initialize CSR channel lists while driver loading
1613
1614 \param hHal - global pMac structure
1615
1616 \return eHalStatus SUCCESS.
1617
1618 FAILURE or RESOURCES The API finished and failed.
1619
1620 -------------------------------------------------------------------------------*/
1621eHalStatus sme_InitChannels(tHalHandle hHal);
1622
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301623
Mihir Shete04206452014-11-20 17:50:58 +05301624#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301625/* ---------------------------------------------------------------------------
1626 \fn sme_InitChannelsForCC
1627
1628 \brief Used to issue regulatory hint to user
1629
1630 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301631 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301632
1633 \return eHalStatus SUCCESS.
1634
1635 FAILURE or RESOURCES The API finished and failed.
1636
1637 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301638eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301639#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301640
Mihir Shetee1093ba2014-01-21 20:13:32 +05301641/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001642 \fn sme_ResetCountryCodeInformation
1643 \brief this function is to reset the country code current being used back to EEPROM default
1644 this includes channel list and power setting. This is a synchronous API.
1645 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1646 a restart is needed to apply the change
1647 \return eHalStatus
1648 -------------------------------------------------------------------------------*/
1649eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1650
1651/* ---------------------------------------------------------------------------
1652 \fn sme_GetSupportedCountryCode
1653 \brief this function is to get a list of the country code current being supported
1654 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1655 this has the country code list. 3 bytes for each country code. This may be NULL if
1656 caller wants to know the needed byte count.
1657 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1658 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1659 \return eHalStatus
1660 -------------------------------------------------------------------------------*/
1661eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1662
1663/* ---------------------------------------------------------------------------
1664 \fn sme_GetCurrentRegulatoryDomain
1665 \brief this function is to get the current regulatory domain. This is a synchronous API.
1666 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1667 SME. The function fails if 11d support is turned off.
1668 \param pDomain - Caller allocated buffer to return the current domain.
1669 \return eHalStatus SUCCESS.
1670
1671 FAILURE or RESOURCES The API finished and failed.
1672 -------------------------------------------------------------------------------*/
1673eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1674
1675/* ---------------------------------------------------------------------------
1676 \fn sme_SetRegulatoryDomain
1677 \brief this function is to set the current regulatory domain.
1678 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1679 SME. This is a synchronous API.
1680 \param domainId - indicate the domain (defined in the driver) needs to set to.
1681 See v_REGDOMAIN_t for definition
1682 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1683 a restart is needed to apply the change
1684 \return eHalStatus
1685 -------------------------------------------------------------------------------*/
1686eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1687
1688/* ---------------------------------------------------------------------------
1689
1690 \fn sme_GetRegulatoryDomainForCountry
1691
1692 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1693
1694 \param pCountry - pointer to a caller allocated buffer for input country code.
1695
1696 \param pDomainId Upon successful return, it is the domain that country belongs to.
1697 If it is NULL, returning success means that the country code is known.
1698
1699 \return eHalStatus SUCCESS.
1700
1701 FAILURE or RESOURCES The API finished and failed.
1702
1703 -------------------------------------------------------------------------------*/
1704eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1705
1706
1707
1708/* ---------------------------------------------------------------------------
1709
1710 \fn sme_GetSupportedRegulatoryDomains
1711
1712 \brief To return a list of supported regulatory domains. This is a synchronous API.
1713
1714 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1715
1716 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1717 Upon return, this parameter has the number for supported domains. If pDomains
1718 doesn't have enough space for all the supported domains, this function returns
1719 fail status and this parameter contains the number that is needed.
1720
1721 \return eHalStatus SUCCESS.
1722
1723 FAILURE or RESOURCES The API finished and failed.
1724
1725 -------------------------------------------------------------------------------*/
1726eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1727
1728//some support functions
1729tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1730tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1731tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1732//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1733eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1734
1735typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1736/* ---------------------------------------------------------------------------
1737
1738 \fn sme_ChangeCountryCode
1739
1740 \brief Change Country code from upperlayer during WLAN driver operation.
1741 This is a synchronous API.
1742
1743 \param hHal - The handle returned by macOpen.
1744
1745 \param pCountry New Country Code String
1746
Abhishek Singha306a442013-11-07 18:39:01 +05301747 \param sendRegHint If we want to send reg hint to nl80211
1748
Jeff Johnson295189b2012-06-20 16:38:30 -07001749 \return eHalStatus SUCCESS.
1750
1751 FAILURE or RESOURCES The API finished and failed.
1752
1753 -------------------------------------------------------------------------------*/
1754eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1755 tSmeChangeCountryCallback callback,
1756 tANI_U8 *pCountry,
1757 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301758 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301759 tAniBool countryFromUserSpace,
1760 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001761
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301762/* ---------------------------------------------------------------------------
1763
Amar Singhal0d15bd52013-10-12 23:13:13 -07001764 \fn sme_GenericChangeCountryCode
1765
1766 \brief Generic API to change country code
1767
1768 \param hHal - The handle returned by macOpen.
1769
1770 \param pCountry New Country Code String
1771
1772 \param reg_domain Regulatory domain for the new country code
1773
1774 \return eHalStatus SUCCESS.
1775
1776 FAILURE or RESOURCES The API finished and failed.
1777
1778 -------------------------------------------------------------------------------*/
1779eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1780 tANI_U8 *pCountry,
1781 v_REGDOMAIN_t reg_domain);
1782
1783/* ---------------------------------------------------------------------------
1784
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301785 \fn sme_DHCPStartInd
1786
1787 \brief Indicate FW about DHCP start event.
1788
1789 \param hHal - The handle returned by macOpen.
1790
1791 \param device_mode the mode of the device
1792
c_hpothu0b0cab72014-02-13 21:52:40 +05301793 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301794
1795 \return eHalStatus SUCCESS.
1796
1797 FAILURE or RESOURCES The API finished and failed.
1798
1799 -------------------------------------------------------------------------------*/
1800
1801eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1802 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301803 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301804
1805/* ---------------------------------------------------------------------------
1806
1807 \fn sme_DHCPStopInd
1808
1809 \brief Indicate FW about DHCP stop event.
1810
1811 \param hHal - The handle returned by macOpen.
1812
1813 \param device_mode the mode of the device
1814
c_hpothu0b0cab72014-02-13 21:52:40 +05301815 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301816
1817 \return eHalStatus SUCCESS.
1818
1819 FAILURE or RESOURCES The API finished and failed.
1820
1821 -------------------------------------------------------------------------------*/
1822eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1823 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301824 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301825
Jeff Johnson295189b2012-06-20 16:38:30 -07001826
1827/* ---------------------------------------------------------------------------
1828 \fn sme_BtcSignalBtEvent
1829 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1830 BT event type and the current operating mode of Libra (full power,
1831 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1832 would be employed.
1833 \param hHal - The handle returned by macOpen.
1834 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1835 Caller owns the memory and is responsible for freeing it.
1836 \return VOS_STATUS
1837 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1838 if driver has not yet been initialized or if BTC
1839 Events Layer has been disabled.
1840 VOS_STATUS_SUCCESS BT Event passed to HAL
1841 ---------------------------------------------------------------------------*/
1842VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1843
1844/* ---------------------------------------------------------------------------
1845 \fn sme_BtcSetConfig
1846 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1847 This function should be invoked only after CFG download has completed.
1848 Calling it after sme_HDDReadyInd is recommended.
1849 \param hHal - The handle returned by macOpen.
1850 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1851 tSmeBtcConfig. Caller owns the memory and is responsible
1852 for freeing it.
1853 \return VOS_STATUS
1854 VOS_STATUS_E_FAILURE Config not passed to HAL.
1855 VOS_STATUS_SUCCESS Config passed to HAL
1856 ---------------------------------------------------------------------------*/
1857VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1858
1859/* ---------------------------------------------------------------------------
1860 \fn sme_BtcGetConfig
1861 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1862 \param hHal - The handle returned by macOpen.
1863 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1864 Caller owns the memory and is responsible for freeing it.
1865 \return VOS_STATUS
1866 VOS_STATUS_E_FAILURE - failure
1867 VOS_STATUS_SUCCESS success
1868 ---------------------------------------------------------------------------*/
1869VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1870
1871/* ---------------------------------------------------------------------------
1872 \fn sme_SetCfgPrivacy
1873 \brief API to set configure privacy parameters
1874 \param hHal - The handle returned by macOpen.
1875 \param pProfile - Pointer CSR Roam profile.
1876 \param fPrivacy - This parameter indicates status of privacy
1877
1878 \return void
1879 ---------------------------------------------------------------------------*/
1880void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1881
1882#if defined WLAN_FEATURE_VOWIFI
1883/* ---------------------------------------------------------------------------
1884 \fn sme_NeighborReportRequest
1885 \brief API to request neighbor report.
1886 \param hHal - The handle returned by macOpen.
1887 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1888 tRrmNeighborReq. Caller owns the memory and is responsible
1889 for freeing it.
1890 \return VOS_STATUS
1891 VOS_STATUS_E_FAILURE - failure
1892 VOS_STATUS_SUCCESS success
1893 ---------------------------------------------------------------------------*/
1894VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1895 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1896#endif
1897
1898//The following are debug APIs to support direct read/write register/memory
1899//They are placed in SME because HW cannot be access when in LOW_POWER state
1900//AND not connected. The knowledge and synchronization is done in SME
1901
1902//sme_DbgReadRegister
1903//Caller needs to validate the input values
1904VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1905
1906//sme_DbgWriteRegister
1907//Caller needs to validate the input values
1908VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1909
1910//sme_DbgReadMemory
1911//Caller needs to validate the input values
1912//pBuf caller allocated buffer has the length of nLen
1913VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1914
1915//sme_DbgWriteMemory
1916//Caller needs to validate the input values
1917VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1918
Jeff Johnson295189b2012-06-20 16:38:30 -07001919VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1920 tSirVersionType *pVersion);
1921VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1922 tSirVersionType *pVersion);
1923VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1924 tANI_U8 *pVersion,
1925 tANI_U32 versionBufferSize);
1926VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1927 tANI_U8 *pVersion,
1928 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001929eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1930 csrRoamCompleteCallback callback,
1931 void *pContext);
1932
1933#ifdef FEATURE_WLAN_WAPI
1934/* ---------------------------------------------------------------------------
1935 \fn sme_RoamSetBKIDCache
1936 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1937 candidate list.
1938 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1939 it is opened (by calling halOpen).
1940 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1941 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1942 when retruning, this is the number of items put into pBKIDCache
1943 \return eHalStatus - when fail, it usually means the buffer allocated is not
1944 big enough and pNumItems has the number of tBkidCacheInfo.
1945 ---------------------------------------------------------------------------*/
1946eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1947 tANI_U32 numItems );
1948
1949/* ---------------------------------------------------------------------------
1950 \fn sme_RoamGetBKIDCache
1951 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1952 BKID cache.
1953 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1954 it is opened (by calling halOpen).
1955 \param pNum - caller allocated memory that has the space of the number of
1956 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1957 in SME cache.
1958 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1959 upon return
1960 \return eHalStatus - when fail, it usually means the buffer allocated is not
1961 big enough.
1962 ---------------------------------------------------------------------------*/
1963eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1964 tBkidCacheInfo *pBkidCache);
1965
1966/* ---------------------------------------------------------------------------
1967 \fn sme_RoamGetNumBKIDCache
1968 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1969 number of BKID cache entries.
1970 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1971 it is opened (by calling halOpen).
1972 \return tANI_U32 - the number of BKID cache entries.
1973 ---------------------------------------------------------------------------*/
1974tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1975
1976/* ---------------------------------------------------------------------------
1977 \fn sme_ScanGetBKIDCandidateList
1978 \brief a wrapper function to return the BKID candidate list
1979 \param pBkidList - caller allocated buffer point to an array of
1980 tBkidCandidateInfo
1981 \param pNumItems - pointer to a variable that has the number of
1982 tBkidCandidateInfo allocated when retruning, this is
1983 either the number needed or number of items put into
1984 pPmkidList
1985 \return eHalStatus - when fail, it usually means the buffer allocated is not
1986 big enough and pNumItems
1987 has the number of tBkidCandidateInfo.
1988 \Note: pNumItems is a number of tBkidCandidateInfo,
1989 not sizeof(tBkidCandidateInfo) * something
1990 ---------------------------------------------------------------------------*/
1991eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1992 tBkidCandidateInfo *pBkidList,
1993 tANI_U32 *pNumItems );
1994#endif /* FEATURE_WLAN_WAPI */
1995
Jeff Johnsone7245742012-09-05 17:12:55 -07001996#ifdef FEATURE_OEM_DATA_SUPPORT
1997/********************************************************************************************
1998 Oem data related modifications
1999*********************************************************************************************/
2000/* ---------------------------------------------------------------------------
2001 \fn sme_OemDataReq
2002 \param sessionId - session id of session to be used for oem data req.
2003 \param pOemDataReqID - pointer to an object to get back the request ID
2004 \param callback - a callback function that is called upon finish
2005 \param pContext - a pointer passed in for the callback
2006 \return eHalStatus
2007 ---------------------------------------------------------------------------*/
2008eHalStatus sme_OemDataReq(tHalHandle hHal,
2009 tANI_U8 sessionId,
2010 tOemDataReqConfig *,
2011 tANI_U32 *pOemDataReqID,
2012 oemData_OemDataReqCompleteCallback callback,
2013 void *pContext);
2014
2015/* ---------------------------------------------------------------------------
2016 \fn sme_getOemDataRsp
2017 \param pOemDataRsp - A pointer to the response object
2018 \param pOemDataReqID - pointer to an object to get back the request ID
2019 \return eHalStatus
2020 ---------------------------------------------------------------------------*/
2021eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2022 tOemDataRsp **pOemDataRsp);
2023
2024#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002025
2026
Jeff Johnson295189b2012-06-20 16:38:30 -07002027
2028/* ---------------------------------------------------------------------------
2029
2030 \fn sme_RoamUpdateAPWPSIE
2031
2032 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2033 This is an asynchronous API.
2034
2035 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2036
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002037 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002038
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002039 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002040
2041 -------------------------------------------------------------------------------*/
2042
2043eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2044/* ---------------------------------------------------------------------------
2045
2046 \fn sme_RoamUpdateAPWPARSNIEs
2047
2048 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2049 This is an asynchronous API.
2050
2051 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2052
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002053 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002054
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002055 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002056
2057 -------------------------------------------------------------------------------*/
2058eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2059
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002060/* ---------------------------------------------------------------------------
2061
2062 sme_ChangeMCCBeaconInterval
2063
2064 \brief To update P2P-GO's beacon Interval.
2065
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002066 \return eHalStatus SUCCESS
2067 FAILURE or RESOURCES
2068 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002069 -------------------------------------------------------------------------------*/
2070eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2071
2072
Jeff Johnson295189b2012-06-20 16:38:30 -07002073
2074/* ---------------------------------------------------------------------------
2075 \fn sme_sendBTAmpEvent
2076 \brief API to send the btAMPstate to FW
2077 \param hHal - The handle returned by macOpen.
2078 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002079 \return eHalStatus SUCCESS
2080 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002081
2082--------------------------------------------------------------------------- */
2083
2084eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2085
2086
2087
2088/* ---------------------------------------------------------------------------
2089 \fn sme_SetHostOffload
2090 \brief API to set the host offload feature.
2091 \param hHal - The handle returned by macOpen.
2092 \param pRequest - Pointer to the offload request.
2093 \return eHalStatus
2094 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002095eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2096 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002097
2098/* ---------------------------------------------------------------------------
2099 \fn sme_SetKeepAlive
2100 \brief API to set the Keep Alive feature.
2101 \param hHal - The handle returned by macOpen.
2102 \param pRequest - Pointer to the Keep Alive request.
2103 \return eHalStatus
2104 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002105eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2106 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002107
Jeff Johnson295189b2012-06-20 16:38:30 -07002108/* ----------------------------------------------------------------------------
2109 \fn sme_GetOperationChannel
2110 \brief API to get current channel on which STA is parked
2111 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002112 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002113 \returns eHAL_STATUS_SUCCESS
2114 eHAL_STATUS_FAILURE
2115-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002116eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002117
Jeff Johnson295189b2012-06-20 16:38:30 -07002118/* ---------------------------------------------------------------------------
2119
2120 \fn sme_RegisterMgtFrame
2121
2122 \brief To register managment frame of specified type and subtype.
2123 \param frameType - type of the frame that needs to be passed to HDD.
2124 \param matchData - data which needs to be matched before passing frame
2125 to HDD.
2126 \param matchDataLen - Length of matched data.
2127 \return eHalStatus
2128 -------------------------------------------------------------------------------*/
2129eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2130 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2131
2132/* ---------------------------------------------------------------------------
2133
2134 \fn sme_DeregisterMgtFrame
2135
2136 \brief To De-register managment frame of specified type and subtype.
2137 \param frameType - type of the frame that needs to be passed to HDD.
2138 \param matchData - data which needs to be matched before passing frame
2139 to HDD.
2140 \param matchDataLen - Length of matched data.
2141 \return eHalStatus
2142 -------------------------------------------------------------------------------*/
2143eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2144 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302145/* ---------------------------------------------------------------------------
2146 \fn sme_GetFramesLog
2147 \brief a wrapper function that client calls to register a callback to get
2148 mgmt frames logged
2149 \param callback - SME sends back the context using the callback
2150 \param flag - flag tells to clear OR send the frame log buffer
2151 \param pContext - user context to be passed back along with the callback
2152 \return eHalStatus
2153 ---------------------------------------------------------------------------*/
2154eHalStatus sme_GetFramesLog(tHalHandle hHal,
2155 tGetFrameLogCallback callback,
2156 tANI_U8 flag, void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -07002157/* ---------------------------------------------------------------------------
2158
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302159 \fn sme_InitMgmtFrameLogging
2160
2161 \brief
2162 SME will pass this request to lower mac to initialize Frame Logging.
2163
2164 \param
2165
2166 hHal - The handle returned by macOpen.
2167
2168 wlanMgmtLoggingInitParam - Params to initialize frame logging
2169
2170 \return eHalStatus
2171--------------------------------------------------------------------------- */
2172eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
2173 tpSirMgmtLoggingInitParam wlanMgmtLoggingInitParam);
2174
2175/* ---------------------------------------------------------------------------
2176
Jeff Johnson295189b2012-06-20 16:38:30 -07002177 \fn sme_ConfigureRxpFilter
2178
2179 \brief
2180 SME will pass this request to lower mac to set/reset the filter on RXP for
2181 multicast & broadcast traffic.
2182
2183 \param
2184
2185 hHal - The handle returned by macOpen.
2186
2187 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2188 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2189 on this param. In future we can use this as a mask to set various types of
2190 filters as suggested below:
2191 FILTER_ALL_MULTICAST:
2192 FILTER_ALL_BROADCAST:
2193 FILTER_ALL_MULTICAST_BROADCAST:
2194
2195
2196 \return eHalStatus
2197
2198
2199--------------------------------------------------------------------------- */
2200eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2201 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2202
2203/* ---------------------------------------------------------------------------
2204
2205 \fn sme_ConfigureAppsCpuWakeupState
2206
2207 \brief
2208 SME will pass this request to lower mac to dynamically adjusts the listen
2209 interval based on the WLAN/MSM activity. This feature is named as
2210 Telescopic Beacon wakeup feature.
2211
2212 \param
2213
2214 hHal - The handle returned by macOpen.
2215
2216 isAppsAwake- Depicts the state of the Apps CPU
2217
2218
2219 \return eHalStatus
2220
2221
2222--------------------------------------------------------------------------- */
2223eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2224
Jeff Johnson295189b2012-06-20 16:38:30 -07002225/* ---------------------------------------------------------------------------
2226
2227 \fn sme_ConfigureSuspendInd
2228
2229 \brief
2230 SME will pass this request to lower mac to Indicate that the wlan needs to
2231 be suspended
2232
2233 \param
2234
2235 hHal - The handle returned by macOpen.
2236
2237 wlanSuspendParam- Depicts the wlan suspend params
2238
2239
2240 \return eHalStatus
2241
2242
2243--------------------------------------------------------------------------- */
2244eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2245 tpSirWlanSuspendParam wlanSuspendParam);
2246
2247/* ---------------------------------------------------------------------------
2248
2249 \fn sme_ConfigureResumeReq
2250
2251 \brief
2252 SME will pass this request to lower mac to Indicate that the wlan needs to
2253 be Resumed
2254
2255 \param
2256
2257 hHal - The handle returned by macOpen.
2258
2259 wlanResumeParam- Depicts the wlan resume params
2260
2261
2262 \return eHalStatus
2263
2264
2265--------------------------------------------------------------------------- */
2266eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2267 tpSirWlanResumeParam wlanResumeParam);
2268
Jeff Johnson295189b2012-06-20 16:38:30 -07002269
2270/* ---------------------------------------------------------------------------
2271
2272 \fn sme_GetInfraSessionId
2273
2274 \brief To get the session ID for infra session, if connected
2275 This is a synchronous API.
2276
2277 \param hHal - The handle returned by macOpen.
2278
2279 \return sessionid, -1 if infra session is not connected
2280
2281 -------------------------------------------------------------------------------*/
2282tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2283
2284/* ---------------------------------------------------------------------------
2285
2286 \fn sme_GetInfraOperationChannel
2287
2288 \brief To get the operating channel for infra session, if connected
2289 This is a synchronous API.
2290
2291 \param hHal - The handle returned by macOpen.
2292 \param sessionId - the sessionId returned by sme_OpenSession.
2293
2294 \return operating channel, 0 if infra session is not connected
2295
2296 -------------------------------------------------------------------------------*/
2297tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2298/* ---------------------------------------------------------------------------
2299
2300 \fn sme_GetConcurrentOperationChannel
2301
2302 \brief To get the operating channel for other concurrent sessions, if connected
2303 This is a synchronous API.
2304
2305 \param hHal - The handle returned by macOpen.
2306 \param currentPersona - persona that is trying to come up.
2307
2308 \return operating channel, 0 if infra session is not connected
2309
2310 -------------------------------------------------------------------------------*/
2311tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2312
2313/* ---------------------------------------------------------------------------
2314 \fn sme_AbortMacScan
2315 \brief API to cancel MAC scan.
2316 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302317 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302318 \return tSirAbortScanStatus return status abort scan
2319
Jeff Johnson295189b2012-06-20 16:38:30 -07002320 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302321tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2322 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002323
2324/* ---------------------------------------------------------------------------
2325 \fn sme_GetCfgValidChannels
2326 \brief API to get valid channel list
2327 \param hHal - The handle returned by macOpen.
2328 \param aValidChannels - Pointer to the valid channel list
2329 \param len - valid channel list length
2330 \return eHalStatus
2331 ---------------------------------------------------------------------------*/
2332eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2333
2334#ifdef FEATURE_WLAN_SCAN_PNO
2335
2336/* ---------------------------------------------------------------------------
2337 \fn sme_SetPreferredNetworkList
2338 \brief API to set the Preferred Network List Offload feature.
2339 \param hHal - The handle returned by macOpen.
2340 \param pRequest - Pointer to the offload request.
2341 \return eHalStatus
2342 ---------------------------------------------------------------------------*/
2343eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2344
2345/* ---------------------------------------------------------------------------
2346 \fn sme_SetRSSIFilter
2347 \brief API to set RSSI Filter feature.
2348 \param hHal - The handle returned by macOpen.
2349 \param pRequest - Pointer to the offload request.
2350 \return eHalStatus
2351 ---------------------------------------------------------------------------*/
2352eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2353
2354/******************************************************************************
2355*
2356* Name: sme_PreferredNetworkFoundInd
2357*
2358* Description:
2359* Invoke Preferred Network Found Indication
2360*
2361* Parameters:
2362* hHal - HAL handle for device
2363* pMsg - found network description
2364*
2365* Returns: eHalStatus
2366*
2367******************************************************************************/
2368eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2369#endif // FEATURE_WLAN_SCAN_PNO
2370
2371/* ---------------------------------------------------------------------------
2372 \fn sme_SetPowerParams
2373 \brief API to set Power Parameters
2374 \param hHal - The handle returned by macOpen.
2375 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002376 \param forced - if true, not to be dropped silently in host, it must reach
2377 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2378 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002379 \return eHalStatus
2380 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002381eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002382
2383/* ---------------------------------------------------------------------------
2384 \fn sme_SetTxPerTracking
2385 \brief Set Tx PER tracking configuration parameters
2386 \param hHal - The handle returned by macOpen.
2387 \param pTxPerTrackingParam - Tx PER configuration parameters
2388 \return eHalStatus
2389 ---------------------------------------------------------------------------*/
2390eHalStatus sme_SetTxPerTracking (
2391 tHalHandle hHal,
2392 void (*pCallbackfn) (void *pCallbackContext),
2393 void *pCallbackContext,
2394 tpSirTxPerTrackingParam pTxPerTrackingParam);
2395
2396#ifdef WLAN_FEATURE_PACKET_FILTERING
2397/* ---------------------------------------------------------------------------
2398 \fn sme_ReceiveFilterSetFilter
2399 \brief API to set 8023 Multicast Address List
2400 \param hHal - The handle returned by macOpen.
2401 \param pMulticastAddrs - Pointer to the Multicast Address List
2402 \return eHalStatus
2403 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002404eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002405
2406/* ---------------------------------------------------------------------------
2407 \fn sme_ReceiveFilterSetFilter
2408 \brief API to set Receive Packet Filter
2409 \param hHal - The handle returned by macOpen.
2410 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2411 \return eHalStatus
2412 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002413eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2414 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002415
2416/* ---------------------------------------------------------------------------
2417 \fn sme_GetFilterMatchCount
2418 \brief API to get D0 PC Filter Match Count
2419 \param hHal - The handle returned by macOpen
2420 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2421 \param callbackContext - Cookie to be passed back during callback
2422 \return eHalStatus
2423 ---------------------------------------------------------------------------*/
2424eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2425 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002426 void *callbackContext,
2427 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002428
2429/* ---------------------------------------------------------------------------
2430 \fn sme_ReceiveFilterClearFilter
2431 \brief API to clear Receive Packet Filter
2432 \param hHal - The handle returned by macOpen.
2433 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2434 \return eHalStatus
2435 ---------------------------------------------------------------------------*/
2436eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002437 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2438 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002439#endif // WLAN_FEATURE_PACKET_FILTERING
2440/* ---------------------------------------------------------------------------
2441
2442 \fn sme_IsChannelValid
2443 \brief To check if the channel is valid for currently established domain
2444 This is a synchronous API.
2445
2446 \param hHal - The handle returned by macOpen.
2447 \param channel - channel to verify
2448
2449 \return TRUE/FALSE, TRUE if channel is valid
2450
2451 -------------------------------------------------------------------------------*/
2452tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2453
2454/* ---------------------------------------------------------------------------
2455 \fn sme_SetFreqBand
2456 \brief Used to set frequency band.
2457 \param hHal
2458 \eBand band value to be configured
2459 \- return eHalStatus
2460 -------------------------------------------------------------------------*/
2461eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2462
2463/* ---------------------------------------------------------------------------
2464 \fn sme_GetFreqBand
2465 \brief Used to get the current band settings.
2466 \param hHal
2467 \pBand pointer to hold the current band value
2468 \- return eHalStatus
2469 -------------------------------------------------------------------------*/
2470eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2471
2472/* ---------------------------------------------------------------------------
2473
2474 \fn sme_SetTxPerTracking
2475 \brief Set Tx PER tracking configuration parameters
2476 \param hHal - The handle returned by macOpen.
2477 \param pTxPerTrackingParam - Tx PER configuration parameters
2478 \return eHalStatus
2479 ---------------------------------------------------------------------------*/
2480eHalStatus sme_SetTxPerTracking (
2481 tHalHandle hHal,
2482 void (*pCallbackfn) (void *pCallbackContext),
2483 void *pCallbackContext,
2484 tpSirTxPerTrackingParam pTxPerTrackingParam);
2485
2486#ifdef WLAN_FEATURE_GTK_OFFLOAD
2487/* ---------------------------------------------------------------------------
2488 \fn sme_SetGTKOffload
2489 \brief API to set GTK offload feature.
2490 \param hHal - The handle returned by macOpen.
2491 \param pRequest - Pointer to the GTK offload request.
2492 \return eHalStatus
2493 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002494eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002495
2496/* ---------------------------------------------------------------------------
2497 \fn sme_GetGTKOffload
2498 \brief API to get GTK offload information.
2499 \param hHal - The handle returned by macOpen.
2500 \param pRequest - Pointer to the GTK offload response.
2501 \return eHalStatus
2502 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002503eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2504 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002505#endif // WLAN_FEATURE_GTK_OFFLOAD
2506
2507#ifdef WLAN_WAKEUP_EVENTS
2508eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2509#endif // WLAN_WAKEUP_EVENTS
2510
2511/* ---------------------------------------------------------------------------
2512 \fn sme_SetTxPerTracking
2513 \brief Set Tx PER tracking configuration parameters
2514 \param hHal - The handle returned by macOpen.
2515 \param pTxPerTrackingParam - Tx PER configuration parameters
2516 \return eHalStatus
2517 ---------------------------------------------------------------------------*/
2518eHalStatus sme_SetTxPerTracking (
2519 tHalHandle hHal,
2520 void (*pCallbackfn) (void *pCallbackContext),
2521 void *pCallbackContext,
2522 tpSirTxPerTrackingParam pTxPerTrackingParam);
2523
2524
2525//return frequency for a particular channel
2526tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2527
2528tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2529
2530#if defined WLAN_FEATURE_P2P_INTERNAL
2531
2532eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2533
2534/* ---------------------------------------------------------------------------
2535 \fn sme_p2pFlushDeviceList
2536 \brief Remove cached P2P result from scan results
2537 \param hHal - The handle returned by macOpen.
2538 \param HDDSessionId - HDD's sessionId. Currently unused.
2539 \return eHalStatus
2540 ---------------------------------------------------------------------------*/
2541eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2542
2543eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2544 tCsrScanResultFilter *pFilter);
2545
2546#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2547
2548/* ---------------------------------------------------------------------------
2549 \fn sme_SetMaxTxPower
2550 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2551 setting will not persist over reboots
2552 \param hHal
2553 \param pBssid BSSID to set the power cap for
2554 \param pBssid pSelfMacAddress self MAC Address
2555 \param pBssid power to set in dB
2556 \- return eHalStatus
2557 -------------------------------------------------------------------------*/
2558eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2559 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2560
Jeff Johnson295189b2012-06-20 16:38:30 -07002561/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002562 \fn sme_SetMaxTxPowerPerBand
2563 \brief Used to set the Maximum Transmit Power for
2564 specific band dynamically. Note: this setting will not persist over reboots
2565 \param band
2566 \param power to set in dB
2567 \- return eHalStatus
2568 -------------------------------------------------------------------------*/
2569eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2570
2571/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002572
schang86c22c42013-03-13 18:41:24 -07002573 \fn sme_SetTxPower
2574
2575 \brief Set Transmit Power dynamically. Note: this setting will
2576 not persist over reboots.
2577
2578 \param hHal
2579 \param sessionId Target Session ID
2580 \param mW power to set in mW
2581 \- return eHalStatus
2582
2583 -------------------------------------------------------------------------------*/
2584eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2585
2586/* ---------------------------------------------------------------------------
2587
Jeff Johnson295189b2012-06-20 16:38:30 -07002588 \fn sme_HideSSID
2589
2590 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2591 not persist over reboots.
2592
2593 \param hHal
2594 \param sessionId
2595 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2596 \- return eHalStatus
2597
2598 -------------------------------------------------------------------------------*/
2599eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002600
2601/* ---------------------------------------------------------------------------
2602
2603 \fn sme_SetTmLevel
2604 \brief Set Thermal Mitigation Level to RIVA
2605 \param hHal - The handle returned by macOpen.
2606 \param newTMLevel - new Thermal Mitigation Level
2607 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002608 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002609 ---------------------------------------------------------------------------*/
2610eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2611
2612/*---------------------------------------------------------------------------
2613
2614 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2615 Host and FW.
2616
2617 \param hHal - HAL handle for device
2618
2619 \return NONE
2620
2621---------------------------------------------------------------------------*/
2622void sme_featureCapsExchange(tHalHandle hHal);
2623
Jeff Johnsond13512a2012-07-17 11:42:19 -07002624/*---------------------------------------------------------------------------
2625
Yathish9f22e662012-12-10 14:21:35 -08002626 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2627 between in Host.
2628
2629 \param hHal - HAL handle for device
2630
2631 \return NONE
2632
2633---------------------------------------------------------------------------*/
2634void sme_disableFeatureCapablity(tANI_U8 feature_index);
2635
2636/*---------------------------------------------------------------------------
2637
Jeff Johnsond13512a2012-07-17 11:42:19 -07002638 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2639 country code
2640 Host and FW.
2641
2642 \param hHal - HAL handle for device
2643 \param pCountry - pointer to country code
2644
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002645 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002646
2647 ---------------------------------------------------------------------------*/
2648eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2649
2650/*---------------------------------------------------------------------------
2651
2652 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2653 country code.
2654
2655 \param hHal - HAL handle for device
2656 \param pCountry - pointer to country code
2657
2658 \return Success or failure
2659
2660 ---------------------------------------------------------------------------*/
2661eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2662
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002663/* ---------------------------------------------------------------------------
2664 \fn sme_transportDebug
2665 \brief Dynamically monitoring Transport channels
2666 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002667 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002668 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002669 \param toggleStallDetect Enable stall detect feature
2670 This feature will take effect to data performance
2671 Not integrate till fully verification
2672 \- return NONE
2673 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002674void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002675
Kiran4a17ebe2013-01-31 10:43:43 -08002676/* ---------------------------------------------------------------------------
2677 \fn sme_ResetPowerValuesFor5G
2678 \brief Reset the power values for 5G band with NV power values.
2679 \param hHal - HAL handle for device
2680 \- return NONE
2681 -------------------------------------------------------------------------*/
2682void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2683
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002684#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002685/* ---------------------------------------------------------------------------
2686 \fn sme_UpdateRoamPrefer5GHz
2687 \brief enable/disable Roam prefer 5G runtime option
2688 This function is called through dynamic setConfig callback function
2689 to configure the Roam prefer 5G runtime option
2690 \param hHal - HAL handle for device
2691 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2692 \- return Success or failure
2693 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002694eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002695
2696/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002697 \fn sme_setRoamIntraBand
2698 \brief enable/disable Intra band roaming
2699 This function is called through dynamic setConfig callback function
2700 to configure the intra band roaming
2701 \param hHal - HAL handle for device
2702 \param nRoamIntraBand Enable/Disable Intra band roaming
2703 \- return Success or failure
2704 -------------------------------------------------------------------------*/
2705eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2706
2707/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002708 \fn sme_UpdateRoamScanNProbes
2709 \brief function to update roam scan N probes
2710 This function is called through dynamic setConfig callback function
2711 to update roam scan N probes
2712 \param hHal - HAL handle for device
2713 \param nProbes number of probe requests to be sent out
2714 \- return Success or failure
2715 -------------------------------------------------------------------------*/
2716eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2717
2718/* ---------------------------------------------------------------------------
2719 \fn sme_UpdateRoamScanHomeAwayTime
2720 \brief function to update roam scan Home away time
2721 This function is called through dynamic setConfig callback function
2722 to update roam scan home away time
2723 \param hHal - HAL handle for device
2724 \param nRoamScanAwayTime Scan home away time
2725 \- return Success or failure
2726 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002727eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2728 const v_U16_t nRoamScanHomeAwayTime,
2729 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002730
2731/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002732 \fn sme_getRoamIntraBand
2733 \brief get Intra band roaming
2734 \param hHal - HAL handle for device
2735 \- return Success or failure
2736 -------------------------------------------------------------------------*/
2737v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2738
2739/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002740 \fn sme_getRoamScanNProbes
2741 \brief get N Probes
2742 \param hHal - HAL handle for device
2743 \- return Success or failure
2744 -------------------------------------------------------------------------*/
2745v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2746
2747/* ---------------------------------------------------------------------------
2748 \fn sme_getRoamScanHomeAwayTime
2749 \brief get Roam scan home away time
2750 \param hHal - HAL handle for device
2751 \- return Success or failure
2752 -------------------------------------------------------------------------*/
2753v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2754
2755/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002756 \fn sme_UpdateImmediateRoamRssiDiff
2757 \brief Update nImmediateRoamRssiDiff
2758 This function is called through dynamic setConfig callback function
2759 to configure nImmediateRoamRssiDiff
2760 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2761 \param hHal - HAL handle for device
2762 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2763 candidate and current AP.
2764 \- return Success or failure
2765 -------------------------------------------------------------------------*/
2766
2767eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002768
Srinivas Girigowdade697412013-02-14 16:31:48 -08002769/* ---------------------------------------------------------------------------
2770 \fn sme_UpdateRoamRssiDiff
2771 \brief Update RoamRssiDiff
2772 This function is called through dynamic setConfig callback function
2773 to configure RoamRssiDiff
2774 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2775 \param hHal - HAL handle for device
2776 \param RoamRssiDiff - minimum rssi difference between potential
2777 candidate and current AP.
2778 \- return Success or failure
2779 -------------------------------------------------------------------------*/
2780
2781eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2782
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002783/*--------------------------------------------------------------------------
2784 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2785 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2786 isFastTransitionEnabled.
2787 This is a synchronuous call
2788 \param hHal - The handle returned by macOpen.
2789 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2790 Other status means SME is failed to update isFastTransitionEnabled.
2791 \sa
2792 --------------------------------------------------------------------------*/
2793
2794eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2795 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002796
2797/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002798 \fn sme_UpdateWESMode
2799 \brief Update WESMode
2800 This function is called through dynamic setConfig callback function
2801 to configure isWESModeEnabled
2802 \param hHal - HAL handle for device
2803 \param isWESModeEnabled - Enable/Disable WES Mode
2804 \- return Success or failure
2805 -------------------------------------------------------------------------*/
2806eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2807
2808/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002809 \fn sme_SetRoamScanControl
2810 \brief Set roam scan control
2811 This function is called to set roam scan control
2812 if roam scan control is set to 0, roaming scan cache is cleared
2813 any value other than 0 is treated as invalid value
2814 \param hHal - HAL handle for device
2815 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2816 Other status means SME failure to update
2817 -------------------------------------------------------------------------*/
2818eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002819#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002820
2821#ifdef FEATURE_WLAN_LFR
2822/*--------------------------------------------------------------------------
2823 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002824 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002825 isFastRoamIniFeatureEnabled.
2826 This is a synchronuous call
2827 \param hHal - The handle returned by macOpen.
2828 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2829 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2830 \sa
2831 --------------------------------------------------------------------------*/
2832
Srinivas Girigowdade697412013-02-14 16:31:48 -08002833eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002834 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002835
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002836/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302837 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2838 When Supplicant issue enabled / disable fwr based roaming on the basis
2839 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2840
2841 This is a synchronous call
2842 \param hHal - The handle returned by macOpen.
2843 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2844 Other status means SME is failed to (enabled/disabled) offload scan.
2845 \sa
2846 --------------------------------------------------------------------------*/
2847
2848eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2849 const v_BOOL_t isFastRoamEnabled);
2850
2851/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002852 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2853 Enable/disable LFR MAWC support at runtime
2854 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2855 isMAWCIniFeatureEnabled.
2856 This is a synchronous call
2857 \param hHal - The handle returned by macOpen.
2858 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2859 Other status means SME is failed to update MAWCEnabled.
2860 \sa
2861 --------------------------------------------------------------------------*/
2862eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2863 const v_BOOL_t MAWCEnabled);
2864
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002865
2866#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2867/*--------------------------------------------------------------------------
2868 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2869 This is a synchronuous call
2870 \param hHal - The handle returned by macOpen.
2871 \return eHAL_STATUS_SUCCESS
2872 Other status means SME is failed
2873 \sa
2874 --------------------------------------------------------------------------*/
2875
2876eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2877 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2878#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002879#endif /* FEATURE_WLAN_LFR */
2880
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002881#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002882/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002883 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002884 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002885 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002886 This is a synchronuous call
2887 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002888 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2889 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002890 \sa
2891 --------------------------------------------------------------------------*/
2892
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002893eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2894 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002895
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002896#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002897
2898/*--------------------------------------------------------------------------
2899 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2900 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2901 fEnableFwRssiMonitoring.
2902 This is a synchronuous call
2903 \param hHal - The handle returned by macOpen.
2904 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2905 Other status means SME is failed to update
2906 \sa
2907 --------------------------------------------------------------------------*/
2908
2909eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2910 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002911
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002912#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002913/*--------------------------------------------------------------------------
2914 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2915 This is a synchronuous call
2916 \param hHal - The handle returned by macOpen.
2917 \return eHAL_STATUS_SUCCESS - SME update config successful.
2918 Other status means SME is failed to update
2919 \sa
2920 --------------------------------------------------------------------------*/
2921eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2922 v_U8_t neighborLookupRssiThreshold);
2923
2924/*--------------------------------------------------------------------------
2925 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2926 This is a synchronuous call
2927 \param hHal - The handle returned by macOpen.
2928 \return eHAL_STATUS_SUCCESS - SME update config successful.
2929 Other status means SME is failed to update
2930 \sa
2931 --------------------------------------------------------------------------*/
2932eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2933 v_U8_t neighborReassocRssiThreshold);
2934
2935/*--------------------------------------------------------------------------
2936 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2937 This is a synchronuous call
2938 \param hHal - The handle returned by macOpen.
2939 \return eHAL_STATUS_SUCCESS - SME update config successful.
2940 Other status means SME is failed to update
2941 \sa
2942 --------------------------------------------------------------------------*/
2943v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2944
2945/*--------------------------------------------------------------------------
2946 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2947 This is a synchronuous call
2948 \param hHal - The handle returned by macOpen.
2949 \return eHAL_STATUS_SUCCESS - SME update config successful.
2950 Other status means SME is failed to update
2951 \sa
2952 --------------------------------------------------------------------------*/
2953eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2954 v_U16_t neighborScanResultsRefreshPeriod);
2955
2956/*--------------------------------------------------------------------------
2957 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2958 This is a synchronuous call
2959 \param hHal - The handle returned by macOpen.
2960 \return eHAL_STATUS_SUCCESS - SME update config successful.
2961 Other status means SME is failed to update
2962 \sa
2963 --------------------------------------------------------------------------*/
2964v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2965
2966/*--------------------------------------------------------------------------
2967 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2968 This is a synchronuous call
2969 \param hHal - The handle returned by macOpen.
2970 \return eHAL_STATUS_SUCCESS - SME update config successful.
2971 Other status means SME is failed to update
2972 \sa
2973 --------------------------------------------------------------------------*/
2974v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2975
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002976/* ---------------------------------------------------------------------------
2977 \fn sme_UpdateEmptyScanRefreshPeriod
2978 \brief Update nEmptyScanRefreshPeriod
2979 This function is called through dynamic setConfig callback function
2980 to configure nEmptyScanRefreshPeriod
2981 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2982 \param hHal - HAL handle for device
2983 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2984 \- return Success or failure
2985 -------------------------------------------------------------------------*/
2986eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2987
2988/* ---------------------------------------------------------------------------
2989 \fn sme_setNeighborScanMinChanTime
2990 \brief Update nNeighborScanMinChanTime
2991 This function is called through dynamic setConfig callback function
2992 to configure gNeighborScanChannelMinTime
2993 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2994 \param hHal - HAL handle for device
2995 \param nNeighborScanMinChanTime - Channel minimum dwell time
2996 \- return Success or failure
2997 -------------------------------------------------------------------------*/
2998eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2999
3000/* ---------------------------------------------------------------------------
3001 \fn sme_setNeighborScanMaxChanTime
3002 \brief Update nNeighborScanMaxChanTime
3003 This function is called through dynamic setConfig callback function
3004 to configure gNeighborScanChannelMaxTime
3005 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3006 \param hHal - HAL handle for device
3007 \param nNeighborScanMinChanTime - Channel maximum dwell time
3008 \- return Success or failure
3009 -------------------------------------------------------------------------*/
3010eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3011
3012/* ---------------------------------------------------------------------------
3013 \fn sme_getNeighborScanMinChanTime
3014 \brief get neighbor scan min channel time
3015 \param hHal - The handle returned by macOpen.
3016 \return v_U16_t - channel min time value
3017 -------------------------------------------------------------------------*/
3018v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3019
3020/* ---------------------------------------------------------------------------
3021 \fn sme_getNeighborScanMaxChanTime
3022 \brief get neighbor scan max channel time
3023 \param hHal - The handle returned by macOpen.
3024 \return v_U16_t - channel max time value
3025 -------------------------------------------------------------------------*/
3026v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3027
3028/* ---------------------------------------------------------------------------
3029 \fn sme_setNeighborScanPeriod
3030 \brief Update nNeighborScanPeriod
3031 This function is called through dynamic setConfig callback function
3032 to configure nNeighborScanPeriod
3033 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3034 \param hHal - HAL handle for device
3035 \param nNeighborScanPeriod - neighbor scan period
3036 \- return Success or failure
3037 -------------------------------------------------------------------------*/
3038eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3039
3040/* ---------------------------------------------------------------------------
3041 \fn sme_getNeighborScanPeriod
3042 \brief get neighbor scan period
3043 \param hHal - The handle returned by macOpen.
3044 \return v_U16_t - neighbor scan period
3045 -------------------------------------------------------------------------*/
3046v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3047
3048#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003049
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003050#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003051/*--------------------------------------------------------------------------
3052 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3053 This is a synchronuous call
3054 \param hHal - The handle returned by macOpen.
3055 \return eHAL_STATUS_SUCCESS - SME update config successful.
3056 Other status means SME is failed to update
3057 \sa
3058 --------------------------------------------------------------------------*/
3059v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3060
3061/*--------------------------------------------------------------------------
3062 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3063 This is a synchronuous call
3064 \param hHal - The handle returned by macOpen.
3065 \return eHAL_STATUS_SUCCESS - SME update config successful.
3066 Other status means SME is failed to update
3067 \sa
3068 --------------------------------------------------------------------------*/
3069eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3070 tANI_U8 numChannels);
3071
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003072#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003073/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003074 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003075 This is a synchronuous call
3076 \param hHal - The handle returned by macOpen.
3077 \return eHAL_STATUS_SUCCESS - SME update config successful.
3078 Other status means SME is failed to update
3079 \sa
3080 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003081eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003082 tANI_U8 *pChannelList,
3083 tANI_U8 numChannels);
3084#endif
3085
Srinivas Girigowdade697412013-02-14 16:31:48 -08003086/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003087 \brief sme_getRoamScanChannelList() - get roam scan channel list
3088 This is a synchronuous call
3089 \param hHal - The handle returned by macOpen.
3090 \return eHAL_STATUS_SUCCESS - SME update config successful.
3091 Other status means SME is failed to update
3092 \sa
3093 --------------------------------------------------------------------------*/
3094eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3095 tANI_U8 *pNumChannels);
3096
3097/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003098 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003099 This is a synchronuous call
3100 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003101 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003102 FALSE (0) - if feature is disabled (compile or runtime)
3103 \sa
3104 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003105tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003106
3107/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003108 \brief sme_getWESMode() - getWES Mode
3109 This is a synchronous call
3110 \param hHal - The handle returned by macOpen.
3111 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3112 \sa
3113 --------------------------------------------------------------------------*/
3114v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3115
3116/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003117 \brief sme_GetRoamScanControl() - get scan control
3118 This is a synchronous call
3119 \param hHal - The handle returned by macOpen.
3120 \return v_BOOL_t - Enabled(1)/Disabled(0)
3121 \sa
3122 --------------------------------------------------------------------------*/
3123v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3124
3125/* ---------------------------------------------------------------------------
3126 \fn sme_UpdateEmptyScanRefreshPeriod
3127 \brief Update nnEmptyScanRefreshPeriod
3128 This function is called through dynamic setConfig callback function
3129 to configure nnEmptyScanRefreshPeriod
3130 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3131 \param hHal - HAL handle for device
3132 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3133 \- return Success or failure
3134 -------------------------------------------------------------------------*/
3135
3136/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003137 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3138 This is a synchronuous call
3139 \param hHal - The handle returned by macOpen.
3140 \return TRUE (1) - if the feature is enabled
3141 FALSE (0) - if feature is disabled (compile or runtime)
3142 \sa
3143 --------------------------------------------------------------------------*/
3144tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3145
3146/*--------------------------------------------------------------------------
3147 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3148 This is a synchronuous call
3149 \param hHal - The handle returned by macOpen.
3150 \return TRUE (1) - if the feature is enabled
3151 FALSE (0) - if feature is disabled (compile or runtime)
3152 \sa
3153 --------------------------------------------------------------------------*/
3154tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3155
Srinivas Girigowdade697412013-02-14 16:31:48 -08003156#endif
3157
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003158#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3159/*--------------------------------------------------------------------------
3160 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3161 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3162 gRoamScanOffloadEnabled.
3163 This is a synchronous call
3164 \param hHal - The handle returned by macOpen.
3165 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3166 Other status means SME is failed to update.
3167 \sa
3168 --------------------------------------------------------------------------*/
3169
3170eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3171#endif
3172
3173
Srinivas Girigowdade697412013-02-14 16:31:48 -08003174/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003175 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303176 \brief Check if a feature is enabled by FW
3177
3178 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003179 A value from enum placeHolderInCapBitmap
3180
3181 \- return 1/0 (TRUE/FALSE)
3182 -------------------------------------------------------------------------*/
3183tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303184
3185/* ---------------------------------------------------------------------------
3186 \fn sme_IsFeatureSupportedByDriver
3187 \brief Check if a feature is enabled by driver
3188
3189 \param featEnumValue - Enumeration value of the feature to be checked.
3190 A value from enum placeHolderInCapBitmap
3191
3192 \- return 1/0 (TRUE/FALSE)
3193 -------------------------------------------------------------------------*/
3194tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3195
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003196#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303197
3198/* ---------------------------------------------------------------------------
3199 \fn sme_SendTdlsLinkEstablishParams
3200 \brief API to send TDLS Link Establishment Parameters.
3201
3202 \param peerMac - peer's Mac Adress.
3203 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3204 \- return VOS_STATUS_SUCCES
3205 -------------------------------------------------------------------------*/
3206
3207VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
3208 tANI_U8 sessionId,
3209 tSirMacAddr peerMac,
3210 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
3211
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003212/* ---------------------------------------------------------------------------
3213 \fn sme_SendTdlsMgmtFrame
3214 \brief API to send TDLS management frames.
3215
3216 \param peerMac - peer's Mac Adress.
3217 \param frame_type - Type of TDLS mgmt frame to be sent.
3218 \param dialog - dialog token used in the frame.
3219 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303220 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003221 \param buf - additional IEs to be included
3222 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003223 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003224 \- return VOS_STATUS_SUCCES
3225 -------------------------------------------------------------------------*/
3226VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303227 tANI_U8 frame_type, tANI_U8 dialog, tANI_U16 status, tANI_U32 peerCapability, tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003228/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003229 \fn sme_ChangeTdlsPeerSta
3230 \brief API to Update TDLS peer sta parameters.
3231
3232 \param peerMac - peer's Mac Adress.
3233 \param staParams - Peer Station Parameters.
3234 \- return VOS_STATUS_SUCCES
3235 -------------------------------------------------------------------------*/
3236VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
3237 tCsrStaParams *pstaParams);
3238/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003239 \fn sme_AddTdlsPeerSta
3240 \brief API to Add TDLS peer sta entry.
3241
3242 \param peerMac - peer's Mac Adress.
3243 \- return VOS_STATUS_SUCCES
3244 -------------------------------------------------------------------------*/
3245VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3246/* ---------------------------------------------------------------------------
3247 \fn sme_DeleteTdlsPeerSta
3248 \brief API to Delete TDLS peer sta entry.
3249
3250 \param peerMac - peer's Mac Adress.
3251 \- return VOS_STATUS_SUCCES
3252 -------------------------------------------------------------------------*/
3253VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003254/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003255 \fn sme_SetTdlsPowerSaveProhibited
3256 \API to set/reset the isTdlsPowerSaveProhibited.
3257
3258 \- return void
3259 -------------------------------------------------------------------------*/
3260void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003261#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303262/* ---------------------------------------------------------------------------
3263 \fn sme_IsPmcBmps
3264 \brief API to Check if PMC state is BMPS.
3265
3266 \- return v_BOOL_t
3267 -------------------------------------------------------------------------*/
3268v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3269
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003270eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003271
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303272/* ---------------------------------------------------------------------------
3273 \fn sme_UpdateDFSRoamMode
3274 \brief Update DFS roam scan mode
3275 This function is called to configure allowDFSChannelRoam
3276 dynamically
3277 \param hHal - HAL handle for device
3278 \param allowDFSChannelRoam - DFS roaming scan mode
3279 mode 0 disable roam scan on DFS channels
3280 mode 1 enables roam scan (passive/active) on DFS channels
3281 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3282 successfully.
3283 Other status means SME failed to update DFS roaming scan config.
3284 \sa
3285 -------------------------------------------------------------------------*/
3286eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3287
3288/* ---------------------------------------------------------------------------
3289 \fn sme_UpdateDFSScanMode
3290 \brief Update DFS scan mode
3291 This function is called to configure fEnableDFSChnlScan.
3292 \param hHal - HAL handle for device
3293 \param dfsScanMode - DFS scan mode
3294 mode 0 disable scan on DFS channels
3295 mode 1 enables passive scan on DFS channels
3296 mode 2 enables active scan on DFS channels for static list
3297 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3298 successfully.
3299 Other status means SME failed to update DFS scan config.
3300 \sa
3301 -------------------------------------------------------------------------*/
3302eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3303
3304/*--------------------------------------------------------------------------
3305 \brief sme_GetDFSScanMode() - get DFS scan mode
3306 \param hHal - The handle returned by macOpen.
3307 \return DFS scan mode
3308 mode 0 disable scan on DFS channels
3309 mode 1 enables passive scan on DFS channels
3310 mode 2 enables active scan on DFS channels for static list
3311 \sa
3312 --------------------------------------------------------------------------*/
3313v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3314
3315/* ---------------------------------------------------------------------------
3316 \fn sme_HandleDFSChanScan
3317 \brief Gets Valid channel list and updates scan control list according to
3318 dfsScanMode
3319 \param hHal - HAL handle for device
3320 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3321 Otherwise eHAL_STATUS_SUCCESS -
3322 \sa
3323 -------------------------------------------------------------------------*/
3324eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3325
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003326/*
3327 * SME API to enable/disable WLAN driver initiated SSR
3328 */
3329void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3330
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303331/* ---------------------------------------------------------------------------
3332
3333 \fn sme_SetPhyMode
3334
3335 \brief Changes the PhyMode.
3336
3337 \param hHal - The handle returned by macOpen.
3338
3339 \param phyMode new phyMode which is to set
3340
3341 \return eHalStatus SUCCESS.
3342
3343 -------------------------------------------------------------------------------*/
3344eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3345
3346/* ---------------------------------------------------------------------------
3347
3348 \fn sme_GetPhyMode
3349
3350 \brief gets current PhyMode.
3351
3352 \param hHal - The handle returned by macOpen.
3353
3354 \return eHalStatus PhyMode
3355
3356 -------------------------------------------------------------------------------*/
3357eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3358
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003359/*
3360 * SME API to determine the channel bonding mode
3361 */
3362VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3363
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003364#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3365/*--------------------------------------------------------------------------
3366 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3367 from CSR.
3368 This is a synchronous call
3369 \param hHal - The handle returned by macOpen
3370 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3371 BSSID, channel etc.)
3372 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3373 Other status means SME is failed to send the request.
3374 \sa
3375 --------------------------------------------------------------------------*/
3376
3377eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3378#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003379/*--------------------------------------------------------------------------
3380 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3381 is any connected session .
3382 This is a synchronous call
3383 \param hHal - The handle returned by macOpen
3384 \return VOS_STATUS - SME passed the request to CSR successfully.
3385 Other status means SME is failed to send the request.
3386 \sa
3387 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003388VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003389
Agarwal Ashish57e84372014-12-05 18:26:53 +05303390/*--------------------------------------------------------------------------
3391 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3392 is any connected session .
3393 This is a synchronous call
3394 \param hHal - The handle returned by macOpen
3395 \return VOS_STATUS - SME passed the request to CSR successfully.
3396 Other status means SME is failed to send the request.
3397 \sa
3398 --------------------------------------------------------------------------*/
3399VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3400
Leo Chang9056f462013-08-01 19:21:11 -07003401#ifdef FEATURE_WLAN_LPHB
3402/* ---------------------------------------------------------------------------
3403 \fn sme_LPHBConfigReq
3404 \API to make configuration LPHB within FW.
3405 \param hHal - The handle returned by macOpen
3406 \param lphdReq - LPHB request argument by client
3407 \param pCallbackfn - LPHB timeout notification callback function pointer
3408 \- return Configuration message posting status, SUCCESS or Fail
3409 -------------------------------------------------------------------------*/
3410eHalStatus sme_LPHBConfigReq(
3411 tHalHandle hHal,
3412 tSirLPHBReq *lphdReq,
3413 void (*pCallbackfn)(void *pAdapter, void *indParam));
3414#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003415
3416/* ---------------------------------------------------------------------------
3417 \fn sme_AddPeriodicTxPtrn
3418 \brief API to Periodic TX Pattern Offload feature
3419 \param hHal - The handle returned by macOpen
3420 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3421 \return eHalStatus
3422 ---------------------------------------------------------------------------*/
3423eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3424 *addPeriodicTxPtrnParams);
3425
3426/* ---------------------------------------------------------------------------
3427 \fn sme_DelPeriodicTxPtrn
3428 \brief API to Periodic TX Pattern Offload feature
3429 \param hHal - The handle returned by macOpen
3430 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3431 \return eHalStatus
3432 ---------------------------------------------------------------------------*/
3433eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3434 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003435/*--------------------------------------------------------------------------
3436 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3437 scan parameter.
3438 This is a synchronous call
3439 \param hHal - The handle returned by macOpen
3440 \return None.
3441 \sa
3442 --------------------------------------------------------------------------*/
3443void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3444 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303445
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003446/* ---------------------------------------------------------------------------
3447 \fn sme_SendRateUpdateInd
3448 \brief API to Update rate
3449 \param hHal - The handle returned by macOpen
3450 \param rateUpdateParams - Pointer to rate update params
3451 \return eHalStatus
3452 ---------------------------------------------------------------------------*/
3453eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3454
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303455/*
3456 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3457 * triggers
3458 * return status
3459*/
3460eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3461 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303462 tSmeFastRoamTrigger fastRoamTrig,
3463 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303464
3465eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
3466 tANI_U8 *pBSSId,
3467 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003468
3469void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303470
3471#ifdef FEATURE_WLAN_BATCH_SCAN
3472/* ---------------------------------------------------------------------------
3473 \fn sme_SetBatchScanReq
3474 \brief API to set batch scan request in FW
3475 \param hHal - The handle returned by macOpen.
3476 \param pRequest - Pointer to the batch request.
3477 \param sessionId - session ID
3478 \param callbackRoutine - HDD callback which needs to be invoked after
3479 getting set batch scan response from FW
3480 \param callbackContext - pAdapter context
3481 \return eHalStatus
3482 ---------------------------------------------------------------------------*/
3483eHalStatus
3484sme_SetBatchScanReq
3485(
3486 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3487 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3488 void *callbackContext
3489);
3490
3491/* ---------------------------------------------------------------------------
3492 \fn sme_TriggerBatchScanResultInd
3493 \brief API to trigger batch scan result indications from from FW
3494 \param hHal - The handle returned by macOpen.
3495 \param pRequest - Pointer to get batch request.
3496 \param sessionId - session ID
3497 \param callbackRoutine - HDD callback which needs to be invoked after
3498 getting get batch scan response from FW
3499 \param callbackContext - pAdapter context
3500 \return eHalStatus
3501 ---------------------------------------------------------------------------*/
3502eHalStatus
3503sme_TriggerBatchScanResultInd
3504(
3505 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3506 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3507 void *callbackContext
3508);
3509
3510/* ---------------------------------------------------------------------------
3511 \fn sme_StopBatchScanInd
3512 \brief API to stop batch scan request in FW
3513 \param hHal - The handle returned by macOpen.
3514 \param pRequest - Pointer to stop batch indication
3515 \return eHalStatus
3516 ---------------------------------------------------------------------------*/
3517eHalStatus
3518sme_StopBatchScanInd
3519(
3520 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3521);
3522
3523#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003524
3525#ifdef FEATURE_WLAN_CH_AVOID
3526/* ---------------------------------------------------------------------------
3527 \fn sme_AddChAvoidCallback
3528 \brief Used to plug in callback function
3529 Which notify channel may not be used with SAP or P2PGO mode.
3530 Notification come from FW.
3531 \param hHal
3532 \param pCallbackfn : callback function pointer should be plugged in
3533 \- return eHalStatus
3534 -------------------------------------------------------------------------*/
3535eHalStatus sme_AddChAvoidCallback
3536(
3537 tHalHandle hHal,
3538 void (*pCallbackfn)(void *pAdapter, void *indParam)
3539);
3540#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003541eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303542/* ---------------------------------------------------------------------------
3543 \fn sme_requestTypetoString
3544 \brief API to convert requestType enum values
3545 to string.
3546 ---------------------------------------------------------------------------*/
3547const char * sme_requestTypetoString(const v_U8_t requestType);
3548/* ---------------------------------------------------------------------------
3549 \fn sme_PmcStatetoString
3550 \brief API to convert PmcState enum values
3551 to string.
3552 ---------------------------------------------------------------------------*/
3553const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303554
3555eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3556
Agarwal Ashish5e414792014-06-08 15:25:23 +05303557tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303558
3559// tdlsoffchan
3560VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3561 tANI_U8 sessionId,
3562 tSirMacAddr peerMac,
3563 tANI_S32 tdlsOffCh,
3564 tANI_S32 tdlsOffChBwOffset,
3565 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303566eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3567 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303568void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303569
3570void sme_resetCoexEevent(tHalHandle hHal);
3571
Peng Xu117eab42014-09-25 13:33:27 +05303572tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3573tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303574#ifdef WLAN_FEATURE_AP_HT40_24G
3575void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3576 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303577eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3578 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303579#endif
Peng Xu117eab42014-09-25 13:33:27 +05303580
Agarwal Ashish738843c2014-09-25 12:27:56 +05303581void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3582
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303583/* HDD Callback function */
3584typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3585
3586eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3587 u8 *pCmd,
3588 int length,
3589 pEncryptMsgRSPCb encCB);
3590
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303591/* ---------------------------------------------------------------------------
3592 \fn sme_RegisterBtCoexTDLSCallback
3593 \brief Used to plug in callback function
3594 Which notify btcoex on or off.
3595 Notification come from FW.
3596 \param hHal
3597 \param pCallbackfn : callback function pointer should be plugged in
3598 \- return eHalStatus
3599 -------------------------------------------------------------------------*/
3600eHalStatus sme_RegisterBtCoexTDLSCallback
3601(
3602 tHalHandle hHal,
3603 void (*pCallbackfn)(void *pAdapter, int)
3604);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303605
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303606/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303607 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303608
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303609 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303610
3611 \param hHal - The handle returned by macOpen.
3612
3613 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3614 eANI_BOOLEAN_FALSE otherwise
3615---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303616tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303617
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303618/* ---------------------------------------------------------------------------
3619
3620 \fn sme_IsTdlsOffChannelValid
3621 \brief To check if the channel is valid for currently established domain
3622 This is a synchronous API.
3623
3624 \param hHal - The handle returned by macOpen.
3625 \param channel - channel to verify
3626
3627 \return TRUE/FALSE, TRUE if channel is valid
3628
3629 -------------------------------------------------------------------------------*/
3630tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3631
Mukul Sharma4be88422015-03-09 20:29:07 +05303632/* --------------------------------------------------------------------------
3633
3634 \fn sme_IsCoexScoIndicationSet
3635 \brief To check if the BTC module in fwr has sent the SCO
3636 indication to host or not
3637
3638 \param hHal - The handle returned by macOpen.
3639 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3640
3641 --------------------------------------------------------------------------*/
3642tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3643
Abhishek Singh01c73d12015-03-12 15:13:44 +05303644eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3645 tANI_U32 iniNumBuffAdvert,
3646 tANI_U32 set_value);
3647
Mukul Sharma45063942015-04-01 20:07:59 +05303648void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303649
3650/* ---------------------------------------------------------------------------
3651 \fn sme_SetTdls2040BSSCoexistence
3652 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3653
3654 \param isEnabled - Enable or Disable.
3655 \- return VOS_STATUS_SUCCES
3656 -------------------------------------------------------------------------*/
3657eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3658
Abhishek Singh41988ba2015-05-25 19:42:29 +05303659/* ---------------------------------------------------------------------------
3660 \fn sme_SetRtsCtsHtVht
3661 \brief API to to enable/disable RTS/CTS for different modes.
3662
3663 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3664 \- return VOS_STATUS_SUCCES if INdication is posted to
3665 WDA else return eHAL_STATUS_FAILURE
3666 -------------------------------------------------------------------------*/
3667eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3668
3669
Jeff Johnson295189b2012-06-20 16:38:30 -07003670#endif //#if !defined( __SME_API_H )