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