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