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