blob: ce3257623169298e909ce1a626342037f508ec5a [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Siddharth Bhald8a95e82015-02-12 20:14:52 +05302 * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
Kiet Lam0fb93dd2014-02-19 00:32:59 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Kiet Lam0fb93dd2014-02-19 00:32:59 -080026 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Jeff Johnson295189b2012-06-20 16:38:30 -070031#if !defined( __SME_API_H )
32#define __SME_API_H
33
34
35/**=========================================================================
36
37 \file smeApi.h
38
39 \brief prototype for SME APIs
40
Jeff Johnson295189b2012-06-20 16:38:30 -070041
42 ========================================================================*/
43
44/* $Header$ */
45
46/*--------------------------------------------------------------------------
47 Include Files
48 ------------------------------------------------------------------------*/
49#include "ccmApi.h"
50#include "csrApi.h"
51#include "pmcApi.h"
52#include "vos_mq.h"
53#include "vos_lock.h"
54#include "halTypes.h"
55#include "sirApi.h"
56#include "btcApi.h"
57#include "vos_nvitem.h"
58#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070059
Jeff Johnsone7245742012-09-05 17:12:55 -070060#ifdef FEATURE_OEM_DATA_SUPPORT
61#include "oemDataApi.h"
62#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070063
64#if defined WLAN_FEATURE_VOWIFI
65#include "smeRrmInternal.h"
66#endif
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 Bhald8a95e82015-02-12 20:14:52 +0530282/* ---------------------------------------------------------------------------
283 \fn sme_SpoofMacAddrReq
284 \brief SME API to send Spoof Mac Addr req to HAL
285 \param macaddr: mac address to be sent
286 \- return eHalStatus
287 -------------------------------------------------------------------------*/
288eHalStatus sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530289
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530290typedef enum
291{
292 eSME_ROAM_TRIGGER_NONE = 0,
293 eSME_ROAM_TRIGGER_SCAN = 1,
294 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
295 eSME_ROAM_TRIGGER_MAX
296} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700297
298/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530299 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700300 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700301/*--------------------------------------------------------------------------
302
303 \brief sme_Open() - Initialze all SME modules and put them at idle state
304
305 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
306 successfully return, all modules are at idle state ready to start.
307
308 smeOpen must be called before any other SME APIs can be involved.
309 smeOpen must be called after macOpen.
310
311 \param hHal - The handle returned by macOpen.
312
313 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
314
315 Other status means SME is failed to be initialized
316 \sa
317
318 --------------------------------------------------------------------------*/
319eHalStatus sme_Open(tHalHandle hHal);
320
321/*--------------------------------------------------------------------------
322
323 \brief sme_Close() - Release all SME modules and their resources.
324
325 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
326 return, all modules are at closed state.
327
328 No SME APIs can be involved after sme_Close except sme_Open.
329 sme_Close must be called before macClose.
330
331 \param hHal - The handle returned by macOpen.
332
333 \return eHAL_STATUS_SUCCESS - SME is successfully close.
334
335 Other status means SME is failed to be closed but caller still cannot
336 call any other SME functions except smeOpen.
337 \sa
338
339 --------------------------------------------------------------------------*/
340eHalStatus sme_Close(tHalHandle hHal);
341
342/*--------------------------------------------------------------------------
343
344 \brief sme_Start() - Put all SME modules at ready state.
345
346 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
347 successfully return, all modules are ready to run.
348
349 \param hHal - The handle returned by macOpen.
350
351 \return eHAL_STATUS_SUCCESS - SME is ready.
352
353 Other status means SME is failed to start.
354 \sa
355
356 --------------------------------------------------------------------------*/
357eHalStatus sme_Start(tHalHandle hHal);
358
359/*--------------------------------------------------------------------------
360
361 \brief sme_Stop() - Stop all SME modules and put them at idle state
362
363 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
364 return, all modules are at idle state ready to start.
365
366
367 \param hHal - The handle returned by macOpen.
368
Kiet Lama72a2322013-11-15 11:18:11 +0530369 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700370
371 \return eHAL_STATUS_SUCCESS - SME is stopped.
372
373 Other status means SME is failed to stop but caller should still consider
374 SME is stopped.
375 \sa
376
377 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530378eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700379
380
381/*--------------------------------------------------------------------------
382
383 \brief sme_OpenSession() - Open a session for scan/roam operation.
384
385 This is a synchronous API.
386
387
388 \param hHal - The handle returned by macOpen.
389 \param callback - A pointer to the function caller specifies for roam/connect status indication
390 \param pContext - The context passed with callback
391 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
392 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
393
394 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
395
396 Other status means SME is failed to open the session.
397 eHAL_STATUS_RESOURCES - no more session available.
398 \sa
399
400 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700401eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
402 void *pContext, tANI_U8 *pSelfMacAddr,
403 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700404
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700405/*--------------------------------------------------------------------------
406
407 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
408 \param hHal - The handle returned by macOpen.
409 \param currDeviceMode - Current operating device mode.
410 --------------------------------------------------------------------------*/
411
412void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700413
414/*--------------------------------------------------------------------------
415
416 \brief sme_CloseSession() - Open a session for scan/roam operation.
417
418 This is a synchronous API.
419
420
421 \param hHal - The handle returned by macOpen.
422
423 \param sessionId - A previous opened session's ID.
424
425 \return eHAL_STATUS_SUCCESS - session is closed.
426
427 Other status means SME is failed to open the session.
428 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
429 \sa
430
431 --------------------------------------------------------------------------*/
432eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
433 csrRoamSessionCloseCallback callback, void *pContext);
434
435
436
437/*--------------------------------------------------------------------------
438
439 \brief sme_UpdateConfig() - Change configurations for all SME moduels
440
441 The function updates some configuration for modules in SME, CCM, CSR, etc
442 during SMEs close -> open sequence.
443
444 Modules inside SME apply the new configuration at the next transaction.
445
446
447 \param hHal - The handle returned by macOpen.
448 \Param pSmeConfigParams - a pointer to a caller allocated object of
449 typedef struct _smeConfigParams.
450
451 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
452
453 Other status means SME is failed to update the config parameters.
454 \sa
455
456 --------------------------------------------------------------------------*/
457eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
458
459#ifdef FEATURE_WLAN_SCAN_PNO
460/*--------------------------------------------------------------------------
461
462 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
463
464 It is used at driver start up to inform RIVA of the default channel
465 configuration.
466
467 This is a synchronuous call
468
469 \param hHal - The handle returned by macOpen.
470
471 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
472
473 Other status means SME is failed to update the channel config.
474 \sa
475
476 --------------------------------------------------------------------------*/
477eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
478
479#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700480/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530481
482 \brief sme_UpdateChannelList() - Update channel List in FW.
483
484
485 \param hHal - The handle returned by macOpen.
486
487 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
488
489 Other status means SME is failed to update the channel config.
490 \sa
491
492 --------------------------------------------------------------------------*/
493eHalStatus sme_UpdateChannelList(tHalHandle hHal);
494
495/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700496
497 \brief sme_set11dinfo() - Set the 11d information about valid channels
498 and there power using information from nvRAM
499 This function is called only for AP.
500
501 This is a synchronuous call
502
503 \param hHal - The handle returned by macOpen.
504 \Param pSmeConfigParams - a pointer to a caller allocated object of
505 typedef struct _smeConfigParams.
506
507 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
508
509 Other status means SME is failed to update the config parameters.
510 \sa
511--------------------------------------------------------------------------*/
512
513eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
514
515/*--------------------------------------------------------------------------
516
517 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
518
519 This is a synchronuous call
520
521 \param hHal - The handle returned by HostapdAdapter.
522 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
523
524 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
525
526 Other status means, failed to get the current regulatory domain.
527 \sa
528--------------------------------------------------------------------------*/
529
530eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
531
532eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
533
Jeff Johnson295189b2012-06-20 16:38:30 -0700534
535/* ---------------------------------------------------------------------------
536 \fn sme_ChangeConfigParams
537 \brief The SME API exposed for HDD to provide config params to SME during
538 SMEs stop -> start sequence.
539
540 If HDD changed the domain that will cause a reset. This function will
541 provide the new set of 11d information for the new domain. Currrently this
542 API provides info regarding 11d only at reset but we can extend this for
543 other params (PMC, QoS) which needs to be initialized again at reset.
544
545 This is a synchronuous call
546
547 \param hHal - The handle returned by macOpen.
548
549 \Param
550 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
551 currently provides 11d related information like Country code,
552 Regulatory domain, valid channel list, Tx power per channel, a
553 list with active/passive scan allowed per valid channel.
554
555 \return eHalStatus
556 ---------------------------------------------------------------------------*/
557eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
558 tCsrUpdateConfigParam *pUpdateConfigParam);
559
560/*--------------------------------------------------------------------------
561
562 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
563 is ready tio run.
564
565 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
566 to running state.
567
568
569 \param hHal - The handle returned by macOpen.
570
571 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
572
573 Other status means SME failed to send the message to PE.
574 \sa
575
576 --------------------------------------------------------------------------*/
577eHalStatus sme_HDDReadyInd(tHalHandle hHal);
578
579
580/*--------------------------------------------------------------------------
581
582 \brief sme_ProcessMsg() - The main message processor for SME.
583
584 The function is called by a message dispatcher when to process a message
585 targeted for SME.
586
587
588 \param hHal - The handle returned by macOpen.
589 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
590
591 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
592
593 Other status means SME failed to process the message.
594 \sa
595
596 --------------------------------------------------------------------------*/
597eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
598
599v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
600
601/* ---------------------------------------------------------------------------
602 \fn sme_ScanRequest
603 \brief a wrapper function to Request a 11d or full scan from CSR.
604 \param pScanRequestID - pointer to an object to get back the request ID
605 \param callback - a callback function that scan calls upon finish, will not
606 be called if csrScanRequest returns error
607 \param pContext - a pointer passed in for the callback
608 \return eHalStatus
609 ---------------------------------------------------------------------------*/
610eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
611 tANI_U32 *pScanRequestID,
612 csrScanCompleteCallback callback, void *pContext);
613
614
615/* ---------------------------------------------------------------------------
616 \fn sme_ScanSetBGScanparams
617 \brief a wrapper function to request CSR to set BG scan params in PE
618 \param pScanReq - BG scan request structure
619 \return eHalStatus
620 ---------------------------------------------------------------------------*/
621eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
622
623
624/* ---------------------------------------------------------------------------
625 \fn sme_ScanGetResult
626 \brief a wrapper function to request scan results from CSR.
627 \param pFilter - If pFilter is NULL, all cached results are returned
628 \param phResult - an object for the result.
629 \return eHalStatus
630 ---------------------------------------------------------------------------*/
631eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
632 tScanResultHandle *phResult);
633
634
635/* ---------------------------------------------------------------------------
636 \fn sme_ScanFlushResult
637 \brief a wrapper function to request CSR to clear scan results.
638 \return eHalStatus
639 ---------------------------------------------------------------------------*/
640eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530641
642/*
643 * ---------------------------------------------------------------------------
644 * \fn sme_FilterScanResults
645 * \brief a wrapper function to request CSR to filter the scan results based
646 * on valid chennel list.
647 * \return eHalStatus
648 *---------------------------------------------------------------------------
649 */
650eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
651
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700652eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700653
654/* ---------------------------------------------------------------------------
655 \fn sme_ScanResultGetFirst
656 \brief a wrapper function to request CSR to returns the first element of
657 scan result.
658 \param hScanResult - returned from csrScanGetResult
659 \return tCsrScanResultInfo * - NULL if no result
660 ---------------------------------------------------------------------------*/
661tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
662 tScanResultHandle hScanResult);
663
664/* ---------------------------------------------------------------------------
665 \fn sme_ScanResultGetNext
666 \brief a wrapper function to request CSR to returns the next element of
667 scan result. It can be called without calling csrScanResultGetFirst
668 first
669 \param hScanResult - returned from csrScanGetResult
670 \return Null if no result or reach the end
671 ---------------------------------------------------------------------------*/
672tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
673 tScanResultHandle hScanResult);
674
675/* ---------------------------------------------------------------------------
676 \fn sme_ScanResultPurge
677 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
678 in the list and free memory for each item
679 \param hScanResult - returned from csrScanGetResult. hScanResult is
680 considered gone by
681 calling this function and even before this function reutrns.
682 \return eHalStatus
683 ---------------------------------------------------------------------------*/
684eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
685
686/* ---------------------------------------------------------------------------
687 \fn sme_ScanGetPMKIDCandidateList
688 \brief a wrapper function to return the PMKID candidate list
689 \param pPmkidList - caller allocated buffer point to an array of
690 tPmkidCandidateInfo
691 \param pNumItems - pointer to a variable that has the number of
692 tPmkidCandidateInfo allocated when retruning, this is
693 either the number needed or number of items put into
694 pPmkidList
695 \return eHalStatus - when fail, it usually means the buffer allocated is not
696 big enough and pNumItems
697 has the number of tPmkidCandidateInfo.
698 \Note: pNumItems is a number of tPmkidCandidateInfo,
699 not sizeof(tPmkidCandidateInfo) * something
700 ---------------------------------------------------------------------------*/
701eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
702 tPmkidCandidateInfo *pPmkidList,
703 tANI_U32 *pNumItems );
704
705
706/*----------------------------------------------------------------------------
707 \fn sme_RoamRegisterLinkQualityIndCallback
708
709 \brief
710 a wrapper function to allow HDD to register a callback handler with CSR for
711 link quality indications.
712
713 Only one callback may be registered at any time.
714 In order to deregister the callback, a NULL cback may be provided.
715
716 Registration happens in the task context of the caller.
717
718 \param callback - Call back being registered
719 \param pContext - user data
720
721 DEPENDENCIES: After CSR open
722
723 \return eHalStatus
724-----------------------------------------------------------------------------*/
725eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
726 csrRoamLinkQualityIndCallback callback,
727 void *pContext);
728
729
730/* ---------------------------------------------------------------------------
731 \fn sme_RoamConnect
732 \brief a wrapper function to request CSR to inititiate an association
733 \param sessionId - the sessionId returned by sme_OpenSession.
734 \param pProfile - can be NULL to join to any open ones
735 \param pRoamId - to get back the request ID
736 \return eHalStatus
737 ---------------------------------------------------------------------------*/
738eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
739 tANI_U32 *pRoamId);
740
741/* ---------------------------------------------------------------------------
742 \fn sme_RoamReassoc
743 \brief a wrapper function to request CSR to inititiate a re-association
744 \param pProfile - can be NULL to join the currently connected AP. In that
745 case modProfileFields should carry the modified field(s) which could trigger
746 reassoc
747 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
748 that might need modification dynamically once STA is up & running and this
749 could trigger a reassoc
750 \param pRoamId - to get back the request ID
751 \return eHalStatus
752 -------------------------------------------------------------------------------*/
753eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
754 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700755 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700756
757/* ---------------------------------------------------------------------------
758 \fn sme_RoamConnectToLastProfile
759 \brief a wrapper function to request CSR to disconnect and reconnect with
760 the same profile
761 \return eHalStatus. It returns fail if currently connected
762 ---------------------------------------------------------------------------*/
763eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
764
765/* ---------------------------------------------------------------------------
766 \fn sme_RoamDisconnect
767 \brief a wrapper function to request CSR to disconnect from a network
768 \param reason -- To indicate the reason for disconnecting. Currently, only
769 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
770 \return eHalStatus
771 ---------------------------------------------------------------------------*/
772eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
773
Jeff Johnson295189b2012-06-20 16:38:30 -0700774/* ---------------------------------------------------------------------------
775 \fn sme_RoamStopBss
776 \brief a wrapper function to request CSR to stop bss
777 \param sessionId - sessionId of SoftAP
778 \return eHalStatus
779 ---------------------------------------------------------------------------*/
780eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
781
782/* ---------------------------------------------------------------------------
783 \fn sme_RoamGetAssociatedStas
784 \brief To probe the list of associated stations from various modules of CORE stack.
785 \This is an asynchronous API.
786 \param sessionId - sessionId of SoftAP
787 \param modId - Module from whom list of associtated stations is to be probed.
788 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
789 \param pUsrContext - Opaque HDD context
790 \param pfnSapEventCallback - Sap event callback in HDD
791 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
792 \return eHalStatus
793 -------------------------------------------------------------------------------*/
794eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
795 VOS_MODULE_ID modId, void *pUsrContext,
796 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
797
798/* ---------------------------------------------------------------------------
799 \fn sme_RoamDisconnectSta
800 \brief To disassociate a station. This is an asynchronous API.
801 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
802 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
803 -------------------------------------------------------------------------------*/
804eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
805
806/* ---------------------------------------------------------------------------
807 \fn sme_RoamDeauthSta
808 \brief To disassociate a station. This is an asynchronous API.
809 \param hHal - Global structure
810 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530811 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700812 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
813 -------------------------------------------------------------------------------*/
814eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530815 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700816
817/* ---------------------------------------------------------------------------
818 \fn sme_RoamTKIPCounterMeasures
819 \brief To start or stop TKIP counter measures. This is an asynchronous API.
820 \param sessionId - sessionId of SoftAP
821 \param bEnable - Flag to start/stop TKIP countermeasures
822 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
823 -------------------------------------------------------------------------------*/
824eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
825
826/* ---------------------------------------------------------------------------
827 \fn sme_RoamGetWpsSessionOverlap
828 \brief To get the WPS PBC session overlap information.
829 \This is an asynchronous API.
830 \param sessionId - sessionId of SoftAP
831 \param pUsrContext - Opaque HDD context
832 \param pfnSapEventCallback - Sap event callback in HDD
833 \return eHalStatus
834 -------------------------------------------------------------------------------*/
835eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
836 void *pUsrContext, void *pfnSapEventCallback,
837 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700838
839/* ---------------------------------------------------------------------------
840 \fn sme_RoamGetConnectState
841 \brief a wrapper function to request CSR to return the current connect state
842 of Roaming
843 \return eHalStatus
844 ---------------------------------------------------------------------------*/
845eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
846
847/* ---------------------------------------------------------------------------
848 \fn sme_RoamGetConnectProfile
849 \brief a wrapper function to request CSR to return the current connect
850 profile. Caller must call csrRoamFreeConnectProfile after it is done
851 and before reuse for another csrRoamGetConnectProfile call.
852 \param pProfile - pointer to a caller allocated structure
853 tCsrRoamConnectedProfile
854 \return eHalStatus. Failure if not connected
855 ---------------------------------------------------------------------------*/
856eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
857 tCsrRoamConnectedProfile *pProfile);
858
859/* ---------------------------------------------------------------------------
860 \fn sme_RoamFreeConnectProfile
861 \brief a wrapper function to request CSR to free and reinitialize the
862 profile returned previously by csrRoamGetConnectProfile.
863 \param pProfile - pointer to a caller allocated structure
864 tCsrRoamConnectedProfile
865 \return eHalStatus.
866 ---------------------------------------------------------------------------*/
867eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
868 tCsrRoamConnectedProfile *pProfile);
869
870/* ---------------------------------------------------------------------------
871 \fn sme_RoamSetPMKIDCache
872 \brief a wrapper function to request CSR to return the PMKID candidate list
873 \param pPMKIDCache - caller allocated buffer point to an array of
874 tPmkidCacheInfo
875 \param numItems - a variable that has the number of tPmkidCacheInfo
876 allocated when retruning, this is either the number needed
877 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530878 \param update_entire_cache - if TRUE, then it overwrites the entire cache
879 with pPMKIDCache, else it updates entry by
880 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700881 \return eHalStatus - when fail, it usually means the buffer allocated is not
882 big enough and pNumItems has the number of
883 tPmkidCacheInfo.
884 \Note: pNumItems is a number of tPmkidCacheInfo,
885 not sizeof(tPmkidCacheInfo) * something
886 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530887eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
888 tPmkidCacheInfo *pPMKIDCache,
889 tANI_U32 numItems,
890 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700891
892/* ---------------------------------------------------------------------------
893 \fn sme_RoamGetSecurityReqIE
894 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
895 passes to PE to JOIN request or START_BSS request
896 This is a synchronuous call.
897 \param sessionId - returned by sme_OpenSession.
898 \param pLen - caller allocated memory that has the length of pBuf as input.
899 Upon returned, *pLen has the needed or IE length in pBuf.
900 \param pBuf - Caller allocated memory that contain the IE field, if any,
901 upon return
902 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
903 \return eHalStatus - when fail, it usually means the buffer allocated is not
904 big enough
905 ---------------------------------------------------------------------------*/
906eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
907 tANI_U8 *pBuf, eCsrSecurityType secType);
908
909/* ---------------------------------------------------------------------------
910 \fn sme_RoamGetSecurityRspIE
911 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
912 the beacon or probe rsp if connected
913 \param sessionId - returned by sme_OpenSession.
914 \param pLen - caller allocated memory that has the length of pBuf as input.
915 Upon returned, *pLen has the needed or IE length in pBuf.
916 \param pBuf - Caller allocated memory that contain the IE field, if any,
917 upon return
918 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
919 \return eHalStatus - when fail, it usually means the buffer allocated is not
920 big enough
921 ---------------------------------------------------------------------------*/
922eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
923 tANI_U8 *pBuf, eCsrSecurityType secType);
924
925
926/* ---------------------------------------------------------------------------
927 \fn sme_RoamGetNumPMKIDCache
928 \brief a wrapper function to request CSR to return number of PMKID cache
929 entries
930 \return tANI_U32 - the number of PMKID cache entries
931 ---------------------------------------------------------------------------*/
932tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
933
934/* ---------------------------------------------------------------------------
935 \fn sme_RoamGetPMKIDCache
936 \brief a wrapper function to request CSR to return PMKID cache from CSR
937 \param pNum - caller allocated memory that has the space of the number of
938 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
939 needed or actually number in tPmkidCacheInfo.
940 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
941 any, upon return
942 \return eHalStatus - when fail, it usually means the buffer allocated is not
943 big enough
944 ---------------------------------------------------------------------------*/
945eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
946 tPmkidCacheInfo *pPmkidCache);
947
948/* ---------------------------------------------------------------------------
949 \fn sme_GetConfigParam
950 \brief a wrapper function that HDD calls to get the global settings
951 currently maintained by CSR.
952 \param pParam - caller allocated memory
953 \return eHalStatus
954 ---------------------------------------------------------------------------*/
955eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
956
957/* ---------------------------------------------------------------------------
958 \fn sme_GetStatistics
959 \brief a wrapper function that client calls to register a callback to get
960 different PHY level statistics from CSR.
961
962 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
963 \param statsMask - The different category/categories of stats requester is looking for
964 The order in which you set the bits in the statsMask for requesting
965 different type of stats is:
966
967 eCsrSummaryStats = bit 0
968 eCsrGlobalClassAStats = bit 1
969 eCsrGlobalClassBStats = bit 2
970 eCsrGlobalClassCStats = bit 3
971 eCsrGlobalClassDStats = bit 4
972 eCsrPerStaStats = bit 5
973
974 \param callback - SME sends back the requested stats using the callback
975 \param periodicity - If requester needs periodic update, 0 means it's an one
976 time request
977 \param cache - If requester is happy with cached stats
978 \param staId - The station ID for which the stats is requested for
979 \param pContext - user context to be passed back along with the callback
980 \return eHalStatus
981 ---------------------------------------------------------------------------*/
982eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
983 tANI_U32 statsMask,
984 tCsrStatsCallback callback,
985 tANI_U32 periodicity, tANI_BOOLEAN cache,
986 tANI_U8 staId, void *pContext);
987
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +0530988/* ---------------------------------------------------------------------------
989 \fn smeGetTLSTAState
990 \helper function to get teh TL STA State whenever the function is called.
991
992 \param staId - The staID to be passed to the TL
993 to get the relevant TL STA State
994 \return the state as tANI_U16
995 ---------------------------------------------------------------------------*/
996tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
997
Jeff Johnson295189b2012-06-20 16:38:30 -0700998eHalStatus sme_GetRssi(tHalHandle hHal,
999 tCsrRssiCallback callback,
1000 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301001
1002/* ---------------------------------------------------------------------------
1003 \fn sme_GetSnr
1004 \brief a wrapper function that client calls to register a callback to get
1005 SNR from FW
1006
1007 \param callback - SME sends back the requested stats using the callback
1008 \param staId - The station ID for which the stats is requested for
1009 \param bssid - The bssid of the connected session
1010 \param pContext - user context to be passed back along with the callback
1011 ---------------------------------------------------------------------------*/
1012eHalStatus sme_GetSnr(tHalHandle hHal,
1013 tCsrSnrCallback callback,
1014 tANI_U8 staId, tCsrBssid bssId,
1015 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001016#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001017eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1018 tCsrRssiCallback callback,
1019 tANI_U8 staId,
1020 tCsrBssid bssId,
1021 void *pContext,
1022 void* pVosContext);
1023#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001024
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001025#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001026/* ---------------------------------------------------------------------------
1027 \fn sme_GetTsmStats
1028 \brief a wrapper function that client calls to register a callback to get TSM Stats
1029
1030 \param callback - SME sends back the requested stats using the callback
1031 \param staId - The station ID for which the stats is requested for
1032 \param pContext - user context to be passed back along with the callback
1033 \param pVosContext - vos context
1034 \return eHalStatus
1035 ---------------------------------------------------------------------------*/
1036eHalStatus sme_GetTsmStats(tHalHandle hHal,
1037 tCsrTsmStatsCallback callback,
1038 tANI_U8 staId, tCsrBssid bssId,
1039 void *pContext, void* pVosContext, tANI_U8 tid);
1040
1041/* ---------------------------------------------------------------------------
1042 \fn sme_SetCCKMIe
1043 \brief function to store the CCKM IE passed from supplicant and use it while packing
1044 reassociation request
1045 \param hHal - HAL handle for device
1046 \param pCckmIe - pointer to CCKM IE data
1047 \param pCckmIeLen - length of the CCKM IE
1048 \- return Success or failure
1049 -------------------------------------------------------------------------*/
1050eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1051
1052
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001053/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001054 \fn sme_SetEseBeaconRequest
1055 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001056 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001057 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001058 \- return Success or failure
1059 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001060eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1061 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001062
1063
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001064#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001065/* ---------------------------------------------------------------------------
1066 \fn sme_CfgSetInt
1067 \brief a wrapper function that HDD calls to set parameters in CFG.
1068 \param cfgId - Configuration Parameter ID (type) for STA.
1069 \param ccmValue - The information related to Configuration Parameter ID
1070 which needs to be saved in CFG
1071 \param callback - To be registered by CSR with CCM. Once the CFG done with
1072 saving the information in the database, it notifies CCM &
1073 then the callback will be invoked to notify.
1074 \param toBeSaved - To save the request for future reference
1075 \return eHalStatus
1076 ---------------------------------------------------------------------------*/
1077eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1078 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1079
1080/* ---------------------------------------------------------------------------
1081 \fn sme_CfgSetStr
1082 \brief a wrapper function that HDD calls to set parameters in CFG.
1083 \param cfgId - Configuration Parameter ID (type) for STA.
1084 \param pStr - Pointer to the byte array which carries the information needs
1085 to be saved in CFG
1086 \param length - Length of the data to be saved
1087 \param callback - To be registered by CSR with CCM. Once the CFG done with
1088 saving the information in the database, it notifies CCM &
1089 then the callback will be invoked to notify.
1090 \param toBeSaved - To save the request for future reference
1091 \return eHalStatus
1092 ---------------------------------------------------------------------------*/
1093eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1094 tANI_U32 length, tCcmCfgSetCallback callback,
1095 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301096/* ---------------------------------------------------------------------------
1097 \fn sme_GetModifyProfileFields
1098 \brief HDD or SME - QOS calls this function to get the current values of
1099 connected profile fields, changing which can cause reassoc.
1100 This function must be called after CFG is downloaded and STA is in connected
1101 state. Also, make sure to call this function to get the current profile
1102 fields before calling the reassoc. So that pModifyProfileFields will have
1103 all the latest values plus the one(s) has been updated as part of reassoc
1104 request.
1105 \param pModifyProfileFields - pointer to the connected profile fields
1106 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001107
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301108 \return eHalStatus
1109 -------------------------------------------------------------------------------*/
1110eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1111 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301112/* ---------------------------------------------------------------------------
1113 \fn sme_HT40StopOBSSScan
1114 \brief HDD or SME - Command to stop the OBSS scan
1115 THis is implemented only for debugging purpose.
1116 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1117 \param sessionId - sessionId
1118 changing which can cause reassoc
1119
1120 \return eHalStatus
1121 -------------------------------------------------------------------------------*/
1122eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001123
1124/*--------------------------------------------------------------------------
1125 \fn sme_SetConfigPowerSave
1126 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1127 For BMPS related configuration, this function also updates the CFG
1128 and sends a message to FW to pick up the new values. Note: Calling
1129 this function only updates the configuration and does not enable
1130 the specified power save mode.
1131 \param hHal - The handle returned by macOpen.
1132 \param psMode - Power Saving mode being modified
1133 \param pConfigParams - a pointer to a caller allocated object of type
1134 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1135 \return eHalStatus
1136 --------------------------------------------------------------------------*/
1137eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1138 void *pConfigParams);
1139
1140/*--------------------------------------------------------------------------
1141 \fn sme_GetConfigPowerSave
1142 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1143 \param hHal - The handle returned by macOpen.
1144 \param psMode - Power Saving mode
1145 \param pConfigParams - a pointer to a caller allocated object of type
1146 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1147 \return eHalStatus
1148 --------------------------------------------------------------------------*/
1149eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1150 void *pConfigParams);
1151
1152/* ---------------------------------------------------------------------------
1153 \fn sme_SignalPowerEvent
1154 \brief Signals to PMC that a power event has occurred. Used for putting
1155 the chip into deep sleep mode.
1156 \param hHal - The handle returned by macOpen.
1157 \param event - the event that has occurred
1158 \return eHalStatus
1159 ---------------------------------------------------------------------------*/
1160extern eHalStatus sme_SignalPowerEvent (
1161 tHalHandle hHal,
1162 tPmcPowerEvent event);
1163
1164/* ---------------------------------------------------------------------------
1165 \fn sme_EnablePowerSave
1166 \brief Enables one of the power saving modes. This API does not cause a
1167 device state change. This is purely a configuration API.
1168 \param hHal - The handle returned by macOpen.
1169 \param psMode - The power saving mode to enable.
1170 \return eHalStatus
1171 ---------------------------------------------------------------------------*/
1172extern eHalStatus sme_EnablePowerSave (
1173 tHalHandle hHal,
1174 tPmcPowerSavingMode psMode);
1175
1176/* ---------------------------------------------------------------------------
1177 \fn sme_DisablePowerSave
1178 \brief Disables one of the power saving modes.Disabling does not imply
1179 that device will be brought out of the current PS mode. This is
1180 purely a configuration API.
1181 \param hHal - The handle returned by macOpen.
1182 \param psMode - The power saving mode to disable.
1183 \return eHalStatus
1184 ---------------------------------------------------------------------------*/
1185extern eHalStatus sme_DisablePowerSave (
1186 tHalHandle hHal,
1187 tPmcPowerSavingMode psMode);
1188
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301189 /* ---------------------------------------------------------------------------
1190 \fn sme_SetHostPowerSave
1191 \brief The BMPS logic is controlled by the User level Apps
1192 \param hHal - The handle returned by macOpen.
1193 \param psMode - The power saving mode to enable.
1194 \return eHalStatus
1195 ---------------------------------------------------------------------------*/
1196extern eHalStatus sme_SetHostPowerSave (
1197 tHalHandle hHal,
1198 v_BOOL_t psMode);
1199
Jeff Johnson295189b2012-06-20 16:38:30 -07001200/* ---------------------------------------------------------------------------
1201 \fn sme_StartAutoBmpsTimer
1202 \brief Starts a timer that periodically polls all the registered
1203 module for entry into Bmps mode. This timer is started only if BMPS is
1204 enabled and whenever the device is in full power.
1205 \param hHal - The handle returned by macOpen.
1206 \return eHalStatus
1207 ---------------------------------------------------------------------------*/
1208extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1209
1210/* ---------------------------------------------------------------------------
1211 \fn sme_StopAutoBmpsTimer
1212 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1213 Stopping the timer does not cause a device state change. Only the timer
1214 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1215 \param hHal - The handle returned by macOpen.
1216 \return eHalStatus
1217 ---------------------------------------------------------------------------*/
1218extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1219
1220/* ---------------------------------------------------------------------------
1221 \fn sme_QueryPowerState
1222 \brief Returns the current power state of the device.
1223 \param hHal - The handle returned by macOpen.
1224 \param pPowerState - pointer to location to return power state
1225 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1226 \return eHalStatus
1227 ---------------------------------------------------------------------------*/
1228extern eHalStatus sme_QueryPowerState (
1229 tHalHandle hHal,
1230 tPmcPowerState *pPowerState,
1231 tPmcSwitchState *pSwWlanSwitchState);
1232
1233/* ---------------------------------------------------------------------------
1234 \fn sme_IsPowerSaveEnabled
1235 \brief Checks if the device is able to enter a particular power save mode
1236 This does not imply that the device is in a particular PS mode
1237 \param hHal - The handle returned by macOpen.
1238 \param psMode - the power saving mode
1239 \return eHalStatus
1240 ---------------------------------------------------------------------------*/
1241extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1242 tHalHandle hHal,
1243 tPmcPowerSavingMode psMode);
1244
1245/* ---------------------------------------------------------------------------
1246 \fn sme_RequestFullPower
1247 \brief Request that the device be brought to full power state.
1248 Note 1: If "fullPowerReason" specificied in this API is set to
1249 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1250 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1251 HDD is requesting full power, we need to undo any previous HDD requests for
1252 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1253 specified anything other than above, the buffered requests for BMPS and WoWL
1254 will not be cleared.
1255 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1256 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1257 request".
1258 Note 3: When the device finally enters Full Power PMC will start a timer
1259 if any of the following holds true:
1260 - Auto BMPS mode is enabled
1261 - Uapsd request is pending
1262 - HDD's request for BMPS is pending
1263 - HDD's request for WoWL is pending
1264 On timer expiry PMC will attempt to put the device in BMPS mode if following
1265 (in addition to those listed above) holds true:
1266 - Polling of all modules through the Power Save Check routine passes
1267 - STA is associated to an access point
1268 \param hHal - The handle returned by macOpen.
1269 \param - callbackRoutine Callback routine invoked in case of success/failure
1270 \param - callbackContext - Cookie to be passed back during callback
1271 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1272 distinguish between BAP and HDD requests
1273 \return eHalStatus - status
1274 eHAL_STATUS_SUCCESS - device brought to full power state
1275 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1276 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1277 ---------------------------------------------------------------------------*/
1278extern eHalStatus sme_RequestFullPower (
1279 tHalHandle hHal,
1280 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1281 void *callbackContext,
1282 tRequestFullPowerReason fullPowerReason);
1283
1284/* ---------------------------------------------------------------------------
1285 \fn sme_RequestBmps
1286 \brief Request that the device be put in BMPS state. Request will be
1287 accepted only if BMPS mode is enabled and power save check routine
1288 passes. Only HDD should invoke this API.
1289 \param hHal - The handle returned by macOpen.
1290 \param - callbackRoutine Callback routine invoked in case of success/failure
1291 \param - callbackContext - Cookie to be passed back during callback
1292 \return eHalStatus
1293 eHAL_STATUS_SUCCESS - device is in BMPS state
1294 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1295 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1296 ---------------------------------------------------------------------------*/
1297extern eHalStatus sme_RequestBmps (
1298 tHalHandle hHal,
1299 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1300 void *callbackContext);
1301
1302/* ---------------------------------------------------------------------------
1303 \fn sme_SetDHCPTillPowerActiveFlag
1304 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1305 entry by PMC
1306 \param hHal - The handle returned by macOpen.
1307 ---------------------------------------------------------------------------*/
1308void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1309
1310
1311/* ---------------------------------------------------------------------------
1312 \fn sme_StartUapsd
1313 \brief Request that the device be put in UAPSD state. If the device is in
1314 Full Power it will be put in BMPS mode first and then into UAPSD
1315 mode.
1316 \param hHal - The handle returned by macOpen.
1317 \param - callbackRoutine Callback routine invoked in case of success/failure
1318 \param - callbackContext - Cookie to be passed back during callback
1319 eHAL_STATUS_SUCCESS - device is in UAPSD state
1320 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1321 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1322 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1323 \return eHalStatus
1324 ---------------------------------------------------------------------------*/
1325extern eHalStatus sme_StartUapsd (
1326 tHalHandle hHal,
1327 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1328 void *callbackContext);
1329
1330/* ---------------------------------------------------------------------------
1331 \fn sme_StopUapsd
1332 \brief Request that the device be put out of UAPSD state. Device will be
1333 put in in BMPS state after stop UAPSD completes. Buffered requests for
1334 UAPSD will be cleared after this.
1335 \param hHal - The handle returned by macOpen.
1336 \return eHalStatus
1337 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1338 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1339 ---------------------------------------------------------------------------*/
1340extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1341
1342/* ---------------------------------------------------------------------------
1343 \fn sme_RequestStandby
1344 \brief Request that the device be put in standby. It is HDD's responsibility
1345 to bring the chip to full power and do a discconnect before calling
1346 this API. Request for standby will be rejected if STA is associated
1347 to an AP.
1348 \param hHal - The handle returned by macOpen.
1349 \param - callbackRoutine Callback routine invoked in case of success/failure
1350 \param - callbackContext - Cookie to be passed back during callback
1351 \return eHalStatus
1352 eHAL_STATUS_SUCCESS - device is in Standby mode
1353 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1354 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1355 ---------------------------------------------------------------------------*/
1356extern eHalStatus sme_RequestStandby (
1357 tHalHandle hHal,
1358 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1359 void *callbackContext);
1360
1361/* ---------------------------------------------------------------------------
1362 \fn sme_RegisterPowerSaveCheck
1363 \brief Register a power save check routine that is called whenever
1364 the device is about to enter one of the power save modes.
1365 \param hHal - The handle returned by macOpen.
1366 \param checkRoutine - Power save check routine to be registered
1367 \param callbackContext - Cookie to be passed back during callback
1368 \return eHalStatus
1369 eHAL_STATUS_SUCCESS - successfully registered
1370 eHAL_STATUS_FAILURE - not successfully registered
1371 ---------------------------------------------------------------------------*/
1372extern eHalStatus sme_RegisterPowerSaveCheck (
1373 tHalHandle hHal,
1374 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1375
1376/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301377 \fn sme_Register11dScanDoneCallback
1378 \brief Register a routine of type csrScanCompleteCallback which is
1379 called whenever an 11d scan is done
1380 \param hHal - The handle returned by macOpen.
1381 \param callback - 11d scan complete routine to be registered
1382 \return eHalStatus
1383 ---------------------------------------------------------------------------*/
1384extern eHalStatus sme_Register11dScanDoneCallback (
1385 tHalHandle hHal,
1386 csrScanCompleteCallback);
1387
1388/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001389 \fn sme_DeregisterPowerSaveCheck
1390 \brief Deregister a power save check routine
1391 \param hHal - The handle returned by macOpen.
1392 \param checkRoutine - Power save check routine to be deregistered
1393 \return eHalStatus
1394 eHAL_STATUS_SUCCESS - successfully deregistered
1395 eHAL_STATUS_FAILURE - not successfully deregistered
1396 ---------------------------------------------------------------------------*/
1397extern eHalStatus sme_DeregisterPowerSaveCheck (
1398 tHalHandle hHal,
1399 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1400
1401/* ---------------------------------------------------------------------------
1402 \fn sme_RegisterDeviceStateUpdateInd
1403 \brief Register a callback routine that is called whenever
1404 the device enters a new device state (Full Power, BMPS, UAPSD)
1405 \param hHal - The handle returned by macOpen.
1406 \param callbackRoutine - Callback routine to be registered
1407 \param callbackContext - Cookie to be passed back during callback
1408 \return eHalStatus
1409 eHAL_STATUS_SUCCESS - successfully registered
1410 eHAL_STATUS_FAILURE - not successfully registered
1411 ---------------------------------------------------------------------------*/
1412extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1413 tHalHandle hHal,
1414 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1415 void *callbackContext);
1416
1417/* ---------------------------------------------------------------------------
1418 \fn sme_DeregisterDeviceStateUpdateInd
1419 \brief Deregister a routine that was registered for device state changes
1420 \param hHal - The handle returned by macOpen.
1421 \param callbackRoutine - Callback routine to be deregistered
1422 \return eHalStatus
1423 eHAL_STATUS_SUCCESS - successfully deregistered
1424 eHAL_STATUS_FAILURE - not successfully deregistered
1425 ---------------------------------------------------------------------------*/
1426extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1427 tHalHandle hHal,
1428 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1429
1430/* ---------------------------------------------------------------------------
1431 \fn sme_WowlAddBcastPattern
1432 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1433 do a pattern match on these patterns when Wowl is enabled during BMPS
1434 mode.
1435 \param hHal - The handle returned by macOpen.
1436 \param pattern - Pattern to be added
1437 \return eHalStatus
1438 eHAL_STATUS_FAILURE Cannot add pattern
1439 eHAL_STATUS_SUCCESS Request accepted.
1440 ---------------------------------------------------------------------------*/
1441extern eHalStatus sme_WowlAddBcastPattern (
1442 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001443 tpSirWowlAddBcastPtrn pattern,
1444 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001445
1446/* ---------------------------------------------------------------------------
1447 \fn sme_WowlDelBcastPattern
1448 \brief Delete a pattern that was added for Pattern Byte Matching.
1449 \param hHal - The handle returned by macOpen.
1450 \param pattern - Pattern to be deleted
1451 \return eHalStatus
1452 eHAL_STATUS_FAILURE Cannot delete pattern
1453 eHAL_STATUS_SUCCESS Request accepted.
1454 ---------------------------------------------------------------------------*/
1455extern eHalStatus sme_WowlDelBcastPattern (
1456 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001457 tpSirWowlDelBcastPtrn pattern,
1458 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001459
1460/* ---------------------------------------------------------------------------
1461 \fn sme_EnterWowl
1462 \brief This is the API to request entry into WOWL mode.
1463 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1464 SME will will cache the information that WOWL has been requested and
1465 attempt to put the device in BMPS first. On entry into BMPS, SME will
1466 enter the WOWL mode.
1467 Note 1: After WoWL request is accepted, If module other than HDD requests
1468 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1469 and attempt to put the chip into BMPS+WOWL based on a timer.
1470 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1471 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1472 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1473 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1474 are required. Currently there is no requirement or use case to support UAPSD
1475 and WOWL at the same time.
1476 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1477 Note 5. Request for WoWL is rejected if BMPS is disabled.
1478
1479 \param hHal - The handle returned by macOpen.
1480 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1481 Used for success/failure notification by SME
1482 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1483 at the time of callback.
1484 \param wakeReasonIndCB - Callback routine provided by HDD.
1485 Used for Wake Reason Indication by SME
1486 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1487 at the time of callback.
1488 \return eHalStatus
1489 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1490 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1491 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1492 mode is entered.
1493 ---------------------------------------------------------------------------*/
1494extern eHalStatus sme_EnterWowl (
1495 tHalHandle hHal,
1496 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1497 void *enterWowlCallbackContext,
1498#ifdef WLAN_WAKEUP_EVENTS
1499 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1500 void *wakeReasonIndCBContext,
1501#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001502 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001503
1504/* ---------------------------------------------------------------------------
1505 \fn sme_ExitWowl
1506 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1507 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1508 mode. Any Buffered request for WoWL will be cleared after this API.
1509 \param hHal - The handle returned by macOpen.
1510 \return eHalStatus
1511 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1512 only if the previous "Enter WOWL" transaction has
1513 not even completed.
1514 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1515 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301516extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001517
1518/* ---------------------------------------------------------------------------
1519
1520 \fn sme_RoamSetKey
1521
1522 \brief To set encryption key. This function should be called only when connected
1523 This is an asynchronous API.
1524
1525 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1526
1527 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1528
1529 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1530
1531 FAILURE or RESOURCES The API finished and failed.
1532
1533 -------------------------------------------------------------------------------*/
1534eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1535
1536/* ---------------------------------------------------------------------------
1537
1538 \fn sme_RoamRemoveKey
1539
1540 \brief To set encryption key. This is an asynchronous API.
1541
1542 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1543
1544 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1545
1546 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1547
1548 FAILURE or RESOURCES The API finished and failed.
1549
1550 -------------------------------------------------------------------------------*/
1551eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1552
1553
1554/* ---------------------------------------------------------------------------
1555
1556 \fn sme_GetCountryCode
1557
1558 \brief To return the current country code. If no country code is applied, default country code is
1559 used to fill the buffer.
1560 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1561 This is a synchronous API.
1562
1563 \param pBuf - pointer to a caller allocated buffer for returned country code.
1564
1565 \param pbLen For input, this parameter indicates how big is the buffer.
1566 Upon return, this parameter has the number of bytes for country. If pBuf
1567 doesn't have enough space, this function returns
1568 fail status and this parameter contains the number that is needed.
1569
1570 \return eHalStatus SUCCESS.
1571
1572 FAILURE or RESOURCES The API finished and failed.
1573
1574 -------------------------------------------------------------------------------*/
1575eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1576
1577/* ---------------------------------------------------------------------------
1578
1579 \fn sme_SetCountryCode
1580
1581 \brief To change the current/default country code.
1582 If 11d supported is turned off, an error is return.
1583 This is a synchronous API.
1584
1585 \param pCountry - pointer to a caller allocated buffer for the country code.
1586
1587 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1588 whether a reset is required.
1589
1590 \return eHalStatus SUCCESS.
1591
1592 FAILURE or RESOURCES The API finished and failed.
1593
1594 -------------------------------------------------------------------------------*/
1595eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1596
1597/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301598
1599 \fn sme_InitChannels
1600
1601 \brief Used to initialize CSR channel lists while driver loading
1602
1603 \param hHal - global pMac structure
1604
1605 \return eHalStatus SUCCESS.
1606
1607 FAILURE or RESOURCES The API finished and failed.
1608
1609 -------------------------------------------------------------------------------*/
1610eHalStatus sme_InitChannels(tHalHandle hHal);
1611
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301612
Mihir Shete04206452014-11-20 17:50:58 +05301613#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301614/* ---------------------------------------------------------------------------
1615 \fn sme_InitChannelsForCC
1616
1617 \brief Used to issue regulatory hint to user
1618
1619 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301620 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301621
1622 \return eHalStatus SUCCESS.
1623
1624 FAILURE or RESOURCES The API finished and failed.
1625
1626 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301627eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301628#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301629
Mihir Shetee1093ba2014-01-21 20:13:32 +05301630/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001631 \fn sme_ResetCountryCodeInformation
1632 \brief this function is to reset the country code current being used back to EEPROM default
1633 this includes channel list and power setting. This is a synchronous API.
1634 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1635 a restart is needed to apply the change
1636 \return eHalStatus
1637 -------------------------------------------------------------------------------*/
1638eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1639
1640/* ---------------------------------------------------------------------------
1641 \fn sme_GetSupportedCountryCode
1642 \brief this function is to get a list of the country code current being supported
1643 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1644 this has the country code list. 3 bytes for each country code. This may be NULL if
1645 caller wants to know the needed byte count.
1646 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1647 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1648 \return eHalStatus
1649 -------------------------------------------------------------------------------*/
1650eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1651
1652/* ---------------------------------------------------------------------------
1653 \fn sme_GetCurrentRegulatoryDomain
1654 \brief this function is to get the current regulatory domain. This is a synchronous API.
1655 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1656 SME. The function fails if 11d support is turned off.
1657 \param pDomain - Caller allocated buffer to return the current domain.
1658 \return eHalStatus SUCCESS.
1659
1660 FAILURE or RESOURCES The API finished and failed.
1661 -------------------------------------------------------------------------------*/
1662eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1663
1664/* ---------------------------------------------------------------------------
1665 \fn sme_SetRegulatoryDomain
1666 \brief this function is to set the current regulatory domain.
1667 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1668 SME. This is a synchronous API.
1669 \param domainId - indicate the domain (defined in the driver) needs to set to.
1670 See v_REGDOMAIN_t for definition
1671 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1672 a restart is needed to apply the change
1673 \return eHalStatus
1674 -------------------------------------------------------------------------------*/
1675eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1676
1677/* ---------------------------------------------------------------------------
1678
1679 \fn sme_GetRegulatoryDomainForCountry
1680
1681 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1682
1683 \param pCountry - pointer to a caller allocated buffer for input country code.
1684
1685 \param pDomainId Upon successful return, it is the domain that country belongs to.
1686 If it is NULL, returning success means that the country code is known.
1687
1688 \return eHalStatus SUCCESS.
1689
1690 FAILURE or RESOURCES The API finished and failed.
1691
1692 -------------------------------------------------------------------------------*/
1693eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1694
1695
1696
1697/* ---------------------------------------------------------------------------
1698
1699 \fn sme_GetSupportedRegulatoryDomains
1700
1701 \brief To return a list of supported regulatory domains. This is a synchronous API.
1702
1703 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1704
1705 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1706 Upon return, this parameter has the number for supported domains. If pDomains
1707 doesn't have enough space for all the supported domains, this function returns
1708 fail status and this parameter contains the number that is needed.
1709
1710 \return eHalStatus SUCCESS.
1711
1712 FAILURE or RESOURCES The API finished and failed.
1713
1714 -------------------------------------------------------------------------------*/
1715eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1716
1717//some support functions
1718tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1719tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1720tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1721//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1722eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1723
1724typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1725/* ---------------------------------------------------------------------------
1726
1727 \fn sme_ChangeCountryCode
1728
1729 \brief Change Country code from upperlayer during WLAN driver operation.
1730 This is a synchronous API.
1731
1732 \param hHal - The handle returned by macOpen.
1733
1734 \param pCountry New Country Code String
1735
Abhishek Singha306a442013-11-07 18:39:01 +05301736 \param sendRegHint If we want to send reg hint to nl80211
1737
Jeff Johnson295189b2012-06-20 16:38:30 -07001738 \return eHalStatus SUCCESS.
1739
1740 FAILURE or RESOURCES The API finished and failed.
1741
1742 -------------------------------------------------------------------------------*/
1743eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1744 tSmeChangeCountryCallback callback,
1745 tANI_U8 *pCountry,
1746 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301747 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301748 tAniBool countryFromUserSpace,
1749 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001750
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301751/* ---------------------------------------------------------------------------
1752
Amar Singhal0d15bd52013-10-12 23:13:13 -07001753 \fn sme_GenericChangeCountryCode
1754
1755 \brief Generic API to change country code
1756
1757 \param hHal - The handle returned by macOpen.
1758
1759 \param pCountry New Country Code String
1760
1761 \param reg_domain Regulatory domain for the new country code
1762
1763 \return eHalStatus SUCCESS.
1764
1765 FAILURE or RESOURCES The API finished and failed.
1766
1767 -------------------------------------------------------------------------------*/
1768eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1769 tANI_U8 *pCountry,
1770 v_REGDOMAIN_t reg_domain);
1771
1772/* ---------------------------------------------------------------------------
1773
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301774 \fn sme_DHCPStartInd
1775
1776 \brief Indicate FW about DHCP start event.
1777
1778 \param hHal - The handle returned by macOpen.
1779
1780 \param device_mode the mode of the device
1781
c_hpothu0b0cab72014-02-13 21:52:40 +05301782 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301783
1784 \return eHalStatus SUCCESS.
1785
1786 FAILURE or RESOURCES The API finished and failed.
1787
1788 -------------------------------------------------------------------------------*/
1789
1790eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1791 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301792 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301793
1794/* ---------------------------------------------------------------------------
1795
1796 \fn sme_DHCPStopInd
1797
1798 \brief Indicate FW about DHCP stop event.
1799
1800 \param hHal - The handle returned by macOpen.
1801
1802 \param device_mode the mode of the device
1803
c_hpothu0b0cab72014-02-13 21:52:40 +05301804 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301805
1806 \return eHalStatus SUCCESS.
1807
1808 FAILURE or RESOURCES The API finished and failed.
1809
1810 -------------------------------------------------------------------------------*/
1811eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1812 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301813 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301814
Jeff Johnson295189b2012-06-20 16:38:30 -07001815
1816/* ---------------------------------------------------------------------------
1817 \fn sme_BtcSignalBtEvent
1818 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1819 BT event type and the current operating mode of Libra (full power,
1820 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1821 would be employed.
1822 \param hHal - The handle returned by macOpen.
1823 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1824 Caller owns the memory and is responsible for freeing it.
1825 \return VOS_STATUS
1826 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1827 if driver has not yet been initialized or if BTC
1828 Events Layer has been disabled.
1829 VOS_STATUS_SUCCESS BT Event passed to HAL
1830 ---------------------------------------------------------------------------*/
1831VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1832
1833/* ---------------------------------------------------------------------------
1834 \fn sme_BtcSetConfig
1835 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1836 This function should be invoked only after CFG download has completed.
1837 Calling it after sme_HDDReadyInd is recommended.
1838 \param hHal - The handle returned by macOpen.
1839 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1840 tSmeBtcConfig. Caller owns the memory and is responsible
1841 for freeing it.
1842 \return VOS_STATUS
1843 VOS_STATUS_E_FAILURE Config not passed to HAL.
1844 VOS_STATUS_SUCCESS Config passed to HAL
1845 ---------------------------------------------------------------------------*/
1846VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1847
1848/* ---------------------------------------------------------------------------
1849 \fn sme_BtcGetConfig
1850 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1851 \param hHal - The handle returned by macOpen.
1852 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1853 Caller owns the memory and is responsible for freeing it.
1854 \return VOS_STATUS
1855 VOS_STATUS_E_FAILURE - failure
1856 VOS_STATUS_SUCCESS success
1857 ---------------------------------------------------------------------------*/
1858VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1859
1860/* ---------------------------------------------------------------------------
1861 \fn sme_SetCfgPrivacy
1862 \brief API to set configure privacy parameters
1863 \param hHal - The handle returned by macOpen.
1864 \param pProfile - Pointer CSR Roam profile.
1865 \param fPrivacy - This parameter indicates status of privacy
1866
1867 \return void
1868 ---------------------------------------------------------------------------*/
1869void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1870
1871#if defined WLAN_FEATURE_VOWIFI
1872/* ---------------------------------------------------------------------------
1873 \fn sme_NeighborReportRequest
1874 \brief API to request neighbor report.
1875 \param hHal - The handle returned by macOpen.
1876 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1877 tRrmNeighborReq. Caller owns the memory and is responsible
1878 for freeing it.
1879 \return VOS_STATUS
1880 VOS_STATUS_E_FAILURE - failure
1881 VOS_STATUS_SUCCESS success
1882 ---------------------------------------------------------------------------*/
1883VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1884 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1885#endif
1886
1887//The following are debug APIs to support direct read/write register/memory
1888//They are placed in SME because HW cannot be access when in LOW_POWER state
1889//AND not connected. The knowledge and synchronization is done in SME
1890
1891//sme_DbgReadRegister
1892//Caller needs to validate the input values
1893VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1894
1895//sme_DbgWriteRegister
1896//Caller needs to validate the input values
1897VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1898
1899//sme_DbgReadMemory
1900//Caller needs to validate the input values
1901//pBuf caller allocated buffer has the length of nLen
1902VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1903
1904//sme_DbgWriteMemory
1905//Caller needs to validate the input values
1906VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1907
Jeff Johnson295189b2012-06-20 16:38:30 -07001908VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1909 tSirVersionType *pVersion);
1910VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1911 tSirVersionType *pVersion);
1912VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1913 tANI_U8 *pVersion,
1914 tANI_U32 versionBufferSize);
1915VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1916 tANI_U8 *pVersion,
1917 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001918eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1919 csrRoamCompleteCallback callback,
1920 void *pContext);
1921
1922#ifdef FEATURE_WLAN_WAPI
1923/* ---------------------------------------------------------------------------
1924 \fn sme_RoamSetBKIDCache
1925 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1926 candidate list.
1927 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1928 it is opened (by calling halOpen).
1929 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1930 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1931 when retruning, this is the number of items put into pBKIDCache
1932 \return eHalStatus - when fail, it usually means the buffer allocated is not
1933 big enough and pNumItems has the number of tBkidCacheInfo.
1934 ---------------------------------------------------------------------------*/
1935eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1936 tANI_U32 numItems );
1937
1938/* ---------------------------------------------------------------------------
1939 \fn sme_RoamGetBKIDCache
1940 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1941 BKID cache.
1942 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1943 it is opened (by calling halOpen).
1944 \param pNum - caller allocated memory that has the space of the number of
1945 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1946 in SME cache.
1947 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1948 upon return
1949 \return eHalStatus - when fail, it usually means the buffer allocated is not
1950 big enough.
1951 ---------------------------------------------------------------------------*/
1952eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1953 tBkidCacheInfo *pBkidCache);
1954
1955/* ---------------------------------------------------------------------------
1956 \fn sme_RoamGetNumBKIDCache
1957 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1958 number of BKID cache entries.
1959 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1960 it is opened (by calling halOpen).
1961 \return tANI_U32 - the number of BKID cache entries.
1962 ---------------------------------------------------------------------------*/
1963tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1964
1965/* ---------------------------------------------------------------------------
1966 \fn sme_ScanGetBKIDCandidateList
1967 \brief a wrapper function to return the BKID candidate list
1968 \param pBkidList - caller allocated buffer point to an array of
1969 tBkidCandidateInfo
1970 \param pNumItems - pointer to a variable that has the number of
1971 tBkidCandidateInfo allocated when retruning, this is
1972 either the number needed or number of items put into
1973 pPmkidList
1974 \return eHalStatus - when fail, it usually means the buffer allocated is not
1975 big enough and pNumItems
1976 has the number of tBkidCandidateInfo.
1977 \Note: pNumItems is a number of tBkidCandidateInfo,
1978 not sizeof(tBkidCandidateInfo) * something
1979 ---------------------------------------------------------------------------*/
1980eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1981 tBkidCandidateInfo *pBkidList,
1982 tANI_U32 *pNumItems );
1983#endif /* FEATURE_WLAN_WAPI */
1984
Jeff Johnsone7245742012-09-05 17:12:55 -07001985#ifdef FEATURE_OEM_DATA_SUPPORT
1986/********************************************************************************************
1987 Oem data related modifications
1988*********************************************************************************************/
1989/* ---------------------------------------------------------------------------
1990 \fn sme_OemDataReq
1991 \param sessionId - session id of session to be used for oem data req.
1992 \param pOemDataReqID - pointer to an object to get back the request ID
1993 \param callback - a callback function that is called upon finish
1994 \param pContext - a pointer passed in for the callback
1995 \return eHalStatus
1996 ---------------------------------------------------------------------------*/
1997eHalStatus sme_OemDataReq(tHalHandle hHal,
1998 tANI_U8 sessionId,
1999 tOemDataReqConfig *,
2000 tANI_U32 *pOemDataReqID,
2001 oemData_OemDataReqCompleteCallback callback,
2002 void *pContext);
2003
2004/* ---------------------------------------------------------------------------
2005 \fn sme_getOemDataRsp
2006 \param pOemDataRsp - A pointer to the response object
2007 \param pOemDataReqID - pointer to an object to get back the request ID
2008 \return eHalStatus
2009 ---------------------------------------------------------------------------*/
2010eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2011 tOemDataRsp **pOemDataRsp);
2012
2013#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002014
2015
Jeff Johnson295189b2012-06-20 16:38:30 -07002016
2017/* ---------------------------------------------------------------------------
2018
2019 \fn sme_RoamUpdateAPWPSIE
2020
2021 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2022 This is an asynchronous API.
2023
2024 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2025
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002026 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002027
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002028 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002029
2030 -------------------------------------------------------------------------------*/
2031
2032eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2033/* ---------------------------------------------------------------------------
2034
2035 \fn sme_RoamUpdateAPWPARSNIEs
2036
2037 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2038 This is an asynchronous API.
2039
2040 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2041
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002042 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002043
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002044 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002045
2046 -------------------------------------------------------------------------------*/
2047eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2048
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002049/* ---------------------------------------------------------------------------
2050
2051 sme_ChangeMCCBeaconInterval
2052
2053 \brief To update P2P-GO's beacon Interval.
2054
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002055 \return eHalStatus SUCCESS
2056 FAILURE or RESOURCES
2057 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002058 -------------------------------------------------------------------------------*/
2059eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2060
2061
Jeff Johnson295189b2012-06-20 16:38:30 -07002062
2063/* ---------------------------------------------------------------------------
2064 \fn sme_sendBTAmpEvent
2065 \brief API to send the btAMPstate to FW
2066 \param hHal - The handle returned by macOpen.
2067 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002068 \return eHalStatus SUCCESS
2069 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002070
2071--------------------------------------------------------------------------- */
2072
2073eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2074
2075
2076
2077/* ---------------------------------------------------------------------------
2078 \fn sme_SetHostOffload
2079 \brief API to set the host offload feature.
2080 \param hHal - The handle returned by macOpen.
2081 \param pRequest - Pointer to the offload request.
2082 \return eHalStatus
2083 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002084eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2085 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002086
2087/* ---------------------------------------------------------------------------
2088 \fn sme_SetKeepAlive
2089 \brief API to set the Keep Alive feature.
2090 \param hHal - The handle returned by macOpen.
2091 \param pRequest - Pointer to the Keep Alive request.
2092 \return eHalStatus
2093 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002094eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2095 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002096
Jeff Johnson295189b2012-06-20 16:38:30 -07002097/* ----------------------------------------------------------------------------
2098 \fn sme_GetOperationChannel
2099 \brief API to get current channel on which STA is parked
2100 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002101 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002102 \returns eHAL_STATUS_SUCCESS
2103 eHAL_STATUS_FAILURE
2104-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002105eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002106
Jeff Johnson295189b2012-06-20 16:38:30 -07002107/* ---------------------------------------------------------------------------
2108
2109 \fn sme_RegisterMgtFrame
2110
2111 \brief To register managment frame of specified type and subtype.
2112 \param frameType - type of the frame that needs to be passed to HDD.
2113 \param matchData - data which needs to be matched before passing frame
2114 to HDD.
2115 \param matchDataLen - Length of matched data.
2116 \return eHalStatus
2117 -------------------------------------------------------------------------------*/
2118eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2119 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2120
2121/* ---------------------------------------------------------------------------
2122
2123 \fn sme_DeregisterMgtFrame
2124
2125 \brief To De-register managment frame of specified type and subtype.
2126 \param frameType - type of the frame that needs to be passed to HDD.
2127 \param matchData - data which needs to be matched before passing frame
2128 to HDD.
2129 \param matchDataLen - Length of matched data.
2130 \return eHalStatus
2131 -------------------------------------------------------------------------------*/
2132eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2133 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07002134
2135/* ---------------------------------------------------------------------------
2136
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302137 \fn sme_InitMgmtFrameLogging
2138
2139 \brief
2140 SME will pass this request to lower mac to initialize Frame Logging.
2141
2142 \param
2143
2144 hHal - The handle returned by macOpen.
2145
2146 wlanMgmtLoggingInitParam - Params to initialize frame logging
2147
2148 \return eHalStatus
2149--------------------------------------------------------------------------- */
2150eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
2151 tpSirMgmtLoggingInitParam wlanMgmtLoggingInitParam);
2152
2153/* ---------------------------------------------------------------------------
2154
Jeff Johnson295189b2012-06-20 16:38:30 -07002155 \fn sme_ConfigureRxpFilter
2156
2157 \brief
2158 SME will pass this request to lower mac to set/reset the filter on RXP for
2159 multicast & broadcast traffic.
2160
2161 \param
2162
2163 hHal - The handle returned by macOpen.
2164
2165 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2166 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2167 on this param. In future we can use this as a mask to set various types of
2168 filters as suggested below:
2169 FILTER_ALL_MULTICAST:
2170 FILTER_ALL_BROADCAST:
2171 FILTER_ALL_MULTICAST_BROADCAST:
2172
2173
2174 \return eHalStatus
2175
2176
2177--------------------------------------------------------------------------- */
2178eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2179 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2180
2181/* ---------------------------------------------------------------------------
2182
2183 \fn sme_ConfigureAppsCpuWakeupState
2184
2185 \brief
2186 SME will pass this request to lower mac to dynamically adjusts the listen
2187 interval based on the WLAN/MSM activity. This feature is named as
2188 Telescopic Beacon wakeup feature.
2189
2190 \param
2191
2192 hHal - The handle returned by macOpen.
2193
2194 isAppsAwake- Depicts the state of the Apps CPU
2195
2196
2197 \return eHalStatus
2198
2199
2200--------------------------------------------------------------------------- */
2201eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2202
Jeff Johnson295189b2012-06-20 16:38:30 -07002203/* ---------------------------------------------------------------------------
2204
2205 \fn sme_ConfigureSuspendInd
2206
2207 \brief
2208 SME will pass this request to lower mac to Indicate that the wlan needs to
2209 be suspended
2210
2211 \param
2212
2213 hHal - The handle returned by macOpen.
2214
2215 wlanSuspendParam- Depicts the wlan suspend params
2216
2217
2218 \return eHalStatus
2219
2220
2221--------------------------------------------------------------------------- */
2222eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2223 tpSirWlanSuspendParam wlanSuspendParam);
2224
2225/* ---------------------------------------------------------------------------
2226
2227 \fn sme_ConfigureResumeReq
2228
2229 \brief
2230 SME will pass this request to lower mac to Indicate that the wlan needs to
2231 be Resumed
2232
2233 \param
2234
2235 hHal - The handle returned by macOpen.
2236
2237 wlanResumeParam- Depicts the wlan resume params
2238
2239
2240 \return eHalStatus
2241
2242
2243--------------------------------------------------------------------------- */
2244eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2245 tpSirWlanResumeParam wlanResumeParam);
2246
Jeff Johnson295189b2012-06-20 16:38:30 -07002247
2248/* ---------------------------------------------------------------------------
2249
2250 \fn sme_GetInfraSessionId
2251
2252 \brief To get the session ID for infra session, if connected
2253 This is a synchronous API.
2254
2255 \param hHal - The handle returned by macOpen.
2256
2257 \return sessionid, -1 if infra session is not connected
2258
2259 -------------------------------------------------------------------------------*/
2260tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2261
2262/* ---------------------------------------------------------------------------
2263
2264 \fn sme_GetInfraOperationChannel
2265
2266 \brief To get the operating channel for infra session, if connected
2267 This is a synchronous API.
2268
2269 \param hHal - The handle returned by macOpen.
2270 \param sessionId - the sessionId returned by sme_OpenSession.
2271
2272 \return operating channel, 0 if infra session is not connected
2273
2274 -------------------------------------------------------------------------------*/
2275tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2276/* ---------------------------------------------------------------------------
2277
2278 \fn sme_GetConcurrentOperationChannel
2279
2280 \brief To get the operating channel for other concurrent sessions, if connected
2281 This is a synchronous API.
2282
2283 \param hHal - The handle returned by macOpen.
2284 \param currentPersona - persona that is trying to come up.
2285
2286 \return operating channel, 0 if infra session is not connected
2287
2288 -------------------------------------------------------------------------------*/
2289tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2290
2291/* ---------------------------------------------------------------------------
2292 \fn sme_AbortMacScan
2293 \brief API to cancel MAC scan.
2294 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302295 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302296 \return tSirAbortScanStatus return status abort scan
2297
Jeff Johnson295189b2012-06-20 16:38:30 -07002298 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302299tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2300 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002301
2302/* ---------------------------------------------------------------------------
2303 \fn sme_GetCfgValidChannels
2304 \brief API to get valid channel list
2305 \param hHal - The handle returned by macOpen.
2306 \param aValidChannels - Pointer to the valid channel list
2307 \param len - valid channel list length
2308 \return eHalStatus
2309 ---------------------------------------------------------------------------*/
2310eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2311
2312#ifdef FEATURE_WLAN_SCAN_PNO
2313
2314/* ---------------------------------------------------------------------------
2315 \fn sme_SetPreferredNetworkList
2316 \brief API to set the Preferred Network List Offload feature.
2317 \param hHal - The handle returned by macOpen.
2318 \param pRequest - Pointer to the offload request.
2319 \return eHalStatus
2320 ---------------------------------------------------------------------------*/
2321eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2322
2323/* ---------------------------------------------------------------------------
2324 \fn sme_SetRSSIFilter
2325 \brief API to set RSSI Filter feature.
2326 \param hHal - The handle returned by macOpen.
2327 \param pRequest - Pointer to the offload request.
2328 \return eHalStatus
2329 ---------------------------------------------------------------------------*/
2330eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2331
2332/******************************************************************************
2333*
2334* Name: sme_PreferredNetworkFoundInd
2335*
2336* Description:
2337* Invoke Preferred Network Found Indication
2338*
2339* Parameters:
2340* hHal - HAL handle for device
2341* pMsg - found network description
2342*
2343* Returns: eHalStatus
2344*
2345******************************************************************************/
2346eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2347#endif // FEATURE_WLAN_SCAN_PNO
2348
2349/* ---------------------------------------------------------------------------
2350 \fn sme_SetPowerParams
2351 \brief API to set Power Parameters
2352 \param hHal - The handle returned by macOpen.
2353 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002354 \param forced - if true, not to be dropped silently in host, it must reach
2355 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2356 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002357 \return eHalStatus
2358 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002359eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002360
2361/* ---------------------------------------------------------------------------
2362 \fn sme_SetTxPerTracking
2363 \brief Set Tx PER tracking configuration parameters
2364 \param hHal - The handle returned by macOpen.
2365 \param pTxPerTrackingParam - Tx PER configuration parameters
2366 \return eHalStatus
2367 ---------------------------------------------------------------------------*/
2368eHalStatus sme_SetTxPerTracking (
2369 tHalHandle hHal,
2370 void (*pCallbackfn) (void *pCallbackContext),
2371 void *pCallbackContext,
2372 tpSirTxPerTrackingParam pTxPerTrackingParam);
2373
2374#ifdef WLAN_FEATURE_PACKET_FILTERING
2375/* ---------------------------------------------------------------------------
2376 \fn sme_ReceiveFilterSetFilter
2377 \brief API to set 8023 Multicast Address List
2378 \param hHal - The handle returned by macOpen.
2379 \param pMulticastAddrs - Pointer to the Multicast Address List
2380 \return eHalStatus
2381 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002382eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002383
2384/* ---------------------------------------------------------------------------
2385 \fn sme_ReceiveFilterSetFilter
2386 \brief API to set Receive Packet Filter
2387 \param hHal - The handle returned by macOpen.
2388 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2389 \return eHalStatus
2390 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002391eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2392 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002393
2394/* ---------------------------------------------------------------------------
2395 \fn sme_GetFilterMatchCount
2396 \brief API to get D0 PC Filter Match Count
2397 \param hHal - The handle returned by macOpen
2398 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2399 \param callbackContext - Cookie to be passed back during callback
2400 \return eHalStatus
2401 ---------------------------------------------------------------------------*/
2402eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2403 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002404 void *callbackContext,
2405 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002406
2407/* ---------------------------------------------------------------------------
2408 \fn sme_ReceiveFilterClearFilter
2409 \brief API to clear Receive Packet Filter
2410 \param hHal - The handle returned by macOpen.
2411 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2412 \return eHalStatus
2413 ---------------------------------------------------------------------------*/
2414eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002415 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2416 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002417#endif // WLAN_FEATURE_PACKET_FILTERING
2418/* ---------------------------------------------------------------------------
2419
2420 \fn sme_IsChannelValid
2421 \brief To check if the channel is valid for currently established domain
2422 This is a synchronous API.
2423
2424 \param hHal - The handle returned by macOpen.
2425 \param channel - channel to verify
2426
2427 \return TRUE/FALSE, TRUE if channel is valid
2428
2429 -------------------------------------------------------------------------------*/
2430tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2431
2432/* ---------------------------------------------------------------------------
2433 \fn sme_SetFreqBand
2434 \brief Used to set frequency band.
2435 \param hHal
2436 \eBand band value to be configured
2437 \- return eHalStatus
2438 -------------------------------------------------------------------------*/
2439eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2440
2441/* ---------------------------------------------------------------------------
2442 \fn sme_GetFreqBand
2443 \brief Used to get the current band settings.
2444 \param hHal
2445 \pBand pointer to hold the current band value
2446 \- return eHalStatus
2447 -------------------------------------------------------------------------*/
2448eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2449
2450/* ---------------------------------------------------------------------------
2451
2452 \fn sme_SetTxPerTracking
2453 \brief Set Tx PER tracking configuration parameters
2454 \param hHal - The handle returned by macOpen.
2455 \param pTxPerTrackingParam - Tx PER configuration parameters
2456 \return eHalStatus
2457 ---------------------------------------------------------------------------*/
2458eHalStatus sme_SetTxPerTracking (
2459 tHalHandle hHal,
2460 void (*pCallbackfn) (void *pCallbackContext),
2461 void *pCallbackContext,
2462 tpSirTxPerTrackingParam pTxPerTrackingParam);
2463
2464#ifdef WLAN_FEATURE_GTK_OFFLOAD
2465/* ---------------------------------------------------------------------------
2466 \fn sme_SetGTKOffload
2467 \brief API to set GTK offload feature.
2468 \param hHal - The handle returned by macOpen.
2469 \param pRequest - Pointer to the GTK offload request.
2470 \return eHalStatus
2471 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002472eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002473
2474/* ---------------------------------------------------------------------------
2475 \fn sme_GetGTKOffload
2476 \brief API to get GTK offload information.
2477 \param hHal - The handle returned by macOpen.
2478 \param pRequest - Pointer to the GTK offload response.
2479 \return eHalStatus
2480 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002481eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2482 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002483#endif // WLAN_FEATURE_GTK_OFFLOAD
2484
2485#ifdef WLAN_WAKEUP_EVENTS
2486eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2487#endif // WLAN_WAKEUP_EVENTS
2488
2489/* ---------------------------------------------------------------------------
2490 \fn sme_SetTxPerTracking
2491 \brief Set Tx PER tracking configuration parameters
2492 \param hHal - The handle returned by macOpen.
2493 \param pTxPerTrackingParam - Tx PER configuration parameters
2494 \return eHalStatus
2495 ---------------------------------------------------------------------------*/
2496eHalStatus sme_SetTxPerTracking (
2497 tHalHandle hHal,
2498 void (*pCallbackfn) (void *pCallbackContext),
2499 void *pCallbackContext,
2500 tpSirTxPerTrackingParam pTxPerTrackingParam);
2501
2502
2503//return frequency for a particular channel
2504tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2505
2506tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2507
2508#if defined WLAN_FEATURE_P2P_INTERNAL
2509
2510eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2511
2512/* ---------------------------------------------------------------------------
2513 \fn sme_p2pFlushDeviceList
2514 \brief Remove cached P2P result from scan results
2515 \param hHal - The handle returned by macOpen.
2516 \param HDDSessionId - HDD's sessionId. Currently unused.
2517 \return eHalStatus
2518 ---------------------------------------------------------------------------*/
2519eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2520
2521eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2522 tCsrScanResultFilter *pFilter);
2523
2524#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2525
2526/* ---------------------------------------------------------------------------
2527 \fn sme_SetMaxTxPower
2528 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2529 setting will not persist over reboots
2530 \param hHal
2531 \param pBssid BSSID to set the power cap for
2532 \param pBssid pSelfMacAddress self MAC Address
2533 \param pBssid power to set in dB
2534 \- return eHalStatus
2535 -------------------------------------------------------------------------*/
2536eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2537 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2538
Jeff Johnson295189b2012-06-20 16:38:30 -07002539/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002540 \fn sme_SetMaxTxPowerPerBand
2541 \brief Used to set the Maximum Transmit Power for
2542 specific band dynamically. Note: this setting will not persist over reboots
2543 \param band
2544 \param power to set in dB
2545 \- return eHalStatus
2546 -------------------------------------------------------------------------*/
2547eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2548
2549/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002550
schang86c22c42013-03-13 18:41:24 -07002551 \fn sme_SetTxPower
2552
2553 \brief Set Transmit Power dynamically. Note: this setting will
2554 not persist over reboots.
2555
2556 \param hHal
2557 \param sessionId Target Session ID
2558 \param mW power to set in mW
2559 \- return eHalStatus
2560
2561 -------------------------------------------------------------------------------*/
2562eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2563
2564/* ---------------------------------------------------------------------------
2565
Jeff Johnson295189b2012-06-20 16:38:30 -07002566 \fn sme_HideSSID
2567
2568 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2569 not persist over reboots.
2570
2571 \param hHal
2572 \param sessionId
2573 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2574 \- return eHalStatus
2575
2576 -------------------------------------------------------------------------------*/
2577eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002578
2579/* ---------------------------------------------------------------------------
2580
2581 \fn sme_SetTmLevel
2582 \brief Set Thermal Mitigation Level to RIVA
2583 \param hHal - The handle returned by macOpen.
2584 \param newTMLevel - new Thermal Mitigation Level
2585 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002586 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002587 ---------------------------------------------------------------------------*/
2588eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2589
2590/*---------------------------------------------------------------------------
2591
2592 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2593 Host and FW.
2594
2595 \param hHal - HAL handle for device
2596
2597 \return NONE
2598
2599---------------------------------------------------------------------------*/
2600void sme_featureCapsExchange(tHalHandle hHal);
2601
Jeff Johnsond13512a2012-07-17 11:42:19 -07002602/*---------------------------------------------------------------------------
2603
Yathish9f22e662012-12-10 14:21:35 -08002604 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2605 between in Host.
2606
2607 \param hHal - HAL handle for device
2608
2609 \return NONE
2610
2611---------------------------------------------------------------------------*/
2612void sme_disableFeatureCapablity(tANI_U8 feature_index);
2613
2614/*---------------------------------------------------------------------------
2615
Jeff Johnsond13512a2012-07-17 11:42:19 -07002616 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2617 country code
2618 Host and FW.
2619
2620 \param hHal - HAL handle for device
2621 \param pCountry - pointer to country code
2622
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002623 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002624
2625 ---------------------------------------------------------------------------*/
2626eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2627
2628/*---------------------------------------------------------------------------
2629
2630 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2631 country code.
2632
2633 \param hHal - HAL handle for device
2634 \param pCountry - pointer to country code
2635
2636 \return Success or failure
2637
2638 ---------------------------------------------------------------------------*/
2639eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2640
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002641/* ---------------------------------------------------------------------------
2642 \fn sme_transportDebug
2643 \brief Dynamically monitoring Transport channels
2644 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002645 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002646 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002647 \param toggleStallDetect Enable stall detect feature
2648 This feature will take effect to data performance
2649 Not integrate till fully verification
2650 \- return NONE
2651 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002652void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002653
Kiran4a17ebe2013-01-31 10:43:43 -08002654/* ---------------------------------------------------------------------------
2655 \fn sme_ResetPowerValuesFor5G
2656 \brief Reset the power values for 5G band with NV power values.
2657 \param hHal - HAL handle for device
2658 \- return NONE
2659 -------------------------------------------------------------------------*/
2660void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2661
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002662#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002663/* ---------------------------------------------------------------------------
2664 \fn sme_UpdateRoamPrefer5GHz
2665 \brief enable/disable Roam prefer 5G runtime option
2666 This function is called through dynamic setConfig callback function
2667 to configure the Roam prefer 5G runtime option
2668 \param hHal - HAL handle for device
2669 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2670 \- return Success or failure
2671 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002672eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002673
2674/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002675 \fn sme_setRoamIntraBand
2676 \brief enable/disable Intra band roaming
2677 This function is called through dynamic setConfig callback function
2678 to configure the intra band roaming
2679 \param hHal - HAL handle for device
2680 \param nRoamIntraBand Enable/Disable Intra band roaming
2681 \- return Success or failure
2682 -------------------------------------------------------------------------*/
2683eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2684
2685/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002686 \fn sme_UpdateRoamScanNProbes
2687 \brief function to update roam scan N probes
2688 This function is called through dynamic setConfig callback function
2689 to update roam scan N probes
2690 \param hHal - HAL handle for device
2691 \param nProbes number of probe requests to be sent out
2692 \- return Success or failure
2693 -------------------------------------------------------------------------*/
2694eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2695
2696/* ---------------------------------------------------------------------------
2697 \fn sme_UpdateRoamScanHomeAwayTime
2698 \brief function to update roam scan Home away time
2699 This function is called through dynamic setConfig callback function
2700 to update roam scan home away time
2701 \param hHal - HAL handle for device
2702 \param nRoamScanAwayTime Scan home away time
2703 \- return Success or failure
2704 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002705eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2706 const v_U16_t nRoamScanHomeAwayTime,
2707 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002708
2709/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002710 \fn sme_getRoamIntraBand
2711 \brief get Intra band roaming
2712 \param hHal - HAL handle for device
2713 \- return Success or failure
2714 -------------------------------------------------------------------------*/
2715v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2716
2717/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002718 \fn sme_getRoamScanNProbes
2719 \brief get N Probes
2720 \param hHal - HAL handle for device
2721 \- return Success or failure
2722 -------------------------------------------------------------------------*/
2723v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2724
2725/* ---------------------------------------------------------------------------
2726 \fn sme_getRoamScanHomeAwayTime
2727 \brief get Roam scan home away time
2728 \param hHal - HAL handle for device
2729 \- return Success or failure
2730 -------------------------------------------------------------------------*/
2731v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2732
2733/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002734 \fn sme_UpdateImmediateRoamRssiDiff
2735 \brief Update nImmediateRoamRssiDiff
2736 This function is called through dynamic setConfig callback function
2737 to configure nImmediateRoamRssiDiff
2738 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2739 \param hHal - HAL handle for device
2740 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2741 candidate and current AP.
2742 \- return Success or failure
2743 -------------------------------------------------------------------------*/
2744
2745eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002746
Srinivas Girigowdade697412013-02-14 16:31:48 -08002747/* ---------------------------------------------------------------------------
2748 \fn sme_UpdateRoamRssiDiff
2749 \brief Update RoamRssiDiff
2750 This function is called through dynamic setConfig callback function
2751 to configure RoamRssiDiff
2752 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2753 \param hHal - HAL handle for device
2754 \param RoamRssiDiff - minimum rssi difference between potential
2755 candidate and current AP.
2756 \- return Success or failure
2757 -------------------------------------------------------------------------*/
2758
2759eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2760
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002761/*--------------------------------------------------------------------------
2762 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2763 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2764 isFastTransitionEnabled.
2765 This is a synchronuous call
2766 \param hHal - The handle returned by macOpen.
2767 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2768 Other status means SME is failed to update isFastTransitionEnabled.
2769 \sa
2770 --------------------------------------------------------------------------*/
2771
2772eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2773 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002774
2775/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002776 \fn sme_UpdateWESMode
2777 \brief Update WESMode
2778 This function is called through dynamic setConfig callback function
2779 to configure isWESModeEnabled
2780 \param hHal - HAL handle for device
2781 \param isWESModeEnabled - Enable/Disable WES Mode
2782 \- return Success or failure
2783 -------------------------------------------------------------------------*/
2784eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2785
2786/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002787 \fn sme_SetRoamScanControl
2788 \brief Set roam scan control
2789 This function is called to set roam scan control
2790 if roam scan control is set to 0, roaming scan cache is cleared
2791 any value other than 0 is treated as invalid value
2792 \param hHal - HAL handle for device
2793 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2794 Other status means SME failure to update
2795 -------------------------------------------------------------------------*/
2796eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002797#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002798
2799#ifdef FEATURE_WLAN_LFR
2800/*--------------------------------------------------------------------------
2801 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002802 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002803 isFastRoamIniFeatureEnabled.
2804 This is a synchronuous call
2805 \param hHal - The handle returned by macOpen.
2806 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2807 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2808 \sa
2809 --------------------------------------------------------------------------*/
2810
Srinivas Girigowdade697412013-02-14 16:31:48 -08002811eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002812 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002813
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002814/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302815 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2816 When Supplicant issue enabled / disable fwr based roaming on the basis
2817 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2818
2819 This is a synchronous call
2820 \param hHal - The handle returned by macOpen.
2821 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2822 Other status means SME is failed to (enabled/disabled) offload scan.
2823 \sa
2824 --------------------------------------------------------------------------*/
2825
2826eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2827 const v_BOOL_t isFastRoamEnabled);
2828
2829/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002830 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2831 Enable/disable LFR MAWC support at runtime
2832 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2833 isMAWCIniFeatureEnabled.
2834 This is a synchronous call
2835 \param hHal - The handle returned by macOpen.
2836 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2837 Other status means SME is failed to update MAWCEnabled.
2838 \sa
2839 --------------------------------------------------------------------------*/
2840eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2841 const v_BOOL_t MAWCEnabled);
2842
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002843
2844#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2845/*--------------------------------------------------------------------------
2846 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2847 This is a synchronuous call
2848 \param hHal - The handle returned by macOpen.
2849 \return eHAL_STATUS_SUCCESS
2850 Other status means SME is failed
2851 \sa
2852 --------------------------------------------------------------------------*/
2853
2854eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2855 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2856#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002857#endif /* FEATURE_WLAN_LFR */
2858
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002859#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002860/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002861 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002862 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002863 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002864 This is a synchronuous call
2865 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002866 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2867 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002868 \sa
2869 --------------------------------------------------------------------------*/
2870
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002871eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2872 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002873
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002874#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002875
2876/*--------------------------------------------------------------------------
2877 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2878 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2879 fEnableFwRssiMonitoring.
2880 This is a synchronuous call
2881 \param hHal - The handle returned by macOpen.
2882 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2883 Other status means SME is failed to update
2884 \sa
2885 --------------------------------------------------------------------------*/
2886
2887eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2888 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002889
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002890#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002891/*--------------------------------------------------------------------------
2892 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2893 This is a synchronuous call
2894 \param hHal - The handle returned by macOpen.
2895 \return eHAL_STATUS_SUCCESS - SME update config successful.
2896 Other status means SME is failed to update
2897 \sa
2898 --------------------------------------------------------------------------*/
2899eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2900 v_U8_t neighborLookupRssiThreshold);
2901
2902/*--------------------------------------------------------------------------
2903 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2904 This is a synchronuous call
2905 \param hHal - The handle returned by macOpen.
2906 \return eHAL_STATUS_SUCCESS - SME update config successful.
2907 Other status means SME is failed to update
2908 \sa
2909 --------------------------------------------------------------------------*/
2910eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2911 v_U8_t neighborReassocRssiThreshold);
2912
2913/*--------------------------------------------------------------------------
2914 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2915 This is a synchronuous call
2916 \param hHal - The handle returned by macOpen.
2917 \return eHAL_STATUS_SUCCESS - SME update config successful.
2918 Other status means SME is failed to update
2919 \sa
2920 --------------------------------------------------------------------------*/
2921v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2922
2923/*--------------------------------------------------------------------------
2924 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2925 This is a synchronuous call
2926 \param hHal - The handle returned by macOpen.
2927 \return eHAL_STATUS_SUCCESS - SME update config successful.
2928 Other status means SME is failed to update
2929 \sa
2930 --------------------------------------------------------------------------*/
2931eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2932 v_U16_t neighborScanResultsRefreshPeriod);
2933
2934/*--------------------------------------------------------------------------
2935 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2936 This is a synchronuous call
2937 \param hHal - The handle returned by macOpen.
2938 \return eHAL_STATUS_SUCCESS - SME update config successful.
2939 Other status means SME is failed to update
2940 \sa
2941 --------------------------------------------------------------------------*/
2942v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2943
2944/*--------------------------------------------------------------------------
2945 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2946 This is a synchronuous call
2947 \param hHal - The handle returned by macOpen.
2948 \return eHAL_STATUS_SUCCESS - SME update config successful.
2949 Other status means SME is failed to update
2950 \sa
2951 --------------------------------------------------------------------------*/
2952v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2953
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002954/* ---------------------------------------------------------------------------
2955 \fn sme_UpdateEmptyScanRefreshPeriod
2956 \brief Update nEmptyScanRefreshPeriod
2957 This function is called through dynamic setConfig callback function
2958 to configure nEmptyScanRefreshPeriod
2959 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2960 \param hHal - HAL handle for device
2961 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2962 \- return Success or failure
2963 -------------------------------------------------------------------------*/
2964eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2965
2966/* ---------------------------------------------------------------------------
2967 \fn sme_setNeighborScanMinChanTime
2968 \brief Update nNeighborScanMinChanTime
2969 This function is called through dynamic setConfig callback function
2970 to configure gNeighborScanChannelMinTime
2971 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2972 \param hHal - HAL handle for device
2973 \param nNeighborScanMinChanTime - Channel minimum dwell time
2974 \- return Success or failure
2975 -------------------------------------------------------------------------*/
2976eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2977
2978/* ---------------------------------------------------------------------------
2979 \fn sme_setNeighborScanMaxChanTime
2980 \brief Update nNeighborScanMaxChanTime
2981 This function is called through dynamic setConfig callback function
2982 to configure gNeighborScanChannelMaxTime
2983 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2984 \param hHal - HAL handle for device
2985 \param nNeighborScanMinChanTime - Channel maximum dwell time
2986 \- return Success or failure
2987 -------------------------------------------------------------------------*/
2988eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2989
2990/* ---------------------------------------------------------------------------
2991 \fn sme_getNeighborScanMinChanTime
2992 \brief get neighbor scan min channel time
2993 \param hHal - The handle returned by macOpen.
2994 \return v_U16_t - channel min time value
2995 -------------------------------------------------------------------------*/
2996v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2997
2998/* ---------------------------------------------------------------------------
2999 \fn sme_getNeighborScanMaxChanTime
3000 \brief get neighbor scan max channel time
3001 \param hHal - The handle returned by macOpen.
3002 \return v_U16_t - channel max time value
3003 -------------------------------------------------------------------------*/
3004v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3005
3006/* ---------------------------------------------------------------------------
3007 \fn sme_setNeighborScanPeriod
3008 \brief Update nNeighborScanPeriod
3009 This function is called through dynamic setConfig callback function
3010 to configure nNeighborScanPeriod
3011 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3012 \param hHal - HAL handle for device
3013 \param nNeighborScanPeriod - neighbor scan period
3014 \- return Success or failure
3015 -------------------------------------------------------------------------*/
3016eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3017
3018/* ---------------------------------------------------------------------------
3019 \fn sme_getNeighborScanPeriod
3020 \brief get neighbor scan period
3021 \param hHal - The handle returned by macOpen.
3022 \return v_U16_t - neighbor scan period
3023 -------------------------------------------------------------------------*/
3024v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3025
3026#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003027
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003028#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003029/*--------------------------------------------------------------------------
3030 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3031 This is a synchronuous call
3032 \param hHal - The handle returned by macOpen.
3033 \return eHAL_STATUS_SUCCESS - SME update config successful.
3034 Other status means SME is failed to update
3035 \sa
3036 --------------------------------------------------------------------------*/
3037v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3038
3039/*--------------------------------------------------------------------------
3040 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3041 This is a synchronuous call
3042 \param hHal - The handle returned by macOpen.
3043 \return eHAL_STATUS_SUCCESS - SME update config successful.
3044 Other status means SME is failed to update
3045 \sa
3046 --------------------------------------------------------------------------*/
3047eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3048 tANI_U8 numChannels);
3049
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003050#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003051/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003052 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003053 This is a synchronuous call
3054 \param hHal - The handle returned by macOpen.
3055 \return eHAL_STATUS_SUCCESS - SME update config successful.
3056 Other status means SME is failed to update
3057 \sa
3058 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003059eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003060 tANI_U8 *pChannelList,
3061 tANI_U8 numChannels);
3062#endif
3063
Srinivas Girigowdade697412013-02-14 16:31:48 -08003064/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003065 \brief sme_getRoamScanChannelList() - get roam scan channel list
3066 This is a synchronuous call
3067 \param hHal - The handle returned by macOpen.
3068 \return eHAL_STATUS_SUCCESS - SME update config successful.
3069 Other status means SME is failed to update
3070 \sa
3071 --------------------------------------------------------------------------*/
3072eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3073 tANI_U8 *pNumChannels);
3074
3075/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003076 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003077 This is a synchronuous call
3078 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003079 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003080 FALSE (0) - if feature is disabled (compile or runtime)
3081 \sa
3082 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003083tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003084
3085/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003086 \brief sme_getWESMode() - getWES Mode
3087 This is a synchronous call
3088 \param hHal - The handle returned by macOpen.
3089 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3090 \sa
3091 --------------------------------------------------------------------------*/
3092v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3093
3094/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003095 \brief sme_GetRoamScanControl() - get scan control
3096 This is a synchronous call
3097 \param hHal - The handle returned by macOpen.
3098 \return v_BOOL_t - Enabled(1)/Disabled(0)
3099 \sa
3100 --------------------------------------------------------------------------*/
3101v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3102
3103/* ---------------------------------------------------------------------------
3104 \fn sme_UpdateEmptyScanRefreshPeriod
3105 \brief Update nnEmptyScanRefreshPeriod
3106 This function is called through dynamic setConfig callback function
3107 to configure nnEmptyScanRefreshPeriod
3108 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3109 \param hHal - HAL handle for device
3110 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3111 \- return Success or failure
3112 -------------------------------------------------------------------------*/
3113
3114/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003115 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3116 This is a synchronuous call
3117 \param hHal - The handle returned by macOpen.
3118 \return TRUE (1) - if the feature is enabled
3119 FALSE (0) - if feature is disabled (compile or runtime)
3120 \sa
3121 --------------------------------------------------------------------------*/
3122tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3123
3124/*--------------------------------------------------------------------------
3125 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3126 This is a synchronuous call
3127 \param hHal - The handle returned by macOpen.
3128 \return TRUE (1) - if the feature is enabled
3129 FALSE (0) - if feature is disabled (compile or runtime)
3130 \sa
3131 --------------------------------------------------------------------------*/
3132tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3133
Srinivas Girigowdade697412013-02-14 16:31:48 -08003134#endif
3135
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003136#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3137/*--------------------------------------------------------------------------
3138 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3139 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3140 gRoamScanOffloadEnabled.
3141 This is a synchronous call
3142 \param hHal - The handle returned by macOpen.
3143 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3144 Other status means SME is failed to update.
3145 \sa
3146 --------------------------------------------------------------------------*/
3147
3148eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3149#endif
3150
3151
Srinivas Girigowdade697412013-02-14 16:31:48 -08003152/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003153 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303154 \brief Check if a feature is enabled by FW
3155
3156 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003157 A value from enum placeHolderInCapBitmap
3158
3159 \- return 1/0 (TRUE/FALSE)
3160 -------------------------------------------------------------------------*/
3161tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303162
3163/* ---------------------------------------------------------------------------
3164 \fn sme_IsFeatureSupportedByDriver
3165 \brief Check if a feature is enabled by driver
3166
3167 \param featEnumValue - Enumeration value of the feature to be checked.
3168 A value from enum placeHolderInCapBitmap
3169
3170 \- return 1/0 (TRUE/FALSE)
3171 -------------------------------------------------------------------------*/
3172tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3173
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003174#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303175
3176/* ---------------------------------------------------------------------------
3177 \fn sme_SendTdlsLinkEstablishParams
3178 \brief API to send TDLS Link Establishment Parameters.
3179
3180 \param peerMac - peer's Mac Adress.
3181 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3182 \- return VOS_STATUS_SUCCES
3183 -------------------------------------------------------------------------*/
3184
3185VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
3186 tANI_U8 sessionId,
3187 tSirMacAddr peerMac,
3188 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
3189
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003190/* ---------------------------------------------------------------------------
3191 \fn sme_SendTdlsMgmtFrame
3192 \brief API to send TDLS management frames.
3193
3194 \param peerMac - peer's Mac Adress.
3195 \param frame_type - Type of TDLS mgmt frame to be sent.
3196 \param dialog - dialog token used in the frame.
3197 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303198 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003199 \param buf - additional IEs to be included
3200 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003201 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003202 \- return VOS_STATUS_SUCCES
3203 -------------------------------------------------------------------------*/
3204VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303205 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 -08003206/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003207 \fn sme_ChangeTdlsPeerSta
3208 \brief API to Update TDLS peer sta parameters.
3209
3210 \param peerMac - peer's Mac Adress.
3211 \param staParams - Peer Station Parameters.
3212 \- return VOS_STATUS_SUCCES
3213 -------------------------------------------------------------------------*/
3214VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
3215 tCsrStaParams *pstaParams);
3216/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003217 \fn sme_AddTdlsPeerSta
3218 \brief API to Add TDLS peer sta entry.
3219
3220 \param peerMac - peer's Mac Adress.
3221 \- return VOS_STATUS_SUCCES
3222 -------------------------------------------------------------------------*/
3223VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3224/* ---------------------------------------------------------------------------
3225 \fn sme_DeleteTdlsPeerSta
3226 \brief API to Delete TDLS peer sta entry.
3227
3228 \param peerMac - peer's Mac Adress.
3229 \- return VOS_STATUS_SUCCES
3230 -------------------------------------------------------------------------*/
3231VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003232/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003233 \fn sme_SetTdlsPowerSaveProhibited
3234 \API to set/reset the isTdlsPowerSaveProhibited.
3235
3236 \- return void
3237 -------------------------------------------------------------------------*/
3238void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003239#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303240/* ---------------------------------------------------------------------------
3241 \fn sme_IsPmcBmps
3242 \brief API to Check if PMC state is BMPS.
3243
3244 \- return v_BOOL_t
3245 -------------------------------------------------------------------------*/
3246v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3247
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003248#ifdef FEATURE_WLAN_TDLS_INTERNAL
3249typedef struct smeTdlsDisResult
3250{
3251 tSirMacAddr tdlsPeerMac;
3252 v_S7_t tdlsPeerRssi;
3253} tSmeTdlsDisResult;
3254
3255VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3256v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
3257 tSmeTdlsDisResult *disResult, v_U8_t listType);
3258VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3259VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003260#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003261eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003262
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003263/*
3264 * SME API to enable/disable WLAN driver initiated SSR
3265 */
3266void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3267
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303268/* ---------------------------------------------------------------------------
3269
3270 \fn sme_SetPhyMode
3271
3272 \brief Changes the PhyMode.
3273
3274 \param hHal - The handle returned by macOpen.
3275
3276 \param phyMode new phyMode which is to set
3277
3278 \return eHalStatus SUCCESS.
3279
3280 -------------------------------------------------------------------------------*/
3281eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3282
3283/* ---------------------------------------------------------------------------
3284
3285 \fn sme_GetPhyMode
3286
3287 \brief gets current PhyMode.
3288
3289 \param hHal - The handle returned by macOpen.
3290
3291 \return eHalStatus PhyMode
3292
3293 -------------------------------------------------------------------------------*/
3294eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3295
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003296/*
3297 * SME API to determine the channel bonding mode
3298 */
3299VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3300
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003301#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3302/*--------------------------------------------------------------------------
3303 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3304 from CSR.
3305 This is a synchronous call
3306 \param hHal - The handle returned by macOpen
3307 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3308 BSSID, channel etc.)
3309 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3310 Other status means SME is failed to send the request.
3311 \sa
3312 --------------------------------------------------------------------------*/
3313
3314eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3315#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003316/*--------------------------------------------------------------------------
3317 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3318 is any connected session .
3319 This is a synchronous call
3320 \param hHal - The handle returned by macOpen
3321 \return VOS_STATUS - SME passed the request to CSR successfully.
3322 Other status means SME is failed to send the request.
3323 \sa
3324 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003325VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003326
Agarwal Ashish57e84372014-12-05 18:26:53 +05303327/*--------------------------------------------------------------------------
3328 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3329 is any connected session .
3330 This is a synchronous call
3331 \param hHal - The handle returned by macOpen
3332 \return VOS_STATUS - SME passed the request to CSR successfully.
3333 Other status means SME is failed to send the request.
3334 \sa
3335 --------------------------------------------------------------------------*/
3336VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3337
Leo Chang9056f462013-08-01 19:21:11 -07003338#ifdef FEATURE_WLAN_LPHB
3339/* ---------------------------------------------------------------------------
3340 \fn sme_LPHBConfigReq
3341 \API to make configuration LPHB within FW.
3342 \param hHal - The handle returned by macOpen
3343 \param lphdReq - LPHB request argument by client
3344 \param pCallbackfn - LPHB timeout notification callback function pointer
3345 \- return Configuration message posting status, SUCCESS or Fail
3346 -------------------------------------------------------------------------*/
3347eHalStatus sme_LPHBConfigReq(
3348 tHalHandle hHal,
3349 tSirLPHBReq *lphdReq,
3350 void (*pCallbackfn)(void *pAdapter, void *indParam));
3351#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003352
3353/* ---------------------------------------------------------------------------
3354 \fn sme_AddPeriodicTxPtrn
3355 \brief API to Periodic TX Pattern Offload feature
3356 \param hHal - The handle returned by macOpen
3357 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3358 \return eHalStatus
3359 ---------------------------------------------------------------------------*/
3360eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3361 *addPeriodicTxPtrnParams);
3362
3363/* ---------------------------------------------------------------------------
3364 \fn sme_DelPeriodicTxPtrn
3365 \brief API to Periodic TX Pattern Offload feature
3366 \param hHal - The handle returned by macOpen
3367 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3368 \return eHalStatus
3369 ---------------------------------------------------------------------------*/
3370eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3371 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003372/*--------------------------------------------------------------------------
3373 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3374 scan parameter.
3375 This is a synchronous call
3376 \param hHal - The handle returned by macOpen
3377 \return None.
3378 \sa
3379 --------------------------------------------------------------------------*/
3380void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3381 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303382
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003383/* ---------------------------------------------------------------------------
3384 \fn sme_SendRateUpdateInd
3385 \brief API to Update rate
3386 \param hHal - The handle returned by macOpen
3387 \param rateUpdateParams - Pointer to rate update params
3388 \return eHalStatus
3389 ---------------------------------------------------------------------------*/
3390eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3391
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303392/*
3393 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3394 * triggers
3395 * return status
3396*/
3397eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3398 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303399 tSmeFastRoamTrigger fastRoamTrig,
3400 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303401
3402eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
3403 tANI_U8 *pBSSId,
3404 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003405
3406void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303407
3408#ifdef FEATURE_WLAN_BATCH_SCAN
3409/* ---------------------------------------------------------------------------
3410 \fn sme_SetBatchScanReq
3411 \brief API to set batch scan request in FW
3412 \param hHal - The handle returned by macOpen.
3413 \param pRequest - Pointer to the batch request.
3414 \param sessionId - session ID
3415 \param callbackRoutine - HDD callback which needs to be invoked after
3416 getting set batch scan response from FW
3417 \param callbackContext - pAdapter context
3418 \return eHalStatus
3419 ---------------------------------------------------------------------------*/
3420eHalStatus
3421sme_SetBatchScanReq
3422(
3423 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3424 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3425 void *callbackContext
3426);
3427
3428/* ---------------------------------------------------------------------------
3429 \fn sme_TriggerBatchScanResultInd
3430 \brief API to trigger batch scan result indications from from FW
3431 \param hHal - The handle returned by macOpen.
3432 \param pRequest - Pointer to get batch request.
3433 \param sessionId - session ID
3434 \param callbackRoutine - HDD callback which needs to be invoked after
3435 getting get batch scan response from FW
3436 \param callbackContext - pAdapter context
3437 \return eHalStatus
3438 ---------------------------------------------------------------------------*/
3439eHalStatus
3440sme_TriggerBatchScanResultInd
3441(
3442 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3443 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3444 void *callbackContext
3445);
3446
3447/* ---------------------------------------------------------------------------
3448 \fn sme_StopBatchScanInd
3449 \brief API to stop batch scan request in FW
3450 \param hHal - The handle returned by macOpen.
3451 \param pRequest - Pointer to stop batch indication
3452 \return eHalStatus
3453 ---------------------------------------------------------------------------*/
3454eHalStatus
3455sme_StopBatchScanInd
3456(
3457 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3458);
3459
3460#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003461
3462#ifdef FEATURE_WLAN_CH_AVOID
3463/* ---------------------------------------------------------------------------
3464 \fn sme_AddChAvoidCallback
3465 \brief Used to plug in callback function
3466 Which notify channel may not be used with SAP or P2PGO mode.
3467 Notification come from FW.
3468 \param hHal
3469 \param pCallbackfn : callback function pointer should be plugged in
3470 \- return eHalStatus
3471 -------------------------------------------------------------------------*/
3472eHalStatus sme_AddChAvoidCallback
3473(
3474 tHalHandle hHal,
3475 void (*pCallbackfn)(void *pAdapter, void *indParam)
3476);
3477#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003478eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303479/* ---------------------------------------------------------------------------
3480 \fn sme_requestTypetoString
3481 \brief API to convert requestType enum values
3482 to string.
3483 ---------------------------------------------------------------------------*/
3484const char * sme_requestTypetoString(const v_U8_t requestType);
3485/* ---------------------------------------------------------------------------
3486 \fn sme_PmcStatetoString
3487 \brief API to convert PmcState enum values
3488 to string.
3489 ---------------------------------------------------------------------------*/
3490const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303491
3492eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3493
Agarwal Ashish5e414792014-06-08 15:25:23 +05303494tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303495
3496// tdlsoffchan
3497VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3498 tANI_U8 sessionId,
3499 tSirMacAddr peerMac,
3500 tANI_S32 tdlsOffCh,
3501 tANI_S32 tdlsOffChBwOffset,
3502 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303503eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3504 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303505void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303506
3507void sme_resetCoexEevent(tHalHandle hHal);
3508
Peng Xu117eab42014-09-25 13:33:27 +05303509tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3510tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303511#ifdef WLAN_FEATURE_AP_HT40_24G
3512void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3513 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303514eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3515 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303516#endif
Peng Xu117eab42014-09-25 13:33:27 +05303517
Agarwal Ashish738843c2014-09-25 12:27:56 +05303518void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3519
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303520/* HDD Callback function */
3521typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3522
3523eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3524 u8 *pCmd,
3525 int length,
3526 pEncryptMsgRSPCb encCB);
3527
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303528/* ---------------------------------------------------------------------------
3529 \fn sme_RegisterBtCoexTDLSCallback
3530 \brief Used to plug in callback function
3531 Which notify btcoex on or off.
3532 Notification come from FW.
3533 \param hHal
3534 \param pCallbackfn : callback function pointer should be plugged in
3535 \- return eHalStatus
3536 -------------------------------------------------------------------------*/
3537eHalStatus sme_RegisterBtCoexTDLSCallback
3538(
3539 tHalHandle hHal,
3540 void (*pCallbackfn)(void *pAdapter, int)
3541);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303542
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303543/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303544 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303545
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303546 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303547
3548 \param hHal - The handle returned by macOpen.
3549
3550 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3551 eANI_BOOLEAN_FALSE otherwise
3552---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303553tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303554
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303555/* ---------------------------------------------------------------------------
3556
3557 \fn sme_IsTdlsOffChannelValid
3558 \brief To check if the channel is valid for currently established domain
3559 This is a synchronous API.
3560
3561 \param hHal - The handle returned by macOpen.
3562 \param channel - channel to verify
3563
3564 \return TRUE/FALSE, TRUE if channel is valid
3565
3566 -------------------------------------------------------------------------------*/
3567tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3568
Mukul Sharma4be88422015-03-09 20:29:07 +05303569/* --------------------------------------------------------------------------
3570
3571 \fn sme_IsCoexScoIndicationSet
3572 \brief To check if the BTC module in fwr has sent the SCO
3573 indication to host or not
3574
3575 \param hHal - The handle returned by macOpen.
3576 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3577
3578 --------------------------------------------------------------------------*/
3579tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3580
Abhishek Singh01c73d12015-03-12 15:13:44 +05303581eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3582 tANI_U32 iniNumBuffAdvert,
3583 tANI_U32 set_value);
3584
Jeff Johnson295189b2012-06-20 16:38:30 -07003585#endif //#if !defined( __SME_API_H )