blob: 5689af29e010a7071df1a915683c55d42687e89c [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam0fb93dd2014-02-19 00:32:59 -08002 * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
24 * All Rights Reserved.
25 * Qualcomm Atheros Confidential and Proprietary.
26 *
27 */
28
Jeff Johnson295189b2012-06-20 16:38:30 -070029
30#if !defined( __SME_API_H )
31#define __SME_API_H
32
33
34/**=========================================================================
35
36 \file smeApi.h
37
38 \brief prototype for SME APIs
39
40 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
41
42 Qualcomm Confidential and Proprietary.
43
44 ========================================================================*/
45
46/* $Header$ */
47
48/*--------------------------------------------------------------------------
49 Include Files
50 ------------------------------------------------------------------------*/
51#include "ccmApi.h"
52#include "csrApi.h"
53#include "pmcApi.h"
54#include "vos_mq.h"
55#include "vos_lock.h"
56#include "halTypes.h"
57#include "sirApi.h"
58#include "btcApi.h"
59#include "vos_nvitem.h"
60#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070061
Jeff Johnsone7245742012-09-05 17:12:55 -070062#ifdef FEATURE_OEM_DATA_SUPPORT
63#include "oemDataApi.h"
64#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070065
66#if defined WLAN_FEATURE_VOWIFI
67#include "smeRrmInternal.h"
68#endif
69
70/*--------------------------------------------------------------------------
71 Preprocessor definitions and constants
72 ------------------------------------------------------------------------*/
73
74#define SME_SUMMARY_STATS 1
75#define SME_GLOBAL_CLASSA_STATS 2
76#define SME_GLOBAL_CLASSB_STATS 4
77#define SME_GLOBAL_CLASSC_STATS 8
78#define SME_GLOBAL_CLASSD_STATS 16
79#define SME_PER_STA_STATS 32
80
81#define SME_INVALID_COUNTRY_CODE "XX"
82
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070083//Macro to disable split scan
84#define SME_DISABLE_SPLIT_SCAN 255
Jeff Johnson295189b2012-06-20 16:38:30 -070085/*--------------------------------------------------------------------------
86 Type declarations
87 ------------------------------------------------------------------------*/
88typedef struct _smeConfigParams
89{
90 tCsrConfigParam csrConfig;
91#if defined WLAN_FEATURE_VOWIFI
92 tRrmConfigParam rrmConfig;
93#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070094#if defined FEATURE_WLAN_LFR
95 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -080096 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -070097#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080098#if defined FEATURE_WLAN_ESE
99 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700100#endif
101#if defined WLAN_FEATURE_P2P_INTERNAL
102 tP2PConfigParam p2pConfig;
103#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800104#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700105 tANI_U8 isFastTransitionEnabled;
106 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700107 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700108#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530109 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700110 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800111 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530112 tANI_U32 fDeferIMPSTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700113} tSmeConfigParams, *tpSmeConfigParams;
114
Sunil Duttc69bccb2014-05-26 21:30:20 +0530115#ifdef WLAN_FEATURE_LINK_LAYER_STATS
116
117/* ---------------------------------------------------------------------------
118 \fn sme_LLStatsSetReq
119 \brief API to set link layer stats request to FW
120 \param hHal - The handle returned by macOpen.
121
122 \Param pStatsReq - a pointer to a caller allocated object of
123 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
124 stats set.
125
126 \return eHalStatus
127 ---------------------------------------------------------------------------*/
128eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
129
130/* ---------------------------------------------------------------------------
131 \fn sme_LLStatsGetReq
132 \brief API to get link layer stats request to FW
133 \param hHal - The handle returned by macOpen.
134
135 \Param pStatsReq - a pointer to a caller allocated object of
136 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
137 stats get.
138
139 \return eHalStatus
140 ---------------------------------------------------------------------------*/
141eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
142
143/* ---------------------------------------------------------------------------
144 \fn sme_LLStatsClearReq
145 \brief API to clear link layer stats request to FW
146 \param hHal - The handle returned by macOpen.
147
148 \Param pStatsReq - a pointer to a caller allocated object of
149 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
150 stats clear.
151
152 \return eHalStatus
153 ---------------------------------------------------------------------------*/
154eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
155
156/* ---------------------------------------------------------------------------
157 \fn sme_SetLinkLayerStatsIndCB
158 \brief API to trigger Link Layer stats result indications from from FW
159 \param hHal - The handle returned by macOpen.
160 \param sessionId - session ID
161 \param callbackRoutine - HDD callback which needs to be invoked after
162 getting get Link Layer Statistics results from FW
163 \param callbackContext - pAdapter context
164 \return eHalStatus
165 ---------------------------------------------------------------------------*/
166eHalStatus
167sme_SetLinkLayerStatsIndCB
168(
169 tHalHandle hHal, tANI_U8 sessionId,
170 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp),
171 void *callbackContext
172);
173
174
175#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
176
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530177typedef enum
178{
179 eSME_ROAM_TRIGGER_NONE = 0,
180 eSME_ROAM_TRIGGER_SCAN = 1,
181 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
182 eSME_ROAM_TRIGGER_MAX
183} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700184
185/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530186 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700187 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700188/*--------------------------------------------------------------------------
189
190 \brief sme_Open() - Initialze all SME modules and put them at idle state
191
192 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
193 successfully return, all modules are at idle state ready to start.
194
195 smeOpen must be called before any other SME APIs can be involved.
196 smeOpen must be called after macOpen.
197
198 \param hHal - The handle returned by macOpen.
199
200 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
201
202 Other status means SME is failed to be initialized
203 \sa
204
205 --------------------------------------------------------------------------*/
206eHalStatus sme_Open(tHalHandle hHal);
207
208/*--------------------------------------------------------------------------
209
210 \brief sme_Close() - Release all SME modules and their resources.
211
212 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
213 return, all modules are at closed state.
214
215 No SME APIs can be involved after sme_Close except sme_Open.
216 sme_Close must be called before macClose.
217
218 \param hHal - The handle returned by macOpen.
219
220 \return eHAL_STATUS_SUCCESS - SME is successfully close.
221
222 Other status means SME is failed to be closed but caller still cannot
223 call any other SME functions except smeOpen.
224 \sa
225
226 --------------------------------------------------------------------------*/
227eHalStatus sme_Close(tHalHandle hHal);
228
229/*--------------------------------------------------------------------------
230
231 \brief sme_Start() - Put all SME modules at ready state.
232
233 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
234 successfully return, all modules are ready to run.
235
236 \param hHal - The handle returned by macOpen.
237
238 \return eHAL_STATUS_SUCCESS - SME is ready.
239
240 Other status means SME is failed to start.
241 \sa
242
243 --------------------------------------------------------------------------*/
244eHalStatus sme_Start(tHalHandle hHal);
245
246/*--------------------------------------------------------------------------
247
248 \brief sme_Stop() - Stop all SME modules and put them at idle state
249
250 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
251 return, all modules are at idle state ready to start.
252
253
254 \param hHal - The handle returned by macOpen.
255
Kiet Lama72a2322013-11-15 11:18:11 +0530256 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700257
258 \return eHAL_STATUS_SUCCESS - SME is stopped.
259
260 Other status means SME is failed to stop but caller should still consider
261 SME is stopped.
262 \sa
263
264 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530265eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700266
267
268/*--------------------------------------------------------------------------
269
270 \brief sme_OpenSession() - Open a session for scan/roam operation.
271
272 This is a synchronous API.
273
274
275 \param hHal - The handle returned by macOpen.
276 \param callback - A pointer to the function caller specifies for roam/connect status indication
277 \param pContext - The context passed with callback
278 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
279 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
280
281 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
282
283 Other status means SME is failed to open the session.
284 eHAL_STATUS_RESOURCES - no more session available.
285 \sa
286
287 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700288eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
289 void *pContext, tANI_U8 *pSelfMacAddr,
290 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700291
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700292/*--------------------------------------------------------------------------
293
294 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
295 \param hHal - The handle returned by macOpen.
296 \param currDeviceMode - Current operating device mode.
297 --------------------------------------------------------------------------*/
298
299void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700300
301/*--------------------------------------------------------------------------
302
303 \brief sme_CloseSession() - Open a session for scan/roam operation.
304
305 This is a synchronous API.
306
307
308 \param hHal - The handle returned by macOpen.
309
310 \param sessionId - A previous opened session's ID.
311
312 \return eHAL_STATUS_SUCCESS - session is closed.
313
314 Other status means SME is failed to open the session.
315 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
316 \sa
317
318 --------------------------------------------------------------------------*/
319eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
320 csrRoamSessionCloseCallback callback, void *pContext);
321
322
323
324/*--------------------------------------------------------------------------
325
326 \brief sme_UpdateConfig() - Change configurations for all SME moduels
327
328 The function updates some configuration for modules in SME, CCM, CSR, etc
329 during SMEs close -> open sequence.
330
331 Modules inside SME apply the new configuration at the next transaction.
332
333
334 \param hHal - The handle returned by macOpen.
335 \Param pSmeConfigParams - a pointer to a caller allocated object of
336 typedef struct _smeConfigParams.
337
338 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
339
340 Other status means SME is failed to update the config parameters.
341 \sa
342
343 --------------------------------------------------------------------------*/
344eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
345
346#ifdef FEATURE_WLAN_SCAN_PNO
347/*--------------------------------------------------------------------------
348
349 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
350
351 It is used at driver start up to inform RIVA of the default channel
352 configuration.
353
354 This is a synchronuous call
355
356 \param hHal - The handle returned by macOpen.
357
358 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
359
360 Other status means SME is failed to update the channel config.
361 \sa
362
363 --------------------------------------------------------------------------*/
364eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
365
366#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700367/*--------------------------------------------------------------------------
368
369 \brief sme_set11dinfo() - Set the 11d information about valid channels
370 and there power using information from nvRAM
371 This function is called only for AP.
372
373 This is a synchronuous call
374
375 \param hHal - The handle returned by macOpen.
376 \Param pSmeConfigParams - a pointer to a caller allocated object of
377 typedef struct _smeConfigParams.
378
379 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
380
381 Other status means SME is failed to update the config parameters.
382 \sa
383--------------------------------------------------------------------------*/
384
385eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
386
387/*--------------------------------------------------------------------------
388
389 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
390
391 This is a synchronuous call
392
393 \param hHal - The handle returned by HostapdAdapter.
394 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
395
396 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
397
398 Other status means, failed to get the current regulatory domain.
399 \sa
400--------------------------------------------------------------------------*/
401
402eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
403
404eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
405
Jeff Johnson295189b2012-06-20 16:38:30 -0700406
407/* ---------------------------------------------------------------------------
408 \fn sme_ChangeConfigParams
409 \brief The SME API exposed for HDD to provide config params to SME during
410 SMEs stop -> start sequence.
411
412 If HDD changed the domain that will cause a reset. This function will
413 provide the new set of 11d information for the new domain. Currrently this
414 API provides info regarding 11d only at reset but we can extend this for
415 other params (PMC, QoS) which needs to be initialized again at reset.
416
417 This is a synchronuous call
418
419 \param hHal - The handle returned by macOpen.
420
421 \Param
422 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
423 currently provides 11d related information like Country code,
424 Regulatory domain, valid channel list, Tx power per channel, a
425 list with active/passive scan allowed per valid channel.
426
427 \return eHalStatus
428 ---------------------------------------------------------------------------*/
429eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
430 tCsrUpdateConfigParam *pUpdateConfigParam);
431
432/*--------------------------------------------------------------------------
433
434 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
435 is ready tio run.
436
437 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
438 to running state.
439
440
441 \param hHal - The handle returned by macOpen.
442
443 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
444
445 Other status means SME failed to send the message to PE.
446 \sa
447
448 --------------------------------------------------------------------------*/
449eHalStatus sme_HDDReadyInd(tHalHandle hHal);
450
451
452/*--------------------------------------------------------------------------
453
454 \brief sme_ProcessMsg() - The main message processor for SME.
455
456 The function is called by a message dispatcher when to process a message
457 targeted for SME.
458
459
460 \param hHal - The handle returned by macOpen.
461 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
462
463 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
464
465 Other status means SME failed to process the message.
466 \sa
467
468 --------------------------------------------------------------------------*/
469eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
470
471v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
472
473/* ---------------------------------------------------------------------------
474 \fn sme_ScanRequest
475 \brief a wrapper function to Request a 11d or full scan from CSR.
476 \param pScanRequestID - pointer to an object to get back the request ID
477 \param callback - a callback function that scan calls upon finish, will not
478 be called if csrScanRequest returns error
479 \param pContext - a pointer passed in for the callback
480 \return eHalStatus
481 ---------------------------------------------------------------------------*/
482eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
483 tANI_U32 *pScanRequestID,
484 csrScanCompleteCallback callback, void *pContext);
485
486
487/* ---------------------------------------------------------------------------
488 \fn sme_ScanSetBGScanparams
489 \brief a wrapper function to request CSR to set BG scan params in PE
490 \param pScanReq - BG scan request structure
491 \return eHalStatus
492 ---------------------------------------------------------------------------*/
493eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
494
495
496/* ---------------------------------------------------------------------------
497 \fn sme_ScanGetResult
498 \brief a wrapper function to request scan results from CSR.
499 \param pFilter - If pFilter is NULL, all cached results are returned
500 \param phResult - an object for the result.
501 \return eHalStatus
502 ---------------------------------------------------------------------------*/
503eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
504 tScanResultHandle *phResult);
505
506
507/* ---------------------------------------------------------------------------
508 \fn sme_ScanFlushResult
509 \brief a wrapper function to request CSR to clear scan results.
510 \return eHalStatus
511 ---------------------------------------------------------------------------*/
512eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530513
514/*
515 * ---------------------------------------------------------------------------
516 * \fn sme_FilterScanResults
517 * \brief a wrapper function to request CSR to filter the scan results based
518 * on valid chennel list.
519 * \return eHalStatus
520 *---------------------------------------------------------------------------
521 */
522eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
523
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700524eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700525
526/* ---------------------------------------------------------------------------
527 \fn sme_ScanResultGetFirst
528 \brief a wrapper function to request CSR to returns the first element of
529 scan result.
530 \param hScanResult - returned from csrScanGetResult
531 \return tCsrScanResultInfo * - NULL if no result
532 ---------------------------------------------------------------------------*/
533tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
534 tScanResultHandle hScanResult);
535
536/* ---------------------------------------------------------------------------
537 \fn sme_ScanResultGetNext
538 \brief a wrapper function to request CSR to returns the next element of
539 scan result. It can be called without calling csrScanResultGetFirst
540 first
541 \param hScanResult - returned from csrScanGetResult
542 \return Null if no result or reach the end
543 ---------------------------------------------------------------------------*/
544tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
545 tScanResultHandle hScanResult);
546
547/* ---------------------------------------------------------------------------
548 \fn sme_ScanResultPurge
549 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
550 in the list and free memory for each item
551 \param hScanResult - returned from csrScanGetResult. hScanResult is
552 considered gone by
553 calling this function and even before this function reutrns.
554 \return eHalStatus
555 ---------------------------------------------------------------------------*/
556eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
557
558/* ---------------------------------------------------------------------------
559 \fn sme_ScanGetPMKIDCandidateList
560 \brief a wrapper function to return the PMKID candidate list
561 \param pPmkidList - caller allocated buffer point to an array of
562 tPmkidCandidateInfo
563 \param pNumItems - pointer to a variable that has the number of
564 tPmkidCandidateInfo allocated when retruning, this is
565 either the number needed or number of items put into
566 pPmkidList
567 \return eHalStatus - when fail, it usually means the buffer allocated is not
568 big enough and pNumItems
569 has the number of tPmkidCandidateInfo.
570 \Note: pNumItems is a number of tPmkidCandidateInfo,
571 not sizeof(tPmkidCandidateInfo) * something
572 ---------------------------------------------------------------------------*/
573eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
574 tPmkidCandidateInfo *pPmkidList,
575 tANI_U32 *pNumItems );
576
577
578/*----------------------------------------------------------------------------
579 \fn sme_RoamRegisterLinkQualityIndCallback
580
581 \brief
582 a wrapper function to allow HDD to register a callback handler with CSR for
583 link quality indications.
584
585 Only one callback may be registered at any time.
586 In order to deregister the callback, a NULL cback may be provided.
587
588 Registration happens in the task context of the caller.
589
590 \param callback - Call back being registered
591 \param pContext - user data
592
593 DEPENDENCIES: After CSR open
594
595 \return eHalStatus
596-----------------------------------------------------------------------------*/
597eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
598 csrRoamLinkQualityIndCallback callback,
599 void *pContext);
600
601
602/* ---------------------------------------------------------------------------
603 \fn sme_RoamConnect
604 \brief a wrapper function to request CSR to inititiate an association
605 \param sessionId - the sessionId returned by sme_OpenSession.
606 \param pProfile - can be NULL to join to any open ones
607 \param pRoamId - to get back the request ID
608 \return eHalStatus
609 ---------------------------------------------------------------------------*/
610eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
611 tANI_U32 *pRoamId);
612
613/* ---------------------------------------------------------------------------
614 \fn sme_RoamReassoc
615 \brief a wrapper function to request CSR to inititiate a re-association
616 \param pProfile - can be NULL to join the currently connected AP. In that
617 case modProfileFields should carry the modified field(s) which could trigger
618 reassoc
619 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
620 that might need modification dynamically once STA is up & running and this
621 could trigger a reassoc
622 \param pRoamId - to get back the request ID
623 \return eHalStatus
624 -------------------------------------------------------------------------------*/
625eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
626 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700627 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700628
629/* ---------------------------------------------------------------------------
630 \fn sme_RoamConnectToLastProfile
631 \brief a wrapper function to request CSR to disconnect and reconnect with
632 the same profile
633 \return eHalStatus. It returns fail if currently connected
634 ---------------------------------------------------------------------------*/
635eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
636
637/* ---------------------------------------------------------------------------
638 \fn sme_RoamDisconnect
639 \brief a wrapper function to request CSR to disconnect from a network
640 \param reason -- To indicate the reason for disconnecting. Currently, only
641 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
642 \return eHalStatus
643 ---------------------------------------------------------------------------*/
644eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
645
Jeff Johnson295189b2012-06-20 16:38:30 -0700646/* ---------------------------------------------------------------------------
647 \fn sme_RoamStopBss
648 \brief a wrapper function to request CSR to stop bss
649 \param sessionId - sessionId of SoftAP
650 \return eHalStatus
651 ---------------------------------------------------------------------------*/
652eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
653
654/* ---------------------------------------------------------------------------
655 \fn sme_RoamGetAssociatedStas
656 \brief To probe the list of associated stations from various modules of CORE stack.
657 \This is an asynchronous API.
658 \param sessionId - sessionId of SoftAP
659 \param modId - Module from whom list of associtated stations is to be probed.
660 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
661 \param pUsrContext - Opaque HDD context
662 \param pfnSapEventCallback - Sap event callback in HDD
663 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
664 \return eHalStatus
665 -------------------------------------------------------------------------------*/
666eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
667 VOS_MODULE_ID modId, void *pUsrContext,
668 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
669
670/* ---------------------------------------------------------------------------
671 \fn sme_RoamDisconnectSta
672 \brief To disassociate a station. This is an asynchronous API.
673 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
674 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
675 -------------------------------------------------------------------------------*/
676eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
677
678/* ---------------------------------------------------------------------------
679 \fn sme_RoamDeauthSta
680 \brief To disassociate a station. This is an asynchronous API.
681 \param hHal - Global structure
682 \param sessionId - sessionId of SoftAP
683 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
684 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
685 -------------------------------------------------------------------------------*/
686eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
687 tANI_U8 *pPeerMacAddr);
688
689/* ---------------------------------------------------------------------------
690 \fn sme_RoamTKIPCounterMeasures
691 \brief To start or stop TKIP counter measures. This is an asynchronous API.
692 \param sessionId - sessionId of SoftAP
693 \param bEnable - Flag to start/stop TKIP countermeasures
694 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
695 -------------------------------------------------------------------------------*/
696eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
697
698/* ---------------------------------------------------------------------------
699 \fn sme_RoamGetWpsSessionOverlap
700 \brief To get the WPS PBC session overlap information.
701 \This is an asynchronous API.
702 \param sessionId - sessionId of SoftAP
703 \param pUsrContext - Opaque HDD context
704 \param pfnSapEventCallback - Sap event callback in HDD
705 \return eHalStatus
706 -------------------------------------------------------------------------------*/
707eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
708 void *pUsrContext, void *pfnSapEventCallback,
709 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700710
711/* ---------------------------------------------------------------------------
712 \fn sme_RoamGetConnectState
713 \brief a wrapper function to request CSR to return the current connect state
714 of Roaming
715 \return eHalStatus
716 ---------------------------------------------------------------------------*/
717eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
718
719/* ---------------------------------------------------------------------------
720 \fn sme_RoamGetConnectProfile
721 \brief a wrapper function to request CSR to return the current connect
722 profile. Caller must call csrRoamFreeConnectProfile after it is done
723 and before reuse for another csrRoamGetConnectProfile call.
724 \param pProfile - pointer to a caller allocated structure
725 tCsrRoamConnectedProfile
726 \return eHalStatus. Failure if not connected
727 ---------------------------------------------------------------------------*/
728eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
729 tCsrRoamConnectedProfile *pProfile);
730
731/* ---------------------------------------------------------------------------
732 \fn sme_RoamFreeConnectProfile
733 \brief a wrapper function to request CSR to free and reinitialize the
734 profile returned previously by csrRoamGetConnectProfile.
735 \param pProfile - pointer to a caller allocated structure
736 tCsrRoamConnectedProfile
737 \return eHalStatus.
738 ---------------------------------------------------------------------------*/
739eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
740 tCsrRoamConnectedProfile *pProfile);
741
742/* ---------------------------------------------------------------------------
743 \fn sme_RoamSetPMKIDCache
744 \brief a wrapper function to request CSR to return the PMKID candidate list
745 \param pPMKIDCache - caller allocated buffer point to an array of
746 tPmkidCacheInfo
747 \param numItems - a variable that has the number of tPmkidCacheInfo
748 allocated when retruning, this is either the number needed
749 or number of items put into pPMKIDCache
750 \return eHalStatus - when fail, it usually means the buffer allocated is not
751 big enough and pNumItems has the number of
752 tPmkidCacheInfo.
753 \Note: pNumItems is a number of tPmkidCacheInfo,
754 not sizeof(tPmkidCacheInfo) * something
755 ---------------------------------------------------------------------------*/
756eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId, tPmkidCacheInfo *pPMKIDCache,
757 tANI_U32 numItems );
758
759/* ---------------------------------------------------------------------------
760 \fn sme_RoamGetSecurityReqIE
761 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
762 passes to PE to JOIN request or START_BSS request
763 This is a synchronuous call.
764 \param sessionId - returned by sme_OpenSession.
765 \param pLen - caller allocated memory that has the length of pBuf as input.
766 Upon returned, *pLen has the needed or IE length in pBuf.
767 \param pBuf - Caller allocated memory that contain the IE field, if any,
768 upon return
769 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
770 \return eHalStatus - when fail, it usually means the buffer allocated is not
771 big enough
772 ---------------------------------------------------------------------------*/
773eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
774 tANI_U8 *pBuf, eCsrSecurityType secType);
775
776/* ---------------------------------------------------------------------------
777 \fn sme_RoamGetSecurityRspIE
778 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
779 the beacon or probe rsp if connected
780 \param sessionId - returned by sme_OpenSession.
781 \param pLen - caller allocated memory that has the length of pBuf as input.
782 Upon returned, *pLen has the needed or IE length in pBuf.
783 \param pBuf - Caller allocated memory that contain the IE field, if any,
784 upon return
785 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
786 \return eHalStatus - when fail, it usually means the buffer allocated is not
787 big enough
788 ---------------------------------------------------------------------------*/
789eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
790 tANI_U8 *pBuf, eCsrSecurityType secType);
791
792
793/* ---------------------------------------------------------------------------
794 \fn sme_RoamGetNumPMKIDCache
795 \brief a wrapper function to request CSR to return number of PMKID cache
796 entries
797 \return tANI_U32 - the number of PMKID cache entries
798 ---------------------------------------------------------------------------*/
799tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
800
801/* ---------------------------------------------------------------------------
802 \fn sme_RoamGetPMKIDCache
803 \brief a wrapper function to request CSR to return PMKID cache from CSR
804 \param pNum - caller allocated memory that has the space of the number of
805 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
806 needed or actually number in tPmkidCacheInfo.
807 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
808 any, upon return
809 \return eHalStatus - when fail, it usually means the buffer allocated is not
810 big enough
811 ---------------------------------------------------------------------------*/
812eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
813 tPmkidCacheInfo *pPmkidCache);
814
815/* ---------------------------------------------------------------------------
816 \fn sme_GetConfigParam
817 \brief a wrapper function that HDD calls to get the global settings
818 currently maintained by CSR.
819 \param pParam - caller allocated memory
820 \return eHalStatus
821 ---------------------------------------------------------------------------*/
822eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
823
824/* ---------------------------------------------------------------------------
825 \fn sme_GetStatistics
826 \brief a wrapper function that client calls to register a callback to get
827 different PHY level statistics from CSR.
828
829 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
830 \param statsMask - The different category/categories of stats requester is looking for
831 The order in which you set the bits in the statsMask for requesting
832 different type of stats is:
833
834 eCsrSummaryStats = bit 0
835 eCsrGlobalClassAStats = bit 1
836 eCsrGlobalClassBStats = bit 2
837 eCsrGlobalClassCStats = bit 3
838 eCsrGlobalClassDStats = bit 4
839 eCsrPerStaStats = bit 5
840
841 \param callback - SME sends back the requested stats using the callback
842 \param periodicity - If requester needs periodic update, 0 means it's an one
843 time request
844 \param cache - If requester is happy with cached stats
845 \param staId - The station ID for which the stats is requested for
846 \param pContext - user context to be passed back along with the callback
847 \return eHalStatus
848 ---------------------------------------------------------------------------*/
849eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
850 tANI_U32 statsMask,
851 tCsrStatsCallback callback,
852 tANI_U32 periodicity, tANI_BOOLEAN cache,
853 tANI_U8 staId, void *pContext);
854
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +0530855/* ---------------------------------------------------------------------------
856 \fn smeGetTLSTAState
857 \helper function to get teh TL STA State whenever the function is called.
858
859 \param staId - The staID to be passed to the TL
860 to get the relevant TL STA State
861 \return the state as tANI_U16
862 ---------------------------------------------------------------------------*/
863tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
864
Jeff Johnson295189b2012-06-20 16:38:30 -0700865eHalStatus sme_GetRssi(tHalHandle hHal,
866 tCsrRssiCallback callback,
867 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530868
869/* ---------------------------------------------------------------------------
870 \fn sme_GetSnr
871 \brief a wrapper function that client calls to register a callback to get
872 SNR from FW
873
874 \param callback - SME sends back the requested stats using the callback
875 \param staId - The station ID for which the stats is requested for
876 \param bssid - The bssid of the connected session
877 \param pContext - user context to be passed back along with the callback
878 ---------------------------------------------------------------------------*/
879eHalStatus sme_GetSnr(tHalHandle hHal,
880 tCsrSnrCallback callback,
881 tANI_U8 staId, tCsrBssid bssId,
882 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800883#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -0800884eHalStatus sme_GetRoamRssi(tHalHandle hHal,
885 tCsrRssiCallback callback,
886 tANI_U8 staId,
887 tCsrBssid bssId,
888 void *pContext,
889 void* pVosContext);
890#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700891
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800892#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700893/* ---------------------------------------------------------------------------
894 \fn sme_GetTsmStats
895 \brief a wrapper function that client calls to register a callback to get TSM Stats
896
897 \param callback - SME sends back the requested stats using the callback
898 \param staId - The station ID for which the stats is requested for
899 \param pContext - user context to be passed back along with the callback
900 \param pVosContext - vos context
901 \return eHalStatus
902 ---------------------------------------------------------------------------*/
903eHalStatus sme_GetTsmStats(tHalHandle hHal,
904 tCsrTsmStatsCallback callback,
905 tANI_U8 staId, tCsrBssid bssId,
906 void *pContext, void* pVosContext, tANI_U8 tid);
907
908/* ---------------------------------------------------------------------------
909 \fn sme_SetCCKMIe
910 \brief function to store the CCKM IE passed from supplicant and use it while packing
911 reassociation request
912 \param hHal - HAL handle for device
913 \param pCckmIe - pointer to CCKM IE data
914 \param pCckmIeLen - length of the CCKM IE
915 \- return Success or failure
916 -------------------------------------------------------------------------*/
917eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
918
919
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800920/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800921 \fn sme_SetEseBeaconRequest
922 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800923 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800924 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800925 \- return Success or failure
926 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800927eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
928 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800929
930
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800931#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700932/* ---------------------------------------------------------------------------
933 \fn sme_CfgSetInt
934 \brief a wrapper function that HDD calls to set parameters in CFG.
935 \param cfgId - Configuration Parameter ID (type) for STA.
936 \param ccmValue - The information related to Configuration Parameter ID
937 which needs to be saved in CFG
938 \param callback - To be registered by CSR with CCM. Once the CFG done with
939 saving the information in the database, it notifies CCM &
940 then the callback will be invoked to notify.
941 \param toBeSaved - To save the request for future reference
942 \return eHalStatus
943 ---------------------------------------------------------------------------*/
944eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
945 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
946
947/* ---------------------------------------------------------------------------
948 \fn sme_CfgSetStr
949 \brief a wrapper function that HDD calls to set parameters in CFG.
950 \param cfgId - Configuration Parameter ID (type) for STA.
951 \param pStr - Pointer to the byte array which carries the information needs
952 to be saved in CFG
953 \param length - Length of the data to be saved
954 \param callback - To be registered by CSR with CCM. Once the CFG done with
955 saving the information in the database, it notifies CCM &
956 then the callback will be invoked to notify.
957 \param toBeSaved - To save the request for future reference
958 \return eHalStatus
959 ---------------------------------------------------------------------------*/
960eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
961 tANI_U32 length, tCcmCfgSetCallback callback,
962 eAniBoolean toBeSaved) ;
963
Sandeep Puligilla332ea912014-02-04 00:16:24 +0530964/* ---------------------------------------------------------------------------
965 \fn sme_HT40StopOBSSScan
966 \brief HDD or SME - Command to stop the OBSS scan
967 THis is implemented only for debugging purpose.
968 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
969 \param sessionId - sessionId
970 changing which can cause reassoc
971
972 \return eHalStatus
973 -------------------------------------------------------------------------------*/
974eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -0700975
976/*--------------------------------------------------------------------------
977 \fn sme_SetConfigPowerSave
978 \brief Wrapper fn to change power save configuration in SME (PMC) module.
979 For BMPS related configuration, this function also updates the CFG
980 and sends a message to FW to pick up the new values. Note: Calling
981 this function only updates the configuration and does not enable
982 the specified power save mode.
983 \param hHal - The handle returned by macOpen.
984 \param psMode - Power Saving mode being modified
985 \param pConfigParams - a pointer to a caller allocated object of type
986 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
987 \return eHalStatus
988 --------------------------------------------------------------------------*/
989eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
990 void *pConfigParams);
991
992/*--------------------------------------------------------------------------
993 \fn sme_GetConfigPowerSave
994 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
995 \param hHal - The handle returned by macOpen.
996 \param psMode - Power Saving mode
997 \param pConfigParams - a pointer to a caller allocated object of type
998 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
999 \return eHalStatus
1000 --------------------------------------------------------------------------*/
1001eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1002 void *pConfigParams);
1003
1004/* ---------------------------------------------------------------------------
1005 \fn sme_SignalPowerEvent
1006 \brief Signals to PMC that a power event has occurred. Used for putting
1007 the chip into deep sleep mode.
1008 \param hHal - The handle returned by macOpen.
1009 \param event - the event that has occurred
1010 \return eHalStatus
1011 ---------------------------------------------------------------------------*/
1012extern eHalStatus sme_SignalPowerEvent (
1013 tHalHandle hHal,
1014 tPmcPowerEvent event);
1015
1016/* ---------------------------------------------------------------------------
1017 \fn sme_EnablePowerSave
1018 \brief Enables one of the power saving modes. This API does not cause a
1019 device state change. This is purely a configuration API.
1020 \param hHal - The handle returned by macOpen.
1021 \param psMode - The power saving mode to enable.
1022 \return eHalStatus
1023 ---------------------------------------------------------------------------*/
1024extern eHalStatus sme_EnablePowerSave (
1025 tHalHandle hHal,
1026 tPmcPowerSavingMode psMode);
1027
1028/* ---------------------------------------------------------------------------
1029 \fn sme_DisablePowerSave
1030 \brief Disables one of the power saving modes.Disabling does not imply
1031 that device will be brought out of the current PS mode. This is
1032 purely a configuration API.
1033 \param hHal - The handle returned by macOpen.
1034 \param psMode - The power saving mode to disable.
1035 \return eHalStatus
1036 ---------------------------------------------------------------------------*/
1037extern eHalStatus sme_DisablePowerSave (
1038 tHalHandle hHal,
1039 tPmcPowerSavingMode psMode);
1040
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301041 /* ---------------------------------------------------------------------------
1042 \fn sme_SetHostPowerSave
1043 \brief The BMPS logic is controlled by the User level Apps
1044 \param hHal - The handle returned by macOpen.
1045 \param psMode - The power saving mode to enable.
1046 \return eHalStatus
1047 ---------------------------------------------------------------------------*/
1048extern eHalStatus sme_SetHostPowerSave (
1049 tHalHandle hHal,
1050 v_BOOL_t psMode);
1051
Jeff Johnson295189b2012-06-20 16:38:30 -07001052/* ---------------------------------------------------------------------------
1053 \fn sme_StartAutoBmpsTimer
1054 \brief Starts a timer that periodically polls all the registered
1055 module for entry into Bmps mode. This timer is started only if BMPS is
1056 enabled and whenever the device is in full power.
1057 \param hHal - The handle returned by macOpen.
1058 \return eHalStatus
1059 ---------------------------------------------------------------------------*/
1060extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1061
1062/* ---------------------------------------------------------------------------
1063 \fn sme_StopAutoBmpsTimer
1064 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1065 Stopping the timer does not cause a device state change. Only the timer
1066 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1067 \param hHal - The handle returned by macOpen.
1068 \return eHalStatus
1069 ---------------------------------------------------------------------------*/
1070extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1071
1072/* ---------------------------------------------------------------------------
1073 \fn sme_QueryPowerState
1074 \brief Returns the current power state of the device.
1075 \param hHal - The handle returned by macOpen.
1076 \param pPowerState - pointer to location to return power state
1077 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1078 \return eHalStatus
1079 ---------------------------------------------------------------------------*/
1080extern eHalStatus sme_QueryPowerState (
1081 tHalHandle hHal,
1082 tPmcPowerState *pPowerState,
1083 tPmcSwitchState *pSwWlanSwitchState);
1084
1085/* ---------------------------------------------------------------------------
1086 \fn sme_IsPowerSaveEnabled
1087 \brief Checks if the device is able to enter a particular power save mode
1088 This does not imply that the device is in a particular PS mode
1089 \param hHal - The handle returned by macOpen.
1090 \param psMode - the power saving mode
1091 \return eHalStatus
1092 ---------------------------------------------------------------------------*/
1093extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1094 tHalHandle hHal,
1095 tPmcPowerSavingMode psMode);
1096
1097/* ---------------------------------------------------------------------------
1098 \fn sme_RequestFullPower
1099 \brief Request that the device be brought to full power state.
1100 Note 1: If "fullPowerReason" specificied in this API is set to
1101 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1102 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1103 HDD is requesting full power, we need to undo any previous HDD requests for
1104 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1105 specified anything other than above, the buffered requests for BMPS and WoWL
1106 will not be cleared.
1107 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1108 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1109 request".
1110 Note 3: When the device finally enters Full Power PMC will start a timer
1111 if any of the following holds true:
1112 - Auto BMPS mode is enabled
1113 - Uapsd request is pending
1114 - HDD's request for BMPS is pending
1115 - HDD's request for WoWL is pending
1116 On timer expiry PMC will attempt to put the device in BMPS mode if following
1117 (in addition to those listed above) holds true:
1118 - Polling of all modules through the Power Save Check routine passes
1119 - STA is associated to an access point
1120 \param hHal - The handle returned by macOpen.
1121 \param - callbackRoutine Callback routine invoked in case of success/failure
1122 \param - callbackContext - Cookie to be passed back during callback
1123 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1124 distinguish between BAP and HDD requests
1125 \return eHalStatus - status
1126 eHAL_STATUS_SUCCESS - device brought to full power state
1127 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1128 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1129 ---------------------------------------------------------------------------*/
1130extern eHalStatus sme_RequestFullPower (
1131 tHalHandle hHal,
1132 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1133 void *callbackContext,
1134 tRequestFullPowerReason fullPowerReason);
1135
1136/* ---------------------------------------------------------------------------
1137 \fn sme_RequestBmps
1138 \brief Request that the device be put in BMPS state. Request will be
1139 accepted only if BMPS mode is enabled and power save check routine
1140 passes. Only HDD should invoke this API.
1141 \param hHal - The handle returned by macOpen.
1142 \param - callbackRoutine Callback routine invoked in case of success/failure
1143 \param - callbackContext - Cookie to be passed back during callback
1144 \return eHalStatus
1145 eHAL_STATUS_SUCCESS - device is in BMPS state
1146 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1147 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1148 ---------------------------------------------------------------------------*/
1149extern eHalStatus sme_RequestBmps (
1150 tHalHandle hHal,
1151 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1152 void *callbackContext);
1153
1154/* ---------------------------------------------------------------------------
1155 \fn sme_SetDHCPTillPowerActiveFlag
1156 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1157 entry by PMC
1158 \param hHal - The handle returned by macOpen.
1159 ---------------------------------------------------------------------------*/
1160void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1161
1162
1163/* ---------------------------------------------------------------------------
1164 \fn sme_StartUapsd
1165 \brief Request that the device be put in UAPSD state. If the device is in
1166 Full Power it will be put in BMPS mode first and then into UAPSD
1167 mode.
1168 \param hHal - The handle returned by macOpen.
1169 \param - callbackRoutine Callback routine invoked in case of success/failure
1170 \param - callbackContext - Cookie to be passed back during callback
1171 eHAL_STATUS_SUCCESS - device is in UAPSD state
1172 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1173 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1174 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1175 \return eHalStatus
1176 ---------------------------------------------------------------------------*/
1177extern eHalStatus sme_StartUapsd (
1178 tHalHandle hHal,
1179 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1180 void *callbackContext);
1181
1182/* ---------------------------------------------------------------------------
1183 \fn sme_StopUapsd
1184 \brief Request that the device be put out of UAPSD state. Device will be
1185 put in in BMPS state after stop UAPSD completes. Buffered requests for
1186 UAPSD will be cleared after this.
1187 \param hHal - The handle returned by macOpen.
1188 \return eHalStatus
1189 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1190 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1191 ---------------------------------------------------------------------------*/
1192extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1193
1194/* ---------------------------------------------------------------------------
1195 \fn sme_RequestStandby
1196 \brief Request that the device be put in standby. It is HDD's responsibility
1197 to bring the chip to full power and do a discconnect before calling
1198 this API. Request for standby will be rejected if STA is associated
1199 to an AP.
1200 \param hHal - The handle returned by macOpen.
1201 \param - callbackRoutine Callback routine invoked in case of success/failure
1202 \param - callbackContext - Cookie to be passed back during callback
1203 \return eHalStatus
1204 eHAL_STATUS_SUCCESS - device is in Standby mode
1205 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1206 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1207 ---------------------------------------------------------------------------*/
1208extern eHalStatus sme_RequestStandby (
1209 tHalHandle hHal,
1210 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1211 void *callbackContext);
1212
1213/* ---------------------------------------------------------------------------
1214 \fn sme_RegisterPowerSaveCheck
1215 \brief Register a power save check routine that is called whenever
1216 the device is about to enter one of the power save modes.
1217 \param hHal - The handle returned by macOpen.
1218 \param checkRoutine - Power save check routine to be registered
1219 \param callbackContext - Cookie to be passed back during callback
1220 \return eHalStatus
1221 eHAL_STATUS_SUCCESS - successfully registered
1222 eHAL_STATUS_FAILURE - not successfully registered
1223 ---------------------------------------------------------------------------*/
1224extern eHalStatus sme_RegisterPowerSaveCheck (
1225 tHalHandle hHal,
1226 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1227
1228/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301229 \fn sme_Register11dScanDoneCallback
1230 \brief Register a routine of type csrScanCompleteCallback which is
1231 called whenever an 11d scan is done
1232 \param hHal - The handle returned by macOpen.
1233 \param callback - 11d scan complete routine to be registered
1234 \return eHalStatus
1235 ---------------------------------------------------------------------------*/
1236extern eHalStatus sme_Register11dScanDoneCallback (
1237 tHalHandle hHal,
1238 csrScanCompleteCallback);
1239
1240/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001241 \fn sme_DeregisterPowerSaveCheck
1242 \brief Deregister a power save check routine
1243 \param hHal - The handle returned by macOpen.
1244 \param checkRoutine - Power save check routine to be deregistered
1245 \return eHalStatus
1246 eHAL_STATUS_SUCCESS - successfully deregistered
1247 eHAL_STATUS_FAILURE - not successfully deregistered
1248 ---------------------------------------------------------------------------*/
1249extern eHalStatus sme_DeregisterPowerSaveCheck (
1250 tHalHandle hHal,
1251 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1252
1253/* ---------------------------------------------------------------------------
1254 \fn sme_RegisterDeviceStateUpdateInd
1255 \brief Register a callback routine that is called whenever
1256 the device enters a new device state (Full Power, BMPS, UAPSD)
1257 \param hHal - The handle returned by macOpen.
1258 \param callbackRoutine - Callback routine to be registered
1259 \param callbackContext - Cookie to be passed back during callback
1260 \return eHalStatus
1261 eHAL_STATUS_SUCCESS - successfully registered
1262 eHAL_STATUS_FAILURE - not successfully registered
1263 ---------------------------------------------------------------------------*/
1264extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1265 tHalHandle hHal,
1266 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1267 void *callbackContext);
1268
1269/* ---------------------------------------------------------------------------
1270 \fn sme_DeregisterDeviceStateUpdateInd
1271 \brief Deregister a routine that was registered for device state changes
1272 \param hHal - The handle returned by macOpen.
1273 \param callbackRoutine - Callback routine to be deregistered
1274 \return eHalStatus
1275 eHAL_STATUS_SUCCESS - successfully deregistered
1276 eHAL_STATUS_FAILURE - not successfully deregistered
1277 ---------------------------------------------------------------------------*/
1278extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1279 tHalHandle hHal,
1280 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1281
1282/* ---------------------------------------------------------------------------
1283 \fn sme_WowlAddBcastPattern
1284 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1285 do a pattern match on these patterns when Wowl is enabled during BMPS
1286 mode.
1287 \param hHal - The handle returned by macOpen.
1288 \param pattern - Pattern to be added
1289 \return eHalStatus
1290 eHAL_STATUS_FAILURE Cannot add pattern
1291 eHAL_STATUS_SUCCESS Request accepted.
1292 ---------------------------------------------------------------------------*/
1293extern eHalStatus sme_WowlAddBcastPattern (
1294 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001295 tpSirWowlAddBcastPtrn pattern,
1296 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001297
1298/* ---------------------------------------------------------------------------
1299 \fn sme_WowlDelBcastPattern
1300 \brief Delete a pattern that was added for Pattern Byte Matching.
1301 \param hHal - The handle returned by macOpen.
1302 \param pattern - Pattern to be deleted
1303 \return eHalStatus
1304 eHAL_STATUS_FAILURE Cannot delete pattern
1305 eHAL_STATUS_SUCCESS Request accepted.
1306 ---------------------------------------------------------------------------*/
1307extern eHalStatus sme_WowlDelBcastPattern (
1308 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001309 tpSirWowlDelBcastPtrn pattern,
1310 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001311
1312/* ---------------------------------------------------------------------------
1313 \fn sme_EnterWowl
1314 \brief This is the API to request entry into WOWL mode.
1315 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1316 SME will will cache the information that WOWL has been requested and
1317 attempt to put the device in BMPS first. On entry into BMPS, SME will
1318 enter the WOWL mode.
1319 Note 1: After WoWL request is accepted, If module other than HDD requests
1320 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1321 and attempt to put the chip into BMPS+WOWL based on a timer.
1322 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1323 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1324 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1325 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1326 are required. Currently there is no requirement or use case to support UAPSD
1327 and WOWL at the same time.
1328 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1329 Note 5. Request for WoWL is rejected if BMPS is disabled.
1330
1331 \param hHal - The handle returned by macOpen.
1332 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1333 Used for success/failure notification by SME
1334 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1335 at the time of callback.
1336 \param wakeReasonIndCB - Callback routine provided by HDD.
1337 Used for Wake Reason Indication by SME
1338 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1339 at the time of callback.
1340 \return eHalStatus
1341 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1342 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1343 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1344 mode is entered.
1345 ---------------------------------------------------------------------------*/
1346extern eHalStatus sme_EnterWowl (
1347 tHalHandle hHal,
1348 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1349 void *enterWowlCallbackContext,
1350#ifdef WLAN_WAKEUP_EVENTS
1351 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1352 void *wakeReasonIndCBContext,
1353#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001354 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001355
1356/* ---------------------------------------------------------------------------
1357 \fn sme_ExitWowl
1358 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1359 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1360 mode. Any Buffered request for WoWL will be cleared after this API.
1361 \param hHal - The handle returned by macOpen.
1362 \return eHalStatus
1363 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1364 only if the previous "Enter WOWL" transaction has
1365 not even completed.
1366 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1367 ---------------------------------------------------------------------------*/
1368extern eHalStatus sme_ExitWowl (tHalHandle hHal);
1369
1370/* ---------------------------------------------------------------------------
1371
1372 \fn sme_RoamSetKey
1373
1374 \brief To set encryption key. This function should be called only when connected
1375 This is an asynchronous API.
1376
1377 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1378
1379 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1380
1381 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1382
1383 FAILURE or RESOURCES The API finished and failed.
1384
1385 -------------------------------------------------------------------------------*/
1386eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1387
1388/* ---------------------------------------------------------------------------
1389
1390 \fn sme_RoamRemoveKey
1391
1392 \brief To set encryption key. This is an asynchronous API.
1393
1394 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1395
1396 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1397
1398 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1399
1400 FAILURE or RESOURCES The API finished and failed.
1401
1402 -------------------------------------------------------------------------------*/
1403eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1404
1405
1406/* ---------------------------------------------------------------------------
1407
1408 \fn sme_GetCountryCode
1409
1410 \brief To return the current country code. If no country code is applied, default country code is
1411 used to fill the buffer.
1412 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1413 This is a synchronous API.
1414
1415 \param pBuf - pointer to a caller allocated buffer for returned country code.
1416
1417 \param pbLen For input, this parameter indicates how big is the buffer.
1418 Upon return, this parameter has the number of bytes for country. If pBuf
1419 doesn't have enough space, this function returns
1420 fail status and this parameter contains the number that is needed.
1421
1422 \return eHalStatus SUCCESS.
1423
1424 FAILURE or RESOURCES The API finished and failed.
1425
1426 -------------------------------------------------------------------------------*/
1427eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1428
1429/* ---------------------------------------------------------------------------
1430
1431 \fn sme_SetCountryCode
1432
1433 \brief To change the current/default country code.
1434 If 11d supported is turned off, an error is return.
1435 This is a synchronous API.
1436
1437 \param pCountry - pointer to a caller allocated buffer for the country code.
1438
1439 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1440 whether a reset is required.
1441
1442 \return eHalStatus SUCCESS.
1443
1444 FAILURE or RESOURCES The API finished and failed.
1445
1446 -------------------------------------------------------------------------------*/
1447eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1448
1449/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301450
1451 \fn sme_InitChannels
1452
1453 \brief Used to initialize CSR channel lists while driver loading
1454
1455 \param hHal - global pMac structure
1456
1457 \return eHalStatus SUCCESS.
1458
1459 FAILURE or RESOURCES The API finished and failed.
1460
1461 -------------------------------------------------------------------------------*/
1462eHalStatus sme_InitChannels(tHalHandle hHal);
1463
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301464
1465/* ---------------------------------------------------------------------------
1466 \fn sme_InitChannelsForCC
1467
1468 \brief Used to issue regulatory hint to user
1469
1470 \param hHal - global pMac structure
1471
1472 \return eHalStatus SUCCESS.
1473
1474 FAILURE or RESOURCES The API finished and failed.
1475
1476 -------------------------------------------------------------------------------*/
1477eHalStatus sme_InitChannelsForCC(tHalHandle hHal);
1478
Mihir Shetee1093ba2014-01-21 20:13:32 +05301479/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001480 \fn sme_ResetCountryCodeInformation
1481 \brief this function is to reset the country code current being used back to EEPROM default
1482 this includes channel list and power setting. This is a synchronous API.
1483 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1484 a restart is needed to apply the change
1485 \return eHalStatus
1486 -------------------------------------------------------------------------------*/
1487eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1488
1489/* ---------------------------------------------------------------------------
1490 \fn sme_GetSupportedCountryCode
1491 \brief this function is to get a list of the country code current being supported
1492 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1493 this has the country code list. 3 bytes for each country code. This may be NULL if
1494 caller wants to know the needed byte count.
1495 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1496 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1497 \return eHalStatus
1498 -------------------------------------------------------------------------------*/
1499eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1500
1501/* ---------------------------------------------------------------------------
1502 \fn sme_GetCurrentRegulatoryDomain
1503 \brief this function is to get the current regulatory domain. This is a synchronous API.
1504 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1505 SME. The function fails if 11d support is turned off.
1506 \param pDomain - Caller allocated buffer to return the current domain.
1507 \return eHalStatus SUCCESS.
1508
1509 FAILURE or RESOURCES The API finished and failed.
1510 -------------------------------------------------------------------------------*/
1511eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1512
1513/* ---------------------------------------------------------------------------
1514 \fn sme_SetRegulatoryDomain
1515 \brief this function is to set the current regulatory domain.
1516 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1517 SME. This is a synchronous API.
1518 \param domainId - indicate the domain (defined in the driver) needs to set to.
1519 See v_REGDOMAIN_t for definition
1520 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1521 a restart is needed to apply the change
1522 \return eHalStatus
1523 -------------------------------------------------------------------------------*/
1524eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1525
1526/* ---------------------------------------------------------------------------
1527
1528 \fn sme_GetRegulatoryDomainForCountry
1529
1530 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1531
1532 \param pCountry - pointer to a caller allocated buffer for input country code.
1533
1534 \param pDomainId Upon successful return, it is the domain that country belongs to.
1535 If it is NULL, returning success means that the country code is known.
1536
1537 \return eHalStatus SUCCESS.
1538
1539 FAILURE or RESOURCES The API finished and failed.
1540
1541 -------------------------------------------------------------------------------*/
1542eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1543
1544
1545
1546/* ---------------------------------------------------------------------------
1547
1548 \fn sme_GetSupportedRegulatoryDomains
1549
1550 \brief To return a list of supported regulatory domains. This is a synchronous API.
1551
1552 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1553
1554 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1555 Upon return, this parameter has the number for supported domains. If pDomains
1556 doesn't have enough space for all the supported domains, this function returns
1557 fail status and this parameter contains the number that is needed.
1558
1559 \return eHalStatus SUCCESS.
1560
1561 FAILURE or RESOURCES The API finished and failed.
1562
1563 -------------------------------------------------------------------------------*/
1564eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1565
1566//some support functions
1567tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1568tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1569tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1570//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1571eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1572
1573typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1574/* ---------------------------------------------------------------------------
1575
1576 \fn sme_ChangeCountryCode
1577
1578 \brief Change Country code from upperlayer during WLAN driver operation.
1579 This is a synchronous API.
1580
1581 \param hHal - The handle returned by macOpen.
1582
1583 \param pCountry New Country Code String
1584
Abhishek Singha306a442013-11-07 18:39:01 +05301585 \param sendRegHint If we want to send reg hint to nl80211
1586
Jeff Johnson295189b2012-06-20 16:38:30 -07001587 \return eHalStatus SUCCESS.
1588
1589 FAILURE or RESOURCES The API finished and failed.
1590
1591 -------------------------------------------------------------------------------*/
1592eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1593 tSmeChangeCountryCallback callback,
1594 tANI_U8 *pCountry,
1595 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301596 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301597 tAniBool countryFromUserSpace,
1598 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001599
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301600/* ---------------------------------------------------------------------------
1601
Amar Singhal0d15bd52013-10-12 23:13:13 -07001602 \fn sme_GenericChangeCountryCode
1603
1604 \brief Generic API to change country code
1605
1606 \param hHal - The handle returned by macOpen.
1607
1608 \param pCountry New Country Code String
1609
1610 \param reg_domain Regulatory domain for the new country code
1611
1612 \return eHalStatus SUCCESS.
1613
1614 FAILURE or RESOURCES The API finished and failed.
1615
1616 -------------------------------------------------------------------------------*/
1617eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1618 tANI_U8 *pCountry,
1619 v_REGDOMAIN_t reg_domain);
1620
1621/* ---------------------------------------------------------------------------
1622
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301623 \fn sme_DHCPStartInd
1624
1625 \brief Indicate FW about DHCP start event.
1626
1627 \param hHal - The handle returned by macOpen.
1628
1629 \param device_mode the mode of the device
1630
c_hpothu0b0cab72014-02-13 21:52:40 +05301631 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301632
1633 \return eHalStatus SUCCESS.
1634
1635 FAILURE or RESOURCES The API finished and failed.
1636
1637 -------------------------------------------------------------------------------*/
1638
1639eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1640 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301641 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301642
1643/* ---------------------------------------------------------------------------
1644
1645 \fn sme_DHCPStopInd
1646
1647 \brief Indicate FW about DHCP stop event.
1648
1649 \param hHal - The handle returned by macOpen.
1650
1651 \param device_mode the mode of the device
1652
c_hpothu0b0cab72014-02-13 21:52:40 +05301653 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301654
1655 \return eHalStatus SUCCESS.
1656
1657 FAILURE or RESOURCES The API finished and failed.
1658
1659 -------------------------------------------------------------------------------*/
1660eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1661 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301662 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301663
Jeff Johnson295189b2012-06-20 16:38:30 -07001664
1665/* ---------------------------------------------------------------------------
1666 \fn sme_BtcSignalBtEvent
1667 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1668 BT event type and the current operating mode of Libra (full power,
1669 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1670 would be employed.
1671 \param hHal - The handle returned by macOpen.
1672 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1673 Caller owns the memory and is responsible for freeing it.
1674 \return VOS_STATUS
1675 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1676 if driver has not yet been initialized or if BTC
1677 Events Layer has been disabled.
1678 VOS_STATUS_SUCCESS BT Event passed to HAL
1679 ---------------------------------------------------------------------------*/
1680VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1681
1682/* ---------------------------------------------------------------------------
1683 \fn sme_BtcSetConfig
1684 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1685 This function should be invoked only after CFG download has completed.
1686 Calling it after sme_HDDReadyInd is recommended.
1687 \param hHal - The handle returned by macOpen.
1688 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1689 tSmeBtcConfig. Caller owns the memory and is responsible
1690 for freeing it.
1691 \return VOS_STATUS
1692 VOS_STATUS_E_FAILURE Config not passed to HAL.
1693 VOS_STATUS_SUCCESS Config passed to HAL
1694 ---------------------------------------------------------------------------*/
1695VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1696
1697/* ---------------------------------------------------------------------------
1698 \fn sme_BtcGetConfig
1699 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1700 \param hHal - The handle returned by macOpen.
1701 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1702 Caller owns the memory and is responsible for freeing it.
1703 \return VOS_STATUS
1704 VOS_STATUS_E_FAILURE - failure
1705 VOS_STATUS_SUCCESS success
1706 ---------------------------------------------------------------------------*/
1707VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1708
1709/* ---------------------------------------------------------------------------
1710 \fn sme_SetCfgPrivacy
1711 \brief API to set configure privacy parameters
1712 \param hHal - The handle returned by macOpen.
1713 \param pProfile - Pointer CSR Roam profile.
1714 \param fPrivacy - This parameter indicates status of privacy
1715
1716 \return void
1717 ---------------------------------------------------------------------------*/
1718void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1719
1720#if defined WLAN_FEATURE_VOWIFI
1721/* ---------------------------------------------------------------------------
1722 \fn sme_NeighborReportRequest
1723 \brief API to request neighbor report.
1724 \param hHal - The handle returned by macOpen.
1725 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1726 tRrmNeighborReq. Caller owns the memory and is responsible
1727 for freeing it.
1728 \return VOS_STATUS
1729 VOS_STATUS_E_FAILURE - failure
1730 VOS_STATUS_SUCCESS success
1731 ---------------------------------------------------------------------------*/
1732VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1733 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1734#endif
1735
1736//The following are debug APIs to support direct read/write register/memory
1737//They are placed in SME because HW cannot be access when in LOW_POWER state
1738//AND not connected. The knowledge and synchronization is done in SME
1739
1740//sme_DbgReadRegister
1741//Caller needs to validate the input values
1742VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1743
1744//sme_DbgWriteRegister
1745//Caller needs to validate the input values
1746VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1747
1748//sme_DbgReadMemory
1749//Caller needs to validate the input values
1750//pBuf caller allocated buffer has the length of nLen
1751VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1752
1753//sme_DbgWriteMemory
1754//Caller needs to validate the input values
1755VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1756
Jeff Johnson295189b2012-06-20 16:38:30 -07001757VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1758 tSirVersionType *pVersion);
1759VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1760 tSirVersionType *pVersion);
1761VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1762 tANI_U8 *pVersion,
1763 tANI_U32 versionBufferSize);
1764VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1765 tANI_U8 *pVersion,
1766 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001767eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1768 csrRoamCompleteCallback callback,
1769 void *pContext);
1770
1771#ifdef FEATURE_WLAN_WAPI
1772/* ---------------------------------------------------------------------------
1773 \fn sme_RoamSetBKIDCache
1774 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1775 candidate list.
1776 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1777 it is opened (by calling halOpen).
1778 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1779 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1780 when retruning, this is the number of items put into pBKIDCache
1781 \return eHalStatus - when fail, it usually means the buffer allocated is not
1782 big enough and pNumItems has the number of tBkidCacheInfo.
1783 ---------------------------------------------------------------------------*/
1784eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1785 tANI_U32 numItems );
1786
1787/* ---------------------------------------------------------------------------
1788 \fn sme_RoamGetBKIDCache
1789 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1790 BKID cache.
1791 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1792 it is opened (by calling halOpen).
1793 \param pNum - caller allocated memory that has the space of the number of
1794 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1795 in SME cache.
1796 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1797 upon return
1798 \return eHalStatus - when fail, it usually means the buffer allocated is not
1799 big enough.
1800 ---------------------------------------------------------------------------*/
1801eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1802 tBkidCacheInfo *pBkidCache);
1803
1804/* ---------------------------------------------------------------------------
1805 \fn sme_RoamGetNumBKIDCache
1806 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1807 number of BKID cache entries.
1808 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1809 it is opened (by calling halOpen).
1810 \return tANI_U32 - the number of BKID cache entries.
1811 ---------------------------------------------------------------------------*/
1812tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1813
1814/* ---------------------------------------------------------------------------
1815 \fn sme_ScanGetBKIDCandidateList
1816 \brief a wrapper function to return the BKID candidate list
1817 \param pBkidList - caller allocated buffer point to an array of
1818 tBkidCandidateInfo
1819 \param pNumItems - pointer to a variable that has the number of
1820 tBkidCandidateInfo allocated when retruning, this is
1821 either the number needed or number of items put into
1822 pPmkidList
1823 \return eHalStatus - when fail, it usually means the buffer allocated is not
1824 big enough and pNumItems
1825 has the number of tBkidCandidateInfo.
1826 \Note: pNumItems is a number of tBkidCandidateInfo,
1827 not sizeof(tBkidCandidateInfo) * something
1828 ---------------------------------------------------------------------------*/
1829eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1830 tBkidCandidateInfo *pBkidList,
1831 tANI_U32 *pNumItems );
1832#endif /* FEATURE_WLAN_WAPI */
1833
Jeff Johnsone7245742012-09-05 17:12:55 -07001834#ifdef FEATURE_OEM_DATA_SUPPORT
1835/********************************************************************************************
1836 Oem data related modifications
1837*********************************************************************************************/
1838/* ---------------------------------------------------------------------------
1839 \fn sme_OemDataReq
1840 \param sessionId - session id of session to be used for oem data req.
1841 \param pOemDataReqID - pointer to an object to get back the request ID
1842 \param callback - a callback function that is called upon finish
1843 \param pContext - a pointer passed in for the callback
1844 \return eHalStatus
1845 ---------------------------------------------------------------------------*/
1846eHalStatus sme_OemDataReq(tHalHandle hHal,
1847 tANI_U8 sessionId,
1848 tOemDataReqConfig *,
1849 tANI_U32 *pOemDataReqID,
1850 oemData_OemDataReqCompleteCallback callback,
1851 void *pContext);
1852
1853/* ---------------------------------------------------------------------------
1854 \fn sme_getOemDataRsp
1855 \param pOemDataRsp - A pointer to the response object
1856 \param pOemDataReqID - pointer to an object to get back the request ID
1857 \return eHalStatus
1858 ---------------------------------------------------------------------------*/
1859eHalStatus sme_getOemDataRsp(tHalHandle hHal,
1860 tOemDataRsp **pOemDataRsp);
1861
1862#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07001863
1864
Jeff Johnson295189b2012-06-20 16:38:30 -07001865
1866/* ---------------------------------------------------------------------------
1867
1868 \fn sme_RoamUpdateAPWPSIE
1869
1870 \brief To update AP's WPS IE. This function should be called after SME AP session is created
1871 This is an asynchronous API.
1872
1873 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
1874
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001875 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07001876
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001877 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001878
1879 -------------------------------------------------------------------------------*/
1880
1881eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
1882/* ---------------------------------------------------------------------------
1883
1884 \fn sme_RoamUpdateAPWPARSNIEs
1885
1886 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
1887 This is an asynchronous API.
1888
1889 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
1890
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001891 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07001892
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001893 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001894
1895 -------------------------------------------------------------------------------*/
1896eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
1897
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001898/* ---------------------------------------------------------------------------
1899
1900 sme_ChangeMCCBeaconInterval
1901
1902 \brief To update P2P-GO's beacon Interval.
1903
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001904 \return eHalStatus SUCCESS
1905 FAILURE or RESOURCES
1906 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001907 -------------------------------------------------------------------------------*/
1908eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
1909
1910
Jeff Johnson295189b2012-06-20 16:38:30 -07001911
1912/* ---------------------------------------------------------------------------
1913 \fn sme_sendBTAmpEvent
1914 \brief API to send the btAMPstate to FW
1915 \param hHal - The handle returned by macOpen.
1916 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001917 \return eHalStatus SUCCESS
1918 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001919
1920--------------------------------------------------------------------------- */
1921
1922eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
1923
1924
1925
1926/* ---------------------------------------------------------------------------
1927 \fn sme_SetHostOffload
1928 \brief API to set the host offload feature.
1929 \param hHal - The handle returned by macOpen.
1930 \param pRequest - Pointer to the offload request.
1931 \return eHalStatus
1932 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001933eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
1934 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001935
1936/* ---------------------------------------------------------------------------
1937 \fn sme_SetKeepAlive
1938 \brief API to set the Keep Alive feature.
1939 \param hHal - The handle returned by macOpen.
1940 \param pRequest - Pointer to the Keep Alive request.
1941 \return eHalStatus
1942 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001943eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
1944 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001945
Jeff Johnson295189b2012-06-20 16:38:30 -07001946/* ----------------------------------------------------------------------------
1947 \fn sme_GetOperationChannel
1948 \brief API to get current channel on which STA is parked
1949 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001950 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07001951 \returns eHAL_STATUS_SUCCESS
1952 eHAL_STATUS_FAILURE
1953-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001954eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001955
Jeff Johnson295189b2012-06-20 16:38:30 -07001956/* ---------------------------------------------------------------------------
1957
1958 \fn sme_RegisterMgtFrame
1959
1960 \brief To register managment frame of specified type and subtype.
1961 \param frameType - type of the frame that needs to be passed to HDD.
1962 \param matchData - data which needs to be matched before passing frame
1963 to HDD.
1964 \param matchDataLen - Length of matched data.
1965 \return eHalStatus
1966 -------------------------------------------------------------------------------*/
1967eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1968 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
1969
1970/* ---------------------------------------------------------------------------
1971
1972 \fn sme_DeregisterMgtFrame
1973
1974 \brief To De-register managment frame of specified type and subtype.
1975 \param frameType - type of the frame that needs to be passed to HDD.
1976 \param matchData - data which needs to be matched before passing frame
1977 to HDD.
1978 \param matchDataLen - Length of matched data.
1979 \return eHalStatus
1980 -------------------------------------------------------------------------------*/
1981eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1982 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07001983
1984/* ---------------------------------------------------------------------------
1985
1986 \fn sme_ConfigureRxpFilter
1987
1988 \brief
1989 SME will pass this request to lower mac to set/reset the filter on RXP for
1990 multicast & broadcast traffic.
1991
1992 \param
1993
1994 hHal - The handle returned by macOpen.
1995
1996 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
1997 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
1998 on this param. In future we can use this as a mask to set various types of
1999 filters as suggested below:
2000 FILTER_ALL_MULTICAST:
2001 FILTER_ALL_BROADCAST:
2002 FILTER_ALL_MULTICAST_BROADCAST:
2003
2004
2005 \return eHalStatus
2006
2007
2008--------------------------------------------------------------------------- */
2009eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2010 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2011
2012/* ---------------------------------------------------------------------------
2013
2014 \fn sme_ConfigureAppsCpuWakeupState
2015
2016 \brief
2017 SME will pass this request to lower mac to dynamically adjusts the listen
2018 interval based on the WLAN/MSM activity. This feature is named as
2019 Telescopic Beacon wakeup feature.
2020
2021 \param
2022
2023 hHal - The handle returned by macOpen.
2024
2025 isAppsAwake- Depicts the state of the Apps CPU
2026
2027
2028 \return eHalStatus
2029
2030
2031--------------------------------------------------------------------------- */
2032eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2033
Jeff Johnson295189b2012-06-20 16:38:30 -07002034/* ---------------------------------------------------------------------------
2035
2036 \fn sme_ConfigureSuspendInd
2037
2038 \brief
2039 SME will pass this request to lower mac to Indicate that the wlan needs to
2040 be suspended
2041
2042 \param
2043
2044 hHal - The handle returned by macOpen.
2045
2046 wlanSuspendParam- Depicts the wlan suspend params
2047
2048
2049 \return eHalStatus
2050
2051
2052--------------------------------------------------------------------------- */
2053eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2054 tpSirWlanSuspendParam wlanSuspendParam);
2055
2056/* ---------------------------------------------------------------------------
2057
2058 \fn sme_ConfigureResumeReq
2059
2060 \brief
2061 SME will pass this request to lower mac to Indicate that the wlan needs to
2062 be Resumed
2063
2064 \param
2065
2066 hHal - The handle returned by macOpen.
2067
2068 wlanResumeParam- Depicts the wlan resume params
2069
2070
2071 \return eHalStatus
2072
2073
2074--------------------------------------------------------------------------- */
2075eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2076 tpSirWlanResumeParam wlanResumeParam);
2077
Jeff Johnson295189b2012-06-20 16:38:30 -07002078
2079/* ---------------------------------------------------------------------------
2080
2081 \fn sme_GetInfraSessionId
2082
2083 \brief To get the session ID for infra session, if connected
2084 This is a synchronous API.
2085
2086 \param hHal - The handle returned by macOpen.
2087
2088 \return sessionid, -1 if infra session is not connected
2089
2090 -------------------------------------------------------------------------------*/
2091tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2092
2093/* ---------------------------------------------------------------------------
2094
2095 \fn sme_GetInfraOperationChannel
2096
2097 \brief To get the operating channel for infra session, if connected
2098 This is a synchronous API.
2099
2100 \param hHal - The handle returned by macOpen.
2101 \param sessionId - the sessionId returned by sme_OpenSession.
2102
2103 \return operating channel, 0 if infra session is not connected
2104
2105 -------------------------------------------------------------------------------*/
2106tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2107/* ---------------------------------------------------------------------------
2108
2109 \fn sme_GetConcurrentOperationChannel
2110
2111 \brief To get the operating channel for other concurrent sessions, if connected
2112 This is a synchronous API.
2113
2114 \param hHal - The handle returned by macOpen.
2115 \param currentPersona - persona that is trying to come up.
2116
2117 \return operating channel, 0 if infra session is not connected
2118
2119 -------------------------------------------------------------------------------*/
2120tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2121
2122/* ---------------------------------------------------------------------------
2123 \fn sme_AbortMacScan
2124 \brief API to cancel MAC scan.
2125 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302126 \param sessionId - sessionId for interface
Jeff Johnson295189b2012-06-20 16:38:30 -07002127 \return VOS_STATUS
2128 VOS_STATUS_E_FAILURE - failure
2129 VOS_STATUS_SUCCESS success
2130 ---------------------------------------------------------------------------*/
Srinivas, Dasari138af4f2014-02-07 11:13:45 +05302131eHalStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2132 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002133
2134/* ---------------------------------------------------------------------------
2135 \fn sme_GetCfgValidChannels
2136 \brief API to get valid channel list
2137 \param hHal - The handle returned by macOpen.
2138 \param aValidChannels - Pointer to the valid channel list
2139 \param len - valid channel list length
2140 \return eHalStatus
2141 ---------------------------------------------------------------------------*/
2142eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2143
2144#ifdef FEATURE_WLAN_SCAN_PNO
2145
2146/* ---------------------------------------------------------------------------
2147 \fn sme_SetPreferredNetworkList
2148 \brief API to set the Preferred Network List Offload feature.
2149 \param hHal - The handle returned by macOpen.
2150 \param pRequest - Pointer to the offload request.
2151 \return eHalStatus
2152 ---------------------------------------------------------------------------*/
2153eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2154
2155/* ---------------------------------------------------------------------------
2156 \fn sme_SetRSSIFilter
2157 \brief API to set RSSI Filter feature.
2158 \param hHal - The handle returned by macOpen.
2159 \param pRequest - Pointer to the offload request.
2160 \return eHalStatus
2161 ---------------------------------------------------------------------------*/
2162eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2163
2164/******************************************************************************
2165*
2166* Name: sme_PreferredNetworkFoundInd
2167*
2168* Description:
2169* Invoke Preferred Network Found Indication
2170*
2171* Parameters:
2172* hHal - HAL handle for device
2173* pMsg - found network description
2174*
2175* Returns: eHalStatus
2176*
2177******************************************************************************/
2178eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2179#endif // FEATURE_WLAN_SCAN_PNO
2180
2181/* ---------------------------------------------------------------------------
2182 \fn sme_SetPowerParams
2183 \brief API to set Power Parameters
2184 \param hHal - The handle returned by macOpen.
2185 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002186 \param forced - if true, not to be dropped silently in host, it must reach
2187 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2188 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002189 \return eHalStatus
2190 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002191eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002192
2193/* ---------------------------------------------------------------------------
2194 \fn sme_SetTxPerTracking
2195 \brief Set Tx PER tracking configuration parameters
2196 \param hHal - The handle returned by macOpen.
2197 \param pTxPerTrackingParam - Tx PER configuration parameters
2198 \return eHalStatus
2199 ---------------------------------------------------------------------------*/
2200eHalStatus sme_SetTxPerTracking (
2201 tHalHandle hHal,
2202 void (*pCallbackfn) (void *pCallbackContext),
2203 void *pCallbackContext,
2204 tpSirTxPerTrackingParam pTxPerTrackingParam);
2205
2206#ifdef WLAN_FEATURE_PACKET_FILTERING
2207/* ---------------------------------------------------------------------------
2208 \fn sme_ReceiveFilterSetFilter
2209 \brief API to set 8023 Multicast Address List
2210 \param hHal - The handle returned by macOpen.
2211 \param pMulticastAddrs - Pointer to the Multicast Address List
2212 \return eHalStatus
2213 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002214eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002215
2216/* ---------------------------------------------------------------------------
2217 \fn sme_ReceiveFilterSetFilter
2218 \brief API to set Receive Packet Filter
2219 \param hHal - The handle returned by macOpen.
2220 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2221 \return eHalStatus
2222 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002223eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2224 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002225
2226/* ---------------------------------------------------------------------------
2227 \fn sme_GetFilterMatchCount
2228 \brief API to get D0 PC Filter Match Count
2229 \param hHal - The handle returned by macOpen
2230 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2231 \param callbackContext - Cookie to be passed back during callback
2232 \return eHalStatus
2233 ---------------------------------------------------------------------------*/
2234eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2235 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002236 void *callbackContext,
2237 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002238
2239/* ---------------------------------------------------------------------------
2240 \fn sme_ReceiveFilterClearFilter
2241 \brief API to clear Receive Packet Filter
2242 \param hHal - The handle returned by macOpen.
2243 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2244 \return eHalStatus
2245 ---------------------------------------------------------------------------*/
2246eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002247 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2248 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002249#endif // WLAN_FEATURE_PACKET_FILTERING
2250/* ---------------------------------------------------------------------------
2251
2252 \fn sme_IsChannelValid
2253 \brief To check if the channel is valid for currently established domain
2254 This is a synchronous API.
2255
2256 \param hHal - The handle returned by macOpen.
2257 \param channel - channel to verify
2258
2259 \return TRUE/FALSE, TRUE if channel is valid
2260
2261 -------------------------------------------------------------------------------*/
2262tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2263
2264/* ---------------------------------------------------------------------------
2265 \fn sme_SetFreqBand
2266 \brief Used to set frequency band.
2267 \param hHal
2268 \eBand band value to be configured
2269 \- return eHalStatus
2270 -------------------------------------------------------------------------*/
2271eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2272
2273/* ---------------------------------------------------------------------------
2274 \fn sme_GetFreqBand
2275 \brief Used to get the current band settings.
2276 \param hHal
2277 \pBand pointer to hold the current band value
2278 \- return eHalStatus
2279 -------------------------------------------------------------------------*/
2280eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2281
2282/* ---------------------------------------------------------------------------
2283
2284 \fn sme_SetTxPerTracking
2285 \brief Set Tx PER tracking configuration parameters
2286 \param hHal - The handle returned by macOpen.
2287 \param pTxPerTrackingParam - Tx PER configuration parameters
2288 \return eHalStatus
2289 ---------------------------------------------------------------------------*/
2290eHalStatus sme_SetTxPerTracking (
2291 tHalHandle hHal,
2292 void (*pCallbackfn) (void *pCallbackContext),
2293 void *pCallbackContext,
2294 tpSirTxPerTrackingParam pTxPerTrackingParam);
2295
2296#ifdef WLAN_FEATURE_GTK_OFFLOAD
2297/* ---------------------------------------------------------------------------
2298 \fn sme_SetGTKOffload
2299 \brief API to set GTK offload feature.
2300 \param hHal - The handle returned by macOpen.
2301 \param pRequest - Pointer to the GTK offload request.
2302 \return eHalStatus
2303 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002304eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002305
2306/* ---------------------------------------------------------------------------
2307 \fn sme_GetGTKOffload
2308 \brief API to get GTK offload information.
2309 \param hHal - The handle returned by macOpen.
2310 \param pRequest - Pointer to the GTK offload response.
2311 \return eHalStatus
2312 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002313eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2314 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002315#endif // WLAN_FEATURE_GTK_OFFLOAD
2316
2317#ifdef WLAN_WAKEUP_EVENTS
2318eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2319#endif // WLAN_WAKEUP_EVENTS
2320
2321/* ---------------------------------------------------------------------------
2322 \fn sme_SetTxPerTracking
2323 \brief Set Tx PER tracking configuration parameters
2324 \param hHal - The handle returned by macOpen.
2325 \param pTxPerTrackingParam - Tx PER configuration parameters
2326 \return eHalStatus
2327 ---------------------------------------------------------------------------*/
2328eHalStatus sme_SetTxPerTracking (
2329 tHalHandle hHal,
2330 void (*pCallbackfn) (void *pCallbackContext),
2331 void *pCallbackContext,
2332 tpSirTxPerTrackingParam pTxPerTrackingParam);
2333
2334
2335//return frequency for a particular channel
2336tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2337
2338tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2339
2340#if defined WLAN_FEATURE_P2P_INTERNAL
2341
2342eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2343
2344/* ---------------------------------------------------------------------------
2345 \fn sme_p2pFlushDeviceList
2346 \brief Remove cached P2P result from scan results
2347 \param hHal - The handle returned by macOpen.
2348 \param HDDSessionId - HDD's sessionId. Currently unused.
2349 \return eHalStatus
2350 ---------------------------------------------------------------------------*/
2351eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2352
2353eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2354 tCsrScanResultFilter *pFilter);
2355
2356#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2357
2358/* ---------------------------------------------------------------------------
2359 \fn sme_SetMaxTxPower
2360 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2361 setting will not persist over reboots
2362 \param hHal
2363 \param pBssid BSSID to set the power cap for
2364 \param pBssid pSelfMacAddress self MAC Address
2365 \param pBssid power to set in dB
2366 \- return eHalStatus
2367 -------------------------------------------------------------------------*/
2368eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2369 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2370
Jeff Johnson295189b2012-06-20 16:38:30 -07002371/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002372 \fn sme_SetMaxTxPowerPerBand
2373 \brief Used to set the Maximum Transmit Power for
2374 specific band dynamically. Note: this setting will not persist over reboots
2375 \param band
2376 \param power to set in dB
2377 \- return eHalStatus
2378 -------------------------------------------------------------------------*/
2379eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2380
2381/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002382
schang86c22c42013-03-13 18:41:24 -07002383 \fn sme_SetTxPower
2384
2385 \brief Set Transmit Power dynamically. Note: this setting will
2386 not persist over reboots.
2387
2388 \param hHal
2389 \param sessionId Target Session ID
2390 \param mW power to set in mW
2391 \- return eHalStatus
2392
2393 -------------------------------------------------------------------------------*/
2394eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2395
2396/* ---------------------------------------------------------------------------
2397
Jeff Johnson295189b2012-06-20 16:38:30 -07002398 \fn sme_HideSSID
2399
2400 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2401 not persist over reboots.
2402
2403 \param hHal
2404 \param sessionId
2405 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2406 \- return eHalStatus
2407
2408 -------------------------------------------------------------------------------*/
2409eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002410
2411/* ---------------------------------------------------------------------------
2412
2413 \fn sme_SetTmLevel
2414 \brief Set Thermal Mitigation Level to RIVA
2415 \param hHal - The handle returned by macOpen.
2416 \param newTMLevel - new Thermal Mitigation Level
2417 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002418 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002419 ---------------------------------------------------------------------------*/
2420eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2421
2422/*---------------------------------------------------------------------------
2423
2424 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2425 Host and FW.
2426
2427 \param hHal - HAL handle for device
2428
2429 \return NONE
2430
2431---------------------------------------------------------------------------*/
2432void sme_featureCapsExchange(tHalHandle hHal);
2433
Jeff Johnsond13512a2012-07-17 11:42:19 -07002434/*---------------------------------------------------------------------------
2435
Yathish9f22e662012-12-10 14:21:35 -08002436 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2437 between in Host.
2438
2439 \param hHal - HAL handle for device
2440
2441 \return NONE
2442
2443---------------------------------------------------------------------------*/
2444void sme_disableFeatureCapablity(tANI_U8 feature_index);
2445
2446/*---------------------------------------------------------------------------
2447
Jeff Johnsond13512a2012-07-17 11:42:19 -07002448 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2449 country code
2450 Host and FW.
2451
2452 \param hHal - HAL handle for device
2453 \param pCountry - pointer to country code
2454
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002455 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002456
2457 ---------------------------------------------------------------------------*/
2458eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2459
2460/*---------------------------------------------------------------------------
2461
2462 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2463 country code.
2464
2465 \param hHal - HAL handle for device
2466 \param pCountry - pointer to country code
2467
2468 \return Success or failure
2469
2470 ---------------------------------------------------------------------------*/
2471eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2472
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002473/* ---------------------------------------------------------------------------
2474 \fn sme_transportDebug
2475 \brief Dynamically monitoring Transport channels
2476 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002477 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002478 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002479 \param toggleStallDetect Enable stall detect feature
2480 This feature will take effect to data performance
2481 Not integrate till fully verification
2482 \- return NONE
2483 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002484void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002485
Kiran4a17ebe2013-01-31 10:43:43 -08002486/* ---------------------------------------------------------------------------
2487 \fn sme_ResetPowerValuesFor5G
2488 \brief Reset the power values for 5G band with NV power values.
2489 \param hHal - HAL handle for device
2490 \- return NONE
2491 -------------------------------------------------------------------------*/
2492void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2493
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002494#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002495/* ---------------------------------------------------------------------------
2496 \fn sme_UpdateRoamPrefer5GHz
2497 \brief enable/disable Roam prefer 5G runtime option
2498 This function is called through dynamic setConfig callback function
2499 to configure the Roam prefer 5G runtime option
2500 \param hHal - HAL handle for device
2501 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2502 \- return Success or failure
2503 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002504eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002505
2506/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002507 \fn sme_setRoamIntraBand
2508 \brief enable/disable Intra band roaming
2509 This function is called through dynamic setConfig callback function
2510 to configure the intra band roaming
2511 \param hHal - HAL handle for device
2512 \param nRoamIntraBand Enable/Disable Intra band roaming
2513 \- return Success or failure
2514 -------------------------------------------------------------------------*/
2515eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2516
2517/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002518 \fn sme_UpdateRoamScanNProbes
2519 \brief function to update roam scan N probes
2520 This function is called through dynamic setConfig callback function
2521 to update roam scan N probes
2522 \param hHal - HAL handle for device
2523 \param nProbes number of probe requests to be sent out
2524 \- return Success or failure
2525 -------------------------------------------------------------------------*/
2526eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2527
2528/* ---------------------------------------------------------------------------
2529 \fn sme_UpdateRoamScanHomeAwayTime
2530 \brief function to update roam scan Home away time
2531 This function is called through dynamic setConfig callback function
2532 to update roam scan home away time
2533 \param hHal - HAL handle for device
2534 \param nRoamScanAwayTime Scan home away time
2535 \- return Success or failure
2536 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002537eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2538 const v_U16_t nRoamScanHomeAwayTime,
2539 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002540
2541/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002542 \fn sme_getRoamIntraBand
2543 \brief get Intra band roaming
2544 \param hHal - HAL handle for device
2545 \- return Success or failure
2546 -------------------------------------------------------------------------*/
2547v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2548
2549/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002550 \fn sme_getRoamScanNProbes
2551 \brief get N Probes
2552 \param hHal - HAL handle for device
2553 \- return Success or failure
2554 -------------------------------------------------------------------------*/
2555v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2556
2557/* ---------------------------------------------------------------------------
2558 \fn sme_getRoamScanHomeAwayTime
2559 \brief get Roam scan home away time
2560 \param hHal - HAL handle for device
2561 \- return Success or failure
2562 -------------------------------------------------------------------------*/
2563v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2564
2565/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002566 \fn sme_UpdateImmediateRoamRssiDiff
2567 \brief Update nImmediateRoamRssiDiff
2568 This function is called through dynamic setConfig callback function
2569 to configure nImmediateRoamRssiDiff
2570 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2571 \param hHal - HAL handle for device
2572 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2573 candidate and current AP.
2574 \- return Success or failure
2575 -------------------------------------------------------------------------*/
2576
2577eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002578
Srinivas Girigowdade697412013-02-14 16:31:48 -08002579/* ---------------------------------------------------------------------------
2580 \fn sme_UpdateRoamRssiDiff
2581 \brief Update RoamRssiDiff
2582 This function is called through dynamic setConfig callback function
2583 to configure RoamRssiDiff
2584 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2585 \param hHal - HAL handle for device
2586 \param RoamRssiDiff - minimum rssi difference between potential
2587 candidate and current AP.
2588 \- return Success or failure
2589 -------------------------------------------------------------------------*/
2590
2591eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2592
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002593/*--------------------------------------------------------------------------
2594 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2595 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2596 isFastTransitionEnabled.
2597 This is a synchronuous call
2598 \param hHal - The handle returned by macOpen.
2599 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2600 Other status means SME is failed to update isFastTransitionEnabled.
2601 \sa
2602 --------------------------------------------------------------------------*/
2603
2604eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2605 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002606
2607/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002608 \fn sme_UpdateWESMode
2609 \brief Update WESMode
2610 This function is called through dynamic setConfig callback function
2611 to configure isWESModeEnabled
2612 \param hHal - HAL handle for device
2613 \param isWESModeEnabled - Enable/Disable WES Mode
2614 \- return Success or failure
2615 -------------------------------------------------------------------------*/
2616eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2617
2618/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002619 \fn sme_SetRoamScanControl
2620 \brief Set roam scan control
2621 This function is called to set roam scan control
2622 if roam scan control is set to 0, roaming scan cache is cleared
2623 any value other than 0 is treated as invalid value
2624 \param hHal - HAL handle for device
2625 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2626 Other status means SME failure to update
2627 -------------------------------------------------------------------------*/
2628eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002629#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002630
2631#ifdef FEATURE_WLAN_LFR
2632/*--------------------------------------------------------------------------
2633 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002634 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002635 isFastRoamIniFeatureEnabled.
2636 This is a synchronuous call
2637 \param hHal - The handle returned by macOpen.
2638 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2639 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2640 \sa
2641 --------------------------------------------------------------------------*/
2642
Srinivas Girigowdade697412013-02-14 16:31:48 -08002643eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002644 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002645
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002646/*--------------------------------------------------------------------------
2647 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2648 Enable/disable LFR MAWC support at runtime
2649 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2650 isMAWCIniFeatureEnabled.
2651 This is a synchronous call
2652 \param hHal - The handle returned by macOpen.
2653 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2654 Other status means SME is failed to update MAWCEnabled.
2655 \sa
2656 --------------------------------------------------------------------------*/
2657eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2658 const v_BOOL_t MAWCEnabled);
2659
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002660
2661#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2662/*--------------------------------------------------------------------------
2663 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2664 This is a synchronuous call
2665 \param hHal - The handle returned by macOpen.
2666 \return eHAL_STATUS_SUCCESS
2667 Other status means SME is failed
2668 \sa
2669 --------------------------------------------------------------------------*/
2670
2671eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2672 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2673#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002674#endif /* FEATURE_WLAN_LFR */
2675
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002676#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002677/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002678 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002679 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002680 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002681 This is a synchronuous call
2682 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002683 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2684 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002685 \sa
2686 --------------------------------------------------------------------------*/
2687
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002688eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2689 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002690
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002691#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002692
2693/*--------------------------------------------------------------------------
2694 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2695 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2696 fEnableFwRssiMonitoring.
2697 This is a synchronuous call
2698 \param hHal - The handle returned by macOpen.
2699 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2700 Other status means SME is failed to update
2701 \sa
2702 --------------------------------------------------------------------------*/
2703
2704eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2705 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002706
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002707#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002708/*--------------------------------------------------------------------------
2709 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2710 This is a synchronuous call
2711 \param hHal - The handle returned by macOpen.
2712 \return eHAL_STATUS_SUCCESS - SME update config successful.
2713 Other status means SME is failed to update
2714 \sa
2715 --------------------------------------------------------------------------*/
2716eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2717 v_U8_t neighborLookupRssiThreshold);
2718
2719/*--------------------------------------------------------------------------
2720 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2721 This is a synchronuous call
2722 \param hHal - The handle returned by macOpen.
2723 \return eHAL_STATUS_SUCCESS - SME update config successful.
2724 Other status means SME is failed to update
2725 \sa
2726 --------------------------------------------------------------------------*/
2727eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2728 v_U8_t neighborReassocRssiThreshold);
2729
2730/*--------------------------------------------------------------------------
2731 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2732 This is a synchronuous call
2733 \param hHal - The handle returned by macOpen.
2734 \return eHAL_STATUS_SUCCESS - SME update config successful.
2735 Other status means SME is failed to update
2736 \sa
2737 --------------------------------------------------------------------------*/
2738v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2739
2740/*--------------------------------------------------------------------------
2741 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2742 This is a synchronuous call
2743 \param hHal - The handle returned by macOpen.
2744 \return eHAL_STATUS_SUCCESS - SME update config successful.
2745 Other status means SME is failed to update
2746 \sa
2747 --------------------------------------------------------------------------*/
2748eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2749 v_U16_t neighborScanResultsRefreshPeriod);
2750
2751/*--------------------------------------------------------------------------
2752 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2753 This is a synchronuous call
2754 \param hHal - The handle returned by macOpen.
2755 \return eHAL_STATUS_SUCCESS - SME update config successful.
2756 Other status means SME is failed to update
2757 \sa
2758 --------------------------------------------------------------------------*/
2759v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2760
2761/*--------------------------------------------------------------------------
2762 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2763 This is a synchronuous call
2764 \param hHal - The handle returned by macOpen.
2765 \return eHAL_STATUS_SUCCESS - SME update config successful.
2766 Other status means SME is failed to update
2767 \sa
2768 --------------------------------------------------------------------------*/
2769v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2770
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002771/* ---------------------------------------------------------------------------
2772 \fn sme_UpdateEmptyScanRefreshPeriod
2773 \brief Update nEmptyScanRefreshPeriod
2774 This function is called through dynamic setConfig callback function
2775 to configure nEmptyScanRefreshPeriod
2776 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2777 \param hHal - HAL handle for device
2778 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2779 \- return Success or failure
2780 -------------------------------------------------------------------------*/
2781eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2782
2783/* ---------------------------------------------------------------------------
2784 \fn sme_setNeighborScanMinChanTime
2785 \brief Update nNeighborScanMinChanTime
2786 This function is called through dynamic setConfig callback function
2787 to configure gNeighborScanChannelMinTime
2788 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2789 \param hHal - HAL handle for device
2790 \param nNeighborScanMinChanTime - Channel minimum dwell time
2791 \- return Success or failure
2792 -------------------------------------------------------------------------*/
2793eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2794
2795/* ---------------------------------------------------------------------------
2796 \fn sme_setNeighborScanMaxChanTime
2797 \brief Update nNeighborScanMaxChanTime
2798 This function is called through dynamic setConfig callback function
2799 to configure gNeighborScanChannelMaxTime
2800 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2801 \param hHal - HAL handle for device
2802 \param nNeighborScanMinChanTime - Channel maximum dwell time
2803 \- return Success or failure
2804 -------------------------------------------------------------------------*/
2805eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2806
2807/* ---------------------------------------------------------------------------
2808 \fn sme_getNeighborScanMinChanTime
2809 \brief get neighbor scan min channel time
2810 \param hHal - The handle returned by macOpen.
2811 \return v_U16_t - channel min time value
2812 -------------------------------------------------------------------------*/
2813v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2814
2815/* ---------------------------------------------------------------------------
2816 \fn sme_getNeighborScanMaxChanTime
2817 \brief get neighbor scan max channel time
2818 \param hHal - The handle returned by macOpen.
2819 \return v_U16_t - channel max time value
2820 -------------------------------------------------------------------------*/
2821v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
2822
2823/* ---------------------------------------------------------------------------
2824 \fn sme_setNeighborScanPeriod
2825 \brief Update nNeighborScanPeriod
2826 This function is called through dynamic setConfig callback function
2827 to configure nNeighborScanPeriod
2828 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
2829 \param hHal - HAL handle for device
2830 \param nNeighborScanPeriod - neighbor scan period
2831 \- return Success or failure
2832 -------------------------------------------------------------------------*/
2833eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
2834
2835/* ---------------------------------------------------------------------------
2836 \fn sme_getNeighborScanPeriod
2837 \brief get neighbor scan period
2838 \param hHal - The handle returned by macOpen.
2839 \return v_U16_t - neighbor scan period
2840 -------------------------------------------------------------------------*/
2841v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
2842
2843#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08002844
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002845#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08002846/*--------------------------------------------------------------------------
2847 \brief sme_getRoamRssiDiff() - get Roam rssi diff
2848 This is a synchronuous call
2849 \param hHal - The handle returned by macOpen.
2850 \return eHAL_STATUS_SUCCESS - SME update config successful.
2851 Other status means SME is failed to update
2852 \sa
2853 --------------------------------------------------------------------------*/
2854v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
2855
2856/*--------------------------------------------------------------------------
2857 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
2858 This is a synchronuous call
2859 \param hHal - The handle returned by macOpen.
2860 \return eHAL_STATUS_SUCCESS - SME update config successful.
2861 Other status means SME is failed to update
2862 \sa
2863 --------------------------------------------------------------------------*/
2864eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2865 tANI_U8 numChannels);
2866
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002867#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002868/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002869 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002870 This is a synchronuous call
2871 \param hHal - The handle returned by macOpen.
2872 \return eHAL_STATUS_SUCCESS - SME update config successful.
2873 Other status means SME is failed to update
2874 \sa
2875 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002876eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002877 tANI_U8 *pChannelList,
2878 tANI_U8 numChannels);
2879#endif
2880
Srinivas Girigowdade697412013-02-14 16:31:48 -08002881/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08002882 \brief sme_getRoamScanChannelList() - get roam scan channel list
2883 This is a synchronuous call
2884 \param hHal - The handle returned by macOpen.
2885 \return eHAL_STATUS_SUCCESS - SME update config successful.
2886 Other status means SME is failed to update
2887 \sa
2888 --------------------------------------------------------------------------*/
2889eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2890 tANI_U8 *pNumChannels);
2891
2892/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002893 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002894 This is a synchronuous call
2895 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002896 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002897 FALSE (0) - if feature is disabled (compile or runtime)
2898 \sa
2899 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002900tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002901
2902/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002903 \brief sme_getWESMode() - getWES Mode
2904 This is a synchronous call
2905 \param hHal - The handle returned by macOpen.
2906 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
2907 \sa
2908 --------------------------------------------------------------------------*/
2909v_BOOL_t sme_GetWESMode(tHalHandle hHal);
2910
2911/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002912 \brief sme_GetRoamScanControl() - get scan control
2913 This is a synchronous call
2914 \param hHal - The handle returned by macOpen.
2915 \return v_BOOL_t - Enabled(1)/Disabled(0)
2916 \sa
2917 --------------------------------------------------------------------------*/
2918v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
2919
2920/* ---------------------------------------------------------------------------
2921 \fn sme_UpdateEmptyScanRefreshPeriod
2922 \brief Update nnEmptyScanRefreshPeriod
2923 This function is called through dynamic setConfig callback function
2924 to configure nnEmptyScanRefreshPeriod
2925 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2926 \param hHal - HAL handle for device
2927 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2928 \- return Success or failure
2929 -------------------------------------------------------------------------*/
2930
2931/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002932 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
2933 This is a synchronuous call
2934 \param hHal - The handle returned by macOpen.
2935 \return TRUE (1) - if the feature is enabled
2936 FALSE (0) - if feature is disabled (compile or runtime)
2937 \sa
2938 --------------------------------------------------------------------------*/
2939tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
2940
2941/*--------------------------------------------------------------------------
2942 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
2943 This is a synchronuous call
2944 \param hHal - The handle returned by macOpen.
2945 \return TRUE (1) - if the feature is enabled
2946 FALSE (0) - if feature is disabled (compile or runtime)
2947 \sa
2948 --------------------------------------------------------------------------*/
2949tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
2950
Srinivas Girigowdade697412013-02-14 16:31:48 -08002951#endif
2952
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07002953#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2954/*--------------------------------------------------------------------------
2955 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
2956 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2957 gRoamScanOffloadEnabled.
2958 This is a synchronous call
2959 \param hHal - The handle returned by macOpen.
2960 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2961 Other status means SME is failed to update.
2962 \sa
2963 --------------------------------------------------------------------------*/
2964
2965eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
2966#endif
2967
2968
Srinivas Girigowdade697412013-02-14 16:31:48 -08002969/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002970 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05302971 \brief Check if a feature is enabled by FW
2972
2973 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002974 A value from enum placeHolderInCapBitmap
2975
2976 \- return 1/0 (TRUE/FALSE)
2977 -------------------------------------------------------------------------*/
2978tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05302979
2980/* ---------------------------------------------------------------------------
2981 \fn sme_IsFeatureSupportedByDriver
2982 \brief Check if a feature is enabled by driver
2983
2984 \param featEnumValue - Enumeration value of the feature to be checked.
2985 A value from enum placeHolderInCapBitmap
2986
2987 \- return 1/0 (TRUE/FALSE)
2988 -------------------------------------------------------------------------*/
2989tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
2990
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002991#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302992
2993/* ---------------------------------------------------------------------------
2994 \fn sme_SendTdlsLinkEstablishParams
2995 \brief API to send TDLS Link Establishment Parameters.
2996
2997 \param peerMac - peer's Mac Adress.
2998 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
2999 \- return VOS_STATUS_SUCCES
3000 -------------------------------------------------------------------------*/
3001
3002VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
3003 tANI_U8 sessionId,
3004 tSirMacAddr peerMac,
3005 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
3006
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003007/* ---------------------------------------------------------------------------
3008 \fn sme_SendTdlsMgmtFrame
3009 \brief API to send TDLS management frames.
3010
3011 \param peerMac - peer's Mac Adress.
3012 \param frame_type - Type of TDLS mgmt frame to be sent.
3013 \param dialog - dialog token used in the frame.
3014 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303015 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003016 \param buf - additional IEs to be included
3017 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003018 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003019 \- return VOS_STATUS_SUCCES
3020 -------------------------------------------------------------------------*/
3021VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303022 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 -08003023/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003024 \fn sme_ChangeTdlsPeerSta
3025 \brief API to Update TDLS peer sta parameters.
3026
3027 \param peerMac - peer's Mac Adress.
3028 \param staParams - Peer Station Parameters.
3029 \- return VOS_STATUS_SUCCES
3030 -------------------------------------------------------------------------*/
3031VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
3032 tCsrStaParams *pstaParams);
3033/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003034 \fn sme_AddTdlsPeerSta
3035 \brief API to Add TDLS peer sta entry.
3036
3037 \param peerMac - peer's Mac Adress.
3038 \- return VOS_STATUS_SUCCES
3039 -------------------------------------------------------------------------*/
3040VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3041/* ---------------------------------------------------------------------------
3042 \fn sme_DeleteTdlsPeerSta
3043 \brief API to Delete TDLS peer sta entry.
3044
3045 \param peerMac - peer's Mac Adress.
3046 \- return VOS_STATUS_SUCCES
3047 -------------------------------------------------------------------------*/
3048VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003049/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003050 \fn sme_SetTdlsPowerSaveProhibited
3051 \API to set/reset the isTdlsPowerSaveProhibited.
3052
3053 \- return void
3054 -------------------------------------------------------------------------*/
3055void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003056#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303057/* ---------------------------------------------------------------------------
3058 \fn sme_IsPmcBmps
3059 \brief API to Check if PMC state is BMPS.
3060
3061 \- return v_BOOL_t
3062 -------------------------------------------------------------------------*/
3063v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3064
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003065#ifdef FEATURE_WLAN_TDLS_INTERNAL
3066typedef struct smeTdlsDisResult
3067{
3068 tSirMacAddr tdlsPeerMac;
3069 v_S7_t tdlsPeerRssi;
3070} tSmeTdlsDisResult;
3071
3072VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3073v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
3074 tSmeTdlsDisResult *disResult, v_U8_t listType);
3075VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3076VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003077#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003078eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003079
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003080/*
3081 * SME API to enable/disable WLAN driver initiated SSR
3082 */
3083void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3084
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303085/* ---------------------------------------------------------------------------
3086
3087 \fn sme_SetPhyMode
3088
3089 \brief Changes the PhyMode.
3090
3091 \param hHal - The handle returned by macOpen.
3092
3093 \param phyMode new phyMode which is to set
3094
3095 \return eHalStatus SUCCESS.
3096
3097 -------------------------------------------------------------------------------*/
3098eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3099
3100/* ---------------------------------------------------------------------------
3101
3102 \fn sme_GetPhyMode
3103
3104 \brief gets current PhyMode.
3105
3106 \param hHal - The handle returned by macOpen.
3107
3108 \return eHalStatus PhyMode
3109
3110 -------------------------------------------------------------------------------*/
3111eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3112
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003113/*
3114 * SME API to determine the channel bonding mode
3115 */
3116VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3117
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003118#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3119/*--------------------------------------------------------------------------
3120 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3121 from CSR.
3122 This is a synchronous call
3123 \param hHal - The handle returned by macOpen
3124 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3125 BSSID, channel etc.)
3126 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3127 Other status means SME is failed to send the request.
3128 \sa
3129 --------------------------------------------------------------------------*/
3130
3131eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3132#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003133/*--------------------------------------------------------------------------
3134 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3135 is any connected session .
3136 This is a synchronous call
3137 \param hHal - The handle returned by macOpen
3138 \return VOS_STATUS - SME passed the request to CSR successfully.
3139 Other status means SME is failed to send the request.
3140 \sa
3141 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003142VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003143
3144#ifdef FEATURE_WLAN_LPHB
3145/* ---------------------------------------------------------------------------
3146 \fn sme_LPHBConfigReq
3147 \API to make configuration LPHB within FW.
3148 \param hHal - The handle returned by macOpen
3149 \param lphdReq - LPHB request argument by client
3150 \param pCallbackfn - LPHB timeout notification callback function pointer
3151 \- return Configuration message posting status, SUCCESS or Fail
3152 -------------------------------------------------------------------------*/
3153eHalStatus sme_LPHBConfigReq(
3154 tHalHandle hHal,
3155 tSirLPHBReq *lphdReq,
3156 void (*pCallbackfn)(void *pAdapter, void *indParam));
3157#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003158
3159/* ---------------------------------------------------------------------------
3160 \fn sme_AddPeriodicTxPtrn
3161 \brief API to Periodic TX Pattern Offload feature
3162 \param hHal - The handle returned by macOpen
3163 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3164 \return eHalStatus
3165 ---------------------------------------------------------------------------*/
3166eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3167 *addPeriodicTxPtrnParams);
3168
3169/* ---------------------------------------------------------------------------
3170 \fn sme_DelPeriodicTxPtrn
3171 \brief API to Periodic TX Pattern Offload feature
3172 \param hHal - The handle returned by macOpen
3173 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3174 \return eHalStatus
3175 ---------------------------------------------------------------------------*/
3176eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3177 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003178/*--------------------------------------------------------------------------
3179 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3180 scan parameter.
3181 This is a synchronous call
3182 \param hHal - The handle returned by macOpen
3183 \return None.
3184 \sa
3185 --------------------------------------------------------------------------*/
3186void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3187 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303188
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003189/* ---------------------------------------------------------------------------
3190 \fn sme_SendRateUpdateInd
3191 \brief API to Update rate
3192 \param hHal - The handle returned by macOpen
3193 \param rateUpdateParams - Pointer to rate update params
3194 \return eHalStatus
3195 ---------------------------------------------------------------------------*/
3196eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3197
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303198/*
3199 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3200 * triggers
3201 * return status
3202*/
3203eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3204 tANI_U8 *bssid,
3205 tSmeFastRoamTrigger fastRoamTrig);
Leela Venkata Kiran Kumar Reddy Chiralaede10652013-09-11 18:48:46 -07003206eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pBSSId );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003207
3208void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303209
3210#ifdef FEATURE_WLAN_BATCH_SCAN
3211/* ---------------------------------------------------------------------------
3212 \fn sme_SetBatchScanReq
3213 \brief API to set batch scan request in FW
3214 \param hHal - The handle returned by macOpen.
3215 \param pRequest - Pointer to the batch request.
3216 \param sessionId - session ID
3217 \param callbackRoutine - HDD callback which needs to be invoked after
3218 getting set batch scan response from FW
3219 \param callbackContext - pAdapter context
3220 \return eHalStatus
3221 ---------------------------------------------------------------------------*/
3222eHalStatus
3223sme_SetBatchScanReq
3224(
3225 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3226 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3227 void *callbackContext
3228);
3229
3230/* ---------------------------------------------------------------------------
3231 \fn sme_TriggerBatchScanResultInd
3232 \brief API to trigger batch scan result indications from from FW
3233 \param hHal - The handle returned by macOpen.
3234 \param pRequest - Pointer to get batch request.
3235 \param sessionId - session ID
3236 \param callbackRoutine - HDD callback which needs to be invoked after
3237 getting get batch scan response from FW
3238 \param callbackContext - pAdapter context
3239 \return eHalStatus
3240 ---------------------------------------------------------------------------*/
3241eHalStatus
3242sme_TriggerBatchScanResultInd
3243(
3244 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3245 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3246 void *callbackContext
3247);
3248
3249/* ---------------------------------------------------------------------------
3250 \fn sme_StopBatchScanInd
3251 \brief API to stop batch scan request in FW
3252 \param hHal - The handle returned by macOpen.
3253 \param pRequest - Pointer to stop batch indication
3254 \return eHalStatus
3255 ---------------------------------------------------------------------------*/
3256eHalStatus
3257sme_StopBatchScanInd
3258(
3259 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3260);
3261
3262#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003263
3264#ifdef FEATURE_WLAN_CH_AVOID
3265/* ---------------------------------------------------------------------------
3266 \fn sme_AddChAvoidCallback
3267 \brief Used to plug in callback function
3268 Which notify channel may not be used with SAP or P2PGO mode.
3269 Notification come from FW.
3270 \param hHal
3271 \param pCallbackfn : callback function pointer should be plugged in
3272 \- return eHalStatus
3273 -------------------------------------------------------------------------*/
3274eHalStatus sme_AddChAvoidCallback
3275(
3276 tHalHandle hHal,
3277 void (*pCallbackfn)(void *pAdapter, void *indParam)
3278);
3279#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003280eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303281/* ---------------------------------------------------------------------------
3282 \fn sme_requestTypetoString
3283 \brief API to convert requestType enum values
3284 to string.
3285 ---------------------------------------------------------------------------*/
3286const char * sme_requestTypetoString(const v_U8_t requestType);
3287/* ---------------------------------------------------------------------------
3288 \fn sme_PmcStatetoString
3289 \brief API to convert PmcState enum values
3290 to string.
3291 ---------------------------------------------------------------------------*/
3292const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303293
3294eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3295
Agarwal Ashish5e414792014-06-08 15:25:23 +05303296tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Jeff Johnson295189b2012-06-20 16:38:30 -07003297#endif //#if !defined( __SME_API_H )