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