blob: 9b8331e27464849af3751dfb0184e7be8fe2c4a3 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam0fb93dd2014-02-19 00:32:59 -08002 * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
3 *
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
67
68/*--------------------------------------------------------------------------
69 Preprocessor definitions and constants
70 ------------------------------------------------------------------------*/
71
72#define SME_SUMMARY_STATS 1
73#define SME_GLOBAL_CLASSA_STATS 2
74#define SME_GLOBAL_CLASSB_STATS 4
75#define SME_GLOBAL_CLASSC_STATS 8
76#define SME_GLOBAL_CLASSD_STATS 16
77#define SME_PER_STA_STATS 32
78
79#define SME_INVALID_COUNTRY_CODE "XX"
80
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070081//Macro to disable split scan
82#define SME_DISABLE_SPLIT_SCAN 255
Padma, Santhosh Kumar859d3712014-11-13 18:00:41 +053083
84//Macro to indicate invalid no of tspecs
85#define INVALID_TSPEC 100
86
Jeff Johnson295189b2012-06-20 16:38:30 -070087/*--------------------------------------------------------------------------
88 Type declarations
89 ------------------------------------------------------------------------*/
90typedef struct _smeConfigParams
91{
92 tCsrConfigParam csrConfig;
93#if defined WLAN_FEATURE_VOWIFI
94 tRrmConfigParam rrmConfig;
95#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070096#if defined FEATURE_WLAN_LFR
97 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -080098 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -070099#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800100#if defined FEATURE_WLAN_ESE
101 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700102#endif
103#if defined WLAN_FEATURE_P2P_INTERNAL
104 tP2PConfigParam p2pConfig;
105#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800106#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700107 tANI_U8 isFastTransitionEnabled;
108 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700109 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700110#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530111 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700112 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800113 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530114 tANI_U32 fDeferIMPSTime;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +0530115 tANI_U8 fBtcEnableIndTimerVal;
Jeff Johnson295189b2012-06-20 16:38:30 -0700116} tSmeConfigParams, *tpSmeConfigParams;
117
Sunil Duttc69bccb2014-05-26 21:30:20 +0530118#ifdef WLAN_FEATURE_LINK_LAYER_STATS
119
120/* ---------------------------------------------------------------------------
121 \fn sme_LLStatsSetReq
122 \brief API to set link layer stats request to FW
123 \param hHal - The handle returned by macOpen.
124
125 \Param pStatsReq - a pointer to a caller allocated object of
126 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
127 stats set.
128
129 \return eHalStatus
130 ---------------------------------------------------------------------------*/
131eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
132
133/* ---------------------------------------------------------------------------
134 \fn sme_LLStatsGetReq
135 \brief API to get link layer stats request to FW
136 \param hHal - The handle returned by macOpen.
137
138 \Param pStatsReq - a pointer to a caller allocated object of
139 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
140 stats get.
141
142 \return eHalStatus
143 ---------------------------------------------------------------------------*/
144eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
145
146/* ---------------------------------------------------------------------------
147 \fn sme_LLStatsClearReq
148 \brief API to clear link layer stats request to FW
149 \param hHal - The handle returned by macOpen.
150
151 \Param pStatsReq - a pointer to a caller allocated object of
152 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
153 stats clear.
154
155 \return eHalStatus
156 ---------------------------------------------------------------------------*/
157eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
158
159/* ---------------------------------------------------------------------------
160 \fn sme_SetLinkLayerStatsIndCB
161 \brief API to trigger Link Layer stats result indications from from FW
162 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530163 \param callbackRoutine - HDD callback which needs to be invoked after
164 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530165 \return eHalStatus
166 ---------------------------------------------------------------------------*/
167eHalStatus
168sme_SetLinkLayerStatsIndCB
169(
Dino Mycled3d50022014-07-07 12:58:25 +0530170 tHalHandle hHal,
171 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
172 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530173);
174
175
176#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
177
Dino Mycle2c198072014-06-10 10:15:52 +0530178#ifdef WLAN_FEATURE_EXTSCAN
179/* ---------------------------------------------------------------------------
180 \fn sme_GetValidChannelsByBand
181 \brief SME API to fetch all valid channel filtered by band
182 \param hHal
183 \param wifiBand: RF band information
184 \param aValidChannels: Array to store channel info
185 \param len: number of channels
186 \- return eHalStatus
187 -------------------------------------------------------------------------*/
188eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
189 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
190
191/* ---------------------------------------------------------------------------
192 \fn sme_EXTScanGetCapabilities
193 \brief SME API to fetch Extented Scan capabilities
194 \param hHal
195 \param pReq: Extented Scan capabilities structure
196 \- return eHalStatus
197 -------------------------------------------------------------------------*/
198eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
199 tSirGetEXTScanCapabilitiesReqParams *pReq);
200
201/* ---------------------------------------------------------------------------
202 \fn sme_EXTScanStart
203 \brief SME API to issue Extented Scan start
204 \param hHal
205 \param pStartCmd: Extented Scan start structure
206 \- return eHalStatus
207 -------------------------------------------------------------------------*/
208eHalStatus sme_EXTScanStart (tHalHandle hHal,
209 tSirEXTScanStartReqParams *pStartCmd);
210
211/* ---------------------------------------------------------------------------
212 \fn sme_EXTScanStop
213 \brief SME API to issue Extented Scan stop
214 \param hHal
215 \param pStopReq: Extented Scan stop structure
216 \- return eHalStatus
217 -------------------------------------------------------------------------*/
218eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
219
220/* ---------------------------------------------------------------------------
221 \fn sme_SetBssHotlist
222 \brief SME API to set BSSID hotlist
223 \param hHal
224 \param pSetHotListReq: Extented Scan set hotlist structure
225 \- return eHalStatus
226 -------------------------------------------------------------------------*/
227eHalStatus sme_SetBssHotlist (tHalHandle hHal,
228 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
229
230/* ---------------------------------------------------------------------------
231 \fn sme_ResetBssHotlist
232 \brief SME API to reset BSSID hotlist
233 \param hHal
234 \param pSetHotListReq: Extented Scan set hotlist structure
235 \- return eHalStatus
236 -------------------------------------------------------------------------*/
237eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
238 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
239
240/* ---------------------------------------------------------------------------
241 \fn sme_SetSignificantChange
242 \brief SME API to set significant change
243 \param hHal
244 \param pSetSignificantChangeReq: Extented Scan set significant
245 change structure
246 \- return eHalStatus
247 -------------------------------------------------------------------------*/
248eHalStatus sme_SetSignificantChange (tHalHandle hHal,
249 tSirEXTScanSetSignificantChangeReqParams* pSetSignificantChangeReq);
250
251/* ---------------------------------------------------------------------------
252 \fn sme_ResetSignificantChange
253 \brief SME API to reset significant change
254 \param hHal
255 \param pResetReq: Extented Scan reset significant change structure
256 \- return eHalStatus
257 -------------------------------------------------------------------------*/
258eHalStatus sme_ResetSignificantChange (tHalHandle hHal,
259 tSirEXTScanResetSignificantChangeReqParams *pResetReq);
260
261/* ---------------------------------------------------------------------------
262 \fn sme_getCachedResults
263 \brief SME API to get cached results
264 \param hHal
265 \param pCachedResultsReq: Extented Scan get cached results structure
266 \- return eHalStatus
267 -------------------------------------------------------------------------*/
268eHalStatus sme_getCachedResults (tHalHandle hHal,
269 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
270
271/* ---------------------------------------------------------------------------
272 \fn sme_EXTScanRegisterCallback
273 \brief SME API to register Extented Scan notification callback
274 \param pEXTScanIndCb
275 \- return void
276 -------------------------------------------------------------------------*/
277eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
278 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
279 void *);
280
281#endif /* WLAN_FEATURE_EXTSCAN */
Siddharth Bhal6af5d4e2014-09-29 21:11:16 +0530282tANI_BOOLEAN sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530283
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530284typedef enum
285{
286 eSME_ROAM_TRIGGER_NONE = 0,
287 eSME_ROAM_TRIGGER_SCAN = 1,
288 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
289 eSME_ROAM_TRIGGER_MAX
290} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700291
292/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530293 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700294 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700295/*--------------------------------------------------------------------------
296
297 \brief sme_Open() - Initialze all SME modules and put them at idle state
298
299 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
300 successfully return, all modules are at idle state ready to start.
301
302 smeOpen must be called before any other SME APIs can be involved.
303 smeOpen must be called after macOpen.
304
305 \param hHal - The handle returned by macOpen.
306
307 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
308
309 Other status means SME is failed to be initialized
310 \sa
311
312 --------------------------------------------------------------------------*/
313eHalStatus sme_Open(tHalHandle hHal);
314
315/*--------------------------------------------------------------------------
316
317 \brief sme_Close() - Release all SME modules and their resources.
318
319 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
320 return, all modules are at closed state.
321
322 No SME APIs can be involved after sme_Close except sme_Open.
323 sme_Close must be called before macClose.
324
325 \param hHal - The handle returned by macOpen.
326
327 \return eHAL_STATUS_SUCCESS - SME is successfully close.
328
329 Other status means SME is failed to be closed but caller still cannot
330 call any other SME functions except smeOpen.
331 \sa
332
333 --------------------------------------------------------------------------*/
334eHalStatus sme_Close(tHalHandle hHal);
335
336/*--------------------------------------------------------------------------
337
338 \brief sme_Start() - Put all SME modules at ready state.
339
340 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
341 successfully return, all modules are ready to run.
342
343 \param hHal - The handle returned by macOpen.
344
345 \return eHAL_STATUS_SUCCESS - SME is ready.
346
347 Other status means SME is failed to start.
348 \sa
349
350 --------------------------------------------------------------------------*/
351eHalStatus sme_Start(tHalHandle hHal);
352
353/*--------------------------------------------------------------------------
354
355 \brief sme_Stop() - Stop all SME modules and put them at idle state
356
357 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
358 return, all modules are at idle state ready to start.
359
360
361 \param hHal - The handle returned by macOpen.
362
Kiet Lama72a2322013-11-15 11:18:11 +0530363 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700364
365 \return eHAL_STATUS_SUCCESS - SME is stopped.
366
367 Other status means SME is failed to stop but caller should still consider
368 SME is stopped.
369 \sa
370
371 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530372eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700373
374
375/*--------------------------------------------------------------------------
376
377 \brief sme_OpenSession() - Open a session for scan/roam operation.
378
379 This is a synchronous API.
380
381
382 \param hHal - The handle returned by macOpen.
383 \param callback - A pointer to the function caller specifies for roam/connect status indication
384 \param pContext - The context passed with callback
385 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
386 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
387
388 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
389
390 Other status means SME is failed to open the session.
391 eHAL_STATUS_RESOURCES - no more session available.
392 \sa
393
394 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700395eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
396 void *pContext, tANI_U8 *pSelfMacAddr,
397 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700398
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700399/*--------------------------------------------------------------------------
400
401 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
402 \param hHal - The handle returned by macOpen.
403 \param currDeviceMode - Current operating device mode.
404 --------------------------------------------------------------------------*/
405
406void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700407
408/*--------------------------------------------------------------------------
409
410 \brief sme_CloseSession() - Open a session for scan/roam operation.
411
412 This is a synchronous API.
413
414
415 \param hHal - The handle returned by macOpen.
416
417 \param sessionId - A previous opened session's ID.
418
419 \return eHAL_STATUS_SUCCESS - session is closed.
420
421 Other status means SME is failed to open the session.
422 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
423 \sa
424
425 --------------------------------------------------------------------------*/
426eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
427 csrRoamSessionCloseCallback callback, void *pContext);
428
429
430
431/*--------------------------------------------------------------------------
432
433 \brief sme_UpdateConfig() - Change configurations for all SME moduels
434
435 The function updates some configuration for modules in SME, CCM, CSR, etc
436 during SMEs close -> open sequence.
437
438 Modules inside SME apply the new configuration at the next transaction.
439
440
441 \param hHal - The handle returned by macOpen.
442 \Param pSmeConfigParams - a pointer to a caller allocated object of
443 typedef struct _smeConfigParams.
444
445 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
446
447 Other status means SME is failed to update the config parameters.
448 \sa
449
450 --------------------------------------------------------------------------*/
451eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
452
453#ifdef FEATURE_WLAN_SCAN_PNO
454/*--------------------------------------------------------------------------
455
456 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
457
458 It is used at driver start up to inform RIVA of the default channel
459 configuration.
460
461 This is a synchronuous call
462
463 \param hHal - The handle returned by macOpen.
464
465 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
466
467 Other status means SME is failed to update the channel config.
468 \sa
469
470 --------------------------------------------------------------------------*/
471eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
472
473#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700474/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530475
476 \brief sme_UpdateChannelList() - Update channel List in FW.
477
478
479 \param hHal - The handle returned by macOpen.
480
481 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
482
483 Other status means SME is failed to update the channel config.
484 \sa
485
486 --------------------------------------------------------------------------*/
487eHalStatus sme_UpdateChannelList(tHalHandle hHal);
488
489/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700490
491 \brief sme_set11dinfo() - Set the 11d information about valid channels
492 and there power using information from nvRAM
493 This function is called only for AP.
494
495 This is a synchronuous call
496
497 \param hHal - The handle returned by macOpen.
498 \Param pSmeConfigParams - a pointer to a caller allocated object of
499 typedef struct _smeConfigParams.
500
501 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
502
503 Other status means SME is failed to update the config parameters.
504 \sa
505--------------------------------------------------------------------------*/
506
507eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
508
509/*--------------------------------------------------------------------------
510
511 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
512
513 This is a synchronuous call
514
515 \param hHal - The handle returned by HostapdAdapter.
516 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
517
518 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
519
520 Other status means, failed to get the current regulatory domain.
521 \sa
522--------------------------------------------------------------------------*/
523
524eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
525
526eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
527
Jeff Johnson295189b2012-06-20 16:38:30 -0700528
529/* ---------------------------------------------------------------------------
530 \fn sme_ChangeConfigParams
531 \brief The SME API exposed for HDD to provide config params to SME during
532 SMEs stop -> start sequence.
533
534 If HDD changed the domain that will cause a reset. This function will
535 provide the new set of 11d information for the new domain. Currrently this
536 API provides info regarding 11d only at reset but we can extend this for
537 other params (PMC, QoS) which needs to be initialized again at reset.
538
539 This is a synchronuous call
540
541 \param hHal - The handle returned by macOpen.
542
543 \Param
544 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
545 currently provides 11d related information like Country code,
546 Regulatory domain, valid channel list, Tx power per channel, a
547 list with active/passive scan allowed per valid channel.
548
549 \return eHalStatus
550 ---------------------------------------------------------------------------*/
551eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
552 tCsrUpdateConfigParam *pUpdateConfigParam);
553
554/*--------------------------------------------------------------------------
555
556 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
557 is ready tio run.
558
559 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
560 to running state.
561
562
563 \param hHal - The handle returned by macOpen.
564
565 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
566
567 Other status means SME failed to send the message to PE.
568 \sa
569
570 --------------------------------------------------------------------------*/
571eHalStatus sme_HDDReadyInd(tHalHandle hHal);
572
573
574/*--------------------------------------------------------------------------
575
576 \brief sme_ProcessMsg() - The main message processor for SME.
577
578 The function is called by a message dispatcher when to process a message
579 targeted for SME.
580
581
582 \param hHal - The handle returned by macOpen.
583 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
584
585 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
586
587 Other status means SME failed to process the message.
588 \sa
589
590 --------------------------------------------------------------------------*/
591eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
592
593v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
594
595/* ---------------------------------------------------------------------------
596 \fn sme_ScanRequest
597 \brief a wrapper function to Request a 11d or full scan from CSR.
598 \param pScanRequestID - pointer to an object to get back the request ID
599 \param callback - a callback function that scan calls upon finish, will not
600 be called if csrScanRequest returns error
601 \param pContext - a pointer passed in for the callback
602 \return eHalStatus
603 ---------------------------------------------------------------------------*/
604eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
605 tANI_U32 *pScanRequestID,
606 csrScanCompleteCallback callback, void *pContext);
607
608
609/* ---------------------------------------------------------------------------
610 \fn sme_ScanSetBGScanparams
611 \brief a wrapper function to request CSR to set BG scan params in PE
612 \param pScanReq - BG scan request structure
613 \return eHalStatus
614 ---------------------------------------------------------------------------*/
615eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
616
617
618/* ---------------------------------------------------------------------------
619 \fn sme_ScanGetResult
620 \brief a wrapper function to request scan results from CSR.
621 \param pFilter - If pFilter is NULL, all cached results are returned
622 \param phResult - an object for the result.
623 \return eHalStatus
624 ---------------------------------------------------------------------------*/
625eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
626 tScanResultHandle *phResult);
627
628
629/* ---------------------------------------------------------------------------
630 \fn sme_ScanFlushResult
631 \brief a wrapper function to request CSR to clear scan results.
632 \return eHalStatus
633 ---------------------------------------------------------------------------*/
634eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530635
636/*
637 * ---------------------------------------------------------------------------
638 * \fn sme_FilterScanResults
639 * \brief a wrapper function to request CSR to filter the scan results based
640 * on valid chennel list.
641 * \return eHalStatus
642 *---------------------------------------------------------------------------
643 */
644eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
645
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700646eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700647
648/* ---------------------------------------------------------------------------
649 \fn sme_ScanResultGetFirst
650 \brief a wrapper function to request CSR to returns the first element of
651 scan result.
652 \param hScanResult - returned from csrScanGetResult
653 \return tCsrScanResultInfo * - NULL if no result
654 ---------------------------------------------------------------------------*/
655tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
656 tScanResultHandle hScanResult);
657
658/* ---------------------------------------------------------------------------
659 \fn sme_ScanResultGetNext
660 \brief a wrapper function to request CSR to returns the next element of
661 scan result. It can be called without calling csrScanResultGetFirst
662 first
663 \param hScanResult - returned from csrScanGetResult
664 \return Null if no result or reach the end
665 ---------------------------------------------------------------------------*/
666tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
667 tScanResultHandle hScanResult);
668
669/* ---------------------------------------------------------------------------
670 \fn sme_ScanResultPurge
671 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
672 in the list and free memory for each item
673 \param hScanResult - returned from csrScanGetResult. hScanResult is
674 considered gone by
675 calling this function and even before this function reutrns.
676 \return eHalStatus
677 ---------------------------------------------------------------------------*/
678eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
679
680/* ---------------------------------------------------------------------------
681 \fn sme_ScanGetPMKIDCandidateList
682 \brief a wrapper function to return the PMKID candidate list
683 \param pPmkidList - caller allocated buffer point to an array of
684 tPmkidCandidateInfo
685 \param pNumItems - pointer to a variable that has the number of
686 tPmkidCandidateInfo allocated when retruning, this is
687 either the number needed or number of items put into
688 pPmkidList
689 \return eHalStatus - when fail, it usually means the buffer allocated is not
690 big enough and pNumItems
691 has the number of tPmkidCandidateInfo.
692 \Note: pNumItems is a number of tPmkidCandidateInfo,
693 not sizeof(tPmkidCandidateInfo) * something
694 ---------------------------------------------------------------------------*/
695eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
696 tPmkidCandidateInfo *pPmkidList,
697 tANI_U32 *pNumItems );
698
699
700/*----------------------------------------------------------------------------
701 \fn sme_RoamRegisterLinkQualityIndCallback
702
703 \brief
704 a wrapper function to allow HDD to register a callback handler with CSR for
705 link quality indications.
706
707 Only one callback may be registered at any time.
708 In order to deregister the callback, a NULL cback may be provided.
709
710 Registration happens in the task context of the caller.
711
712 \param callback - Call back being registered
713 \param pContext - user data
714
715 DEPENDENCIES: After CSR open
716
717 \return eHalStatus
718-----------------------------------------------------------------------------*/
719eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
720 csrRoamLinkQualityIndCallback callback,
721 void *pContext);
722
723
724/* ---------------------------------------------------------------------------
725 \fn sme_RoamConnect
726 \brief a wrapper function to request CSR to inititiate an association
727 \param sessionId - the sessionId returned by sme_OpenSession.
728 \param pProfile - can be NULL to join to any open ones
729 \param pRoamId - to get back the request ID
730 \return eHalStatus
731 ---------------------------------------------------------------------------*/
732eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
733 tANI_U32 *pRoamId);
734
735/* ---------------------------------------------------------------------------
736 \fn sme_RoamReassoc
737 \brief a wrapper function to request CSR to inititiate a re-association
738 \param pProfile - can be NULL to join the currently connected AP. In that
739 case modProfileFields should carry the modified field(s) which could trigger
740 reassoc
741 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
742 that might need modification dynamically once STA is up & running and this
743 could trigger a reassoc
744 \param pRoamId - to get back the request ID
745 \return eHalStatus
746 -------------------------------------------------------------------------------*/
747eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
748 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700749 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700750
751/* ---------------------------------------------------------------------------
752 \fn sme_RoamConnectToLastProfile
753 \brief a wrapper function to request CSR to disconnect and reconnect with
754 the same profile
755 \return eHalStatus. It returns fail if currently connected
756 ---------------------------------------------------------------------------*/
757eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
758
759/* ---------------------------------------------------------------------------
760 \fn sme_RoamDisconnect
761 \brief a wrapper function to request CSR to disconnect from a network
762 \param reason -- To indicate the reason for disconnecting. Currently, only
763 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
764 \return eHalStatus
765 ---------------------------------------------------------------------------*/
766eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
767
Jeff Johnson295189b2012-06-20 16:38:30 -0700768/* ---------------------------------------------------------------------------
769 \fn sme_RoamStopBss
770 \brief a wrapper function to request CSR to stop bss
771 \param sessionId - sessionId of SoftAP
772 \return eHalStatus
773 ---------------------------------------------------------------------------*/
774eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
775
776/* ---------------------------------------------------------------------------
777 \fn sme_RoamGetAssociatedStas
778 \brief To probe the list of associated stations from various modules of CORE stack.
779 \This is an asynchronous API.
780 \param sessionId - sessionId of SoftAP
781 \param modId - Module from whom list of associtated stations is to be probed.
782 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
783 \param pUsrContext - Opaque HDD context
784 \param pfnSapEventCallback - Sap event callback in HDD
785 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
786 \return eHalStatus
787 -------------------------------------------------------------------------------*/
788eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
789 VOS_MODULE_ID modId, void *pUsrContext,
790 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
791
792/* ---------------------------------------------------------------------------
793 \fn sme_RoamDisconnectSta
794 \brief To disassociate a station. This is an asynchronous API.
795 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
796 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
797 -------------------------------------------------------------------------------*/
798eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
799
800/* ---------------------------------------------------------------------------
801 \fn sme_RoamDeauthSta
802 \brief To disassociate a station. This is an asynchronous API.
803 \param hHal - Global structure
804 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530805 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700806 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
807 -------------------------------------------------------------------------------*/
808eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530809 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700810
811/* ---------------------------------------------------------------------------
812 \fn sme_RoamTKIPCounterMeasures
813 \brief To start or stop TKIP counter measures. This is an asynchronous API.
814 \param sessionId - sessionId of SoftAP
815 \param bEnable - Flag to start/stop TKIP countermeasures
816 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
817 -------------------------------------------------------------------------------*/
818eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
819
820/* ---------------------------------------------------------------------------
821 \fn sme_RoamGetWpsSessionOverlap
822 \brief To get the WPS PBC session overlap information.
823 \This is an asynchronous API.
824 \param sessionId - sessionId of SoftAP
825 \param pUsrContext - Opaque HDD context
826 \param pfnSapEventCallback - Sap event callback in HDD
827 \return eHalStatus
828 -------------------------------------------------------------------------------*/
829eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
830 void *pUsrContext, void *pfnSapEventCallback,
831 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700832
833/* ---------------------------------------------------------------------------
834 \fn sme_RoamGetConnectState
835 \brief a wrapper function to request CSR to return the current connect state
836 of Roaming
837 \return eHalStatus
838 ---------------------------------------------------------------------------*/
839eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
840
841/* ---------------------------------------------------------------------------
842 \fn sme_RoamGetConnectProfile
843 \brief a wrapper function to request CSR to return the current connect
844 profile. Caller must call csrRoamFreeConnectProfile after it is done
845 and before reuse for another csrRoamGetConnectProfile call.
846 \param pProfile - pointer to a caller allocated structure
847 tCsrRoamConnectedProfile
848 \return eHalStatus. Failure if not connected
849 ---------------------------------------------------------------------------*/
850eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
851 tCsrRoamConnectedProfile *pProfile);
852
853/* ---------------------------------------------------------------------------
854 \fn sme_RoamFreeConnectProfile
855 \brief a wrapper function to request CSR to free and reinitialize the
856 profile returned previously by csrRoamGetConnectProfile.
857 \param pProfile - pointer to a caller allocated structure
858 tCsrRoamConnectedProfile
859 \return eHalStatus.
860 ---------------------------------------------------------------------------*/
861eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
862 tCsrRoamConnectedProfile *pProfile);
863
864/* ---------------------------------------------------------------------------
865 \fn sme_RoamSetPMKIDCache
866 \brief a wrapper function to request CSR to return the PMKID candidate list
867 \param pPMKIDCache - caller allocated buffer point to an array of
868 tPmkidCacheInfo
869 \param numItems - a variable that has the number of tPmkidCacheInfo
870 allocated when retruning, this is either the number needed
871 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530872 \param update_entire_cache - if TRUE, then it overwrites the entire cache
873 with pPMKIDCache, else it updates entry by
874 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700875 \return eHalStatus - when fail, it usually means the buffer allocated is not
876 big enough and pNumItems has the number of
877 tPmkidCacheInfo.
878 \Note: pNumItems is a number of tPmkidCacheInfo,
879 not sizeof(tPmkidCacheInfo) * something
880 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530881eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
882 tPmkidCacheInfo *pPMKIDCache,
883 tANI_U32 numItems,
884 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700885
886/* ---------------------------------------------------------------------------
887 \fn sme_RoamGetSecurityReqIE
888 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
889 passes to PE to JOIN request or START_BSS request
890 This is a synchronuous call.
891 \param sessionId - returned by sme_OpenSession.
892 \param pLen - caller allocated memory that has the length of pBuf as input.
893 Upon returned, *pLen has the needed or IE length in pBuf.
894 \param pBuf - Caller allocated memory that contain the IE field, if any,
895 upon return
896 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
897 \return eHalStatus - when fail, it usually means the buffer allocated is not
898 big enough
899 ---------------------------------------------------------------------------*/
900eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
901 tANI_U8 *pBuf, eCsrSecurityType secType);
902
903/* ---------------------------------------------------------------------------
904 \fn sme_RoamGetSecurityRspIE
905 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
906 the beacon or probe rsp if connected
907 \param sessionId - returned by sme_OpenSession.
908 \param pLen - caller allocated memory that has the length of pBuf as input.
909 Upon returned, *pLen has the needed or IE length in pBuf.
910 \param pBuf - Caller allocated memory that contain the IE field, if any,
911 upon return
912 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
913 \return eHalStatus - when fail, it usually means the buffer allocated is not
914 big enough
915 ---------------------------------------------------------------------------*/
916eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
917 tANI_U8 *pBuf, eCsrSecurityType secType);
918
919
920/* ---------------------------------------------------------------------------
921 \fn sme_RoamGetNumPMKIDCache
922 \brief a wrapper function to request CSR to return number of PMKID cache
923 entries
924 \return tANI_U32 - the number of PMKID cache entries
925 ---------------------------------------------------------------------------*/
926tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
927
928/* ---------------------------------------------------------------------------
929 \fn sme_RoamGetPMKIDCache
930 \brief a wrapper function to request CSR to return PMKID cache from CSR
931 \param pNum - caller allocated memory that has the space of the number of
932 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
933 needed or actually number in tPmkidCacheInfo.
934 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
935 any, upon return
936 \return eHalStatus - when fail, it usually means the buffer allocated is not
937 big enough
938 ---------------------------------------------------------------------------*/
939eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
940 tPmkidCacheInfo *pPmkidCache);
941
942/* ---------------------------------------------------------------------------
943 \fn sme_GetConfigParam
944 \brief a wrapper function that HDD calls to get the global settings
945 currently maintained by CSR.
946 \param pParam - caller allocated memory
947 \return eHalStatus
948 ---------------------------------------------------------------------------*/
949eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
950
951/* ---------------------------------------------------------------------------
952 \fn sme_GetStatistics
953 \brief a wrapper function that client calls to register a callback to get
954 different PHY level statistics from CSR.
955
956 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
957 \param statsMask - The different category/categories of stats requester is looking for
958 The order in which you set the bits in the statsMask for requesting
959 different type of stats is:
960
961 eCsrSummaryStats = bit 0
962 eCsrGlobalClassAStats = bit 1
963 eCsrGlobalClassBStats = bit 2
964 eCsrGlobalClassCStats = bit 3
965 eCsrGlobalClassDStats = bit 4
966 eCsrPerStaStats = bit 5
967
968 \param callback - SME sends back the requested stats using the callback
969 \param periodicity - If requester needs periodic update, 0 means it's an one
970 time request
971 \param cache - If requester is happy with cached stats
972 \param staId - The station ID for which the stats is requested for
973 \param pContext - user context to be passed back along with the callback
974 \return eHalStatus
975 ---------------------------------------------------------------------------*/
976eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
977 tANI_U32 statsMask,
978 tCsrStatsCallback callback,
979 tANI_U32 periodicity, tANI_BOOLEAN cache,
980 tANI_U8 staId, void *pContext);
981
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +0530982/* ---------------------------------------------------------------------------
983 \fn smeGetTLSTAState
984 \helper function to get teh TL STA State whenever the function is called.
985
986 \param staId - The staID to be passed to the TL
987 to get the relevant TL STA State
988 \return the state as tANI_U16
989 ---------------------------------------------------------------------------*/
990tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
991
Jeff Johnson295189b2012-06-20 16:38:30 -0700992eHalStatus sme_GetRssi(tHalHandle hHal,
993 tCsrRssiCallback callback,
994 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530995
996/* ---------------------------------------------------------------------------
997 \fn sme_GetSnr
998 \brief a wrapper function that client calls to register a callback to get
999 SNR from FW
1000
1001 \param callback - SME sends back the requested stats using the callback
1002 \param staId - The station ID for which the stats is requested for
1003 \param bssid - The bssid of the connected session
1004 \param pContext - user context to be passed back along with the callback
1005 ---------------------------------------------------------------------------*/
1006eHalStatus sme_GetSnr(tHalHandle hHal,
1007 tCsrSnrCallback callback,
1008 tANI_U8 staId, tCsrBssid bssId,
1009 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001010#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001011eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1012 tCsrRssiCallback callback,
1013 tANI_U8 staId,
1014 tCsrBssid bssId,
1015 void *pContext,
1016 void* pVosContext);
1017#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001018
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001019#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001020/* ---------------------------------------------------------------------------
1021 \fn sme_GetTsmStats
1022 \brief a wrapper function that client calls to register a callback to get TSM Stats
1023
1024 \param callback - SME sends back the requested stats using the callback
1025 \param staId - The station ID for which the stats is requested for
1026 \param pContext - user context to be passed back along with the callback
1027 \param pVosContext - vos context
1028 \return eHalStatus
1029 ---------------------------------------------------------------------------*/
1030eHalStatus sme_GetTsmStats(tHalHandle hHal,
1031 tCsrTsmStatsCallback callback,
1032 tANI_U8 staId, tCsrBssid bssId,
1033 void *pContext, void* pVosContext, tANI_U8 tid);
1034
1035/* ---------------------------------------------------------------------------
1036 \fn sme_SetCCKMIe
1037 \brief function to store the CCKM IE passed from supplicant and use it while packing
1038 reassociation request
1039 \param hHal - HAL handle for device
1040 \param pCckmIe - pointer to CCKM IE data
1041 \param pCckmIeLen - length of the CCKM IE
1042 \- return Success or failure
1043 -------------------------------------------------------------------------*/
1044eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1045
1046
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001047/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001048 \fn sme_SetEseBeaconRequest
1049 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001050 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001051 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001052 \- return Success or failure
1053 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001054eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1055 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001056
1057
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001058#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001059/* ---------------------------------------------------------------------------
1060 \fn sme_CfgSetInt
1061 \brief a wrapper function that HDD calls to set parameters in CFG.
1062 \param cfgId - Configuration Parameter ID (type) for STA.
1063 \param ccmValue - The information related to Configuration Parameter ID
1064 which needs to be saved in CFG
1065 \param callback - To be registered by CSR with CCM. Once the CFG done with
1066 saving the information in the database, it notifies CCM &
1067 then the callback will be invoked to notify.
1068 \param toBeSaved - To save the request for future reference
1069 \return eHalStatus
1070 ---------------------------------------------------------------------------*/
1071eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1072 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1073
1074/* ---------------------------------------------------------------------------
1075 \fn sme_CfgSetStr
1076 \brief a wrapper function that HDD calls to set parameters in CFG.
1077 \param cfgId - Configuration Parameter ID (type) for STA.
1078 \param pStr - Pointer to the byte array which carries the information needs
1079 to be saved in CFG
1080 \param length - Length of the data to be saved
1081 \param callback - To be registered by CSR with CCM. Once the CFG done with
1082 saving the information in the database, it notifies CCM &
1083 then the callback will be invoked to notify.
1084 \param toBeSaved - To save the request for future reference
1085 \return eHalStatus
1086 ---------------------------------------------------------------------------*/
1087eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1088 tANI_U32 length, tCcmCfgSetCallback callback,
1089 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301090/* ---------------------------------------------------------------------------
1091 \fn sme_GetModifyProfileFields
1092 \brief HDD or SME - QOS calls this function to get the current values of
1093 connected profile fields, changing which can cause reassoc.
1094 This function must be called after CFG is downloaded and STA is in connected
1095 state. Also, make sure to call this function to get the current profile
1096 fields before calling the reassoc. So that pModifyProfileFields will have
1097 all the latest values plus the one(s) has been updated as part of reassoc
1098 request.
1099 \param pModifyProfileFields - pointer to the connected profile fields
1100 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001101
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301102 \return eHalStatus
1103 -------------------------------------------------------------------------------*/
1104eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1105 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301106/* ---------------------------------------------------------------------------
1107 \fn sme_HT40StopOBSSScan
1108 \brief HDD or SME - Command to stop the OBSS scan
1109 THis is implemented only for debugging purpose.
1110 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1111 \param sessionId - sessionId
1112 changing which can cause reassoc
1113
1114 \return eHalStatus
1115 -------------------------------------------------------------------------------*/
1116eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001117
1118/*--------------------------------------------------------------------------
1119 \fn sme_SetConfigPowerSave
1120 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1121 For BMPS related configuration, this function also updates the CFG
1122 and sends a message to FW to pick up the new values. Note: Calling
1123 this function only updates the configuration and does not enable
1124 the specified power save mode.
1125 \param hHal - The handle returned by macOpen.
1126 \param psMode - Power Saving mode being modified
1127 \param pConfigParams - a pointer to a caller allocated object of type
1128 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1129 \return eHalStatus
1130 --------------------------------------------------------------------------*/
1131eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1132 void *pConfigParams);
1133
1134/*--------------------------------------------------------------------------
1135 \fn sme_GetConfigPowerSave
1136 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1137 \param hHal - The handle returned by macOpen.
1138 \param psMode - Power Saving mode
1139 \param pConfigParams - a pointer to a caller allocated object of type
1140 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1141 \return eHalStatus
1142 --------------------------------------------------------------------------*/
1143eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1144 void *pConfigParams);
1145
1146/* ---------------------------------------------------------------------------
1147 \fn sme_SignalPowerEvent
1148 \brief Signals to PMC that a power event has occurred. Used for putting
1149 the chip into deep sleep mode.
1150 \param hHal - The handle returned by macOpen.
1151 \param event - the event that has occurred
1152 \return eHalStatus
1153 ---------------------------------------------------------------------------*/
1154extern eHalStatus sme_SignalPowerEvent (
1155 tHalHandle hHal,
1156 tPmcPowerEvent event);
1157
1158/* ---------------------------------------------------------------------------
1159 \fn sme_EnablePowerSave
1160 \brief Enables one of the power saving modes. This API does not cause a
1161 device state change. This is purely a configuration API.
1162 \param hHal - The handle returned by macOpen.
1163 \param psMode - The power saving mode to enable.
1164 \return eHalStatus
1165 ---------------------------------------------------------------------------*/
1166extern eHalStatus sme_EnablePowerSave (
1167 tHalHandle hHal,
1168 tPmcPowerSavingMode psMode);
1169
1170/* ---------------------------------------------------------------------------
1171 \fn sme_DisablePowerSave
1172 \brief Disables one of the power saving modes.Disabling does not imply
1173 that device will be brought out of the current PS mode. This is
1174 purely a configuration API.
1175 \param hHal - The handle returned by macOpen.
1176 \param psMode - The power saving mode to disable.
1177 \return eHalStatus
1178 ---------------------------------------------------------------------------*/
1179extern eHalStatus sme_DisablePowerSave (
1180 tHalHandle hHal,
1181 tPmcPowerSavingMode psMode);
1182
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301183 /* ---------------------------------------------------------------------------
1184 \fn sme_SetHostPowerSave
1185 \brief The BMPS logic is controlled by the User level Apps
1186 \param hHal - The handle returned by macOpen.
1187 \param psMode - The power saving mode to enable.
1188 \return eHalStatus
1189 ---------------------------------------------------------------------------*/
1190extern eHalStatus sme_SetHostPowerSave (
1191 tHalHandle hHal,
1192 v_BOOL_t psMode);
1193
Jeff Johnson295189b2012-06-20 16:38:30 -07001194/* ---------------------------------------------------------------------------
1195 \fn sme_StartAutoBmpsTimer
1196 \brief Starts a timer that periodically polls all the registered
1197 module for entry into Bmps mode. This timer is started only if BMPS is
1198 enabled and whenever the device is in full power.
1199 \param hHal - The handle returned by macOpen.
1200 \return eHalStatus
1201 ---------------------------------------------------------------------------*/
1202extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1203
1204/* ---------------------------------------------------------------------------
1205 \fn sme_StopAutoBmpsTimer
1206 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1207 Stopping the timer does not cause a device state change. Only the timer
1208 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1209 \param hHal - The handle returned by macOpen.
1210 \return eHalStatus
1211 ---------------------------------------------------------------------------*/
1212extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1213
1214/* ---------------------------------------------------------------------------
1215 \fn sme_QueryPowerState
1216 \brief Returns the current power state of the device.
1217 \param hHal - The handle returned by macOpen.
1218 \param pPowerState - pointer to location to return power state
1219 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1220 \return eHalStatus
1221 ---------------------------------------------------------------------------*/
1222extern eHalStatus sme_QueryPowerState (
1223 tHalHandle hHal,
1224 tPmcPowerState *pPowerState,
1225 tPmcSwitchState *pSwWlanSwitchState);
1226
1227/* ---------------------------------------------------------------------------
1228 \fn sme_IsPowerSaveEnabled
1229 \brief Checks if the device is able to enter a particular power save mode
1230 This does not imply that the device is in a particular PS mode
1231 \param hHal - The handle returned by macOpen.
1232 \param psMode - the power saving mode
1233 \return eHalStatus
1234 ---------------------------------------------------------------------------*/
1235extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1236 tHalHandle hHal,
1237 tPmcPowerSavingMode psMode);
1238
1239/* ---------------------------------------------------------------------------
1240 \fn sme_RequestFullPower
1241 \brief Request that the device be brought to full power state.
1242 Note 1: If "fullPowerReason" specificied in this API is set to
1243 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1244 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1245 HDD is requesting full power, we need to undo any previous HDD requests for
1246 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1247 specified anything other than above, the buffered requests for BMPS and WoWL
1248 will not be cleared.
1249 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1250 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1251 request".
1252 Note 3: When the device finally enters Full Power PMC will start a timer
1253 if any of the following holds true:
1254 - Auto BMPS mode is enabled
1255 - Uapsd request is pending
1256 - HDD's request for BMPS is pending
1257 - HDD's request for WoWL is pending
1258 On timer expiry PMC will attempt to put the device in BMPS mode if following
1259 (in addition to those listed above) holds true:
1260 - Polling of all modules through the Power Save Check routine passes
1261 - STA is associated to an access point
1262 \param hHal - The handle returned by macOpen.
1263 \param - callbackRoutine Callback routine invoked in case of success/failure
1264 \param - callbackContext - Cookie to be passed back during callback
1265 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1266 distinguish between BAP and HDD requests
1267 \return eHalStatus - status
1268 eHAL_STATUS_SUCCESS - device brought to full power state
1269 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1270 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1271 ---------------------------------------------------------------------------*/
1272extern eHalStatus sme_RequestFullPower (
1273 tHalHandle hHal,
1274 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1275 void *callbackContext,
1276 tRequestFullPowerReason fullPowerReason);
1277
1278/* ---------------------------------------------------------------------------
1279 \fn sme_RequestBmps
1280 \brief Request that the device be put in BMPS state. Request will be
1281 accepted only if BMPS mode is enabled and power save check routine
1282 passes. Only HDD should invoke this API.
1283 \param hHal - The handle returned by macOpen.
1284 \param - callbackRoutine Callback routine invoked in case of success/failure
1285 \param - callbackContext - Cookie to be passed back during callback
1286 \return eHalStatus
1287 eHAL_STATUS_SUCCESS - device is in BMPS state
1288 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1289 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1290 ---------------------------------------------------------------------------*/
1291extern eHalStatus sme_RequestBmps (
1292 tHalHandle hHal,
1293 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1294 void *callbackContext);
1295
1296/* ---------------------------------------------------------------------------
1297 \fn sme_SetDHCPTillPowerActiveFlag
1298 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1299 entry by PMC
1300 \param hHal - The handle returned by macOpen.
1301 ---------------------------------------------------------------------------*/
1302void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1303
1304
1305/* ---------------------------------------------------------------------------
1306 \fn sme_StartUapsd
1307 \brief Request that the device be put in UAPSD state. If the device is in
1308 Full Power it will be put in BMPS mode first and then into UAPSD
1309 mode.
1310 \param hHal - The handle returned by macOpen.
1311 \param - callbackRoutine Callback routine invoked in case of success/failure
1312 \param - callbackContext - Cookie to be passed back during callback
1313 eHAL_STATUS_SUCCESS - device is in UAPSD state
1314 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1315 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1316 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1317 \return eHalStatus
1318 ---------------------------------------------------------------------------*/
1319extern eHalStatus sme_StartUapsd (
1320 tHalHandle hHal,
1321 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1322 void *callbackContext);
1323
1324/* ---------------------------------------------------------------------------
1325 \fn sme_StopUapsd
1326 \brief Request that the device be put out of UAPSD state. Device will be
1327 put in in BMPS state after stop UAPSD completes. Buffered requests for
1328 UAPSD will be cleared after this.
1329 \param hHal - The handle returned by macOpen.
1330 \return eHalStatus
1331 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1332 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1333 ---------------------------------------------------------------------------*/
1334extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1335
1336/* ---------------------------------------------------------------------------
1337 \fn sme_RequestStandby
1338 \brief Request that the device be put in standby. It is HDD's responsibility
1339 to bring the chip to full power and do a discconnect before calling
1340 this API. Request for standby will be rejected if STA is associated
1341 to an AP.
1342 \param hHal - The handle returned by macOpen.
1343 \param - callbackRoutine Callback routine invoked in case of success/failure
1344 \param - callbackContext - Cookie to be passed back during callback
1345 \return eHalStatus
1346 eHAL_STATUS_SUCCESS - device is in Standby mode
1347 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1348 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1349 ---------------------------------------------------------------------------*/
1350extern eHalStatus sme_RequestStandby (
1351 tHalHandle hHal,
1352 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1353 void *callbackContext);
1354
1355/* ---------------------------------------------------------------------------
1356 \fn sme_RegisterPowerSaveCheck
1357 \brief Register a power save check routine that is called whenever
1358 the device is about to enter one of the power save modes.
1359 \param hHal - The handle returned by macOpen.
1360 \param checkRoutine - Power save check routine to be registered
1361 \param callbackContext - Cookie to be passed back during callback
1362 \return eHalStatus
1363 eHAL_STATUS_SUCCESS - successfully registered
1364 eHAL_STATUS_FAILURE - not successfully registered
1365 ---------------------------------------------------------------------------*/
1366extern eHalStatus sme_RegisterPowerSaveCheck (
1367 tHalHandle hHal,
1368 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1369
1370/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301371 \fn sme_Register11dScanDoneCallback
1372 \brief Register a routine of type csrScanCompleteCallback which is
1373 called whenever an 11d scan is done
1374 \param hHal - The handle returned by macOpen.
1375 \param callback - 11d scan complete routine to be registered
1376 \return eHalStatus
1377 ---------------------------------------------------------------------------*/
1378extern eHalStatus sme_Register11dScanDoneCallback (
1379 tHalHandle hHal,
1380 csrScanCompleteCallback);
1381
1382/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001383 \fn sme_DeregisterPowerSaveCheck
1384 \brief Deregister a power save check routine
1385 \param hHal - The handle returned by macOpen.
1386 \param checkRoutine - Power save check routine to be deregistered
1387 \return eHalStatus
1388 eHAL_STATUS_SUCCESS - successfully deregistered
1389 eHAL_STATUS_FAILURE - not successfully deregistered
1390 ---------------------------------------------------------------------------*/
1391extern eHalStatus sme_DeregisterPowerSaveCheck (
1392 tHalHandle hHal,
1393 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1394
1395/* ---------------------------------------------------------------------------
1396 \fn sme_RegisterDeviceStateUpdateInd
1397 \brief Register a callback routine that is called whenever
1398 the device enters a new device state (Full Power, BMPS, UAPSD)
1399 \param hHal - The handle returned by macOpen.
1400 \param callbackRoutine - Callback routine to be registered
1401 \param callbackContext - Cookie to be passed back during callback
1402 \return eHalStatus
1403 eHAL_STATUS_SUCCESS - successfully registered
1404 eHAL_STATUS_FAILURE - not successfully registered
1405 ---------------------------------------------------------------------------*/
1406extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1407 tHalHandle hHal,
1408 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1409 void *callbackContext);
1410
1411/* ---------------------------------------------------------------------------
1412 \fn sme_DeregisterDeviceStateUpdateInd
1413 \brief Deregister a routine that was registered for device state changes
1414 \param hHal - The handle returned by macOpen.
1415 \param callbackRoutine - Callback routine to be deregistered
1416 \return eHalStatus
1417 eHAL_STATUS_SUCCESS - successfully deregistered
1418 eHAL_STATUS_FAILURE - not successfully deregistered
1419 ---------------------------------------------------------------------------*/
1420extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1421 tHalHandle hHal,
1422 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1423
1424/* ---------------------------------------------------------------------------
1425 \fn sme_WowlAddBcastPattern
1426 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1427 do a pattern match on these patterns when Wowl is enabled during BMPS
1428 mode.
1429 \param hHal - The handle returned by macOpen.
1430 \param pattern - Pattern to be added
1431 \return eHalStatus
1432 eHAL_STATUS_FAILURE Cannot add pattern
1433 eHAL_STATUS_SUCCESS Request accepted.
1434 ---------------------------------------------------------------------------*/
1435extern eHalStatus sme_WowlAddBcastPattern (
1436 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001437 tpSirWowlAddBcastPtrn pattern,
1438 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001439
1440/* ---------------------------------------------------------------------------
1441 \fn sme_WowlDelBcastPattern
1442 \brief Delete a pattern that was added for Pattern Byte Matching.
1443 \param hHal - The handle returned by macOpen.
1444 \param pattern - Pattern to be deleted
1445 \return eHalStatus
1446 eHAL_STATUS_FAILURE Cannot delete pattern
1447 eHAL_STATUS_SUCCESS Request accepted.
1448 ---------------------------------------------------------------------------*/
1449extern eHalStatus sme_WowlDelBcastPattern (
1450 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001451 tpSirWowlDelBcastPtrn pattern,
1452 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001453
1454/* ---------------------------------------------------------------------------
1455 \fn sme_EnterWowl
1456 \brief This is the API to request entry into WOWL mode.
1457 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1458 SME will will cache the information that WOWL has been requested and
1459 attempt to put the device in BMPS first. On entry into BMPS, SME will
1460 enter the WOWL mode.
1461 Note 1: After WoWL request is accepted, If module other than HDD requests
1462 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1463 and attempt to put the chip into BMPS+WOWL based on a timer.
1464 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1465 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1466 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1467 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1468 are required. Currently there is no requirement or use case to support UAPSD
1469 and WOWL at the same time.
1470 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1471 Note 5. Request for WoWL is rejected if BMPS is disabled.
1472
1473 \param hHal - The handle returned by macOpen.
1474 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1475 Used for success/failure notification by SME
1476 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1477 at the time of callback.
1478 \param wakeReasonIndCB - Callback routine provided by HDD.
1479 Used for Wake Reason Indication by SME
1480 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1481 at the time of callback.
1482 \return eHalStatus
1483 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1484 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1485 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1486 mode is entered.
1487 ---------------------------------------------------------------------------*/
1488extern eHalStatus sme_EnterWowl (
1489 tHalHandle hHal,
1490 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1491 void *enterWowlCallbackContext,
1492#ifdef WLAN_WAKEUP_EVENTS
1493 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1494 void *wakeReasonIndCBContext,
1495#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001496 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001497
1498/* ---------------------------------------------------------------------------
1499 \fn sme_ExitWowl
1500 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1501 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1502 mode. Any Buffered request for WoWL will be cleared after this API.
1503 \param hHal - The handle returned by macOpen.
1504 \return eHalStatus
1505 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1506 only if the previous "Enter WOWL" transaction has
1507 not even completed.
1508 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1509 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301510extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001511
1512/* ---------------------------------------------------------------------------
1513
1514 \fn sme_RoamSetKey
1515
1516 \brief To set encryption key. This function should be called only when connected
1517 This is an asynchronous API.
1518
1519 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1520
1521 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1522
1523 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1524
1525 FAILURE or RESOURCES The API finished and failed.
1526
1527 -------------------------------------------------------------------------------*/
1528eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1529
1530/* ---------------------------------------------------------------------------
1531
1532 \fn sme_RoamRemoveKey
1533
1534 \brief To set encryption key. This is an asynchronous API.
1535
1536 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
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_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1546
1547
1548/* ---------------------------------------------------------------------------
1549
1550 \fn sme_GetCountryCode
1551
1552 \brief To return the current country code. If no country code is applied, default country code is
1553 used to fill the buffer.
1554 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1555 This is a synchronous API.
1556
1557 \param pBuf - pointer to a caller allocated buffer for returned country code.
1558
1559 \param pbLen For input, this parameter indicates how big is the buffer.
1560 Upon return, this parameter has the number of bytes for country. If pBuf
1561 doesn't have enough space, this function returns
1562 fail status and this parameter contains the number that is needed.
1563
1564 \return eHalStatus SUCCESS.
1565
1566 FAILURE or RESOURCES The API finished and failed.
1567
1568 -------------------------------------------------------------------------------*/
1569eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1570
1571/* ---------------------------------------------------------------------------
1572
1573 \fn sme_SetCountryCode
1574
1575 \brief To change the current/default country code.
1576 If 11d supported is turned off, an error is return.
1577 This is a synchronous API.
1578
1579 \param pCountry - pointer to a caller allocated buffer for the country code.
1580
1581 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1582 whether a reset is required.
1583
1584 \return eHalStatus SUCCESS.
1585
1586 FAILURE or RESOURCES The API finished and failed.
1587
1588 -------------------------------------------------------------------------------*/
1589eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1590
1591/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301592
1593 \fn sme_InitChannels
1594
1595 \brief Used to initialize CSR channel lists while driver loading
1596
1597 \param hHal - global pMac structure
1598
1599 \return eHalStatus SUCCESS.
1600
1601 FAILURE or RESOURCES The API finished and failed.
1602
1603 -------------------------------------------------------------------------------*/
1604eHalStatus sme_InitChannels(tHalHandle hHal);
1605
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301606
Mihir Shete04206452014-11-20 17:50:58 +05301607#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301608/* ---------------------------------------------------------------------------
1609 \fn sme_InitChannelsForCC
1610
1611 \brief Used to issue regulatory hint to user
1612
1613 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301614 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301615
1616 \return eHalStatus SUCCESS.
1617
1618 FAILURE or RESOURCES The API finished and failed.
1619
1620 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301621eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301622#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301623
Mihir Shetee1093ba2014-01-21 20:13:32 +05301624/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001625 \fn sme_ResetCountryCodeInformation
1626 \brief this function is to reset the country code current being used back to EEPROM default
1627 this includes channel list and power setting. This is a synchronous API.
1628 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1629 a restart is needed to apply the change
1630 \return eHalStatus
1631 -------------------------------------------------------------------------------*/
1632eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1633
1634/* ---------------------------------------------------------------------------
1635 \fn sme_GetSupportedCountryCode
1636 \brief this function is to get a list of the country code current being supported
1637 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1638 this has the country code list. 3 bytes for each country code. This may be NULL if
1639 caller wants to know the needed byte count.
1640 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1641 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1642 \return eHalStatus
1643 -------------------------------------------------------------------------------*/
1644eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1645
1646/* ---------------------------------------------------------------------------
1647 \fn sme_GetCurrentRegulatoryDomain
1648 \brief this function is to get the current regulatory domain. This is a synchronous API.
1649 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1650 SME. The function fails if 11d support is turned off.
1651 \param pDomain - Caller allocated buffer to return the current domain.
1652 \return eHalStatus SUCCESS.
1653
1654 FAILURE or RESOURCES The API finished and failed.
1655 -------------------------------------------------------------------------------*/
1656eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1657
1658/* ---------------------------------------------------------------------------
1659 \fn sme_SetRegulatoryDomain
1660 \brief this function is to set the current regulatory domain.
1661 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1662 SME. This is a synchronous API.
1663 \param domainId - indicate the domain (defined in the driver) needs to set to.
1664 See v_REGDOMAIN_t for definition
1665 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1666 a restart is needed to apply the change
1667 \return eHalStatus
1668 -------------------------------------------------------------------------------*/
1669eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1670
1671/* ---------------------------------------------------------------------------
1672
1673 \fn sme_GetRegulatoryDomainForCountry
1674
1675 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1676
1677 \param pCountry - pointer to a caller allocated buffer for input country code.
1678
1679 \param pDomainId Upon successful return, it is the domain that country belongs to.
1680 If it is NULL, returning success means that the country code is known.
1681
1682 \return eHalStatus SUCCESS.
1683
1684 FAILURE or RESOURCES The API finished and failed.
1685
1686 -------------------------------------------------------------------------------*/
1687eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1688
1689
1690
1691/* ---------------------------------------------------------------------------
1692
1693 \fn sme_GetSupportedRegulatoryDomains
1694
1695 \brief To return a list of supported regulatory domains. This is a synchronous API.
1696
1697 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1698
1699 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1700 Upon return, this parameter has the number for supported domains. If pDomains
1701 doesn't have enough space for all the supported domains, this function returns
1702 fail status and this parameter contains the number that is needed.
1703
1704 \return eHalStatus SUCCESS.
1705
1706 FAILURE or RESOURCES The API finished and failed.
1707
1708 -------------------------------------------------------------------------------*/
1709eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1710
1711//some support functions
1712tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1713tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1714tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1715//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1716eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1717
1718typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1719/* ---------------------------------------------------------------------------
1720
1721 \fn sme_ChangeCountryCode
1722
1723 \brief Change Country code from upperlayer during WLAN driver operation.
1724 This is a synchronous API.
1725
1726 \param hHal - The handle returned by macOpen.
1727
1728 \param pCountry New Country Code String
1729
Abhishek Singha306a442013-11-07 18:39:01 +05301730 \param sendRegHint If we want to send reg hint to nl80211
1731
Jeff Johnson295189b2012-06-20 16:38:30 -07001732 \return eHalStatus SUCCESS.
1733
1734 FAILURE or RESOURCES The API finished and failed.
1735
1736 -------------------------------------------------------------------------------*/
1737eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1738 tSmeChangeCountryCallback callback,
1739 tANI_U8 *pCountry,
1740 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301741 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301742 tAniBool countryFromUserSpace,
1743 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001744
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301745/* ---------------------------------------------------------------------------
1746
Amar Singhal0d15bd52013-10-12 23:13:13 -07001747 \fn sme_GenericChangeCountryCode
1748
1749 \brief Generic API to change country code
1750
1751 \param hHal - The handle returned by macOpen.
1752
1753 \param pCountry New Country Code String
1754
1755 \param reg_domain Regulatory domain for the new country code
1756
1757 \return eHalStatus SUCCESS.
1758
1759 FAILURE or RESOURCES The API finished and failed.
1760
1761 -------------------------------------------------------------------------------*/
1762eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1763 tANI_U8 *pCountry,
1764 v_REGDOMAIN_t reg_domain);
1765
1766/* ---------------------------------------------------------------------------
1767
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301768 \fn sme_DHCPStartInd
1769
1770 \brief Indicate FW about DHCP start event.
1771
1772 \param hHal - The handle returned by macOpen.
1773
1774 \param device_mode the mode of the device
1775
c_hpothu0b0cab72014-02-13 21:52:40 +05301776 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301777
1778 \return eHalStatus SUCCESS.
1779
1780 FAILURE or RESOURCES The API finished and failed.
1781
1782 -------------------------------------------------------------------------------*/
1783
1784eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1785 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301786 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301787
1788/* ---------------------------------------------------------------------------
1789
1790 \fn sme_DHCPStopInd
1791
1792 \brief Indicate FW about DHCP stop event.
1793
1794 \param hHal - The handle returned by macOpen.
1795
1796 \param device_mode the mode of the device
1797
c_hpothu0b0cab72014-02-13 21:52:40 +05301798 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301799
1800 \return eHalStatus SUCCESS.
1801
1802 FAILURE or RESOURCES The API finished and failed.
1803
1804 -------------------------------------------------------------------------------*/
1805eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1806 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301807 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301808
Jeff Johnson295189b2012-06-20 16:38:30 -07001809
1810/* ---------------------------------------------------------------------------
1811 \fn sme_BtcSignalBtEvent
1812 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1813 BT event type and the current operating mode of Libra (full power,
1814 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1815 would be employed.
1816 \param hHal - The handle returned by macOpen.
1817 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1818 Caller owns the memory and is responsible for freeing it.
1819 \return VOS_STATUS
1820 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1821 if driver has not yet been initialized or if BTC
1822 Events Layer has been disabled.
1823 VOS_STATUS_SUCCESS BT Event passed to HAL
1824 ---------------------------------------------------------------------------*/
1825VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1826
1827/* ---------------------------------------------------------------------------
1828 \fn sme_BtcSetConfig
1829 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1830 This function should be invoked only after CFG download has completed.
1831 Calling it after sme_HDDReadyInd is recommended.
1832 \param hHal - The handle returned by macOpen.
1833 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1834 tSmeBtcConfig. Caller owns the memory and is responsible
1835 for freeing it.
1836 \return VOS_STATUS
1837 VOS_STATUS_E_FAILURE Config not passed to HAL.
1838 VOS_STATUS_SUCCESS Config passed to HAL
1839 ---------------------------------------------------------------------------*/
1840VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1841
1842/* ---------------------------------------------------------------------------
1843 \fn sme_BtcGetConfig
1844 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1845 \param hHal - The handle returned by macOpen.
1846 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1847 Caller owns the memory and is responsible for freeing it.
1848 \return VOS_STATUS
1849 VOS_STATUS_E_FAILURE - failure
1850 VOS_STATUS_SUCCESS success
1851 ---------------------------------------------------------------------------*/
1852VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1853
1854/* ---------------------------------------------------------------------------
1855 \fn sme_SetCfgPrivacy
1856 \brief API to set configure privacy parameters
1857 \param hHal - The handle returned by macOpen.
1858 \param pProfile - Pointer CSR Roam profile.
1859 \param fPrivacy - This parameter indicates status of privacy
1860
1861 \return void
1862 ---------------------------------------------------------------------------*/
1863void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1864
1865#if defined WLAN_FEATURE_VOWIFI
1866/* ---------------------------------------------------------------------------
1867 \fn sme_NeighborReportRequest
1868 \brief API to request neighbor report.
1869 \param hHal - The handle returned by macOpen.
1870 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1871 tRrmNeighborReq. Caller owns the memory and is responsible
1872 for freeing it.
1873 \return VOS_STATUS
1874 VOS_STATUS_E_FAILURE - failure
1875 VOS_STATUS_SUCCESS success
1876 ---------------------------------------------------------------------------*/
1877VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1878 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1879#endif
1880
1881//The following are debug APIs to support direct read/write register/memory
1882//They are placed in SME because HW cannot be access when in LOW_POWER state
1883//AND not connected. The knowledge and synchronization is done in SME
1884
1885//sme_DbgReadRegister
1886//Caller needs to validate the input values
1887VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1888
1889//sme_DbgWriteRegister
1890//Caller needs to validate the input values
1891VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1892
1893//sme_DbgReadMemory
1894//Caller needs to validate the input values
1895//pBuf caller allocated buffer has the length of nLen
1896VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1897
1898//sme_DbgWriteMemory
1899//Caller needs to validate the input values
1900VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1901
Jeff Johnson295189b2012-06-20 16:38:30 -07001902VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1903 tSirVersionType *pVersion);
1904VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1905 tSirVersionType *pVersion);
1906VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1907 tANI_U8 *pVersion,
1908 tANI_U32 versionBufferSize);
1909VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1910 tANI_U8 *pVersion,
1911 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001912eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1913 csrRoamCompleteCallback callback,
1914 void *pContext);
1915
1916#ifdef FEATURE_WLAN_WAPI
1917/* ---------------------------------------------------------------------------
1918 \fn sme_RoamSetBKIDCache
1919 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1920 candidate list.
1921 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1922 it is opened (by calling halOpen).
1923 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1924 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1925 when retruning, this is the number of items put into pBKIDCache
1926 \return eHalStatus - when fail, it usually means the buffer allocated is not
1927 big enough and pNumItems has the number of tBkidCacheInfo.
1928 ---------------------------------------------------------------------------*/
1929eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1930 tANI_U32 numItems );
1931
1932/* ---------------------------------------------------------------------------
1933 \fn sme_RoamGetBKIDCache
1934 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1935 BKID cache.
1936 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1937 it is opened (by calling halOpen).
1938 \param pNum - caller allocated memory that has the space of the number of
1939 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1940 in SME cache.
1941 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1942 upon return
1943 \return eHalStatus - when fail, it usually means the buffer allocated is not
1944 big enough.
1945 ---------------------------------------------------------------------------*/
1946eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1947 tBkidCacheInfo *pBkidCache);
1948
1949/* ---------------------------------------------------------------------------
1950 \fn sme_RoamGetNumBKIDCache
1951 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1952 number of BKID cache entries.
1953 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1954 it is opened (by calling halOpen).
1955 \return tANI_U32 - the number of BKID cache entries.
1956 ---------------------------------------------------------------------------*/
1957tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1958
1959/* ---------------------------------------------------------------------------
1960 \fn sme_ScanGetBKIDCandidateList
1961 \brief a wrapper function to return the BKID candidate list
1962 \param pBkidList - caller allocated buffer point to an array of
1963 tBkidCandidateInfo
1964 \param pNumItems - pointer to a variable that has the number of
1965 tBkidCandidateInfo allocated when retruning, this is
1966 either the number needed or number of items put into
1967 pPmkidList
1968 \return eHalStatus - when fail, it usually means the buffer allocated is not
1969 big enough and pNumItems
1970 has the number of tBkidCandidateInfo.
1971 \Note: pNumItems is a number of tBkidCandidateInfo,
1972 not sizeof(tBkidCandidateInfo) * something
1973 ---------------------------------------------------------------------------*/
1974eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1975 tBkidCandidateInfo *pBkidList,
1976 tANI_U32 *pNumItems );
1977#endif /* FEATURE_WLAN_WAPI */
1978
Jeff Johnsone7245742012-09-05 17:12:55 -07001979#ifdef FEATURE_OEM_DATA_SUPPORT
1980/********************************************************************************************
1981 Oem data related modifications
1982*********************************************************************************************/
1983/* ---------------------------------------------------------------------------
1984 \fn sme_OemDataReq
1985 \param sessionId - session id of session to be used for oem data req.
1986 \param pOemDataReqID - pointer to an object to get back the request ID
1987 \param callback - a callback function that is called upon finish
1988 \param pContext - a pointer passed in for the callback
1989 \return eHalStatus
1990 ---------------------------------------------------------------------------*/
1991eHalStatus sme_OemDataReq(tHalHandle hHal,
1992 tANI_U8 sessionId,
1993 tOemDataReqConfig *,
1994 tANI_U32 *pOemDataReqID,
1995 oemData_OemDataReqCompleteCallback callback,
1996 void *pContext);
1997
1998/* ---------------------------------------------------------------------------
1999 \fn sme_getOemDataRsp
2000 \param pOemDataRsp - A pointer to the response object
2001 \param pOemDataReqID - pointer to an object to get back the request ID
2002 \return eHalStatus
2003 ---------------------------------------------------------------------------*/
2004eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2005 tOemDataRsp **pOemDataRsp);
2006
2007#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002008
2009
Jeff Johnson295189b2012-06-20 16:38:30 -07002010
2011/* ---------------------------------------------------------------------------
2012
2013 \fn sme_RoamUpdateAPWPSIE
2014
2015 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2016 This is an asynchronous API.
2017
2018 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2019
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002020 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002021
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002022 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002023
2024 -------------------------------------------------------------------------------*/
2025
2026eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2027/* ---------------------------------------------------------------------------
2028
2029 \fn sme_RoamUpdateAPWPARSNIEs
2030
2031 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2032 This is an asynchronous API.
2033
2034 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2035
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002036 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002037
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002038 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002039
2040 -------------------------------------------------------------------------------*/
2041eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2042
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002043/* ---------------------------------------------------------------------------
2044
2045 sme_ChangeMCCBeaconInterval
2046
2047 \brief To update P2P-GO's beacon Interval.
2048
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002049 \return eHalStatus SUCCESS
2050 FAILURE or RESOURCES
2051 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002052 -------------------------------------------------------------------------------*/
2053eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2054
2055
Jeff Johnson295189b2012-06-20 16:38:30 -07002056
2057/* ---------------------------------------------------------------------------
2058 \fn sme_sendBTAmpEvent
2059 \brief API to send the btAMPstate to FW
2060 \param hHal - The handle returned by macOpen.
2061 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002062 \return eHalStatus SUCCESS
2063 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002064
2065--------------------------------------------------------------------------- */
2066
2067eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2068
2069
2070
2071/* ---------------------------------------------------------------------------
2072 \fn sme_SetHostOffload
2073 \brief API to set the host offload feature.
2074 \param hHal - The handle returned by macOpen.
2075 \param pRequest - Pointer to the offload request.
2076 \return eHalStatus
2077 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002078eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2079 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002080
2081/* ---------------------------------------------------------------------------
2082 \fn sme_SetKeepAlive
2083 \brief API to set the Keep Alive feature.
2084 \param hHal - The handle returned by macOpen.
2085 \param pRequest - Pointer to the Keep Alive request.
2086 \return eHalStatus
2087 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002088eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2089 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002090
Jeff Johnson295189b2012-06-20 16:38:30 -07002091/* ----------------------------------------------------------------------------
2092 \fn sme_GetOperationChannel
2093 \brief API to get current channel on which STA is parked
2094 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002095 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002096 \returns eHAL_STATUS_SUCCESS
2097 eHAL_STATUS_FAILURE
2098-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002099eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002100
Jeff Johnson295189b2012-06-20 16:38:30 -07002101/* ---------------------------------------------------------------------------
2102
2103 \fn sme_RegisterMgtFrame
2104
2105 \brief To register managment frame of specified type and subtype.
2106 \param frameType - type of the frame that needs to be passed to HDD.
2107 \param matchData - data which needs to be matched before passing frame
2108 to HDD.
2109 \param matchDataLen - Length of matched data.
2110 \return eHalStatus
2111 -------------------------------------------------------------------------------*/
2112eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2113 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2114
2115/* ---------------------------------------------------------------------------
2116
2117 \fn sme_DeregisterMgtFrame
2118
2119 \brief To De-register managment frame of specified type and subtype.
2120 \param frameType - type of the frame that needs to be passed to HDD.
2121 \param matchData - data which needs to be matched before passing frame
2122 to HDD.
2123 \param matchDataLen - Length of matched data.
2124 \return eHalStatus
2125 -------------------------------------------------------------------------------*/
2126eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2127 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07002128
2129/* ---------------------------------------------------------------------------
2130
2131 \fn sme_ConfigureRxpFilter
2132
2133 \brief
2134 SME will pass this request to lower mac to set/reset the filter on RXP for
2135 multicast & broadcast traffic.
2136
2137 \param
2138
2139 hHal - The handle returned by macOpen.
2140
2141 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2142 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2143 on this param. In future we can use this as a mask to set various types of
2144 filters as suggested below:
2145 FILTER_ALL_MULTICAST:
2146 FILTER_ALL_BROADCAST:
2147 FILTER_ALL_MULTICAST_BROADCAST:
2148
2149
2150 \return eHalStatus
2151
2152
2153--------------------------------------------------------------------------- */
2154eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2155 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2156
2157/* ---------------------------------------------------------------------------
2158
2159 \fn sme_ConfigureAppsCpuWakeupState
2160
2161 \brief
2162 SME will pass this request to lower mac to dynamically adjusts the listen
2163 interval based on the WLAN/MSM activity. This feature is named as
2164 Telescopic Beacon wakeup feature.
2165
2166 \param
2167
2168 hHal - The handle returned by macOpen.
2169
2170 isAppsAwake- Depicts the state of the Apps CPU
2171
2172
2173 \return eHalStatus
2174
2175
2176--------------------------------------------------------------------------- */
2177eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2178
Jeff Johnson295189b2012-06-20 16:38:30 -07002179/* ---------------------------------------------------------------------------
2180
2181 \fn sme_ConfigureSuspendInd
2182
2183 \brief
2184 SME will pass this request to lower mac to Indicate that the wlan needs to
2185 be suspended
2186
2187 \param
2188
2189 hHal - The handle returned by macOpen.
2190
2191 wlanSuspendParam- Depicts the wlan suspend params
2192
2193
2194 \return eHalStatus
2195
2196
2197--------------------------------------------------------------------------- */
2198eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2199 tpSirWlanSuspendParam wlanSuspendParam);
2200
2201/* ---------------------------------------------------------------------------
2202
2203 \fn sme_ConfigureResumeReq
2204
2205 \brief
2206 SME will pass this request to lower mac to Indicate that the wlan needs to
2207 be Resumed
2208
2209 \param
2210
2211 hHal - The handle returned by macOpen.
2212
2213 wlanResumeParam- Depicts the wlan resume params
2214
2215
2216 \return eHalStatus
2217
2218
2219--------------------------------------------------------------------------- */
2220eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2221 tpSirWlanResumeParam wlanResumeParam);
2222
Jeff Johnson295189b2012-06-20 16:38:30 -07002223
2224/* ---------------------------------------------------------------------------
2225
2226 \fn sme_GetInfraSessionId
2227
2228 \brief To get the session ID for infra session, if connected
2229 This is a synchronous API.
2230
2231 \param hHal - The handle returned by macOpen.
2232
2233 \return sessionid, -1 if infra session is not connected
2234
2235 -------------------------------------------------------------------------------*/
2236tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2237
2238/* ---------------------------------------------------------------------------
2239
2240 \fn sme_GetInfraOperationChannel
2241
2242 \brief To get the operating channel for infra session, if connected
2243 This is a synchronous API.
2244
2245 \param hHal - The handle returned by macOpen.
2246 \param sessionId - the sessionId returned by sme_OpenSession.
2247
2248 \return operating channel, 0 if infra session is not connected
2249
2250 -------------------------------------------------------------------------------*/
2251tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2252/* ---------------------------------------------------------------------------
2253
2254 \fn sme_GetConcurrentOperationChannel
2255
2256 \brief To get the operating channel for other concurrent sessions, if connected
2257 This is a synchronous API.
2258
2259 \param hHal - The handle returned by macOpen.
2260 \param currentPersona - persona that is trying to come up.
2261
2262 \return operating channel, 0 if infra session is not connected
2263
2264 -------------------------------------------------------------------------------*/
2265tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2266
2267/* ---------------------------------------------------------------------------
2268 \fn sme_AbortMacScan
2269 \brief API to cancel MAC scan.
2270 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302271 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302272 \return tSirAbortScanStatus return status abort scan
2273
Jeff Johnson295189b2012-06-20 16:38:30 -07002274 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302275tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2276 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002277
2278/* ---------------------------------------------------------------------------
2279 \fn sme_GetCfgValidChannels
2280 \brief API to get valid channel list
2281 \param hHal - The handle returned by macOpen.
2282 \param aValidChannels - Pointer to the valid channel list
2283 \param len - valid channel list length
2284 \return eHalStatus
2285 ---------------------------------------------------------------------------*/
2286eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2287
2288#ifdef FEATURE_WLAN_SCAN_PNO
2289
2290/* ---------------------------------------------------------------------------
2291 \fn sme_SetPreferredNetworkList
2292 \brief API to set the Preferred Network List Offload feature.
2293 \param hHal - The handle returned by macOpen.
2294 \param pRequest - Pointer to the offload request.
2295 \return eHalStatus
2296 ---------------------------------------------------------------------------*/
2297eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2298
2299/* ---------------------------------------------------------------------------
2300 \fn sme_SetRSSIFilter
2301 \brief API to set RSSI Filter feature.
2302 \param hHal - The handle returned by macOpen.
2303 \param pRequest - Pointer to the offload request.
2304 \return eHalStatus
2305 ---------------------------------------------------------------------------*/
2306eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2307
2308/******************************************************************************
2309*
2310* Name: sme_PreferredNetworkFoundInd
2311*
2312* Description:
2313* Invoke Preferred Network Found Indication
2314*
2315* Parameters:
2316* hHal - HAL handle for device
2317* pMsg - found network description
2318*
2319* Returns: eHalStatus
2320*
2321******************************************************************************/
2322eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2323#endif // FEATURE_WLAN_SCAN_PNO
2324
2325/* ---------------------------------------------------------------------------
2326 \fn sme_SetPowerParams
2327 \brief API to set Power Parameters
2328 \param hHal - The handle returned by macOpen.
2329 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002330 \param forced - if true, not to be dropped silently in host, it must reach
2331 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2332 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002333 \return eHalStatus
2334 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002335eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002336
2337/* ---------------------------------------------------------------------------
2338 \fn sme_SetTxPerTracking
2339 \brief Set Tx PER tracking configuration parameters
2340 \param hHal - The handle returned by macOpen.
2341 \param pTxPerTrackingParam - Tx PER configuration parameters
2342 \return eHalStatus
2343 ---------------------------------------------------------------------------*/
2344eHalStatus sme_SetTxPerTracking (
2345 tHalHandle hHal,
2346 void (*pCallbackfn) (void *pCallbackContext),
2347 void *pCallbackContext,
2348 tpSirTxPerTrackingParam pTxPerTrackingParam);
2349
2350#ifdef WLAN_FEATURE_PACKET_FILTERING
2351/* ---------------------------------------------------------------------------
2352 \fn sme_ReceiveFilterSetFilter
2353 \brief API to set 8023 Multicast Address List
2354 \param hHal - The handle returned by macOpen.
2355 \param pMulticastAddrs - Pointer to the Multicast Address List
2356 \return eHalStatus
2357 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002358eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002359
2360/* ---------------------------------------------------------------------------
2361 \fn sme_ReceiveFilterSetFilter
2362 \brief API to set Receive Packet Filter
2363 \param hHal - The handle returned by macOpen.
2364 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2365 \return eHalStatus
2366 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002367eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2368 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002369
2370/* ---------------------------------------------------------------------------
2371 \fn sme_GetFilterMatchCount
2372 \brief API to get D0 PC Filter Match Count
2373 \param hHal - The handle returned by macOpen
2374 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2375 \param callbackContext - Cookie to be passed back during callback
2376 \return eHalStatus
2377 ---------------------------------------------------------------------------*/
2378eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2379 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002380 void *callbackContext,
2381 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002382
2383/* ---------------------------------------------------------------------------
2384 \fn sme_ReceiveFilterClearFilter
2385 \brief API to clear Receive Packet Filter
2386 \param hHal - The handle returned by macOpen.
2387 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2388 \return eHalStatus
2389 ---------------------------------------------------------------------------*/
2390eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002391 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2392 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002393#endif // WLAN_FEATURE_PACKET_FILTERING
2394/* ---------------------------------------------------------------------------
2395
2396 \fn sme_IsChannelValid
2397 \brief To check if the channel is valid for currently established domain
2398 This is a synchronous API.
2399
2400 \param hHal - The handle returned by macOpen.
2401 \param channel - channel to verify
2402
2403 \return TRUE/FALSE, TRUE if channel is valid
2404
2405 -------------------------------------------------------------------------------*/
2406tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2407
2408/* ---------------------------------------------------------------------------
2409 \fn sme_SetFreqBand
2410 \brief Used to set frequency band.
2411 \param hHal
2412 \eBand band value to be configured
2413 \- return eHalStatus
2414 -------------------------------------------------------------------------*/
2415eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2416
2417/* ---------------------------------------------------------------------------
2418 \fn sme_GetFreqBand
2419 \brief Used to get the current band settings.
2420 \param hHal
2421 \pBand pointer to hold the current band value
2422 \- return eHalStatus
2423 -------------------------------------------------------------------------*/
2424eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2425
2426/* ---------------------------------------------------------------------------
2427
2428 \fn sme_SetTxPerTracking
2429 \brief Set Tx PER tracking configuration parameters
2430 \param hHal - The handle returned by macOpen.
2431 \param pTxPerTrackingParam - Tx PER configuration parameters
2432 \return eHalStatus
2433 ---------------------------------------------------------------------------*/
2434eHalStatus sme_SetTxPerTracking (
2435 tHalHandle hHal,
2436 void (*pCallbackfn) (void *pCallbackContext),
2437 void *pCallbackContext,
2438 tpSirTxPerTrackingParam pTxPerTrackingParam);
2439
2440#ifdef WLAN_FEATURE_GTK_OFFLOAD
2441/* ---------------------------------------------------------------------------
2442 \fn sme_SetGTKOffload
2443 \brief API to set GTK offload feature.
2444 \param hHal - The handle returned by macOpen.
2445 \param pRequest - Pointer to the GTK offload request.
2446 \return eHalStatus
2447 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002448eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002449
2450/* ---------------------------------------------------------------------------
2451 \fn sme_GetGTKOffload
2452 \brief API to get GTK offload information.
2453 \param hHal - The handle returned by macOpen.
2454 \param pRequest - Pointer to the GTK offload response.
2455 \return eHalStatus
2456 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002457eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2458 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002459#endif // WLAN_FEATURE_GTK_OFFLOAD
2460
2461#ifdef WLAN_WAKEUP_EVENTS
2462eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2463#endif // WLAN_WAKEUP_EVENTS
2464
2465/* ---------------------------------------------------------------------------
2466 \fn sme_SetTxPerTracking
2467 \brief Set Tx PER tracking configuration parameters
2468 \param hHal - The handle returned by macOpen.
2469 \param pTxPerTrackingParam - Tx PER configuration parameters
2470 \return eHalStatus
2471 ---------------------------------------------------------------------------*/
2472eHalStatus sme_SetTxPerTracking (
2473 tHalHandle hHal,
2474 void (*pCallbackfn) (void *pCallbackContext),
2475 void *pCallbackContext,
2476 tpSirTxPerTrackingParam pTxPerTrackingParam);
2477
2478
2479//return frequency for a particular channel
2480tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2481
2482tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2483
2484#if defined WLAN_FEATURE_P2P_INTERNAL
2485
2486eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2487
2488/* ---------------------------------------------------------------------------
2489 \fn sme_p2pFlushDeviceList
2490 \brief Remove cached P2P result from scan results
2491 \param hHal - The handle returned by macOpen.
2492 \param HDDSessionId - HDD's sessionId. Currently unused.
2493 \return eHalStatus
2494 ---------------------------------------------------------------------------*/
2495eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2496
2497eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2498 tCsrScanResultFilter *pFilter);
2499
2500#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2501
2502/* ---------------------------------------------------------------------------
2503 \fn sme_SetMaxTxPower
2504 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2505 setting will not persist over reboots
2506 \param hHal
2507 \param pBssid BSSID to set the power cap for
2508 \param pBssid pSelfMacAddress self MAC Address
2509 \param pBssid power to set in dB
2510 \- return eHalStatus
2511 -------------------------------------------------------------------------*/
2512eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2513 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2514
Jeff Johnson295189b2012-06-20 16:38:30 -07002515/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002516 \fn sme_SetMaxTxPowerPerBand
2517 \brief Used to set the Maximum Transmit Power for
2518 specific band dynamically. Note: this setting will not persist over reboots
2519 \param band
2520 \param power to set in dB
2521 \- return eHalStatus
2522 -------------------------------------------------------------------------*/
2523eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2524
2525/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002526
schang86c22c42013-03-13 18:41:24 -07002527 \fn sme_SetTxPower
2528
2529 \brief Set Transmit Power dynamically. Note: this setting will
2530 not persist over reboots.
2531
2532 \param hHal
2533 \param sessionId Target Session ID
2534 \param mW power to set in mW
2535 \- return eHalStatus
2536
2537 -------------------------------------------------------------------------------*/
2538eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2539
2540/* ---------------------------------------------------------------------------
2541
Jeff Johnson295189b2012-06-20 16:38:30 -07002542 \fn sme_HideSSID
2543
2544 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2545 not persist over reboots.
2546
2547 \param hHal
2548 \param sessionId
2549 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2550 \- return eHalStatus
2551
2552 -------------------------------------------------------------------------------*/
2553eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002554
2555/* ---------------------------------------------------------------------------
2556
2557 \fn sme_SetTmLevel
2558 \brief Set Thermal Mitigation Level to RIVA
2559 \param hHal - The handle returned by macOpen.
2560 \param newTMLevel - new Thermal Mitigation Level
2561 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002562 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002563 ---------------------------------------------------------------------------*/
2564eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2565
2566/*---------------------------------------------------------------------------
2567
2568 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2569 Host and FW.
2570
2571 \param hHal - HAL handle for device
2572
2573 \return NONE
2574
2575---------------------------------------------------------------------------*/
2576void sme_featureCapsExchange(tHalHandle hHal);
2577
Jeff Johnsond13512a2012-07-17 11:42:19 -07002578/*---------------------------------------------------------------------------
2579
Yathish9f22e662012-12-10 14:21:35 -08002580 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2581 between in Host.
2582
2583 \param hHal - HAL handle for device
2584
2585 \return NONE
2586
2587---------------------------------------------------------------------------*/
2588void sme_disableFeatureCapablity(tANI_U8 feature_index);
2589
2590/*---------------------------------------------------------------------------
2591
Jeff Johnsond13512a2012-07-17 11:42:19 -07002592 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2593 country code
2594 Host and FW.
2595
2596 \param hHal - HAL handle for device
2597 \param pCountry - pointer to country code
2598
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002599 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002600
2601 ---------------------------------------------------------------------------*/
2602eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2603
2604/*---------------------------------------------------------------------------
2605
2606 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2607 country code.
2608
2609 \param hHal - HAL handle for device
2610 \param pCountry - pointer to country code
2611
2612 \return Success or failure
2613
2614 ---------------------------------------------------------------------------*/
2615eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2616
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002617/* ---------------------------------------------------------------------------
2618 \fn sme_transportDebug
2619 \brief Dynamically monitoring Transport channels
2620 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002621 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002622 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002623 \param toggleStallDetect Enable stall detect feature
2624 This feature will take effect to data performance
2625 Not integrate till fully verification
2626 \- return NONE
2627 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002628void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002629
Kiran4a17ebe2013-01-31 10:43:43 -08002630/* ---------------------------------------------------------------------------
2631 \fn sme_ResetPowerValuesFor5G
2632 \brief Reset the power values for 5G band with NV power values.
2633 \param hHal - HAL handle for device
2634 \- return NONE
2635 -------------------------------------------------------------------------*/
2636void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2637
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002638#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002639/* ---------------------------------------------------------------------------
2640 \fn sme_UpdateRoamPrefer5GHz
2641 \brief enable/disable Roam prefer 5G runtime option
2642 This function is called through dynamic setConfig callback function
2643 to configure the Roam prefer 5G runtime option
2644 \param hHal - HAL handle for device
2645 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2646 \- return Success or failure
2647 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002648eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002649
2650/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002651 \fn sme_setRoamIntraBand
2652 \brief enable/disable Intra band roaming
2653 This function is called through dynamic setConfig callback function
2654 to configure the intra band roaming
2655 \param hHal - HAL handle for device
2656 \param nRoamIntraBand Enable/Disable Intra band roaming
2657 \- return Success or failure
2658 -------------------------------------------------------------------------*/
2659eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2660
2661/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002662 \fn sme_UpdateRoamScanNProbes
2663 \brief function to update roam scan N probes
2664 This function is called through dynamic setConfig callback function
2665 to update roam scan N probes
2666 \param hHal - HAL handle for device
2667 \param nProbes number of probe requests to be sent out
2668 \- return Success or failure
2669 -------------------------------------------------------------------------*/
2670eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2671
2672/* ---------------------------------------------------------------------------
2673 \fn sme_UpdateRoamScanHomeAwayTime
2674 \brief function to update roam scan Home away time
2675 This function is called through dynamic setConfig callback function
2676 to update roam scan home away time
2677 \param hHal - HAL handle for device
2678 \param nRoamScanAwayTime Scan home away time
2679 \- return Success or failure
2680 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002681eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2682 const v_U16_t nRoamScanHomeAwayTime,
2683 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002684
2685/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002686 \fn sme_getRoamIntraBand
2687 \brief get Intra band roaming
2688 \param hHal - HAL handle for device
2689 \- return Success or failure
2690 -------------------------------------------------------------------------*/
2691v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2692
2693/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002694 \fn sme_getRoamScanNProbes
2695 \brief get N Probes
2696 \param hHal - HAL handle for device
2697 \- return Success or failure
2698 -------------------------------------------------------------------------*/
2699v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2700
2701/* ---------------------------------------------------------------------------
2702 \fn sme_getRoamScanHomeAwayTime
2703 \brief get Roam scan home away time
2704 \param hHal - HAL handle for device
2705 \- return Success or failure
2706 -------------------------------------------------------------------------*/
2707v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2708
2709/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002710 \fn sme_UpdateImmediateRoamRssiDiff
2711 \brief Update nImmediateRoamRssiDiff
2712 This function is called through dynamic setConfig callback function
2713 to configure nImmediateRoamRssiDiff
2714 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2715 \param hHal - HAL handle for device
2716 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2717 candidate and current AP.
2718 \- return Success or failure
2719 -------------------------------------------------------------------------*/
2720
2721eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002722
Srinivas Girigowdade697412013-02-14 16:31:48 -08002723/* ---------------------------------------------------------------------------
2724 \fn sme_UpdateRoamRssiDiff
2725 \brief Update RoamRssiDiff
2726 This function is called through dynamic setConfig callback function
2727 to configure RoamRssiDiff
2728 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2729 \param hHal - HAL handle for device
2730 \param RoamRssiDiff - minimum rssi difference between potential
2731 candidate and current AP.
2732 \- return Success or failure
2733 -------------------------------------------------------------------------*/
2734
2735eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2736
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002737/*--------------------------------------------------------------------------
2738 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2739 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2740 isFastTransitionEnabled.
2741 This is a synchronuous call
2742 \param hHal - The handle returned by macOpen.
2743 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2744 Other status means SME is failed to update isFastTransitionEnabled.
2745 \sa
2746 --------------------------------------------------------------------------*/
2747
2748eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2749 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002750
2751/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002752 \fn sme_UpdateWESMode
2753 \brief Update WESMode
2754 This function is called through dynamic setConfig callback function
2755 to configure isWESModeEnabled
2756 \param hHal - HAL handle for device
2757 \param isWESModeEnabled - Enable/Disable WES Mode
2758 \- return Success or failure
2759 -------------------------------------------------------------------------*/
2760eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2761
2762/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002763 \fn sme_SetRoamScanControl
2764 \brief Set roam scan control
2765 This function is called to set roam scan control
2766 if roam scan control is set to 0, roaming scan cache is cleared
2767 any value other than 0 is treated as invalid value
2768 \param hHal - HAL handle for device
2769 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2770 Other status means SME failure to update
2771 -------------------------------------------------------------------------*/
2772eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002773#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002774
2775#ifdef FEATURE_WLAN_LFR
2776/*--------------------------------------------------------------------------
2777 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002778 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002779 isFastRoamIniFeatureEnabled.
2780 This is a synchronuous call
2781 \param hHal - The handle returned by macOpen.
2782 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2783 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2784 \sa
2785 --------------------------------------------------------------------------*/
2786
Srinivas Girigowdade697412013-02-14 16:31:48 -08002787eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002788 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002789
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002790/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302791 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2792 When Supplicant issue enabled / disable fwr based roaming on the basis
2793 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2794
2795 This is a synchronous call
2796 \param hHal - The handle returned by macOpen.
2797 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2798 Other status means SME is failed to (enabled/disabled) offload scan.
2799 \sa
2800 --------------------------------------------------------------------------*/
2801
2802eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2803 const v_BOOL_t isFastRoamEnabled);
2804
2805/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002806 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2807 Enable/disable LFR MAWC support at runtime
2808 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2809 isMAWCIniFeatureEnabled.
2810 This is a synchronous call
2811 \param hHal - The handle returned by macOpen.
2812 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2813 Other status means SME is failed to update MAWCEnabled.
2814 \sa
2815 --------------------------------------------------------------------------*/
2816eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2817 const v_BOOL_t MAWCEnabled);
2818
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002819
2820#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2821/*--------------------------------------------------------------------------
2822 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2823 This is a synchronuous call
2824 \param hHal - The handle returned by macOpen.
2825 \return eHAL_STATUS_SUCCESS
2826 Other status means SME is failed
2827 \sa
2828 --------------------------------------------------------------------------*/
2829
2830eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2831 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2832#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002833#endif /* FEATURE_WLAN_LFR */
2834
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002835#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002836/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002837 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002838 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002839 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002840 This is a synchronuous call
2841 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002842 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2843 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002844 \sa
2845 --------------------------------------------------------------------------*/
2846
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002847eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2848 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002849
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002850#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002851
2852/*--------------------------------------------------------------------------
2853 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2854 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2855 fEnableFwRssiMonitoring.
2856 This is a synchronuous call
2857 \param hHal - The handle returned by macOpen.
2858 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2859 Other status means SME is failed to update
2860 \sa
2861 --------------------------------------------------------------------------*/
2862
2863eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2864 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002865
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002866#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002867/*--------------------------------------------------------------------------
2868 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2869 This is a synchronuous call
2870 \param hHal - The handle returned by macOpen.
2871 \return eHAL_STATUS_SUCCESS - SME update config successful.
2872 Other status means SME is failed to update
2873 \sa
2874 --------------------------------------------------------------------------*/
2875eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2876 v_U8_t neighborLookupRssiThreshold);
2877
2878/*--------------------------------------------------------------------------
2879 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2880 This is a synchronuous call
2881 \param hHal - The handle returned by macOpen.
2882 \return eHAL_STATUS_SUCCESS - SME update config successful.
2883 Other status means SME is failed to update
2884 \sa
2885 --------------------------------------------------------------------------*/
2886eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2887 v_U8_t neighborReassocRssiThreshold);
2888
2889/*--------------------------------------------------------------------------
2890 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2891 This is a synchronuous call
2892 \param hHal - The handle returned by macOpen.
2893 \return eHAL_STATUS_SUCCESS - SME update config successful.
2894 Other status means SME is failed to update
2895 \sa
2896 --------------------------------------------------------------------------*/
2897v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2898
2899/*--------------------------------------------------------------------------
2900 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2901 This is a synchronuous call
2902 \param hHal - The handle returned by macOpen.
2903 \return eHAL_STATUS_SUCCESS - SME update config successful.
2904 Other status means SME is failed to update
2905 \sa
2906 --------------------------------------------------------------------------*/
2907eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2908 v_U16_t neighborScanResultsRefreshPeriod);
2909
2910/*--------------------------------------------------------------------------
2911 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2912 This is a synchronuous call
2913 \param hHal - The handle returned by macOpen.
2914 \return eHAL_STATUS_SUCCESS - SME update config successful.
2915 Other status means SME is failed to update
2916 \sa
2917 --------------------------------------------------------------------------*/
2918v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2919
2920/*--------------------------------------------------------------------------
2921 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2922 This is a synchronuous call
2923 \param hHal - The handle returned by macOpen.
2924 \return eHAL_STATUS_SUCCESS - SME update config successful.
2925 Other status means SME is failed to update
2926 \sa
2927 --------------------------------------------------------------------------*/
2928v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2929
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002930/* ---------------------------------------------------------------------------
2931 \fn sme_UpdateEmptyScanRefreshPeriod
2932 \brief Update nEmptyScanRefreshPeriod
2933 This function is called through dynamic setConfig callback function
2934 to configure nEmptyScanRefreshPeriod
2935 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2936 \param hHal - HAL handle for device
2937 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2938 \- return Success or failure
2939 -------------------------------------------------------------------------*/
2940eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2941
2942/* ---------------------------------------------------------------------------
2943 \fn sme_setNeighborScanMinChanTime
2944 \brief Update nNeighborScanMinChanTime
2945 This function is called through dynamic setConfig callback function
2946 to configure gNeighborScanChannelMinTime
2947 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2948 \param hHal - HAL handle for device
2949 \param nNeighborScanMinChanTime - Channel minimum dwell time
2950 \- return Success or failure
2951 -------------------------------------------------------------------------*/
2952eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2953
2954/* ---------------------------------------------------------------------------
2955 \fn sme_setNeighborScanMaxChanTime
2956 \brief Update nNeighborScanMaxChanTime
2957 This function is called through dynamic setConfig callback function
2958 to configure gNeighborScanChannelMaxTime
2959 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2960 \param hHal - HAL handle for device
2961 \param nNeighborScanMinChanTime - Channel maximum dwell time
2962 \- return Success or failure
2963 -------------------------------------------------------------------------*/
2964eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2965
2966/* ---------------------------------------------------------------------------
2967 \fn sme_getNeighborScanMinChanTime
2968 \brief get neighbor scan min channel time
2969 \param hHal - The handle returned by macOpen.
2970 \return v_U16_t - channel min time value
2971 -------------------------------------------------------------------------*/
2972v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2973
2974/* ---------------------------------------------------------------------------
2975 \fn sme_getNeighborScanMaxChanTime
2976 \brief get neighbor scan max channel time
2977 \param hHal - The handle returned by macOpen.
2978 \return v_U16_t - channel max time value
2979 -------------------------------------------------------------------------*/
2980v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
2981
2982/* ---------------------------------------------------------------------------
2983 \fn sme_setNeighborScanPeriod
2984 \brief Update nNeighborScanPeriod
2985 This function is called through dynamic setConfig callback function
2986 to configure nNeighborScanPeriod
2987 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
2988 \param hHal - HAL handle for device
2989 \param nNeighborScanPeriod - neighbor scan period
2990 \- return Success or failure
2991 -------------------------------------------------------------------------*/
2992eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
2993
2994/* ---------------------------------------------------------------------------
2995 \fn sme_getNeighborScanPeriod
2996 \brief get neighbor scan period
2997 \param hHal - The handle returned by macOpen.
2998 \return v_U16_t - neighbor scan period
2999 -------------------------------------------------------------------------*/
3000v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3001
3002#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003003
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003004#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003005/*--------------------------------------------------------------------------
3006 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3007 This is a synchronuous call
3008 \param hHal - The handle returned by macOpen.
3009 \return eHAL_STATUS_SUCCESS - SME update config successful.
3010 Other status means SME is failed to update
3011 \sa
3012 --------------------------------------------------------------------------*/
3013v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3014
3015/*--------------------------------------------------------------------------
3016 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3017 This is a synchronuous call
3018 \param hHal - The handle returned by macOpen.
3019 \return eHAL_STATUS_SUCCESS - SME update config successful.
3020 Other status means SME is failed to update
3021 \sa
3022 --------------------------------------------------------------------------*/
3023eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3024 tANI_U8 numChannels);
3025
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003026#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003027/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003028 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003029 This is a synchronuous call
3030 \param hHal - The handle returned by macOpen.
3031 \return eHAL_STATUS_SUCCESS - SME update config successful.
3032 Other status means SME is failed to update
3033 \sa
3034 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003035eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003036 tANI_U8 *pChannelList,
3037 tANI_U8 numChannels);
3038#endif
3039
Srinivas Girigowdade697412013-02-14 16:31:48 -08003040/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003041 \brief sme_getRoamScanChannelList() - get roam scan channel list
3042 This is a synchronuous call
3043 \param hHal - The handle returned by macOpen.
3044 \return eHAL_STATUS_SUCCESS - SME update config successful.
3045 Other status means SME is failed to update
3046 \sa
3047 --------------------------------------------------------------------------*/
3048eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3049 tANI_U8 *pNumChannels);
3050
3051/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003052 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003053 This is a synchronuous call
3054 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003055 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003056 FALSE (0) - if feature is disabled (compile or runtime)
3057 \sa
3058 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003059tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003060
3061/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003062 \brief sme_getWESMode() - getWES Mode
3063 This is a synchronous call
3064 \param hHal - The handle returned by macOpen.
3065 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3066 \sa
3067 --------------------------------------------------------------------------*/
3068v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3069
3070/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003071 \brief sme_GetRoamScanControl() - get scan control
3072 This is a synchronous call
3073 \param hHal - The handle returned by macOpen.
3074 \return v_BOOL_t - Enabled(1)/Disabled(0)
3075 \sa
3076 --------------------------------------------------------------------------*/
3077v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3078
3079/* ---------------------------------------------------------------------------
3080 \fn sme_UpdateEmptyScanRefreshPeriod
3081 \brief Update nnEmptyScanRefreshPeriod
3082 This function is called through dynamic setConfig callback function
3083 to configure nnEmptyScanRefreshPeriod
3084 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3085 \param hHal - HAL handle for device
3086 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3087 \- return Success or failure
3088 -------------------------------------------------------------------------*/
3089
3090/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003091 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3092 This is a synchronuous call
3093 \param hHal - The handle returned by macOpen.
3094 \return TRUE (1) - if the feature is enabled
3095 FALSE (0) - if feature is disabled (compile or runtime)
3096 \sa
3097 --------------------------------------------------------------------------*/
3098tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3099
3100/*--------------------------------------------------------------------------
3101 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3102 This is a synchronuous call
3103 \param hHal - The handle returned by macOpen.
3104 \return TRUE (1) - if the feature is enabled
3105 FALSE (0) - if feature is disabled (compile or runtime)
3106 \sa
3107 --------------------------------------------------------------------------*/
3108tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3109
Srinivas Girigowdade697412013-02-14 16:31:48 -08003110#endif
3111
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003112#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3113/*--------------------------------------------------------------------------
3114 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3115 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3116 gRoamScanOffloadEnabled.
3117 This is a synchronous call
3118 \param hHal - The handle returned by macOpen.
3119 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3120 Other status means SME is failed to update.
3121 \sa
3122 --------------------------------------------------------------------------*/
3123
3124eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3125#endif
3126
3127
Srinivas Girigowdade697412013-02-14 16:31:48 -08003128/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003129 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303130 \brief Check if a feature is enabled by FW
3131
3132 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003133 A value from enum placeHolderInCapBitmap
3134
3135 \- return 1/0 (TRUE/FALSE)
3136 -------------------------------------------------------------------------*/
3137tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303138
3139/* ---------------------------------------------------------------------------
3140 \fn sme_IsFeatureSupportedByDriver
3141 \brief Check if a feature is enabled by driver
3142
3143 \param featEnumValue - Enumeration value of the feature to be checked.
3144 A value from enum placeHolderInCapBitmap
3145
3146 \- return 1/0 (TRUE/FALSE)
3147 -------------------------------------------------------------------------*/
3148tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3149
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003150#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303151
3152/* ---------------------------------------------------------------------------
3153 \fn sme_SendTdlsLinkEstablishParams
3154 \brief API to send TDLS Link Establishment Parameters.
3155
3156 \param peerMac - peer's Mac Adress.
3157 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3158 \- return VOS_STATUS_SUCCES
3159 -------------------------------------------------------------------------*/
3160
3161VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
3162 tANI_U8 sessionId,
3163 tSirMacAddr peerMac,
3164 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
3165
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003166/* ---------------------------------------------------------------------------
3167 \fn sme_SendTdlsMgmtFrame
3168 \brief API to send TDLS management frames.
3169
3170 \param peerMac - peer's Mac Adress.
3171 \param frame_type - Type of TDLS mgmt frame to be sent.
3172 \param dialog - dialog token used in the frame.
3173 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303174 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003175 \param buf - additional IEs to be included
3176 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003177 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003178 \- return VOS_STATUS_SUCCES
3179 -------------------------------------------------------------------------*/
3180VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303181 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 -08003182/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003183 \fn sme_ChangeTdlsPeerSta
3184 \brief API to Update TDLS peer sta parameters.
3185
3186 \param peerMac - peer's Mac Adress.
3187 \param staParams - Peer Station Parameters.
3188 \- return VOS_STATUS_SUCCES
3189 -------------------------------------------------------------------------*/
3190VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
3191 tCsrStaParams *pstaParams);
3192/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003193 \fn sme_AddTdlsPeerSta
3194 \brief API to Add TDLS peer sta entry.
3195
3196 \param peerMac - peer's Mac Adress.
3197 \- return VOS_STATUS_SUCCES
3198 -------------------------------------------------------------------------*/
3199VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3200/* ---------------------------------------------------------------------------
3201 \fn sme_DeleteTdlsPeerSta
3202 \brief API to Delete TDLS peer sta entry.
3203
3204 \param peerMac - peer's Mac Adress.
3205 \- return VOS_STATUS_SUCCES
3206 -------------------------------------------------------------------------*/
3207VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003208/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003209 \fn sme_SetTdlsPowerSaveProhibited
3210 \API to set/reset the isTdlsPowerSaveProhibited.
3211
3212 \- return void
3213 -------------------------------------------------------------------------*/
3214void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003215#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303216/* ---------------------------------------------------------------------------
3217 \fn sme_IsPmcBmps
3218 \brief API to Check if PMC state is BMPS.
3219
3220 \- return v_BOOL_t
3221 -------------------------------------------------------------------------*/
3222v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3223
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003224#ifdef FEATURE_WLAN_TDLS_INTERNAL
3225typedef struct smeTdlsDisResult
3226{
3227 tSirMacAddr tdlsPeerMac;
3228 v_S7_t tdlsPeerRssi;
3229} tSmeTdlsDisResult;
3230
3231VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3232v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
3233 tSmeTdlsDisResult *disResult, v_U8_t listType);
3234VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3235VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003236#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003237eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003238
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003239/*
3240 * SME API to enable/disable WLAN driver initiated SSR
3241 */
3242void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3243
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303244/* ---------------------------------------------------------------------------
3245
3246 \fn sme_SetPhyMode
3247
3248 \brief Changes the PhyMode.
3249
3250 \param hHal - The handle returned by macOpen.
3251
3252 \param phyMode new phyMode which is to set
3253
3254 \return eHalStatus SUCCESS.
3255
3256 -------------------------------------------------------------------------------*/
3257eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3258
3259/* ---------------------------------------------------------------------------
3260
3261 \fn sme_GetPhyMode
3262
3263 \brief gets current PhyMode.
3264
3265 \param hHal - The handle returned by macOpen.
3266
3267 \return eHalStatus PhyMode
3268
3269 -------------------------------------------------------------------------------*/
3270eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3271
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003272/*
3273 * SME API to determine the channel bonding mode
3274 */
3275VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3276
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003277#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3278/*--------------------------------------------------------------------------
3279 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3280 from CSR.
3281 This is a synchronous call
3282 \param hHal - The handle returned by macOpen
3283 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3284 BSSID, channel etc.)
3285 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3286 Other status means SME is failed to send the request.
3287 \sa
3288 --------------------------------------------------------------------------*/
3289
3290eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3291#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003292/*--------------------------------------------------------------------------
3293 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3294 is any connected session .
3295 This is a synchronous call
3296 \param hHal - The handle returned by macOpen
3297 \return VOS_STATUS - SME passed the request to CSR successfully.
3298 Other status means SME is failed to send the request.
3299 \sa
3300 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003301VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003302
Agarwal Ashish57e84372014-12-05 18:26:53 +05303303/*--------------------------------------------------------------------------
3304 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3305 is any connected session .
3306 This is a synchronous call
3307 \param hHal - The handle returned by macOpen
3308 \return VOS_STATUS - SME passed the request to CSR successfully.
3309 Other status means SME is failed to send the request.
3310 \sa
3311 --------------------------------------------------------------------------*/
3312VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3313
Leo Chang9056f462013-08-01 19:21:11 -07003314#ifdef FEATURE_WLAN_LPHB
3315/* ---------------------------------------------------------------------------
3316 \fn sme_LPHBConfigReq
3317 \API to make configuration LPHB within FW.
3318 \param hHal - The handle returned by macOpen
3319 \param lphdReq - LPHB request argument by client
3320 \param pCallbackfn - LPHB timeout notification callback function pointer
3321 \- return Configuration message posting status, SUCCESS or Fail
3322 -------------------------------------------------------------------------*/
3323eHalStatus sme_LPHBConfigReq(
3324 tHalHandle hHal,
3325 tSirLPHBReq *lphdReq,
3326 void (*pCallbackfn)(void *pAdapter, void *indParam));
3327#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003328
3329/* ---------------------------------------------------------------------------
3330 \fn sme_AddPeriodicTxPtrn
3331 \brief API to Periodic TX Pattern Offload feature
3332 \param hHal - The handle returned by macOpen
3333 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3334 \return eHalStatus
3335 ---------------------------------------------------------------------------*/
3336eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3337 *addPeriodicTxPtrnParams);
3338
3339/* ---------------------------------------------------------------------------
3340 \fn sme_DelPeriodicTxPtrn
3341 \brief API to Periodic TX Pattern Offload feature
3342 \param hHal - The handle returned by macOpen
3343 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3344 \return eHalStatus
3345 ---------------------------------------------------------------------------*/
3346eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3347 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003348/*--------------------------------------------------------------------------
3349 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3350 scan parameter.
3351 This is a synchronous call
3352 \param hHal - The handle returned by macOpen
3353 \return None.
3354 \sa
3355 --------------------------------------------------------------------------*/
3356void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3357 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303358
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003359/* ---------------------------------------------------------------------------
3360 \fn sme_SendRateUpdateInd
3361 \brief API to Update rate
3362 \param hHal - The handle returned by macOpen
3363 \param rateUpdateParams - Pointer to rate update params
3364 \return eHalStatus
3365 ---------------------------------------------------------------------------*/
3366eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3367
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303368/*
3369 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3370 * triggers
3371 * return status
3372*/
3373eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3374 tANI_U8 *bssid,
3375 tSmeFastRoamTrigger fastRoamTrig);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303376
3377eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
3378 tANI_U8 *pBSSId,
3379 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003380
3381void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303382
3383#ifdef FEATURE_WLAN_BATCH_SCAN
3384/* ---------------------------------------------------------------------------
3385 \fn sme_SetBatchScanReq
3386 \brief API to set batch scan request in FW
3387 \param hHal - The handle returned by macOpen.
3388 \param pRequest - Pointer to the batch request.
3389 \param sessionId - session ID
3390 \param callbackRoutine - HDD callback which needs to be invoked after
3391 getting set batch scan response from FW
3392 \param callbackContext - pAdapter context
3393 \return eHalStatus
3394 ---------------------------------------------------------------------------*/
3395eHalStatus
3396sme_SetBatchScanReq
3397(
3398 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3399 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3400 void *callbackContext
3401);
3402
3403/* ---------------------------------------------------------------------------
3404 \fn sme_TriggerBatchScanResultInd
3405 \brief API to trigger batch scan result indications from from FW
3406 \param hHal - The handle returned by macOpen.
3407 \param pRequest - Pointer to get batch request.
3408 \param sessionId - session ID
3409 \param callbackRoutine - HDD callback which needs to be invoked after
3410 getting get batch scan response from FW
3411 \param callbackContext - pAdapter context
3412 \return eHalStatus
3413 ---------------------------------------------------------------------------*/
3414eHalStatus
3415sme_TriggerBatchScanResultInd
3416(
3417 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3418 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3419 void *callbackContext
3420);
3421
3422/* ---------------------------------------------------------------------------
3423 \fn sme_StopBatchScanInd
3424 \brief API to stop batch scan request in FW
3425 \param hHal - The handle returned by macOpen.
3426 \param pRequest - Pointer to stop batch indication
3427 \return eHalStatus
3428 ---------------------------------------------------------------------------*/
3429eHalStatus
3430sme_StopBatchScanInd
3431(
3432 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3433);
3434
3435#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003436
3437#ifdef FEATURE_WLAN_CH_AVOID
3438/* ---------------------------------------------------------------------------
3439 \fn sme_AddChAvoidCallback
3440 \brief Used to plug in callback function
3441 Which notify channel may not be used with SAP or P2PGO mode.
3442 Notification come from FW.
3443 \param hHal
3444 \param pCallbackfn : callback function pointer should be plugged in
3445 \- return eHalStatus
3446 -------------------------------------------------------------------------*/
3447eHalStatus sme_AddChAvoidCallback
3448(
3449 tHalHandle hHal,
3450 void (*pCallbackfn)(void *pAdapter, void *indParam)
3451);
3452#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003453eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303454/* ---------------------------------------------------------------------------
3455 \fn sme_requestTypetoString
3456 \brief API to convert requestType enum values
3457 to string.
3458 ---------------------------------------------------------------------------*/
3459const char * sme_requestTypetoString(const v_U8_t requestType);
3460/* ---------------------------------------------------------------------------
3461 \fn sme_PmcStatetoString
3462 \brief API to convert PmcState enum values
3463 to string.
3464 ---------------------------------------------------------------------------*/
3465const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303466
3467eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3468
Agarwal Ashish5e414792014-06-08 15:25:23 +05303469tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303470
3471// tdlsoffchan
3472VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3473 tANI_U8 sessionId,
3474 tSirMacAddr peerMac,
3475 tANI_S32 tdlsOffCh,
3476 tANI_S32 tdlsOffChBwOffset,
3477 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303478eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3479 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303480void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303481
3482void sme_resetCoexEevent(tHalHandle hHal);
3483
Peng Xu117eab42014-09-25 13:33:27 +05303484tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3485tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303486#ifdef WLAN_FEATURE_AP_HT40_24G
3487void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3488 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303489eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3490 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303491#endif
Peng Xu117eab42014-09-25 13:33:27 +05303492
Agarwal Ashish738843c2014-09-25 12:27:56 +05303493void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3494
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303495/* HDD Callback function */
3496typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3497
3498eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3499 u8 *pCmd,
3500 int length,
3501 pEncryptMsgRSPCb encCB);
3502
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303503/* ---------------------------------------------------------------------------
3504 \fn sme_RegisterBtCoexTDLSCallback
3505 \brief Used to plug in callback function
3506 Which notify btcoex on or off.
3507 Notification come from FW.
3508 \param hHal
3509 \param pCallbackfn : callback function pointer should be plugged in
3510 \- return eHalStatus
3511 -------------------------------------------------------------------------*/
3512eHalStatus sme_RegisterBtCoexTDLSCallback
3513(
3514 tHalHandle hHal,
3515 void (*pCallbackfn)(void *pAdapter, int)
3516);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303517
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303518/* ---------------------------------------------------------------------------
3519 \fn smeNeighborRoamIsHandoffInProgress
3520
3521 \brief This function is a wrapper to call csrNeighborRoamIsHandoffInProgress
3522
3523 \param hHal - The handle returned by macOpen.
3524
3525 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3526 eANI_BOOLEAN_FALSE otherwise
3527---------------------------------------------------------------------------*/
3528tANI_BOOLEAN smeNeighborRoamIsHandoffInProgress(tHalHandle hHal);
3529
Jeff Johnson295189b2012-06-20 16:38:30 -07003530#endif //#if !defined( __SME_API_H )