blob: 660be596d581766bbf01087dee70b11677345033 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam0fb93dd2014-02-19 00:32:59 -08002 * Copyright (c) 2012-2014 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
22/*
23 * Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
24 * All Rights Reserved.
25 * Qualcomm Atheros Confidential and Proprietary.
26 *
27 */
28
Jeff Johnson295189b2012-06-20 16:38:30 -070029
30#if !defined( __SME_API_H )
31#define __SME_API_H
32
33
34/**=========================================================================
35
36 \file smeApi.h
37
38 \brief prototype for SME APIs
39
40 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
41
42 Qualcomm Confidential and Proprietary.
43
44 ========================================================================*/
45
46/* $Header$ */
47
48/*--------------------------------------------------------------------------
49 Include Files
50 ------------------------------------------------------------------------*/
51#include "ccmApi.h"
52#include "csrApi.h"
53#include "pmcApi.h"
54#include "vos_mq.h"
55#include "vos_lock.h"
56#include "halTypes.h"
57#include "sirApi.h"
58#include "btcApi.h"
59#include "vos_nvitem.h"
60#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070061
Jeff Johnsone7245742012-09-05 17:12:55 -070062#ifdef FEATURE_OEM_DATA_SUPPORT
63#include "oemDataApi.h"
64#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070065
66#if defined WLAN_FEATURE_VOWIFI
67#include "smeRrmInternal.h"
68#endif
69
70/*--------------------------------------------------------------------------
71 Preprocessor definitions and constants
72 ------------------------------------------------------------------------*/
73
74#define SME_SUMMARY_STATS 1
75#define SME_GLOBAL_CLASSA_STATS 2
76#define SME_GLOBAL_CLASSB_STATS 4
77#define SME_GLOBAL_CLASSC_STATS 8
78#define SME_GLOBAL_CLASSD_STATS 16
79#define SME_PER_STA_STATS 32
80
81#define SME_INVALID_COUNTRY_CODE "XX"
82
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070083//Macro to disable split scan
84#define SME_DISABLE_SPLIT_SCAN 255
Jeff Johnson295189b2012-06-20 16:38:30 -070085/*--------------------------------------------------------------------------
86 Type declarations
87 ------------------------------------------------------------------------*/
88typedef struct _smeConfigParams
89{
90 tCsrConfigParam csrConfig;
91#if defined WLAN_FEATURE_VOWIFI
92 tRrmConfigParam rrmConfig;
93#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070094#if defined FEATURE_WLAN_LFR
95 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -080096 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -070097#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080098#if defined FEATURE_WLAN_ESE
99 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700100#endif
101#if defined WLAN_FEATURE_P2P_INTERNAL
102 tP2PConfigParam p2pConfig;
103#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800104#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700105 tANI_U8 isFastTransitionEnabled;
106 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700107 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700108#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530109 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700110 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800111 tANI_U32 fEnableDebugLog;
Jeff Johnson295189b2012-06-20 16:38:30 -0700112} tSmeConfigParams, *tpSmeConfigParams;
113
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530114typedef enum
115{
116 eSME_ROAM_TRIGGER_NONE = 0,
117 eSME_ROAM_TRIGGER_SCAN = 1,
118 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
119 eSME_ROAM_TRIGGER_MAX
120} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700121
122/*-------------------------------------------------------------------------
123 Function declarations and documenation
124 ------------------------------------------------------------------------*/
125
126/*--------------------------------------------------------------------------
127
128 \brief sme_Open() - Initialze all SME modules and put them at idle state
129
130 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
131 successfully return, all modules are at idle state ready to start.
132
133 smeOpen must be called before any other SME APIs can be involved.
134 smeOpen must be called after macOpen.
135
136 \param hHal - The handle returned by macOpen.
137
138 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
139
140 Other status means SME is failed to be initialized
141 \sa
142
143 --------------------------------------------------------------------------*/
144eHalStatus sme_Open(tHalHandle hHal);
145
146/*--------------------------------------------------------------------------
147
148 \brief sme_Close() - Release all SME modules and their resources.
149
150 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
151 return, all modules are at closed state.
152
153 No SME APIs can be involved after sme_Close except sme_Open.
154 sme_Close must be called before macClose.
155
156 \param hHal - The handle returned by macOpen.
157
158 \return eHAL_STATUS_SUCCESS - SME is successfully close.
159
160 Other status means SME is failed to be closed but caller still cannot
161 call any other SME functions except smeOpen.
162 \sa
163
164 --------------------------------------------------------------------------*/
165eHalStatus sme_Close(tHalHandle hHal);
166
167/*--------------------------------------------------------------------------
168
169 \brief sme_Start() - Put all SME modules at ready state.
170
171 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
172 successfully return, all modules are ready to run.
173
174 \param hHal - The handle returned by macOpen.
175
176 \return eHAL_STATUS_SUCCESS - SME is ready.
177
178 Other status means SME is failed to start.
179 \sa
180
181 --------------------------------------------------------------------------*/
182eHalStatus sme_Start(tHalHandle hHal);
183
184/*--------------------------------------------------------------------------
185
186 \brief sme_Stop() - Stop all SME modules and put them at idle state
187
188 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
189 return, all modules are at idle state ready to start.
190
191
192 \param hHal - The handle returned by macOpen.
193
Kiet Lama72a2322013-11-15 11:18:11 +0530194 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700195
196 \return eHAL_STATUS_SUCCESS - SME is stopped.
197
198 Other status means SME is failed to stop but caller should still consider
199 SME is stopped.
200 \sa
201
202 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530203eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700204
205
206/*--------------------------------------------------------------------------
207
208 \brief sme_OpenSession() - Open a session for scan/roam operation.
209
210 This is a synchronous API.
211
212
213 \param hHal - The handle returned by macOpen.
214 \param callback - A pointer to the function caller specifies for roam/connect status indication
215 \param pContext - The context passed with callback
216 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
217 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
218
219 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
220
221 Other status means SME is failed to open the session.
222 eHAL_STATUS_RESOURCES - no more session available.
223 \sa
224
225 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700226eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
227 void *pContext, tANI_U8 *pSelfMacAddr,
228 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700229
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700230/*--------------------------------------------------------------------------
231
232 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
233 \param hHal - The handle returned by macOpen.
234 \param currDeviceMode - Current operating device mode.
235 --------------------------------------------------------------------------*/
236
237void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700238
239/*--------------------------------------------------------------------------
240
241 \brief sme_CloseSession() - Open a session for scan/roam operation.
242
243 This is a synchronous API.
244
245
246 \param hHal - The handle returned by macOpen.
247
248 \param sessionId - A previous opened session's ID.
249
250 \return eHAL_STATUS_SUCCESS - session is closed.
251
252 Other status means SME is failed to open the session.
253 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
254 \sa
255
256 --------------------------------------------------------------------------*/
257eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
258 csrRoamSessionCloseCallback callback, void *pContext);
259
260
261
262/*--------------------------------------------------------------------------
263
264 \brief sme_UpdateConfig() - Change configurations for all SME moduels
265
266 The function updates some configuration for modules in SME, CCM, CSR, etc
267 during SMEs close -> open sequence.
268
269 Modules inside SME apply the new configuration at the next transaction.
270
271
272 \param hHal - The handle returned by macOpen.
273 \Param pSmeConfigParams - a pointer to a caller allocated object of
274 typedef struct _smeConfigParams.
275
276 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
277
278 Other status means SME is failed to update the config parameters.
279 \sa
280
281 --------------------------------------------------------------------------*/
282eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
283
284#ifdef FEATURE_WLAN_SCAN_PNO
285/*--------------------------------------------------------------------------
286
287 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
288
289 It is used at driver start up to inform RIVA of the default channel
290 configuration.
291
292 This is a synchronuous call
293
294 \param hHal - The handle returned by macOpen.
295
296 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
297
298 Other status means SME is failed to update the channel config.
299 \sa
300
301 --------------------------------------------------------------------------*/
302eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
303
304#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700305/*--------------------------------------------------------------------------
306
307 \brief sme_set11dinfo() - Set the 11d information about valid channels
308 and there power using information from nvRAM
309 This function is called only for AP.
310
311 This is a synchronuous call
312
313 \param hHal - The handle returned by macOpen.
314 \Param pSmeConfigParams - a pointer to a caller allocated object of
315 typedef struct _smeConfigParams.
316
317 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
318
319 Other status means SME is failed to update the config parameters.
320 \sa
321--------------------------------------------------------------------------*/
322
323eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
324
325/*--------------------------------------------------------------------------
326
327 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
328
329 This is a synchronuous call
330
331 \param hHal - The handle returned by HostapdAdapter.
332 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
333
334 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
335
336 Other status means, failed to get the current regulatory domain.
337 \sa
338--------------------------------------------------------------------------*/
339
340eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
341
342eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
343
Jeff Johnson295189b2012-06-20 16:38:30 -0700344
345/* ---------------------------------------------------------------------------
346 \fn sme_ChangeConfigParams
347 \brief The SME API exposed for HDD to provide config params to SME during
348 SMEs stop -> start sequence.
349
350 If HDD changed the domain that will cause a reset. This function will
351 provide the new set of 11d information for the new domain. Currrently this
352 API provides info regarding 11d only at reset but we can extend this for
353 other params (PMC, QoS) which needs to be initialized again at reset.
354
355 This is a synchronuous call
356
357 \param hHal - The handle returned by macOpen.
358
359 \Param
360 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
361 currently provides 11d related information like Country code,
362 Regulatory domain, valid channel list, Tx power per channel, a
363 list with active/passive scan allowed per valid channel.
364
365 \return eHalStatus
366 ---------------------------------------------------------------------------*/
367eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
368 tCsrUpdateConfigParam *pUpdateConfigParam);
369
370/*--------------------------------------------------------------------------
371
372 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
373 is ready tio run.
374
375 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
376 to running state.
377
378
379 \param hHal - The handle returned by macOpen.
380
381 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
382
383 Other status means SME failed to send the message to PE.
384 \sa
385
386 --------------------------------------------------------------------------*/
387eHalStatus sme_HDDReadyInd(tHalHandle hHal);
388
389
390/*--------------------------------------------------------------------------
391
392 \brief sme_ProcessMsg() - The main message processor for SME.
393
394 The function is called by a message dispatcher when to process a message
395 targeted for SME.
396
397
398 \param hHal - The handle returned by macOpen.
399 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
400
401 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
402
403 Other status means SME failed to process the message.
404 \sa
405
406 --------------------------------------------------------------------------*/
407eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
408
409v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
410
411/* ---------------------------------------------------------------------------
412 \fn sme_ScanRequest
413 \brief a wrapper function to Request a 11d or full scan from CSR.
414 \param pScanRequestID - pointer to an object to get back the request ID
415 \param callback - a callback function that scan calls upon finish, will not
416 be called if csrScanRequest returns error
417 \param pContext - a pointer passed in for the callback
418 \return eHalStatus
419 ---------------------------------------------------------------------------*/
420eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
421 tANI_U32 *pScanRequestID,
422 csrScanCompleteCallback callback, void *pContext);
423
424
425/* ---------------------------------------------------------------------------
426 \fn sme_ScanSetBGScanparams
427 \brief a wrapper function to request CSR to set BG scan params in PE
428 \param pScanReq - BG scan request structure
429 \return eHalStatus
430 ---------------------------------------------------------------------------*/
431eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
432
433
434/* ---------------------------------------------------------------------------
435 \fn sme_ScanGetResult
436 \brief a wrapper function to request scan results from CSR.
437 \param pFilter - If pFilter is NULL, all cached results are returned
438 \param phResult - an object for the result.
439 \return eHalStatus
440 ---------------------------------------------------------------------------*/
441eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
442 tScanResultHandle *phResult);
443
444
445/* ---------------------------------------------------------------------------
446 \fn sme_ScanFlushResult
447 \brief a wrapper function to request CSR to clear scan results.
448 \return eHalStatus
449 ---------------------------------------------------------------------------*/
450eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530451
452/*
453 * ---------------------------------------------------------------------------
454 * \fn sme_FilterScanResults
455 * \brief a wrapper function to request CSR to filter the scan results based
456 * on valid chennel list.
457 * \return eHalStatus
458 *---------------------------------------------------------------------------
459 */
460eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
461
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700462eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700463
464/* ---------------------------------------------------------------------------
465 \fn sme_ScanResultGetFirst
466 \brief a wrapper function to request CSR to returns the first element of
467 scan result.
468 \param hScanResult - returned from csrScanGetResult
469 \return tCsrScanResultInfo * - NULL if no result
470 ---------------------------------------------------------------------------*/
471tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
472 tScanResultHandle hScanResult);
473
474/* ---------------------------------------------------------------------------
475 \fn sme_ScanResultGetNext
476 \brief a wrapper function to request CSR to returns the next element of
477 scan result. It can be called without calling csrScanResultGetFirst
478 first
479 \param hScanResult - returned from csrScanGetResult
480 \return Null if no result or reach the end
481 ---------------------------------------------------------------------------*/
482tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
483 tScanResultHandle hScanResult);
484
485/* ---------------------------------------------------------------------------
486 \fn sme_ScanResultPurge
487 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
488 in the list and free memory for each item
489 \param hScanResult - returned from csrScanGetResult. hScanResult is
490 considered gone by
491 calling this function and even before this function reutrns.
492 \return eHalStatus
493 ---------------------------------------------------------------------------*/
494eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
495
496/* ---------------------------------------------------------------------------
497 \fn sme_ScanGetPMKIDCandidateList
498 \brief a wrapper function to return the PMKID candidate list
499 \param pPmkidList - caller allocated buffer point to an array of
500 tPmkidCandidateInfo
501 \param pNumItems - pointer to a variable that has the number of
502 tPmkidCandidateInfo allocated when retruning, this is
503 either the number needed or number of items put into
504 pPmkidList
505 \return eHalStatus - when fail, it usually means the buffer allocated is not
506 big enough and pNumItems
507 has the number of tPmkidCandidateInfo.
508 \Note: pNumItems is a number of tPmkidCandidateInfo,
509 not sizeof(tPmkidCandidateInfo) * something
510 ---------------------------------------------------------------------------*/
511eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
512 tPmkidCandidateInfo *pPmkidList,
513 tANI_U32 *pNumItems );
514
515
516/*----------------------------------------------------------------------------
517 \fn sme_RoamRegisterLinkQualityIndCallback
518
519 \brief
520 a wrapper function to allow HDD to register a callback handler with CSR for
521 link quality indications.
522
523 Only one callback may be registered at any time.
524 In order to deregister the callback, a NULL cback may be provided.
525
526 Registration happens in the task context of the caller.
527
528 \param callback - Call back being registered
529 \param pContext - user data
530
531 DEPENDENCIES: After CSR open
532
533 \return eHalStatus
534-----------------------------------------------------------------------------*/
535eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
536 csrRoamLinkQualityIndCallback callback,
537 void *pContext);
538
539
540/* ---------------------------------------------------------------------------
541 \fn sme_RoamConnect
542 \brief a wrapper function to request CSR to inititiate an association
543 \param sessionId - the sessionId returned by sme_OpenSession.
544 \param pProfile - can be NULL to join to any open ones
545 \param pRoamId - to get back the request ID
546 \return eHalStatus
547 ---------------------------------------------------------------------------*/
548eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
549 tANI_U32 *pRoamId);
550
551/* ---------------------------------------------------------------------------
552 \fn sme_RoamReassoc
553 \brief a wrapper function to request CSR to inititiate a re-association
554 \param pProfile - can be NULL to join the currently connected AP. In that
555 case modProfileFields should carry the modified field(s) which could trigger
556 reassoc
557 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
558 that might need modification dynamically once STA is up & running and this
559 could trigger a reassoc
560 \param pRoamId - to get back the request ID
561 \return eHalStatus
562 -------------------------------------------------------------------------------*/
563eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
564 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700565 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700566
567/* ---------------------------------------------------------------------------
568 \fn sme_RoamConnectToLastProfile
569 \brief a wrapper function to request CSR to disconnect and reconnect with
570 the same profile
571 \return eHalStatus. It returns fail if currently connected
572 ---------------------------------------------------------------------------*/
573eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
574
575/* ---------------------------------------------------------------------------
576 \fn sme_RoamDisconnect
577 \brief a wrapper function to request CSR to disconnect from a network
578 \param reason -- To indicate the reason for disconnecting. Currently, only
579 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
580 \return eHalStatus
581 ---------------------------------------------------------------------------*/
582eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
583
Jeff Johnson295189b2012-06-20 16:38:30 -0700584/* ---------------------------------------------------------------------------
585 \fn sme_RoamStopBss
586 \brief a wrapper function to request CSR to stop bss
587 \param sessionId - sessionId of SoftAP
588 \return eHalStatus
589 ---------------------------------------------------------------------------*/
590eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
591
592/* ---------------------------------------------------------------------------
593 \fn sme_RoamGetAssociatedStas
594 \brief To probe the list of associated stations from various modules of CORE stack.
595 \This is an asynchronous API.
596 \param sessionId - sessionId of SoftAP
597 \param modId - Module from whom list of associtated stations is to be probed.
598 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
599 \param pUsrContext - Opaque HDD context
600 \param pfnSapEventCallback - Sap event callback in HDD
601 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
602 \return eHalStatus
603 -------------------------------------------------------------------------------*/
604eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
605 VOS_MODULE_ID modId, void *pUsrContext,
606 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
607
608/* ---------------------------------------------------------------------------
609 \fn sme_RoamDisconnectSta
610 \brief To disassociate a station. This is an asynchronous API.
611 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
612 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
613 -------------------------------------------------------------------------------*/
614eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
615
616/* ---------------------------------------------------------------------------
617 \fn sme_RoamDeauthSta
618 \brief To disassociate a station. This is an asynchronous API.
619 \param hHal - Global structure
620 \param sessionId - sessionId of SoftAP
621 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
622 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
623 -------------------------------------------------------------------------------*/
624eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
625 tANI_U8 *pPeerMacAddr);
626
627/* ---------------------------------------------------------------------------
628 \fn sme_RoamTKIPCounterMeasures
629 \brief To start or stop TKIP counter measures. This is an asynchronous API.
630 \param sessionId - sessionId of SoftAP
631 \param bEnable - Flag to start/stop TKIP countermeasures
632 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
633 -------------------------------------------------------------------------------*/
634eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
635
636/* ---------------------------------------------------------------------------
637 \fn sme_RoamGetWpsSessionOverlap
638 \brief To get the WPS PBC session overlap information.
639 \This is an asynchronous API.
640 \param sessionId - sessionId of SoftAP
641 \param pUsrContext - Opaque HDD context
642 \param pfnSapEventCallback - Sap event callback in HDD
643 \return eHalStatus
644 -------------------------------------------------------------------------------*/
645eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
646 void *pUsrContext, void *pfnSapEventCallback,
647 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700648
649/* ---------------------------------------------------------------------------
650 \fn sme_RoamGetConnectState
651 \brief a wrapper function to request CSR to return the current connect state
652 of Roaming
653 \return eHalStatus
654 ---------------------------------------------------------------------------*/
655eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
656
657/* ---------------------------------------------------------------------------
658 \fn sme_RoamGetConnectProfile
659 \brief a wrapper function to request CSR to return the current connect
660 profile. Caller must call csrRoamFreeConnectProfile after it is done
661 and before reuse for another csrRoamGetConnectProfile call.
662 \param pProfile - pointer to a caller allocated structure
663 tCsrRoamConnectedProfile
664 \return eHalStatus. Failure if not connected
665 ---------------------------------------------------------------------------*/
666eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
667 tCsrRoamConnectedProfile *pProfile);
668
669/* ---------------------------------------------------------------------------
670 \fn sme_RoamFreeConnectProfile
671 \brief a wrapper function to request CSR to free and reinitialize the
672 profile returned previously by csrRoamGetConnectProfile.
673 \param pProfile - pointer to a caller allocated structure
674 tCsrRoamConnectedProfile
675 \return eHalStatus.
676 ---------------------------------------------------------------------------*/
677eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
678 tCsrRoamConnectedProfile *pProfile);
679
680/* ---------------------------------------------------------------------------
681 \fn sme_RoamSetPMKIDCache
682 \brief a wrapper function to request CSR to return the PMKID candidate list
683 \param pPMKIDCache - caller allocated buffer point to an array of
684 tPmkidCacheInfo
685 \param numItems - a variable that has the number of tPmkidCacheInfo
686 allocated when retruning, this is either the number needed
687 or number of items put into pPMKIDCache
688 \return eHalStatus - when fail, it usually means the buffer allocated is not
689 big enough and pNumItems has the number of
690 tPmkidCacheInfo.
691 \Note: pNumItems is a number of tPmkidCacheInfo,
692 not sizeof(tPmkidCacheInfo) * something
693 ---------------------------------------------------------------------------*/
694eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId, tPmkidCacheInfo *pPMKIDCache,
695 tANI_U32 numItems );
696
697/* ---------------------------------------------------------------------------
698 \fn sme_RoamGetSecurityReqIE
699 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
700 passes to PE to JOIN request or START_BSS request
701 This is a synchronuous call.
702 \param sessionId - returned by sme_OpenSession.
703 \param pLen - caller allocated memory that has the length of pBuf as input.
704 Upon returned, *pLen has the needed or IE length in pBuf.
705 \param pBuf - Caller allocated memory that contain the IE field, if any,
706 upon return
707 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
708 \return eHalStatus - when fail, it usually means the buffer allocated is not
709 big enough
710 ---------------------------------------------------------------------------*/
711eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
712 tANI_U8 *pBuf, eCsrSecurityType secType);
713
714/* ---------------------------------------------------------------------------
715 \fn sme_RoamGetSecurityRspIE
716 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
717 the beacon or probe rsp if connected
718 \param sessionId - returned by sme_OpenSession.
719 \param pLen - caller allocated memory that has the length of pBuf as input.
720 Upon returned, *pLen has the needed or IE length in pBuf.
721 \param pBuf - Caller allocated memory that contain the IE field, if any,
722 upon return
723 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
724 \return eHalStatus - when fail, it usually means the buffer allocated is not
725 big enough
726 ---------------------------------------------------------------------------*/
727eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
728 tANI_U8 *pBuf, eCsrSecurityType secType);
729
730
731/* ---------------------------------------------------------------------------
732 \fn sme_RoamGetNumPMKIDCache
733 \brief a wrapper function to request CSR to return number of PMKID cache
734 entries
735 \return tANI_U32 - the number of PMKID cache entries
736 ---------------------------------------------------------------------------*/
737tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
738
739/* ---------------------------------------------------------------------------
740 \fn sme_RoamGetPMKIDCache
741 \brief a wrapper function to request CSR to return PMKID cache from CSR
742 \param pNum - caller allocated memory that has the space of the number of
743 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
744 needed or actually number in tPmkidCacheInfo.
745 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
746 any, upon return
747 \return eHalStatus - when fail, it usually means the buffer allocated is not
748 big enough
749 ---------------------------------------------------------------------------*/
750eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
751 tPmkidCacheInfo *pPmkidCache);
752
753/* ---------------------------------------------------------------------------
754 \fn sme_GetConfigParam
755 \brief a wrapper function that HDD calls to get the global settings
756 currently maintained by CSR.
757 \param pParam - caller allocated memory
758 \return eHalStatus
759 ---------------------------------------------------------------------------*/
760eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
761
762/* ---------------------------------------------------------------------------
763 \fn sme_GetStatistics
764 \brief a wrapper function that client calls to register a callback to get
765 different PHY level statistics from CSR.
766
767 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
768 \param statsMask - The different category/categories of stats requester is looking for
769 The order in which you set the bits in the statsMask for requesting
770 different type of stats is:
771
772 eCsrSummaryStats = bit 0
773 eCsrGlobalClassAStats = bit 1
774 eCsrGlobalClassBStats = bit 2
775 eCsrGlobalClassCStats = bit 3
776 eCsrGlobalClassDStats = bit 4
777 eCsrPerStaStats = bit 5
778
779 \param callback - SME sends back the requested stats using the callback
780 \param periodicity - If requester needs periodic update, 0 means it's an one
781 time request
782 \param cache - If requester is happy with cached stats
783 \param staId - The station ID for which the stats is requested for
784 \param pContext - user context to be passed back along with the callback
785 \return eHalStatus
786 ---------------------------------------------------------------------------*/
787eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
788 tANI_U32 statsMask,
789 tCsrStatsCallback callback,
790 tANI_U32 periodicity, tANI_BOOLEAN cache,
791 tANI_U8 staId, void *pContext);
792
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +0530793/* ---------------------------------------------------------------------------
794 \fn smeGetTLSTAState
795 \helper function to get teh TL STA State whenever the function is called.
796
797 \param staId - The staID to be passed to the TL
798 to get the relevant TL STA State
799 \return the state as tANI_U16
800 ---------------------------------------------------------------------------*/
801tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
802
Jeff Johnson295189b2012-06-20 16:38:30 -0700803eHalStatus sme_GetRssi(tHalHandle hHal,
804 tCsrRssiCallback callback,
805 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530806
807/* ---------------------------------------------------------------------------
808 \fn sme_GetSnr
809 \brief a wrapper function that client calls to register a callback to get
810 SNR from FW
811
812 \param callback - SME sends back the requested stats using the callback
813 \param staId - The station ID for which the stats is requested for
814 \param bssid - The bssid of the connected session
815 \param pContext - user context to be passed back along with the callback
816 ---------------------------------------------------------------------------*/
817eHalStatus sme_GetSnr(tHalHandle hHal,
818 tCsrSnrCallback callback,
819 tANI_U8 staId, tCsrBssid bssId,
820 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800821#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -0800822eHalStatus sme_GetRoamRssi(tHalHandle hHal,
823 tCsrRssiCallback callback,
824 tANI_U8 staId,
825 tCsrBssid bssId,
826 void *pContext,
827 void* pVosContext);
828#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700829
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800830#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700831/* ---------------------------------------------------------------------------
832 \fn sme_GetTsmStats
833 \brief a wrapper function that client calls to register a callback to get TSM Stats
834
835 \param callback - SME sends back the requested stats using the callback
836 \param staId - The station ID for which the stats is requested for
837 \param pContext - user context to be passed back along with the callback
838 \param pVosContext - vos context
839 \return eHalStatus
840 ---------------------------------------------------------------------------*/
841eHalStatus sme_GetTsmStats(tHalHandle hHal,
842 tCsrTsmStatsCallback callback,
843 tANI_U8 staId, tCsrBssid bssId,
844 void *pContext, void* pVosContext, tANI_U8 tid);
845
846/* ---------------------------------------------------------------------------
847 \fn sme_SetCCKMIe
848 \brief function to store the CCKM IE passed from supplicant and use it while packing
849 reassociation request
850 \param hHal - HAL handle for device
851 \param pCckmIe - pointer to CCKM IE data
852 \param pCckmIeLen - length of the CCKM IE
853 \- return Success or failure
854 -------------------------------------------------------------------------*/
855eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
856
857
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800858/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800859 \fn sme_SetEseBeaconRequest
860 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800861 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800862 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800863 \- return Success or failure
864 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800865eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
866 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800867
868
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800869#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700870/* ---------------------------------------------------------------------------
871 \fn sme_CfgSetInt
872 \brief a wrapper function that HDD calls to set parameters in CFG.
873 \param cfgId - Configuration Parameter ID (type) for STA.
874 \param ccmValue - The information related to Configuration Parameter ID
875 which needs to be saved in CFG
876 \param callback - To be registered by CSR with CCM. Once the CFG done with
877 saving the information in the database, it notifies CCM &
878 then the callback will be invoked to notify.
879 \param toBeSaved - To save the request for future reference
880 \return eHalStatus
881 ---------------------------------------------------------------------------*/
882eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
883 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
884
885/* ---------------------------------------------------------------------------
886 \fn sme_CfgSetStr
887 \brief a wrapper function that HDD calls to set parameters in CFG.
888 \param cfgId - Configuration Parameter ID (type) for STA.
889 \param pStr - Pointer to the byte array which carries the information needs
890 to be saved in CFG
891 \param length - Length of the data to be saved
892 \param callback - To be registered by CSR with CCM. Once the CFG done with
893 saving the information in the database, it notifies CCM &
894 then the callback will be invoked to notify.
895 \param toBeSaved - To save the request for future reference
896 \return eHalStatus
897 ---------------------------------------------------------------------------*/
898eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
899 tANI_U32 length, tCcmCfgSetCallback callback,
900 eAniBoolean toBeSaved) ;
901
902
903/* ---------------------------------------------------------------------------
904 \fn sme_GetModifyProfileFields
905 \brief HDD or SME - QOS calls this function to get the current values of
906 connected profile fields, changing which can cause reassoc.
907 This function must be called after CFG is downloaded and STA is in connected
908 state. Also, make sure to call this function to get the current profile
909 fields before calling the reassoc. So that pModifyProfileFields will have
910 all the latest values plus the one(s) has been updated as part of reassoc
911 request.
912 \param pModifyProfileFields - pointer to the connected profile fields
913 changing which can cause reassoc
914
915 \return eHalStatus
916 -------------------------------------------------------------------------------*/
917eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
918 tCsrRoamModifyProfileFields * pModifyProfileFields);
919
Sandeep Puligilla332ea912014-02-04 00:16:24 +0530920/* ---------------------------------------------------------------------------
921 \fn sme_HT40StopOBSSScan
922 \brief HDD or SME - Command to stop the OBSS scan
923 THis is implemented only for debugging purpose.
924 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
925 \param sessionId - sessionId
926 changing which can cause reassoc
927
928 \return eHalStatus
929 -------------------------------------------------------------------------------*/
930eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -0700931
932/*--------------------------------------------------------------------------
933 \fn sme_SetConfigPowerSave
934 \brief Wrapper fn to change power save configuration in SME (PMC) module.
935 For BMPS related configuration, this function also updates the CFG
936 and sends a message to FW to pick up the new values. Note: Calling
937 this function only updates the configuration and does not enable
938 the specified power save mode.
939 \param hHal - The handle returned by macOpen.
940 \param psMode - Power Saving mode being modified
941 \param pConfigParams - a pointer to a caller allocated object of type
942 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
943 \return eHalStatus
944 --------------------------------------------------------------------------*/
945eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
946 void *pConfigParams);
947
948/*--------------------------------------------------------------------------
949 \fn sme_GetConfigPowerSave
950 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
951 \param hHal - The handle returned by macOpen.
952 \param psMode - Power Saving mode
953 \param pConfigParams - a pointer to a caller allocated object of type
954 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
955 \return eHalStatus
956 --------------------------------------------------------------------------*/
957eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
958 void *pConfigParams);
959
960/* ---------------------------------------------------------------------------
961 \fn sme_SignalPowerEvent
962 \brief Signals to PMC that a power event has occurred. Used for putting
963 the chip into deep sleep mode.
964 \param hHal - The handle returned by macOpen.
965 \param event - the event that has occurred
966 \return eHalStatus
967 ---------------------------------------------------------------------------*/
968extern eHalStatus sme_SignalPowerEvent (
969 tHalHandle hHal,
970 tPmcPowerEvent event);
971
972/* ---------------------------------------------------------------------------
973 \fn sme_EnablePowerSave
974 \brief Enables one of the power saving modes. This API does not cause a
975 device state change. This is purely a configuration API.
976 \param hHal - The handle returned by macOpen.
977 \param psMode - The power saving mode to enable.
978 \return eHalStatus
979 ---------------------------------------------------------------------------*/
980extern eHalStatus sme_EnablePowerSave (
981 tHalHandle hHal,
982 tPmcPowerSavingMode psMode);
983
984/* ---------------------------------------------------------------------------
985 \fn sme_DisablePowerSave
986 \brief Disables one of the power saving modes.Disabling does not imply
987 that device will be brought out of the current PS mode. This is
988 purely a configuration API.
989 \param hHal - The handle returned by macOpen.
990 \param psMode - The power saving mode to disable.
991 \return eHalStatus
992 ---------------------------------------------------------------------------*/
993extern eHalStatus sme_DisablePowerSave (
994 tHalHandle hHal,
995 tPmcPowerSavingMode psMode);
996
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +0530997 /* ---------------------------------------------------------------------------
998 \fn sme_SetHostPowerSave
999 \brief The BMPS logic is controlled by the User level Apps
1000 \param hHal - The handle returned by macOpen.
1001 \param psMode - The power saving mode to enable.
1002 \return eHalStatus
1003 ---------------------------------------------------------------------------*/
1004extern eHalStatus sme_SetHostPowerSave (
1005 tHalHandle hHal,
1006 v_BOOL_t psMode);
1007
Jeff Johnson295189b2012-06-20 16:38:30 -07001008/* ---------------------------------------------------------------------------
1009 \fn sme_StartAutoBmpsTimer
1010 \brief Starts a timer that periodically polls all the registered
1011 module for entry into Bmps mode. This timer is started only if BMPS is
1012 enabled and whenever the device is in full power.
1013 \param hHal - The handle returned by macOpen.
1014 \return eHalStatus
1015 ---------------------------------------------------------------------------*/
1016extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1017
1018/* ---------------------------------------------------------------------------
1019 \fn sme_StopAutoBmpsTimer
1020 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1021 Stopping the timer does not cause a device state change. Only the timer
1022 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1023 \param hHal - The handle returned by macOpen.
1024 \return eHalStatus
1025 ---------------------------------------------------------------------------*/
1026extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1027
1028/* ---------------------------------------------------------------------------
1029 \fn sme_QueryPowerState
1030 \brief Returns the current power state of the device.
1031 \param hHal - The handle returned by macOpen.
1032 \param pPowerState - pointer to location to return power state
1033 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1034 \return eHalStatus
1035 ---------------------------------------------------------------------------*/
1036extern eHalStatus sme_QueryPowerState (
1037 tHalHandle hHal,
1038 tPmcPowerState *pPowerState,
1039 tPmcSwitchState *pSwWlanSwitchState);
1040
1041/* ---------------------------------------------------------------------------
1042 \fn sme_IsPowerSaveEnabled
1043 \brief Checks if the device is able to enter a particular power save mode
1044 This does not imply that the device is in a particular PS mode
1045 \param hHal - The handle returned by macOpen.
1046 \param psMode - the power saving mode
1047 \return eHalStatus
1048 ---------------------------------------------------------------------------*/
1049extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1050 tHalHandle hHal,
1051 tPmcPowerSavingMode psMode);
1052
1053/* ---------------------------------------------------------------------------
1054 \fn sme_RequestFullPower
1055 \brief Request that the device be brought to full power state.
1056 Note 1: If "fullPowerReason" specificied in this API is set to
1057 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1058 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1059 HDD is requesting full power, we need to undo any previous HDD requests for
1060 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1061 specified anything other than above, the buffered requests for BMPS and WoWL
1062 will not be cleared.
1063 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1064 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1065 request".
1066 Note 3: When the device finally enters Full Power PMC will start a timer
1067 if any of the following holds true:
1068 - Auto BMPS mode is enabled
1069 - Uapsd request is pending
1070 - HDD's request for BMPS is pending
1071 - HDD's request for WoWL is pending
1072 On timer expiry PMC will attempt to put the device in BMPS mode if following
1073 (in addition to those listed above) holds true:
1074 - Polling of all modules through the Power Save Check routine passes
1075 - STA is associated to an access point
1076 \param hHal - The handle returned by macOpen.
1077 \param - callbackRoutine Callback routine invoked in case of success/failure
1078 \param - callbackContext - Cookie to be passed back during callback
1079 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1080 distinguish between BAP and HDD requests
1081 \return eHalStatus - status
1082 eHAL_STATUS_SUCCESS - device brought to full power state
1083 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1084 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1085 ---------------------------------------------------------------------------*/
1086extern eHalStatus sme_RequestFullPower (
1087 tHalHandle hHal,
1088 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1089 void *callbackContext,
1090 tRequestFullPowerReason fullPowerReason);
1091
1092/* ---------------------------------------------------------------------------
1093 \fn sme_RequestBmps
1094 \brief Request that the device be put in BMPS state. Request will be
1095 accepted only if BMPS mode is enabled and power save check routine
1096 passes. Only HDD should invoke this API.
1097 \param hHal - The handle returned by macOpen.
1098 \param - callbackRoutine Callback routine invoked in case of success/failure
1099 \param - callbackContext - Cookie to be passed back during callback
1100 \return eHalStatus
1101 eHAL_STATUS_SUCCESS - device is in BMPS state
1102 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1103 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1104 ---------------------------------------------------------------------------*/
1105extern eHalStatus sme_RequestBmps (
1106 tHalHandle hHal,
1107 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1108 void *callbackContext);
1109
1110/* ---------------------------------------------------------------------------
1111 \fn sme_SetDHCPTillPowerActiveFlag
1112 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1113 entry by PMC
1114 \param hHal - The handle returned by macOpen.
1115 ---------------------------------------------------------------------------*/
1116void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1117
1118
1119/* ---------------------------------------------------------------------------
1120 \fn sme_StartUapsd
1121 \brief Request that the device be put in UAPSD state. If the device is in
1122 Full Power it will be put in BMPS mode first and then into UAPSD
1123 mode.
1124 \param hHal - The handle returned by macOpen.
1125 \param - callbackRoutine Callback routine invoked in case of success/failure
1126 \param - callbackContext - Cookie to be passed back during callback
1127 eHAL_STATUS_SUCCESS - device is in UAPSD state
1128 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1129 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1130 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1131 \return eHalStatus
1132 ---------------------------------------------------------------------------*/
1133extern eHalStatus sme_StartUapsd (
1134 tHalHandle hHal,
1135 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1136 void *callbackContext);
1137
1138/* ---------------------------------------------------------------------------
1139 \fn sme_StopUapsd
1140 \brief Request that the device be put out of UAPSD state. Device will be
1141 put in in BMPS state after stop UAPSD completes. Buffered requests for
1142 UAPSD will be cleared after this.
1143 \param hHal - The handle returned by macOpen.
1144 \return eHalStatus
1145 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1146 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1147 ---------------------------------------------------------------------------*/
1148extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1149
1150/* ---------------------------------------------------------------------------
1151 \fn sme_RequestStandby
1152 \brief Request that the device be put in standby. It is HDD's responsibility
1153 to bring the chip to full power and do a discconnect before calling
1154 this API. Request for standby will be rejected if STA is associated
1155 to an AP.
1156 \param hHal - The handle returned by macOpen.
1157 \param - callbackRoutine Callback routine invoked in case of success/failure
1158 \param - callbackContext - Cookie to be passed back during callback
1159 \return eHalStatus
1160 eHAL_STATUS_SUCCESS - device is in Standby mode
1161 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1162 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1163 ---------------------------------------------------------------------------*/
1164extern eHalStatus sme_RequestStandby (
1165 tHalHandle hHal,
1166 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1167 void *callbackContext);
1168
1169/* ---------------------------------------------------------------------------
1170 \fn sme_RegisterPowerSaveCheck
1171 \brief Register a power save check routine that is called whenever
1172 the device is about to enter one of the power save modes.
1173 \param hHal - The handle returned by macOpen.
1174 \param checkRoutine - Power save check routine to be registered
1175 \param callbackContext - Cookie to be passed back during callback
1176 \return eHalStatus
1177 eHAL_STATUS_SUCCESS - successfully registered
1178 eHAL_STATUS_FAILURE - not successfully registered
1179 ---------------------------------------------------------------------------*/
1180extern eHalStatus sme_RegisterPowerSaveCheck (
1181 tHalHandle hHal,
1182 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1183
1184/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301185 \fn sme_Register11dScanDoneCallback
1186 \brief Register a routine of type csrScanCompleteCallback which is
1187 called whenever an 11d scan is done
1188 \param hHal - The handle returned by macOpen.
1189 \param callback - 11d scan complete routine to be registered
1190 \return eHalStatus
1191 ---------------------------------------------------------------------------*/
1192extern eHalStatus sme_Register11dScanDoneCallback (
1193 tHalHandle hHal,
1194 csrScanCompleteCallback);
1195
1196/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001197 \fn sme_DeregisterPowerSaveCheck
1198 \brief Deregister a power save check routine
1199 \param hHal - The handle returned by macOpen.
1200 \param checkRoutine - Power save check routine to be deregistered
1201 \return eHalStatus
1202 eHAL_STATUS_SUCCESS - successfully deregistered
1203 eHAL_STATUS_FAILURE - not successfully deregistered
1204 ---------------------------------------------------------------------------*/
1205extern eHalStatus sme_DeregisterPowerSaveCheck (
1206 tHalHandle hHal,
1207 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1208
1209/* ---------------------------------------------------------------------------
1210 \fn sme_RegisterDeviceStateUpdateInd
1211 \brief Register a callback routine that is called whenever
1212 the device enters a new device state (Full Power, BMPS, UAPSD)
1213 \param hHal - The handle returned by macOpen.
1214 \param callbackRoutine - Callback routine to be registered
1215 \param callbackContext - Cookie to be passed back during callback
1216 \return eHalStatus
1217 eHAL_STATUS_SUCCESS - successfully registered
1218 eHAL_STATUS_FAILURE - not successfully registered
1219 ---------------------------------------------------------------------------*/
1220extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1221 tHalHandle hHal,
1222 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1223 void *callbackContext);
1224
1225/* ---------------------------------------------------------------------------
1226 \fn sme_DeregisterDeviceStateUpdateInd
1227 \brief Deregister a routine that was registered for device state changes
1228 \param hHal - The handle returned by macOpen.
1229 \param callbackRoutine - Callback routine to be deregistered
1230 \return eHalStatus
1231 eHAL_STATUS_SUCCESS - successfully deregistered
1232 eHAL_STATUS_FAILURE - not successfully deregistered
1233 ---------------------------------------------------------------------------*/
1234extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1235 tHalHandle hHal,
1236 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1237
1238/* ---------------------------------------------------------------------------
1239 \fn sme_WowlAddBcastPattern
1240 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1241 do a pattern match on these patterns when Wowl is enabled during BMPS
1242 mode.
1243 \param hHal - The handle returned by macOpen.
1244 \param pattern - Pattern to be added
1245 \return eHalStatus
1246 eHAL_STATUS_FAILURE Cannot add pattern
1247 eHAL_STATUS_SUCCESS Request accepted.
1248 ---------------------------------------------------------------------------*/
1249extern eHalStatus sme_WowlAddBcastPattern (
1250 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001251 tpSirWowlAddBcastPtrn pattern,
1252 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001253
1254/* ---------------------------------------------------------------------------
1255 \fn sme_WowlDelBcastPattern
1256 \brief Delete a pattern that was added for Pattern Byte Matching.
1257 \param hHal - The handle returned by macOpen.
1258 \param pattern - Pattern to be deleted
1259 \return eHalStatus
1260 eHAL_STATUS_FAILURE Cannot delete pattern
1261 eHAL_STATUS_SUCCESS Request accepted.
1262 ---------------------------------------------------------------------------*/
1263extern eHalStatus sme_WowlDelBcastPattern (
1264 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001265 tpSirWowlDelBcastPtrn pattern,
1266 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001267
1268/* ---------------------------------------------------------------------------
1269 \fn sme_EnterWowl
1270 \brief This is the API to request entry into WOWL mode.
1271 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1272 SME will will cache the information that WOWL has been requested and
1273 attempt to put the device in BMPS first. On entry into BMPS, SME will
1274 enter the WOWL mode.
1275 Note 1: After WoWL request is accepted, If module other than HDD requests
1276 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1277 and attempt to put the chip into BMPS+WOWL based on a timer.
1278 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1279 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1280 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1281 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1282 are required. Currently there is no requirement or use case to support UAPSD
1283 and WOWL at the same time.
1284 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1285 Note 5. Request for WoWL is rejected if BMPS is disabled.
1286
1287 \param hHal - The handle returned by macOpen.
1288 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1289 Used for success/failure notification by SME
1290 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1291 at the time of callback.
1292 \param wakeReasonIndCB - Callback routine provided by HDD.
1293 Used for Wake Reason Indication by SME
1294 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1295 at the time of callback.
1296 \return eHalStatus
1297 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1298 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1299 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1300 mode is entered.
1301 ---------------------------------------------------------------------------*/
1302extern eHalStatus sme_EnterWowl (
1303 tHalHandle hHal,
1304 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1305 void *enterWowlCallbackContext,
1306#ifdef WLAN_WAKEUP_EVENTS
1307 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1308 void *wakeReasonIndCBContext,
1309#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001310 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001311
1312/* ---------------------------------------------------------------------------
1313 \fn sme_ExitWowl
1314 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1315 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1316 mode. Any Buffered request for WoWL will be cleared after this API.
1317 \param hHal - The handle returned by macOpen.
1318 \return eHalStatus
1319 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1320 only if the previous "Enter WOWL" transaction has
1321 not even completed.
1322 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1323 ---------------------------------------------------------------------------*/
1324extern eHalStatus sme_ExitWowl (tHalHandle hHal);
1325
1326/* ---------------------------------------------------------------------------
1327
1328 \fn sme_RoamSetKey
1329
1330 \brief To set encryption key. This function should be called only when connected
1331 This is an asynchronous API.
1332
1333 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1334
1335 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1336
1337 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1338
1339 FAILURE or RESOURCES The API finished and failed.
1340
1341 -------------------------------------------------------------------------------*/
1342eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1343
1344/* ---------------------------------------------------------------------------
1345
1346 \fn sme_RoamRemoveKey
1347
1348 \brief To set encryption key. This is an asynchronous API.
1349
1350 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1351
1352 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1353
1354 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1355
1356 FAILURE or RESOURCES The API finished and failed.
1357
1358 -------------------------------------------------------------------------------*/
1359eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1360
1361
1362/* ---------------------------------------------------------------------------
1363
1364 \fn sme_GetCountryCode
1365
1366 \brief To return the current country code. If no country code is applied, default country code is
1367 used to fill the buffer.
1368 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1369 This is a synchronous API.
1370
1371 \param pBuf - pointer to a caller allocated buffer for returned country code.
1372
1373 \param pbLen For input, this parameter indicates how big is the buffer.
1374 Upon return, this parameter has the number of bytes for country. If pBuf
1375 doesn't have enough space, this function returns
1376 fail status and this parameter contains the number that is needed.
1377
1378 \return eHalStatus SUCCESS.
1379
1380 FAILURE or RESOURCES The API finished and failed.
1381
1382 -------------------------------------------------------------------------------*/
1383eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1384
1385/* ---------------------------------------------------------------------------
1386
1387 \fn sme_SetCountryCode
1388
1389 \brief To change the current/default country code.
1390 If 11d supported is turned off, an error is return.
1391 This is a synchronous API.
1392
1393 \param pCountry - pointer to a caller allocated buffer for the country code.
1394
1395 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1396 whether a reset is required.
1397
1398 \return eHalStatus SUCCESS.
1399
1400 FAILURE or RESOURCES The API finished and failed.
1401
1402 -------------------------------------------------------------------------------*/
1403eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1404
1405/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301406
1407 \fn sme_InitChannels
1408
1409 \brief Used to initialize CSR channel lists while driver loading
1410
1411 \param hHal - global pMac structure
1412
1413 \return eHalStatus SUCCESS.
1414
1415 FAILURE or RESOURCES The API finished and failed.
1416
1417 -------------------------------------------------------------------------------*/
1418eHalStatus sme_InitChannels(tHalHandle hHal);
1419
1420/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001421 \fn sme_ResetCountryCodeInformation
1422 \brief this function is to reset the country code current being used back to EEPROM default
1423 this includes channel list and power setting. This is a synchronous API.
1424 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1425 a restart is needed to apply the change
1426 \return eHalStatus
1427 -------------------------------------------------------------------------------*/
1428eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1429
1430/* ---------------------------------------------------------------------------
1431 \fn sme_GetSupportedCountryCode
1432 \brief this function is to get a list of the country code current being supported
1433 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1434 this has the country code list. 3 bytes for each country code. This may be NULL if
1435 caller wants to know the needed byte count.
1436 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1437 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1438 \return eHalStatus
1439 -------------------------------------------------------------------------------*/
1440eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1441
1442/* ---------------------------------------------------------------------------
1443 \fn sme_GetCurrentRegulatoryDomain
1444 \brief this function is to get the current regulatory domain. This is a synchronous API.
1445 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1446 SME. The function fails if 11d support is turned off.
1447 \param pDomain - Caller allocated buffer to return the current domain.
1448 \return eHalStatus SUCCESS.
1449
1450 FAILURE or RESOURCES The API finished and failed.
1451 -------------------------------------------------------------------------------*/
1452eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1453
1454/* ---------------------------------------------------------------------------
1455 \fn sme_SetRegulatoryDomain
1456 \brief this function is to set the current regulatory domain.
1457 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1458 SME. This is a synchronous API.
1459 \param domainId - indicate the domain (defined in the driver) needs to set to.
1460 See v_REGDOMAIN_t for definition
1461 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1462 a restart is needed to apply the change
1463 \return eHalStatus
1464 -------------------------------------------------------------------------------*/
1465eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1466
1467/* ---------------------------------------------------------------------------
1468
1469 \fn sme_GetRegulatoryDomainForCountry
1470
1471 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1472
1473 \param pCountry - pointer to a caller allocated buffer for input country code.
1474
1475 \param pDomainId Upon successful return, it is the domain that country belongs to.
1476 If it is NULL, returning success means that the country code is known.
1477
1478 \return eHalStatus SUCCESS.
1479
1480 FAILURE or RESOURCES The API finished and failed.
1481
1482 -------------------------------------------------------------------------------*/
1483eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1484
1485
1486
1487/* ---------------------------------------------------------------------------
1488
1489 \fn sme_GetSupportedRegulatoryDomains
1490
1491 \brief To return a list of supported regulatory domains. This is a synchronous API.
1492
1493 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1494
1495 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1496 Upon return, this parameter has the number for supported domains. If pDomains
1497 doesn't have enough space for all the supported domains, this function returns
1498 fail status and this parameter contains the number that is needed.
1499
1500 \return eHalStatus SUCCESS.
1501
1502 FAILURE or RESOURCES The API finished and failed.
1503
1504 -------------------------------------------------------------------------------*/
1505eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1506
1507//some support functions
1508tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1509tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1510tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1511//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1512eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1513
1514typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1515/* ---------------------------------------------------------------------------
1516
1517 \fn sme_ChangeCountryCode
1518
1519 \brief Change Country code from upperlayer during WLAN driver operation.
1520 This is a synchronous API.
1521
1522 \param hHal - The handle returned by macOpen.
1523
1524 \param pCountry New Country Code String
1525
Abhishek Singha306a442013-11-07 18:39:01 +05301526 \param sendRegHint If we want to send reg hint to nl80211
1527
Jeff Johnson295189b2012-06-20 16:38:30 -07001528 \return eHalStatus SUCCESS.
1529
1530 FAILURE or RESOURCES The API finished and failed.
1531
1532 -------------------------------------------------------------------------------*/
1533eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1534 tSmeChangeCountryCallback callback,
1535 tANI_U8 *pCountry,
1536 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301537 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301538 tAniBool countryFromUserSpace,
1539 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001540
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301541/* ---------------------------------------------------------------------------
1542
Amar Singhal0d15bd52013-10-12 23:13:13 -07001543 \fn sme_GenericChangeCountryCode
1544
1545 \brief Generic API to change country code
1546
1547 \param hHal - The handle returned by macOpen.
1548
1549 \param pCountry New Country Code String
1550
1551 \param reg_domain Regulatory domain for the new country code
1552
1553 \return eHalStatus SUCCESS.
1554
1555 FAILURE or RESOURCES The API finished and failed.
1556
1557 -------------------------------------------------------------------------------*/
1558eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1559 tANI_U8 *pCountry,
1560 v_REGDOMAIN_t reg_domain);
1561
1562/* ---------------------------------------------------------------------------
1563
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301564 \fn sme_DHCPStartInd
1565
1566 \brief Indicate FW about DHCP start event.
1567
1568 \param hHal - The handle returned by macOpen.
1569
1570 \param device_mode the mode of the device
1571
c_hpothu0b0cab72014-02-13 21:52:40 +05301572 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301573
1574 \return eHalStatus SUCCESS.
1575
1576 FAILURE or RESOURCES The API finished and failed.
1577
1578 -------------------------------------------------------------------------------*/
1579
1580eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1581 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301582 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301583
1584/* ---------------------------------------------------------------------------
1585
1586 \fn sme_DHCPStopInd
1587
1588 \brief Indicate FW about DHCP stop event.
1589
1590 \param hHal - The handle returned by macOpen.
1591
1592 \param device_mode the mode of the device
1593
c_hpothu0b0cab72014-02-13 21:52:40 +05301594 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301595
1596 \return eHalStatus SUCCESS.
1597
1598 FAILURE or RESOURCES The API finished and failed.
1599
1600 -------------------------------------------------------------------------------*/
1601eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1602 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301603 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301604
Jeff Johnson295189b2012-06-20 16:38:30 -07001605
1606/* ---------------------------------------------------------------------------
1607 \fn sme_BtcSignalBtEvent
1608 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1609 BT event type and the current operating mode of Libra (full power,
1610 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1611 would be employed.
1612 \param hHal - The handle returned by macOpen.
1613 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1614 Caller owns the memory and is responsible for freeing it.
1615 \return VOS_STATUS
1616 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1617 if driver has not yet been initialized or if BTC
1618 Events Layer has been disabled.
1619 VOS_STATUS_SUCCESS BT Event passed to HAL
1620 ---------------------------------------------------------------------------*/
1621VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1622
1623/* ---------------------------------------------------------------------------
1624 \fn sme_BtcSetConfig
1625 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1626 This function should be invoked only after CFG download has completed.
1627 Calling it after sme_HDDReadyInd is recommended.
1628 \param hHal - The handle returned by macOpen.
1629 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1630 tSmeBtcConfig. Caller owns the memory and is responsible
1631 for freeing it.
1632 \return VOS_STATUS
1633 VOS_STATUS_E_FAILURE Config not passed to HAL.
1634 VOS_STATUS_SUCCESS Config passed to HAL
1635 ---------------------------------------------------------------------------*/
1636VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1637
1638/* ---------------------------------------------------------------------------
1639 \fn sme_BtcGetConfig
1640 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1641 \param hHal - The handle returned by macOpen.
1642 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1643 Caller owns the memory and is responsible for freeing it.
1644 \return VOS_STATUS
1645 VOS_STATUS_E_FAILURE - failure
1646 VOS_STATUS_SUCCESS success
1647 ---------------------------------------------------------------------------*/
1648VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1649
1650/* ---------------------------------------------------------------------------
1651 \fn sme_SetCfgPrivacy
1652 \brief API to set configure privacy parameters
1653 \param hHal - The handle returned by macOpen.
1654 \param pProfile - Pointer CSR Roam profile.
1655 \param fPrivacy - This parameter indicates status of privacy
1656
1657 \return void
1658 ---------------------------------------------------------------------------*/
1659void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1660
1661#if defined WLAN_FEATURE_VOWIFI
1662/* ---------------------------------------------------------------------------
1663 \fn sme_NeighborReportRequest
1664 \brief API to request neighbor report.
1665 \param hHal - The handle returned by macOpen.
1666 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1667 tRrmNeighborReq. Caller owns the memory and is responsible
1668 for freeing it.
1669 \return VOS_STATUS
1670 VOS_STATUS_E_FAILURE - failure
1671 VOS_STATUS_SUCCESS success
1672 ---------------------------------------------------------------------------*/
1673VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1674 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1675#endif
1676
1677//The following are debug APIs to support direct read/write register/memory
1678//They are placed in SME because HW cannot be access when in LOW_POWER state
1679//AND not connected. The knowledge and synchronization is done in SME
1680
1681//sme_DbgReadRegister
1682//Caller needs to validate the input values
1683VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1684
1685//sme_DbgWriteRegister
1686//Caller needs to validate the input values
1687VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1688
1689//sme_DbgReadMemory
1690//Caller needs to validate the input values
1691//pBuf caller allocated buffer has the length of nLen
1692VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1693
1694//sme_DbgWriteMemory
1695//Caller needs to validate the input values
1696VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1697
Jeff Johnson295189b2012-06-20 16:38:30 -07001698VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1699 tSirVersionType *pVersion);
1700VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1701 tSirVersionType *pVersion);
1702VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1703 tANI_U8 *pVersion,
1704 tANI_U32 versionBufferSize);
1705VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1706 tANI_U8 *pVersion,
1707 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001708eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1709 csrRoamCompleteCallback callback,
1710 void *pContext);
1711
1712#ifdef FEATURE_WLAN_WAPI
1713/* ---------------------------------------------------------------------------
1714 \fn sme_RoamSetBKIDCache
1715 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1716 candidate list.
1717 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1718 it is opened (by calling halOpen).
1719 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1720 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1721 when retruning, this is the number of items put into pBKIDCache
1722 \return eHalStatus - when fail, it usually means the buffer allocated is not
1723 big enough and pNumItems has the number of tBkidCacheInfo.
1724 ---------------------------------------------------------------------------*/
1725eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1726 tANI_U32 numItems );
1727
1728/* ---------------------------------------------------------------------------
1729 \fn sme_RoamGetBKIDCache
1730 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1731 BKID cache.
1732 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1733 it is opened (by calling halOpen).
1734 \param pNum - caller allocated memory that has the space of the number of
1735 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1736 in SME cache.
1737 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1738 upon return
1739 \return eHalStatus - when fail, it usually means the buffer allocated is not
1740 big enough.
1741 ---------------------------------------------------------------------------*/
1742eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1743 tBkidCacheInfo *pBkidCache);
1744
1745/* ---------------------------------------------------------------------------
1746 \fn sme_RoamGetNumBKIDCache
1747 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1748 number of BKID cache entries.
1749 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1750 it is opened (by calling halOpen).
1751 \return tANI_U32 - the number of BKID cache entries.
1752 ---------------------------------------------------------------------------*/
1753tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1754
1755/* ---------------------------------------------------------------------------
1756 \fn sme_ScanGetBKIDCandidateList
1757 \brief a wrapper function to return the BKID candidate list
1758 \param pBkidList - caller allocated buffer point to an array of
1759 tBkidCandidateInfo
1760 \param pNumItems - pointer to a variable that has the number of
1761 tBkidCandidateInfo allocated when retruning, this is
1762 either the number needed or number of items put into
1763 pPmkidList
1764 \return eHalStatus - when fail, it usually means the buffer allocated is not
1765 big enough and pNumItems
1766 has the number of tBkidCandidateInfo.
1767 \Note: pNumItems is a number of tBkidCandidateInfo,
1768 not sizeof(tBkidCandidateInfo) * something
1769 ---------------------------------------------------------------------------*/
1770eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1771 tBkidCandidateInfo *pBkidList,
1772 tANI_U32 *pNumItems );
1773#endif /* FEATURE_WLAN_WAPI */
1774
Jeff Johnsone7245742012-09-05 17:12:55 -07001775#ifdef FEATURE_OEM_DATA_SUPPORT
1776/********************************************************************************************
1777 Oem data related modifications
1778*********************************************************************************************/
1779/* ---------------------------------------------------------------------------
1780 \fn sme_OemDataReq
1781 \param sessionId - session id of session to be used for oem data req.
1782 \param pOemDataReqID - pointer to an object to get back the request ID
1783 \param callback - a callback function that is called upon finish
1784 \param pContext - a pointer passed in for the callback
1785 \return eHalStatus
1786 ---------------------------------------------------------------------------*/
1787eHalStatus sme_OemDataReq(tHalHandle hHal,
1788 tANI_U8 sessionId,
1789 tOemDataReqConfig *,
1790 tANI_U32 *pOemDataReqID,
1791 oemData_OemDataReqCompleteCallback callback,
1792 void *pContext);
1793
1794/* ---------------------------------------------------------------------------
1795 \fn sme_getOemDataRsp
1796 \param pOemDataRsp - A pointer to the response object
1797 \param pOemDataReqID - pointer to an object to get back the request ID
1798 \return eHalStatus
1799 ---------------------------------------------------------------------------*/
1800eHalStatus sme_getOemDataRsp(tHalHandle hHal,
1801 tOemDataRsp **pOemDataRsp);
1802
1803#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07001804
1805
Jeff Johnson295189b2012-06-20 16:38:30 -07001806
1807/* ---------------------------------------------------------------------------
1808
1809 \fn sme_RoamUpdateAPWPSIE
1810
1811 \brief To update AP's WPS IE. This function should be called after SME AP session is created
1812 This is an asynchronous API.
1813
1814 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
1815
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001816 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07001817
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001818 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001819
1820 -------------------------------------------------------------------------------*/
1821
1822eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
1823/* ---------------------------------------------------------------------------
1824
1825 \fn sme_RoamUpdateAPWPARSNIEs
1826
1827 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
1828 This is an asynchronous API.
1829
1830 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
1831
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001832 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07001833
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001834 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001835
1836 -------------------------------------------------------------------------------*/
1837eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
1838
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001839/* ---------------------------------------------------------------------------
1840
1841 sme_ChangeMCCBeaconInterval
1842
1843 \brief To update P2P-GO's beacon Interval.
1844
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001845 \return eHalStatus SUCCESS
1846 FAILURE or RESOURCES
1847 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001848 -------------------------------------------------------------------------------*/
1849eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
1850
1851
Jeff Johnson295189b2012-06-20 16:38:30 -07001852
1853/* ---------------------------------------------------------------------------
1854 \fn sme_sendBTAmpEvent
1855 \brief API to send the btAMPstate to FW
1856 \param hHal - The handle returned by macOpen.
1857 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001858 \return eHalStatus SUCCESS
1859 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001860
1861--------------------------------------------------------------------------- */
1862
1863eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
1864
1865
1866
1867/* ---------------------------------------------------------------------------
1868 \fn sme_SetHostOffload
1869 \brief API to set the host offload feature.
1870 \param hHal - The handle returned by macOpen.
1871 \param pRequest - Pointer to the offload request.
1872 \return eHalStatus
1873 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001874eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
1875 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001876
1877/* ---------------------------------------------------------------------------
1878 \fn sme_SetKeepAlive
1879 \brief API to set the Keep Alive feature.
1880 \param hHal - The handle returned by macOpen.
1881 \param pRequest - Pointer to the Keep Alive request.
1882 \return eHalStatus
1883 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001884eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
1885 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001886
Jeff Johnson295189b2012-06-20 16:38:30 -07001887/* ----------------------------------------------------------------------------
1888 \fn sme_GetOperationChannel
1889 \brief API to get current channel on which STA is parked
1890 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001891 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07001892 \returns eHAL_STATUS_SUCCESS
1893 eHAL_STATUS_FAILURE
1894-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001895eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001896
Jeff Johnson295189b2012-06-20 16:38:30 -07001897/* ---------------------------------------------------------------------------
1898
1899 \fn sme_RegisterMgtFrame
1900
1901 \brief To register managment frame of specified type and subtype.
1902 \param frameType - type of the frame that needs to be passed to HDD.
1903 \param matchData - data which needs to be matched before passing frame
1904 to HDD.
1905 \param matchDataLen - Length of matched data.
1906 \return eHalStatus
1907 -------------------------------------------------------------------------------*/
1908eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1909 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
1910
1911/* ---------------------------------------------------------------------------
1912
1913 \fn sme_DeregisterMgtFrame
1914
1915 \brief To De-register managment frame of specified type and subtype.
1916 \param frameType - type of the frame that needs to be passed to HDD.
1917 \param matchData - data which needs to be matched before passing frame
1918 to HDD.
1919 \param matchDataLen - Length of matched data.
1920 \return eHalStatus
1921 -------------------------------------------------------------------------------*/
1922eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1923 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07001924
1925/* ---------------------------------------------------------------------------
1926
1927 \fn sme_ConfigureRxpFilter
1928
1929 \brief
1930 SME will pass this request to lower mac to set/reset the filter on RXP for
1931 multicast & broadcast traffic.
1932
1933 \param
1934
1935 hHal - The handle returned by macOpen.
1936
1937 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
1938 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
1939 on this param. In future we can use this as a mask to set various types of
1940 filters as suggested below:
1941 FILTER_ALL_MULTICAST:
1942 FILTER_ALL_BROADCAST:
1943 FILTER_ALL_MULTICAST_BROADCAST:
1944
1945
1946 \return eHalStatus
1947
1948
1949--------------------------------------------------------------------------- */
1950eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
1951 tpSirWlanSetRxpFilters wlanRxpFilterParam);
1952
1953/* ---------------------------------------------------------------------------
1954
1955 \fn sme_ConfigureAppsCpuWakeupState
1956
1957 \brief
1958 SME will pass this request to lower mac to dynamically adjusts the listen
1959 interval based on the WLAN/MSM activity. This feature is named as
1960 Telescopic Beacon wakeup feature.
1961
1962 \param
1963
1964 hHal - The handle returned by macOpen.
1965
1966 isAppsAwake- Depicts the state of the Apps CPU
1967
1968
1969 \return eHalStatus
1970
1971
1972--------------------------------------------------------------------------- */
1973eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
1974
Jeff Johnson295189b2012-06-20 16:38:30 -07001975/* ---------------------------------------------------------------------------
1976
1977 \fn sme_ConfigureSuspendInd
1978
1979 \brief
1980 SME will pass this request to lower mac to Indicate that the wlan needs to
1981 be suspended
1982
1983 \param
1984
1985 hHal - The handle returned by macOpen.
1986
1987 wlanSuspendParam- Depicts the wlan suspend params
1988
1989
1990 \return eHalStatus
1991
1992
1993--------------------------------------------------------------------------- */
1994eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
1995 tpSirWlanSuspendParam wlanSuspendParam);
1996
1997/* ---------------------------------------------------------------------------
1998
1999 \fn sme_ConfigureResumeReq
2000
2001 \brief
2002 SME will pass this request to lower mac to Indicate that the wlan needs to
2003 be Resumed
2004
2005 \param
2006
2007 hHal - The handle returned by macOpen.
2008
2009 wlanResumeParam- Depicts the wlan resume params
2010
2011
2012 \return eHalStatus
2013
2014
2015--------------------------------------------------------------------------- */
2016eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2017 tpSirWlanResumeParam wlanResumeParam);
2018
Jeff Johnson295189b2012-06-20 16:38:30 -07002019
2020/* ---------------------------------------------------------------------------
2021
2022 \fn sme_GetInfraSessionId
2023
2024 \brief To get the session ID for infra session, if connected
2025 This is a synchronous API.
2026
2027 \param hHal - The handle returned by macOpen.
2028
2029 \return sessionid, -1 if infra session is not connected
2030
2031 -------------------------------------------------------------------------------*/
2032tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2033
2034/* ---------------------------------------------------------------------------
2035
2036 \fn sme_GetInfraOperationChannel
2037
2038 \brief To get the operating channel for infra session, if connected
2039 This is a synchronous API.
2040
2041 \param hHal - The handle returned by macOpen.
2042 \param sessionId - the sessionId returned by sme_OpenSession.
2043
2044 \return operating channel, 0 if infra session is not connected
2045
2046 -------------------------------------------------------------------------------*/
2047tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2048/* ---------------------------------------------------------------------------
2049
2050 \fn sme_GetConcurrentOperationChannel
2051
2052 \brief To get the operating channel for other concurrent sessions, if connected
2053 This is a synchronous API.
2054
2055 \param hHal - The handle returned by macOpen.
2056 \param currentPersona - persona that is trying to come up.
2057
2058 \return operating channel, 0 if infra session is not connected
2059
2060 -------------------------------------------------------------------------------*/
2061tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2062
2063/* ---------------------------------------------------------------------------
2064 \fn sme_AbortMacScan
2065 \brief API to cancel MAC scan.
2066 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302067 \param sessionId - sessionId for interface
Jeff Johnson295189b2012-06-20 16:38:30 -07002068 \return VOS_STATUS
2069 VOS_STATUS_E_FAILURE - failure
2070 VOS_STATUS_SUCCESS success
2071 ---------------------------------------------------------------------------*/
Srinivas, Dasari138af4f2014-02-07 11:13:45 +05302072eHalStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2073 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002074
2075/* ---------------------------------------------------------------------------
2076 \fn sme_GetCfgValidChannels
2077 \brief API to get valid channel list
2078 \param hHal - The handle returned by macOpen.
2079 \param aValidChannels - Pointer to the valid channel list
2080 \param len - valid channel list length
2081 \return eHalStatus
2082 ---------------------------------------------------------------------------*/
2083eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2084
2085#ifdef FEATURE_WLAN_SCAN_PNO
2086
2087/* ---------------------------------------------------------------------------
2088 \fn sme_SetPreferredNetworkList
2089 \brief API to set the Preferred Network List Offload feature.
2090 \param hHal - The handle returned by macOpen.
2091 \param pRequest - Pointer to the offload request.
2092 \return eHalStatus
2093 ---------------------------------------------------------------------------*/
2094eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2095
2096/* ---------------------------------------------------------------------------
2097 \fn sme_SetRSSIFilter
2098 \brief API to set RSSI Filter feature.
2099 \param hHal - The handle returned by macOpen.
2100 \param pRequest - Pointer to the offload request.
2101 \return eHalStatus
2102 ---------------------------------------------------------------------------*/
2103eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2104
2105/******************************************************************************
2106*
2107* Name: sme_PreferredNetworkFoundInd
2108*
2109* Description:
2110* Invoke Preferred Network Found Indication
2111*
2112* Parameters:
2113* hHal - HAL handle for device
2114* pMsg - found network description
2115*
2116* Returns: eHalStatus
2117*
2118******************************************************************************/
2119eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2120#endif // FEATURE_WLAN_SCAN_PNO
2121
2122/* ---------------------------------------------------------------------------
2123 \fn sme_SetPowerParams
2124 \brief API to set Power Parameters
2125 \param hHal - The handle returned by macOpen.
2126 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002127 \param forced - if true, not to be dropped silently in host, it must reach
2128 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2129 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002130 \return eHalStatus
2131 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002132eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002133
2134/* ---------------------------------------------------------------------------
2135 \fn sme_SetTxPerTracking
2136 \brief Set Tx PER tracking configuration parameters
2137 \param hHal - The handle returned by macOpen.
2138 \param pTxPerTrackingParam - Tx PER configuration parameters
2139 \return eHalStatus
2140 ---------------------------------------------------------------------------*/
2141eHalStatus sme_SetTxPerTracking (
2142 tHalHandle hHal,
2143 void (*pCallbackfn) (void *pCallbackContext),
2144 void *pCallbackContext,
2145 tpSirTxPerTrackingParam pTxPerTrackingParam);
2146
2147#ifdef WLAN_FEATURE_PACKET_FILTERING
2148/* ---------------------------------------------------------------------------
2149 \fn sme_ReceiveFilterSetFilter
2150 \brief API to set 8023 Multicast Address List
2151 \param hHal - The handle returned by macOpen.
2152 \param pMulticastAddrs - Pointer to the Multicast Address List
2153 \return eHalStatus
2154 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002155eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002156
2157/* ---------------------------------------------------------------------------
2158 \fn sme_ReceiveFilterSetFilter
2159 \brief API to set Receive Packet Filter
2160 \param hHal - The handle returned by macOpen.
2161 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2162 \return eHalStatus
2163 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002164eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2165 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002166
2167/* ---------------------------------------------------------------------------
2168 \fn sme_GetFilterMatchCount
2169 \brief API to get D0 PC Filter Match Count
2170 \param hHal - The handle returned by macOpen
2171 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2172 \param callbackContext - Cookie to be passed back during callback
2173 \return eHalStatus
2174 ---------------------------------------------------------------------------*/
2175eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2176 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002177 void *callbackContext,
2178 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002179
2180/* ---------------------------------------------------------------------------
2181 \fn sme_ReceiveFilterClearFilter
2182 \brief API to clear Receive Packet Filter
2183 \param hHal - The handle returned by macOpen.
2184 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2185 \return eHalStatus
2186 ---------------------------------------------------------------------------*/
2187eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002188 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2189 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002190#endif // WLAN_FEATURE_PACKET_FILTERING
2191/* ---------------------------------------------------------------------------
2192
2193 \fn sme_IsChannelValid
2194 \brief To check if the channel is valid for currently established domain
2195 This is a synchronous API.
2196
2197 \param hHal - The handle returned by macOpen.
2198 \param channel - channel to verify
2199
2200 \return TRUE/FALSE, TRUE if channel is valid
2201
2202 -------------------------------------------------------------------------------*/
2203tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2204
2205/* ---------------------------------------------------------------------------
2206 \fn sme_SetFreqBand
2207 \brief Used to set frequency band.
2208 \param hHal
2209 \eBand band value to be configured
2210 \- return eHalStatus
2211 -------------------------------------------------------------------------*/
2212eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2213
2214/* ---------------------------------------------------------------------------
2215 \fn sme_GetFreqBand
2216 \brief Used to get the current band settings.
2217 \param hHal
2218 \pBand pointer to hold the current band value
2219 \- return eHalStatus
2220 -------------------------------------------------------------------------*/
2221eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2222
2223/* ---------------------------------------------------------------------------
2224
2225 \fn sme_SetTxPerTracking
2226 \brief Set Tx PER tracking configuration parameters
2227 \param hHal - The handle returned by macOpen.
2228 \param pTxPerTrackingParam - Tx PER configuration parameters
2229 \return eHalStatus
2230 ---------------------------------------------------------------------------*/
2231eHalStatus sme_SetTxPerTracking (
2232 tHalHandle hHal,
2233 void (*pCallbackfn) (void *pCallbackContext),
2234 void *pCallbackContext,
2235 tpSirTxPerTrackingParam pTxPerTrackingParam);
2236
2237#ifdef WLAN_FEATURE_GTK_OFFLOAD
2238/* ---------------------------------------------------------------------------
2239 \fn sme_SetGTKOffload
2240 \brief API to set GTK offload feature.
2241 \param hHal - The handle returned by macOpen.
2242 \param pRequest - Pointer to the GTK offload request.
2243 \return eHalStatus
2244 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002245eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002246
2247/* ---------------------------------------------------------------------------
2248 \fn sme_GetGTKOffload
2249 \brief API to get GTK offload information.
2250 \param hHal - The handle returned by macOpen.
2251 \param pRequest - Pointer to the GTK offload response.
2252 \return eHalStatus
2253 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002254eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2255 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002256#endif // WLAN_FEATURE_GTK_OFFLOAD
2257
2258#ifdef WLAN_WAKEUP_EVENTS
2259eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2260#endif // WLAN_WAKEUP_EVENTS
2261
2262/* ---------------------------------------------------------------------------
2263 \fn sme_SetTxPerTracking
2264 \brief Set Tx PER tracking configuration parameters
2265 \param hHal - The handle returned by macOpen.
2266 \param pTxPerTrackingParam - Tx PER configuration parameters
2267 \return eHalStatus
2268 ---------------------------------------------------------------------------*/
2269eHalStatus sme_SetTxPerTracking (
2270 tHalHandle hHal,
2271 void (*pCallbackfn) (void *pCallbackContext),
2272 void *pCallbackContext,
2273 tpSirTxPerTrackingParam pTxPerTrackingParam);
2274
2275
2276//return frequency for a particular channel
2277tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2278
2279tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2280
2281#if defined WLAN_FEATURE_P2P_INTERNAL
2282
2283eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2284
2285/* ---------------------------------------------------------------------------
2286 \fn sme_p2pFlushDeviceList
2287 \brief Remove cached P2P result from scan results
2288 \param hHal - The handle returned by macOpen.
2289 \param HDDSessionId - HDD's sessionId. Currently unused.
2290 \return eHalStatus
2291 ---------------------------------------------------------------------------*/
2292eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2293
2294eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2295 tCsrScanResultFilter *pFilter);
2296
2297#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2298
2299/* ---------------------------------------------------------------------------
2300 \fn sme_SetMaxTxPower
2301 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2302 setting will not persist over reboots
2303 \param hHal
2304 \param pBssid BSSID to set the power cap for
2305 \param pBssid pSelfMacAddress self MAC Address
2306 \param pBssid power to set in dB
2307 \- return eHalStatus
2308 -------------------------------------------------------------------------*/
2309eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2310 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2311
Jeff Johnson295189b2012-06-20 16:38:30 -07002312/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002313 \fn sme_SetMaxTxPowerPerBand
2314 \brief Used to set the Maximum Transmit Power for
2315 specific band dynamically. Note: this setting will not persist over reboots
2316 \param band
2317 \param power to set in dB
2318 \- return eHalStatus
2319 -------------------------------------------------------------------------*/
2320eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2321
2322/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002323
schang86c22c42013-03-13 18:41:24 -07002324 \fn sme_SetTxPower
2325
2326 \brief Set Transmit Power dynamically. Note: this setting will
2327 not persist over reboots.
2328
2329 \param hHal
2330 \param sessionId Target Session ID
2331 \param mW power to set in mW
2332 \- return eHalStatus
2333
2334 -------------------------------------------------------------------------------*/
2335eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2336
2337/* ---------------------------------------------------------------------------
2338
Jeff Johnson295189b2012-06-20 16:38:30 -07002339 \fn sme_HideSSID
2340
2341 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2342 not persist over reboots.
2343
2344 \param hHal
2345 \param sessionId
2346 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2347 \- return eHalStatus
2348
2349 -------------------------------------------------------------------------------*/
2350eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002351
2352/* ---------------------------------------------------------------------------
2353
2354 \fn sme_SetTmLevel
2355 \brief Set Thermal Mitigation Level to RIVA
2356 \param hHal - The handle returned by macOpen.
2357 \param newTMLevel - new Thermal Mitigation Level
2358 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002359 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002360 ---------------------------------------------------------------------------*/
2361eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2362
2363/*---------------------------------------------------------------------------
2364
2365 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2366 Host and FW.
2367
2368 \param hHal - HAL handle for device
2369
2370 \return NONE
2371
2372---------------------------------------------------------------------------*/
2373void sme_featureCapsExchange(tHalHandle hHal);
2374
Jeff Johnsond13512a2012-07-17 11:42:19 -07002375/*---------------------------------------------------------------------------
2376
Yathish9f22e662012-12-10 14:21:35 -08002377 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2378 between in Host.
2379
2380 \param hHal - HAL handle for device
2381
2382 \return NONE
2383
2384---------------------------------------------------------------------------*/
2385void sme_disableFeatureCapablity(tANI_U8 feature_index);
2386
2387/*---------------------------------------------------------------------------
2388
Jeff Johnsond13512a2012-07-17 11:42:19 -07002389 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2390 country code
2391 Host and FW.
2392
2393 \param hHal - HAL handle for device
2394 \param pCountry - pointer to country code
2395
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002396 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002397
2398 ---------------------------------------------------------------------------*/
2399eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2400
2401/*---------------------------------------------------------------------------
2402
2403 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2404 country code.
2405
2406 \param hHal - HAL handle for device
2407 \param pCountry - pointer to country code
2408
2409 \return Success or failure
2410
2411 ---------------------------------------------------------------------------*/
2412eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2413
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002414/* ---------------------------------------------------------------------------
2415 \fn sme_transportDebug
2416 \brief Dynamically monitoring Transport channels
2417 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002418 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002419 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002420 \param toggleStallDetect Enable stall detect feature
2421 This feature will take effect to data performance
2422 Not integrate till fully verification
2423 \- return NONE
2424 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002425void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002426
Kiran4a17ebe2013-01-31 10:43:43 -08002427/* ---------------------------------------------------------------------------
2428 \fn sme_ResetPowerValuesFor5G
2429 \brief Reset the power values for 5G band with NV power values.
2430 \param hHal - HAL handle for device
2431 \- return NONE
2432 -------------------------------------------------------------------------*/
2433void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2434
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002435#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002436/* ---------------------------------------------------------------------------
2437 \fn sme_UpdateRoamPrefer5GHz
2438 \brief enable/disable Roam prefer 5G runtime option
2439 This function is called through dynamic setConfig callback function
2440 to configure the Roam prefer 5G runtime option
2441 \param hHal - HAL handle for device
2442 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2443 \- return Success or failure
2444 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002445eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002446
2447/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002448 \fn sme_setRoamIntraBand
2449 \brief enable/disable Intra band roaming
2450 This function is called through dynamic setConfig callback function
2451 to configure the intra band roaming
2452 \param hHal - HAL handle for device
2453 \param nRoamIntraBand Enable/Disable Intra band roaming
2454 \- return Success or failure
2455 -------------------------------------------------------------------------*/
2456eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2457
2458/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002459 \fn sme_UpdateRoamScanNProbes
2460 \brief function to update roam scan N probes
2461 This function is called through dynamic setConfig callback function
2462 to update roam scan N probes
2463 \param hHal - HAL handle for device
2464 \param nProbes number of probe requests to be sent out
2465 \- return Success or failure
2466 -------------------------------------------------------------------------*/
2467eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2468
2469/* ---------------------------------------------------------------------------
2470 \fn sme_UpdateRoamScanHomeAwayTime
2471 \brief function to update roam scan Home away time
2472 This function is called through dynamic setConfig callback function
2473 to update roam scan home away time
2474 \param hHal - HAL handle for device
2475 \param nRoamScanAwayTime Scan home away time
2476 \- return Success or failure
2477 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002478eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2479 const v_U16_t nRoamScanHomeAwayTime,
2480 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002481
2482/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002483 \fn sme_getRoamIntraBand
2484 \brief get Intra band roaming
2485 \param hHal - HAL handle for device
2486 \- return Success or failure
2487 -------------------------------------------------------------------------*/
2488v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2489
2490/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002491 \fn sme_getRoamScanNProbes
2492 \brief get N Probes
2493 \param hHal - HAL handle for device
2494 \- return Success or failure
2495 -------------------------------------------------------------------------*/
2496v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2497
2498/* ---------------------------------------------------------------------------
2499 \fn sme_getRoamScanHomeAwayTime
2500 \brief get Roam scan home away time
2501 \param hHal - HAL handle for device
2502 \- return Success or failure
2503 -------------------------------------------------------------------------*/
2504v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2505
2506/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002507 \fn sme_UpdateImmediateRoamRssiDiff
2508 \brief Update nImmediateRoamRssiDiff
2509 This function is called through dynamic setConfig callback function
2510 to configure nImmediateRoamRssiDiff
2511 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2512 \param hHal - HAL handle for device
2513 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2514 candidate and current AP.
2515 \- return Success or failure
2516 -------------------------------------------------------------------------*/
2517
2518eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002519
Srinivas Girigowdade697412013-02-14 16:31:48 -08002520/* ---------------------------------------------------------------------------
2521 \fn sme_UpdateRoamRssiDiff
2522 \brief Update RoamRssiDiff
2523 This function is called through dynamic setConfig callback function
2524 to configure RoamRssiDiff
2525 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2526 \param hHal - HAL handle for device
2527 \param RoamRssiDiff - minimum rssi difference between potential
2528 candidate and current AP.
2529 \- return Success or failure
2530 -------------------------------------------------------------------------*/
2531
2532eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2533
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002534/*--------------------------------------------------------------------------
2535 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2536 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2537 isFastTransitionEnabled.
2538 This is a synchronuous call
2539 \param hHal - The handle returned by macOpen.
2540 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2541 Other status means SME is failed to update isFastTransitionEnabled.
2542 \sa
2543 --------------------------------------------------------------------------*/
2544
2545eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2546 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002547
2548/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002549 \fn sme_UpdateWESMode
2550 \brief Update WESMode
2551 This function is called through dynamic setConfig callback function
2552 to configure isWESModeEnabled
2553 \param hHal - HAL handle for device
2554 \param isWESModeEnabled - Enable/Disable WES Mode
2555 \- return Success or failure
2556 -------------------------------------------------------------------------*/
2557eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2558
2559/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002560 \fn sme_SetRoamScanControl
2561 \brief Set roam scan control
2562 This function is called to set roam scan control
2563 if roam scan control is set to 0, roaming scan cache is cleared
2564 any value other than 0 is treated as invalid value
2565 \param hHal - HAL handle for device
2566 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2567 Other status means SME failure to update
2568 -------------------------------------------------------------------------*/
2569eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002570#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002571
2572#ifdef FEATURE_WLAN_LFR
2573/*--------------------------------------------------------------------------
2574 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002575 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002576 isFastRoamIniFeatureEnabled.
2577 This is a synchronuous call
2578 \param hHal - The handle returned by macOpen.
2579 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2580 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2581 \sa
2582 --------------------------------------------------------------------------*/
2583
Srinivas Girigowdade697412013-02-14 16:31:48 -08002584eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002585 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002586
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002587/*--------------------------------------------------------------------------
2588 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2589 Enable/disable LFR MAWC support at runtime
2590 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2591 isMAWCIniFeatureEnabled.
2592 This is a synchronous call
2593 \param hHal - The handle returned by macOpen.
2594 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2595 Other status means SME is failed to update MAWCEnabled.
2596 \sa
2597 --------------------------------------------------------------------------*/
2598eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2599 const v_BOOL_t MAWCEnabled);
2600
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002601
2602#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2603/*--------------------------------------------------------------------------
2604 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2605 This is a synchronuous call
2606 \param hHal - The handle returned by macOpen.
2607 \return eHAL_STATUS_SUCCESS
2608 Other status means SME is failed
2609 \sa
2610 --------------------------------------------------------------------------*/
2611
2612eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2613 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2614#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002615#endif /* FEATURE_WLAN_LFR */
2616
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002617#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002618/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002619 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002620 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002621 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002622 This is a synchronuous call
2623 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002624 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2625 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002626 \sa
2627 --------------------------------------------------------------------------*/
2628
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002629eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2630 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002631
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002632#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002633
2634/*--------------------------------------------------------------------------
2635 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2636 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2637 fEnableFwRssiMonitoring.
2638 This is a synchronuous call
2639 \param hHal - The handle returned by macOpen.
2640 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2641 Other status means SME is failed to update
2642 \sa
2643 --------------------------------------------------------------------------*/
2644
2645eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2646 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002647
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002648#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002649/*--------------------------------------------------------------------------
2650 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2651 This is a synchronuous call
2652 \param hHal - The handle returned by macOpen.
2653 \return eHAL_STATUS_SUCCESS - SME update config successful.
2654 Other status means SME is failed to update
2655 \sa
2656 --------------------------------------------------------------------------*/
2657eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2658 v_U8_t neighborLookupRssiThreshold);
2659
2660/*--------------------------------------------------------------------------
2661 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2662 This is a synchronuous call
2663 \param hHal - The handle returned by macOpen.
2664 \return eHAL_STATUS_SUCCESS - SME update config successful.
2665 Other status means SME is failed to update
2666 \sa
2667 --------------------------------------------------------------------------*/
2668eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2669 v_U8_t neighborReassocRssiThreshold);
2670
2671/*--------------------------------------------------------------------------
2672 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2673 This is a synchronuous call
2674 \param hHal - The handle returned by macOpen.
2675 \return eHAL_STATUS_SUCCESS - SME update config successful.
2676 Other status means SME is failed to update
2677 \sa
2678 --------------------------------------------------------------------------*/
2679v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2680
2681/*--------------------------------------------------------------------------
2682 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2683 This is a synchronuous call
2684 \param hHal - The handle returned by macOpen.
2685 \return eHAL_STATUS_SUCCESS - SME update config successful.
2686 Other status means SME is failed to update
2687 \sa
2688 --------------------------------------------------------------------------*/
2689eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2690 v_U16_t neighborScanResultsRefreshPeriod);
2691
2692/*--------------------------------------------------------------------------
2693 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2694 This is a synchronuous call
2695 \param hHal - The handle returned by macOpen.
2696 \return eHAL_STATUS_SUCCESS - SME update config successful.
2697 Other status means SME is failed to update
2698 \sa
2699 --------------------------------------------------------------------------*/
2700v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2701
2702/*--------------------------------------------------------------------------
2703 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2704 This is a synchronuous call
2705 \param hHal - The handle returned by macOpen.
2706 \return eHAL_STATUS_SUCCESS - SME update config successful.
2707 Other status means SME is failed to update
2708 \sa
2709 --------------------------------------------------------------------------*/
2710v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2711
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002712/* ---------------------------------------------------------------------------
2713 \fn sme_UpdateEmptyScanRefreshPeriod
2714 \brief Update nEmptyScanRefreshPeriod
2715 This function is called through dynamic setConfig callback function
2716 to configure nEmptyScanRefreshPeriod
2717 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2718 \param hHal - HAL handle for device
2719 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2720 \- return Success or failure
2721 -------------------------------------------------------------------------*/
2722eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2723
2724/* ---------------------------------------------------------------------------
2725 \fn sme_setNeighborScanMinChanTime
2726 \brief Update nNeighborScanMinChanTime
2727 This function is called through dynamic setConfig callback function
2728 to configure gNeighborScanChannelMinTime
2729 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2730 \param hHal - HAL handle for device
2731 \param nNeighborScanMinChanTime - Channel minimum dwell time
2732 \- return Success or failure
2733 -------------------------------------------------------------------------*/
2734eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2735
2736/* ---------------------------------------------------------------------------
2737 \fn sme_setNeighborScanMaxChanTime
2738 \brief Update nNeighborScanMaxChanTime
2739 This function is called through dynamic setConfig callback function
2740 to configure gNeighborScanChannelMaxTime
2741 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2742 \param hHal - HAL handle for device
2743 \param nNeighborScanMinChanTime - Channel maximum dwell time
2744 \- return Success or failure
2745 -------------------------------------------------------------------------*/
2746eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2747
2748/* ---------------------------------------------------------------------------
2749 \fn sme_getNeighborScanMinChanTime
2750 \brief get neighbor scan min channel time
2751 \param hHal - The handle returned by macOpen.
2752 \return v_U16_t - channel min time value
2753 -------------------------------------------------------------------------*/
2754v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2755
2756/* ---------------------------------------------------------------------------
2757 \fn sme_getNeighborScanMaxChanTime
2758 \brief get neighbor scan max channel time
2759 \param hHal - The handle returned by macOpen.
2760 \return v_U16_t - channel max time value
2761 -------------------------------------------------------------------------*/
2762v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
2763
2764/* ---------------------------------------------------------------------------
2765 \fn sme_setNeighborScanPeriod
2766 \brief Update nNeighborScanPeriod
2767 This function is called through dynamic setConfig callback function
2768 to configure nNeighborScanPeriod
2769 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
2770 \param hHal - HAL handle for device
2771 \param nNeighborScanPeriod - neighbor scan period
2772 \- return Success or failure
2773 -------------------------------------------------------------------------*/
2774eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
2775
2776/* ---------------------------------------------------------------------------
2777 \fn sme_getNeighborScanPeriod
2778 \brief get neighbor scan period
2779 \param hHal - The handle returned by macOpen.
2780 \return v_U16_t - neighbor scan period
2781 -------------------------------------------------------------------------*/
2782v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
2783
2784#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08002785
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002786#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08002787/*--------------------------------------------------------------------------
2788 \brief sme_getRoamRssiDiff() - get Roam rssi diff
2789 This is a synchronuous call
2790 \param hHal - The handle returned by macOpen.
2791 \return eHAL_STATUS_SUCCESS - SME update config successful.
2792 Other status means SME is failed to update
2793 \sa
2794 --------------------------------------------------------------------------*/
2795v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
2796
2797/*--------------------------------------------------------------------------
2798 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
2799 This is a synchronuous call
2800 \param hHal - The handle returned by macOpen.
2801 \return eHAL_STATUS_SUCCESS - SME update config successful.
2802 Other status means SME is failed to update
2803 \sa
2804 --------------------------------------------------------------------------*/
2805eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2806 tANI_U8 numChannels);
2807
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002808#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002809/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002810 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002811 This is a synchronuous call
2812 \param hHal - The handle returned by macOpen.
2813 \return eHAL_STATUS_SUCCESS - SME update config successful.
2814 Other status means SME is failed to update
2815 \sa
2816 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002817eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002818 tANI_U8 *pChannelList,
2819 tANI_U8 numChannels);
2820#endif
2821
Srinivas Girigowdade697412013-02-14 16:31:48 -08002822/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08002823 \brief sme_getRoamScanChannelList() - get roam scan channel list
2824 This is a synchronuous call
2825 \param hHal - The handle returned by macOpen.
2826 \return eHAL_STATUS_SUCCESS - SME update config successful.
2827 Other status means SME is failed to update
2828 \sa
2829 --------------------------------------------------------------------------*/
2830eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2831 tANI_U8 *pNumChannels);
2832
2833/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002834 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002835 This is a synchronuous call
2836 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002837 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002838 FALSE (0) - if feature is disabled (compile or runtime)
2839 \sa
2840 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002841tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002842
2843/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002844 \brief sme_getWESMode() - getWES Mode
2845 This is a synchronous call
2846 \param hHal - The handle returned by macOpen.
2847 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
2848 \sa
2849 --------------------------------------------------------------------------*/
2850v_BOOL_t sme_GetWESMode(tHalHandle hHal);
2851
2852/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002853 \brief sme_GetRoamScanControl() - get scan control
2854 This is a synchronous call
2855 \param hHal - The handle returned by macOpen.
2856 \return v_BOOL_t - Enabled(1)/Disabled(0)
2857 \sa
2858 --------------------------------------------------------------------------*/
2859v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
2860
2861/* ---------------------------------------------------------------------------
2862 \fn sme_UpdateEmptyScanRefreshPeriod
2863 \brief Update nnEmptyScanRefreshPeriod
2864 This function is called through dynamic setConfig callback function
2865 to configure nnEmptyScanRefreshPeriod
2866 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2867 \param hHal - HAL handle for device
2868 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2869 \- return Success or failure
2870 -------------------------------------------------------------------------*/
2871
2872/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002873 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
2874 This is a synchronuous call
2875 \param hHal - The handle returned by macOpen.
2876 \return TRUE (1) - if the feature is enabled
2877 FALSE (0) - if feature is disabled (compile or runtime)
2878 \sa
2879 --------------------------------------------------------------------------*/
2880tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
2881
2882/*--------------------------------------------------------------------------
2883 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
2884 This is a synchronuous call
2885 \param hHal - The handle returned by macOpen.
2886 \return TRUE (1) - if the feature is enabled
2887 FALSE (0) - if feature is disabled (compile or runtime)
2888 \sa
2889 --------------------------------------------------------------------------*/
2890tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
2891
Srinivas Girigowdade697412013-02-14 16:31:48 -08002892#endif
2893
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07002894#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2895/*--------------------------------------------------------------------------
2896 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
2897 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2898 gRoamScanOffloadEnabled.
2899 This is a synchronous call
2900 \param hHal - The handle returned by macOpen.
2901 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2902 Other status means SME is failed to update.
2903 \sa
2904 --------------------------------------------------------------------------*/
2905
2906eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
2907#endif
2908
2909
Srinivas Girigowdade697412013-02-14 16:31:48 -08002910/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002911 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05302912 \brief Check if a feature is enabled by FW
2913
2914 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002915 A value from enum placeHolderInCapBitmap
2916
2917 \- return 1/0 (TRUE/FALSE)
2918 -------------------------------------------------------------------------*/
2919tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05302920
2921/* ---------------------------------------------------------------------------
2922 \fn sme_IsFeatureSupportedByDriver
2923 \brief Check if a feature is enabled by driver
2924
2925 \param featEnumValue - Enumeration value of the feature to be checked.
2926 A value from enum placeHolderInCapBitmap
2927
2928 \- return 1/0 (TRUE/FALSE)
2929 -------------------------------------------------------------------------*/
2930tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
2931
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002932#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302933
2934/* ---------------------------------------------------------------------------
2935 \fn sme_SendTdlsLinkEstablishParams
2936 \brief API to send TDLS Link Establishment Parameters.
2937
2938 \param peerMac - peer's Mac Adress.
2939 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
2940 \- return VOS_STATUS_SUCCES
2941 -------------------------------------------------------------------------*/
2942
2943VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
2944 tANI_U8 sessionId,
2945 tSirMacAddr peerMac,
2946 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
2947
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002948/* ---------------------------------------------------------------------------
2949 \fn sme_SendTdlsMgmtFrame
2950 \brief API to send TDLS management frames.
2951
2952 \param peerMac - peer's Mac Adress.
2953 \param frame_type - Type of TDLS mgmt frame to be sent.
2954 \param dialog - dialog token used in the frame.
2955 \param status - status to be incuded in the frame.
2956 \param buf - additional IEs to be included
2957 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08002958 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002959 \- return VOS_STATUS_SUCCES
2960 -------------------------------------------------------------------------*/
2961VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Hoonki Leea34dd892013-02-05 22:56:02 -08002962 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 -08002963/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08002964 \fn sme_ChangeTdlsPeerSta
2965 \brief API to Update TDLS peer sta parameters.
2966
2967 \param peerMac - peer's Mac Adress.
2968 \param staParams - Peer Station Parameters.
2969 \- return VOS_STATUS_SUCCES
2970 -------------------------------------------------------------------------*/
2971VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
2972 tCsrStaParams *pstaParams);
2973/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002974 \fn sme_AddTdlsPeerSta
2975 \brief API to Add TDLS peer sta entry.
2976
2977 \param peerMac - peer's Mac Adress.
2978 \- return VOS_STATUS_SUCCES
2979 -------------------------------------------------------------------------*/
2980VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2981/* ---------------------------------------------------------------------------
2982 \fn sme_DeleteTdlsPeerSta
2983 \brief API to Delete TDLS peer sta entry.
2984
2985 \param peerMac - peer's Mac Adress.
2986 \- return VOS_STATUS_SUCCES
2987 -------------------------------------------------------------------------*/
2988VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07002989/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07002990 \fn sme_SetTdlsPowerSaveProhibited
2991 \API to set/reset the isTdlsPowerSaveProhibited.
2992
2993 \- return void
2994 -------------------------------------------------------------------------*/
2995void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002996#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05302997/* ---------------------------------------------------------------------------
2998 \fn sme_IsPmcBmps
2999 \brief API to Check if PMC state is BMPS.
3000
3001 \- return v_BOOL_t
3002 -------------------------------------------------------------------------*/
3003v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3004
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003005#ifdef FEATURE_WLAN_TDLS_INTERNAL
3006typedef struct smeTdlsDisResult
3007{
3008 tSirMacAddr tdlsPeerMac;
3009 v_S7_t tdlsPeerRssi;
3010} tSmeTdlsDisResult;
3011
3012VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3013v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
3014 tSmeTdlsDisResult *disResult, v_U8_t listType);
3015VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3016VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003017#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003018eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003019
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003020/*
3021 * SME API to enable/disable WLAN driver initiated SSR
3022 */
3023void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3024
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303025/* ---------------------------------------------------------------------------
3026
3027 \fn sme_SetPhyMode
3028
3029 \brief Changes the PhyMode.
3030
3031 \param hHal - The handle returned by macOpen.
3032
3033 \param phyMode new phyMode which is to set
3034
3035 \return eHalStatus SUCCESS.
3036
3037 -------------------------------------------------------------------------------*/
3038eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3039
3040/* ---------------------------------------------------------------------------
3041
3042 \fn sme_GetPhyMode
3043
3044 \brief gets current PhyMode.
3045
3046 \param hHal - The handle returned by macOpen.
3047
3048 \return eHalStatus PhyMode
3049
3050 -------------------------------------------------------------------------------*/
3051eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3052
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003053/*
3054 * SME API to determine the channel bonding mode
3055 */
3056VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3057
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003058#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3059/*--------------------------------------------------------------------------
3060 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3061 from CSR.
3062 This is a synchronous call
3063 \param hHal - The handle returned by macOpen
3064 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3065 BSSID, channel etc.)
3066 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3067 Other status means SME is failed to send the request.
3068 \sa
3069 --------------------------------------------------------------------------*/
3070
3071eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3072#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003073/*--------------------------------------------------------------------------
3074 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3075 is any connected session .
3076 This is a synchronous call
3077 \param hHal - The handle returned by macOpen
3078 \return VOS_STATUS - SME passed the request to CSR successfully.
3079 Other status means SME is failed to send the request.
3080 \sa
3081 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003082VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003083
3084#ifdef FEATURE_WLAN_LPHB
3085/* ---------------------------------------------------------------------------
3086 \fn sme_LPHBConfigReq
3087 \API to make configuration LPHB within FW.
3088 \param hHal - The handle returned by macOpen
3089 \param lphdReq - LPHB request argument by client
3090 \param pCallbackfn - LPHB timeout notification callback function pointer
3091 \- return Configuration message posting status, SUCCESS or Fail
3092 -------------------------------------------------------------------------*/
3093eHalStatus sme_LPHBConfigReq(
3094 tHalHandle hHal,
3095 tSirLPHBReq *lphdReq,
3096 void (*pCallbackfn)(void *pAdapter, void *indParam));
3097#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003098
3099/* ---------------------------------------------------------------------------
3100 \fn sme_AddPeriodicTxPtrn
3101 \brief API to Periodic TX Pattern Offload feature
3102 \param hHal - The handle returned by macOpen
3103 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3104 \return eHalStatus
3105 ---------------------------------------------------------------------------*/
3106eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3107 *addPeriodicTxPtrnParams);
3108
3109/* ---------------------------------------------------------------------------
3110 \fn sme_DelPeriodicTxPtrn
3111 \brief API to Periodic TX Pattern Offload feature
3112 \param hHal - The handle returned by macOpen
3113 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3114 \return eHalStatus
3115 ---------------------------------------------------------------------------*/
3116eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3117 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003118/*--------------------------------------------------------------------------
3119 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3120 scan parameter.
3121 This is a synchronous call
3122 \param hHal - The handle returned by macOpen
3123 \return None.
3124 \sa
3125 --------------------------------------------------------------------------*/
3126void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3127 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303128
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003129/* ---------------------------------------------------------------------------
3130 \fn sme_SendRateUpdateInd
3131 \brief API to Update rate
3132 \param hHal - The handle returned by macOpen
3133 \param rateUpdateParams - Pointer to rate update params
3134 \return eHalStatus
3135 ---------------------------------------------------------------------------*/
3136eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3137
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303138/*
3139 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3140 * triggers
3141 * return status
3142*/
3143eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3144 tANI_U8 *bssid,
3145 tSmeFastRoamTrigger fastRoamTrig);
Leela Venkata Kiran Kumar Reddy Chiralaede10652013-09-11 18:48:46 -07003146eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pBSSId );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003147
3148void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303149
3150#ifdef FEATURE_WLAN_BATCH_SCAN
3151/* ---------------------------------------------------------------------------
3152 \fn sme_SetBatchScanReq
3153 \brief API to set batch scan request in FW
3154 \param hHal - The handle returned by macOpen.
3155 \param pRequest - Pointer to the batch request.
3156 \param sessionId - session ID
3157 \param callbackRoutine - HDD callback which needs to be invoked after
3158 getting set batch scan response from FW
3159 \param callbackContext - pAdapter context
3160 \return eHalStatus
3161 ---------------------------------------------------------------------------*/
3162eHalStatus
3163sme_SetBatchScanReq
3164(
3165 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3166 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3167 void *callbackContext
3168);
3169
3170/* ---------------------------------------------------------------------------
3171 \fn sme_TriggerBatchScanResultInd
3172 \brief API to trigger batch scan result indications from from FW
3173 \param hHal - The handle returned by macOpen.
3174 \param pRequest - Pointer to get batch request.
3175 \param sessionId - session ID
3176 \param callbackRoutine - HDD callback which needs to be invoked after
3177 getting get batch scan response from FW
3178 \param callbackContext - pAdapter context
3179 \return eHalStatus
3180 ---------------------------------------------------------------------------*/
3181eHalStatus
3182sme_TriggerBatchScanResultInd
3183(
3184 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3185 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3186 void *callbackContext
3187);
3188
3189/* ---------------------------------------------------------------------------
3190 \fn sme_StopBatchScanInd
3191 \brief API to stop batch scan request in FW
3192 \param hHal - The handle returned by macOpen.
3193 \param pRequest - Pointer to stop batch indication
3194 \return eHalStatus
3195 ---------------------------------------------------------------------------*/
3196eHalStatus
3197sme_StopBatchScanInd
3198(
3199 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3200);
3201
3202#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003203
3204#ifdef FEATURE_WLAN_CH_AVOID
3205/* ---------------------------------------------------------------------------
3206 \fn sme_AddChAvoidCallback
3207 \brief Used to plug in callback function
3208 Which notify channel may not be used with SAP or P2PGO mode.
3209 Notification come from FW.
3210 \param hHal
3211 \param pCallbackfn : callback function pointer should be plugged in
3212 \- return eHalStatus
3213 -------------------------------------------------------------------------*/
3214eHalStatus sme_AddChAvoidCallback
3215(
3216 tHalHandle hHal,
3217 void (*pCallbackfn)(void *pAdapter, void *indParam)
3218);
3219#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003220eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Jeff Johnson295189b2012-06-20 16:38:30 -07003221#endif //#if !defined( __SME_API_H )