blob: 2576d837df6080846155081765c64150df4fa2af [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
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530652/*
653 * ---------------------------------------------------------------------------
654 * \fn sme_FilterScanDFSResults
655 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
656 * from the scan results.
657 * \return eHalStatus
658 *---------------------------------------------------------------------------
659 */
660eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
661
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700662eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700663
664/* ---------------------------------------------------------------------------
665 \fn sme_ScanResultGetFirst
666 \brief a wrapper function to request CSR to returns the first element of
667 scan result.
668 \param hScanResult - returned from csrScanGetResult
669 \return tCsrScanResultInfo * - NULL if no result
670 ---------------------------------------------------------------------------*/
671tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
672 tScanResultHandle hScanResult);
673
674/* ---------------------------------------------------------------------------
675 \fn sme_ScanResultGetNext
676 \brief a wrapper function to request CSR to returns the next element of
677 scan result. It can be called without calling csrScanResultGetFirst
678 first
679 \param hScanResult - returned from csrScanGetResult
680 \return Null if no result or reach the end
681 ---------------------------------------------------------------------------*/
682tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
683 tScanResultHandle hScanResult);
684
685/* ---------------------------------------------------------------------------
686 \fn sme_ScanResultPurge
687 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
688 in the list and free memory for each item
689 \param hScanResult - returned from csrScanGetResult. hScanResult is
690 considered gone by
691 calling this function and even before this function reutrns.
692 \return eHalStatus
693 ---------------------------------------------------------------------------*/
694eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
695
696/* ---------------------------------------------------------------------------
697 \fn sme_ScanGetPMKIDCandidateList
698 \brief a wrapper function to return the PMKID candidate list
699 \param pPmkidList - caller allocated buffer point to an array of
700 tPmkidCandidateInfo
701 \param pNumItems - pointer to a variable that has the number of
702 tPmkidCandidateInfo allocated when retruning, this is
703 either the number needed or number of items put into
704 pPmkidList
705 \return eHalStatus - when fail, it usually means the buffer allocated is not
706 big enough and pNumItems
707 has the number of tPmkidCandidateInfo.
708 \Note: pNumItems is a number of tPmkidCandidateInfo,
709 not sizeof(tPmkidCandidateInfo) * something
710 ---------------------------------------------------------------------------*/
711eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
712 tPmkidCandidateInfo *pPmkidList,
713 tANI_U32 *pNumItems );
714
715
716/*----------------------------------------------------------------------------
717 \fn sme_RoamRegisterLinkQualityIndCallback
718
719 \brief
720 a wrapper function to allow HDD to register a callback handler with CSR for
721 link quality indications.
722
723 Only one callback may be registered at any time.
724 In order to deregister the callback, a NULL cback may be provided.
725
726 Registration happens in the task context of the caller.
727
728 \param callback - Call back being registered
729 \param pContext - user data
730
731 DEPENDENCIES: After CSR open
732
733 \return eHalStatus
734-----------------------------------------------------------------------------*/
735eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
736 csrRoamLinkQualityIndCallback callback,
737 void *pContext);
738
739
740/* ---------------------------------------------------------------------------
741 \fn sme_RoamConnect
742 \brief a wrapper function to request CSR to inititiate an association
743 \param sessionId - the sessionId returned by sme_OpenSession.
744 \param pProfile - can be NULL to join to any open ones
745 \param pRoamId - to get back the request ID
746 \return eHalStatus
747 ---------------------------------------------------------------------------*/
748eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
749 tANI_U32 *pRoamId);
750
751/* ---------------------------------------------------------------------------
752 \fn sme_RoamReassoc
753 \brief a wrapper function to request CSR to inititiate a re-association
754 \param pProfile - can be NULL to join the currently connected AP. In that
755 case modProfileFields should carry the modified field(s) which could trigger
756 reassoc
757 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
758 that might need modification dynamically once STA is up & running and this
759 could trigger a reassoc
760 \param pRoamId - to get back the request ID
761 \return eHalStatus
762 -------------------------------------------------------------------------------*/
763eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
764 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700765 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700766
767/* ---------------------------------------------------------------------------
768 \fn sme_RoamConnectToLastProfile
769 \brief a wrapper function to request CSR to disconnect and reconnect with
770 the same profile
771 \return eHalStatus. It returns fail if currently connected
772 ---------------------------------------------------------------------------*/
773eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
774
775/* ---------------------------------------------------------------------------
776 \fn sme_RoamDisconnect
777 \brief a wrapper function to request CSR to disconnect from a network
778 \param reason -- To indicate the reason for disconnecting. Currently, only
779 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
780 \return eHalStatus
781 ---------------------------------------------------------------------------*/
782eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
783
Jeff Johnson295189b2012-06-20 16:38:30 -0700784/* ---------------------------------------------------------------------------
785 \fn sme_RoamStopBss
786 \brief a wrapper function to request CSR to stop bss
787 \param sessionId - sessionId of SoftAP
788 \return eHalStatus
789 ---------------------------------------------------------------------------*/
790eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
791
792/* ---------------------------------------------------------------------------
793 \fn sme_RoamGetAssociatedStas
794 \brief To probe the list of associated stations from various modules of CORE stack.
795 \This is an asynchronous API.
796 \param sessionId - sessionId of SoftAP
797 \param modId - Module from whom list of associtated stations is to be probed.
798 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
799 \param pUsrContext - Opaque HDD context
800 \param pfnSapEventCallback - Sap event callback in HDD
801 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
802 \return eHalStatus
803 -------------------------------------------------------------------------------*/
804eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
805 VOS_MODULE_ID modId, void *pUsrContext,
806 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
807
808/* ---------------------------------------------------------------------------
809 \fn sme_RoamDisconnectSta
810 \brief To disassociate a station. This is an asynchronous API.
811 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
812 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
813 -------------------------------------------------------------------------------*/
814eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
815
816/* ---------------------------------------------------------------------------
817 \fn sme_RoamDeauthSta
818 \brief To disassociate a station. This is an asynchronous API.
819 \param hHal - Global structure
820 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530821 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700822 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
823 -------------------------------------------------------------------------------*/
824eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530825 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700826
827/* ---------------------------------------------------------------------------
828 \fn sme_RoamTKIPCounterMeasures
829 \brief To start or stop TKIP counter measures. This is an asynchronous API.
830 \param sessionId - sessionId of SoftAP
831 \param bEnable - Flag to start/stop TKIP countermeasures
832 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
833 -------------------------------------------------------------------------------*/
834eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
835
836/* ---------------------------------------------------------------------------
837 \fn sme_RoamGetWpsSessionOverlap
838 \brief To get the WPS PBC session overlap information.
839 \This is an asynchronous API.
840 \param sessionId - sessionId of SoftAP
841 \param pUsrContext - Opaque HDD context
842 \param pfnSapEventCallback - Sap event callback in HDD
843 \return eHalStatus
844 -------------------------------------------------------------------------------*/
845eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
846 void *pUsrContext, void *pfnSapEventCallback,
847 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700848
849/* ---------------------------------------------------------------------------
850 \fn sme_RoamGetConnectState
851 \brief a wrapper function to request CSR to return the current connect state
852 of Roaming
853 \return eHalStatus
854 ---------------------------------------------------------------------------*/
855eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
856
857/* ---------------------------------------------------------------------------
858 \fn sme_RoamGetConnectProfile
859 \brief a wrapper function to request CSR to return the current connect
860 profile. Caller must call csrRoamFreeConnectProfile after it is done
861 and before reuse for another csrRoamGetConnectProfile call.
862 \param pProfile - pointer to a caller allocated structure
863 tCsrRoamConnectedProfile
864 \return eHalStatus. Failure if not connected
865 ---------------------------------------------------------------------------*/
866eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
867 tCsrRoamConnectedProfile *pProfile);
868
869/* ---------------------------------------------------------------------------
870 \fn sme_RoamFreeConnectProfile
871 \brief a wrapper function to request CSR to free and reinitialize the
872 profile returned previously by csrRoamGetConnectProfile.
873 \param pProfile - pointer to a caller allocated structure
874 tCsrRoamConnectedProfile
875 \return eHalStatus.
876 ---------------------------------------------------------------------------*/
877eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
878 tCsrRoamConnectedProfile *pProfile);
879
880/* ---------------------------------------------------------------------------
881 \fn sme_RoamSetPMKIDCache
882 \brief a wrapper function to request CSR to return the PMKID candidate list
883 \param pPMKIDCache - caller allocated buffer point to an array of
884 tPmkidCacheInfo
885 \param numItems - a variable that has the number of tPmkidCacheInfo
886 allocated when retruning, this is either the number needed
887 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530888 \param update_entire_cache - if TRUE, then it overwrites the entire cache
889 with pPMKIDCache, else it updates entry by
890 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700891 \return eHalStatus - when fail, it usually means the buffer allocated is not
892 big enough and pNumItems has the number of
893 tPmkidCacheInfo.
894 \Note: pNumItems is a number of tPmkidCacheInfo,
895 not sizeof(tPmkidCacheInfo) * something
896 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530897eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
898 tPmkidCacheInfo *pPMKIDCache,
899 tANI_U32 numItems,
900 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700901
902/* ---------------------------------------------------------------------------
903 \fn sme_RoamGetSecurityReqIE
904 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
905 passes to PE to JOIN request or START_BSS request
906 This is a synchronuous call.
907 \param sessionId - returned by sme_OpenSession.
908 \param pLen - caller allocated memory that has the length of pBuf as input.
909 Upon returned, *pLen has the needed or IE length in pBuf.
910 \param pBuf - Caller allocated memory that contain the IE field, if any,
911 upon return
912 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
913 \return eHalStatus - when fail, it usually means the buffer allocated is not
914 big enough
915 ---------------------------------------------------------------------------*/
916eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
917 tANI_U8 *pBuf, eCsrSecurityType secType);
918
919/* ---------------------------------------------------------------------------
920 \fn sme_RoamGetSecurityRspIE
921 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
922 the beacon or probe rsp if connected
923 \param sessionId - returned by sme_OpenSession.
924 \param pLen - caller allocated memory that has the length of pBuf as input.
925 Upon returned, *pLen has the needed or IE length in pBuf.
926 \param pBuf - Caller allocated memory that contain the IE field, if any,
927 upon return
928 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
929 \return eHalStatus - when fail, it usually means the buffer allocated is not
930 big enough
931 ---------------------------------------------------------------------------*/
932eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
933 tANI_U8 *pBuf, eCsrSecurityType secType);
934
935
936/* ---------------------------------------------------------------------------
937 \fn sme_RoamGetNumPMKIDCache
938 \brief a wrapper function to request CSR to return number of PMKID cache
939 entries
940 \return tANI_U32 - the number of PMKID cache entries
941 ---------------------------------------------------------------------------*/
942tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
943
944/* ---------------------------------------------------------------------------
945 \fn sme_RoamGetPMKIDCache
946 \brief a wrapper function to request CSR to return PMKID cache from CSR
947 \param pNum - caller allocated memory that has the space of the number of
948 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
949 needed or actually number in tPmkidCacheInfo.
950 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
951 any, upon return
952 \return eHalStatus - when fail, it usually means the buffer allocated is not
953 big enough
954 ---------------------------------------------------------------------------*/
955eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
956 tPmkidCacheInfo *pPmkidCache);
957
958/* ---------------------------------------------------------------------------
959 \fn sme_GetConfigParam
960 \brief a wrapper function that HDD calls to get the global settings
961 currently maintained by CSR.
962 \param pParam - caller allocated memory
963 \return eHalStatus
964 ---------------------------------------------------------------------------*/
965eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
966
967/* ---------------------------------------------------------------------------
968 \fn sme_GetStatistics
969 \brief a wrapper function that client calls to register a callback to get
970 different PHY level statistics from CSR.
971
972 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
973 \param statsMask - The different category/categories of stats requester is looking for
974 The order in which you set the bits in the statsMask for requesting
975 different type of stats is:
976
977 eCsrSummaryStats = bit 0
978 eCsrGlobalClassAStats = bit 1
979 eCsrGlobalClassBStats = bit 2
980 eCsrGlobalClassCStats = bit 3
981 eCsrGlobalClassDStats = bit 4
982 eCsrPerStaStats = bit 5
983
984 \param callback - SME sends back the requested stats using the callback
985 \param periodicity - If requester needs periodic update, 0 means it's an one
986 time request
987 \param cache - If requester is happy with cached stats
988 \param staId - The station ID for which the stats is requested for
989 \param pContext - user context to be passed back along with the callback
990 \return eHalStatus
991 ---------------------------------------------------------------------------*/
992eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
993 tANI_U32 statsMask,
994 tCsrStatsCallback callback,
995 tANI_U32 periodicity, tANI_BOOLEAN cache,
996 tANI_U8 staId, void *pContext);
997
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +0530998/* ---------------------------------------------------------------------------
999 \fn smeGetTLSTAState
1000 \helper function to get teh TL STA State whenever the function is called.
1001
1002 \param staId - The staID to be passed to the TL
1003 to get the relevant TL STA State
1004 \return the state as tANI_U16
1005 ---------------------------------------------------------------------------*/
1006tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1007
Jeff Johnson295189b2012-06-20 16:38:30 -07001008eHalStatus sme_GetRssi(tHalHandle hHal,
1009 tCsrRssiCallback callback,
1010 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301011
1012/* ---------------------------------------------------------------------------
1013 \fn sme_GetSnr
1014 \brief a wrapper function that client calls to register a callback to get
1015 SNR from FW
1016
1017 \param callback - SME sends back the requested stats using the callback
1018 \param staId - The station ID for which the stats is requested for
1019 \param bssid - The bssid of the connected session
1020 \param pContext - user context to be passed back along with the callback
1021 ---------------------------------------------------------------------------*/
1022eHalStatus sme_GetSnr(tHalHandle hHal,
1023 tCsrSnrCallback callback,
1024 tANI_U8 staId, tCsrBssid bssId,
1025 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001026#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001027eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1028 tCsrRssiCallback callback,
1029 tANI_U8 staId,
1030 tCsrBssid bssId,
1031 void *pContext,
1032 void* pVosContext);
1033#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001034
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001035#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001036/* ---------------------------------------------------------------------------
1037 \fn sme_GetTsmStats
1038 \brief a wrapper function that client calls to register a callback to get TSM Stats
1039
1040 \param callback - SME sends back the requested stats using the callback
1041 \param staId - The station ID for which the stats is requested for
1042 \param pContext - user context to be passed back along with the callback
1043 \param pVosContext - vos context
1044 \return eHalStatus
1045 ---------------------------------------------------------------------------*/
1046eHalStatus sme_GetTsmStats(tHalHandle hHal,
1047 tCsrTsmStatsCallback callback,
1048 tANI_U8 staId, tCsrBssid bssId,
1049 void *pContext, void* pVosContext, tANI_U8 tid);
1050
1051/* ---------------------------------------------------------------------------
1052 \fn sme_SetCCKMIe
1053 \brief function to store the CCKM IE passed from supplicant and use it while packing
1054 reassociation request
1055 \param hHal - HAL handle for device
1056 \param pCckmIe - pointer to CCKM IE data
1057 \param pCckmIeLen - length of the CCKM IE
1058 \- return Success or failure
1059 -------------------------------------------------------------------------*/
1060eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1061
1062
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001063/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001064 \fn sme_SetEseBeaconRequest
1065 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001066 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001067 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001068 \- return Success or failure
1069 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001070eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1071 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001072
1073
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001074#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001075/* ---------------------------------------------------------------------------
1076 \fn sme_CfgSetInt
1077 \brief a wrapper function that HDD calls to set parameters in CFG.
1078 \param cfgId - Configuration Parameter ID (type) for STA.
1079 \param ccmValue - The information related to Configuration Parameter ID
1080 which needs to be saved in CFG
1081 \param callback - To be registered by CSR with CCM. Once the CFG done with
1082 saving the information in the database, it notifies CCM &
1083 then the callback will be invoked to notify.
1084 \param toBeSaved - To save the request for future reference
1085 \return eHalStatus
1086 ---------------------------------------------------------------------------*/
1087eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1088 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1089
1090/* ---------------------------------------------------------------------------
1091 \fn sme_CfgSetStr
1092 \brief a wrapper function that HDD calls to set parameters in CFG.
1093 \param cfgId - Configuration Parameter ID (type) for STA.
1094 \param pStr - Pointer to the byte array which carries the information needs
1095 to be saved in CFG
1096 \param length - Length of the data to be saved
1097 \param callback - To be registered by CSR with CCM. Once the CFG done with
1098 saving the information in the database, it notifies CCM &
1099 then the callback will be invoked to notify.
1100 \param toBeSaved - To save the request for future reference
1101 \return eHalStatus
1102 ---------------------------------------------------------------------------*/
1103eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1104 tANI_U32 length, tCcmCfgSetCallback callback,
1105 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301106/* ---------------------------------------------------------------------------
1107 \fn sme_GetModifyProfileFields
1108 \brief HDD or SME - QOS calls this function to get the current values of
1109 connected profile fields, changing which can cause reassoc.
1110 This function must be called after CFG is downloaded and STA is in connected
1111 state. Also, make sure to call this function to get the current profile
1112 fields before calling the reassoc. So that pModifyProfileFields will have
1113 all the latest values plus the one(s) has been updated as part of reassoc
1114 request.
1115 \param pModifyProfileFields - pointer to the connected profile fields
1116 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001117
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301118 \return eHalStatus
1119 -------------------------------------------------------------------------------*/
1120eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1121 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301122/* ---------------------------------------------------------------------------
1123 \fn sme_HT40StopOBSSScan
1124 \brief HDD or SME - Command to stop the OBSS scan
1125 THis is implemented only for debugging purpose.
1126 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1127 \param sessionId - sessionId
1128 changing which can cause reassoc
1129
1130 \return eHalStatus
1131 -------------------------------------------------------------------------------*/
1132eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001133
1134/*--------------------------------------------------------------------------
1135 \fn sme_SetConfigPowerSave
1136 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1137 For BMPS related configuration, this function also updates the CFG
1138 and sends a message to FW to pick up the new values. Note: Calling
1139 this function only updates the configuration and does not enable
1140 the specified power save mode.
1141 \param hHal - The handle returned by macOpen.
1142 \param psMode - Power Saving mode being modified
1143 \param pConfigParams - a pointer to a caller allocated object of type
1144 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1145 \return eHalStatus
1146 --------------------------------------------------------------------------*/
1147eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1148 void *pConfigParams);
1149
1150/*--------------------------------------------------------------------------
1151 \fn sme_GetConfigPowerSave
1152 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1153 \param hHal - The handle returned by macOpen.
1154 \param psMode - Power Saving mode
1155 \param pConfigParams - a pointer to a caller allocated object of type
1156 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1157 \return eHalStatus
1158 --------------------------------------------------------------------------*/
1159eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1160 void *pConfigParams);
1161
1162/* ---------------------------------------------------------------------------
1163 \fn sme_SignalPowerEvent
1164 \brief Signals to PMC that a power event has occurred. Used for putting
1165 the chip into deep sleep mode.
1166 \param hHal - The handle returned by macOpen.
1167 \param event - the event that has occurred
1168 \return eHalStatus
1169 ---------------------------------------------------------------------------*/
1170extern eHalStatus sme_SignalPowerEvent (
1171 tHalHandle hHal,
1172 tPmcPowerEvent event);
1173
1174/* ---------------------------------------------------------------------------
1175 \fn sme_EnablePowerSave
1176 \brief Enables one of the power saving modes. This API does not cause a
1177 device state change. This is purely a configuration API.
1178 \param hHal - The handle returned by macOpen.
1179 \param psMode - The power saving mode to enable.
1180 \return eHalStatus
1181 ---------------------------------------------------------------------------*/
1182extern eHalStatus sme_EnablePowerSave (
1183 tHalHandle hHal,
1184 tPmcPowerSavingMode psMode);
1185
1186/* ---------------------------------------------------------------------------
1187 \fn sme_DisablePowerSave
1188 \brief Disables one of the power saving modes.Disabling does not imply
1189 that device will be brought out of the current PS mode. This is
1190 purely a configuration API.
1191 \param hHal - The handle returned by macOpen.
1192 \param psMode - The power saving mode to disable.
1193 \return eHalStatus
1194 ---------------------------------------------------------------------------*/
1195extern eHalStatus sme_DisablePowerSave (
1196 tHalHandle hHal,
1197 tPmcPowerSavingMode psMode);
1198
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301199 /* ---------------------------------------------------------------------------
1200 \fn sme_SetHostPowerSave
1201 \brief The BMPS logic is controlled by the User level Apps
1202 \param hHal - The handle returned by macOpen.
1203 \param psMode - The power saving mode to enable.
1204 \return eHalStatus
1205 ---------------------------------------------------------------------------*/
1206extern eHalStatus sme_SetHostPowerSave (
1207 tHalHandle hHal,
1208 v_BOOL_t psMode);
1209
Jeff Johnson295189b2012-06-20 16:38:30 -07001210/* ---------------------------------------------------------------------------
1211 \fn sme_StartAutoBmpsTimer
1212 \brief Starts a timer that periodically polls all the registered
1213 module for entry into Bmps mode. This timer is started only if BMPS is
1214 enabled and whenever the device is in full power.
1215 \param hHal - The handle returned by macOpen.
1216 \return eHalStatus
1217 ---------------------------------------------------------------------------*/
1218extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1219
1220/* ---------------------------------------------------------------------------
1221 \fn sme_StopAutoBmpsTimer
1222 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1223 Stopping the timer does not cause a device state change. Only the timer
1224 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1225 \param hHal - The handle returned by macOpen.
1226 \return eHalStatus
1227 ---------------------------------------------------------------------------*/
1228extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1229
1230/* ---------------------------------------------------------------------------
1231 \fn sme_QueryPowerState
1232 \brief Returns the current power state of the device.
1233 \param hHal - The handle returned by macOpen.
1234 \param pPowerState - pointer to location to return power state
1235 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1236 \return eHalStatus
1237 ---------------------------------------------------------------------------*/
1238extern eHalStatus sme_QueryPowerState (
1239 tHalHandle hHal,
1240 tPmcPowerState *pPowerState,
1241 tPmcSwitchState *pSwWlanSwitchState);
1242
1243/* ---------------------------------------------------------------------------
1244 \fn sme_IsPowerSaveEnabled
1245 \brief Checks if the device is able to enter a particular power save mode
1246 This does not imply that the device is in a particular PS mode
1247 \param hHal - The handle returned by macOpen.
1248 \param psMode - the power saving mode
1249 \return eHalStatus
1250 ---------------------------------------------------------------------------*/
1251extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1252 tHalHandle hHal,
1253 tPmcPowerSavingMode psMode);
1254
1255/* ---------------------------------------------------------------------------
1256 \fn sme_RequestFullPower
1257 \brief Request that the device be brought to full power state.
1258 Note 1: If "fullPowerReason" specificied in this API is set to
1259 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1260 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1261 HDD is requesting full power, we need to undo any previous HDD requests for
1262 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1263 specified anything other than above, the buffered requests for BMPS and WoWL
1264 will not be cleared.
1265 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1266 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1267 request".
1268 Note 3: When the device finally enters Full Power PMC will start a timer
1269 if any of the following holds true:
1270 - Auto BMPS mode is enabled
1271 - Uapsd request is pending
1272 - HDD's request for BMPS is pending
1273 - HDD's request for WoWL is pending
1274 On timer expiry PMC will attempt to put the device in BMPS mode if following
1275 (in addition to those listed above) holds true:
1276 - Polling of all modules through the Power Save Check routine passes
1277 - STA is associated to an access point
1278 \param hHal - The handle returned by macOpen.
1279 \param - callbackRoutine Callback routine invoked in case of success/failure
1280 \param - callbackContext - Cookie to be passed back during callback
1281 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1282 distinguish between BAP and HDD requests
1283 \return eHalStatus - status
1284 eHAL_STATUS_SUCCESS - device brought to full power state
1285 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1286 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1287 ---------------------------------------------------------------------------*/
1288extern eHalStatus sme_RequestFullPower (
1289 tHalHandle hHal,
1290 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1291 void *callbackContext,
1292 tRequestFullPowerReason fullPowerReason);
1293
1294/* ---------------------------------------------------------------------------
1295 \fn sme_RequestBmps
1296 \brief Request that the device be put in BMPS state. Request will be
1297 accepted only if BMPS mode is enabled and power save check routine
1298 passes. Only HDD should invoke this API.
1299 \param hHal - The handle returned by macOpen.
1300 \param - callbackRoutine Callback routine invoked in case of success/failure
1301 \param - callbackContext - Cookie to be passed back during callback
1302 \return eHalStatus
1303 eHAL_STATUS_SUCCESS - device is in BMPS state
1304 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1305 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1306 ---------------------------------------------------------------------------*/
1307extern eHalStatus sme_RequestBmps (
1308 tHalHandle hHal,
1309 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1310 void *callbackContext);
1311
1312/* ---------------------------------------------------------------------------
1313 \fn sme_SetDHCPTillPowerActiveFlag
1314 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1315 entry by PMC
1316 \param hHal - The handle returned by macOpen.
1317 ---------------------------------------------------------------------------*/
1318void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1319
1320
1321/* ---------------------------------------------------------------------------
1322 \fn sme_StartUapsd
1323 \brief Request that the device be put in UAPSD state. If the device is in
1324 Full Power it will be put in BMPS mode first and then into UAPSD
1325 mode.
1326 \param hHal - The handle returned by macOpen.
1327 \param - callbackRoutine Callback routine invoked in case of success/failure
1328 \param - callbackContext - Cookie to be passed back during callback
1329 eHAL_STATUS_SUCCESS - device is in UAPSD state
1330 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1331 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1332 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1333 \return eHalStatus
1334 ---------------------------------------------------------------------------*/
1335extern eHalStatus sme_StartUapsd (
1336 tHalHandle hHal,
1337 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1338 void *callbackContext);
1339
1340/* ---------------------------------------------------------------------------
1341 \fn sme_StopUapsd
1342 \brief Request that the device be put out of UAPSD state. Device will be
1343 put in in BMPS state after stop UAPSD completes. Buffered requests for
1344 UAPSD will be cleared after this.
1345 \param hHal - The handle returned by macOpen.
1346 \return eHalStatus
1347 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1348 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1349 ---------------------------------------------------------------------------*/
1350extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1351
1352/* ---------------------------------------------------------------------------
1353 \fn sme_RequestStandby
1354 \brief Request that the device be put in standby. It is HDD's responsibility
1355 to bring the chip to full power and do a discconnect before calling
1356 this API. Request for standby will be rejected if STA is associated
1357 to an AP.
1358 \param hHal - The handle returned by macOpen.
1359 \param - callbackRoutine Callback routine invoked in case of success/failure
1360 \param - callbackContext - Cookie to be passed back during callback
1361 \return eHalStatus
1362 eHAL_STATUS_SUCCESS - device is in Standby mode
1363 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1364 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1365 ---------------------------------------------------------------------------*/
1366extern eHalStatus sme_RequestStandby (
1367 tHalHandle hHal,
1368 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1369 void *callbackContext);
1370
1371/* ---------------------------------------------------------------------------
1372 \fn sme_RegisterPowerSaveCheck
1373 \brief Register a power save check routine that is called whenever
1374 the device is about to enter one of the power save modes.
1375 \param hHal - The handle returned by macOpen.
1376 \param checkRoutine - Power save check routine to be registered
1377 \param callbackContext - Cookie to be passed back during callback
1378 \return eHalStatus
1379 eHAL_STATUS_SUCCESS - successfully registered
1380 eHAL_STATUS_FAILURE - not successfully registered
1381 ---------------------------------------------------------------------------*/
1382extern eHalStatus sme_RegisterPowerSaveCheck (
1383 tHalHandle hHal,
1384 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1385
1386/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301387 \fn sme_Register11dScanDoneCallback
1388 \brief Register a routine of type csrScanCompleteCallback which is
1389 called whenever an 11d scan is done
1390 \param hHal - The handle returned by macOpen.
1391 \param callback - 11d scan complete routine to be registered
1392 \return eHalStatus
1393 ---------------------------------------------------------------------------*/
1394extern eHalStatus sme_Register11dScanDoneCallback (
1395 tHalHandle hHal,
1396 csrScanCompleteCallback);
1397
1398/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001399 \fn sme_DeregisterPowerSaveCheck
1400 \brief Deregister a power save check routine
1401 \param hHal - The handle returned by macOpen.
1402 \param checkRoutine - Power save check routine to be deregistered
1403 \return eHalStatus
1404 eHAL_STATUS_SUCCESS - successfully deregistered
1405 eHAL_STATUS_FAILURE - not successfully deregistered
1406 ---------------------------------------------------------------------------*/
1407extern eHalStatus sme_DeregisterPowerSaveCheck (
1408 tHalHandle hHal,
1409 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1410
1411/* ---------------------------------------------------------------------------
1412 \fn sme_RegisterDeviceStateUpdateInd
1413 \brief Register a callback routine that is called whenever
1414 the device enters a new device state (Full Power, BMPS, UAPSD)
1415 \param hHal - The handle returned by macOpen.
1416 \param callbackRoutine - Callback routine to be registered
1417 \param callbackContext - Cookie to be passed back during callback
1418 \return eHalStatus
1419 eHAL_STATUS_SUCCESS - successfully registered
1420 eHAL_STATUS_FAILURE - not successfully registered
1421 ---------------------------------------------------------------------------*/
1422extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1423 tHalHandle hHal,
1424 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1425 void *callbackContext);
1426
1427/* ---------------------------------------------------------------------------
1428 \fn sme_DeregisterDeviceStateUpdateInd
1429 \brief Deregister a routine that was registered for device state changes
1430 \param hHal - The handle returned by macOpen.
1431 \param callbackRoutine - Callback routine to be deregistered
1432 \return eHalStatus
1433 eHAL_STATUS_SUCCESS - successfully deregistered
1434 eHAL_STATUS_FAILURE - not successfully deregistered
1435 ---------------------------------------------------------------------------*/
1436extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1437 tHalHandle hHal,
1438 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1439
1440/* ---------------------------------------------------------------------------
1441 \fn sme_WowlAddBcastPattern
1442 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1443 do a pattern match on these patterns when Wowl is enabled during BMPS
1444 mode.
1445 \param hHal - The handle returned by macOpen.
1446 \param pattern - Pattern to be added
1447 \return eHalStatus
1448 eHAL_STATUS_FAILURE Cannot add pattern
1449 eHAL_STATUS_SUCCESS Request accepted.
1450 ---------------------------------------------------------------------------*/
1451extern eHalStatus sme_WowlAddBcastPattern (
1452 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001453 tpSirWowlAddBcastPtrn pattern,
1454 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001455
1456/* ---------------------------------------------------------------------------
1457 \fn sme_WowlDelBcastPattern
1458 \brief Delete a pattern that was added for Pattern Byte Matching.
1459 \param hHal - The handle returned by macOpen.
1460 \param pattern - Pattern to be deleted
1461 \return eHalStatus
1462 eHAL_STATUS_FAILURE Cannot delete pattern
1463 eHAL_STATUS_SUCCESS Request accepted.
1464 ---------------------------------------------------------------------------*/
1465extern eHalStatus sme_WowlDelBcastPattern (
1466 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001467 tpSirWowlDelBcastPtrn pattern,
1468 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001469
1470/* ---------------------------------------------------------------------------
1471 \fn sme_EnterWowl
1472 \brief This is the API to request entry into WOWL mode.
1473 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1474 SME will will cache the information that WOWL has been requested and
1475 attempt to put the device in BMPS first. On entry into BMPS, SME will
1476 enter the WOWL mode.
1477 Note 1: After WoWL request is accepted, If module other than HDD requests
1478 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1479 and attempt to put the chip into BMPS+WOWL based on a timer.
1480 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1481 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1482 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1483 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1484 are required. Currently there is no requirement or use case to support UAPSD
1485 and WOWL at the same time.
1486 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1487 Note 5. Request for WoWL is rejected if BMPS is disabled.
1488
1489 \param hHal - The handle returned by macOpen.
1490 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1491 Used for success/failure notification by SME
1492 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1493 at the time of callback.
1494 \param wakeReasonIndCB - Callback routine provided by HDD.
1495 Used for Wake Reason Indication by SME
1496 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1497 at the time of callback.
1498 \return eHalStatus
1499 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1500 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1501 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1502 mode is entered.
1503 ---------------------------------------------------------------------------*/
1504extern eHalStatus sme_EnterWowl (
1505 tHalHandle hHal,
1506 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1507 void *enterWowlCallbackContext,
1508#ifdef WLAN_WAKEUP_EVENTS
1509 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1510 void *wakeReasonIndCBContext,
1511#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001512 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001513
1514/* ---------------------------------------------------------------------------
1515 \fn sme_ExitWowl
1516 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1517 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1518 mode. Any Buffered request for WoWL will be cleared after this API.
1519 \param hHal - The handle returned by macOpen.
1520 \return eHalStatus
1521 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1522 only if the previous "Enter WOWL" transaction has
1523 not even completed.
1524 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1525 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301526extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001527
1528/* ---------------------------------------------------------------------------
1529
1530 \fn sme_RoamSetKey
1531
1532 \brief To set encryption key. This function should be called only when connected
1533 This is an asynchronous API.
1534
1535 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1536
1537 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1538
1539 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1540
1541 FAILURE or RESOURCES The API finished and failed.
1542
1543 -------------------------------------------------------------------------------*/
1544eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1545
1546/* ---------------------------------------------------------------------------
1547
1548 \fn sme_RoamRemoveKey
1549
1550 \brief To set encryption key. This is an asynchronous API.
1551
1552 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1553
1554 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1555
1556 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1557
1558 FAILURE or RESOURCES The API finished and failed.
1559
1560 -------------------------------------------------------------------------------*/
1561eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1562
1563
1564/* ---------------------------------------------------------------------------
1565
1566 \fn sme_GetCountryCode
1567
1568 \brief To return the current country code. If no country code is applied, default country code is
1569 used to fill the buffer.
1570 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1571 This is a synchronous API.
1572
1573 \param pBuf - pointer to a caller allocated buffer for returned country code.
1574
1575 \param pbLen For input, this parameter indicates how big is the buffer.
1576 Upon return, this parameter has the number of bytes for country. If pBuf
1577 doesn't have enough space, this function returns
1578 fail status and this parameter contains the number that is needed.
1579
1580 \return eHalStatus SUCCESS.
1581
1582 FAILURE or RESOURCES The API finished and failed.
1583
1584 -------------------------------------------------------------------------------*/
1585eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1586
1587/* ---------------------------------------------------------------------------
1588
1589 \fn sme_SetCountryCode
1590
1591 \brief To change the current/default country code.
1592 If 11d supported is turned off, an error is return.
1593 This is a synchronous API.
1594
1595 \param pCountry - pointer to a caller allocated buffer for the country code.
1596
1597 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1598 whether a reset is required.
1599
1600 \return eHalStatus SUCCESS.
1601
1602 FAILURE or RESOURCES The API finished and failed.
1603
1604 -------------------------------------------------------------------------------*/
1605eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1606
1607/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301608
1609 \fn sme_InitChannels
1610
1611 \brief Used to initialize CSR channel lists while driver loading
1612
1613 \param hHal - global pMac structure
1614
1615 \return eHalStatus SUCCESS.
1616
1617 FAILURE or RESOURCES The API finished and failed.
1618
1619 -------------------------------------------------------------------------------*/
1620eHalStatus sme_InitChannels(tHalHandle hHal);
1621
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301622
Mihir Shete04206452014-11-20 17:50:58 +05301623#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301624/* ---------------------------------------------------------------------------
1625 \fn sme_InitChannelsForCC
1626
1627 \brief Used to issue regulatory hint to user
1628
1629 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301630 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301631
1632 \return eHalStatus SUCCESS.
1633
1634 FAILURE or RESOURCES The API finished and failed.
1635
1636 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301637eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301638#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301639
Mihir Shetee1093ba2014-01-21 20:13:32 +05301640/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001641 \fn sme_ResetCountryCodeInformation
1642 \brief this function is to reset the country code current being used back to EEPROM default
1643 this includes channel list and power setting. This is a synchronous API.
1644 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1645 a restart is needed to apply the change
1646 \return eHalStatus
1647 -------------------------------------------------------------------------------*/
1648eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1649
1650/* ---------------------------------------------------------------------------
1651 \fn sme_GetSupportedCountryCode
1652 \brief this function is to get a list of the country code current being supported
1653 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1654 this has the country code list. 3 bytes for each country code. This may be NULL if
1655 caller wants to know the needed byte count.
1656 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1657 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1658 \return eHalStatus
1659 -------------------------------------------------------------------------------*/
1660eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1661
1662/* ---------------------------------------------------------------------------
1663 \fn sme_GetCurrentRegulatoryDomain
1664 \brief this function is to get the current regulatory domain. This is a synchronous API.
1665 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1666 SME. The function fails if 11d support is turned off.
1667 \param pDomain - Caller allocated buffer to return the current domain.
1668 \return eHalStatus SUCCESS.
1669
1670 FAILURE or RESOURCES The API finished and failed.
1671 -------------------------------------------------------------------------------*/
1672eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1673
1674/* ---------------------------------------------------------------------------
1675 \fn sme_SetRegulatoryDomain
1676 \brief this function is to set the current regulatory domain.
1677 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1678 SME. This is a synchronous API.
1679 \param domainId - indicate the domain (defined in the driver) needs to set to.
1680 See v_REGDOMAIN_t for definition
1681 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1682 a restart is needed to apply the change
1683 \return eHalStatus
1684 -------------------------------------------------------------------------------*/
1685eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1686
1687/* ---------------------------------------------------------------------------
1688
1689 \fn sme_GetRegulatoryDomainForCountry
1690
1691 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1692
1693 \param pCountry - pointer to a caller allocated buffer for input country code.
1694
1695 \param pDomainId Upon successful return, it is the domain that country belongs to.
1696 If it is NULL, returning success means that the country code is known.
1697
1698 \return eHalStatus SUCCESS.
1699
1700 FAILURE or RESOURCES The API finished and failed.
1701
1702 -------------------------------------------------------------------------------*/
1703eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1704
1705
1706
1707/* ---------------------------------------------------------------------------
1708
1709 \fn sme_GetSupportedRegulatoryDomains
1710
1711 \brief To return a list of supported regulatory domains. This is a synchronous API.
1712
1713 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1714
1715 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1716 Upon return, this parameter has the number for supported domains. If pDomains
1717 doesn't have enough space for all the supported domains, this function returns
1718 fail status and this parameter contains the number that is needed.
1719
1720 \return eHalStatus SUCCESS.
1721
1722 FAILURE or RESOURCES The API finished and failed.
1723
1724 -------------------------------------------------------------------------------*/
1725eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1726
1727//some support functions
1728tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1729tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1730tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1731//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1732eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1733
1734typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1735/* ---------------------------------------------------------------------------
1736
1737 \fn sme_ChangeCountryCode
1738
1739 \brief Change Country code from upperlayer during WLAN driver operation.
1740 This is a synchronous API.
1741
1742 \param hHal - The handle returned by macOpen.
1743
1744 \param pCountry New Country Code String
1745
Abhishek Singha306a442013-11-07 18:39:01 +05301746 \param sendRegHint If we want to send reg hint to nl80211
1747
Jeff Johnson295189b2012-06-20 16:38:30 -07001748 \return eHalStatus SUCCESS.
1749
1750 FAILURE or RESOURCES The API finished and failed.
1751
1752 -------------------------------------------------------------------------------*/
1753eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1754 tSmeChangeCountryCallback callback,
1755 tANI_U8 *pCountry,
1756 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301757 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301758 tAniBool countryFromUserSpace,
1759 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001760
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301761/* ---------------------------------------------------------------------------
1762
Amar Singhal0d15bd52013-10-12 23:13:13 -07001763 \fn sme_GenericChangeCountryCode
1764
1765 \brief Generic API to change country code
1766
1767 \param hHal - The handle returned by macOpen.
1768
1769 \param pCountry New Country Code String
1770
1771 \param reg_domain Regulatory domain for the new country code
1772
1773 \return eHalStatus SUCCESS.
1774
1775 FAILURE or RESOURCES The API finished and failed.
1776
1777 -------------------------------------------------------------------------------*/
1778eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1779 tANI_U8 *pCountry,
1780 v_REGDOMAIN_t reg_domain);
1781
1782/* ---------------------------------------------------------------------------
1783
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301784 \fn sme_DHCPStartInd
1785
1786 \brief Indicate FW about DHCP start event.
1787
1788 \param hHal - The handle returned by macOpen.
1789
1790 \param device_mode the mode of the device
1791
c_hpothu0b0cab72014-02-13 21:52:40 +05301792 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301793
1794 \return eHalStatus SUCCESS.
1795
1796 FAILURE or RESOURCES The API finished and failed.
1797
1798 -------------------------------------------------------------------------------*/
1799
1800eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1801 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301802 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301803
1804/* ---------------------------------------------------------------------------
1805
1806 \fn sme_DHCPStopInd
1807
1808 \brief Indicate FW about DHCP stop event.
1809
1810 \param hHal - The handle returned by macOpen.
1811
1812 \param device_mode the mode of the device
1813
c_hpothu0b0cab72014-02-13 21:52:40 +05301814 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301815
1816 \return eHalStatus SUCCESS.
1817
1818 FAILURE or RESOURCES The API finished and failed.
1819
1820 -------------------------------------------------------------------------------*/
1821eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1822 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301823 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301824
Jeff Johnson295189b2012-06-20 16:38:30 -07001825
1826/* ---------------------------------------------------------------------------
1827 \fn sme_BtcSignalBtEvent
1828 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1829 BT event type and the current operating mode of Libra (full power,
1830 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1831 would be employed.
1832 \param hHal - The handle returned by macOpen.
1833 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1834 Caller owns the memory and is responsible for freeing it.
1835 \return VOS_STATUS
1836 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1837 if driver has not yet been initialized or if BTC
1838 Events Layer has been disabled.
1839 VOS_STATUS_SUCCESS BT Event passed to HAL
1840 ---------------------------------------------------------------------------*/
1841VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1842
1843/* ---------------------------------------------------------------------------
1844 \fn sme_BtcSetConfig
1845 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1846 This function should be invoked only after CFG download has completed.
1847 Calling it after sme_HDDReadyInd is recommended.
1848 \param hHal - The handle returned by macOpen.
1849 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1850 tSmeBtcConfig. Caller owns the memory and is responsible
1851 for freeing it.
1852 \return VOS_STATUS
1853 VOS_STATUS_E_FAILURE Config not passed to HAL.
1854 VOS_STATUS_SUCCESS Config passed to HAL
1855 ---------------------------------------------------------------------------*/
1856VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1857
1858/* ---------------------------------------------------------------------------
1859 \fn sme_BtcGetConfig
1860 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1861 \param hHal - The handle returned by macOpen.
1862 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1863 Caller owns the memory and is responsible for freeing it.
1864 \return VOS_STATUS
1865 VOS_STATUS_E_FAILURE - failure
1866 VOS_STATUS_SUCCESS success
1867 ---------------------------------------------------------------------------*/
1868VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1869
1870/* ---------------------------------------------------------------------------
1871 \fn sme_SetCfgPrivacy
1872 \brief API to set configure privacy parameters
1873 \param hHal - The handle returned by macOpen.
1874 \param pProfile - Pointer CSR Roam profile.
1875 \param fPrivacy - This parameter indicates status of privacy
1876
1877 \return void
1878 ---------------------------------------------------------------------------*/
1879void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1880
1881#if defined WLAN_FEATURE_VOWIFI
1882/* ---------------------------------------------------------------------------
1883 \fn sme_NeighborReportRequest
1884 \brief API to request neighbor report.
1885 \param hHal - The handle returned by macOpen.
1886 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1887 tRrmNeighborReq. Caller owns the memory and is responsible
1888 for freeing it.
1889 \return VOS_STATUS
1890 VOS_STATUS_E_FAILURE - failure
1891 VOS_STATUS_SUCCESS success
1892 ---------------------------------------------------------------------------*/
1893VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1894 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1895#endif
1896
1897//The following are debug APIs to support direct read/write register/memory
1898//They are placed in SME because HW cannot be access when in LOW_POWER state
1899//AND not connected. The knowledge and synchronization is done in SME
1900
1901//sme_DbgReadRegister
1902//Caller needs to validate the input values
1903VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1904
1905//sme_DbgWriteRegister
1906//Caller needs to validate the input values
1907VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1908
1909//sme_DbgReadMemory
1910//Caller needs to validate the input values
1911//pBuf caller allocated buffer has the length of nLen
1912VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1913
1914//sme_DbgWriteMemory
1915//Caller needs to validate the input values
1916VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1917
Jeff Johnson295189b2012-06-20 16:38:30 -07001918VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1919 tSirVersionType *pVersion);
1920VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1921 tSirVersionType *pVersion);
1922VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1923 tANI_U8 *pVersion,
1924 tANI_U32 versionBufferSize);
1925VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1926 tANI_U8 *pVersion,
1927 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001928eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1929 csrRoamCompleteCallback callback,
1930 void *pContext);
1931
1932#ifdef FEATURE_WLAN_WAPI
1933/* ---------------------------------------------------------------------------
1934 \fn sme_RoamSetBKIDCache
1935 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1936 candidate list.
1937 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1938 it is opened (by calling halOpen).
1939 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1940 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1941 when retruning, this is the number of items put into pBKIDCache
1942 \return eHalStatus - when fail, it usually means the buffer allocated is not
1943 big enough and pNumItems has the number of tBkidCacheInfo.
1944 ---------------------------------------------------------------------------*/
1945eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1946 tANI_U32 numItems );
1947
1948/* ---------------------------------------------------------------------------
1949 \fn sme_RoamGetBKIDCache
1950 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1951 BKID cache.
1952 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1953 it is opened (by calling halOpen).
1954 \param pNum - caller allocated memory that has the space of the number of
1955 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1956 in SME cache.
1957 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1958 upon return
1959 \return eHalStatus - when fail, it usually means the buffer allocated is not
1960 big enough.
1961 ---------------------------------------------------------------------------*/
1962eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1963 tBkidCacheInfo *pBkidCache);
1964
1965/* ---------------------------------------------------------------------------
1966 \fn sme_RoamGetNumBKIDCache
1967 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1968 number of BKID cache entries.
1969 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1970 it is opened (by calling halOpen).
1971 \return tANI_U32 - the number of BKID cache entries.
1972 ---------------------------------------------------------------------------*/
1973tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1974
1975/* ---------------------------------------------------------------------------
1976 \fn sme_ScanGetBKIDCandidateList
1977 \brief a wrapper function to return the BKID candidate list
1978 \param pBkidList - caller allocated buffer point to an array of
1979 tBkidCandidateInfo
1980 \param pNumItems - pointer to a variable that has the number of
1981 tBkidCandidateInfo allocated when retruning, this is
1982 either the number needed or number of items put into
1983 pPmkidList
1984 \return eHalStatus - when fail, it usually means the buffer allocated is not
1985 big enough and pNumItems
1986 has the number of tBkidCandidateInfo.
1987 \Note: pNumItems is a number of tBkidCandidateInfo,
1988 not sizeof(tBkidCandidateInfo) * something
1989 ---------------------------------------------------------------------------*/
1990eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1991 tBkidCandidateInfo *pBkidList,
1992 tANI_U32 *pNumItems );
1993#endif /* FEATURE_WLAN_WAPI */
1994
Jeff Johnsone7245742012-09-05 17:12:55 -07001995#ifdef FEATURE_OEM_DATA_SUPPORT
1996/********************************************************************************************
1997 Oem data related modifications
1998*********************************************************************************************/
1999/* ---------------------------------------------------------------------------
2000 \fn sme_OemDataReq
2001 \param sessionId - session id of session to be used for oem data req.
2002 \param pOemDataReqID - pointer to an object to get back the request ID
2003 \param callback - a callback function that is called upon finish
2004 \param pContext - a pointer passed in for the callback
2005 \return eHalStatus
2006 ---------------------------------------------------------------------------*/
2007eHalStatus sme_OemDataReq(tHalHandle hHal,
2008 tANI_U8 sessionId,
2009 tOemDataReqConfig *,
2010 tANI_U32 *pOemDataReqID,
2011 oemData_OemDataReqCompleteCallback callback,
2012 void *pContext);
2013
2014/* ---------------------------------------------------------------------------
2015 \fn sme_getOemDataRsp
2016 \param pOemDataRsp - A pointer to the response object
2017 \param pOemDataReqID - pointer to an object to get back the request ID
2018 \return eHalStatus
2019 ---------------------------------------------------------------------------*/
2020eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2021 tOemDataRsp **pOemDataRsp);
2022
2023#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002024
2025
Jeff Johnson295189b2012-06-20 16:38:30 -07002026
2027/* ---------------------------------------------------------------------------
2028
2029 \fn sme_RoamUpdateAPWPSIE
2030
2031 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2032 This is an asynchronous API.
2033
2034 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2035
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002036 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002037
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002038 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002039
2040 -------------------------------------------------------------------------------*/
2041
2042eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2043/* ---------------------------------------------------------------------------
2044
2045 \fn sme_RoamUpdateAPWPARSNIEs
2046
2047 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2048 This is an asynchronous API.
2049
2050 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2051
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002052 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002053
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002054 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002055
2056 -------------------------------------------------------------------------------*/
2057eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2058
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002059/* ---------------------------------------------------------------------------
2060
2061 sme_ChangeMCCBeaconInterval
2062
2063 \brief To update P2P-GO's beacon Interval.
2064
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002065 \return eHalStatus SUCCESS
2066 FAILURE or RESOURCES
2067 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002068 -------------------------------------------------------------------------------*/
2069eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2070
2071
Jeff Johnson295189b2012-06-20 16:38:30 -07002072
2073/* ---------------------------------------------------------------------------
2074 \fn sme_sendBTAmpEvent
2075 \brief API to send the btAMPstate to FW
2076 \param hHal - The handle returned by macOpen.
2077 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002078 \return eHalStatus SUCCESS
2079 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002080
2081--------------------------------------------------------------------------- */
2082
2083eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2084
2085
2086
2087/* ---------------------------------------------------------------------------
2088 \fn sme_SetHostOffload
2089 \brief API to set the host offload feature.
2090 \param hHal - The handle returned by macOpen.
2091 \param pRequest - Pointer to the offload request.
2092 \return eHalStatus
2093 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002094eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2095 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002096
2097/* ---------------------------------------------------------------------------
2098 \fn sme_SetKeepAlive
2099 \brief API to set the Keep Alive feature.
2100 \param hHal - The handle returned by macOpen.
2101 \param pRequest - Pointer to the Keep Alive request.
2102 \return eHalStatus
2103 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002104eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2105 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002106
Jeff Johnson295189b2012-06-20 16:38:30 -07002107/* ----------------------------------------------------------------------------
2108 \fn sme_GetOperationChannel
2109 \brief API to get current channel on which STA is parked
2110 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002111 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002112 \returns eHAL_STATUS_SUCCESS
2113 eHAL_STATUS_FAILURE
2114-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002115eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002116
Jeff Johnson295189b2012-06-20 16:38:30 -07002117/* ---------------------------------------------------------------------------
2118
2119 \fn sme_RegisterMgtFrame
2120
2121 \brief To register managment frame of specified type and subtype.
2122 \param frameType - type of the frame that needs to be passed to HDD.
2123 \param matchData - data which needs to be matched before passing frame
2124 to HDD.
2125 \param matchDataLen - Length of matched data.
2126 \return eHalStatus
2127 -------------------------------------------------------------------------------*/
2128eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2129 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2130
2131/* ---------------------------------------------------------------------------
2132
2133 \fn sme_DeregisterMgtFrame
2134
2135 \brief To De-register managment frame of specified type and subtype.
2136 \param frameType - type of the frame that needs to be passed to HDD.
2137 \param matchData - data which needs to be matched before passing frame
2138 to HDD.
2139 \param matchDataLen - Length of matched data.
2140 \return eHalStatus
2141 -------------------------------------------------------------------------------*/
2142eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2143 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302144/* ---------------------------------------------------------------------------
2145 \fn sme_GetFramesLog
2146 \brief a wrapper function that client calls to register a callback to get
2147 mgmt frames logged
2148 \param callback - SME sends back the context using the callback
2149 \param flag - flag tells to clear OR send the frame log buffer
2150 \param pContext - user context to be passed back along with the callback
2151 \return eHalStatus
2152 ---------------------------------------------------------------------------*/
2153eHalStatus sme_GetFramesLog(tHalHandle hHal,
2154 tGetFrameLogCallback callback,
2155 tANI_U8 flag, void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -07002156/* ---------------------------------------------------------------------------
2157
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302158 \fn sme_InitMgmtFrameLogging
2159
2160 \brief
2161 SME will pass this request to lower mac to initialize Frame Logging.
2162
2163 \param
2164
2165 hHal - The handle returned by macOpen.
2166
2167 wlanMgmtLoggingInitParam - Params to initialize frame logging
2168
2169 \return eHalStatus
2170--------------------------------------------------------------------------- */
2171eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
2172 tpSirMgmtLoggingInitParam wlanMgmtLoggingInitParam);
2173
2174/* ---------------------------------------------------------------------------
2175
Jeff Johnson295189b2012-06-20 16:38:30 -07002176 \fn sme_ConfigureRxpFilter
2177
2178 \brief
2179 SME will pass this request to lower mac to set/reset the filter on RXP for
2180 multicast & broadcast traffic.
2181
2182 \param
2183
2184 hHal - The handle returned by macOpen.
2185
2186 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2187 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2188 on this param. In future we can use this as a mask to set various types of
2189 filters as suggested below:
2190 FILTER_ALL_MULTICAST:
2191 FILTER_ALL_BROADCAST:
2192 FILTER_ALL_MULTICAST_BROADCAST:
2193
2194
2195 \return eHalStatus
2196
2197
2198--------------------------------------------------------------------------- */
2199eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2200 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2201
2202/* ---------------------------------------------------------------------------
2203
2204 \fn sme_ConfigureAppsCpuWakeupState
2205
2206 \brief
2207 SME will pass this request to lower mac to dynamically adjusts the listen
2208 interval based on the WLAN/MSM activity. This feature is named as
2209 Telescopic Beacon wakeup feature.
2210
2211 \param
2212
2213 hHal - The handle returned by macOpen.
2214
2215 isAppsAwake- Depicts the state of the Apps CPU
2216
2217
2218 \return eHalStatus
2219
2220
2221--------------------------------------------------------------------------- */
2222eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2223
Jeff Johnson295189b2012-06-20 16:38:30 -07002224/* ---------------------------------------------------------------------------
2225
2226 \fn sme_ConfigureSuspendInd
2227
2228 \brief
2229 SME will pass this request to lower mac to Indicate that the wlan needs to
2230 be suspended
2231
2232 \param
2233
2234 hHal - The handle returned by macOpen.
2235
2236 wlanSuspendParam- Depicts the wlan suspend params
2237
2238
2239 \return eHalStatus
2240
2241
2242--------------------------------------------------------------------------- */
2243eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2244 tpSirWlanSuspendParam wlanSuspendParam);
2245
2246/* ---------------------------------------------------------------------------
2247
2248 \fn sme_ConfigureResumeReq
2249
2250 \brief
2251 SME will pass this request to lower mac to Indicate that the wlan needs to
2252 be Resumed
2253
2254 \param
2255
2256 hHal - The handle returned by macOpen.
2257
2258 wlanResumeParam- Depicts the wlan resume params
2259
2260
2261 \return eHalStatus
2262
2263
2264--------------------------------------------------------------------------- */
2265eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2266 tpSirWlanResumeParam wlanResumeParam);
2267
Jeff Johnson295189b2012-06-20 16:38:30 -07002268
2269/* ---------------------------------------------------------------------------
2270
2271 \fn sme_GetInfraSessionId
2272
2273 \brief To get the session ID for infra session, if connected
2274 This is a synchronous API.
2275
2276 \param hHal - The handle returned by macOpen.
2277
2278 \return sessionid, -1 if infra session is not connected
2279
2280 -------------------------------------------------------------------------------*/
2281tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2282
2283/* ---------------------------------------------------------------------------
2284
2285 \fn sme_GetInfraOperationChannel
2286
2287 \brief To get the operating channel for infra session, if connected
2288 This is a synchronous API.
2289
2290 \param hHal - The handle returned by macOpen.
2291 \param sessionId - the sessionId returned by sme_OpenSession.
2292
2293 \return operating channel, 0 if infra session is not connected
2294
2295 -------------------------------------------------------------------------------*/
2296tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2297/* ---------------------------------------------------------------------------
2298
2299 \fn sme_GetConcurrentOperationChannel
2300
2301 \brief To get the operating channel for other concurrent sessions, if connected
2302 This is a synchronous API.
2303
2304 \param hHal - The handle returned by macOpen.
2305 \param currentPersona - persona that is trying to come up.
2306
2307 \return operating channel, 0 if infra session is not connected
2308
2309 -------------------------------------------------------------------------------*/
2310tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2311
2312/* ---------------------------------------------------------------------------
2313 \fn sme_AbortMacScan
2314 \brief API to cancel MAC scan.
2315 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302316 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302317 \return tSirAbortScanStatus return status abort scan
2318
Jeff Johnson295189b2012-06-20 16:38:30 -07002319 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302320tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2321 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002322
2323/* ---------------------------------------------------------------------------
2324 \fn sme_GetCfgValidChannels
2325 \brief API to get valid channel list
2326 \param hHal - The handle returned by macOpen.
2327 \param aValidChannels - Pointer to the valid channel list
2328 \param len - valid channel list length
2329 \return eHalStatus
2330 ---------------------------------------------------------------------------*/
2331eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2332
2333#ifdef FEATURE_WLAN_SCAN_PNO
2334
2335/* ---------------------------------------------------------------------------
2336 \fn sme_SetPreferredNetworkList
2337 \brief API to set the Preferred Network List Offload feature.
2338 \param hHal - The handle returned by macOpen.
2339 \param pRequest - Pointer to the offload request.
2340 \return eHalStatus
2341 ---------------------------------------------------------------------------*/
2342eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2343
2344/* ---------------------------------------------------------------------------
2345 \fn sme_SetRSSIFilter
2346 \brief API to set RSSI Filter feature.
2347 \param hHal - The handle returned by macOpen.
2348 \param pRequest - Pointer to the offload request.
2349 \return eHalStatus
2350 ---------------------------------------------------------------------------*/
2351eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2352
2353/******************************************************************************
2354*
2355* Name: sme_PreferredNetworkFoundInd
2356*
2357* Description:
2358* Invoke Preferred Network Found Indication
2359*
2360* Parameters:
2361* hHal - HAL handle for device
2362* pMsg - found network description
2363*
2364* Returns: eHalStatus
2365*
2366******************************************************************************/
2367eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2368#endif // FEATURE_WLAN_SCAN_PNO
2369
2370/* ---------------------------------------------------------------------------
2371 \fn sme_SetPowerParams
2372 \brief API to set Power Parameters
2373 \param hHal - The handle returned by macOpen.
2374 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002375 \param forced - if true, not to be dropped silently in host, it must reach
2376 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2377 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002378 \return eHalStatus
2379 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002380eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002381
2382/* ---------------------------------------------------------------------------
2383 \fn sme_SetTxPerTracking
2384 \brief Set Tx PER tracking configuration parameters
2385 \param hHal - The handle returned by macOpen.
2386 \param pTxPerTrackingParam - Tx PER configuration parameters
2387 \return eHalStatus
2388 ---------------------------------------------------------------------------*/
2389eHalStatus sme_SetTxPerTracking (
2390 tHalHandle hHal,
2391 void (*pCallbackfn) (void *pCallbackContext),
2392 void *pCallbackContext,
2393 tpSirTxPerTrackingParam pTxPerTrackingParam);
2394
2395#ifdef WLAN_FEATURE_PACKET_FILTERING
2396/* ---------------------------------------------------------------------------
2397 \fn sme_ReceiveFilterSetFilter
2398 \brief API to set 8023 Multicast Address List
2399 \param hHal - The handle returned by macOpen.
2400 \param pMulticastAddrs - Pointer to the Multicast Address List
2401 \return eHalStatus
2402 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002403eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002404
2405/* ---------------------------------------------------------------------------
2406 \fn sme_ReceiveFilterSetFilter
2407 \brief API to set Receive Packet Filter
2408 \param hHal - The handle returned by macOpen.
2409 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2410 \return eHalStatus
2411 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002412eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2413 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002414
2415/* ---------------------------------------------------------------------------
2416 \fn sme_GetFilterMatchCount
2417 \brief API to get D0 PC Filter Match Count
2418 \param hHal - The handle returned by macOpen
2419 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2420 \param callbackContext - Cookie to be passed back during callback
2421 \return eHalStatus
2422 ---------------------------------------------------------------------------*/
2423eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2424 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002425 void *callbackContext,
2426 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002427
2428/* ---------------------------------------------------------------------------
2429 \fn sme_ReceiveFilterClearFilter
2430 \brief API to clear Receive Packet Filter
2431 \param hHal - The handle returned by macOpen.
2432 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2433 \return eHalStatus
2434 ---------------------------------------------------------------------------*/
2435eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002436 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2437 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002438#endif // WLAN_FEATURE_PACKET_FILTERING
2439/* ---------------------------------------------------------------------------
2440
2441 \fn sme_IsChannelValid
2442 \brief To check if the channel is valid for currently established domain
2443 This is a synchronous API.
2444
2445 \param hHal - The handle returned by macOpen.
2446 \param channel - channel to verify
2447
2448 \return TRUE/FALSE, TRUE if channel is valid
2449
2450 -------------------------------------------------------------------------------*/
2451tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2452
2453/* ---------------------------------------------------------------------------
2454 \fn sme_SetFreqBand
2455 \brief Used to set frequency band.
2456 \param hHal
2457 \eBand band value to be configured
2458 \- return eHalStatus
2459 -------------------------------------------------------------------------*/
2460eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2461
2462/* ---------------------------------------------------------------------------
2463 \fn sme_GetFreqBand
2464 \brief Used to get the current band settings.
2465 \param hHal
2466 \pBand pointer to hold the current band value
2467 \- return eHalStatus
2468 -------------------------------------------------------------------------*/
2469eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2470
2471/* ---------------------------------------------------------------------------
2472
2473 \fn sme_SetTxPerTracking
2474 \brief Set Tx PER tracking configuration parameters
2475 \param hHal - The handle returned by macOpen.
2476 \param pTxPerTrackingParam - Tx PER configuration parameters
2477 \return eHalStatus
2478 ---------------------------------------------------------------------------*/
2479eHalStatus sme_SetTxPerTracking (
2480 tHalHandle hHal,
2481 void (*pCallbackfn) (void *pCallbackContext),
2482 void *pCallbackContext,
2483 tpSirTxPerTrackingParam pTxPerTrackingParam);
2484
2485#ifdef WLAN_FEATURE_GTK_OFFLOAD
2486/* ---------------------------------------------------------------------------
2487 \fn sme_SetGTKOffload
2488 \brief API to set GTK offload feature.
2489 \param hHal - The handle returned by macOpen.
2490 \param pRequest - Pointer to the GTK offload request.
2491 \return eHalStatus
2492 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002493eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002494
2495/* ---------------------------------------------------------------------------
2496 \fn sme_GetGTKOffload
2497 \brief API to get GTK offload information.
2498 \param hHal - The handle returned by macOpen.
2499 \param pRequest - Pointer to the GTK offload response.
2500 \return eHalStatus
2501 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002502eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2503 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002504#endif // WLAN_FEATURE_GTK_OFFLOAD
2505
2506#ifdef WLAN_WAKEUP_EVENTS
2507eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2508#endif // WLAN_WAKEUP_EVENTS
2509
2510/* ---------------------------------------------------------------------------
2511 \fn sme_SetTxPerTracking
2512 \brief Set Tx PER tracking configuration parameters
2513 \param hHal - The handle returned by macOpen.
2514 \param pTxPerTrackingParam - Tx PER configuration parameters
2515 \return eHalStatus
2516 ---------------------------------------------------------------------------*/
2517eHalStatus sme_SetTxPerTracking (
2518 tHalHandle hHal,
2519 void (*pCallbackfn) (void *pCallbackContext),
2520 void *pCallbackContext,
2521 tpSirTxPerTrackingParam pTxPerTrackingParam);
2522
2523
2524//return frequency for a particular channel
2525tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2526
2527tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2528
2529#if defined WLAN_FEATURE_P2P_INTERNAL
2530
2531eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2532
2533/* ---------------------------------------------------------------------------
2534 \fn sme_p2pFlushDeviceList
2535 \brief Remove cached P2P result from scan results
2536 \param hHal - The handle returned by macOpen.
2537 \param HDDSessionId - HDD's sessionId. Currently unused.
2538 \return eHalStatus
2539 ---------------------------------------------------------------------------*/
2540eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2541
2542eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2543 tCsrScanResultFilter *pFilter);
2544
2545#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2546
2547/* ---------------------------------------------------------------------------
2548 \fn sme_SetMaxTxPower
2549 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2550 setting will not persist over reboots
2551 \param hHal
2552 \param pBssid BSSID to set the power cap for
2553 \param pBssid pSelfMacAddress self MAC Address
2554 \param pBssid power to set in dB
2555 \- return eHalStatus
2556 -------------------------------------------------------------------------*/
2557eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2558 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2559
Jeff Johnson295189b2012-06-20 16:38:30 -07002560/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002561 \fn sme_SetMaxTxPowerPerBand
2562 \brief Used to set the Maximum Transmit Power for
2563 specific band dynamically. Note: this setting will not persist over reboots
2564 \param band
2565 \param power to set in dB
2566 \- return eHalStatus
2567 -------------------------------------------------------------------------*/
2568eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2569
2570/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002571
schang86c22c42013-03-13 18:41:24 -07002572 \fn sme_SetTxPower
2573
2574 \brief Set Transmit Power dynamically. Note: this setting will
2575 not persist over reboots.
2576
2577 \param hHal
2578 \param sessionId Target Session ID
2579 \param mW power to set in mW
2580 \- return eHalStatus
2581
2582 -------------------------------------------------------------------------------*/
2583eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2584
2585/* ---------------------------------------------------------------------------
2586
Jeff Johnson295189b2012-06-20 16:38:30 -07002587 \fn sme_HideSSID
2588
2589 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2590 not persist over reboots.
2591
2592 \param hHal
2593 \param sessionId
2594 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2595 \- return eHalStatus
2596
2597 -------------------------------------------------------------------------------*/
2598eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002599
2600/* ---------------------------------------------------------------------------
2601
2602 \fn sme_SetTmLevel
2603 \brief Set Thermal Mitigation Level to RIVA
2604 \param hHal - The handle returned by macOpen.
2605 \param newTMLevel - new Thermal Mitigation Level
2606 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002607 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002608 ---------------------------------------------------------------------------*/
2609eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2610
2611/*---------------------------------------------------------------------------
2612
2613 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2614 Host and FW.
2615
2616 \param hHal - HAL handle for device
2617
2618 \return NONE
2619
2620---------------------------------------------------------------------------*/
2621void sme_featureCapsExchange(tHalHandle hHal);
2622
Jeff Johnsond13512a2012-07-17 11:42:19 -07002623/*---------------------------------------------------------------------------
2624
Yathish9f22e662012-12-10 14:21:35 -08002625 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2626 between in Host.
2627
2628 \param hHal - HAL handle for device
2629
2630 \return NONE
2631
2632---------------------------------------------------------------------------*/
2633void sme_disableFeatureCapablity(tANI_U8 feature_index);
2634
2635/*---------------------------------------------------------------------------
2636
Jeff Johnsond13512a2012-07-17 11:42:19 -07002637 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2638 country code
2639 Host and FW.
2640
2641 \param hHal - HAL handle for device
2642 \param pCountry - pointer to country code
2643
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002644 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002645
2646 ---------------------------------------------------------------------------*/
2647eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2648
2649/*---------------------------------------------------------------------------
2650
2651 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2652 country code.
2653
2654 \param hHal - HAL handle for device
2655 \param pCountry - pointer to country code
2656
2657 \return Success or failure
2658
2659 ---------------------------------------------------------------------------*/
2660eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2661
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002662/* ---------------------------------------------------------------------------
2663 \fn sme_transportDebug
2664 \brief Dynamically monitoring Transport channels
2665 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002666 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002667 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002668 \param toggleStallDetect Enable stall detect feature
2669 This feature will take effect to data performance
2670 Not integrate till fully verification
2671 \- return NONE
2672 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002673void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002674
Kiran4a17ebe2013-01-31 10:43:43 -08002675/* ---------------------------------------------------------------------------
2676 \fn sme_ResetPowerValuesFor5G
2677 \brief Reset the power values for 5G band with NV power values.
2678 \param hHal - HAL handle for device
2679 \- return NONE
2680 -------------------------------------------------------------------------*/
2681void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2682
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002683#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002684/* ---------------------------------------------------------------------------
2685 \fn sme_UpdateRoamPrefer5GHz
2686 \brief enable/disable Roam prefer 5G runtime option
2687 This function is called through dynamic setConfig callback function
2688 to configure the Roam prefer 5G runtime option
2689 \param hHal - HAL handle for device
2690 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2691 \- return Success or failure
2692 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002693eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002694
2695/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002696 \fn sme_setRoamIntraBand
2697 \brief enable/disable Intra band roaming
2698 This function is called through dynamic setConfig callback function
2699 to configure the intra band roaming
2700 \param hHal - HAL handle for device
2701 \param nRoamIntraBand Enable/Disable Intra band roaming
2702 \- return Success or failure
2703 -------------------------------------------------------------------------*/
2704eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2705
2706/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002707 \fn sme_UpdateRoamScanNProbes
2708 \brief function to update roam scan N probes
2709 This function is called through dynamic setConfig callback function
2710 to update roam scan N probes
2711 \param hHal - HAL handle for device
2712 \param nProbes number of probe requests to be sent out
2713 \- return Success or failure
2714 -------------------------------------------------------------------------*/
2715eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2716
2717/* ---------------------------------------------------------------------------
2718 \fn sme_UpdateRoamScanHomeAwayTime
2719 \brief function to update roam scan Home away time
2720 This function is called through dynamic setConfig callback function
2721 to update roam scan home away time
2722 \param hHal - HAL handle for device
2723 \param nRoamScanAwayTime Scan home away time
2724 \- return Success or failure
2725 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002726eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2727 const v_U16_t nRoamScanHomeAwayTime,
2728 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002729
2730/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002731 \fn sme_getRoamIntraBand
2732 \brief get Intra band roaming
2733 \param hHal - HAL handle for device
2734 \- return Success or failure
2735 -------------------------------------------------------------------------*/
2736v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2737
2738/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002739 \fn sme_getRoamScanNProbes
2740 \brief get N Probes
2741 \param hHal - HAL handle for device
2742 \- return Success or failure
2743 -------------------------------------------------------------------------*/
2744v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2745
2746/* ---------------------------------------------------------------------------
2747 \fn sme_getRoamScanHomeAwayTime
2748 \brief get Roam scan home away time
2749 \param hHal - HAL handle for device
2750 \- return Success or failure
2751 -------------------------------------------------------------------------*/
2752v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2753
2754/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002755 \fn sme_UpdateImmediateRoamRssiDiff
2756 \brief Update nImmediateRoamRssiDiff
2757 This function is called through dynamic setConfig callback function
2758 to configure nImmediateRoamRssiDiff
2759 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2760 \param hHal - HAL handle for device
2761 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2762 candidate and current AP.
2763 \- return Success or failure
2764 -------------------------------------------------------------------------*/
2765
2766eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002767
Srinivas Girigowdade697412013-02-14 16:31:48 -08002768/* ---------------------------------------------------------------------------
2769 \fn sme_UpdateRoamRssiDiff
2770 \brief Update RoamRssiDiff
2771 This function is called through dynamic setConfig callback function
2772 to configure RoamRssiDiff
2773 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2774 \param hHal - HAL handle for device
2775 \param RoamRssiDiff - minimum rssi difference between potential
2776 candidate and current AP.
2777 \- return Success or failure
2778 -------------------------------------------------------------------------*/
2779
2780eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2781
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002782/*--------------------------------------------------------------------------
2783 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2784 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2785 isFastTransitionEnabled.
2786 This is a synchronuous call
2787 \param hHal - The handle returned by macOpen.
2788 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2789 Other status means SME is failed to update isFastTransitionEnabled.
2790 \sa
2791 --------------------------------------------------------------------------*/
2792
2793eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2794 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002795
2796/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002797 \fn sme_UpdateWESMode
2798 \brief Update WESMode
2799 This function is called through dynamic setConfig callback function
2800 to configure isWESModeEnabled
2801 \param hHal - HAL handle for device
2802 \param isWESModeEnabled - Enable/Disable WES Mode
2803 \- return Success or failure
2804 -------------------------------------------------------------------------*/
2805eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2806
2807/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002808 \fn sme_SetRoamScanControl
2809 \brief Set roam scan control
2810 This function is called to set roam scan control
2811 if roam scan control is set to 0, roaming scan cache is cleared
2812 any value other than 0 is treated as invalid value
2813 \param hHal - HAL handle for device
2814 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2815 Other status means SME failure to update
2816 -------------------------------------------------------------------------*/
2817eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002818#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002819
2820#ifdef FEATURE_WLAN_LFR
2821/*--------------------------------------------------------------------------
2822 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002823 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002824 isFastRoamIniFeatureEnabled.
2825 This is a synchronuous call
2826 \param hHal - The handle returned by macOpen.
2827 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2828 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2829 \sa
2830 --------------------------------------------------------------------------*/
2831
Srinivas Girigowdade697412013-02-14 16:31:48 -08002832eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002833 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002834
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002835/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302836 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2837 When Supplicant issue enabled / disable fwr based roaming on the basis
2838 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2839
2840 This is a synchronous call
2841 \param hHal - The handle returned by macOpen.
2842 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2843 Other status means SME is failed to (enabled/disabled) offload scan.
2844 \sa
2845 --------------------------------------------------------------------------*/
2846
2847eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2848 const v_BOOL_t isFastRoamEnabled);
2849
2850/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002851 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2852 Enable/disable LFR MAWC support at runtime
2853 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2854 isMAWCIniFeatureEnabled.
2855 This is a synchronous call
2856 \param hHal - The handle returned by macOpen.
2857 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2858 Other status means SME is failed to update MAWCEnabled.
2859 \sa
2860 --------------------------------------------------------------------------*/
2861eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2862 const v_BOOL_t MAWCEnabled);
2863
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002864
2865#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2866/*--------------------------------------------------------------------------
2867 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2868 This is a synchronuous call
2869 \param hHal - The handle returned by macOpen.
2870 \return eHAL_STATUS_SUCCESS
2871 Other status means SME is failed
2872 \sa
2873 --------------------------------------------------------------------------*/
2874
2875eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2876 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2877#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002878#endif /* FEATURE_WLAN_LFR */
2879
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002880#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002881/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002882 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002883 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002884 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002885 This is a synchronuous call
2886 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002887 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2888 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002889 \sa
2890 --------------------------------------------------------------------------*/
2891
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002892eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2893 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002894
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002895#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002896
2897/*--------------------------------------------------------------------------
2898 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2899 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2900 fEnableFwRssiMonitoring.
2901 This is a synchronuous call
2902 \param hHal - The handle returned by macOpen.
2903 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2904 Other status means SME is failed to update
2905 \sa
2906 --------------------------------------------------------------------------*/
2907
2908eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2909 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002910
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002911#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002912/*--------------------------------------------------------------------------
2913 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2914 This is a synchronuous call
2915 \param hHal - The handle returned by macOpen.
2916 \return eHAL_STATUS_SUCCESS - SME update config successful.
2917 Other status means SME is failed to update
2918 \sa
2919 --------------------------------------------------------------------------*/
2920eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2921 v_U8_t neighborLookupRssiThreshold);
2922
2923/*--------------------------------------------------------------------------
2924 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
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_setNeighborReassocRssiThreshold(tHalHandle hHal,
2932 v_U8_t neighborReassocRssiThreshold);
2933
2934/*--------------------------------------------------------------------------
2935 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
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_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2943
2944/*--------------------------------------------------------------------------
2945 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results 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 --------------------------------------------------------------------------*/
2952eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2953 v_U16_t neighborScanResultsRefreshPeriod);
2954
2955/*--------------------------------------------------------------------------
2956 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2957 This is a synchronuous call
2958 \param hHal - The handle returned by macOpen.
2959 \return eHAL_STATUS_SUCCESS - SME update config successful.
2960 Other status means SME is failed to update
2961 \sa
2962 --------------------------------------------------------------------------*/
2963v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2964
2965/*--------------------------------------------------------------------------
2966 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2967 This is a synchronuous call
2968 \param hHal - The handle returned by macOpen.
2969 \return eHAL_STATUS_SUCCESS - SME update config successful.
2970 Other status means SME is failed to update
2971 \sa
2972 --------------------------------------------------------------------------*/
2973v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2974
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002975/* ---------------------------------------------------------------------------
2976 \fn sme_UpdateEmptyScanRefreshPeriod
2977 \brief Update nEmptyScanRefreshPeriod
2978 This function is called through dynamic setConfig callback function
2979 to configure nEmptyScanRefreshPeriod
2980 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2981 \param hHal - HAL handle for device
2982 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2983 \- return Success or failure
2984 -------------------------------------------------------------------------*/
2985eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2986
2987/* ---------------------------------------------------------------------------
2988 \fn sme_setNeighborScanMinChanTime
2989 \brief Update nNeighborScanMinChanTime
2990 This function is called through dynamic setConfig callback function
2991 to configure gNeighborScanChannelMinTime
2992 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2993 \param hHal - HAL handle for device
2994 \param nNeighborScanMinChanTime - Channel minimum dwell time
2995 \- return Success or failure
2996 -------------------------------------------------------------------------*/
2997eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2998
2999/* ---------------------------------------------------------------------------
3000 \fn sme_setNeighborScanMaxChanTime
3001 \brief Update nNeighborScanMaxChanTime
3002 This function is called through dynamic setConfig callback function
3003 to configure gNeighborScanChannelMaxTime
3004 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3005 \param hHal - HAL handle for device
3006 \param nNeighborScanMinChanTime - Channel maximum dwell time
3007 \- return Success or failure
3008 -------------------------------------------------------------------------*/
3009eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3010
3011/* ---------------------------------------------------------------------------
3012 \fn sme_getNeighborScanMinChanTime
3013 \brief get neighbor scan min channel time
3014 \param hHal - The handle returned by macOpen.
3015 \return v_U16_t - channel min time value
3016 -------------------------------------------------------------------------*/
3017v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3018
3019/* ---------------------------------------------------------------------------
3020 \fn sme_getNeighborScanMaxChanTime
3021 \brief get neighbor scan max channel time
3022 \param hHal - The handle returned by macOpen.
3023 \return v_U16_t - channel max time value
3024 -------------------------------------------------------------------------*/
3025v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3026
3027/* ---------------------------------------------------------------------------
3028 \fn sme_setNeighborScanPeriod
3029 \brief Update nNeighborScanPeriod
3030 This function is called through dynamic setConfig callback function
3031 to configure nNeighborScanPeriod
3032 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3033 \param hHal - HAL handle for device
3034 \param nNeighborScanPeriod - neighbor scan period
3035 \- return Success or failure
3036 -------------------------------------------------------------------------*/
3037eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3038
3039/* ---------------------------------------------------------------------------
3040 \fn sme_getNeighborScanPeriod
3041 \brief get neighbor scan period
3042 \param hHal - The handle returned by macOpen.
3043 \return v_U16_t - neighbor scan period
3044 -------------------------------------------------------------------------*/
3045v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3046
3047#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003048
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003049#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003050/*--------------------------------------------------------------------------
3051 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3052 This is a synchronuous call
3053 \param hHal - The handle returned by macOpen.
3054 \return eHAL_STATUS_SUCCESS - SME update config successful.
3055 Other status means SME is failed to update
3056 \sa
3057 --------------------------------------------------------------------------*/
3058v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3059
3060/*--------------------------------------------------------------------------
3061 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3062 This is a synchronuous call
3063 \param hHal - The handle returned by macOpen.
3064 \return eHAL_STATUS_SUCCESS - SME update config successful.
3065 Other status means SME is failed to update
3066 \sa
3067 --------------------------------------------------------------------------*/
3068eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3069 tANI_U8 numChannels);
3070
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003071#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003072/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003073 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003074 This is a synchronuous call
3075 \param hHal - The handle returned by macOpen.
3076 \return eHAL_STATUS_SUCCESS - SME update config successful.
3077 Other status means SME is failed to update
3078 \sa
3079 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003080eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003081 tANI_U8 *pChannelList,
3082 tANI_U8 numChannels);
3083#endif
3084
Srinivas Girigowdade697412013-02-14 16:31:48 -08003085/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003086 \brief sme_getRoamScanChannelList() - get roam scan channel list
3087 This is a synchronuous call
3088 \param hHal - The handle returned by macOpen.
3089 \return eHAL_STATUS_SUCCESS - SME update config successful.
3090 Other status means SME is failed to update
3091 \sa
3092 --------------------------------------------------------------------------*/
3093eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3094 tANI_U8 *pNumChannels);
3095
3096/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003097 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003098 This is a synchronuous call
3099 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003100 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003101 FALSE (0) - if feature is disabled (compile or runtime)
3102 \sa
3103 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003104tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003105
3106/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003107 \brief sme_getWESMode() - getWES Mode
3108 This is a synchronous call
3109 \param hHal - The handle returned by macOpen.
3110 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3111 \sa
3112 --------------------------------------------------------------------------*/
3113v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3114
3115/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003116 \brief sme_GetRoamScanControl() - get scan control
3117 This is a synchronous call
3118 \param hHal - The handle returned by macOpen.
3119 \return v_BOOL_t - Enabled(1)/Disabled(0)
3120 \sa
3121 --------------------------------------------------------------------------*/
3122v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3123
3124/* ---------------------------------------------------------------------------
3125 \fn sme_UpdateEmptyScanRefreshPeriod
3126 \brief Update nnEmptyScanRefreshPeriod
3127 This function is called through dynamic setConfig callback function
3128 to configure nnEmptyScanRefreshPeriod
3129 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3130 \param hHal - HAL handle for device
3131 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3132 \- return Success or failure
3133 -------------------------------------------------------------------------*/
3134
3135/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003136 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3137 This is a synchronuous call
3138 \param hHal - The handle returned by macOpen.
3139 \return TRUE (1) - if the feature is enabled
3140 FALSE (0) - if feature is disabled (compile or runtime)
3141 \sa
3142 --------------------------------------------------------------------------*/
3143tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3144
3145/*--------------------------------------------------------------------------
3146 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3147 This is a synchronuous call
3148 \param hHal - The handle returned by macOpen.
3149 \return TRUE (1) - if the feature is enabled
3150 FALSE (0) - if feature is disabled (compile or runtime)
3151 \sa
3152 --------------------------------------------------------------------------*/
3153tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3154
Srinivas Girigowdade697412013-02-14 16:31:48 -08003155#endif
3156
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003157#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3158/*--------------------------------------------------------------------------
3159 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3160 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3161 gRoamScanOffloadEnabled.
3162 This is a synchronous call
3163 \param hHal - The handle returned by macOpen.
3164 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3165 Other status means SME is failed to update.
3166 \sa
3167 --------------------------------------------------------------------------*/
3168
3169eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3170#endif
3171
3172
Srinivas Girigowdade697412013-02-14 16:31:48 -08003173/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003174 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303175 \brief Check if a feature is enabled by FW
3176
3177 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003178 A value from enum placeHolderInCapBitmap
3179
3180 \- return 1/0 (TRUE/FALSE)
3181 -------------------------------------------------------------------------*/
3182tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303183
3184/* ---------------------------------------------------------------------------
3185 \fn sme_IsFeatureSupportedByDriver
3186 \brief Check if a feature is enabled by driver
3187
3188 \param featEnumValue - Enumeration value of the feature to be checked.
3189 A value from enum placeHolderInCapBitmap
3190
3191 \- return 1/0 (TRUE/FALSE)
3192 -------------------------------------------------------------------------*/
3193tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3194
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003195#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303196
3197/* ---------------------------------------------------------------------------
3198 \fn sme_SendTdlsLinkEstablishParams
3199 \brief API to send TDLS Link Establishment Parameters.
3200
3201 \param peerMac - peer's Mac Adress.
3202 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3203 \- return VOS_STATUS_SUCCES
3204 -------------------------------------------------------------------------*/
3205
3206VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
3207 tANI_U8 sessionId,
3208 tSirMacAddr peerMac,
3209 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
3210
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003211/* ---------------------------------------------------------------------------
3212 \fn sme_SendTdlsMgmtFrame
3213 \brief API to send TDLS management frames.
3214
3215 \param peerMac - peer's Mac Adress.
3216 \param frame_type - Type of TDLS mgmt frame to be sent.
3217 \param dialog - dialog token used in the frame.
3218 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303219 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003220 \param buf - additional IEs to be included
3221 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003222 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003223 \- return VOS_STATUS_SUCCES
3224 -------------------------------------------------------------------------*/
3225VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303226 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 -08003227/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003228 \fn sme_ChangeTdlsPeerSta
3229 \brief API to Update TDLS peer sta parameters.
3230
3231 \param peerMac - peer's Mac Adress.
3232 \param staParams - Peer Station Parameters.
3233 \- return VOS_STATUS_SUCCES
3234 -------------------------------------------------------------------------*/
3235VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
3236 tCsrStaParams *pstaParams);
3237/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003238 \fn sme_AddTdlsPeerSta
3239 \brief API to Add TDLS peer sta entry.
3240
3241 \param peerMac - peer's Mac Adress.
3242 \- return VOS_STATUS_SUCCES
3243 -------------------------------------------------------------------------*/
3244VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3245/* ---------------------------------------------------------------------------
3246 \fn sme_DeleteTdlsPeerSta
3247 \brief API to Delete TDLS peer sta entry.
3248
3249 \param peerMac - peer's Mac Adress.
3250 \- return VOS_STATUS_SUCCES
3251 -------------------------------------------------------------------------*/
3252VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003253/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003254 \fn sme_SetTdlsPowerSaveProhibited
3255 \API to set/reset the isTdlsPowerSaveProhibited.
3256
3257 \- return void
3258 -------------------------------------------------------------------------*/
3259void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003260#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303261/* ---------------------------------------------------------------------------
3262 \fn sme_IsPmcBmps
3263 \brief API to Check if PMC state is BMPS.
3264
3265 \- return v_BOOL_t
3266 -------------------------------------------------------------------------*/
3267v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3268
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003269#ifdef FEATURE_WLAN_TDLS_INTERNAL
3270typedef struct smeTdlsDisResult
3271{
3272 tSirMacAddr tdlsPeerMac;
3273 v_S7_t tdlsPeerRssi;
3274} tSmeTdlsDisResult;
3275
3276VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3277v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
3278 tSmeTdlsDisResult *disResult, v_U8_t listType);
3279VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3280VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003281#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003282eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003283
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303284/* ---------------------------------------------------------------------------
3285 \fn sme_UpdateDFSRoamMode
3286 \brief Update DFS roam scan mode
3287 This function is called to configure allowDFSChannelRoam
3288 dynamically
3289 \param hHal - HAL handle for device
3290 \param allowDFSChannelRoam - DFS roaming scan mode
3291 mode 0 disable roam scan on DFS channels
3292 mode 1 enables roam scan (passive/active) on DFS channels
3293 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3294 successfully.
3295 Other status means SME failed to update DFS roaming scan config.
3296 \sa
3297 -------------------------------------------------------------------------*/
3298eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3299
3300/* ---------------------------------------------------------------------------
3301 \fn sme_UpdateDFSScanMode
3302 \brief Update DFS scan mode
3303 This function is called to configure fEnableDFSChnlScan.
3304 \param hHal - HAL handle for device
3305 \param dfsScanMode - DFS scan mode
3306 mode 0 disable scan on DFS channels
3307 mode 1 enables passive scan on DFS channels
3308 mode 2 enables active scan on DFS channels for static list
3309 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3310 successfully.
3311 Other status means SME failed to update DFS scan config.
3312 \sa
3313 -------------------------------------------------------------------------*/
3314eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3315
3316/*--------------------------------------------------------------------------
3317 \brief sme_GetDFSScanMode() - get DFS scan mode
3318 \param hHal - The handle returned by macOpen.
3319 \return DFS scan mode
3320 mode 0 disable scan on DFS channels
3321 mode 1 enables passive scan on DFS channels
3322 mode 2 enables active scan on DFS channels for static list
3323 \sa
3324 --------------------------------------------------------------------------*/
3325v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3326
3327/* ---------------------------------------------------------------------------
3328 \fn sme_HandleDFSChanScan
3329 \brief Gets Valid channel list and updates scan control list according to
3330 dfsScanMode
3331 \param hHal - HAL handle for device
3332 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3333 Otherwise eHAL_STATUS_SUCCESS -
3334 \sa
3335 -------------------------------------------------------------------------*/
3336eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3337
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003338/*
3339 * SME API to enable/disable WLAN driver initiated SSR
3340 */
3341void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3342
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303343/* ---------------------------------------------------------------------------
3344
3345 \fn sme_SetPhyMode
3346
3347 \brief Changes the PhyMode.
3348
3349 \param hHal - The handle returned by macOpen.
3350
3351 \param phyMode new phyMode which is to set
3352
3353 \return eHalStatus SUCCESS.
3354
3355 -------------------------------------------------------------------------------*/
3356eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3357
3358/* ---------------------------------------------------------------------------
3359
3360 \fn sme_GetPhyMode
3361
3362 \brief gets current PhyMode.
3363
3364 \param hHal - The handle returned by macOpen.
3365
3366 \return eHalStatus PhyMode
3367
3368 -------------------------------------------------------------------------------*/
3369eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3370
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003371/*
3372 * SME API to determine the channel bonding mode
3373 */
3374VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3375
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003376#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3377/*--------------------------------------------------------------------------
3378 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3379 from CSR.
3380 This is a synchronous call
3381 \param hHal - The handle returned by macOpen
3382 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3383 BSSID, channel etc.)
3384 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3385 Other status means SME is failed to send the request.
3386 \sa
3387 --------------------------------------------------------------------------*/
3388
3389eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3390#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003391/*--------------------------------------------------------------------------
3392 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3393 is any connected session .
3394 This is a synchronous call
3395 \param hHal - The handle returned by macOpen
3396 \return VOS_STATUS - SME passed the request to CSR successfully.
3397 Other status means SME is failed to send the request.
3398 \sa
3399 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003400VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003401
Agarwal Ashish57e84372014-12-05 18:26:53 +05303402/*--------------------------------------------------------------------------
3403 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3404 is any connected session .
3405 This is a synchronous call
3406 \param hHal - The handle returned by macOpen
3407 \return VOS_STATUS - SME passed the request to CSR successfully.
3408 Other status means SME is failed to send the request.
3409 \sa
3410 --------------------------------------------------------------------------*/
3411VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3412
Leo Chang9056f462013-08-01 19:21:11 -07003413#ifdef FEATURE_WLAN_LPHB
3414/* ---------------------------------------------------------------------------
3415 \fn sme_LPHBConfigReq
3416 \API to make configuration LPHB within FW.
3417 \param hHal - The handle returned by macOpen
3418 \param lphdReq - LPHB request argument by client
3419 \param pCallbackfn - LPHB timeout notification callback function pointer
3420 \- return Configuration message posting status, SUCCESS or Fail
3421 -------------------------------------------------------------------------*/
3422eHalStatus sme_LPHBConfigReq(
3423 tHalHandle hHal,
3424 tSirLPHBReq *lphdReq,
3425 void (*pCallbackfn)(void *pAdapter, void *indParam));
3426#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003427
3428/* ---------------------------------------------------------------------------
3429 \fn sme_AddPeriodicTxPtrn
3430 \brief API to Periodic TX Pattern Offload feature
3431 \param hHal - The handle returned by macOpen
3432 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3433 \return eHalStatus
3434 ---------------------------------------------------------------------------*/
3435eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3436 *addPeriodicTxPtrnParams);
3437
3438/* ---------------------------------------------------------------------------
3439 \fn sme_DelPeriodicTxPtrn
3440 \brief API to Periodic TX Pattern Offload feature
3441 \param hHal - The handle returned by macOpen
3442 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3443 \return eHalStatus
3444 ---------------------------------------------------------------------------*/
3445eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3446 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003447/*--------------------------------------------------------------------------
3448 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3449 scan parameter.
3450 This is a synchronous call
3451 \param hHal - The handle returned by macOpen
3452 \return None.
3453 \sa
3454 --------------------------------------------------------------------------*/
3455void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3456 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303457
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003458/* ---------------------------------------------------------------------------
3459 \fn sme_SendRateUpdateInd
3460 \brief API to Update rate
3461 \param hHal - The handle returned by macOpen
3462 \param rateUpdateParams - Pointer to rate update params
3463 \return eHalStatus
3464 ---------------------------------------------------------------------------*/
3465eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3466
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303467/*
3468 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3469 * triggers
3470 * return status
3471*/
3472eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3473 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303474 tSmeFastRoamTrigger fastRoamTrig,
3475 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303476
3477eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
3478 tANI_U8 *pBSSId,
3479 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003480
3481void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303482
3483#ifdef FEATURE_WLAN_BATCH_SCAN
3484/* ---------------------------------------------------------------------------
3485 \fn sme_SetBatchScanReq
3486 \brief API to set batch scan request in FW
3487 \param hHal - The handle returned by macOpen.
3488 \param pRequest - Pointer to the batch request.
3489 \param sessionId - session ID
3490 \param callbackRoutine - HDD callback which needs to be invoked after
3491 getting set batch scan response from FW
3492 \param callbackContext - pAdapter context
3493 \return eHalStatus
3494 ---------------------------------------------------------------------------*/
3495eHalStatus
3496sme_SetBatchScanReq
3497(
3498 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3499 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3500 void *callbackContext
3501);
3502
3503/* ---------------------------------------------------------------------------
3504 \fn sme_TriggerBatchScanResultInd
3505 \brief API to trigger batch scan result indications from from FW
3506 \param hHal - The handle returned by macOpen.
3507 \param pRequest - Pointer to get batch request.
3508 \param sessionId - session ID
3509 \param callbackRoutine - HDD callback which needs to be invoked after
3510 getting get batch scan response from FW
3511 \param callbackContext - pAdapter context
3512 \return eHalStatus
3513 ---------------------------------------------------------------------------*/
3514eHalStatus
3515sme_TriggerBatchScanResultInd
3516(
3517 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3518 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3519 void *callbackContext
3520);
3521
3522/* ---------------------------------------------------------------------------
3523 \fn sme_StopBatchScanInd
3524 \brief API to stop batch scan request in FW
3525 \param hHal - The handle returned by macOpen.
3526 \param pRequest - Pointer to stop batch indication
3527 \return eHalStatus
3528 ---------------------------------------------------------------------------*/
3529eHalStatus
3530sme_StopBatchScanInd
3531(
3532 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3533);
3534
3535#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003536
3537#ifdef FEATURE_WLAN_CH_AVOID
3538/* ---------------------------------------------------------------------------
3539 \fn sme_AddChAvoidCallback
3540 \brief Used to plug in callback function
3541 Which notify channel may not be used with SAP or P2PGO mode.
3542 Notification come from FW.
3543 \param hHal
3544 \param pCallbackfn : callback function pointer should be plugged in
3545 \- return eHalStatus
3546 -------------------------------------------------------------------------*/
3547eHalStatus sme_AddChAvoidCallback
3548(
3549 tHalHandle hHal,
3550 void (*pCallbackfn)(void *pAdapter, void *indParam)
3551);
3552#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003553eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303554/* ---------------------------------------------------------------------------
3555 \fn sme_requestTypetoString
3556 \brief API to convert requestType enum values
3557 to string.
3558 ---------------------------------------------------------------------------*/
3559const char * sme_requestTypetoString(const v_U8_t requestType);
3560/* ---------------------------------------------------------------------------
3561 \fn sme_PmcStatetoString
3562 \brief API to convert PmcState enum values
3563 to string.
3564 ---------------------------------------------------------------------------*/
3565const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303566
3567eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3568
Agarwal Ashish5e414792014-06-08 15:25:23 +05303569tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303570
3571// tdlsoffchan
3572VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3573 tANI_U8 sessionId,
3574 tSirMacAddr peerMac,
3575 tANI_S32 tdlsOffCh,
3576 tANI_S32 tdlsOffChBwOffset,
3577 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303578eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3579 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303580void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303581
3582void sme_resetCoexEevent(tHalHandle hHal);
3583
Peng Xu117eab42014-09-25 13:33:27 +05303584tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3585tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303586#ifdef WLAN_FEATURE_AP_HT40_24G
3587void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3588 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303589eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3590 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303591#endif
Peng Xu117eab42014-09-25 13:33:27 +05303592
Agarwal Ashish738843c2014-09-25 12:27:56 +05303593void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3594
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303595/* HDD Callback function */
3596typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3597
3598eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3599 u8 *pCmd,
3600 int length,
3601 pEncryptMsgRSPCb encCB);
3602
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303603/* ---------------------------------------------------------------------------
3604 \fn sme_RegisterBtCoexTDLSCallback
3605 \brief Used to plug in callback function
3606 Which notify btcoex on or off.
3607 Notification come from FW.
3608 \param hHal
3609 \param pCallbackfn : callback function pointer should be plugged in
3610 \- return eHalStatus
3611 -------------------------------------------------------------------------*/
3612eHalStatus sme_RegisterBtCoexTDLSCallback
3613(
3614 tHalHandle hHal,
3615 void (*pCallbackfn)(void *pAdapter, int)
3616);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303617
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303618/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303619 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303620
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303621 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303622
3623 \param hHal - The handle returned by macOpen.
3624
3625 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3626 eANI_BOOLEAN_FALSE otherwise
3627---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303628tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303629
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303630/* ---------------------------------------------------------------------------
3631
3632 \fn sme_IsTdlsOffChannelValid
3633 \brief To check if the channel is valid for currently established domain
3634 This is a synchronous API.
3635
3636 \param hHal - The handle returned by macOpen.
3637 \param channel - channel to verify
3638
3639 \return TRUE/FALSE, TRUE if channel is valid
3640
3641 -------------------------------------------------------------------------------*/
3642tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3643
Mukul Sharma4be88422015-03-09 20:29:07 +05303644/* --------------------------------------------------------------------------
3645
3646 \fn sme_IsCoexScoIndicationSet
3647 \brief To check if the BTC module in fwr has sent the SCO
3648 indication to host or not
3649
3650 \param hHal - The handle returned by macOpen.
3651 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3652
3653 --------------------------------------------------------------------------*/
3654tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3655
Abhishek Singh01c73d12015-03-12 15:13:44 +05303656eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3657 tANI_U32 iniNumBuffAdvert,
3658 tANI_U32 set_value);
3659
Jeff Johnson295189b2012-06-20 16:38:30 -07003660#endif //#if !defined( __SME_API_H )