blob: ffc7d38e7c550c99189aa1a9b7383f35f8614ef1 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, 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/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42#if !defined( __SME_API_H )
43#define __SME_API_H
44
45
46/**=========================================================================
47
48 \file smeApi.h
49
50 \brief prototype for SME APIs
51
52 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
53
54 Qualcomm Confidential and Proprietary.
55
56 ========================================================================*/
57
58/* $Header$ */
59
60/*--------------------------------------------------------------------------
61 Include Files
62 ------------------------------------------------------------------------*/
63#include "ccmApi.h"
64#include "csrApi.h"
65#include "pmcApi.h"
66#include "vos_mq.h"
67#include "vos_lock.h"
68#include "halTypes.h"
69#include "sirApi.h"
70#include "btcApi.h"
71#include "vos_nvitem.h"
72#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070073
Jeff Johnsone7245742012-09-05 17:12:55 -070074#ifdef FEATURE_OEM_DATA_SUPPORT
75#include "oemDataApi.h"
76#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070077
78#if defined WLAN_FEATURE_VOWIFI
79#include "smeRrmInternal.h"
80#endif
81
82/*--------------------------------------------------------------------------
83 Preprocessor definitions and constants
84 ------------------------------------------------------------------------*/
85
86#define SME_SUMMARY_STATS 1
87#define SME_GLOBAL_CLASSA_STATS 2
88#define SME_GLOBAL_CLASSB_STATS 4
89#define SME_GLOBAL_CLASSC_STATS 8
90#define SME_GLOBAL_CLASSD_STATS 16
91#define SME_PER_STA_STATS 32
92
93#define SME_INVALID_COUNTRY_CODE "XX"
94
95/*--------------------------------------------------------------------------
96 Type declarations
97 ------------------------------------------------------------------------*/
98typedef struct _smeConfigParams
99{
100 tCsrConfigParam csrConfig;
101#if defined WLAN_FEATURE_VOWIFI
102 tRrmConfigParam rrmConfig;
103#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700104#if defined FEATURE_WLAN_LFR
105 tANI_U8 isFastRoamIniFeatureEnabled;
106#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700107#if defined FEATURE_WLAN_CCX
108 tANI_U8 isCcxIniFeatureEnabled;
109#endif
110#if defined WLAN_FEATURE_P2P_INTERNAL
111 tP2PConfigParam p2pConfig;
112#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700113#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700114 tANI_U8 isFastTransitionEnabled;
115 tANI_U8 RoamRssiDiff;
116 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700117#endif
118} tSmeConfigParams, *tpSmeConfigParams;
119
120
121/*-------------------------------------------------------------------------
122 Function declarations and documenation
123 ------------------------------------------------------------------------*/
124
125/*--------------------------------------------------------------------------
126
127 \brief sme_Open() - Initialze all SME modules and put them at idle state
128
129 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
130 successfully return, all modules are at idle state ready to start.
131
132 smeOpen must be called before any other SME APIs can be involved.
133 smeOpen must be called after macOpen.
134
135 \param hHal - The handle returned by macOpen.
136
137 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
138
139 Other status means SME is failed to be initialized
140 \sa
141
142 --------------------------------------------------------------------------*/
143eHalStatus sme_Open(tHalHandle hHal);
144
145/*--------------------------------------------------------------------------
146
147 \brief sme_Close() - Release all SME modules and their resources.
148
149 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
150 return, all modules are at closed state.
151
152 No SME APIs can be involved after sme_Close except sme_Open.
153 sme_Close must be called before macClose.
154
155 \param hHal - The handle returned by macOpen.
156
157 \return eHAL_STATUS_SUCCESS - SME is successfully close.
158
159 Other status means SME is failed to be closed but caller still cannot
160 call any other SME functions except smeOpen.
161 \sa
162
163 --------------------------------------------------------------------------*/
164eHalStatus sme_Close(tHalHandle hHal);
165
166/*--------------------------------------------------------------------------
167
168 \brief sme_Start() - Put all SME modules at ready state.
169
170 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
171 successfully return, all modules are ready to run.
172
173 \param hHal - The handle returned by macOpen.
174
175 \return eHAL_STATUS_SUCCESS - SME is ready.
176
177 Other status means SME is failed to start.
178 \sa
179
180 --------------------------------------------------------------------------*/
181eHalStatus sme_Start(tHalHandle hHal);
182
183/*--------------------------------------------------------------------------
184
185 \brief sme_Stop() - Stop all SME modules and put them at idle state
186
187 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
188 return, all modules are at idle state ready to start.
189
190
191 \param hHal - The handle returned by macOpen.
192
193 \param pmcFlag - The flag tells SME if we want to stop PMC or not
194
195 \return eHAL_STATUS_SUCCESS - SME is stopped.
196
197 Other status means SME is failed to stop but caller should still consider
198 SME is stopped.
199 \sa
200
201 --------------------------------------------------------------------------*/
202eHalStatus sme_Stop(tHalHandle hHal, tANI_BOOLEAN pmcFlag);
203
204
205/*--------------------------------------------------------------------------
206
207 \brief sme_OpenSession() - Open a session for scan/roam operation.
208
209 This is a synchronous API.
210
211
212 \param hHal - The handle returned by macOpen.
213 \param callback - A pointer to the function caller specifies for roam/connect status indication
214 \param pContext - The context passed with callback
215 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
216 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
217
218 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
219
220 Other status means SME is failed to open the session.
221 eHAL_STATUS_RESOURCES - no more session available.
222 \sa
223
224 --------------------------------------------------------------------------*/
225eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback, void *pContext,
226 tANI_U8 *pSelfMacAddr, tANI_U8 *pbSessionId);
227
228
229/*--------------------------------------------------------------------------
230
231 \brief sme_CloseSession() - Open a session for scan/roam operation.
232
233 This is a synchronous API.
234
235
236 \param hHal - The handle returned by macOpen.
237
238 \param sessionId - A previous opened session's ID.
239
240 \return eHAL_STATUS_SUCCESS - session is closed.
241
242 Other status means SME is failed to open the session.
243 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
244 \sa
245
246 --------------------------------------------------------------------------*/
247eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
248 csrRoamSessionCloseCallback callback, void *pContext);
249
250
251
252/*--------------------------------------------------------------------------
253
254 \brief sme_UpdateConfig() - Change configurations for all SME moduels
255
256 The function updates some configuration for modules in SME, CCM, CSR, etc
257 during SMEs close -> open sequence.
258
259 Modules inside SME apply the new configuration at the next transaction.
260
261
262 \param hHal - The handle returned by macOpen.
263 \Param pSmeConfigParams - a pointer to a caller allocated object of
264 typedef struct _smeConfigParams.
265
266 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
267
268 Other status means SME is failed to update the config parameters.
269 \sa
270
271 --------------------------------------------------------------------------*/
272eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
273
274#ifdef FEATURE_WLAN_SCAN_PNO
275/*--------------------------------------------------------------------------
276
277 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
278
279 It is used at driver start up to inform RIVA of the default channel
280 configuration.
281
282 This is a synchronuous call
283
284 \param hHal - The handle returned by macOpen.
285
286 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
287
288 Other status means SME is failed to update the channel config.
289 \sa
290
291 --------------------------------------------------------------------------*/
292eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
293
294#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700295/*--------------------------------------------------------------------------
296
297 \brief sme_set11dinfo() - Set the 11d information about valid channels
298 and there power using information from nvRAM
299 This function is called only for AP.
300
301 This is a synchronuous call
302
303 \param hHal - The handle returned by macOpen.
304 \Param pSmeConfigParams - a pointer to a caller allocated object of
305 typedef struct _smeConfigParams.
306
307 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
308
309 Other status means SME is failed to update the config parameters.
310 \sa
311--------------------------------------------------------------------------*/
312
313eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
314
315/*--------------------------------------------------------------------------
316
317 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
318
319 This is a synchronuous call
320
321 \param hHal - The handle returned by HostapdAdapter.
322 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
323
324 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
325
326 Other status means, failed to get the current regulatory domain.
327 \sa
328--------------------------------------------------------------------------*/
329
330eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
331
332eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
333
Jeff Johnson295189b2012-06-20 16:38:30 -0700334
335/* ---------------------------------------------------------------------------
336 \fn sme_ChangeConfigParams
337 \brief The SME API exposed for HDD to provide config params to SME during
338 SMEs stop -> start sequence.
339
340 If HDD changed the domain that will cause a reset. This function will
341 provide the new set of 11d information for the new domain. Currrently this
342 API provides info regarding 11d only at reset but we can extend this for
343 other params (PMC, QoS) which needs to be initialized again at reset.
344
345 This is a synchronuous call
346
347 \param hHal - The handle returned by macOpen.
348
349 \Param
350 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
351 currently provides 11d related information like Country code,
352 Regulatory domain, valid channel list, Tx power per channel, a
353 list with active/passive scan allowed per valid channel.
354
355 \return eHalStatus
356 ---------------------------------------------------------------------------*/
357eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
358 tCsrUpdateConfigParam *pUpdateConfigParam);
359
360/*--------------------------------------------------------------------------
361
362 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
363 is ready tio run.
364
365 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
366 to running state.
367
368
369 \param hHal - The handle returned by macOpen.
370
371 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
372
373 Other status means SME failed to send the message to PE.
374 \sa
375
376 --------------------------------------------------------------------------*/
377eHalStatus sme_HDDReadyInd(tHalHandle hHal);
378
379
380/*--------------------------------------------------------------------------
381
382 \brief sme_ProcessMsg() - The main message processor for SME.
383
384 The function is called by a message dispatcher when to process a message
385 targeted for SME.
386
387
388 \param hHal - The handle returned by macOpen.
389 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
390
391 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
392
393 Other status means SME failed to process the message.
394 \sa
395
396 --------------------------------------------------------------------------*/
397eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
398
399v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
400
401/* ---------------------------------------------------------------------------
402 \fn sme_ScanRequest
403 \brief a wrapper function to Request a 11d or full scan from CSR.
404 \param pScanRequestID - pointer to an object to get back the request ID
405 \param callback - a callback function that scan calls upon finish, will not
406 be called if csrScanRequest returns error
407 \param pContext - a pointer passed in for the callback
408 \return eHalStatus
409 ---------------------------------------------------------------------------*/
410eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
411 tANI_U32 *pScanRequestID,
412 csrScanCompleteCallback callback, void *pContext);
413
414
415/* ---------------------------------------------------------------------------
416 \fn sme_ScanSetBGScanparams
417 \brief a wrapper function to request CSR to set BG scan params in PE
418 \param pScanReq - BG scan request structure
419 \return eHalStatus
420 ---------------------------------------------------------------------------*/
421eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
422
423
424/* ---------------------------------------------------------------------------
425 \fn sme_ScanGetResult
426 \brief a wrapper function to request scan results from CSR.
427 \param pFilter - If pFilter is NULL, all cached results are returned
428 \param phResult - an object for the result.
429 \return eHalStatus
430 ---------------------------------------------------------------------------*/
431eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
432 tScanResultHandle *phResult);
433
434
435/* ---------------------------------------------------------------------------
436 \fn sme_ScanFlushResult
437 \brief a wrapper function to request CSR to clear scan results.
438 \return eHalStatus
439 ---------------------------------------------------------------------------*/
440eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700441eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700442
443/* ---------------------------------------------------------------------------
444 \fn sme_ScanResultGetFirst
445 \brief a wrapper function to request CSR to returns the first element of
446 scan result.
447 \param hScanResult - returned from csrScanGetResult
448 \return tCsrScanResultInfo * - NULL if no result
449 ---------------------------------------------------------------------------*/
450tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
451 tScanResultHandle hScanResult);
452
453/* ---------------------------------------------------------------------------
454 \fn sme_ScanResultGetNext
455 \brief a wrapper function to request CSR to returns the next element of
456 scan result. It can be called without calling csrScanResultGetFirst
457 first
458 \param hScanResult - returned from csrScanGetResult
459 \return Null if no result or reach the end
460 ---------------------------------------------------------------------------*/
461tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
462 tScanResultHandle hScanResult);
463
464/* ---------------------------------------------------------------------------
465 \fn sme_ScanResultPurge
466 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
467 in the list and free memory for each item
468 \param hScanResult - returned from csrScanGetResult. hScanResult is
469 considered gone by
470 calling this function and even before this function reutrns.
471 \return eHalStatus
472 ---------------------------------------------------------------------------*/
473eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
474
475/* ---------------------------------------------------------------------------
476 \fn sme_ScanGetPMKIDCandidateList
477 \brief a wrapper function to return the PMKID candidate list
478 \param pPmkidList - caller allocated buffer point to an array of
479 tPmkidCandidateInfo
480 \param pNumItems - pointer to a variable that has the number of
481 tPmkidCandidateInfo allocated when retruning, this is
482 either the number needed or number of items put into
483 pPmkidList
484 \return eHalStatus - when fail, it usually means the buffer allocated is not
485 big enough and pNumItems
486 has the number of tPmkidCandidateInfo.
487 \Note: pNumItems is a number of tPmkidCandidateInfo,
488 not sizeof(tPmkidCandidateInfo) * something
489 ---------------------------------------------------------------------------*/
490eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
491 tPmkidCandidateInfo *pPmkidList,
492 tANI_U32 *pNumItems );
493
494
495/*----------------------------------------------------------------------------
496 \fn sme_RoamRegisterLinkQualityIndCallback
497
498 \brief
499 a wrapper function to allow HDD to register a callback handler with CSR for
500 link quality indications.
501
502 Only one callback may be registered at any time.
503 In order to deregister the callback, a NULL cback may be provided.
504
505 Registration happens in the task context of the caller.
506
507 \param callback - Call back being registered
508 \param pContext - user data
509
510 DEPENDENCIES: After CSR open
511
512 \return eHalStatus
513-----------------------------------------------------------------------------*/
514eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
515 csrRoamLinkQualityIndCallback callback,
516 void *pContext);
517
518
519/* ---------------------------------------------------------------------------
520 \fn sme_RoamConnect
521 \brief a wrapper function to request CSR to inititiate an association
522 \param sessionId - the sessionId returned by sme_OpenSession.
523 \param pProfile - can be NULL to join to any open ones
524 \param pRoamId - to get back the request ID
525 \return eHalStatus
526 ---------------------------------------------------------------------------*/
527eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
528 tANI_U32 *pRoamId);
529
530/* ---------------------------------------------------------------------------
531 \fn sme_RoamReassoc
532 \brief a wrapper function to request CSR to inititiate a re-association
533 \param pProfile - can be NULL to join the currently connected AP. In that
534 case modProfileFields should carry the modified field(s) which could trigger
535 reassoc
536 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
537 that might need modification dynamically once STA is up & running and this
538 could trigger a reassoc
539 \param pRoamId - to get back the request ID
540 \return eHalStatus
541 -------------------------------------------------------------------------------*/
542eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
543 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700544 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700545
546/* ---------------------------------------------------------------------------
547 \fn sme_RoamConnectToLastProfile
548 \brief a wrapper function to request CSR to disconnect and reconnect with
549 the same profile
550 \return eHalStatus. It returns fail if currently connected
551 ---------------------------------------------------------------------------*/
552eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
553
554/* ---------------------------------------------------------------------------
555 \fn sme_RoamDisconnect
556 \brief a wrapper function to request CSR to disconnect from a network
557 \param reason -- To indicate the reason for disconnecting. Currently, only
558 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
559 \return eHalStatus
560 ---------------------------------------------------------------------------*/
561eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
562
Jeff Johnson295189b2012-06-20 16:38:30 -0700563/* ---------------------------------------------------------------------------
564 \fn sme_RoamStopBss
565 \brief a wrapper function to request CSR to stop bss
566 \param sessionId - sessionId of SoftAP
567 \return eHalStatus
568 ---------------------------------------------------------------------------*/
569eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
570
571/* ---------------------------------------------------------------------------
572 \fn sme_RoamGetAssociatedStas
573 \brief To probe the list of associated stations from various modules of CORE stack.
574 \This is an asynchronous API.
575 \param sessionId - sessionId of SoftAP
576 \param modId - Module from whom list of associtated stations is to be probed.
577 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
578 \param pUsrContext - Opaque HDD context
579 \param pfnSapEventCallback - Sap event callback in HDD
580 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
581 \return eHalStatus
582 -------------------------------------------------------------------------------*/
583eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
584 VOS_MODULE_ID modId, void *pUsrContext,
585 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
586
587/* ---------------------------------------------------------------------------
588 \fn sme_RoamDisconnectSta
589 \brief To disassociate a station. This is an asynchronous API.
590 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
591 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
592 -------------------------------------------------------------------------------*/
593eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
594
595/* ---------------------------------------------------------------------------
596 \fn sme_RoamDeauthSta
597 \brief To disassociate a station. This is an asynchronous API.
598 \param hHal - Global structure
599 \param sessionId - sessionId of SoftAP
600 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
601 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
602 -------------------------------------------------------------------------------*/
603eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
604 tANI_U8 *pPeerMacAddr);
605
606/* ---------------------------------------------------------------------------
607 \fn sme_RoamTKIPCounterMeasures
608 \brief To start or stop TKIP counter measures. This is an asynchronous API.
609 \param sessionId - sessionId of SoftAP
610 \param bEnable - Flag to start/stop TKIP countermeasures
611 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
612 -------------------------------------------------------------------------------*/
613eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
614
615/* ---------------------------------------------------------------------------
616 \fn sme_RoamGetWpsSessionOverlap
617 \brief To get the WPS PBC session overlap information.
618 \This is an asynchronous API.
619 \param sessionId - sessionId of SoftAP
620 \param pUsrContext - Opaque HDD context
621 \param pfnSapEventCallback - Sap event callback in HDD
622 \return eHalStatus
623 -------------------------------------------------------------------------------*/
624eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
625 void *pUsrContext, void *pfnSapEventCallback,
626 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700627
628/* ---------------------------------------------------------------------------
629 \fn sme_RoamGetConnectState
630 \brief a wrapper function to request CSR to return the current connect state
631 of Roaming
632 \return eHalStatus
633 ---------------------------------------------------------------------------*/
634eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
635
636/* ---------------------------------------------------------------------------
637 \fn sme_RoamGetConnectProfile
638 \brief a wrapper function to request CSR to return the current connect
639 profile. Caller must call csrRoamFreeConnectProfile after it is done
640 and before reuse for another csrRoamGetConnectProfile call.
641 \param pProfile - pointer to a caller allocated structure
642 tCsrRoamConnectedProfile
643 \return eHalStatus. Failure if not connected
644 ---------------------------------------------------------------------------*/
645eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
646 tCsrRoamConnectedProfile *pProfile);
647
648/* ---------------------------------------------------------------------------
649 \fn sme_RoamFreeConnectProfile
650 \brief a wrapper function to request CSR to free and reinitialize the
651 profile returned previously by csrRoamGetConnectProfile.
652 \param pProfile - pointer to a caller allocated structure
653 tCsrRoamConnectedProfile
654 \return eHalStatus.
655 ---------------------------------------------------------------------------*/
656eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
657 tCsrRoamConnectedProfile *pProfile);
658
659/* ---------------------------------------------------------------------------
660 \fn sme_RoamSetPMKIDCache
661 \brief a wrapper function to request CSR to return the PMKID candidate list
662 \param pPMKIDCache - caller allocated buffer point to an array of
663 tPmkidCacheInfo
664 \param numItems - a variable that has the number of tPmkidCacheInfo
665 allocated when retruning, this is either the number needed
666 or number of items put into pPMKIDCache
667 \return eHalStatus - when fail, it usually means the buffer allocated is not
668 big enough and pNumItems has the number of
669 tPmkidCacheInfo.
670 \Note: pNumItems is a number of tPmkidCacheInfo,
671 not sizeof(tPmkidCacheInfo) * something
672 ---------------------------------------------------------------------------*/
673eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId, tPmkidCacheInfo *pPMKIDCache,
674 tANI_U32 numItems );
675
676/* ---------------------------------------------------------------------------
677 \fn sme_RoamGetSecurityReqIE
678 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
679 passes to PE to JOIN request or START_BSS request
680 This is a synchronuous call.
681 \param sessionId - returned by sme_OpenSession.
682 \param pLen - caller allocated memory that has the length of pBuf as input.
683 Upon returned, *pLen has the needed or IE length in pBuf.
684 \param pBuf - Caller allocated memory that contain the IE field, if any,
685 upon return
686 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
687 \return eHalStatus - when fail, it usually means the buffer allocated is not
688 big enough
689 ---------------------------------------------------------------------------*/
690eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
691 tANI_U8 *pBuf, eCsrSecurityType secType);
692
693/* ---------------------------------------------------------------------------
694 \fn sme_RoamGetSecurityRspIE
695 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
696 the beacon or probe rsp if connected
697 \param sessionId - returned by sme_OpenSession.
698 \param pLen - caller allocated memory that has the length of pBuf as input.
699 Upon returned, *pLen has the needed or IE length in pBuf.
700 \param pBuf - Caller allocated memory that contain the IE field, if any,
701 upon return
702 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
703 \return eHalStatus - when fail, it usually means the buffer allocated is not
704 big enough
705 ---------------------------------------------------------------------------*/
706eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
707 tANI_U8 *pBuf, eCsrSecurityType secType);
708
709
710/* ---------------------------------------------------------------------------
711 \fn sme_RoamGetNumPMKIDCache
712 \brief a wrapper function to request CSR to return number of PMKID cache
713 entries
714 \return tANI_U32 - the number of PMKID cache entries
715 ---------------------------------------------------------------------------*/
716tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
717
718/* ---------------------------------------------------------------------------
719 \fn sme_RoamGetPMKIDCache
720 \brief a wrapper function to request CSR to return PMKID cache from CSR
721 \param pNum - caller allocated memory that has the space of the number of
722 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
723 needed or actually number in tPmkidCacheInfo.
724 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
725 any, upon return
726 \return eHalStatus - when fail, it usually means the buffer allocated is not
727 big enough
728 ---------------------------------------------------------------------------*/
729eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
730 tPmkidCacheInfo *pPmkidCache);
731
732/* ---------------------------------------------------------------------------
733 \fn sme_GetConfigParam
734 \brief a wrapper function that HDD calls to get the global settings
735 currently maintained by CSR.
736 \param pParam - caller allocated memory
737 \return eHalStatus
738 ---------------------------------------------------------------------------*/
739eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
740
741/* ---------------------------------------------------------------------------
742 \fn sme_GetStatistics
743 \brief a wrapper function that client calls to register a callback to get
744 different PHY level statistics from CSR.
745
746 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
747 \param statsMask - The different category/categories of stats requester is looking for
748 The order in which you set the bits in the statsMask for requesting
749 different type of stats is:
750
751 eCsrSummaryStats = bit 0
752 eCsrGlobalClassAStats = bit 1
753 eCsrGlobalClassBStats = bit 2
754 eCsrGlobalClassCStats = bit 3
755 eCsrGlobalClassDStats = bit 4
756 eCsrPerStaStats = bit 5
757
758 \param callback - SME sends back the requested stats using the callback
759 \param periodicity - If requester needs periodic update, 0 means it's an one
760 time request
761 \param cache - If requester is happy with cached stats
762 \param staId - The station ID for which the stats is requested for
763 \param pContext - user context to be passed back along with the callback
764 \return eHalStatus
765 ---------------------------------------------------------------------------*/
766eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
767 tANI_U32 statsMask,
768 tCsrStatsCallback callback,
769 tANI_U32 periodicity, tANI_BOOLEAN cache,
770 tANI_U8 staId, void *pContext);
771
772eHalStatus sme_GetRssi(tHalHandle hHal,
773 tCsrRssiCallback callback,
774 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -0800775#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
776eHalStatus sme_GetRoamRssi(tHalHandle hHal,
777 tCsrRssiCallback callback,
778 tANI_U8 staId,
779 tCsrBssid bssId,
780 void *pContext,
781 void* pVosContext);
782#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700783/* ---------------------------------------------------------------------------
784 \fn sme_CfgSetInt
785 \brief a wrapper function that HDD calls to set parameters in CFG.
786 \param cfgId - Configuration Parameter ID (type) for STA.
787 \param ccmValue - The information related to Configuration Parameter ID
788 which needs to be saved in CFG
789 \param callback - To be registered by CSR with CCM. Once the CFG done with
790 saving the information in the database, it notifies CCM &
791 then the callback will be invoked to notify.
792 \param toBeSaved - To save the request for future reference
793 \return eHalStatus
794 ---------------------------------------------------------------------------*/
795eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
796 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
797
798/* ---------------------------------------------------------------------------
799 \fn sme_CfgSetStr
800 \brief a wrapper function that HDD calls to set parameters in CFG.
801 \param cfgId - Configuration Parameter ID (type) for STA.
802 \param pStr - Pointer to the byte array which carries the information needs
803 to be saved in CFG
804 \param length - Length of the data to be saved
805 \param callback - To be registered by CSR with CCM. Once the CFG done with
806 saving the information in the database, it notifies CCM &
807 then the callback will be invoked to notify.
808 \param toBeSaved - To save the request for future reference
809 \return eHalStatus
810 ---------------------------------------------------------------------------*/
811eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
812 tANI_U32 length, tCcmCfgSetCallback callback,
813 eAniBoolean toBeSaved) ;
814
815
816/* ---------------------------------------------------------------------------
817 \fn sme_GetModifyProfileFields
818 \brief HDD or SME - QOS calls this function to get the current values of
819 connected profile fields, changing which can cause reassoc.
820 This function must be called after CFG is downloaded and STA is in connected
821 state. Also, make sure to call this function to get the current profile
822 fields before calling the reassoc. So that pModifyProfileFields will have
823 all the latest values plus the one(s) has been updated as part of reassoc
824 request.
825 \param pModifyProfileFields - pointer to the connected profile fields
826 changing which can cause reassoc
827
828 \return eHalStatus
829 -------------------------------------------------------------------------------*/
830eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
831 tCsrRoamModifyProfileFields * pModifyProfileFields);
832
833
834/*--------------------------------------------------------------------------
835 \fn sme_SetConfigPowerSave
836 \brief Wrapper fn to change power save configuration in SME (PMC) module.
837 For BMPS related configuration, this function also updates the CFG
838 and sends a message to FW to pick up the new values. Note: Calling
839 this function only updates the configuration and does not enable
840 the specified power save mode.
841 \param hHal - The handle returned by macOpen.
842 \param psMode - Power Saving mode being modified
843 \param pConfigParams - a pointer to a caller allocated object of type
844 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
845 \return eHalStatus
846 --------------------------------------------------------------------------*/
847eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
848 void *pConfigParams);
849
850/*--------------------------------------------------------------------------
851 \fn sme_GetConfigPowerSave
852 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
853 \param hHal - The handle returned by macOpen.
854 \param psMode - Power Saving mode
855 \param pConfigParams - a pointer to a caller allocated object of type
856 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
857 \return eHalStatus
858 --------------------------------------------------------------------------*/
859eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
860 void *pConfigParams);
861
862/* ---------------------------------------------------------------------------
863 \fn sme_SignalPowerEvent
864 \brief Signals to PMC that a power event has occurred. Used for putting
865 the chip into deep sleep mode.
866 \param hHal - The handle returned by macOpen.
867 \param event - the event that has occurred
868 \return eHalStatus
869 ---------------------------------------------------------------------------*/
870extern eHalStatus sme_SignalPowerEvent (
871 tHalHandle hHal,
872 tPmcPowerEvent event);
873
874/* ---------------------------------------------------------------------------
875 \fn sme_EnablePowerSave
876 \brief Enables one of the power saving modes. This API does not cause a
877 device state change. This is purely a configuration API.
878 \param hHal - The handle returned by macOpen.
879 \param psMode - The power saving mode to enable.
880 \return eHalStatus
881 ---------------------------------------------------------------------------*/
882extern eHalStatus sme_EnablePowerSave (
883 tHalHandle hHal,
884 tPmcPowerSavingMode psMode);
885
886/* ---------------------------------------------------------------------------
887 \fn sme_DisablePowerSave
888 \brief Disables one of the power saving modes.Disabling does not imply
889 that device will be brought out of the current PS mode. This is
890 purely a configuration API.
891 \param hHal - The handle returned by macOpen.
892 \param psMode - The power saving mode to disable.
893 \return eHalStatus
894 ---------------------------------------------------------------------------*/
895extern eHalStatus sme_DisablePowerSave (
896 tHalHandle hHal,
897 tPmcPowerSavingMode psMode);
898
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +0530899 /* ---------------------------------------------------------------------------
900 \fn sme_SetHostPowerSave
901 \brief The BMPS logic is controlled by the User level Apps
902 \param hHal - The handle returned by macOpen.
903 \param psMode - The power saving mode to enable.
904 \return eHalStatus
905 ---------------------------------------------------------------------------*/
906extern eHalStatus sme_SetHostPowerSave (
907 tHalHandle hHal,
908 v_BOOL_t psMode);
909
Jeff Johnson295189b2012-06-20 16:38:30 -0700910/* ---------------------------------------------------------------------------
911 \fn sme_StartAutoBmpsTimer
912 \brief Starts a timer that periodically polls all the registered
913 module for entry into Bmps mode. This timer is started only if BMPS is
914 enabled and whenever the device is in full power.
915 \param hHal - The handle returned by macOpen.
916 \return eHalStatus
917 ---------------------------------------------------------------------------*/
918extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
919
920/* ---------------------------------------------------------------------------
921 \fn sme_StopAutoBmpsTimer
922 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
923 Stopping the timer does not cause a device state change. Only the timer
924 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
925 \param hHal - The handle returned by macOpen.
926 \return eHalStatus
927 ---------------------------------------------------------------------------*/
928extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
929
930/* ---------------------------------------------------------------------------
931 \fn sme_QueryPowerState
932 \brief Returns the current power state of the device.
933 \param hHal - The handle returned by macOpen.
934 \param pPowerState - pointer to location to return power state
935 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
936 \return eHalStatus
937 ---------------------------------------------------------------------------*/
938extern eHalStatus sme_QueryPowerState (
939 tHalHandle hHal,
940 tPmcPowerState *pPowerState,
941 tPmcSwitchState *pSwWlanSwitchState);
942
943/* ---------------------------------------------------------------------------
944 \fn sme_IsPowerSaveEnabled
945 \brief Checks if the device is able to enter a particular power save mode
946 This does not imply that the device is in a particular PS mode
947 \param hHal - The handle returned by macOpen.
948 \param psMode - the power saving mode
949 \return eHalStatus
950 ---------------------------------------------------------------------------*/
951extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
952 tHalHandle hHal,
953 tPmcPowerSavingMode psMode);
954
955/* ---------------------------------------------------------------------------
956 \fn sme_RequestFullPower
957 \brief Request that the device be brought to full power state.
958 Note 1: If "fullPowerReason" specificied in this API is set to
959 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
960 and also clear any "buffered BMPS requests by HDD". Assumption is that since
961 HDD is requesting full power, we need to undo any previous HDD requests for
962 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
963 specified anything other than above, the buffered requests for BMPS and WoWL
964 will not be cleared.
965 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
966 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
967 request".
968 Note 3: When the device finally enters Full Power PMC will start a timer
969 if any of the following holds true:
970 - Auto BMPS mode is enabled
971 - Uapsd request is pending
972 - HDD's request for BMPS is pending
973 - HDD's request for WoWL is pending
974 On timer expiry PMC will attempt to put the device in BMPS mode if following
975 (in addition to those listed above) holds true:
976 - Polling of all modules through the Power Save Check routine passes
977 - STA is associated to an access point
978 \param hHal - The handle returned by macOpen.
979 \param - callbackRoutine Callback routine invoked in case of success/failure
980 \param - callbackContext - Cookie to be passed back during callback
981 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
982 distinguish between BAP and HDD requests
983 \return eHalStatus - status
984 eHAL_STATUS_SUCCESS - device brought to full power state
985 eHAL_STATUS_FAILURE - device cannot be brought to full power state
986 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
987 ---------------------------------------------------------------------------*/
988extern eHalStatus sme_RequestFullPower (
989 tHalHandle hHal,
990 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
991 void *callbackContext,
992 tRequestFullPowerReason fullPowerReason);
993
994/* ---------------------------------------------------------------------------
995 \fn sme_RequestBmps
996 \brief Request that the device be put in BMPS state. Request will be
997 accepted only if BMPS mode is enabled and power save check routine
998 passes. Only HDD should invoke this API.
999 \param hHal - The handle returned by macOpen.
1000 \param - callbackRoutine Callback routine invoked in case of success/failure
1001 \param - callbackContext - Cookie to be passed back during callback
1002 \return eHalStatus
1003 eHAL_STATUS_SUCCESS - device is in BMPS state
1004 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1005 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1006 ---------------------------------------------------------------------------*/
1007extern eHalStatus sme_RequestBmps (
1008 tHalHandle hHal,
1009 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1010 void *callbackContext);
1011
1012/* ---------------------------------------------------------------------------
1013 \fn sme_SetDHCPTillPowerActiveFlag
1014 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1015 entry by PMC
1016 \param hHal - The handle returned by macOpen.
1017 ---------------------------------------------------------------------------*/
1018void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1019
1020
1021/* ---------------------------------------------------------------------------
1022 \fn sme_StartUapsd
1023 \brief Request that the device be put in UAPSD state. If the device is in
1024 Full Power it will be put in BMPS mode first and then into UAPSD
1025 mode.
1026 \param hHal - The handle returned by macOpen.
1027 \param - callbackRoutine Callback routine invoked in case of success/failure
1028 \param - callbackContext - Cookie to be passed back during callback
1029 eHAL_STATUS_SUCCESS - device is in UAPSD state
1030 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1031 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1032 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1033 \return eHalStatus
1034 ---------------------------------------------------------------------------*/
1035extern eHalStatus sme_StartUapsd (
1036 tHalHandle hHal,
1037 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1038 void *callbackContext);
1039
1040/* ---------------------------------------------------------------------------
1041 \fn sme_StopUapsd
1042 \brief Request that the device be put out of UAPSD state. Device will be
1043 put in in BMPS state after stop UAPSD completes. Buffered requests for
1044 UAPSD will be cleared after this.
1045 \param hHal - The handle returned by macOpen.
1046 \return eHalStatus
1047 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1048 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1049 ---------------------------------------------------------------------------*/
1050extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1051
1052/* ---------------------------------------------------------------------------
1053 \fn sme_RequestStandby
1054 \brief Request that the device be put in standby. It is HDD's responsibility
1055 to bring the chip to full power and do a discconnect before calling
1056 this API. Request for standby will be rejected if STA is associated
1057 to an AP.
1058 \param hHal - The handle returned by macOpen.
1059 \param - callbackRoutine Callback routine invoked in case of success/failure
1060 \param - callbackContext - Cookie to be passed back during callback
1061 \return eHalStatus
1062 eHAL_STATUS_SUCCESS - device is in Standby mode
1063 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1064 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1065 ---------------------------------------------------------------------------*/
1066extern eHalStatus sme_RequestStandby (
1067 tHalHandle hHal,
1068 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1069 void *callbackContext);
1070
1071/* ---------------------------------------------------------------------------
1072 \fn sme_RegisterPowerSaveCheck
1073 \brief Register a power save check routine that is called whenever
1074 the device is about to enter one of the power save modes.
1075 \param hHal - The handle returned by macOpen.
1076 \param checkRoutine - Power save check routine to be registered
1077 \param callbackContext - Cookie to be passed back during callback
1078 \return eHalStatus
1079 eHAL_STATUS_SUCCESS - successfully registered
1080 eHAL_STATUS_FAILURE - not successfully registered
1081 ---------------------------------------------------------------------------*/
1082extern eHalStatus sme_RegisterPowerSaveCheck (
1083 tHalHandle hHal,
1084 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1085
1086/* ---------------------------------------------------------------------------
1087 \fn sme_DeregisterPowerSaveCheck
1088 \brief Deregister a power save check routine
1089 \param hHal - The handle returned by macOpen.
1090 \param checkRoutine - Power save check routine to be deregistered
1091 \return eHalStatus
1092 eHAL_STATUS_SUCCESS - successfully deregistered
1093 eHAL_STATUS_FAILURE - not successfully deregistered
1094 ---------------------------------------------------------------------------*/
1095extern eHalStatus sme_DeregisterPowerSaveCheck (
1096 tHalHandle hHal,
1097 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1098
1099/* ---------------------------------------------------------------------------
1100 \fn sme_RegisterDeviceStateUpdateInd
1101 \brief Register a callback routine that is called whenever
1102 the device enters a new device state (Full Power, BMPS, UAPSD)
1103 \param hHal - The handle returned by macOpen.
1104 \param callbackRoutine - Callback routine to be registered
1105 \param callbackContext - Cookie to be passed back during callback
1106 \return eHalStatus
1107 eHAL_STATUS_SUCCESS - successfully registered
1108 eHAL_STATUS_FAILURE - not successfully registered
1109 ---------------------------------------------------------------------------*/
1110extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1111 tHalHandle hHal,
1112 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1113 void *callbackContext);
1114
1115/* ---------------------------------------------------------------------------
1116 \fn sme_DeregisterDeviceStateUpdateInd
1117 \brief Deregister a routine that was registered for device state changes
1118 \param hHal - The handle returned by macOpen.
1119 \param callbackRoutine - Callback routine to be deregistered
1120 \return eHalStatus
1121 eHAL_STATUS_SUCCESS - successfully deregistered
1122 eHAL_STATUS_FAILURE - not successfully deregistered
1123 ---------------------------------------------------------------------------*/
1124extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1125 tHalHandle hHal,
1126 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1127
1128/* ---------------------------------------------------------------------------
1129 \fn sme_WowlAddBcastPattern
1130 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1131 do a pattern match on these patterns when Wowl is enabled during BMPS
1132 mode.
1133 \param hHal - The handle returned by macOpen.
1134 \param pattern - Pattern to be added
1135 \return eHalStatus
1136 eHAL_STATUS_FAILURE Cannot add pattern
1137 eHAL_STATUS_SUCCESS Request accepted.
1138 ---------------------------------------------------------------------------*/
1139extern eHalStatus sme_WowlAddBcastPattern (
1140 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001141 tpSirWowlAddBcastPtrn pattern,
1142 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001143
1144/* ---------------------------------------------------------------------------
1145 \fn sme_WowlDelBcastPattern
1146 \brief Delete a pattern that was added for Pattern Byte Matching.
1147 \param hHal - The handle returned by macOpen.
1148 \param pattern - Pattern to be deleted
1149 \return eHalStatus
1150 eHAL_STATUS_FAILURE Cannot delete pattern
1151 eHAL_STATUS_SUCCESS Request accepted.
1152 ---------------------------------------------------------------------------*/
1153extern eHalStatus sme_WowlDelBcastPattern (
1154 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001155 tpSirWowlDelBcastPtrn pattern,
1156 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001157
1158/* ---------------------------------------------------------------------------
1159 \fn sme_EnterWowl
1160 \brief This is the API to request entry into WOWL mode.
1161 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1162 SME will will cache the information that WOWL has been requested and
1163 attempt to put the device in BMPS first. On entry into BMPS, SME will
1164 enter the WOWL mode.
1165 Note 1: After WoWL request is accepted, If module other than HDD requests
1166 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1167 and attempt to put the chip into BMPS+WOWL based on a timer.
1168 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1169 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1170 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1171 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1172 are required. Currently there is no requirement or use case to support UAPSD
1173 and WOWL at the same time.
1174 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1175 Note 5. Request for WoWL is rejected if BMPS is disabled.
1176
1177 \param hHal - The handle returned by macOpen.
1178 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1179 Used for success/failure notification by SME
1180 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1181 at the time of callback.
1182 \param wakeReasonIndCB - Callback routine provided by HDD.
1183 Used for Wake Reason Indication by SME
1184 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1185 at the time of callback.
1186 \return eHalStatus
1187 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1188 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1189 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1190 mode is entered.
1191 ---------------------------------------------------------------------------*/
1192extern eHalStatus sme_EnterWowl (
1193 tHalHandle hHal,
1194 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1195 void *enterWowlCallbackContext,
1196#ifdef WLAN_WAKEUP_EVENTS
1197 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1198 void *wakeReasonIndCBContext,
1199#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001200 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001201
1202/* ---------------------------------------------------------------------------
1203 \fn sme_ExitWowl
1204 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1205 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1206 mode. Any Buffered request for WoWL will be cleared after this API.
1207 \param hHal - The handle returned by macOpen.
1208 \return eHalStatus
1209 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1210 only if the previous "Enter WOWL" transaction has
1211 not even completed.
1212 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1213 ---------------------------------------------------------------------------*/
1214extern eHalStatus sme_ExitWowl (tHalHandle hHal);
1215
1216/* ---------------------------------------------------------------------------
1217
1218 \fn sme_RoamSetKey
1219
1220 \brief To set encryption key. This function should be called only when connected
1221 This is an asynchronous API.
1222
1223 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1224
1225 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1226
1227 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1228
1229 FAILURE or RESOURCES The API finished and failed.
1230
1231 -------------------------------------------------------------------------------*/
1232eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1233
1234/* ---------------------------------------------------------------------------
1235
1236 \fn sme_RoamRemoveKey
1237
1238 \brief To set encryption key. This is an asynchronous API.
1239
1240 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1241
1242 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1243
1244 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1245
1246 FAILURE or RESOURCES The API finished and failed.
1247
1248 -------------------------------------------------------------------------------*/
1249eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1250
1251
1252/* ---------------------------------------------------------------------------
1253
1254 \fn sme_GetCountryCode
1255
1256 \brief To return the current country code. If no country code is applied, default country code is
1257 used to fill the buffer.
1258 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1259 This is a synchronous API.
1260
1261 \param pBuf - pointer to a caller allocated buffer for returned country code.
1262
1263 \param pbLen For input, this parameter indicates how big is the buffer.
1264 Upon return, this parameter has the number of bytes for country. If pBuf
1265 doesn't have enough space, this function returns
1266 fail status and this parameter contains the number that is needed.
1267
1268 \return eHalStatus SUCCESS.
1269
1270 FAILURE or RESOURCES The API finished and failed.
1271
1272 -------------------------------------------------------------------------------*/
1273eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1274
1275/* ---------------------------------------------------------------------------
1276
1277 \fn sme_SetCountryCode
1278
1279 \brief To change the current/default country code.
1280 If 11d supported is turned off, an error is return.
1281 This is a synchronous API.
1282
1283 \param pCountry - pointer to a caller allocated buffer for the country code.
1284
1285 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1286 whether a reset is required.
1287
1288 \return eHalStatus SUCCESS.
1289
1290 FAILURE or RESOURCES The API finished and failed.
1291
1292 -------------------------------------------------------------------------------*/
1293eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1294
1295/* ---------------------------------------------------------------------------
1296 \fn sme_ResetCountryCodeInformation
1297 \brief this function is to reset the country code current being used back to EEPROM default
1298 this includes channel list and power setting. This is a synchronous API.
1299 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1300 a restart is needed to apply the change
1301 \return eHalStatus
1302 -------------------------------------------------------------------------------*/
1303eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1304
1305/* ---------------------------------------------------------------------------
1306 \fn sme_GetSupportedCountryCode
1307 \brief this function is to get a list of the country code current being supported
1308 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1309 this has the country code list. 3 bytes for each country code. This may be NULL if
1310 caller wants to know the needed byte count.
1311 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1312 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1313 \return eHalStatus
1314 -------------------------------------------------------------------------------*/
1315eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1316
1317/* ---------------------------------------------------------------------------
1318 \fn sme_GetCurrentRegulatoryDomain
1319 \brief this function is to get the current regulatory domain. This is a synchronous API.
1320 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1321 SME. The function fails if 11d support is turned off.
1322 \param pDomain - Caller allocated buffer to return the current domain.
1323 \return eHalStatus SUCCESS.
1324
1325 FAILURE or RESOURCES The API finished and failed.
1326 -------------------------------------------------------------------------------*/
1327eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1328
1329/* ---------------------------------------------------------------------------
1330 \fn sme_SetRegulatoryDomain
1331 \brief this function is to set the current regulatory domain.
1332 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1333 SME. This is a synchronous API.
1334 \param domainId - indicate the domain (defined in the driver) needs to set to.
1335 See v_REGDOMAIN_t for definition
1336 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1337 a restart is needed to apply the change
1338 \return eHalStatus
1339 -------------------------------------------------------------------------------*/
1340eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1341
1342/* ---------------------------------------------------------------------------
1343
1344 \fn sme_GetRegulatoryDomainForCountry
1345
1346 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1347
1348 \param pCountry - pointer to a caller allocated buffer for input country code.
1349
1350 \param pDomainId Upon successful return, it is the domain that country belongs to.
1351 If it is NULL, returning success means that the country code is known.
1352
1353 \return eHalStatus SUCCESS.
1354
1355 FAILURE or RESOURCES The API finished and failed.
1356
1357 -------------------------------------------------------------------------------*/
1358eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1359
1360
1361
1362/* ---------------------------------------------------------------------------
1363
1364 \fn sme_GetSupportedRegulatoryDomains
1365
1366 \brief To return a list of supported regulatory domains. This is a synchronous API.
1367
1368 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1369
1370 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1371 Upon return, this parameter has the number for supported domains. If pDomains
1372 doesn't have enough space for all the supported domains, this function returns
1373 fail status and this parameter contains the number that is needed.
1374
1375 \return eHalStatus SUCCESS.
1376
1377 FAILURE or RESOURCES The API finished and failed.
1378
1379 -------------------------------------------------------------------------------*/
1380eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1381
1382//some support functions
1383tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1384tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1385tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1386//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1387eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1388
1389typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1390/* ---------------------------------------------------------------------------
1391
1392 \fn sme_ChangeCountryCode
1393
1394 \brief Change Country code from upperlayer during WLAN driver operation.
1395 This is a synchronous API.
1396
1397 \param hHal - The handle returned by macOpen.
1398
1399 \param pCountry New Country Code String
1400
1401 \return eHalStatus SUCCESS.
1402
1403 FAILURE or RESOURCES The API finished and failed.
1404
1405 -------------------------------------------------------------------------------*/
1406eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1407 tSmeChangeCountryCallback callback,
1408 tANI_U8 *pCountry,
1409 void *pContext,
1410 void* pVosContext );
1411
1412
1413/* ---------------------------------------------------------------------------
1414 \fn sme_BtcSignalBtEvent
1415 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1416 BT event type and the current operating mode of Libra (full power,
1417 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1418 would be employed.
1419 \param hHal - The handle returned by macOpen.
1420 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1421 Caller owns the memory and is responsible for freeing it.
1422 \return VOS_STATUS
1423 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1424 if driver has not yet been initialized or if BTC
1425 Events Layer has been disabled.
1426 VOS_STATUS_SUCCESS BT Event passed to HAL
1427 ---------------------------------------------------------------------------*/
1428VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1429
1430/* ---------------------------------------------------------------------------
1431 \fn sme_BtcSetConfig
1432 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1433 This function should be invoked only after CFG download has completed.
1434 Calling it after sme_HDDReadyInd is recommended.
1435 \param hHal - The handle returned by macOpen.
1436 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1437 tSmeBtcConfig. Caller owns the memory and is responsible
1438 for freeing it.
1439 \return VOS_STATUS
1440 VOS_STATUS_E_FAILURE Config not passed to HAL.
1441 VOS_STATUS_SUCCESS Config passed to HAL
1442 ---------------------------------------------------------------------------*/
1443VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1444
1445/* ---------------------------------------------------------------------------
1446 \fn sme_BtcGetConfig
1447 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1448 \param hHal - The handle returned by macOpen.
1449 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1450 Caller owns the memory and is responsible for freeing it.
1451 \return VOS_STATUS
1452 VOS_STATUS_E_FAILURE - failure
1453 VOS_STATUS_SUCCESS success
1454 ---------------------------------------------------------------------------*/
1455VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1456
1457/* ---------------------------------------------------------------------------
1458 \fn sme_SetCfgPrivacy
1459 \brief API to set configure privacy parameters
1460 \param hHal - The handle returned by macOpen.
1461 \param pProfile - Pointer CSR Roam profile.
1462 \param fPrivacy - This parameter indicates status of privacy
1463
1464 \return void
1465 ---------------------------------------------------------------------------*/
1466void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1467
1468#if defined WLAN_FEATURE_VOWIFI
1469/* ---------------------------------------------------------------------------
1470 \fn sme_NeighborReportRequest
1471 \brief API to request neighbor report.
1472 \param hHal - The handle returned by macOpen.
1473 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1474 tRrmNeighborReq. Caller owns the memory and is responsible
1475 for freeing it.
1476 \return VOS_STATUS
1477 VOS_STATUS_E_FAILURE - failure
1478 VOS_STATUS_SUCCESS success
1479 ---------------------------------------------------------------------------*/
1480VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1481 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1482#endif
1483
1484//The following are debug APIs to support direct read/write register/memory
1485//They are placed in SME because HW cannot be access when in LOW_POWER state
1486//AND not connected. The knowledge and synchronization is done in SME
1487
1488//sme_DbgReadRegister
1489//Caller needs to validate the input values
1490VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1491
1492//sme_DbgWriteRegister
1493//Caller needs to validate the input values
1494VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1495
1496//sme_DbgReadMemory
1497//Caller needs to validate the input values
1498//pBuf caller allocated buffer has the length of nLen
1499VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1500
1501//sme_DbgWriteMemory
1502//Caller needs to validate the input values
1503VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1504
Jeff Johnson295189b2012-06-20 16:38:30 -07001505VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1506 tSirVersionType *pVersion);
1507VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1508 tSirVersionType *pVersion);
1509VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1510 tANI_U8 *pVersion,
1511 tANI_U32 versionBufferSize);
1512VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1513 tANI_U8 *pVersion,
1514 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001515eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1516 csrRoamCompleteCallback callback,
1517 void *pContext);
1518
1519#ifdef FEATURE_WLAN_WAPI
1520/* ---------------------------------------------------------------------------
1521 \fn sme_RoamSetBKIDCache
1522 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1523 candidate list.
1524 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1525 it is opened (by calling halOpen).
1526 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1527 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1528 when retruning, this is the number of items put into pBKIDCache
1529 \return eHalStatus - when fail, it usually means the buffer allocated is not
1530 big enough and pNumItems has the number of tBkidCacheInfo.
1531 ---------------------------------------------------------------------------*/
1532eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1533 tANI_U32 numItems );
1534
1535/* ---------------------------------------------------------------------------
1536 \fn sme_RoamGetBKIDCache
1537 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1538 BKID cache.
1539 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1540 it is opened (by calling halOpen).
1541 \param pNum - caller allocated memory that has the space of the number of
1542 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1543 in SME cache.
1544 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1545 upon return
1546 \return eHalStatus - when fail, it usually means the buffer allocated is not
1547 big enough.
1548 ---------------------------------------------------------------------------*/
1549eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1550 tBkidCacheInfo *pBkidCache);
1551
1552/* ---------------------------------------------------------------------------
1553 \fn sme_RoamGetNumBKIDCache
1554 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1555 number of BKID cache entries.
1556 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1557 it is opened (by calling halOpen).
1558 \return tANI_U32 - the number of BKID cache entries.
1559 ---------------------------------------------------------------------------*/
1560tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1561
1562/* ---------------------------------------------------------------------------
1563 \fn sme_ScanGetBKIDCandidateList
1564 \brief a wrapper function to return the BKID candidate list
1565 \param pBkidList - caller allocated buffer point to an array of
1566 tBkidCandidateInfo
1567 \param pNumItems - pointer to a variable that has the number of
1568 tBkidCandidateInfo allocated when retruning, this is
1569 either the number needed or number of items put into
1570 pPmkidList
1571 \return eHalStatus - when fail, it usually means the buffer allocated is not
1572 big enough and pNumItems
1573 has the number of tBkidCandidateInfo.
1574 \Note: pNumItems is a number of tBkidCandidateInfo,
1575 not sizeof(tBkidCandidateInfo) * something
1576 ---------------------------------------------------------------------------*/
1577eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1578 tBkidCandidateInfo *pBkidList,
1579 tANI_U32 *pNumItems );
1580#endif /* FEATURE_WLAN_WAPI */
1581
Jeff Johnsone7245742012-09-05 17:12:55 -07001582#ifdef FEATURE_OEM_DATA_SUPPORT
1583/********************************************************************************************
1584 Oem data related modifications
1585*********************************************************************************************/
1586/* ---------------------------------------------------------------------------
1587 \fn sme_OemDataReq
1588 \param sessionId - session id of session to be used for oem data req.
1589 \param pOemDataReqID - pointer to an object to get back the request ID
1590 \param callback - a callback function that is called upon finish
1591 \param pContext - a pointer passed in for the callback
1592 \return eHalStatus
1593 ---------------------------------------------------------------------------*/
1594eHalStatus sme_OemDataReq(tHalHandle hHal,
1595 tANI_U8 sessionId,
1596 tOemDataReqConfig *,
1597 tANI_U32 *pOemDataReqID,
1598 oemData_OemDataReqCompleteCallback callback,
1599 void *pContext);
1600
1601/* ---------------------------------------------------------------------------
1602 \fn sme_getOemDataRsp
1603 \param pOemDataRsp - A pointer to the response object
1604 \param pOemDataReqID - pointer to an object to get back the request ID
1605 \return eHalStatus
1606 ---------------------------------------------------------------------------*/
1607eHalStatus sme_getOemDataRsp(tHalHandle hHal,
1608 tOemDataRsp **pOemDataRsp);
1609
1610#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07001611
1612
Jeff Johnson295189b2012-06-20 16:38:30 -07001613
1614/* ---------------------------------------------------------------------------
1615
1616 \fn sme_RoamUpdateAPWPSIE
1617
1618 \brief To update AP's WPS IE. This function should be called after SME AP session is created
1619 This is an asynchronous API.
1620
1621 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
1622
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001623 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07001624
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001625 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001626
1627 -------------------------------------------------------------------------------*/
1628
1629eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
1630/* ---------------------------------------------------------------------------
1631
1632 \fn sme_RoamUpdateAPWPARSNIEs
1633
1634 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
1635 This is an asynchronous API.
1636
1637 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
1638
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001639 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07001640
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001641 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001642
1643 -------------------------------------------------------------------------------*/
1644eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
1645
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001646/* ---------------------------------------------------------------------------
1647
1648 sme_ChangeMCCBeaconInterval
1649
1650 \brief To update P2P-GO's beacon Interval.
1651
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001652 \return eHalStatus SUCCESS
1653 FAILURE or RESOURCES
1654 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001655 -------------------------------------------------------------------------------*/
1656eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
1657
1658
Jeff Johnson295189b2012-06-20 16:38:30 -07001659
1660/* ---------------------------------------------------------------------------
1661 \fn sme_sendBTAmpEvent
1662 \brief API to send the btAMPstate to FW
1663 \param hHal - The handle returned by macOpen.
1664 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001665 \return eHalStatus SUCCESS
1666 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001667
1668--------------------------------------------------------------------------- */
1669
1670eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
1671
1672
1673
1674/* ---------------------------------------------------------------------------
1675 \fn sme_SetHostOffload
1676 \brief API to set the host offload feature.
1677 \param hHal - The handle returned by macOpen.
1678 \param pRequest - Pointer to the offload request.
1679 \return eHalStatus
1680 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001681eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
1682 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001683
1684/* ---------------------------------------------------------------------------
1685 \fn sme_SetKeepAlive
1686 \brief API to set the Keep Alive feature.
1687 \param hHal - The handle returned by macOpen.
1688 \param pRequest - Pointer to the Keep Alive request.
1689 \return eHalStatus
1690 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001691eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
1692 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001693
1694
1695/* ---------------------------------------------------------------------------
1696 \fn sme_AbortMacScan
1697 \brief API to cancel MAC scan.
1698 \param hHal - The handle returned by macOpen.
1699 \return VOS_STATUS
1700 VOS_STATUS_E_FAILURE - failure
1701 VOS_STATUS_SUCCESS success
1702 ---------------------------------------------------------------------------*/
1703eHalStatus sme_AbortMacScan(tHalHandle hHal);
1704
1705/* ----------------------------------------------------------------------------
1706 \fn sme_GetOperationChannel
1707 \brief API to get current channel on which STA is parked
1708 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001709 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07001710 \returns eHAL_STATUS_SUCCESS
1711 eHAL_STATUS_FAILURE
1712-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001713eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001714
Jeff Johnson295189b2012-06-20 16:38:30 -07001715/* ---------------------------------------------------------------------------
1716
1717 \fn sme_RegisterMgtFrame
1718
1719 \brief To register managment frame of specified type and subtype.
1720 \param frameType - type of the frame that needs to be passed to HDD.
1721 \param matchData - data which needs to be matched before passing frame
1722 to HDD.
1723 \param matchDataLen - Length of matched data.
1724 \return eHalStatus
1725 -------------------------------------------------------------------------------*/
1726eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1727 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
1728
1729/* ---------------------------------------------------------------------------
1730
1731 \fn sme_DeregisterMgtFrame
1732
1733 \brief To De-register managment frame of specified type and subtype.
1734 \param frameType - type of the frame that needs to be passed to HDD.
1735 \param matchData - data which needs to be matched before passing frame
1736 to HDD.
1737 \param matchDataLen - Length of matched data.
1738 \return eHalStatus
1739 -------------------------------------------------------------------------------*/
1740eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1741 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07001742
1743/* ---------------------------------------------------------------------------
1744
1745 \fn sme_ConfigureRxpFilter
1746
1747 \brief
1748 SME will pass this request to lower mac to set/reset the filter on RXP for
1749 multicast & broadcast traffic.
1750
1751 \param
1752
1753 hHal - The handle returned by macOpen.
1754
1755 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
1756 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
1757 on this param. In future we can use this as a mask to set various types of
1758 filters as suggested below:
1759 FILTER_ALL_MULTICAST:
1760 FILTER_ALL_BROADCAST:
1761 FILTER_ALL_MULTICAST_BROADCAST:
1762
1763
1764 \return eHalStatus
1765
1766
1767--------------------------------------------------------------------------- */
1768eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
1769 tpSirWlanSetRxpFilters wlanRxpFilterParam);
1770
1771/* ---------------------------------------------------------------------------
1772
1773 \fn sme_ConfigureAppsCpuWakeupState
1774
1775 \brief
1776 SME will pass this request to lower mac to dynamically adjusts the listen
1777 interval based on the WLAN/MSM activity. This feature is named as
1778 Telescopic Beacon wakeup feature.
1779
1780 \param
1781
1782 hHal - The handle returned by macOpen.
1783
1784 isAppsAwake- Depicts the state of the Apps CPU
1785
1786
1787 \return eHalStatus
1788
1789
1790--------------------------------------------------------------------------- */
1791eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
1792
Jeff Johnson295189b2012-06-20 16:38:30 -07001793/* ---------------------------------------------------------------------------
1794
1795 \fn sme_ConfigureSuspendInd
1796
1797 \brief
1798 SME will pass this request to lower mac to Indicate that the wlan needs to
1799 be suspended
1800
1801 \param
1802
1803 hHal - The handle returned by macOpen.
1804
1805 wlanSuspendParam- Depicts the wlan suspend params
1806
1807
1808 \return eHalStatus
1809
1810
1811--------------------------------------------------------------------------- */
1812eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
1813 tpSirWlanSuspendParam wlanSuspendParam);
1814
1815/* ---------------------------------------------------------------------------
1816
1817 \fn sme_ConfigureResumeReq
1818
1819 \brief
1820 SME will pass this request to lower mac to Indicate that the wlan needs to
1821 be Resumed
1822
1823 \param
1824
1825 hHal - The handle returned by macOpen.
1826
1827 wlanResumeParam- Depicts the wlan resume params
1828
1829
1830 \return eHalStatus
1831
1832
1833--------------------------------------------------------------------------- */
1834eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
1835 tpSirWlanResumeParam wlanResumeParam);
1836
Jeff Johnson295189b2012-06-20 16:38:30 -07001837
1838/* ---------------------------------------------------------------------------
1839
1840 \fn sme_GetInfraSessionId
1841
1842 \brief To get the session ID for infra session, if connected
1843 This is a synchronous API.
1844
1845 \param hHal - The handle returned by macOpen.
1846
1847 \return sessionid, -1 if infra session is not connected
1848
1849 -------------------------------------------------------------------------------*/
1850tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
1851
1852/* ---------------------------------------------------------------------------
1853
1854 \fn sme_GetInfraOperationChannel
1855
1856 \brief To get the operating channel for infra session, if connected
1857 This is a synchronous API.
1858
1859 \param hHal - The handle returned by macOpen.
1860 \param sessionId - the sessionId returned by sme_OpenSession.
1861
1862 \return operating channel, 0 if infra session is not connected
1863
1864 -------------------------------------------------------------------------------*/
1865tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
1866/* ---------------------------------------------------------------------------
1867
1868 \fn sme_GetConcurrentOperationChannel
1869
1870 \brief To get the operating channel for other concurrent sessions, if connected
1871 This is a synchronous API.
1872
1873 \param hHal - The handle returned by macOpen.
1874 \param currentPersona - persona that is trying to come up.
1875
1876 \return operating channel, 0 if infra session is not connected
1877
1878 -------------------------------------------------------------------------------*/
1879tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
1880
1881/* ---------------------------------------------------------------------------
1882 \fn sme_AbortMacScan
1883 \brief API to cancel MAC scan.
1884 \param hHal - The handle returned by macOpen.
1885 \return VOS_STATUS
1886 VOS_STATUS_E_FAILURE - failure
1887 VOS_STATUS_SUCCESS success
1888 ---------------------------------------------------------------------------*/
1889eHalStatus sme_AbortMacScan(tHalHandle hHal);
1890
1891/* ---------------------------------------------------------------------------
1892 \fn sme_GetCfgValidChannels
1893 \brief API to get valid channel list
1894 \param hHal - The handle returned by macOpen.
1895 \param aValidChannels - Pointer to the valid channel list
1896 \param len - valid channel list length
1897 \return eHalStatus
1898 ---------------------------------------------------------------------------*/
1899eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
1900
1901#ifdef FEATURE_WLAN_SCAN_PNO
1902
1903/* ---------------------------------------------------------------------------
1904 \fn sme_SetPreferredNetworkList
1905 \brief API to set the Preferred Network List Offload feature.
1906 \param hHal - The handle returned by macOpen.
1907 \param pRequest - Pointer to the offload request.
1908 \return eHalStatus
1909 ---------------------------------------------------------------------------*/
1910eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
1911
1912/* ---------------------------------------------------------------------------
1913 \fn sme_SetRSSIFilter
1914 \brief API to set RSSI Filter feature.
1915 \param hHal - The handle returned by macOpen.
1916 \param pRequest - Pointer to the offload request.
1917 \return eHalStatus
1918 ---------------------------------------------------------------------------*/
1919eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
1920
1921/******************************************************************************
1922*
1923* Name: sme_PreferredNetworkFoundInd
1924*
1925* Description:
1926* Invoke Preferred Network Found Indication
1927*
1928* Parameters:
1929* hHal - HAL handle for device
1930* pMsg - found network description
1931*
1932* Returns: eHalStatus
1933*
1934******************************************************************************/
1935eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
1936#endif // FEATURE_WLAN_SCAN_PNO
1937
1938/* ---------------------------------------------------------------------------
1939 \fn sme_SetPowerParams
1940 \brief API to set Power Parameters
1941 \param hHal - The handle returned by macOpen.
1942 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08001943 \param forced - if true, not to be dropped silently in host, it must reach
1944 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
1945 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07001946 \return eHalStatus
1947 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08001948eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07001949
1950/* ---------------------------------------------------------------------------
1951 \fn sme_SetTxPerTracking
1952 \brief Set Tx PER tracking configuration parameters
1953 \param hHal - The handle returned by macOpen.
1954 \param pTxPerTrackingParam - Tx PER configuration parameters
1955 \return eHalStatus
1956 ---------------------------------------------------------------------------*/
1957eHalStatus sme_SetTxPerTracking (
1958 tHalHandle hHal,
1959 void (*pCallbackfn) (void *pCallbackContext),
1960 void *pCallbackContext,
1961 tpSirTxPerTrackingParam pTxPerTrackingParam);
1962
1963#ifdef WLAN_FEATURE_PACKET_FILTERING
1964/* ---------------------------------------------------------------------------
1965 \fn sme_ReceiveFilterSetFilter
1966 \brief API to set 8023 Multicast Address List
1967 \param hHal - The handle returned by macOpen.
1968 \param pMulticastAddrs - Pointer to the Multicast Address List
1969 \return eHalStatus
1970 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08001971eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07001972
1973/* ---------------------------------------------------------------------------
1974 \fn sme_ReceiveFilterSetFilter
1975 \brief API to set Receive Packet Filter
1976 \param hHal - The handle returned by macOpen.
1977 \param pRcvPktFilterCfg - Receive Packet Filter parameter
1978 \return eHalStatus
1979 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001980eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
1981 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001982
1983/* ---------------------------------------------------------------------------
1984 \fn sme_GetFilterMatchCount
1985 \brief API to get D0 PC Filter Match Count
1986 \param hHal - The handle returned by macOpen
1987 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
1988 \param callbackContext - Cookie to be passed back during callback
1989 \return eHalStatus
1990 ---------------------------------------------------------------------------*/
1991eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
1992 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001993 void *callbackContext,
1994 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001995
1996/* ---------------------------------------------------------------------------
1997 \fn sme_ReceiveFilterClearFilter
1998 \brief API to clear Receive Packet Filter
1999 \param hHal - The handle returned by macOpen.
2000 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2001 \return eHalStatus
2002 ---------------------------------------------------------------------------*/
2003eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002004 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2005 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002006#endif // WLAN_FEATURE_PACKET_FILTERING
2007/* ---------------------------------------------------------------------------
2008
2009 \fn sme_IsChannelValid
2010 \brief To check if the channel is valid for currently established domain
2011 This is a synchronous API.
2012
2013 \param hHal - The handle returned by macOpen.
2014 \param channel - channel to verify
2015
2016 \return TRUE/FALSE, TRUE if channel is valid
2017
2018 -------------------------------------------------------------------------------*/
2019tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2020
2021/* ---------------------------------------------------------------------------
2022 \fn sme_SetFreqBand
2023 \brief Used to set frequency band.
2024 \param hHal
2025 \eBand band value to be configured
2026 \- return eHalStatus
2027 -------------------------------------------------------------------------*/
2028eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2029
2030/* ---------------------------------------------------------------------------
2031 \fn sme_GetFreqBand
2032 \brief Used to get the current band settings.
2033 \param hHal
2034 \pBand pointer to hold the current band value
2035 \- return eHalStatus
2036 -------------------------------------------------------------------------*/
2037eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2038
2039/* ---------------------------------------------------------------------------
2040
2041 \fn sme_SetTxPerTracking
2042 \brief Set Tx PER tracking configuration parameters
2043 \param hHal - The handle returned by macOpen.
2044 \param pTxPerTrackingParam - Tx PER configuration parameters
2045 \return eHalStatus
2046 ---------------------------------------------------------------------------*/
2047eHalStatus sme_SetTxPerTracking (
2048 tHalHandle hHal,
2049 void (*pCallbackfn) (void *pCallbackContext),
2050 void *pCallbackContext,
2051 tpSirTxPerTrackingParam pTxPerTrackingParam);
2052
2053#ifdef WLAN_FEATURE_GTK_OFFLOAD
2054/* ---------------------------------------------------------------------------
2055 \fn sme_SetGTKOffload
2056 \brief API to set GTK offload feature.
2057 \param hHal - The handle returned by macOpen.
2058 \param pRequest - Pointer to the GTK offload request.
2059 \return eHalStatus
2060 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002061eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002062
2063/* ---------------------------------------------------------------------------
2064 \fn sme_GetGTKOffload
2065 \brief API to get GTK offload information.
2066 \param hHal - The handle returned by macOpen.
2067 \param pRequest - Pointer to the GTK offload response.
2068 \return eHalStatus
2069 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002070eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2071 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002072#endif // WLAN_FEATURE_GTK_OFFLOAD
2073
2074#ifdef WLAN_WAKEUP_EVENTS
2075eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2076#endif // WLAN_WAKEUP_EVENTS
2077
2078/* ---------------------------------------------------------------------------
2079 \fn sme_SetTxPerTracking
2080 \brief Set Tx PER tracking configuration parameters
2081 \param hHal - The handle returned by macOpen.
2082 \param pTxPerTrackingParam - Tx PER configuration parameters
2083 \return eHalStatus
2084 ---------------------------------------------------------------------------*/
2085eHalStatus sme_SetTxPerTracking (
2086 tHalHandle hHal,
2087 void (*pCallbackfn) (void *pCallbackContext),
2088 void *pCallbackContext,
2089 tpSirTxPerTrackingParam pTxPerTrackingParam);
2090
2091
2092//return frequency for a particular channel
2093tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2094
2095tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2096
2097#if defined WLAN_FEATURE_P2P_INTERNAL
2098
2099eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2100
2101/* ---------------------------------------------------------------------------
2102 \fn sme_p2pFlushDeviceList
2103 \brief Remove cached P2P result from scan results
2104 \param hHal - The handle returned by macOpen.
2105 \param HDDSessionId - HDD's sessionId. Currently unused.
2106 \return eHalStatus
2107 ---------------------------------------------------------------------------*/
2108eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2109
2110eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2111 tCsrScanResultFilter *pFilter);
2112
2113#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2114
2115/* ---------------------------------------------------------------------------
2116 \fn sme_SetMaxTxPower
2117 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2118 setting will not persist over reboots
2119 \param hHal
2120 \param pBssid BSSID to set the power cap for
2121 \param pBssid pSelfMacAddress self MAC Address
2122 \param pBssid power to set in dB
2123 \- return eHalStatus
2124 -------------------------------------------------------------------------*/
2125eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2126 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2127
Jeff Johnson295189b2012-06-20 16:38:30 -07002128/* ---------------------------------------------------------------------------
2129
schang86c22c42013-03-13 18:41:24 -07002130 \fn sme_SetTxPower
2131
2132 \brief Set Transmit Power dynamically. Note: this setting will
2133 not persist over reboots.
2134
2135 \param hHal
2136 \param sessionId Target Session ID
2137 \param mW power to set in mW
2138 \- return eHalStatus
2139
2140 -------------------------------------------------------------------------------*/
2141eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2142
2143/* ---------------------------------------------------------------------------
2144
Jeff Johnson295189b2012-06-20 16:38:30 -07002145 \fn sme_HideSSID
2146
2147 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2148 not persist over reboots.
2149
2150 \param hHal
2151 \param sessionId
2152 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2153 \- return eHalStatus
2154
2155 -------------------------------------------------------------------------------*/
2156eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002157
2158/* ---------------------------------------------------------------------------
2159
2160 \fn sme_SetTmLevel
2161 \brief Set Thermal Mitigation Level to RIVA
2162 \param hHal - The handle returned by macOpen.
2163 \param newTMLevel - new Thermal Mitigation Level
2164 \param tmMode - Thermal Mitigation handle mode, default 0
2165 \return eHalStatus
2166 ---------------------------------------------------------------------------*/
2167eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2168
2169/*---------------------------------------------------------------------------
2170
2171 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2172 Host and FW.
2173
2174 \param hHal - HAL handle for device
2175
2176 \return NONE
2177
2178---------------------------------------------------------------------------*/
2179void sme_featureCapsExchange(tHalHandle hHal);
2180
Jeff Johnsond13512a2012-07-17 11:42:19 -07002181/*---------------------------------------------------------------------------
2182
Yathish9f22e662012-12-10 14:21:35 -08002183 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2184 between in Host.
2185
2186 \param hHal - HAL handle for device
2187
2188 \return NONE
2189
2190---------------------------------------------------------------------------*/
2191void sme_disableFeatureCapablity(tANI_U8 feature_index);
2192
2193/*---------------------------------------------------------------------------
2194
Jeff Johnsond13512a2012-07-17 11:42:19 -07002195 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2196 country code
2197 Host and FW.
2198
2199 \param hHal - HAL handle for device
2200 \param pCountry - pointer to country code
2201
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002202 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002203
2204 ---------------------------------------------------------------------------*/
2205eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2206
2207/*---------------------------------------------------------------------------
2208
2209 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2210 country code.
2211
2212 \param hHal - HAL handle for device
2213 \param pCountry - pointer to country code
2214
2215 \return Success or failure
2216
2217 ---------------------------------------------------------------------------*/
2218eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2219
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002220/* ---------------------------------------------------------------------------
2221 \fn sme_transportDebug
2222 \brief Dynamically monitoring Transport channels
2223 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002224 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002225 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002226 \param toggleStallDetect Enable stall detect feature
2227 This feature will take effect to data performance
2228 Not integrate till fully verification
2229 \- return NONE
2230 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002231void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002232
Kiran4a17ebe2013-01-31 10:43:43 -08002233/* ---------------------------------------------------------------------------
2234 \fn sme_ResetPowerValuesFor5G
2235 \brief Reset the power values for 5G band with NV power values.
2236 \param hHal - HAL handle for device
2237 \- return NONE
2238 -------------------------------------------------------------------------*/
2239void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2240
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002241#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
2242/* ---------------------------------------------------------------------------
2243 \fn sme_UpdateRoamPrefer5GHz
2244 \brief enable/disable Roam prefer 5G runtime option
2245 This function is called through dynamic setConfig callback function
2246 to configure the Roam prefer 5G runtime option
2247 \param hHal - HAL handle for device
2248 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2249 \- return Success or failure
2250 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002251eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002252
2253/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002254 \fn sme_setRoamIntraBand
2255 \brief enable/disable Intra band roaming
2256 This function is called through dynamic setConfig callback function
2257 to configure the intra band roaming
2258 \param hHal - HAL handle for device
2259 \param nRoamIntraBand Enable/Disable Intra band roaming
2260 \- return Success or failure
2261 -------------------------------------------------------------------------*/
2262eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2263
2264/* ---------------------------------------------------------------------------
2265 \fn sme_getRoamIntraBand
2266 \brief get Intra band roaming
2267 \param hHal - HAL handle for device
2268 \- return Success or failure
2269 -------------------------------------------------------------------------*/
2270v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2271
2272/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002273 \fn sme_UpdateImmediateRoamRssiDiff
2274 \brief Update nImmediateRoamRssiDiff
2275 This function is called through dynamic setConfig callback function
2276 to configure nImmediateRoamRssiDiff
2277 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2278 \param hHal - HAL handle for device
2279 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2280 candidate and current AP.
2281 \- return Success or failure
2282 -------------------------------------------------------------------------*/
2283
2284eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002285
Srinivas Girigowdade697412013-02-14 16:31:48 -08002286/* ---------------------------------------------------------------------------
2287 \fn sme_UpdateRoamRssiDiff
2288 \brief Update RoamRssiDiff
2289 This function is called through dynamic setConfig callback function
2290 to configure RoamRssiDiff
2291 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2292 \param hHal - HAL handle for device
2293 \param RoamRssiDiff - minimum rssi difference between potential
2294 candidate and current AP.
2295 \- return Success or failure
2296 -------------------------------------------------------------------------*/
2297
2298eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2299
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002300/*--------------------------------------------------------------------------
2301 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2302 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2303 isFastTransitionEnabled.
2304 This is a synchronuous call
2305 \param hHal - The handle returned by macOpen.
2306 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2307 Other status means SME is failed to update isFastTransitionEnabled.
2308 \sa
2309 --------------------------------------------------------------------------*/
2310
2311eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2312 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002313
2314/* ---------------------------------------------------------------------------
2315 \fn sme_UpdateWESMode
2316 \brief Update WESMode
2317 This function is called through dynamic setConfig callback function
2318 to configure isWESModeEnabled
2319 \param hHal - HAL handle for device
2320 \param isWESModeEnabled - Enable/Disable WES Mode
2321 \- return Success or failure
2322 -------------------------------------------------------------------------*/
2323eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2324
2325/* ---------------------------------------------------------------------------
2326 \fn sme_SetRoamScanControl
2327 \brief Set roam scan control
2328 This function is called to set roam scan control
2329 if roam scan control is set to 0, roaming scan cache is cleared
2330 any value other than 0 is treated as invalid value
2331 \param hHal - HAL handle for device
2332 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2333 Other status means SME failure to update
2334 -------------------------------------------------------------------------*/
2335eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002336#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_CCX) || (FEATURE_WLAN_LFR) */
2337
2338#ifdef FEATURE_WLAN_LFR
2339/*--------------------------------------------------------------------------
2340 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002341 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002342 isFastRoamIniFeatureEnabled.
2343 This is a synchronuous call
2344 \param hHal - The handle returned by macOpen.
2345 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2346 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2347 \sa
2348 --------------------------------------------------------------------------*/
2349
Srinivas Girigowdade697412013-02-14 16:31:48 -08002350eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002351 const v_BOOL_t isFastRoamIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002352#endif /* FEATURE_WLAN_LFR */
2353
2354#ifdef FEATURE_WLAN_CCX
2355/*--------------------------------------------------------------------------
2356 \brief sme_UpdateIsCcxFeatureEnabled() - enable/disable CCX support at runtime
2357 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2358 isCcxIniFeatureEnabled.
2359 This is a synchronuous call
2360 \param hHal - The handle returned by macOpen.
2361 \return eHAL_STATUS_SUCCESS - SME update isCcxIniFeatureEnabled config successfully.
2362 Other status means SME is failed to update isCcxIniFeatureEnabled.
2363 \sa
2364 --------------------------------------------------------------------------*/
2365
2366eHalStatus sme_UpdateIsCcxFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002367 const v_BOOL_t isCcxIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002368
2369#endif /* FEATURE_WLAN_CCX */
2370
2371/*--------------------------------------------------------------------------
2372 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2373 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2374 fEnableFwRssiMonitoring.
2375 This is a synchronuous call
2376 \param hHal - The handle returned by macOpen.
2377 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2378 Other status means SME is failed to update
2379 \sa
2380 --------------------------------------------------------------------------*/
2381
2382eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2383 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002384
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002385#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002386/*--------------------------------------------------------------------------
2387 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2388 This is a synchronuous call
2389 \param hHal - The handle returned by macOpen.
2390 \return eHAL_STATUS_SUCCESS - SME update config successful.
2391 Other status means SME is failed to update
2392 \sa
2393 --------------------------------------------------------------------------*/
2394eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2395 v_U8_t neighborLookupRssiThreshold);
2396
2397/*--------------------------------------------------------------------------
2398 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2399 This is a synchronuous call
2400 \param hHal - The handle returned by macOpen.
2401 \return eHAL_STATUS_SUCCESS - SME update config successful.
2402 Other status means SME is failed to update
2403 \sa
2404 --------------------------------------------------------------------------*/
2405eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2406 v_U8_t neighborReassocRssiThreshold);
2407
2408/*--------------------------------------------------------------------------
2409 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2410 This is a synchronuous call
2411 \param hHal - The handle returned by macOpen.
2412 \return eHAL_STATUS_SUCCESS - SME update config successful.
2413 Other status means SME is failed to update
2414 \sa
2415 --------------------------------------------------------------------------*/
2416v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2417
2418/*--------------------------------------------------------------------------
2419 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2420 This is a synchronuous call
2421 \param hHal - The handle returned by macOpen.
2422 \return eHAL_STATUS_SUCCESS - SME update config successful.
2423 Other status means SME is failed to update
2424 \sa
2425 --------------------------------------------------------------------------*/
2426eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2427 v_U16_t neighborScanResultsRefreshPeriod);
2428
2429/*--------------------------------------------------------------------------
2430 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2431 This is a synchronuous call
2432 \param hHal - The handle returned by macOpen.
2433 \return eHAL_STATUS_SUCCESS - SME update config successful.
2434 Other status means SME is failed to update
2435 \sa
2436 --------------------------------------------------------------------------*/
2437v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2438
2439/*--------------------------------------------------------------------------
2440 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2441 This is a synchronuous call
2442 \param hHal - The handle returned by macOpen.
2443 \return eHAL_STATUS_SUCCESS - SME update config successful.
2444 Other status means SME is failed to update
2445 \sa
2446 --------------------------------------------------------------------------*/
2447v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2448
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002449/* ---------------------------------------------------------------------------
2450 \fn sme_UpdateEmptyScanRefreshPeriod
2451 \brief Update nEmptyScanRefreshPeriod
2452 This function is called through dynamic setConfig callback function
2453 to configure nEmptyScanRefreshPeriod
2454 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2455 \param hHal - HAL handle for device
2456 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2457 \- return Success or failure
2458 -------------------------------------------------------------------------*/
2459eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2460
2461/* ---------------------------------------------------------------------------
2462 \fn sme_setNeighborScanMinChanTime
2463 \brief Update nNeighborScanMinChanTime
2464 This function is called through dynamic setConfig callback function
2465 to configure gNeighborScanChannelMinTime
2466 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2467 \param hHal - HAL handle for device
2468 \param nNeighborScanMinChanTime - Channel minimum dwell time
2469 \- return Success or failure
2470 -------------------------------------------------------------------------*/
2471eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2472
2473/* ---------------------------------------------------------------------------
2474 \fn sme_setNeighborScanMaxChanTime
2475 \brief Update nNeighborScanMaxChanTime
2476 This function is called through dynamic setConfig callback function
2477 to configure gNeighborScanChannelMaxTime
2478 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2479 \param hHal - HAL handle for device
2480 \param nNeighborScanMinChanTime - Channel maximum dwell time
2481 \- return Success or failure
2482 -------------------------------------------------------------------------*/
2483eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2484
2485/* ---------------------------------------------------------------------------
2486 \fn sme_getNeighborScanMinChanTime
2487 \brief get neighbor scan min channel time
2488 \param hHal - The handle returned by macOpen.
2489 \return v_U16_t - channel min time value
2490 -------------------------------------------------------------------------*/
2491v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2492
2493/* ---------------------------------------------------------------------------
2494 \fn sme_getNeighborScanMaxChanTime
2495 \brief get neighbor scan max channel time
2496 \param hHal - The handle returned by macOpen.
2497 \return v_U16_t - channel max time value
2498 -------------------------------------------------------------------------*/
2499v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
2500
2501/* ---------------------------------------------------------------------------
2502 \fn sme_setNeighborScanPeriod
2503 \brief Update nNeighborScanPeriod
2504 This function is called through dynamic setConfig callback function
2505 to configure nNeighborScanPeriod
2506 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
2507 \param hHal - HAL handle for device
2508 \param nNeighborScanPeriod - neighbor scan period
2509 \- return Success or failure
2510 -------------------------------------------------------------------------*/
2511eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
2512
2513/* ---------------------------------------------------------------------------
2514 \fn sme_getNeighborScanPeriod
2515 \brief get neighbor scan period
2516 \param hHal - The handle returned by macOpen.
2517 \return v_U16_t - neighbor scan period
2518 -------------------------------------------------------------------------*/
2519v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
2520
2521#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08002522
2523#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
2524/*--------------------------------------------------------------------------
2525 \brief sme_getRoamRssiDiff() - get Roam rssi diff
2526 This is a synchronuous call
2527 \param hHal - The handle returned by macOpen.
2528 \return eHAL_STATUS_SUCCESS - SME update config successful.
2529 Other status means SME is failed to update
2530 \sa
2531 --------------------------------------------------------------------------*/
2532v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
2533
2534/*--------------------------------------------------------------------------
2535 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
2536 This is a synchronuous call
2537 \param hHal - The handle returned by macOpen.
2538 \return eHAL_STATUS_SUCCESS - SME update config successful.
2539 Other status means SME is failed to update
2540 \sa
2541 --------------------------------------------------------------------------*/
2542eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2543 tANI_U8 numChannels);
2544
2545/*--------------------------------------------------------------------------
2546 \brief sme_ChangeCountryValidChannelListByRevision() - Change Korea valid channel list
2547 based on country revision number
2548 This is a synchronuous call
2549 \param hHal - The handle returned by macOpen.
2550 \return eHAL_STATUS_SUCCESS - SME update config successful.
2551 Other status means SME is failed to update
2552 \sa
2553 --------------------------------------------------------------------------*/
2554eHalStatus sme_ChangeCountryValidChannelListByRevision(tHalHandle hHal,
2555 tANI_U8 Revision);
2556
2557/*--------------------------------------------------------------------------
2558 \brief csrUpdateBgScanConfigIniChannelList() - Update bgscan roam cache
2559 This is a synchronuous call
2560 \param hHal - The handle returned by macOpen.
2561 \return eHAL_STATUS_SUCCESS - SME update config successful.
2562 Other status means SME is failed to update
2563 \sa
2564 --------------------------------------------------------------------------*/
2565eHalStatus sme_UpdateBgScanConfigIniChannelList(tHalHandle hHal,
2566 eCsrBand eBand);
2567
2568
2569/*--------------------------------------------------------------------------
2570 \brief sme_getRoamScanChannelList() - get roam scan channel list
2571 This is a synchronuous call
2572 \param hHal - The handle returned by macOpen.
2573 \return eHAL_STATUS_SUCCESS - SME update config successful.
2574 Other status means SME is failed to update
2575 \sa
2576 --------------------------------------------------------------------------*/
2577eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2578 tANI_U8 *pNumChannels);
2579
2580/*--------------------------------------------------------------------------
2581 \brief sme_GetCountryRevision() - get Country revision index
2582 This is a synchronuous call
2583 \param hHal - The handle returned by macOpen.
2584 \return eHAL_STATUS_SUCCESS - SME update config successful.
2585 Other status means SME is failed to update
2586 \sa
2587 --------------------------------------------------------------------------*/
2588eHalStatus sme_GetCountryRevision(tHalHandle hHal, tANI_U8 *pRevision);
2589
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002590/*--------------------------------------------------------------------------
2591 \brief sme_getIsCcxFeatureEnabled() - get CCX feature enabled or not
2592 This is a synchronuous call
2593 \param hHal - The handle returned by macOpen.
2594 \return TRUE (1) - if the CCX feature is enabled
2595 FALSE (0) - if feature is disabled (compile or runtime)
2596 \sa
2597 --------------------------------------------------------------------------*/
2598tANI_BOOLEAN sme_getIsCcxFeatureEnabled(tHalHandle hHal);
2599
2600/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002601 \brief sme_getWESMode() - getWES Mode
2602 This is a synchronous call
2603 \param hHal - The handle returned by macOpen.
2604 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
2605 \sa
2606 --------------------------------------------------------------------------*/
2607v_BOOL_t sme_GetWESMode(tHalHandle hHal);
2608
2609/*--------------------------------------------------------------------------
2610 \brief sme_GetRoamScanControl() - get scan control
2611 This is a synchronous call
2612 \param hHal - The handle returned by macOpen.
2613 \return v_BOOL_t - Enabled(1)/Disabled(0)
2614 \sa
2615 --------------------------------------------------------------------------*/
2616v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
2617
2618/* ---------------------------------------------------------------------------
2619 \fn sme_UpdateEmptyScanRefreshPeriod
2620 \brief Update nnEmptyScanRefreshPeriod
2621 This function is called through dynamic setConfig callback function
2622 to configure nnEmptyScanRefreshPeriod
2623 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2624 \param hHal - HAL handle for device
2625 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2626 \- return Success or failure
2627 -------------------------------------------------------------------------*/
2628
2629/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002630 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
2631 This is a synchronuous call
2632 \param hHal - The handle returned by macOpen.
2633 \return TRUE (1) - if the feature is enabled
2634 FALSE (0) - if feature is disabled (compile or runtime)
2635 \sa
2636 --------------------------------------------------------------------------*/
2637tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
2638
2639/*--------------------------------------------------------------------------
2640 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
2641 This is a synchronuous call
2642 \param hHal - The handle returned by macOpen.
2643 \return TRUE (1) - if the feature is enabled
2644 FALSE (0) - if feature is disabled (compile or runtime)
2645 \sa
2646 --------------------------------------------------------------------------*/
2647tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
2648
Srinivas Girigowdade697412013-02-14 16:31:48 -08002649#endif
2650
2651/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002652 \fn sme_IsFeatureSupportedByFW
2653 \brief Check if an feature is enabled by FW
2654
2655 \param feattEnumValue - Enumeration value of the feature to be checked.
2656 A value from enum placeHolderInCapBitmap
2657
2658 \- return 1/0 (TRUE/FALSE)
2659 -------------------------------------------------------------------------*/
2660tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
2661#ifdef FEATURE_WLAN_TDLS
2662/* ---------------------------------------------------------------------------
2663 \fn sme_SendTdlsMgmtFrame
2664 \brief API to send TDLS management frames.
2665
2666 \param peerMac - peer's Mac Adress.
2667 \param frame_type - Type of TDLS mgmt frame to be sent.
2668 \param dialog - dialog token used in the frame.
2669 \param status - status to be incuded in the frame.
2670 \param buf - additional IEs to be included
2671 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08002672 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002673 \- return VOS_STATUS_SUCCES
2674 -------------------------------------------------------------------------*/
2675VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Hoonki Leea34dd892013-02-05 22:56:02 -08002676 tANI_U8 frame_type, tANI_U8 dialog, tANI_U16 status, tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002677/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08002678 \fn sme_ChangeTdlsPeerSta
2679 \brief API to Update TDLS peer sta parameters.
2680
2681 \param peerMac - peer's Mac Adress.
2682 \param staParams - Peer Station Parameters.
2683 \- return VOS_STATUS_SUCCES
2684 -------------------------------------------------------------------------*/
2685VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
2686 tCsrStaParams *pstaParams);
2687/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002688 \fn sme_AddTdlsPeerSta
2689 \brief API to Add TDLS peer sta entry.
2690
2691 \param peerMac - peer's Mac Adress.
2692 \- return VOS_STATUS_SUCCES
2693 -------------------------------------------------------------------------*/
2694VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2695/* ---------------------------------------------------------------------------
2696 \fn sme_DeleteTdlsPeerSta
2697 \brief API to Delete TDLS peer sta entry.
2698
2699 \param peerMac - peer's Mac Adress.
2700 \- return VOS_STATUS_SUCCES
2701 -------------------------------------------------------------------------*/
2702VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07002703/* ---------------------------------------------------------------------------
2704 \fn sme_IsPmcBmps
2705 \brief API to Check if PMC state is BMPS.
2706
2707 \- return v_BOOL_t
2708 -------------------------------------------------------------------------*/
2709v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07002710/* ---------------------------------------------------------------------------
2711 \fn sme_SetTdlsPowerSaveProhibited
2712 \API to set/reset the isTdlsPowerSaveProhibited.
2713
2714 \- return void
2715 -------------------------------------------------------------------------*/
2716void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002717#endif
2718#ifdef FEATURE_WLAN_TDLS_INTERNAL
2719typedef struct smeTdlsDisResult
2720{
2721 tSirMacAddr tdlsPeerMac;
2722 v_S7_t tdlsPeerRssi;
2723} tSmeTdlsDisResult;
2724
2725VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2726v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
2727 tSmeTdlsDisResult *disResult, v_U8_t listType);
2728VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2729VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2730
2731#endif /* FEATURE_WLAN_TDLS */
2732
Jeff Johnson295189b2012-06-20 16:38:30 -07002733#endif //#if !defined( __SME_API_H )