blob: f3d83d71decb9a7ea6dd524177de6e8e2d28c99d [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Jeff Johnson32d95a32012-09-10 13:15:23 -07002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -07003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22#if !defined( __SME_API_H )
23#define __SME_API_H
24
25
26/**=========================================================================
27
28 \file smeApi.h
29
30 \brief prototype for SME APIs
31
32 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
33
34 Qualcomm Confidential and Proprietary.
35
36 ========================================================================*/
37
38/* $Header$ */
39
40/*--------------------------------------------------------------------------
41 Include Files
42 ------------------------------------------------------------------------*/
43#include "ccmApi.h"
44#include "csrApi.h"
45#include "pmcApi.h"
46#include "vos_mq.h"
47#include "vos_lock.h"
48#include "halTypes.h"
49#include "sirApi.h"
50#include "btcApi.h"
51#include "vos_nvitem.h"
52#include "p2p_Api.h"
53#ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
54#include "halFw.h"
55#endif
56
Jeff Johnsone7245742012-09-05 17:12:55 -070057#ifdef FEATURE_OEM_DATA_SUPPORT
58#include "oemDataApi.h"
59#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070060
61#if defined WLAN_FEATURE_VOWIFI
62#include "smeRrmInternal.h"
63#endif
64
65/*--------------------------------------------------------------------------
66 Preprocessor definitions and constants
67 ------------------------------------------------------------------------*/
68
69#define SME_SUMMARY_STATS 1
70#define SME_GLOBAL_CLASSA_STATS 2
71#define SME_GLOBAL_CLASSB_STATS 4
72#define SME_GLOBAL_CLASSC_STATS 8
73#define SME_GLOBAL_CLASSD_STATS 16
74#define SME_PER_STA_STATS 32
75
76#define SME_INVALID_COUNTRY_CODE "XX"
77
78/*--------------------------------------------------------------------------
79 Type declarations
80 ------------------------------------------------------------------------*/
81typedef struct _smeConfigParams
82{
83 tCsrConfigParam csrConfig;
84#if defined WLAN_FEATURE_VOWIFI
85 tRrmConfigParam rrmConfig;
86#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070087#if defined FEATURE_WLAN_LFR
88 tANI_U8 isFastRoamIniFeatureEnabled;
89#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070090#if defined FEATURE_WLAN_CCX
91 tANI_U8 isCcxIniFeatureEnabled;
92#endif
93#if defined WLAN_FEATURE_P2P_INTERNAL
94 tP2PConfigParam p2pConfig;
95#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070096#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Jeff Johnson295189b2012-06-20 16:38:30 -070097 tANI_U8 isFastTransitionEnabled;
Jeff Johnson43971f52012-07-17 12:26:56 -070098 tANI_U8 RoamRssiDiff;
Jeff Johnson295189b2012-06-20 16:38:30 -070099#endif
100} tSmeConfigParams, *tpSmeConfigParams;
101
102
103/*-------------------------------------------------------------------------
104 Function declarations and documenation
105 ------------------------------------------------------------------------*/
106
107/*--------------------------------------------------------------------------
108
109 \brief sme_Open() - Initialze all SME modules and put them at idle state
110
111 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
112 successfully return, all modules are at idle state ready to start.
113
114 smeOpen must be called before any other SME APIs can be involved.
115 smeOpen must be called after macOpen.
116
117 \param hHal - The handle returned by macOpen.
118
119 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
120
121 Other status means SME is failed to be initialized
122 \sa
123
124 --------------------------------------------------------------------------*/
125eHalStatus sme_Open(tHalHandle hHal);
126
127/*--------------------------------------------------------------------------
128
129 \brief sme_Close() - Release all SME modules and their resources.
130
131 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
132 return, all modules are at closed state.
133
134 No SME APIs can be involved after sme_Close except sme_Open.
135 sme_Close must be called before macClose.
136
137 \param hHal - The handle returned by macOpen.
138
139 \return eHAL_STATUS_SUCCESS - SME is successfully close.
140
141 Other status means SME is failed to be closed but caller still cannot
142 call any other SME functions except smeOpen.
143 \sa
144
145 --------------------------------------------------------------------------*/
146eHalStatus sme_Close(tHalHandle hHal);
147
148/*--------------------------------------------------------------------------
149
150 \brief sme_Start() - Put all SME modules at ready state.
151
152 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
153 successfully return, all modules are ready to run.
154
155 \param hHal - The handle returned by macOpen.
156
157 \return eHAL_STATUS_SUCCESS - SME is ready.
158
159 Other status means SME is failed to start.
160 \sa
161
162 --------------------------------------------------------------------------*/
163eHalStatus sme_Start(tHalHandle hHal);
164
165/*--------------------------------------------------------------------------
166
167 \brief sme_Stop() - Stop all SME modules and put them at idle state
168
169 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
170 return, all modules are at idle state ready to start.
171
172
173 \param hHal - The handle returned by macOpen.
174
175 \param pmcFlag - The flag tells SME if we want to stop PMC or not
176
177 \return eHAL_STATUS_SUCCESS - SME is stopped.
178
179 Other status means SME is failed to stop but caller should still consider
180 SME is stopped.
181 \sa
182
183 --------------------------------------------------------------------------*/
184eHalStatus sme_Stop(tHalHandle hHal, tANI_BOOLEAN pmcFlag);
185
186
187/*--------------------------------------------------------------------------
188
189 \brief sme_OpenSession() - Open a session for scan/roam operation.
190
191 This is a synchronous API.
192
193
194 \param hHal - The handle returned by macOpen.
195 \param callback - A pointer to the function caller specifies for roam/connect status indication
196 \param pContext - The context passed with callback
197 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
198 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
199
200 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
201
202 Other status means SME is failed to open the session.
203 eHAL_STATUS_RESOURCES - no more session available.
204 \sa
205
206 --------------------------------------------------------------------------*/
207eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback, void *pContext,
208 tANI_U8 *pSelfMacAddr, tANI_U8 *pbSessionId);
209
210
211/*--------------------------------------------------------------------------
212
213 \brief sme_CloseSession() - Open a session for scan/roam operation.
214
215 This is a synchronous API.
216
217
218 \param hHal - The handle returned by macOpen.
219
220 \param sessionId - A previous opened session's ID.
221
222 \return eHAL_STATUS_SUCCESS - session is closed.
223
224 Other status means SME is failed to open the session.
225 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
226 \sa
227
228 --------------------------------------------------------------------------*/
229eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
230 csrRoamSessionCloseCallback callback, void *pContext);
231
232
233
234/*--------------------------------------------------------------------------
235
236 \brief sme_UpdateConfig() - Change configurations for all SME moduels
237
238 The function updates some configuration for modules in SME, CCM, CSR, etc
239 during SMEs close -> open sequence.
240
241 Modules inside SME apply the new configuration at the next transaction.
242
243
244 \param hHal - The handle returned by macOpen.
245 \Param pSmeConfigParams - a pointer to a caller allocated object of
246 typedef struct _smeConfigParams.
247
248 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
249
250 Other status means SME is failed to update the config parameters.
251 \sa
252
253 --------------------------------------------------------------------------*/
254eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
255
256#ifdef FEATURE_WLAN_SCAN_PNO
257/*--------------------------------------------------------------------------
258
259 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
260
261 It is used at driver start up to inform RIVA of the default channel
262 configuration.
263
264 This is a synchronuous call
265
266 \param hHal - The handle returned by macOpen.
267
268 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
269
270 Other status means SME is failed to update the channel config.
271 \sa
272
273 --------------------------------------------------------------------------*/
274eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
275
276#endif // FEATURE_WLAN_SCAN_PNLO
277#ifdef WLAN_SOFTAP_FEATURE
278/*--------------------------------------------------------------------------
279
280 \brief sme_set11dinfo() - Set the 11d information about valid channels
281 and there power using information from nvRAM
282 This function is called only for AP.
283
284 This is a synchronuous call
285
286 \param hHal - The handle returned by macOpen.
287 \Param pSmeConfigParams - a pointer to a caller allocated object of
288 typedef struct _smeConfigParams.
289
290 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
291
292 Other status means SME is failed to update the config parameters.
293 \sa
294--------------------------------------------------------------------------*/
295
296eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
297
298/*--------------------------------------------------------------------------
299
300 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
301
302 This is a synchronuous call
303
304 \param hHal - The handle returned by HostapdAdapter.
305 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
306
307 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
308
309 Other status means, failed to get the current regulatory domain.
310 \sa
311--------------------------------------------------------------------------*/
312
313eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
314
315eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
316
317#endif
318
319/* ---------------------------------------------------------------------------
320 \fn sme_ChangeConfigParams
321 \brief The SME API exposed for HDD to provide config params to SME during
322 SMEs stop -> start sequence.
323
324 If HDD changed the domain that will cause a reset. This function will
325 provide the new set of 11d information for the new domain. Currrently this
326 API provides info regarding 11d only at reset but we can extend this for
327 other params (PMC, QoS) which needs to be initialized again at reset.
328
329 This is a synchronuous call
330
331 \param hHal - The handle returned by macOpen.
332
333 \Param
334 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
335 currently provides 11d related information like Country code,
336 Regulatory domain, valid channel list, Tx power per channel, a
337 list with active/passive scan allowed per valid channel.
338
339 \return eHalStatus
340 ---------------------------------------------------------------------------*/
341eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
342 tCsrUpdateConfigParam *pUpdateConfigParam);
343
344/*--------------------------------------------------------------------------
345
346 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
347 is ready tio run.
348
349 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
350 to running state.
351
352
353 \param hHal - The handle returned by macOpen.
354
355 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
356
357 Other status means SME failed to send the message to PE.
358 \sa
359
360 --------------------------------------------------------------------------*/
361eHalStatus sme_HDDReadyInd(tHalHandle hHal);
362
363
364/*--------------------------------------------------------------------------
365
366 \brief sme_ProcessMsg() - The main message processor for SME.
367
368 The function is called by a message dispatcher when to process a message
369 targeted for SME.
370
371
372 \param hHal - The handle returned by macOpen.
373 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
374
375 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
376
377 Other status means SME failed to process the message.
378 \sa
379
380 --------------------------------------------------------------------------*/
381eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
382
383v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
384
385/* ---------------------------------------------------------------------------
386 \fn sme_ScanRequest
387 \brief a wrapper function to Request a 11d or full scan from CSR.
388 \param pScanRequestID - pointer to an object to get back the request ID
389 \param callback - a callback function that scan calls upon finish, will not
390 be called if csrScanRequest returns error
391 \param pContext - a pointer passed in for the callback
392 \return eHalStatus
393 ---------------------------------------------------------------------------*/
394eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
395 tANI_U32 *pScanRequestID,
396 csrScanCompleteCallback callback, void *pContext);
397
398
399/* ---------------------------------------------------------------------------
400 \fn sme_ScanSetBGScanparams
401 \brief a wrapper function to request CSR to set BG scan params in PE
402 \param pScanReq - BG scan request structure
403 \return eHalStatus
404 ---------------------------------------------------------------------------*/
405eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
406
407
408/* ---------------------------------------------------------------------------
409 \fn sme_ScanGetResult
410 \brief a wrapper function to request scan results from CSR.
411 \param pFilter - If pFilter is NULL, all cached results are returned
412 \param phResult - an object for the result.
413 \return eHalStatus
414 ---------------------------------------------------------------------------*/
415eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
416 tScanResultHandle *phResult);
417
418
419/* ---------------------------------------------------------------------------
420 \fn sme_ScanFlushResult
421 \brief a wrapper function to request CSR to clear scan results.
422 \return eHalStatus
423 ---------------------------------------------------------------------------*/
424eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700425eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700426
427/* ---------------------------------------------------------------------------
428 \fn sme_ScanResultGetFirst
429 \brief a wrapper function to request CSR to returns the first element of
430 scan result.
431 \param hScanResult - returned from csrScanGetResult
432 \return tCsrScanResultInfo * - NULL if no result
433 ---------------------------------------------------------------------------*/
434tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
435 tScanResultHandle hScanResult);
436
437/* ---------------------------------------------------------------------------
438 \fn sme_ScanResultGetNext
439 \brief a wrapper function to request CSR to returns the next element of
440 scan result. It can be called without calling csrScanResultGetFirst
441 first
442 \param hScanResult - returned from csrScanGetResult
443 \return Null if no result or reach the end
444 ---------------------------------------------------------------------------*/
445tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
446 tScanResultHandle hScanResult);
447
448/* ---------------------------------------------------------------------------
449 \fn sme_ScanResultPurge
450 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
451 in the list and free memory for each item
452 \param hScanResult - returned from csrScanGetResult. hScanResult is
453 considered gone by
454 calling this function and even before this function reutrns.
455 \return eHalStatus
456 ---------------------------------------------------------------------------*/
457eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
458
459/* ---------------------------------------------------------------------------
460 \fn sme_ScanGetPMKIDCandidateList
461 \brief a wrapper function to return the PMKID candidate list
462 \param pPmkidList - caller allocated buffer point to an array of
463 tPmkidCandidateInfo
464 \param pNumItems - pointer to a variable that has the number of
465 tPmkidCandidateInfo allocated when retruning, this is
466 either the number needed or number of items put into
467 pPmkidList
468 \return eHalStatus - when fail, it usually means the buffer allocated is not
469 big enough and pNumItems
470 has the number of tPmkidCandidateInfo.
471 \Note: pNumItems is a number of tPmkidCandidateInfo,
472 not sizeof(tPmkidCandidateInfo) * something
473 ---------------------------------------------------------------------------*/
474eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
475 tPmkidCandidateInfo *pPmkidList,
476 tANI_U32 *pNumItems );
477
478
479/*----------------------------------------------------------------------------
480 \fn sme_RoamRegisterLinkQualityIndCallback
481
482 \brief
483 a wrapper function to allow HDD to register a callback handler with CSR for
484 link quality indications.
485
486 Only one callback may be registered at any time.
487 In order to deregister the callback, a NULL cback may be provided.
488
489 Registration happens in the task context of the caller.
490
491 \param callback - Call back being registered
492 \param pContext - user data
493
494 DEPENDENCIES: After CSR open
495
496 \return eHalStatus
497-----------------------------------------------------------------------------*/
498eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
499 csrRoamLinkQualityIndCallback callback,
500 void *pContext);
501
502
503/* ---------------------------------------------------------------------------
504 \fn sme_RoamConnect
505 \brief a wrapper function to request CSR to inititiate an association
506 \param sessionId - the sessionId returned by sme_OpenSession.
507 \param pProfile - can be NULL to join to any open ones
508 \param pRoamId - to get back the request ID
509 \return eHalStatus
510 ---------------------------------------------------------------------------*/
511eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
512 tANI_U32 *pRoamId);
513
514/* ---------------------------------------------------------------------------
515 \fn sme_RoamReassoc
516 \brief a wrapper function to request CSR to inititiate a re-association
517 \param pProfile - can be NULL to join the currently connected AP. In that
518 case modProfileFields should carry the modified field(s) which could trigger
519 reassoc
520 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
521 that might need modification dynamically once STA is up & running and this
522 could trigger a reassoc
523 \param pRoamId - to get back the request ID
524 \return eHalStatus
525 -------------------------------------------------------------------------------*/
526eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
527 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700528 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700529
530/* ---------------------------------------------------------------------------
531 \fn sme_RoamConnectToLastProfile
532 \brief a wrapper function to request CSR to disconnect and reconnect with
533 the same profile
534 \return eHalStatus. It returns fail if currently connected
535 ---------------------------------------------------------------------------*/
536eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
537
538/* ---------------------------------------------------------------------------
539 \fn sme_RoamDisconnect
540 \brief a wrapper function to request CSR to disconnect from a network
541 \param reason -- To indicate the reason for disconnecting. Currently, only
542 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
543 \return eHalStatus
544 ---------------------------------------------------------------------------*/
545eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
546
547#ifdef WLAN_SOFTAP_FEATURE
548/* ---------------------------------------------------------------------------
549 \fn sme_RoamStopBss
550 \brief a wrapper function to request CSR to stop bss
551 \param sessionId - sessionId of SoftAP
552 \return eHalStatus
553 ---------------------------------------------------------------------------*/
554eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
555
556/* ---------------------------------------------------------------------------
557 \fn sme_RoamGetAssociatedStas
558 \brief To probe the list of associated stations from various modules of CORE stack.
559 \This is an asynchronous API.
560 \param sessionId - sessionId of SoftAP
561 \param modId - Module from whom list of associtated stations is to be probed.
562 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
563 \param pUsrContext - Opaque HDD context
564 \param pfnSapEventCallback - Sap event callback in HDD
565 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
566 \return eHalStatus
567 -------------------------------------------------------------------------------*/
568eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
569 VOS_MODULE_ID modId, void *pUsrContext,
570 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
571
572/* ---------------------------------------------------------------------------
573 \fn sme_RoamDisconnectSta
574 \brief To disassociate a station. This is an asynchronous API.
575 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
576 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
577 -------------------------------------------------------------------------------*/
578eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
579
580/* ---------------------------------------------------------------------------
581 \fn sme_RoamDeauthSta
582 \brief To disassociate a station. This is an asynchronous API.
583 \param hHal - Global structure
584 \param sessionId - sessionId of SoftAP
585 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
586 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
587 -------------------------------------------------------------------------------*/
588eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
589 tANI_U8 *pPeerMacAddr);
590
591/* ---------------------------------------------------------------------------
592 \fn sme_RoamTKIPCounterMeasures
593 \brief To start or stop TKIP counter measures. This is an asynchronous API.
594 \param sessionId - sessionId of SoftAP
595 \param bEnable - Flag to start/stop TKIP countermeasures
596 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
597 -------------------------------------------------------------------------------*/
598eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
599
600/* ---------------------------------------------------------------------------
601 \fn sme_RoamGetWpsSessionOverlap
602 \brief To get the WPS PBC session overlap information.
603 \This is an asynchronous API.
604 \param sessionId - sessionId of SoftAP
605 \param pUsrContext - Opaque HDD context
606 \param pfnSapEventCallback - Sap event callback in HDD
607 \return eHalStatus
608 -------------------------------------------------------------------------------*/
609eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
610 void *pUsrContext, void *pfnSapEventCallback,
611 v_MACADDR_t pRemoveMac);
612#endif
613
614/* ---------------------------------------------------------------------------
615 \fn sme_RoamGetConnectState
616 \brief a wrapper function to request CSR to return the current connect state
617 of Roaming
618 \return eHalStatus
619 ---------------------------------------------------------------------------*/
620eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
621
622/* ---------------------------------------------------------------------------
623 \fn sme_RoamGetConnectProfile
624 \brief a wrapper function to request CSR to return the current connect
625 profile. Caller must call csrRoamFreeConnectProfile after it is done
626 and before reuse for another csrRoamGetConnectProfile call.
627 \param pProfile - pointer to a caller allocated structure
628 tCsrRoamConnectedProfile
629 \return eHalStatus. Failure if not connected
630 ---------------------------------------------------------------------------*/
631eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
632 tCsrRoamConnectedProfile *pProfile);
633
634/* ---------------------------------------------------------------------------
635 \fn sme_RoamFreeConnectProfile
636 \brief a wrapper function to request CSR to free and reinitialize the
637 profile returned previously by csrRoamGetConnectProfile.
638 \param pProfile - pointer to a caller allocated structure
639 tCsrRoamConnectedProfile
640 \return eHalStatus.
641 ---------------------------------------------------------------------------*/
642eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
643 tCsrRoamConnectedProfile *pProfile);
644
645/* ---------------------------------------------------------------------------
646 \fn sme_RoamSetPMKIDCache
647 \brief a wrapper function to request CSR to return the PMKID candidate list
648 \param pPMKIDCache - caller allocated buffer point to an array of
649 tPmkidCacheInfo
650 \param numItems - a variable that has the number of tPmkidCacheInfo
651 allocated when retruning, this is either the number needed
652 or number of items put into pPMKIDCache
653 \return eHalStatus - when fail, it usually means the buffer allocated is not
654 big enough and pNumItems has the number of
655 tPmkidCacheInfo.
656 \Note: pNumItems is a number of tPmkidCacheInfo,
657 not sizeof(tPmkidCacheInfo) * something
658 ---------------------------------------------------------------------------*/
659eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId, tPmkidCacheInfo *pPMKIDCache,
660 tANI_U32 numItems );
661
662/* ---------------------------------------------------------------------------
663 \fn sme_RoamGetSecurityReqIE
664 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
665 passes to PE to JOIN request or START_BSS request
666 This is a synchronuous call.
667 \param sessionId - returned by sme_OpenSession.
668 \param pLen - caller allocated memory that has the length of pBuf as input.
669 Upon returned, *pLen has the needed or IE length in pBuf.
670 \param pBuf - Caller allocated memory that contain the IE field, if any,
671 upon return
672 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
673 \return eHalStatus - when fail, it usually means the buffer allocated is not
674 big enough
675 ---------------------------------------------------------------------------*/
676eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
677 tANI_U8 *pBuf, eCsrSecurityType secType);
678
679/* ---------------------------------------------------------------------------
680 \fn sme_RoamGetSecurityRspIE
681 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
682 the beacon or probe rsp if connected
683 \param sessionId - returned by sme_OpenSession.
684 \param pLen - caller allocated memory that has the length of pBuf as input.
685 Upon returned, *pLen has the needed or IE length in pBuf.
686 \param pBuf - Caller allocated memory that contain the IE field, if any,
687 upon return
688 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
689 \return eHalStatus - when fail, it usually means the buffer allocated is not
690 big enough
691 ---------------------------------------------------------------------------*/
692eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
693 tANI_U8 *pBuf, eCsrSecurityType secType);
694
695
696/* ---------------------------------------------------------------------------
697 \fn sme_RoamGetNumPMKIDCache
698 \brief a wrapper function to request CSR to return number of PMKID cache
699 entries
700 \return tANI_U32 - the number of PMKID cache entries
701 ---------------------------------------------------------------------------*/
702tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
703
704/* ---------------------------------------------------------------------------
705 \fn sme_RoamGetPMKIDCache
706 \brief a wrapper function to request CSR to return PMKID cache from CSR
707 \param pNum - caller allocated memory that has the space of the number of
708 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
709 needed or actually number in tPmkidCacheInfo.
710 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
711 any, upon return
712 \return eHalStatus - when fail, it usually means the buffer allocated is not
713 big enough
714 ---------------------------------------------------------------------------*/
715eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
716 tPmkidCacheInfo *pPmkidCache);
717
718/* ---------------------------------------------------------------------------
719 \fn sme_GetConfigParam
720 \brief a wrapper function that HDD calls to get the global settings
721 currently maintained by CSR.
722 \param pParam - caller allocated memory
723 \return eHalStatus
724 ---------------------------------------------------------------------------*/
725eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
726
727/* ---------------------------------------------------------------------------
728 \fn sme_GetStatistics
729 \brief a wrapper function that client calls to register a callback to get
730 different PHY level statistics from CSR.
731
732 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
733 \param statsMask - The different category/categories of stats requester is looking for
734 The order in which you set the bits in the statsMask for requesting
735 different type of stats is:
736
737 eCsrSummaryStats = bit 0
738 eCsrGlobalClassAStats = bit 1
739 eCsrGlobalClassBStats = bit 2
740 eCsrGlobalClassCStats = bit 3
741 eCsrGlobalClassDStats = bit 4
742 eCsrPerStaStats = bit 5
743
744 \param callback - SME sends back the requested stats using the callback
745 \param periodicity - If requester needs periodic update, 0 means it's an one
746 time request
747 \param cache - If requester is happy with cached stats
748 \param staId - The station ID for which the stats is requested for
749 \param pContext - user context to be passed back along with the callback
750 \return eHalStatus
751 ---------------------------------------------------------------------------*/
752eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
753 tANI_U32 statsMask,
754 tCsrStatsCallback callback,
755 tANI_U32 periodicity, tANI_BOOLEAN cache,
756 tANI_U8 staId, void *pContext);
757
758eHalStatus sme_GetRssi(tHalHandle hHal,
759 tCsrRssiCallback callback,
760 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
761
762/* ---------------------------------------------------------------------------
763 \fn sme_CfgSetInt
764 \brief a wrapper function that HDD calls to set parameters in CFG.
765 \param cfgId - Configuration Parameter ID (type) for STA.
766 \param ccmValue - The information related to Configuration Parameter ID
767 which needs to be saved in CFG
768 \param callback - To be registered by CSR with CCM. Once the CFG done with
769 saving the information in the database, it notifies CCM &
770 then the callback will be invoked to notify.
771 \param toBeSaved - To save the request for future reference
772 \return eHalStatus
773 ---------------------------------------------------------------------------*/
774eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
775 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
776
777/* ---------------------------------------------------------------------------
778 \fn sme_CfgSetStr
779 \brief a wrapper function that HDD calls to set parameters in CFG.
780 \param cfgId - Configuration Parameter ID (type) for STA.
781 \param pStr - Pointer to the byte array which carries the information needs
782 to be saved in CFG
783 \param length - Length of the data to be saved
784 \param callback - To be registered by CSR with CCM. Once the CFG done with
785 saving the information in the database, it notifies CCM &
786 then the callback will be invoked to notify.
787 \param toBeSaved - To save the request for future reference
788 \return eHalStatus
789 ---------------------------------------------------------------------------*/
790eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
791 tANI_U32 length, tCcmCfgSetCallback callback,
792 eAniBoolean toBeSaved) ;
793
794
795/* ---------------------------------------------------------------------------
796 \fn sme_GetModifyProfileFields
797 \brief HDD or SME - QOS calls this function to get the current values of
798 connected profile fields, changing which can cause reassoc.
799 This function must be called after CFG is downloaded and STA is in connected
800 state. Also, make sure to call this function to get the current profile
801 fields before calling the reassoc. So that pModifyProfileFields will have
802 all the latest values plus the one(s) has been updated as part of reassoc
803 request.
804 \param pModifyProfileFields - pointer to the connected profile fields
805 changing which can cause reassoc
806
807 \return eHalStatus
808 -------------------------------------------------------------------------------*/
809eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
810 tCsrRoamModifyProfileFields * pModifyProfileFields);
811
812
813/*--------------------------------------------------------------------------
814 \fn sme_SetConfigPowerSave
815 \brief Wrapper fn to change power save configuration in SME (PMC) module.
816 For BMPS related configuration, this function also updates the CFG
817 and sends a message to FW to pick up the new values. Note: Calling
818 this function only updates the configuration and does not enable
819 the specified power save mode.
820 \param hHal - The handle returned by macOpen.
821 \param psMode - Power Saving mode being modified
822 \param pConfigParams - a pointer to a caller allocated object of type
823 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
824 \return eHalStatus
825 --------------------------------------------------------------------------*/
826eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
827 void *pConfigParams);
828
829/*--------------------------------------------------------------------------
830 \fn sme_GetConfigPowerSave
831 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
832 \param hHal - The handle returned by macOpen.
833 \param psMode - Power Saving mode
834 \param pConfigParams - a pointer to a caller allocated object of type
835 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
836 \return eHalStatus
837 --------------------------------------------------------------------------*/
838eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
839 void *pConfigParams);
840
841/* ---------------------------------------------------------------------------
842 \fn sme_SignalPowerEvent
843 \brief Signals to PMC that a power event has occurred. Used for putting
844 the chip into deep sleep mode.
845 \param hHal - The handle returned by macOpen.
846 \param event - the event that has occurred
847 \return eHalStatus
848 ---------------------------------------------------------------------------*/
849extern eHalStatus sme_SignalPowerEvent (
850 tHalHandle hHal,
851 tPmcPowerEvent event);
852
853/* ---------------------------------------------------------------------------
854 \fn sme_EnablePowerSave
855 \brief Enables one of the power saving modes. This API does not cause a
856 device state change. This is purely a configuration API.
857 \param hHal - The handle returned by macOpen.
858 \param psMode - The power saving mode to enable.
859 \return eHalStatus
860 ---------------------------------------------------------------------------*/
861extern eHalStatus sme_EnablePowerSave (
862 tHalHandle hHal,
863 tPmcPowerSavingMode psMode);
864
865/* ---------------------------------------------------------------------------
866 \fn sme_DisablePowerSave
867 \brief Disables one of the power saving modes.Disabling does not imply
868 that device will be brought out of the current PS mode. This is
869 purely a configuration API.
870 \param hHal - The handle returned by macOpen.
871 \param psMode - The power saving mode to disable.
872 \return eHalStatus
873 ---------------------------------------------------------------------------*/
874extern eHalStatus sme_DisablePowerSave (
875 tHalHandle hHal,
876 tPmcPowerSavingMode psMode);
877
878/* ---------------------------------------------------------------------------
879 \fn sme_StartAutoBmpsTimer
880 \brief Starts a timer that periodically polls all the registered
881 module for entry into Bmps mode. This timer is started only if BMPS is
882 enabled and whenever the device is in full power.
883 \param hHal - The handle returned by macOpen.
884 \return eHalStatus
885 ---------------------------------------------------------------------------*/
886extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
887
888/* ---------------------------------------------------------------------------
889 \fn sme_StopAutoBmpsTimer
890 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
891 Stopping the timer does not cause a device state change. Only the timer
892 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
893 \param hHal - The handle returned by macOpen.
894 \return eHalStatus
895 ---------------------------------------------------------------------------*/
896extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
897
898/* ---------------------------------------------------------------------------
899 \fn sme_QueryPowerState
900 \brief Returns the current power state of the device.
901 \param hHal - The handle returned by macOpen.
902 \param pPowerState - pointer to location to return power state
903 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
904 \return eHalStatus
905 ---------------------------------------------------------------------------*/
906extern eHalStatus sme_QueryPowerState (
907 tHalHandle hHal,
908 tPmcPowerState *pPowerState,
909 tPmcSwitchState *pSwWlanSwitchState);
910
911/* ---------------------------------------------------------------------------
912 \fn sme_IsPowerSaveEnabled
913 \brief Checks if the device is able to enter a particular power save mode
914 This does not imply that the device is in a particular PS mode
915 \param hHal - The handle returned by macOpen.
916 \param psMode - the power saving mode
917 \return eHalStatus
918 ---------------------------------------------------------------------------*/
919extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
920 tHalHandle hHal,
921 tPmcPowerSavingMode psMode);
922
923/* ---------------------------------------------------------------------------
924 \fn sme_RequestFullPower
925 \brief Request that the device be brought to full power state.
926 Note 1: If "fullPowerReason" specificied in this API is set to
927 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
928 and also clear any "buffered BMPS requests by HDD". Assumption is that since
929 HDD is requesting full power, we need to undo any previous HDD requests for
930 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
931 specified anything other than above, the buffered requests for BMPS and WoWL
932 will not be cleared.
933 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
934 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
935 request".
936 Note 3: When the device finally enters Full Power PMC will start a timer
937 if any of the following holds true:
938 - Auto BMPS mode is enabled
939 - Uapsd request is pending
940 - HDD's request for BMPS is pending
941 - HDD's request for WoWL is pending
942 On timer expiry PMC will attempt to put the device in BMPS mode if following
943 (in addition to those listed above) holds true:
944 - Polling of all modules through the Power Save Check routine passes
945 - STA is associated to an access point
946 \param hHal - The handle returned by macOpen.
947 \param - callbackRoutine Callback routine invoked in case of success/failure
948 \param - callbackContext - Cookie to be passed back during callback
949 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
950 distinguish between BAP and HDD requests
951 \return eHalStatus - status
952 eHAL_STATUS_SUCCESS - device brought to full power state
953 eHAL_STATUS_FAILURE - device cannot be brought to full power state
954 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
955 ---------------------------------------------------------------------------*/
956extern eHalStatus sme_RequestFullPower (
957 tHalHandle hHal,
958 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
959 void *callbackContext,
960 tRequestFullPowerReason fullPowerReason);
961
962/* ---------------------------------------------------------------------------
963 \fn sme_RequestBmps
964 \brief Request that the device be put in BMPS state. Request will be
965 accepted only if BMPS mode is enabled and power save check routine
966 passes. Only HDD should invoke this API.
967 \param hHal - The handle returned by macOpen.
968 \param - callbackRoutine Callback routine invoked in case of success/failure
969 \param - callbackContext - Cookie to be passed back during callback
970 \return eHalStatus
971 eHAL_STATUS_SUCCESS - device is in BMPS state
972 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
973 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
974 ---------------------------------------------------------------------------*/
975extern eHalStatus sme_RequestBmps (
976 tHalHandle hHal,
977 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
978 void *callbackContext);
979
980/* ---------------------------------------------------------------------------
981 \fn sme_SetDHCPTillPowerActiveFlag
982 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
983 entry by PMC
984 \param hHal - The handle returned by macOpen.
985 ---------------------------------------------------------------------------*/
986void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
987
988
989/* ---------------------------------------------------------------------------
990 \fn sme_StartUapsd
991 \brief Request that the device be put in UAPSD state. If the device is in
992 Full Power it will be put in BMPS mode first and then into UAPSD
993 mode.
994 \param hHal - The handle returned by macOpen.
995 \param - callbackRoutine Callback routine invoked in case of success/failure
996 \param - callbackContext - Cookie to be passed back during callback
997 eHAL_STATUS_SUCCESS - device is in UAPSD state
998 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
999 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1000 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1001 \return eHalStatus
1002 ---------------------------------------------------------------------------*/
1003extern eHalStatus sme_StartUapsd (
1004 tHalHandle hHal,
1005 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1006 void *callbackContext);
1007
1008/* ---------------------------------------------------------------------------
1009 \fn sme_StopUapsd
1010 \brief Request that the device be put out of UAPSD state. Device will be
1011 put in in BMPS state after stop UAPSD completes. Buffered requests for
1012 UAPSD will be cleared after this.
1013 \param hHal - The handle returned by macOpen.
1014 \return eHalStatus
1015 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1016 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1017 ---------------------------------------------------------------------------*/
1018extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1019
1020/* ---------------------------------------------------------------------------
1021 \fn sme_RequestStandby
1022 \brief Request that the device be put in standby. It is HDD's responsibility
1023 to bring the chip to full power and do a discconnect before calling
1024 this API. Request for standby will be rejected if STA is associated
1025 to an AP.
1026 \param hHal - The handle returned by macOpen.
1027 \param - callbackRoutine Callback routine invoked in case of success/failure
1028 \param - callbackContext - Cookie to be passed back during callback
1029 \return eHalStatus
1030 eHAL_STATUS_SUCCESS - device is in Standby mode
1031 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1032 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1033 ---------------------------------------------------------------------------*/
1034extern eHalStatus sme_RequestStandby (
1035 tHalHandle hHal,
1036 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1037 void *callbackContext);
1038
1039/* ---------------------------------------------------------------------------
1040 \fn sme_RegisterPowerSaveCheck
1041 \brief Register a power save check routine that is called whenever
1042 the device is about to enter one of the power save modes.
1043 \param hHal - The handle returned by macOpen.
1044 \param checkRoutine - Power save check routine to be registered
1045 \param callbackContext - Cookie to be passed back during callback
1046 \return eHalStatus
1047 eHAL_STATUS_SUCCESS - successfully registered
1048 eHAL_STATUS_FAILURE - not successfully registered
1049 ---------------------------------------------------------------------------*/
1050extern eHalStatus sme_RegisterPowerSaveCheck (
1051 tHalHandle hHal,
1052 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1053
1054/* ---------------------------------------------------------------------------
1055 \fn sme_DeregisterPowerSaveCheck
1056 \brief Deregister a power save check routine
1057 \param hHal - The handle returned by macOpen.
1058 \param checkRoutine - Power save check routine to be deregistered
1059 \return eHalStatus
1060 eHAL_STATUS_SUCCESS - successfully deregistered
1061 eHAL_STATUS_FAILURE - not successfully deregistered
1062 ---------------------------------------------------------------------------*/
1063extern eHalStatus sme_DeregisterPowerSaveCheck (
1064 tHalHandle hHal,
1065 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1066
1067/* ---------------------------------------------------------------------------
1068 \fn sme_RegisterDeviceStateUpdateInd
1069 \brief Register a callback routine that is called whenever
1070 the device enters a new device state (Full Power, BMPS, UAPSD)
1071 \param hHal - The handle returned by macOpen.
1072 \param callbackRoutine - Callback routine to be registered
1073 \param callbackContext - Cookie to be passed back during callback
1074 \return eHalStatus
1075 eHAL_STATUS_SUCCESS - successfully registered
1076 eHAL_STATUS_FAILURE - not successfully registered
1077 ---------------------------------------------------------------------------*/
1078extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1079 tHalHandle hHal,
1080 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1081 void *callbackContext);
1082
1083/* ---------------------------------------------------------------------------
1084 \fn sme_DeregisterDeviceStateUpdateInd
1085 \brief Deregister a routine that was registered for device state changes
1086 \param hHal - The handle returned by macOpen.
1087 \param callbackRoutine - Callback routine to be deregistered
1088 \return eHalStatus
1089 eHAL_STATUS_SUCCESS - successfully deregistered
1090 eHAL_STATUS_FAILURE - not successfully deregistered
1091 ---------------------------------------------------------------------------*/
1092extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1093 tHalHandle hHal,
1094 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1095
1096/* ---------------------------------------------------------------------------
1097 \fn sme_WowlAddBcastPattern
1098 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1099 do a pattern match on these patterns when Wowl is enabled during BMPS
1100 mode.
1101 \param hHal - The handle returned by macOpen.
1102 \param pattern - Pattern to be added
1103 \return eHalStatus
1104 eHAL_STATUS_FAILURE Cannot add pattern
1105 eHAL_STATUS_SUCCESS Request accepted.
1106 ---------------------------------------------------------------------------*/
1107extern eHalStatus sme_WowlAddBcastPattern (
1108 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001109 tpSirWowlAddBcastPtrn pattern,
1110 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001111
1112/* ---------------------------------------------------------------------------
1113 \fn sme_WowlDelBcastPattern
1114 \brief Delete a pattern that was added for Pattern Byte Matching.
1115 \param hHal - The handle returned by macOpen.
1116 \param pattern - Pattern to be deleted
1117 \return eHalStatus
1118 eHAL_STATUS_FAILURE Cannot delete pattern
1119 eHAL_STATUS_SUCCESS Request accepted.
1120 ---------------------------------------------------------------------------*/
1121extern eHalStatus sme_WowlDelBcastPattern (
1122 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001123 tpSirWowlDelBcastPtrn pattern,
1124 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001125
1126/* ---------------------------------------------------------------------------
1127 \fn sme_EnterWowl
1128 \brief This is the API to request entry into WOWL mode.
1129 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1130 SME will will cache the information that WOWL has been requested and
1131 attempt to put the device in BMPS first. On entry into BMPS, SME will
1132 enter the WOWL mode.
1133 Note 1: After WoWL request is accepted, If module other than HDD requests
1134 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1135 and attempt to put the chip into BMPS+WOWL based on a timer.
1136 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1137 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1138 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1139 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1140 are required. Currently there is no requirement or use case to support UAPSD
1141 and WOWL at the same time.
1142 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1143 Note 5. Request for WoWL is rejected if BMPS is disabled.
1144
1145 \param hHal - The handle returned by macOpen.
1146 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1147 Used for success/failure notification by SME
1148 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1149 at the time of callback.
1150 \param wakeReasonIndCB - Callback routine provided by HDD.
1151 Used for Wake Reason Indication by SME
1152 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1153 at the time of callback.
1154 \return eHalStatus
1155 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1156 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1157 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1158 mode is entered.
1159 ---------------------------------------------------------------------------*/
1160extern eHalStatus sme_EnterWowl (
1161 tHalHandle hHal,
1162 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1163 void *enterWowlCallbackContext,
1164#ifdef WLAN_WAKEUP_EVENTS
1165 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1166 void *wakeReasonIndCBContext,
1167#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001168 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001169
1170/* ---------------------------------------------------------------------------
1171 \fn sme_ExitWowl
1172 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1173 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1174 mode. Any Buffered request for WoWL will be cleared after this API.
1175 \param hHal - The handle returned by macOpen.
1176 \return eHalStatus
1177 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1178 only if the previous "Enter WOWL" transaction has
1179 not even completed.
1180 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1181 ---------------------------------------------------------------------------*/
1182extern eHalStatus sme_ExitWowl (tHalHandle hHal);
1183
1184/* ---------------------------------------------------------------------------
1185
1186 \fn sme_RoamSetKey
1187
1188 \brief To set encryption key. This function should be called only when connected
1189 This is an asynchronous API.
1190
1191 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1192
1193 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1194
1195 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1196
1197 FAILURE or RESOURCES The API finished and failed.
1198
1199 -------------------------------------------------------------------------------*/
1200eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1201
1202/* ---------------------------------------------------------------------------
1203
1204 \fn sme_RoamRemoveKey
1205
1206 \brief To set encryption key. This is an asynchronous API.
1207
1208 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1209
1210 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1211
1212 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1213
1214 FAILURE or RESOURCES The API finished and failed.
1215
1216 -------------------------------------------------------------------------------*/
1217eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1218
1219
1220/* ---------------------------------------------------------------------------
1221
1222 \fn sme_GetCountryCode
1223
1224 \brief To return the current country code. If no country code is applied, default country code is
1225 used to fill the buffer.
1226 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1227 This is a synchronous API.
1228
1229 \param pBuf - pointer to a caller allocated buffer for returned country code.
1230
1231 \param pbLen For input, this parameter indicates how big is the buffer.
1232 Upon return, this parameter has the number of bytes for country. If pBuf
1233 doesn't have enough space, this function returns
1234 fail status and this parameter contains the number that is needed.
1235
1236 \return eHalStatus SUCCESS.
1237
1238 FAILURE or RESOURCES The API finished and failed.
1239
1240 -------------------------------------------------------------------------------*/
1241eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1242
1243/* ---------------------------------------------------------------------------
1244
1245 \fn sme_SetCountryCode
1246
1247 \brief To change the current/default country code.
1248 If 11d supported is turned off, an error is return.
1249 This is a synchronous API.
1250
1251 \param pCountry - pointer to a caller allocated buffer for the country code.
1252
1253 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1254 whether a reset is required.
1255
1256 \return eHalStatus SUCCESS.
1257
1258 FAILURE or RESOURCES The API finished and failed.
1259
1260 -------------------------------------------------------------------------------*/
1261eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1262
1263/* ---------------------------------------------------------------------------
1264 \fn sme_ResetCountryCodeInformation
1265 \brief this function is to reset the country code current being used back to EEPROM default
1266 this includes channel list and power setting. This is a synchronous API.
1267 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1268 a restart is needed to apply the change
1269 \return eHalStatus
1270 -------------------------------------------------------------------------------*/
1271eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1272
1273/* ---------------------------------------------------------------------------
1274 \fn sme_GetSupportedCountryCode
1275 \brief this function is to get a list of the country code current being supported
1276 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1277 this has the country code list. 3 bytes for each country code. This may be NULL if
1278 caller wants to know the needed byte count.
1279 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1280 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1281 \return eHalStatus
1282 -------------------------------------------------------------------------------*/
1283eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1284
1285/* ---------------------------------------------------------------------------
1286 \fn sme_GetCurrentRegulatoryDomain
1287 \brief this function is to get the current regulatory domain. This is a synchronous API.
1288 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1289 SME. The function fails if 11d support is turned off.
1290 \param pDomain - Caller allocated buffer to return the current domain.
1291 \return eHalStatus SUCCESS.
1292
1293 FAILURE or RESOURCES The API finished and failed.
1294 -------------------------------------------------------------------------------*/
1295eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1296
1297/* ---------------------------------------------------------------------------
1298 \fn sme_SetRegulatoryDomain
1299 \brief this function is to set the current regulatory domain.
1300 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1301 SME. This is a synchronous API.
1302 \param domainId - indicate the domain (defined in the driver) needs to set to.
1303 See v_REGDOMAIN_t for definition
1304 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1305 a restart is needed to apply the change
1306 \return eHalStatus
1307 -------------------------------------------------------------------------------*/
1308eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1309
1310/* ---------------------------------------------------------------------------
1311
1312 \fn sme_GetRegulatoryDomainForCountry
1313
1314 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1315
1316 \param pCountry - pointer to a caller allocated buffer for input country code.
1317
1318 \param pDomainId Upon successful return, it is the domain that country belongs to.
1319 If it is NULL, returning success means that the country code is known.
1320
1321 \return eHalStatus SUCCESS.
1322
1323 FAILURE or RESOURCES The API finished and failed.
1324
1325 -------------------------------------------------------------------------------*/
1326eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1327
1328
1329
1330/* ---------------------------------------------------------------------------
1331
1332 \fn sme_GetSupportedRegulatoryDomains
1333
1334 \brief To return a list of supported regulatory domains. This is a synchronous API.
1335
1336 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1337
1338 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1339 Upon return, this parameter has the number for supported domains. If pDomains
1340 doesn't have enough space for all the supported domains, this function returns
1341 fail status and this parameter contains the number that is needed.
1342
1343 \return eHalStatus SUCCESS.
1344
1345 FAILURE or RESOURCES The API finished and failed.
1346
1347 -------------------------------------------------------------------------------*/
1348eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1349
1350//some support functions
1351tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1352tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1353tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1354//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1355eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1356
1357typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1358/* ---------------------------------------------------------------------------
1359
1360 \fn sme_ChangeCountryCode
1361
1362 \brief Change Country code from upperlayer during WLAN driver operation.
1363 This is a synchronous API.
1364
1365 \param hHal - The handle returned by macOpen.
1366
1367 \param pCountry New Country Code String
1368
1369 \return eHalStatus SUCCESS.
1370
1371 FAILURE or RESOURCES The API finished and failed.
1372
1373 -------------------------------------------------------------------------------*/
1374eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1375 tSmeChangeCountryCallback callback,
1376 tANI_U8 *pCountry,
1377 void *pContext,
1378 void* pVosContext );
1379
1380
1381/* ---------------------------------------------------------------------------
1382 \fn sme_BtcSignalBtEvent
1383 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1384 BT event type and the current operating mode of Libra (full power,
1385 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1386 would be employed.
1387 \param hHal - The handle returned by macOpen.
1388 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1389 Caller owns the memory and is responsible for freeing it.
1390 \return VOS_STATUS
1391 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1392 if driver has not yet been initialized or if BTC
1393 Events Layer has been disabled.
1394 VOS_STATUS_SUCCESS BT Event passed to HAL
1395 ---------------------------------------------------------------------------*/
1396VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1397
1398/* ---------------------------------------------------------------------------
1399 \fn sme_BtcSetConfig
1400 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1401 This function should be invoked only after CFG download has completed.
1402 Calling it after sme_HDDReadyInd is recommended.
1403 \param hHal - The handle returned by macOpen.
1404 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1405 tSmeBtcConfig. Caller owns the memory and is responsible
1406 for freeing it.
1407 \return VOS_STATUS
1408 VOS_STATUS_E_FAILURE Config not passed to HAL.
1409 VOS_STATUS_SUCCESS Config passed to HAL
1410 ---------------------------------------------------------------------------*/
1411VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1412
1413/* ---------------------------------------------------------------------------
1414 \fn sme_BtcGetConfig
1415 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1416 \param hHal - The handle returned by macOpen.
1417 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1418 Caller owns the memory and is responsible for freeing it.
1419 \return VOS_STATUS
1420 VOS_STATUS_E_FAILURE - failure
1421 VOS_STATUS_SUCCESS success
1422 ---------------------------------------------------------------------------*/
1423VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1424
1425/* ---------------------------------------------------------------------------
1426 \fn sme_SetCfgPrivacy
1427 \brief API to set configure privacy parameters
1428 \param hHal - The handle returned by macOpen.
1429 \param pProfile - Pointer CSR Roam profile.
1430 \param fPrivacy - This parameter indicates status of privacy
1431
1432 \return void
1433 ---------------------------------------------------------------------------*/
1434void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1435
1436#if defined WLAN_FEATURE_VOWIFI
1437/* ---------------------------------------------------------------------------
1438 \fn sme_NeighborReportRequest
1439 \brief API to request neighbor report.
1440 \param hHal - The handle returned by macOpen.
1441 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1442 tRrmNeighborReq. Caller owns the memory and is responsible
1443 for freeing it.
1444 \return VOS_STATUS
1445 VOS_STATUS_E_FAILURE - failure
1446 VOS_STATUS_SUCCESS success
1447 ---------------------------------------------------------------------------*/
1448VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1449 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1450#endif
1451
1452//The following are debug APIs to support direct read/write register/memory
1453//They are placed in SME because HW cannot be access when in LOW_POWER state
1454//AND not connected. The knowledge and synchronization is done in SME
1455
1456//sme_DbgReadRegister
1457//Caller needs to validate the input values
1458VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1459
1460//sme_DbgWriteRegister
1461//Caller needs to validate the input values
1462VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1463
1464//sme_DbgReadMemory
1465//Caller needs to validate the input values
1466//pBuf caller allocated buffer has the length of nLen
1467VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1468
1469//sme_DbgWriteMemory
1470//Caller needs to validate the input values
1471VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1472
1473#ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
1474//sme_GetFwVersion
1475VOS_STATUS sme_GetFwVersion (tHalHandle hHal,FwVersionInfo *pVersion);
1476#endif
1477#ifdef FEATURE_WLAN_INTEGRATED_SOC
1478VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1479 tSirVersionType *pVersion);
1480VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1481 tSirVersionType *pVersion);
1482VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1483 tANI_U8 *pVersion,
1484 tANI_U32 versionBufferSize);
1485VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1486 tANI_U8 *pVersion,
1487 tANI_U32 versionBufferSize);
1488#endif
1489eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1490 csrRoamCompleteCallback callback,
1491 void *pContext);
1492
1493#ifdef FEATURE_WLAN_WAPI
1494/* ---------------------------------------------------------------------------
1495 \fn sme_RoamSetBKIDCache
1496 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1497 candidate list.
1498 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1499 it is opened (by calling halOpen).
1500 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1501 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1502 when retruning, this is the number of items put into pBKIDCache
1503 \return eHalStatus - when fail, it usually means the buffer allocated is not
1504 big enough and pNumItems has the number of tBkidCacheInfo.
1505 ---------------------------------------------------------------------------*/
1506eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1507 tANI_U32 numItems );
1508
1509/* ---------------------------------------------------------------------------
1510 \fn sme_RoamGetBKIDCache
1511 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1512 BKID cache.
1513 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1514 it is opened (by calling halOpen).
1515 \param pNum - caller allocated memory that has the space of the number of
1516 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1517 in SME cache.
1518 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1519 upon return
1520 \return eHalStatus - when fail, it usually means the buffer allocated is not
1521 big enough.
1522 ---------------------------------------------------------------------------*/
1523eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1524 tBkidCacheInfo *pBkidCache);
1525
1526/* ---------------------------------------------------------------------------
1527 \fn sme_RoamGetNumBKIDCache
1528 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1529 number of BKID cache entries.
1530 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1531 it is opened (by calling halOpen).
1532 \return tANI_U32 - the number of BKID cache entries.
1533 ---------------------------------------------------------------------------*/
1534tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1535
1536/* ---------------------------------------------------------------------------
1537 \fn sme_ScanGetBKIDCandidateList
1538 \brief a wrapper function to return the BKID candidate list
1539 \param pBkidList - caller allocated buffer point to an array of
1540 tBkidCandidateInfo
1541 \param pNumItems - pointer to a variable that has the number of
1542 tBkidCandidateInfo allocated when retruning, this is
1543 either the number needed or number of items put into
1544 pPmkidList
1545 \return eHalStatus - when fail, it usually means the buffer allocated is not
1546 big enough and pNumItems
1547 has the number of tBkidCandidateInfo.
1548 \Note: pNumItems is a number of tBkidCandidateInfo,
1549 not sizeof(tBkidCandidateInfo) * something
1550 ---------------------------------------------------------------------------*/
1551eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1552 tBkidCandidateInfo *pBkidList,
1553 tANI_U32 *pNumItems );
1554#endif /* FEATURE_WLAN_WAPI */
1555
Jeff Johnsone7245742012-09-05 17:12:55 -07001556#ifdef FEATURE_OEM_DATA_SUPPORT
1557/********************************************************************************************
1558 Oem data related modifications
1559*********************************************************************************************/
1560/* ---------------------------------------------------------------------------
1561 \fn sme_OemDataReq
1562 \param sessionId - session id of session to be used for oem data req.
1563 \param pOemDataReqID - pointer to an object to get back the request ID
1564 \param callback - a callback function that is called upon finish
1565 \param pContext - a pointer passed in for the callback
1566 \return eHalStatus
1567 ---------------------------------------------------------------------------*/
1568eHalStatus sme_OemDataReq(tHalHandle hHal,
1569 tANI_U8 sessionId,
1570 tOemDataReqConfig *,
1571 tANI_U32 *pOemDataReqID,
1572 oemData_OemDataReqCompleteCallback callback,
1573 void *pContext);
1574
1575/* ---------------------------------------------------------------------------
1576 \fn sme_getOemDataRsp
1577 \param pOemDataRsp - A pointer to the response object
1578 \param pOemDataReqID - pointer to an object to get back the request ID
1579 \return eHalStatus
1580 ---------------------------------------------------------------------------*/
1581eHalStatus sme_getOemDataRsp(tHalHandle hHal,
1582 tOemDataRsp **pOemDataRsp);
1583
1584#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07001585
1586
1587#ifdef WLAN_SOFTAP_FEATURE
1588
1589/* ---------------------------------------------------------------------------
1590
1591 \fn sme_RoamUpdateAPWPSIE
1592
1593 \brief To update AP's WPS IE. This function should be called after SME AP session is created
1594 This is an asynchronous API.
1595
1596 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
1597
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001598 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07001599
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001600 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001601
1602 -------------------------------------------------------------------------------*/
1603
1604eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
1605/* ---------------------------------------------------------------------------
1606
1607 \fn sme_RoamUpdateAPWPARSNIEs
1608
1609 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
1610 This is an asynchronous API.
1611
1612 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
1613
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001614 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07001615
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001616 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001617
1618 -------------------------------------------------------------------------------*/
1619eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
1620
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001621/* ---------------------------------------------------------------------------
1622
1623 sme_ChangeMCCBeaconInterval
1624
1625 \brief To update P2P-GO's beacon Interval.
1626
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001627 \return eHalStatus SUCCESS
1628 FAILURE or RESOURCES
1629 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001630 -------------------------------------------------------------------------------*/
1631eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
1632
1633
Jeff Johnson295189b2012-06-20 16:38:30 -07001634#endif
1635
1636/* ---------------------------------------------------------------------------
1637 \fn sme_sendBTAmpEvent
1638 \brief API to send the btAMPstate to FW
1639 \param hHal - The handle returned by macOpen.
1640 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001641 \return eHalStatus SUCCESS
1642 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001643
1644--------------------------------------------------------------------------- */
1645
1646eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
1647
1648
1649
1650/* ---------------------------------------------------------------------------
1651 \fn sme_SetHostOffload
1652 \brief API to set the host offload feature.
1653 \param hHal - The handle returned by macOpen.
1654 \param pRequest - Pointer to the offload request.
1655 \return eHalStatus
1656 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001657eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
1658 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001659
1660/* ---------------------------------------------------------------------------
1661 \fn sme_SetKeepAlive
1662 \brief API to set the Keep Alive feature.
1663 \param hHal - The handle returned by macOpen.
1664 \param pRequest - Pointer to the Keep Alive request.
1665 \return eHalStatus
1666 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001667eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
1668 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001669
1670
1671/* ---------------------------------------------------------------------------
1672 \fn sme_AbortMacScan
1673 \brief API to cancel MAC scan.
1674 \param hHal - The handle returned by macOpen.
1675 \return VOS_STATUS
1676 VOS_STATUS_E_FAILURE - failure
1677 VOS_STATUS_SUCCESS success
1678 ---------------------------------------------------------------------------*/
1679eHalStatus sme_AbortMacScan(tHalHandle hHal);
1680
1681/* ----------------------------------------------------------------------------
1682 \fn sme_GetOperationChannel
1683 \brief API to get current channel on which STA is parked
1684 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001685 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07001686 \returns eHAL_STATUS_SUCCESS
1687 eHAL_STATUS_FAILURE
1688-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001689eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001690
1691#ifdef WLAN_FEATURE_P2P
1692/* ---------------------------------------------------------------------------
1693
1694 \fn sme_RegisterMgtFrame
1695
1696 \brief To register managment frame of specified type and subtype.
1697 \param frameType - type of the frame that needs to be passed to HDD.
1698 \param matchData - data which needs to be matched before passing frame
1699 to HDD.
1700 \param matchDataLen - Length of matched data.
1701 \return eHalStatus
1702 -------------------------------------------------------------------------------*/
1703eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1704 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
1705
1706/* ---------------------------------------------------------------------------
1707
1708 \fn sme_DeregisterMgtFrame
1709
1710 \brief To De-register managment frame of specified type and subtype.
1711 \param frameType - type of the frame that needs to be passed to HDD.
1712 \param matchData - data which needs to be matched before passing frame
1713 to HDD.
1714 \param matchDataLen - Length of matched data.
1715 \return eHalStatus
1716 -------------------------------------------------------------------------------*/
1717eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1718 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
1719#endif
1720
1721/* ---------------------------------------------------------------------------
1722
1723 \fn sme_ConfigureRxpFilter
1724
1725 \brief
1726 SME will pass this request to lower mac to set/reset the filter on RXP for
1727 multicast & broadcast traffic.
1728
1729 \param
1730
1731 hHal - The handle returned by macOpen.
1732
1733 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
1734 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
1735 on this param. In future we can use this as a mask to set various types of
1736 filters as suggested below:
1737 FILTER_ALL_MULTICAST:
1738 FILTER_ALL_BROADCAST:
1739 FILTER_ALL_MULTICAST_BROADCAST:
1740
1741
1742 \return eHalStatus
1743
1744
1745--------------------------------------------------------------------------- */
1746eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
1747 tpSirWlanSetRxpFilters wlanRxpFilterParam);
1748
1749/* ---------------------------------------------------------------------------
1750
1751 \fn sme_ConfigureAppsCpuWakeupState
1752
1753 \brief
1754 SME will pass this request to lower mac to dynamically adjusts the listen
1755 interval based on the WLAN/MSM activity. This feature is named as
1756 Telescopic Beacon wakeup feature.
1757
1758 \param
1759
1760 hHal - The handle returned by macOpen.
1761
1762 isAppsAwake- Depicts the state of the Apps CPU
1763
1764
1765 \return eHalStatus
1766
1767
1768--------------------------------------------------------------------------- */
1769eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
1770
1771#ifdef FEATURE_WLAN_INTEGRATED_SOC
1772/* ---------------------------------------------------------------------------
1773
1774 \fn sme_ConfigureSuspendInd
1775
1776 \brief
1777 SME will pass this request to lower mac to Indicate that the wlan needs to
1778 be suspended
1779
1780 \param
1781
1782 hHal - The handle returned by macOpen.
1783
1784 wlanSuspendParam- Depicts the wlan suspend params
1785
1786
1787 \return eHalStatus
1788
1789
1790--------------------------------------------------------------------------- */
1791eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
1792 tpSirWlanSuspendParam wlanSuspendParam);
1793
1794/* ---------------------------------------------------------------------------
1795
1796 \fn sme_ConfigureResumeReq
1797
1798 \brief
1799 SME will pass this request to lower mac to Indicate that the wlan needs to
1800 be Resumed
1801
1802 \param
1803
1804 hHal - The handle returned by macOpen.
1805
1806 wlanResumeParam- Depicts the wlan resume params
1807
1808
1809 \return eHalStatus
1810
1811
1812--------------------------------------------------------------------------- */
1813eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
1814 tpSirWlanResumeParam wlanResumeParam);
1815
1816#endif
1817
1818/* ---------------------------------------------------------------------------
1819
1820 \fn sme_GetInfraSessionId
1821
1822 \brief To get the session ID for infra session, if connected
1823 This is a synchronous API.
1824
1825 \param hHal - The handle returned by macOpen.
1826
1827 \return sessionid, -1 if infra session is not connected
1828
1829 -------------------------------------------------------------------------------*/
1830tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
1831
1832/* ---------------------------------------------------------------------------
1833
1834 \fn sme_GetInfraOperationChannel
1835
1836 \brief To get the operating channel for infra session, if connected
1837 This is a synchronous API.
1838
1839 \param hHal - The handle returned by macOpen.
1840 \param sessionId - the sessionId returned by sme_OpenSession.
1841
1842 \return operating channel, 0 if infra session is not connected
1843
1844 -------------------------------------------------------------------------------*/
1845tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
1846/* ---------------------------------------------------------------------------
1847
1848 \fn sme_GetConcurrentOperationChannel
1849
1850 \brief To get the operating channel for other concurrent sessions, if connected
1851 This is a synchronous API.
1852
1853 \param hHal - The handle returned by macOpen.
1854 \param currentPersona - persona that is trying to come up.
1855
1856 \return operating channel, 0 if infra session is not connected
1857
1858 -------------------------------------------------------------------------------*/
1859tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
1860
1861/* ---------------------------------------------------------------------------
1862 \fn sme_AbortMacScan
1863 \brief API to cancel MAC scan.
1864 \param hHal - The handle returned by macOpen.
1865 \return VOS_STATUS
1866 VOS_STATUS_E_FAILURE - failure
1867 VOS_STATUS_SUCCESS success
1868 ---------------------------------------------------------------------------*/
1869eHalStatus sme_AbortMacScan(tHalHandle hHal);
1870
1871/* ---------------------------------------------------------------------------
1872 \fn sme_GetCfgValidChannels
1873 \brief API to get valid channel list
1874 \param hHal - The handle returned by macOpen.
1875 \param aValidChannels - Pointer to the valid channel list
1876 \param len - valid channel list length
1877 \return eHalStatus
1878 ---------------------------------------------------------------------------*/
1879eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
1880
1881#ifdef FEATURE_WLAN_SCAN_PNO
1882
1883/* ---------------------------------------------------------------------------
1884 \fn sme_SetPreferredNetworkList
1885 \brief API to set the Preferred Network List Offload feature.
1886 \param hHal - The handle returned by macOpen.
1887 \param pRequest - Pointer to the offload request.
1888 \return eHalStatus
1889 ---------------------------------------------------------------------------*/
1890eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
1891
1892/* ---------------------------------------------------------------------------
1893 \fn sme_SetRSSIFilter
1894 \brief API to set RSSI Filter feature.
1895 \param hHal - The handle returned by macOpen.
1896 \param pRequest - Pointer to the offload request.
1897 \return eHalStatus
1898 ---------------------------------------------------------------------------*/
1899eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
1900
1901/******************************************************************************
1902*
1903* Name: sme_PreferredNetworkFoundInd
1904*
1905* Description:
1906* Invoke Preferred Network Found Indication
1907*
1908* Parameters:
1909* hHal - HAL handle for device
1910* pMsg - found network description
1911*
1912* Returns: eHalStatus
1913*
1914******************************************************************************/
1915eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
1916#endif // FEATURE_WLAN_SCAN_PNO
1917
1918/* ---------------------------------------------------------------------------
1919 \fn sme_SetPowerParams
1920 \brief API to set Power Parameters
1921 \param hHal - The handle returned by macOpen.
1922 \param pwParams - Pointer to the power parameters requested.
1923 \return eHalStatus
1924 ---------------------------------------------------------------------------*/
1925eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams);
1926
1927/* ---------------------------------------------------------------------------
1928 \fn sme_SetTxPerTracking
1929 \brief Set Tx PER tracking configuration parameters
1930 \param hHal - The handle returned by macOpen.
1931 \param pTxPerTrackingParam - Tx PER configuration parameters
1932 \return eHalStatus
1933 ---------------------------------------------------------------------------*/
1934eHalStatus sme_SetTxPerTracking (
1935 tHalHandle hHal,
1936 void (*pCallbackfn) (void *pCallbackContext),
1937 void *pCallbackContext,
1938 tpSirTxPerTrackingParam pTxPerTrackingParam);
1939
1940#ifdef WLAN_FEATURE_PACKET_FILTERING
1941/* ---------------------------------------------------------------------------
1942 \fn sme_ReceiveFilterSetFilter
1943 \brief API to set 8023 Multicast Address List
1944 \param hHal - The handle returned by macOpen.
1945 \param pMulticastAddrs - Pointer to the Multicast Address List
1946 \return eHalStatus
1947 ---------------------------------------------------------------------------*/
1948eHalStatus sme_8023MulticastList(tHalHandle hHal, tpSirRcvFltMcAddrList pMulticastAddrs);
1949
1950/* ---------------------------------------------------------------------------
1951 \fn sme_ReceiveFilterSetFilter
1952 \brief API to set Receive Packet Filter
1953 \param hHal - The handle returned by macOpen.
1954 \param pRcvPktFilterCfg - Receive Packet Filter parameter
1955 \return eHalStatus
1956 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001957eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
1958 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001959
1960/* ---------------------------------------------------------------------------
1961 \fn sme_GetFilterMatchCount
1962 \brief API to get D0 PC Filter Match Count
1963 \param hHal - The handle returned by macOpen
1964 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
1965 \param callbackContext - Cookie to be passed back during callback
1966 \return eHalStatus
1967 ---------------------------------------------------------------------------*/
1968eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
1969 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001970 void *callbackContext,
1971 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001972
1973/* ---------------------------------------------------------------------------
1974 \fn sme_ReceiveFilterClearFilter
1975 \brief API to clear Receive Packet Filter
1976 \param hHal - The handle returned by macOpen.
1977 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
1978 \return eHalStatus
1979 ---------------------------------------------------------------------------*/
1980eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07001981 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
1982 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001983#endif // WLAN_FEATURE_PACKET_FILTERING
1984/* ---------------------------------------------------------------------------
1985
1986 \fn sme_IsChannelValid
1987 \brief To check if the channel is valid for currently established domain
1988 This is a synchronous API.
1989
1990 \param hHal - The handle returned by macOpen.
1991 \param channel - channel to verify
1992
1993 \return TRUE/FALSE, TRUE if channel is valid
1994
1995 -------------------------------------------------------------------------------*/
1996tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
1997
1998/* ---------------------------------------------------------------------------
1999 \fn sme_SetFreqBand
2000 \brief Used to set frequency band.
2001 \param hHal
2002 \eBand band value to be configured
2003 \- return eHalStatus
2004 -------------------------------------------------------------------------*/
2005eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2006
2007/* ---------------------------------------------------------------------------
2008 \fn sme_GetFreqBand
2009 \brief Used to get the current band settings.
2010 \param hHal
2011 \pBand pointer to hold the current band value
2012 \- return eHalStatus
2013 -------------------------------------------------------------------------*/
2014eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2015
2016/* ---------------------------------------------------------------------------
2017
2018 \fn sme_SetTxPerTracking
2019 \brief Set Tx PER tracking configuration parameters
2020 \param hHal - The handle returned by macOpen.
2021 \param pTxPerTrackingParam - Tx PER configuration parameters
2022 \return eHalStatus
2023 ---------------------------------------------------------------------------*/
2024eHalStatus sme_SetTxPerTracking (
2025 tHalHandle hHal,
2026 void (*pCallbackfn) (void *pCallbackContext),
2027 void *pCallbackContext,
2028 tpSirTxPerTrackingParam pTxPerTrackingParam);
2029
2030#ifdef WLAN_FEATURE_GTK_OFFLOAD
2031/* ---------------------------------------------------------------------------
2032 \fn sme_SetGTKOffload
2033 \brief API to set GTK offload feature.
2034 \param hHal - The handle returned by macOpen.
2035 \param pRequest - Pointer to the GTK offload request.
2036 \return eHalStatus
2037 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002038eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002039
2040/* ---------------------------------------------------------------------------
2041 \fn sme_GetGTKOffload
2042 \brief API to get GTK offload information.
2043 \param hHal - The handle returned by macOpen.
2044 \param pRequest - Pointer to the GTK offload response.
2045 \return eHalStatus
2046 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002047eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2048 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002049#endif // WLAN_FEATURE_GTK_OFFLOAD
2050
2051#ifdef WLAN_WAKEUP_EVENTS
2052eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2053#endif // WLAN_WAKEUP_EVENTS
2054
2055/* ---------------------------------------------------------------------------
2056 \fn sme_SetTxPerTracking
2057 \brief Set Tx PER tracking configuration parameters
2058 \param hHal - The handle returned by macOpen.
2059 \param pTxPerTrackingParam - Tx PER configuration parameters
2060 \return eHalStatus
2061 ---------------------------------------------------------------------------*/
2062eHalStatus sme_SetTxPerTracking (
2063 tHalHandle hHal,
2064 void (*pCallbackfn) (void *pCallbackContext),
2065 void *pCallbackContext,
2066 tpSirTxPerTrackingParam pTxPerTrackingParam);
2067
2068
2069//return frequency for a particular channel
2070tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2071
2072tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2073
2074#if defined WLAN_FEATURE_P2P_INTERNAL
2075
2076eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2077
2078/* ---------------------------------------------------------------------------
2079 \fn sme_p2pFlushDeviceList
2080 \brief Remove cached P2P result from scan results
2081 \param hHal - The handle returned by macOpen.
2082 \param HDDSessionId - HDD's sessionId. Currently unused.
2083 \return eHalStatus
2084 ---------------------------------------------------------------------------*/
2085eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2086
2087eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2088 tCsrScanResultFilter *pFilter);
2089
2090#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2091
2092/* ---------------------------------------------------------------------------
2093 \fn sme_SetMaxTxPower
2094 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2095 setting will not persist over reboots
2096 \param hHal
2097 \param pBssid BSSID to set the power cap for
2098 \param pBssid pSelfMacAddress self MAC Address
2099 \param pBssid power to set in dB
2100 \- return eHalStatus
2101 -------------------------------------------------------------------------*/
2102eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2103 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2104
2105#ifdef WLAN_SOFTAP_FEATURE
2106/* ---------------------------------------------------------------------------
2107
2108 \fn sme_HideSSID
2109
2110 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2111 not persist over reboots.
2112
2113 \param hHal
2114 \param sessionId
2115 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2116 \- return eHalStatus
2117
2118 -------------------------------------------------------------------------------*/
2119eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
2120#endif
2121
2122/* ---------------------------------------------------------------------------
2123
2124 \fn sme_SetTmLevel
2125 \brief Set Thermal Mitigation Level to RIVA
2126 \param hHal - The handle returned by macOpen.
2127 \param newTMLevel - new Thermal Mitigation Level
2128 \param tmMode - Thermal Mitigation handle mode, default 0
2129 \return eHalStatus
2130 ---------------------------------------------------------------------------*/
2131eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2132
2133/*---------------------------------------------------------------------------
2134
2135 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2136 Host and FW.
2137
2138 \param hHal - HAL handle for device
2139
2140 \return NONE
2141
2142---------------------------------------------------------------------------*/
2143void sme_featureCapsExchange(tHalHandle hHal);
2144
Jeff Johnsond13512a2012-07-17 11:42:19 -07002145/*---------------------------------------------------------------------------
2146
Yathish9f22e662012-12-10 14:21:35 -08002147 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2148 between in Host.
2149
2150 \param hHal - HAL handle for device
2151
2152 \return NONE
2153
2154---------------------------------------------------------------------------*/
2155void sme_disableFeatureCapablity(tANI_U8 feature_index);
2156
2157/*---------------------------------------------------------------------------
2158
Jeff Johnsond13512a2012-07-17 11:42:19 -07002159 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2160 country code
2161 Host and FW.
2162
2163 \param hHal - HAL handle for device
2164 \param pCountry - pointer to country code
2165
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002166 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002167
2168 ---------------------------------------------------------------------------*/
2169eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2170
2171/*---------------------------------------------------------------------------
2172
2173 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2174 country code.
2175
2176 \param hHal - HAL handle for device
2177 \param pCountry - pointer to country code
2178
2179 \return Success or failure
2180
2181 ---------------------------------------------------------------------------*/
2182eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2183
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002184/* ---------------------------------------------------------------------------
2185 \fn sme_transportDebug
2186 \brief Dynamically monitoring Transport channels
2187 Private IOCTL will querry transport channel status if driver loaded
Jeff Johnsonb88db982012-12-10 13:34:59 -08002188 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002189 \param toggleStallDetect Enable stall detect feature
2190 This feature will take effect to data performance
2191 Not integrate till fully verification
2192 \- return NONE
2193 -------------------------------------------------------------------------*/
2194void sme_transportDebug
2195(
2196 v_BOOL_t displaySnapshot,
2197 v_BOOL_t toggleStallDetect
2198);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002199
2200#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
2201/* ---------------------------------------------------------------------------
2202 \fn sme_UpdateRoamPrefer5GHz
2203 \brief enable/disable Roam prefer 5G runtime option
2204 This function is called through dynamic setConfig callback function
2205 to configure the Roam prefer 5G runtime option
2206 \param hHal - HAL handle for device
2207 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2208 \- return Success or failure
2209 -------------------------------------------------------------------------*/
2210
2211eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002212
2213/* ---------------------------------------------------------------------------
2214 \fn sme_UpdateImmediateRoamRssiDiff
2215 \brief Update nImmediateRoamRssiDiff
2216 This function is called through dynamic setConfig callback function
2217 to configure nImmediateRoamRssiDiff
2218 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2219 \param hHal - HAL handle for device
2220 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2221 candidate and current AP.
2222 \- return Success or failure
2223 -------------------------------------------------------------------------*/
2224
2225eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002226#endif
2227
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002228/* ---------------------------------------------------------------------------
2229 \fn sme_IsFeatureSupportedByFW
2230 \brief Check if an feature is enabled by FW
2231
2232 \param feattEnumValue - Enumeration value of the feature to be checked.
2233 A value from enum placeHolderInCapBitmap
2234
2235 \- return 1/0 (TRUE/FALSE)
2236 -------------------------------------------------------------------------*/
2237tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
2238#ifdef FEATURE_WLAN_TDLS
2239/* ---------------------------------------------------------------------------
2240 \fn sme_SendTdlsMgmtFrame
2241 \brief API to send TDLS management frames.
2242
2243 \param peerMac - peer's Mac Adress.
2244 \param frame_type - Type of TDLS mgmt frame to be sent.
2245 \param dialog - dialog token used in the frame.
2246 \param status - status to be incuded in the frame.
2247 \param buf - additional IEs to be included
2248 \param len - lenght of additional Ies
2249 \- return VOS_STATUS_SUCCES
2250 -------------------------------------------------------------------------*/
2251VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
2252 tANI_U8 frame_type, tANI_U8 dialog, tANI_U16 status, tANI_U8 *buf, tANI_U8 len);
2253/* ---------------------------------------------------------------------------
2254 \fn sme_AddTdlsPeerSta
2255 \brief API to Add TDLS peer sta entry.
2256
2257 \param peerMac - peer's Mac Adress.
2258 \- return VOS_STATUS_SUCCES
2259 -------------------------------------------------------------------------*/
2260VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2261/* ---------------------------------------------------------------------------
2262 \fn sme_DeleteTdlsPeerSta
2263 \brief API to Delete TDLS peer sta entry.
2264
2265 \param peerMac - peer's Mac Adress.
2266 \- return VOS_STATUS_SUCCES
2267 -------------------------------------------------------------------------*/
2268VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2269#endif
2270#ifdef FEATURE_WLAN_TDLS_INTERNAL
2271typedef struct smeTdlsDisResult
2272{
2273 tSirMacAddr tdlsPeerMac;
2274 v_S7_t tdlsPeerRssi;
2275} tSmeTdlsDisResult;
2276
2277VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2278v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
2279 tSmeTdlsDisResult *disResult, v_U8_t listType);
2280VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2281VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2282
2283#endif /* FEATURE_WLAN_TDLS */
2284
Jeff Johnson295189b2012-06-20 16:38:30 -07002285#endif //#if !defined( __SME_API_H )