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