blob: b76959a596ccfb61aafd28eacf1dbbcc12147d6e [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,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301410 void* pVosContext,
1411 tAniBool countryFromUserSpace );
Jeff Johnson295189b2012-06-20 16:38:30 -07001412
1413
1414/* ---------------------------------------------------------------------------
1415 \fn sme_BtcSignalBtEvent
1416 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1417 BT event type and the current operating mode of Libra (full power,
1418 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1419 would be employed.
1420 \param hHal - The handle returned by macOpen.
1421 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1422 Caller owns the memory and is responsible for freeing it.
1423 \return VOS_STATUS
1424 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1425 if driver has not yet been initialized or if BTC
1426 Events Layer has been disabled.
1427 VOS_STATUS_SUCCESS BT Event passed to HAL
1428 ---------------------------------------------------------------------------*/
1429VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1430
1431/* ---------------------------------------------------------------------------
1432 \fn sme_BtcSetConfig
1433 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1434 This function should be invoked only after CFG download has completed.
1435 Calling it after sme_HDDReadyInd is recommended.
1436 \param hHal - The handle returned by macOpen.
1437 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1438 tSmeBtcConfig. Caller owns the memory and is responsible
1439 for freeing it.
1440 \return VOS_STATUS
1441 VOS_STATUS_E_FAILURE Config not passed to HAL.
1442 VOS_STATUS_SUCCESS Config passed to HAL
1443 ---------------------------------------------------------------------------*/
1444VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1445
1446/* ---------------------------------------------------------------------------
1447 \fn sme_BtcGetConfig
1448 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1449 \param hHal - The handle returned by macOpen.
1450 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1451 Caller owns the memory and is responsible for freeing it.
1452 \return VOS_STATUS
1453 VOS_STATUS_E_FAILURE - failure
1454 VOS_STATUS_SUCCESS success
1455 ---------------------------------------------------------------------------*/
1456VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1457
1458/* ---------------------------------------------------------------------------
1459 \fn sme_SetCfgPrivacy
1460 \brief API to set configure privacy parameters
1461 \param hHal - The handle returned by macOpen.
1462 \param pProfile - Pointer CSR Roam profile.
1463 \param fPrivacy - This parameter indicates status of privacy
1464
1465 \return void
1466 ---------------------------------------------------------------------------*/
1467void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1468
1469#if defined WLAN_FEATURE_VOWIFI
1470/* ---------------------------------------------------------------------------
1471 \fn sme_NeighborReportRequest
1472 \brief API to request neighbor report.
1473 \param hHal - The handle returned by macOpen.
1474 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1475 tRrmNeighborReq. Caller owns the memory and is responsible
1476 for freeing it.
1477 \return VOS_STATUS
1478 VOS_STATUS_E_FAILURE - failure
1479 VOS_STATUS_SUCCESS success
1480 ---------------------------------------------------------------------------*/
1481VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1482 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1483#endif
1484
1485//The following are debug APIs to support direct read/write register/memory
1486//They are placed in SME because HW cannot be access when in LOW_POWER state
1487//AND not connected. The knowledge and synchronization is done in SME
1488
1489//sme_DbgReadRegister
1490//Caller needs to validate the input values
1491VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1492
1493//sme_DbgWriteRegister
1494//Caller needs to validate the input values
1495VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1496
1497//sme_DbgReadMemory
1498//Caller needs to validate the input values
1499//pBuf caller allocated buffer has the length of nLen
1500VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1501
1502//sme_DbgWriteMemory
1503//Caller needs to validate the input values
1504VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1505
Jeff Johnson295189b2012-06-20 16:38:30 -07001506VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1507 tSirVersionType *pVersion);
1508VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1509 tSirVersionType *pVersion);
1510VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1511 tANI_U8 *pVersion,
1512 tANI_U32 versionBufferSize);
1513VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1514 tANI_U8 *pVersion,
1515 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001516eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1517 csrRoamCompleteCallback callback,
1518 void *pContext);
1519
1520#ifdef FEATURE_WLAN_WAPI
1521/* ---------------------------------------------------------------------------
1522 \fn sme_RoamSetBKIDCache
1523 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1524 candidate list.
1525 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1526 it is opened (by calling halOpen).
1527 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1528 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1529 when retruning, this is the number of items put into pBKIDCache
1530 \return eHalStatus - when fail, it usually means the buffer allocated is not
1531 big enough and pNumItems has the number of tBkidCacheInfo.
1532 ---------------------------------------------------------------------------*/
1533eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1534 tANI_U32 numItems );
1535
1536/* ---------------------------------------------------------------------------
1537 \fn sme_RoamGetBKIDCache
1538 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1539 BKID cache.
1540 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1541 it is opened (by calling halOpen).
1542 \param pNum - caller allocated memory that has the space of the number of
1543 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1544 in SME cache.
1545 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1546 upon return
1547 \return eHalStatus - when fail, it usually means the buffer allocated is not
1548 big enough.
1549 ---------------------------------------------------------------------------*/
1550eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1551 tBkidCacheInfo *pBkidCache);
1552
1553/* ---------------------------------------------------------------------------
1554 \fn sme_RoamGetNumBKIDCache
1555 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1556 number of BKID cache entries.
1557 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1558 it is opened (by calling halOpen).
1559 \return tANI_U32 - the number of BKID cache entries.
1560 ---------------------------------------------------------------------------*/
1561tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1562
1563/* ---------------------------------------------------------------------------
1564 \fn sme_ScanGetBKIDCandidateList
1565 \brief a wrapper function to return the BKID candidate list
1566 \param pBkidList - caller allocated buffer point to an array of
1567 tBkidCandidateInfo
1568 \param pNumItems - pointer to a variable that has the number of
1569 tBkidCandidateInfo allocated when retruning, this is
1570 either the number needed or number of items put into
1571 pPmkidList
1572 \return eHalStatus - when fail, it usually means the buffer allocated is not
1573 big enough and pNumItems
1574 has the number of tBkidCandidateInfo.
1575 \Note: pNumItems is a number of tBkidCandidateInfo,
1576 not sizeof(tBkidCandidateInfo) * something
1577 ---------------------------------------------------------------------------*/
1578eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1579 tBkidCandidateInfo *pBkidList,
1580 tANI_U32 *pNumItems );
1581#endif /* FEATURE_WLAN_WAPI */
1582
Jeff Johnsone7245742012-09-05 17:12:55 -07001583#ifdef FEATURE_OEM_DATA_SUPPORT
1584/********************************************************************************************
1585 Oem data related modifications
1586*********************************************************************************************/
1587/* ---------------------------------------------------------------------------
1588 \fn sme_OemDataReq
1589 \param sessionId - session id of session to be used for oem data req.
1590 \param pOemDataReqID - pointer to an object to get back the request ID
1591 \param callback - a callback function that is called upon finish
1592 \param pContext - a pointer passed in for the callback
1593 \return eHalStatus
1594 ---------------------------------------------------------------------------*/
1595eHalStatus sme_OemDataReq(tHalHandle hHal,
1596 tANI_U8 sessionId,
1597 tOemDataReqConfig *,
1598 tANI_U32 *pOemDataReqID,
1599 oemData_OemDataReqCompleteCallback callback,
1600 void *pContext);
1601
1602/* ---------------------------------------------------------------------------
1603 \fn sme_getOemDataRsp
1604 \param pOemDataRsp - A pointer to the response object
1605 \param pOemDataReqID - pointer to an object to get back the request ID
1606 \return eHalStatus
1607 ---------------------------------------------------------------------------*/
1608eHalStatus sme_getOemDataRsp(tHalHandle hHal,
1609 tOemDataRsp **pOemDataRsp);
1610
1611#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07001612
1613
Jeff Johnson295189b2012-06-20 16:38:30 -07001614
1615/* ---------------------------------------------------------------------------
1616
1617 \fn sme_RoamUpdateAPWPSIE
1618
1619 \brief To update AP's WPS IE. This function should be called after SME AP session is created
1620 This is an asynchronous API.
1621
1622 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
1623
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001624 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07001625
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001626 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001627
1628 -------------------------------------------------------------------------------*/
1629
1630eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
1631/* ---------------------------------------------------------------------------
1632
1633 \fn sme_RoamUpdateAPWPARSNIEs
1634
1635 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
1636 This is an asynchronous API.
1637
1638 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
1639
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001640 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07001641
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001642 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001643
1644 -------------------------------------------------------------------------------*/
1645eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
1646
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001647/* ---------------------------------------------------------------------------
1648
1649 sme_ChangeMCCBeaconInterval
1650
1651 \brief To update P2P-GO's beacon Interval.
1652
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001653 \return eHalStatus SUCCESS
1654 FAILURE or RESOURCES
1655 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001656 -------------------------------------------------------------------------------*/
1657eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
1658
1659
Jeff Johnson295189b2012-06-20 16:38:30 -07001660
1661/* ---------------------------------------------------------------------------
1662 \fn sme_sendBTAmpEvent
1663 \brief API to send the btAMPstate to FW
1664 \param hHal - The handle returned by macOpen.
1665 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001666 \return eHalStatus SUCCESS
1667 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001668
1669--------------------------------------------------------------------------- */
1670
1671eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
1672
1673
1674
1675/* ---------------------------------------------------------------------------
1676 \fn sme_SetHostOffload
1677 \brief API to set the host offload feature.
1678 \param hHal - The handle returned by macOpen.
1679 \param pRequest - Pointer to the offload request.
1680 \return eHalStatus
1681 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001682eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
1683 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001684
1685/* ---------------------------------------------------------------------------
1686 \fn sme_SetKeepAlive
1687 \brief API to set the Keep Alive feature.
1688 \param hHal - The handle returned by macOpen.
1689 \param pRequest - Pointer to the Keep Alive request.
1690 \return eHalStatus
1691 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001692eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
1693 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001694
1695
1696/* ---------------------------------------------------------------------------
1697 \fn sme_AbortMacScan
1698 \brief API to cancel MAC scan.
1699 \param hHal - The handle returned by macOpen.
1700 \return VOS_STATUS
1701 VOS_STATUS_E_FAILURE - failure
1702 VOS_STATUS_SUCCESS success
1703 ---------------------------------------------------------------------------*/
1704eHalStatus sme_AbortMacScan(tHalHandle hHal);
1705
1706/* ----------------------------------------------------------------------------
1707 \fn sme_GetOperationChannel
1708 \brief API to get current channel on which STA is parked
1709 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001710 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07001711 \returns eHAL_STATUS_SUCCESS
1712 eHAL_STATUS_FAILURE
1713-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001714eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001715
Jeff Johnson295189b2012-06-20 16:38:30 -07001716/* ---------------------------------------------------------------------------
1717
1718 \fn sme_RegisterMgtFrame
1719
1720 \brief To register managment frame of specified type and subtype.
1721 \param frameType - type of the frame that needs to be passed to HDD.
1722 \param matchData - data which needs to be matched before passing frame
1723 to HDD.
1724 \param matchDataLen - Length of matched data.
1725 \return eHalStatus
1726 -------------------------------------------------------------------------------*/
1727eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1728 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
1729
1730/* ---------------------------------------------------------------------------
1731
1732 \fn sme_DeregisterMgtFrame
1733
1734 \brief To De-register managment frame of specified type and subtype.
1735 \param frameType - type of the frame that needs to be passed to HDD.
1736 \param matchData - data which needs to be matched before passing frame
1737 to HDD.
1738 \param matchDataLen - Length of matched data.
1739 \return eHalStatus
1740 -------------------------------------------------------------------------------*/
1741eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1742 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07001743
1744/* ---------------------------------------------------------------------------
1745
1746 \fn sme_ConfigureRxpFilter
1747
1748 \brief
1749 SME will pass this request to lower mac to set/reset the filter on RXP for
1750 multicast & broadcast traffic.
1751
1752 \param
1753
1754 hHal - The handle returned by macOpen.
1755
1756 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
1757 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
1758 on this param. In future we can use this as a mask to set various types of
1759 filters as suggested below:
1760 FILTER_ALL_MULTICAST:
1761 FILTER_ALL_BROADCAST:
1762 FILTER_ALL_MULTICAST_BROADCAST:
1763
1764
1765 \return eHalStatus
1766
1767
1768--------------------------------------------------------------------------- */
1769eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
1770 tpSirWlanSetRxpFilters wlanRxpFilterParam);
1771
1772/* ---------------------------------------------------------------------------
1773
1774 \fn sme_ConfigureAppsCpuWakeupState
1775
1776 \brief
1777 SME will pass this request to lower mac to dynamically adjusts the listen
1778 interval based on the WLAN/MSM activity. This feature is named as
1779 Telescopic Beacon wakeup feature.
1780
1781 \param
1782
1783 hHal - The handle returned by macOpen.
1784
1785 isAppsAwake- Depicts the state of the Apps CPU
1786
1787
1788 \return eHalStatus
1789
1790
1791--------------------------------------------------------------------------- */
1792eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
1793
Jeff Johnson295189b2012-06-20 16:38:30 -07001794/* ---------------------------------------------------------------------------
1795
1796 \fn sme_ConfigureSuspendInd
1797
1798 \brief
1799 SME will pass this request to lower mac to Indicate that the wlan needs to
1800 be suspended
1801
1802 \param
1803
1804 hHal - The handle returned by macOpen.
1805
1806 wlanSuspendParam- Depicts the wlan suspend params
1807
1808
1809 \return eHalStatus
1810
1811
1812--------------------------------------------------------------------------- */
1813eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
1814 tpSirWlanSuspendParam wlanSuspendParam);
1815
1816/* ---------------------------------------------------------------------------
1817
1818 \fn sme_ConfigureResumeReq
1819
1820 \brief
1821 SME will pass this request to lower mac to Indicate that the wlan needs to
1822 be Resumed
1823
1824 \param
1825
1826 hHal - The handle returned by macOpen.
1827
1828 wlanResumeParam- Depicts the wlan resume params
1829
1830
1831 \return eHalStatus
1832
1833
1834--------------------------------------------------------------------------- */
1835eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
1836 tpSirWlanResumeParam wlanResumeParam);
1837
Jeff Johnson295189b2012-06-20 16:38:30 -07001838
1839/* ---------------------------------------------------------------------------
1840
1841 \fn sme_GetInfraSessionId
1842
1843 \brief To get the session ID for infra session, if connected
1844 This is a synchronous API.
1845
1846 \param hHal - The handle returned by macOpen.
1847
1848 \return sessionid, -1 if infra session is not connected
1849
1850 -------------------------------------------------------------------------------*/
1851tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
1852
1853/* ---------------------------------------------------------------------------
1854
1855 \fn sme_GetInfraOperationChannel
1856
1857 \brief To get the operating channel for infra session, if connected
1858 This is a synchronous API.
1859
1860 \param hHal - The handle returned by macOpen.
1861 \param sessionId - the sessionId returned by sme_OpenSession.
1862
1863 \return operating channel, 0 if infra session is not connected
1864
1865 -------------------------------------------------------------------------------*/
1866tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
1867/* ---------------------------------------------------------------------------
1868
1869 \fn sme_GetConcurrentOperationChannel
1870
1871 \brief To get the operating channel for other concurrent sessions, if connected
1872 This is a synchronous API.
1873
1874 \param hHal - The handle returned by macOpen.
1875 \param currentPersona - persona that is trying to come up.
1876
1877 \return operating channel, 0 if infra session is not connected
1878
1879 -------------------------------------------------------------------------------*/
1880tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
1881
1882/* ---------------------------------------------------------------------------
1883 \fn sme_AbortMacScan
1884 \brief API to cancel MAC scan.
1885 \param hHal - The handle returned by macOpen.
1886 \return VOS_STATUS
1887 VOS_STATUS_E_FAILURE - failure
1888 VOS_STATUS_SUCCESS success
1889 ---------------------------------------------------------------------------*/
1890eHalStatus sme_AbortMacScan(tHalHandle hHal);
1891
1892/* ---------------------------------------------------------------------------
1893 \fn sme_GetCfgValidChannels
1894 \brief API to get valid channel list
1895 \param hHal - The handle returned by macOpen.
1896 \param aValidChannels - Pointer to the valid channel list
1897 \param len - valid channel list length
1898 \return eHalStatus
1899 ---------------------------------------------------------------------------*/
1900eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
1901
1902#ifdef FEATURE_WLAN_SCAN_PNO
1903
1904/* ---------------------------------------------------------------------------
1905 \fn sme_SetPreferredNetworkList
1906 \brief API to set the Preferred Network List Offload feature.
1907 \param hHal - The handle returned by macOpen.
1908 \param pRequest - Pointer to the offload request.
1909 \return eHalStatus
1910 ---------------------------------------------------------------------------*/
1911eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
1912
1913/* ---------------------------------------------------------------------------
1914 \fn sme_SetRSSIFilter
1915 \brief API to set RSSI Filter feature.
1916 \param hHal - The handle returned by macOpen.
1917 \param pRequest - Pointer to the offload request.
1918 \return eHalStatus
1919 ---------------------------------------------------------------------------*/
1920eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
1921
1922/******************************************************************************
1923*
1924* Name: sme_PreferredNetworkFoundInd
1925*
1926* Description:
1927* Invoke Preferred Network Found Indication
1928*
1929* Parameters:
1930* hHal - HAL handle for device
1931* pMsg - found network description
1932*
1933* Returns: eHalStatus
1934*
1935******************************************************************************/
1936eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
1937#endif // FEATURE_WLAN_SCAN_PNO
1938
1939/* ---------------------------------------------------------------------------
1940 \fn sme_SetPowerParams
1941 \brief API to set Power Parameters
1942 \param hHal - The handle returned by macOpen.
1943 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08001944 \param forced - if true, not to be dropped silently in host, it must reach
1945 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
1946 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07001947 \return eHalStatus
1948 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08001949eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07001950
1951/* ---------------------------------------------------------------------------
1952 \fn sme_SetTxPerTracking
1953 \brief Set Tx PER tracking configuration parameters
1954 \param hHal - The handle returned by macOpen.
1955 \param pTxPerTrackingParam - Tx PER configuration parameters
1956 \return eHalStatus
1957 ---------------------------------------------------------------------------*/
1958eHalStatus sme_SetTxPerTracking (
1959 tHalHandle hHal,
1960 void (*pCallbackfn) (void *pCallbackContext),
1961 void *pCallbackContext,
1962 tpSirTxPerTrackingParam pTxPerTrackingParam);
1963
1964#ifdef WLAN_FEATURE_PACKET_FILTERING
1965/* ---------------------------------------------------------------------------
1966 \fn sme_ReceiveFilterSetFilter
1967 \brief API to set 8023 Multicast Address List
1968 \param hHal - The handle returned by macOpen.
1969 \param pMulticastAddrs - Pointer to the Multicast Address List
1970 \return eHalStatus
1971 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08001972eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07001973
1974/* ---------------------------------------------------------------------------
1975 \fn sme_ReceiveFilterSetFilter
1976 \brief API to set Receive Packet Filter
1977 \param hHal - The handle returned by macOpen.
1978 \param pRcvPktFilterCfg - Receive Packet Filter parameter
1979 \return eHalStatus
1980 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001981eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
1982 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001983
1984/* ---------------------------------------------------------------------------
1985 \fn sme_GetFilterMatchCount
1986 \brief API to get D0 PC Filter Match Count
1987 \param hHal - The handle returned by macOpen
1988 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
1989 \param callbackContext - Cookie to be passed back during callback
1990 \return eHalStatus
1991 ---------------------------------------------------------------------------*/
1992eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
1993 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001994 void *callbackContext,
1995 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001996
1997/* ---------------------------------------------------------------------------
1998 \fn sme_ReceiveFilterClearFilter
1999 \brief API to clear Receive Packet Filter
2000 \param hHal - The handle returned by macOpen.
2001 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2002 \return eHalStatus
2003 ---------------------------------------------------------------------------*/
2004eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002005 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2006 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002007#endif // WLAN_FEATURE_PACKET_FILTERING
2008/* ---------------------------------------------------------------------------
2009
2010 \fn sme_IsChannelValid
2011 \brief To check if the channel is valid for currently established domain
2012 This is a synchronous API.
2013
2014 \param hHal - The handle returned by macOpen.
2015 \param channel - channel to verify
2016
2017 \return TRUE/FALSE, TRUE if channel is valid
2018
2019 -------------------------------------------------------------------------------*/
2020tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2021
2022/* ---------------------------------------------------------------------------
2023 \fn sme_SetFreqBand
2024 \brief Used to set frequency band.
2025 \param hHal
2026 \eBand band value to be configured
2027 \- return eHalStatus
2028 -------------------------------------------------------------------------*/
2029eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2030
2031/* ---------------------------------------------------------------------------
2032 \fn sme_GetFreqBand
2033 \brief Used to get the current band settings.
2034 \param hHal
2035 \pBand pointer to hold the current band value
2036 \- return eHalStatus
2037 -------------------------------------------------------------------------*/
2038eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2039
2040/* ---------------------------------------------------------------------------
2041
2042 \fn sme_SetTxPerTracking
2043 \brief Set Tx PER tracking configuration parameters
2044 \param hHal - The handle returned by macOpen.
2045 \param pTxPerTrackingParam - Tx PER configuration parameters
2046 \return eHalStatus
2047 ---------------------------------------------------------------------------*/
2048eHalStatus sme_SetTxPerTracking (
2049 tHalHandle hHal,
2050 void (*pCallbackfn) (void *pCallbackContext),
2051 void *pCallbackContext,
2052 tpSirTxPerTrackingParam pTxPerTrackingParam);
2053
2054#ifdef WLAN_FEATURE_GTK_OFFLOAD
2055/* ---------------------------------------------------------------------------
2056 \fn sme_SetGTKOffload
2057 \brief API to set GTK offload feature.
2058 \param hHal - The handle returned by macOpen.
2059 \param pRequest - Pointer to the GTK offload request.
2060 \return eHalStatus
2061 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002062eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002063
2064/* ---------------------------------------------------------------------------
2065 \fn sme_GetGTKOffload
2066 \brief API to get GTK offload information.
2067 \param hHal - The handle returned by macOpen.
2068 \param pRequest - Pointer to the GTK offload response.
2069 \return eHalStatus
2070 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002071eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2072 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002073#endif // WLAN_FEATURE_GTK_OFFLOAD
2074
2075#ifdef WLAN_WAKEUP_EVENTS
2076eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2077#endif // WLAN_WAKEUP_EVENTS
2078
2079/* ---------------------------------------------------------------------------
2080 \fn sme_SetTxPerTracking
2081 \brief Set Tx PER tracking configuration parameters
2082 \param hHal - The handle returned by macOpen.
2083 \param pTxPerTrackingParam - Tx PER configuration parameters
2084 \return eHalStatus
2085 ---------------------------------------------------------------------------*/
2086eHalStatus sme_SetTxPerTracking (
2087 tHalHandle hHal,
2088 void (*pCallbackfn) (void *pCallbackContext),
2089 void *pCallbackContext,
2090 tpSirTxPerTrackingParam pTxPerTrackingParam);
2091
2092
2093//return frequency for a particular channel
2094tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2095
2096tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2097
2098#if defined WLAN_FEATURE_P2P_INTERNAL
2099
2100eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2101
2102/* ---------------------------------------------------------------------------
2103 \fn sme_p2pFlushDeviceList
2104 \brief Remove cached P2P result from scan results
2105 \param hHal - The handle returned by macOpen.
2106 \param HDDSessionId - HDD's sessionId. Currently unused.
2107 \return eHalStatus
2108 ---------------------------------------------------------------------------*/
2109eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2110
2111eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2112 tCsrScanResultFilter *pFilter);
2113
2114#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2115
2116/* ---------------------------------------------------------------------------
2117 \fn sme_SetMaxTxPower
2118 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2119 setting will not persist over reboots
2120 \param hHal
2121 \param pBssid BSSID to set the power cap for
2122 \param pBssid pSelfMacAddress self MAC Address
2123 \param pBssid power to set in dB
2124 \- return eHalStatus
2125 -------------------------------------------------------------------------*/
2126eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2127 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2128
Jeff Johnson295189b2012-06-20 16:38:30 -07002129/* ---------------------------------------------------------------------------
2130
schang86c22c42013-03-13 18:41:24 -07002131 \fn sme_SetTxPower
2132
2133 \brief Set Transmit Power dynamically. Note: this setting will
2134 not persist over reboots.
2135
2136 \param hHal
2137 \param sessionId Target Session ID
2138 \param mW power to set in mW
2139 \- return eHalStatus
2140
2141 -------------------------------------------------------------------------------*/
2142eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2143
2144/* ---------------------------------------------------------------------------
2145
Jeff Johnson295189b2012-06-20 16:38:30 -07002146 \fn sme_HideSSID
2147
2148 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2149 not persist over reboots.
2150
2151 \param hHal
2152 \param sessionId
2153 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2154 \- return eHalStatus
2155
2156 -------------------------------------------------------------------------------*/
2157eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002158
2159/* ---------------------------------------------------------------------------
2160
2161 \fn sme_SetTmLevel
2162 \brief Set Thermal Mitigation Level to RIVA
2163 \param hHal - The handle returned by macOpen.
2164 \param newTMLevel - new Thermal Mitigation Level
2165 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002166 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002167 ---------------------------------------------------------------------------*/
2168eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2169
2170/*---------------------------------------------------------------------------
2171
2172 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2173 Host and FW.
2174
2175 \param hHal - HAL handle for device
2176
2177 \return NONE
2178
2179---------------------------------------------------------------------------*/
2180void sme_featureCapsExchange(tHalHandle hHal);
2181
Jeff Johnsond13512a2012-07-17 11:42:19 -07002182/*---------------------------------------------------------------------------
2183
Yathish9f22e662012-12-10 14:21:35 -08002184 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2185 between in Host.
2186
2187 \param hHal - HAL handle for device
2188
2189 \return NONE
2190
2191---------------------------------------------------------------------------*/
2192void sme_disableFeatureCapablity(tANI_U8 feature_index);
2193
2194/*---------------------------------------------------------------------------
2195
Jeff Johnsond13512a2012-07-17 11:42:19 -07002196 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2197 country code
2198 Host and FW.
2199
2200 \param hHal - HAL handle for device
2201 \param pCountry - pointer to country code
2202
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002203 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002204
2205 ---------------------------------------------------------------------------*/
2206eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2207
2208/*---------------------------------------------------------------------------
2209
2210 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2211 country code.
2212
2213 \param hHal - HAL handle for device
2214 \param pCountry - pointer to country code
2215
2216 \return Success or failure
2217
2218 ---------------------------------------------------------------------------*/
2219eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2220
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002221/* ---------------------------------------------------------------------------
2222 \fn sme_transportDebug
2223 \brief Dynamically monitoring Transport channels
2224 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002225 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002226 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002227 \param toggleStallDetect Enable stall detect feature
2228 This feature will take effect to data performance
2229 Not integrate till fully verification
2230 \- return NONE
2231 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002232void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002233
Kiran4a17ebe2013-01-31 10:43:43 -08002234/* ---------------------------------------------------------------------------
2235 \fn sme_ResetPowerValuesFor5G
2236 \brief Reset the power values for 5G band with NV power values.
2237 \param hHal - HAL handle for device
2238 \- return NONE
2239 -------------------------------------------------------------------------*/
2240void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2241
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002242#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
2243/* ---------------------------------------------------------------------------
2244 \fn sme_UpdateRoamPrefer5GHz
2245 \brief enable/disable Roam prefer 5G runtime option
2246 This function is called through dynamic setConfig callback function
2247 to configure the Roam prefer 5G runtime option
2248 \param hHal - HAL handle for device
2249 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2250 \- return Success or failure
2251 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002252eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002253
2254/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002255 \fn sme_setRoamIntraBand
2256 \brief enable/disable Intra band roaming
2257 This function is called through dynamic setConfig callback function
2258 to configure the intra band roaming
2259 \param hHal - HAL handle for device
2260 \param nRoamIntraBand Enable/Disable Intra band roaming
2261 \- return Success or failure
2262 -------------------------------------------------------------------------*/
2263eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2264
2265/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002266 \fn sme_UpdateRoamScanNProbes
2267 \brief function to update roam scan N probes
2268 This function is called through dynamic setConfig callback function
2269 to update roam scan N probes
2270 \param hHal - HAL handle for device
2271 \param nProbes number of probe requests to be sent out
2272 \- return Success or failure
2273 -------------------------------------------------------------------------*/
2274eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2275
2276/* ---------------------------------------------------------------------------
2277 \fn sme_UpdateRoamScanHomeAwayTime
2278 \brief function to update roam scan Home away time
2279 This function is called through dynamic setConfig callback function
2280 to update roam scan home away time
2281 \param hHal - HAL handle for device
2282 \param nRoamScanAwayTime Scan home away time
2283 \- return Success or failure
2284 -------------------------------------------------------------------------*/
2285eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal, const v_U16_t nRoamScanHomeAwayTime);
2286
2287/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002288 \fn sme_getRoamIntraBand
2289 \brief get Intra band roaming
2290 \param hHal - HAL handle for device
2291 \- return Success or failure
2292 -------------------------------------------------------------------------*/
2293v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2294
2295/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002296 \fn sme_getRoamScanNProbes
2297 \brief get N Probes
2298 \param hHal - HAL handle for device
2299 \- return Success or failure
2300 -------------------------------------------------------------------------*/
2301v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2302
2303/* ---------------------------------------------------------------------------
2304 \fn sme_getRoamScanHomeAwayTime
2305 \brief get Roam scan home away time
2306 \param hHal - HAL handle for device
2307 \- return Success or failure
2308 -------------------------------------------------------------------------*/
2309v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2310
2311/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002312 \fn sme_UpdateImmediateRoamRssiDiff
2313 \brief Update nImmediateRoamRssiDiff
2314 This function is called through dynamic setConfig callback function
2315 to configure nImmediateRoamRssiDiff
2316 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2317 \param hHal - HAL handle for device
2318 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2319 candidate and current AP.
2320 \- return Success or failure
2321 -------------------------------------------------------------------------*/
2322
2323eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002324
Srinivas Girigowdade697412013-02-14 16:31:48 -08002325/* ---------------------------------------------------------------------------
2326 \fn sme_UpdateRoamRssiDiff
2327 \brief Update RoamRssiDiff
2328 This function is called through dynamic setConfig callback function
2329 to configure RoamRssiDiff
2330 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2331 \param hHal - HAL handle for device
2332 \param RoamRssiDiff - minimum rssi difference between potential
2333 candidate and current AP.
2334 \- return Success or failure
2335 -------------------------------------------------------------------------*/
2336
2337eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2338
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002339/*--------------------------------------------------------------------------
2340 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2341 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2342 isFastTransitionEnabled.
2343 This is a synchronuous call
2344 \param hHal - The handle returned by macOpen.
2345 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2346 Other status means SME is failed to update isFastTransitionEnabled.
2347 \sa
2348 --------------------------------------------------------------------------*/
2349
2350eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2351 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002352
2353/* ---------------------------------------------------------------------------
2354 \fn sme_UpdateWESMode
2355 \brief Update WESMode
2356 This function is called through dynamic setConfig callback function
2357 to configure isWESModeEnabled
2358 \param hHal - HAL handle for device
2359 \param isWESModeEnabled - Enable/Disable WES Mode
2360 \- return Success or failure
2361 -------------------------------------------------------------------------*/
2362eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2363
2364/* ---------------------------------------------------------------------------
2365 \fn sme_SetRoamScanControl
2366 \brief Set roam scan control
2367 This function is called to set roam scan control
2368 if roam scan control is set to 0, roaming scan cache is cleared
2369 any value other than 0 is treated as invalid value
2370 \param hHal - HAL handle for device
2371 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2372 Other status means SME failure to update
2373 -------------------------------------------------------------------------*/
2374eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002375#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_CCX) || (FEATURE_WLAN_LFR) */
2376
2377#ifdef FEATURE_WLAN_LFR
2378/*--------------------------------------------------------------------------
2379 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002380 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002381 isFastRoamIniFeatureEnabled.
2382 This is a synchronuous call
2383 \param hHal - The handle returned by macOpen.
2384 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2385 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2386 \sa
2387 --------------------------------------------------------------------------*/
2388
Srinivas Girigowdade697412013-02-14 16:31:48 -08002389eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002390 const v_BOOL_t isFastRoamIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002391#endif /* FEATURE_WLAN_LFR */
2392
2393#ifdef FEATURE_WLAN_CCX
2394/*--------------------------------------------------------------------------
2395 \brief sme_UpdateIsCcxFeatureEnabled() - enable/disable CCX support at runtime
2396 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2397 isCcxIniFeatureEnabled.
2398 This is a synchronuous call
2399 \param hHal - The handle returned by macOpen.
2400 \return eHAL_STATUS_SUCCESS - SME update isCcxIniFeatureEnabled config successfully.
2401 Other status means SME is failed to update isCcxIniFeatureEnabled.
2402 \sa
2403 --------------------------------------------------------------------------*/
2404
2405eHalStatus sme_UpdateIsCcxFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002406 const v_BOOL_t isCcxIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002407
2408#endif /* FEATURE_WLAN_CCX */
2409
2410/*--------------------------------------------------------------------------
2411 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2412 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2413 fEnableFwRssiMonitoring.
2414 This is a synchronuous call
2415 \param hHal - The handle returned by macOpen.
2416 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2417 Other status means SME is failed to update
2418 \sa
2419 --------------------------------------------------------------------------*/
2420
2421eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2422 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002423
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002424#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002425/*--------------------------------------------------------------------------
2426 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2427 This is a synchronuous call
2428 \param hHal - The handle returned by macOpen.
2429 \return eHAL_STATUS_SUCCESS - SME update config successful.
2430 Other status means SME is failed to update
2431 \sa
2432 --------------------------------------------------------------------------*/
2433eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2434 v_U8_t neighborLookupRssiThreshold);
2435
2436/*--------------------------------------------------------------------------
2437 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2438 This is a synchronuous call
2439 \param hHal - The handle returned by macOpen.
2440 \return eHAL_STATUS_SUCCESS - SME update config successful.
2441 Other status means SME is failed to update
2442 \sa
2443 --------------------------------------------------------------------------*/
2444eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2445 v_U8_t neighborReassocRssiThreshold);
2446
2447/*--------------------------------------------------------------------------
2448 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2449 This is a synchronuous call
2450 \param hHal - The handle returned by macOpen.
2451 \return eHAL_STATUS_SUCCESS - SME update config successful.
2452 Other status means SME is failed to update
2453 \sa
2454 --------------------------------------------------------------------------*/
2455v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2456
2457/*--------------------------------------------------------------------------
2458 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2459 This is a synchronuous call
2460 \param hHal - The handle returned by macOpen.
2461 \return eHAL_STATUS_SUCCESS - SME update config successful.
2462 Other status means SME is failed to update
2463 \sa
2464 --------------------------------------------------------------------------*/
2465eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2466 v_U16_t neighborScanResultsRefreshPeriod);
2467
2468/*--------------------------------------------------------------------------
2469 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2470 This is a synchronuous call
2471 \param hHal - The handle returned by macOpen.
2472 \return eHAL_STATUS_SUCCESS - SME update config successful.
2473 Other status means SME is failed to update
2474 \sa
2475 --------------------------------------------------------------------------*/
2476v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2477
2478/*--------------------------------------------------------------------------
2479 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2480 This is a synchronuous call
2481 \param hHal - The handle returned by macOpen.
2482 \return eHAL_STATUS_SUCCESS - SME update config successful.
2483 Other status means SME is failed to update
2484 \sa
2485 --------------------------------------------------------------------------*/
2486v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2487
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002488/* ---------------------------------------------------------------------------
2489 \fn sme_UpdateEmptyScanRefreshPeriod
2490 \brief Update nEmptyScanRefreshPeriod
2491 This function is called through dynamic setConfig callback function
2492 to configure nEmptyScanRefreshPeriod
2493 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2494 \param hHal - HAL handle for device
2495 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2496 \- return Success or failure
2497 -------------------------------------------------------------------------*/
2498eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2499
2500/* ---------------------------------------------------------------------------
2501 \fn sme_setNeighborScanMinChanTime
2502 \brief Update nNeighborScanMinChanTime
2503 This function is called through dynamic setConfig callback function
2504 to configure gNeighborScanChannelMinTime
2505 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2506 \param hHal - HAL handle for device
2507 \param nNeighborScanMinChanTime - Channel minimum dwell time
2508 \- return Success or failure
2509 -------------------------------------------------------------------------*/
2510eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2511
2512/* ---------------------------------------------------------------------------
2513 \fn sme_setNeighborScanMaxChanTime
2514 \brief Update nNeighborScanMaxChanTime
2515 This function is called through dynamic setConfig callback function
2516 to configure gNeighborScanChannelMaxTime
2517 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2518 \param hHal - HAL handle for device
2519 \param nNeighborScanMinChanTime - Channel maximum dwell time
2520 \- return Success or failure
2521 -------------------------------------------------------------------------*/
2522eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2523
2524/* ---------------------------------------------------------------------------
2525 \fn sme_getNeighborScanMinChanTime
2526 \brief get neighbor scan min channel time
2527 \param hHal - The handle returned by macOpen.
2528 \return v_U16_t - channel min time value
2529 -------------------------------------------------------------------------*/
2530v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2531
2532/* ---------------------------------------------------------------------------
2533 \fn sme_getNeighborScanMaxChanTime
2534 \brief get neighbor scan max channel time
2535 \param hHal - The handle returned by macOpen.
2536 \return v_U16_t - channel max time value
2537 -------------------------------------------------------------------------*/
2538v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
2539
2540/* ---------------------------------------------------------------------------
2541 \fn sme_setNeighborScanPeriod
2542 \brief Update nNeighborScanPeriod
2543 This function is called through dynamic setConfig callback function
2544 to configure nNeighborScanPeriod
2545 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
2546 \param hHal - HAL handle for device
2547 \param nNeighborScanPeriod - neighbor scan period
2548 \- return Success or failure
2549 -------------------------------------------------------------------------*/
2550eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
2551
2552/* ---------------------------------------------------------------------------
2553 \fn sme_getNeighborScanPeriod
2554 \brief get neighbor scan period
2555 \param hHal - The handle returned by macOpen.
2556 \return v_U16_t - neighbor scan period
2557 -------------------------------------------------------------------------*/
2558v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
2559
2560#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08002561
2562#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
2563/*--------------------------------------------------------------------------
2564 \brief sme_getRoamRssiDiff() - get Roam rssi diff
2565 This is a synchronuous call
2566 \param hHal - The handle returned by macOpen.
2567 \return eHAL_STATUS_SUCCESS - SME update config successful.
2568 Other status means SME is failed to update
2569 \sa
2570 --------------------------------------------------------------------------*/
2571v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
2572
2573/*--------------------------------------------------------------------------
2574 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
2575 This is a synchronuous call
2576 \param hHal - The handle returned by macOpen.
2577 \return eHAL_STATUS_SUCCESS - SME update config successful.
2578 Other status means SME is failed to update
2579 \sa
2580 --------------------------------------------------------------------------*/
2581eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2582 tANI_U8 numChannels);
2583
2584/*--------------------------------------------------------------------------
2585 \brief sme_ChangeCountryValidChannelListByRevision() - Change Korea valid channel list
2586 based on country revision number
2587 This is a synchronuous call
2588 \param hHal - The handle returned by macOpen.
2589 \return eHAL_STATUS_SUCCESS - SME update config successful.
2590 Other status means SME is failed to update
2591 \sa
2592 --------------------------------------------------------------------------*/
2593eHalStatus sme_ChangeCountryValidChannelListByRevision(tHalHandle hHal,
2594 tANI_U8 Revision);
2595
2596/*--------------------------------------------------------------------------
2597 \brief csrUpdateBgScanConfigIniChannelList() - Update bgscan roam cache
2598 This is a synchronuous call
2599 \param hHal - The handle returned by macOpen.
2600 \return eHAL_STATUS_SUCCESS - SME update config successful.
2601 Other status means SME is failed to update
2602 \sa
2603 --------------------------------------------------------------------------*/
2604eHalStatus sme_UpdateBgScanConfigIniChannelList(tHalHandle hHal,
2605 eCsrBand eBand);
2606
2607
2608/*--------------------------------------------------------------------------
2609 \brief sme_getRoamScanChannelList() - get roam scan channel list
2610 This is a synchronuous call
2611 \param hHal - The handle returned by macOpen.
2612 \return eHAL_STATUS_SUCCESS - SME update config successful.
2613 Other status means SME is failed to update
2614 \sa
2615 --------------------------------------------------------------------------*/
2616eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2617 tANI_U8 *pNumChannels);
2618
2619/*--------------------------------------------------------------------------
2620 \brief sme_GetCountryRevision() - get Country revision index
2621 This is a synchronuous call
2622 \param hHal - The handle returned by macOpen.
2623 \return eHAL_STATUS_SUCCESS - SME update config successful.
2624 Other status means SME is failed to update
2625 \sa
2626 --------------------------------------------------------------------------*/
2627eHalStatus sme_GetCountryRevision(tHalHandle hHal, tANI_U8 *pRevision);
2628
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002629/*--------------------------------------------------------------------------
2630 \brief sme_getIsCcxFeatureEnabled() - get CCX feature enabled or not
2631 This is a synchronuous call
2632 \param hHal - The handle returned by macOpen.
2633 \return TRUE (1) - if the CCX feature is enabled
2634 FALSE (0) - if feature is disabled (compile or runtime)
2635 \sa
2636 --------------------------------------------------------------------------*/
2637tANI_BOOLEAN sme_getIsCcxFeatureEnabled(tHalHandle hHal);
2638
2639/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002640 \brief sme_getWESMode() - getWES Mode
2641 This is a synchronous call
2642 \param hHal - The handle returned by macOpen.
2643 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
2644 \sa
2645 --------------------------------------------------------------------------*/
2646v_BOOL_t sme_GetWESMode(tHalHandle hHal);
2647
2648/*--------------------------------------------------------------------------
2649 \brief sme_GetRoamScanControl() - get scan control
2650 This is a synchronous call
2651 \param hHal - The handle returned by macOpen.
2652 \return v_BOOL_t - Enabled(1)/Disabled(0)
2653 \sa
2654 --------------------------------------------------------------------------*/
2655v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
2656
2657/* ---------------------------------------------------------------------------
2658 \fn sme_UpdateEmptyScanRefreshPeriod
2659 \brief Update nnEmptyScanRefreshPeriod
2660 This function is called through dynamic setConfig callback function
2661 to configure nnEmptyScanRefreshPeriod
2662 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2663 \param hHal - HAL handle for device
2664 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2665 \- return Success or failure
2666 -------------------------------------------------------------------------*/
2667
2668/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002669 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
2670 This is a synchronuous call
2671 \param hHal - The handle returned by macOpen.
2672 \return TRUE (1) - if the feature is enabled
2673 FALSE (0) - if feature is disabled (compile or runtime)
2674 \sa
2675 --------------------------------------------------------------------------*/
2676tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
2677
2678/*--------------------------------------------------------------------------
2679 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
2680 This is a synchronuous call
2681 \param hHal - The handle returned by macOpen.
2682 \return TRUE (1) - if the feature is enabled
2683 FALSE (0) - if feature is disabled (compile or runtime)
2684 \sa
2685 --------------------------------------------------------------------------*/
2686tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
2687
Srinivas Girigowdade697412013-02-14 16:31:48 -08002688#endif
2689
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07002690#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2691/*--------------------------------------------------------------------------
2692 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
2693 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2694 gRoamScanOffloadEnabled.
2695 This is a synchronous call
2696 \param hHal - The handle returned by macOpen.
2697 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2698 Other status means SME is failed to update.
2699 \sa
2700 --------------------------------------------------------------------------*/
2701
2702eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
2703#endif
2704
2705
Srinivas Girigowdade697412013-02-14 16:31:48 -08002706/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002707 \fn sme_IsFeatureSupportedByFW
2708 \brief Check if an feature is enabled by FW
2709
2710 \param feattEnumValue - Enumeration value of the feature to be checked.
2711 A value from enum placeHolderInCapBitmap
2712
2713 \- return 1/0 (TRUE/FALSE)
2714 -------------------------------------------------------------------------*/
2715tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
2716#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302717
2718/* ---------------------------------------------------------------------------
2719 \fn sme_SendTdlsLinkEstablishParams
2720 \brief API to send TDLS Link Establishment Parameters.
2721
2722 \param peerMac - peer's Mac Adress.
2723 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
2724 \- return VOS_STATUS_SUCCES
2725 -------------------------------------------------------------------------*/
2726
2727VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
2728 tANI_U8 sessionId,
2729 tSirMacAddr peerMac,
2730 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
2731
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002732/* ---------------------------------------------------------------------------
2733 \fn sme_SendTdlsMgmtFrame
2734 \brief API to send TDLS management frames.
2735
2736 \param peerMac - peer's Mac Adress.
2737 \param frame_type - Type of TDLS mgmt frame to be sent.
2738 \param dialog - dialog token used in the frame.
2739 \param status - status to be incuded in the frame.
2740 \param buf - additional IEs to be included
2741 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08002742 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002743 \- return VOS_STATUS_SUCCES
2744 -------------------------------------------------------------------------*/
2745VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Hoonki Leea34dd892013-02-05 22:56:02 -08002746 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 -08002747/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08002748 \fn sme_ChangeTdlsPeerSta
2749 \brief API to Update TDLS peer sta parameters.
2750
2751 \param peerMac - peer's Mac Adress.
2752 \param staParams - Peer Station Parameters.
2753 \- return VOS_STATUS_SUCCES
2754 -------------------------------------------------------------------------*/
2755VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
2756 tCsrStaParams *pstaParams);
2757/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002758 \fn sme_AddTdlsPeerSta
2759 \brief API to Add TDLS peer sta entry.
2760
2761 \param peerMac - peer's Mac Adress.
2762 \- return VOS_STATUS_SUCCES
2763 -------------------------------------------------------------------------*/
2764VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2765/* ---------------------------------------------------------------------------
2766 \fn sme_DeleteTdlsPeerSta
2767 \brief API to Delete TDLS peer sta entry.
2768
2769 \param peerMac - peer's Mac Adress.
2770 \- return VOS_STATUS_SUCCES
2771 -------------------------------------------------------------------------*/
2772VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07002773/* ---------------------------------------------------------------------------
2774 \fn sme_IsPmcBmps
2775 \brief API to Check if PMC state is BMPS.
2776
2777 \- return v_BOOL_t
2778 -------------------------------------------------------------------------*/
2779v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07002780/* ---------------------------------------------------------------------------
2781 \fn sme_SetTdlsPowerSaveProhibited
2782 \API to set/reset the isTdlsPowerSaveProhibited.
2783
2784 \- return void
2785 -------------------------------------------------------------------------*/
2786void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002787#endif
2788#ifdef FEATURE_WLAN_TDLS_INTERNAL
2789typedef struct smeTdlsDisResult
2790{
2791 tSirMacAddr tdlsPeerMac;
2792 v_S7_t tdlsPeerRssi;
2793} tSmeTdlsDisResult;
2794
2795VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2796v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
2797 tSmeTdlsDisResult *disResult, v_U8_t listType);
2798VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2799VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002800#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07002801eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002802
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07002803/*
2804 * SME API to enable/disable WLAN driver initiated SSR
2805 */
2806void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
2807
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05302808/* ---------------------------------------------------------------------------
2809
2810 \fn sme_SetPhyMode
2811
2812 \brief Changes the PhyMode.
2813
2814 \param hHal - The handle returned by macOpen.
2815
2816 \param phyMode new phyMode which is to set
2817
2818 \return eHalStatus SUCCESS.
2819
2820 -------------------------------------------------------------------------------*/
2821eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
2822
2823/* ---------------------------------------------------------------------------
2824
2825 \fn sme_GetPhyMode
2826
2827 \brief gets current PhyMode.
2828
2829 \param hHal - The handle returned by macOpen.
2830
2831 \return eHalStatus PhyMode
2832
2833 -------------------------------------------------------------------------------*/
2834eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
2835
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07002836/*
2837 * SME API to determine the channel bonding mode
2838 */
2839VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
2840
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002841#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2842/*--------------------------------------------------------------------------
2843 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
2844 from CSR.
2845 This is a synchronous call
2846 \param hHal - The handle returned by macOpen
2847 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
2848 BSSID, channel etc.)
2849 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
2850 Other status means SME is failed to send the request.
2851 \sa
2852 --------------------------------------------------------------------------*/
2853
2854eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
2855#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07002856#endif //#if !defined( __SME_API_H )