blob: b8b8c92ec3b90fac03904e09bb60350fd73e0a8d [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
898/* ---------------------------------------------------------------------------
899 \fn sme_StartAutoBmpsTimer
900 \brief Starts a timer that periodically polls all the registered
901 module for entry into Bmps mode. This timer is started only if BMPS is
902 enabled and whenever the device is in full power.
903 \param hHal - The handle returned by macOpen.
904 \return eHalStatus
905 ---------------------------------------------------------------------------*/
906extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
907
908/* ---------------------------------------------------------------------------
909 \fn sme_StopAutoBmpsTimer
910 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
911 Stopping the timer does not cause a device state change. Only the timer
912 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
913 \param hHal - The handle returned by macOpen.
914 \return eHalStatus
915 ---------------------------------------------------------------------------*/
916extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
917
918/* ---------------------------------------------------------------------------
919 \fn sme_QueryPowerState
920 \brief Returns the current power state of the device.
921 \param hHal - The handle returned by macOpen.
922 \param pPowerState - pointer to location to return power state
923 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
924 \return eHalStatus
925 ---------------------------------------------------------------------------*/
926extern eHalStatus sme_QueryPowerState (
927 tHalHandle hHal,
928 tPmcPowerState *pPowerState,
929 tPmcSwitchState *pSwWlanSwitchState);
930
931/* ---------------------------------------------------------------------------
932 \fn sme_IsPowerSaveEnabled
933 \brief Checks if the device is able to enter a particular power save mode
934 This does not imply that the device is in a particular PS mode
935 \param hHal - The handle returned by macOpen.
936 \param psMode - the power saving mode
937 \return eHalStatus
938 ---------------------------------------------------------------------------*/
939extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
940 tHalHandle hHal,
941 tPmcPowerSavingMode psMode);
942
943/* ---------------------------------------------------------------------------
944 \fn sme_RequestFullPower
945 \brief Request that the device be brought to full power state.
946 Note 1: If "fullPowerReason" specificied in this API is set to
947 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
948 and also clear any "buffered BMPS requests by HDD". Assumption is that since
949 HDD is requesting full power, we need to undo any previous HDD requests for
950 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
951 specified anything other than above, the buffered requests for BMPS and WoWL
952 will not be cleared.
953 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
954 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
955 request".
956 Note 3: When the device finally enters Full Power PMC will start a timer
957 if any of the following holds true:
958 - Auto BMPS mode is enabled
959 - Uapsd request is pending
960 - HDD's request for BMPS is pending
961 - HDD's request for WoWL is pending
962 On timer expiry PMC will attempt to put the device in BMPS mode if following
963 (in addition to those listed above) holds true:
964 - Polling of all modules through the Power Save Check routine passes
965 - STA is associated to an access point
966 \param hHal - The handle returned by macOpen.
967 \param - callbackRoutine Callback routine invoked in case of success/failure
968 \param - callbackContext - Cookie to be passed back during callback
969 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
970 distinguish between BAP and HDD requests
971 \return eHalStatus - status
972 eHAL_STATUS_SUCCESS - device brought to full power state
973 eHAL_STATUS_FAILURE - device cannot be brought to full power state
974 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
975 ---------------------------------------------------------------------------*/
976extern eHalStatus sme_RequestFullPower (
977 tHalHandle hHal,
978 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
979 void *callbackContext,
980 tRequestFullPowerReason fullPowerReason);
981
982/* ---------------------------------------------------------------------------
983 \fn sme_RequestBmps
984 \brief Request that the device be put in BMPS state. Request will be
985 accepted only if BMPS mode is enabled and power save check routine
986 passes. Only HDD should invoke this API.
987 \param hHal - The handle returned by macOpen.
988 \param - callbackRoutine Callback routine invoked in case of success/failure
989 \param - callbackContext - Cookie to be passed back during callback
990 \return eHalStatus
991 eHAL_STATUS_SUCCESS - device is in BMPS state
992 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
993 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
994 ---------------------------------------------------------------------------*/
995extern eHalStatus sme_RequestBmps (
996 tHalHandle hHal,
997 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
998 void *callbackContext);
999
1000/* ---------------------------------------------------------------------------
1001 \fn sme_SetDHCPTillPowerActiveFlag
1002 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1003 entry by PMC
1004 \param hHal - The handle returned by macOpen.
1005 ---------------------------------------------------------------------------*/
1006void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1007
1008
1009/* ---------------------------------------------------------------------------
1010 \fn sme_StartUapsd
1011 \brief Request that the device be put in UAPSD state. If the device is in
1012 Full Power it will be put in BMPS mode first and then into UAPSD
1013 mode.
1014 \param hHal - The handle returned by macOpen.
1015 \param - callbackRoutine Callback routine invoked in case of success/failure
1016 \param - callbackContext - Cookie to be passed back during callback
1017 eHAL_STATUS_SUCCESS - device is in UAPSD state
1018 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1019 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1020 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1021 \return eHalStatus
1022 ---------------------------------------------------------------------------*/
1023extern eHalStatus sme_StartUapsd (
1024 tHalHandle hHal,
1025 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1026 void *callbackContext);
1027
1028/* ---------------------------------------------------------------------------
1029 \fn sme_StopUapsd
1030 \brief Request that the device be put out of UAPSD state. Device will be
1031 put in in BMPS state after stop UAPSD completes. Buffered requests for
1032 UAPSD will be cleared after this.
1033 \param hHal - The handle returned by macOpen.
1034 \return eHalStatus
1035 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1036 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1037 ---------------------------------------------------------------------------*/
1038extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1039
1040/* ---------------------------------------------------------------------------
1041 \fn sme_RequestStandby
1042 \brief Request that the device be put in standby. It is HDD's responsibility
1043 to bring the chip to full power and do a discconnect before calling
1044 this API. Request for standby will be rejected if STA is associated
1045 to an AP.
1046 \param hHal - The handle returned by macOpen.
1047 \param - callbackRoutine Callback routine invoked in case of success/failure
1048 \param - callbackContext - Cookie to be passed back during callback
1049 \return eHalStatus
1050 eHAL_STATUS_SUCCESS - device is in Standby mode
1051 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1052 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1053 ---------------------------------------------------------------------------*/
1054extern eHalStatus sme_RequestStandby (
1055 tHalHandle hHal,
1056 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1057 void *callbackContext);
1058
1059/* ---------------------------------------------------------------------------
1060 \fn sme_RegisterPowerSaveCheck
1061 \brief Register a power save check routine that is called whenever
1062 the device is about to enter one of the power save modes.
1063 \param hHal - The handle returned by macOpen.
1064 \param checkRoutine - Power save check routine to be registered
1065 \param callbackContext - Cookie to be passed back during callback
1066 \return eHalStatus
1067 eHAL_STATUS_SUCCESS - successfully registered
1068 eHAL_STATUS_FAILURE - not successfully registered
1069 ---------------------------------------------------------------------------*/
1070extern eHalStatus sme_RegisterPowerSaveCheck (
1071 tHalHandle hHal,
1072 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1073
1074/* ---------------------------------------------------------------------------
1075 \fn sme_DeregisterPowerSaveCheck
1076 \brief Deregister a power save check routine
1077 \param hHal - The handle returned by macOpen.
1078 \param checkRoutine - Power save check routine to be deregistered
1079 \return eHalStatus
1080 eHAL_STATUS_SUCCESS - successfully deregistered
1081 eHAL_STATUS_FAILURE - not successfully deregistered
1082 ---------------------------------------------------------------------------*/
1083extern eHalStatus sme_DeregisterPowerSaveCheck (
1084 tHalHandle hHal,
1085 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1086
1087/* ---------------------------------------------------------------------------
1088 \fn sme_RegisterDeviceStateUpdateInd
1089 \brief Register a callback routine that is called whenever
1090 the device enters a new device state (Full Power, BMPS, UAPSD)
1091 \param hHal - The handle returned by macOpen.
1092 \param callbackRoutine - Callback routine to be registered
1093 \param callbackContext - Cookie to be passed back during callback
1094 \return eHalStatus
1095 eHAL_STATUS_SUCCESS - successfully registered
1096 eHAL_STATUS_FAILURE - not successfully registered
1097 ---------------------------------------------------------------------------*/
1098extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1099 tHalHandle hHal,
1100 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1101 void *callbackContext);
1102
1103/* ---------------------------------------------------------------------------
1104 \fn sme_DeregisterDeviceStateUpdateInd
1105 \brief Deregister a routine that was registered for device state changes
1106 \param hHal - The handle returned by macOpen.
1107 \param callbackRoutine - Callback routine to be deregistered
1108 \return eHalStatus
1109 eHAL_STATUS_SUCCESS - successfully deregistered
1110 eHAL_STATUS_FAILURE - not successfully deregistered
1111 ---------------------------------------------------------------------------*/
1112extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1113 tHalHandle hHal,
1114 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1115
1116/* ---------------------------------------------------------------------------
1117 \fn sme_WowlAddBcastPattern
1118 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1119 do a pattern match on these patterns when Wowl is enabled during BMPS
1120 mode.
1121 \param hHal - The handle returned by macOpen.
1122 \param pattern - Pattern to be added
1123 \return eHalStatus
1124 eHAL_STATUS_FAILURE Cannot add pattern
1125 eHAL_STATUS_SUCCESS Request accepted.
1126 ---------------------------------------------------------------------------*/
1127extern eHalStatus sme_WowlAddBcastPattern (
1128 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001129 tpSirWowlAddBcastPtrn pattern,
1130 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001131
1132/* ---------------------------------------------------------------------------
1133 \fn sme_WowlDelBcastPattern
1134 \brief Delete a pattern that was added for Pattern Byte Matching.
1135 \param hHal - The handle returned by macOpen.
1136 \param pattern - Pattern to be deleted
1137 \return eHalStatus
1138 eHAL_STATUS_FAILURE Cannot delete pattern
1139 eHAL_STATUS_SUCCESS Request accepted.
1140 ---------------------------------------------------------------------------*/
1141extern eHalStatus sme_WowlDelBcastPattern (
1142 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001143 tpSirWowlDelBcastPtrn pattern,
1144 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001145
1146/* ---------------------------------------------------------------------------
1147 \fn sme_EnterWowl
1148 \brief This is the API to request entry into WOWL mode.
1149 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1150 SME will will cache the information that WOWL has been requested and
1151 attempt to put the device in BMPS first. On entry into BMPS, SME will
1152 enter the WOWL mode.
1153 Note 1: After WoWL request is accepted, If module other than HDD requests
1154 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1155 and attempt to put the chip into BMPS+WOWL based on a timer.
1156 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1157 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1158 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1159 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1160 are required. Currently there is no requirement or use case to support UAPSD
1161 and WOWL at the same time.
1162 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1163 Note 5. Request for WoWL is rejected if BMPS is disabled.
1164
1165 \param hHal - The handle returned by macOpen.
1166 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1167 Used for success/failure notification by SME
1168 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1169 at the time of callback.
1170 \param wakeReasonIndCB - Callback routine provided by HDD.
1171 Used for Wake Reason Indication by SME
1172 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1173 at the time of callback.
1174 \return eHalStatus
1175 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1176 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1177 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1178 mode is entered.
1179 ---------------------------------------------------------------------------*/
1180extern eHalStatus sme_EnterWowl (
1181 tHalHandle hHal,
1182 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1183 void *enterWowlCallbackContext,
1184#ifdef WLAN_WAKEUP_EVENTS
1185 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1186 void *wakeReasonIndCBContext,
1187#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001188 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001189
1190/* ---------------------------------------------------------------------------
1191 \fn sme_ExitWowl
1192 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1193 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1194 mode. Any Buffered request for WoWL will be cleared after this API.
1195 \param hHal - The handle returned by macOpen.
1196 \return eHalStatus
1197 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1198 only if the previous "Enter WOWL" transaction has
1199 not even completed.
1200 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1201 ---------------------------------------------------------------------------*/
1202extern eHalStatus sme_ExitWowl (tHalHandle hHal);
1203
1204/* ---------------------------------------------------------------------------
1205
1206 \fn sme_RoamSetKey
1207
1208 \brief To set encryption key. This function should be called only when connected
1209 This is an asynchronous API.
1210
1211 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1212
1213 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1214
1215 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1216
1217 FAILURE or RESOURCES The API finished and failed.
1218
1219 -------------------------------------------------------------------------------*/
1220eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1221
1222/* ---------------------------------------------------------------------------
1223
1224 \fn sme_RoamRemoveKey
1225
1226 \brief To set encryption key. This is an asynchronous API.
1227
1228 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1229
1230 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1231
1232 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1233
1234 FAILURE or RESOURCES The API finished and failed.
1235
1236 -------------------------------------------------------------------------------*/
1237eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1238
1239
1240/* ---------------------------------------------------------------------------
1241
1242 \fn sme_GetCountryCode
1243
1244 \brief To return the current country code. If no country code is applied, default country code is
1245 used to fill the buffer.
1246 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1247 This is a synchronous API.
1248
1249 \param pBuf - pointer to a caller allocated buffer for returned country code.
1250
1251 \param pbLen For input, this parameter indicates how big is the buffer.
1252 Upon return, this parameter has the number of bytes for country. If pBuf
1253 doesn't have enough space, this function returns
1254 fail status and this parameter contains the number that is needed.
1255
1256 \return eHalStatus SUCCESS.
1257
1258 FAILURE or RESOURCES The API finished and failed.
1259
1260 -------------------------------------------------------------------------------*/
1261eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1262
1263/* ---------------------------------------------------------------------------
1264
1265 \fn sme_SetCountryCode
1266
1267 \brief To change the current/default country code.
1268 If 11d supported is turned off, an error is return.
1269 This is a synchronous API.
1270
1271 \param pCountry - pointer to a caller allocated buffer for the country code.
1272
1273 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1274 whether a reset is required.
1275
1276 \return eHalStatus SUCCESS.
1277
1278 FAILURE or RESOURCES The API finished and failed.
1279
1280 -------------------------------------------------------------------------------*/
1281eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1282
1283/* ---------------------------------------------------------------------------
1284 \fn sme_ResetCountryCodeInformation
1285 \brief this function is to reset the country code current being used back to EEPROM default
1286 this includes channel list and power setting. This is a synchronous API.
1287 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1288 a restart is needed to apply the change
1289 \return eHalStatus
1290 -------------------------------------------------------------------------------*/
1291eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1292
1293/* ---------------------------------------------------------------------------
1294 \fn sme_GetSupportedCountryCode
1295 \brief this function is to get a list of the country code current being supported
1296 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1297 this has the country code list. 3 bytes for each country code. This may be NULL if
1298 caller wants to know the needed byte count.
1299 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1300 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1301 \return eHalStatus
1302 -------------------------------------------------------------------------------*/
1303eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1304
1305/* ---------------------------------------------------------------------------
1306 \fn sme_GetCurrentRegulatoryDomain
1307 \brief this function is to get the current regulatory domain. This is a synchronous API.
1308 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1309 SME. The function fails if 11d support is turned off.
1310 \param pDomain - Caller allocated buffer to return the current domain.
1311 \return eHalStatus SUCCESS.
1312
1313 FAILURE or RESOURCES The API finished and failed.
1314 -------------------------------------------------------------------------------*/
1315eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1316
1317/* ---------------------------------------------------------------------------
1318 \fn sme_SetRegulatoryDomain
1319 \brief this function is to set the current regulatory domain.
1320 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1321 SME. This is a synchronous API.
1322 \param domainId - indicate the domain (defined in the driver) needs to set to.
1323 See v_REGDOMAIN_t for definition
1324 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1325 a restart is needed to apply the change
1326 \return eHalStatus
1327 -------------------------------------------------------------------------------*/
1328eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1329
1330/* ---------------------------------------------------------------------------
1331
1332 \fn sme_GetRegulatoryDomainForCountry
1333
1334 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1335
1336 \param pCountry - pointer to a caller allocated buffer for input country code.
1337
1338 \param pDomainId Upon successful return, it is the domain that country belongs to.
1339 If it is NULL, returning success means that the country code is known.
1340
1341 \return eHalStatus SUCCESS.
1342
1343 FAILURE or RESOURCES The API finished and failed.
1344
1345 -------------------------------------------------------------------------------*/
1346eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1347
1348
1349
1350/* ---------------------------------------------------------------------------
1351
1352 \fn sme_GetSupportedRegulatoryDomains
1353
1354 \brief To return a list of supported regulatory domains. This is a synchronous API.
1355
1356 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1357
1358 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1359 Upon return, this parameter has the number for supported domains. If pDomains
1360 doesn't have enough space for all the supported domains, this function returns
1361 fail status and this parameter contains the number that is needed.
1362
1363 \return eHalStatus SUCCESS.
1364
1365 FAILURE or RESOURCES The API finished and failed.
1366
1367 -------------------------------------------------------------------------------*/
1368eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1369
1370//some support functions
1371tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1372tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1373tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1374//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1375eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1376
1377typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1378/* ---------------------------------------------------------------------------
1379
1380 \fn sme_ChangeCountryCode
1381
1382 \brief Change Country code from upperlayer during WLAN driver operation.
1383 This is a synchronous API.
1384
1385 \param hHal - The handle returned by macOpen.
1386
1387 \param pCountry New Country Code String
1388
1389 \return eHalStatus SUCCESS.
1390
1391 FAILURE or RESOURCES The API finished and failed.
1392
1393 -------------------------------------------------------------------------------*/
1394eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1395 tSmeChangeCountryCallback callback,
1396 tANI_U8 *pCountry,
1397 void *pContext,
1398 void* pVosContext );
1399
1400
1401/* ---------------------------------------------------------------------------
1402 \fn sme_BtcSignalBtEvent
1403 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1404 BT event type and the current operating mode of Libra (full power,
1405 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1406 would be employed.
1407 \param hHal - The handle returned by macOpen.
1408 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1409 Caller owns the memory and is responsible for freeing it.
1410 \return VOS_STATUS
1411 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1412 if driver has not yet been initialized or if BTC
1413 Events Layer has been disabled.
1414 VOS_STATUS_SUCCESS BT Event passed to HAL
1415 ---------------------------------------------------------------------------*/
1416VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1417
1418/* ---------------------------------------------------------------------------
1419 \fn sme_BtcSetConfig
1420 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1421 This function should be invoked only after CFG download has completed.
1422 Calling it after sme_HDDReadyInd is recommended.
1423 \param hHal - The handle returned by macOpen.
1424 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1425 tSmeBtcConfig. Caller owns the memory and is responsible
1426 for freeing it.
1427 \return VOS_STATUS
1428 VOS_STATUS_E_FAILURE Config not passed to HAL.
1429 VOS_STATUS_SUCCESS Config passed to HAL
1430 ---------------------------------------------------------------------------*/
1431VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1432
1433/* ---------------------------------------------------------------------------
1434 \fn sme_BtcGetConfig
1435 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1436 \param hHal - The handle returned by macOpen.
1437 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1438 Caller owns the memory and is responsible for freeing it.
1439 \return VOS_STATUS
1440 VOS_STATUS_E_FAILURE - failure
1441 VOS_STATUS_SUCCESS success
1442 ---------------------------------------------------------------------------*/
1443VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1444
1445/* ---------------------------------------------------------------------------
1446 \fn sme_SetCfgPrivacy
1447 \brief API to set configure privacy parameters
1448 \param hHal - The handle returned by macOpen.
1449 \param pProfile - Pointer CSR Roam profile.
1450 \param fPrivacy - This parameter indicates status of privacy
1451
1452 \return void
1453 ---------------------------------------------------------------------------*/
1454void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1455
1456#if defined WLAN_FEATURE_VOWIFI
1457/* ---------------------------------------------------------------------------
1458 \fn sme_NeighborReportRequest
1459 \brief API to request neighbor report.
1460 \param hHal - The handle returned by macOpen.
1461 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1462 tRrmNeighborReq. Caller owns the memory and is responsible
1463 for freeing it.
1464 \return VOS_STATUS
1465 VOS_STATUS_E_FAILURE - failure
1466 VOS_STATUS_SUCCESS success
1467 ---------------------------------------------------------------------------*/
1468VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1469 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1470#endif
1471
1472//The following are debug APIs to support direct read/write register/memory
1473//They are placed in SME because HW cannot be access when in LOW_POWER state
1474//AND not connected. The knowledge and synchronization is done in SME
1475
1476//sme_DbgReadRegister
1477//Caller needs to validate the input values
1478VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1479
1480//sme_DbgWriteRegister
1481//Caller needs to validate the input values
1482VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1483
1484//sme_DbgReadMemory
1485//Caller needs to validate the input values
1486//pBuf caller allocated buffer has the length of nLen
1487VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1488
1489//sme_DbgWriteMemory
1490//Caller needs to validate the input values
1491VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1492
1493#ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
1494//sme_GetFwVersion
1495VOS_STATUS sme_GetFwVersion (tHalHandle hHal,FwVersionInfo *pVersion);
1496#endif
1497#ifdef FEATURE_WLAN_INTEGRATED_SOC
1498VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1499 tSirVersionType *pVersion);
1500VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1501 tSirVersionType *pVersion);
1502VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1503 tANI_U8 *pVersion,
1504 tANI_U32 versionBufferSize);
1505VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1506 tANI_U8 *pVersion,
1507 tANI_U32 versionBufferSize);
1508#endif
1509eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1510 csrRoamCompleteCallback callback,
1511 void *pContext);
1512
1513#ifdef FEATURE_WLAN_WAPI
1514/* ---------------------------------------------------------------------------
1515 \fn sme_RoamSetBKIDCache
1516 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1517 candidate list.
1518 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1519 it is opened (by calling halOpen).
1520 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1521 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1522 when retruning, this is the number of items put into pBKIDCache
1523 \return eHalStatus - when fail, it usually means the buffer allocated is not
1524 big enough and pNumItems has the number of tBkidCacheInfo.
1525 ---------------------------------------------------------------------------*/
1526eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1527 tANI_U32 numItems );
1528
1529/* ---------------------------------------------------------------------------
1530 \fn sme_RoamGetBKIDCache
1531 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1532 BKID cache.
1533 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1534 it is opened (by calling halOpen).
1535 \param pNum - caller allocated memory that has the space of the number of
1536 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1537 in SME cache.
1538 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1539 upon return
1540 \return eHalStatus - when fail, it usually means the buffer allocated is not
1541 big enough.
1542 ---------------------------------------------------------------------------*/
1543eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1544 tBkidCacheInfo *pBkidCache);
1545
1546/* ---------------------------------------------------------------------------
1547 \fn sme_RoamGetNumBKIDCache
1548 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1549 number of BKID cache entries.
1550 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1551 it is opened (by calling halOpen).
1552 \return tANI_U32 - the number of BKID cache entries.
1553 ---------------------------------------------------------------------------*/
1554tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1555
1556/* ---------------------------------------------------------------------------
1557 \fn sme_ScanGetBKIDCandidateList
1558 \brief a wrapper function to return the BKID candidate list
1559 \param pBkidList - caller allocated buffer point to an array of
1560 tBkidCandidateInfo
1561 \param pNumItems - pointer to a variable that has the number of
1562 tBkidCandidateInfo allocated when retruning, this is
1563 either the number needed or number of items put into
1564 pPmkidList
1565 \return eHalStatus - when fail, it usually means the buffer allocated is not
1566 big enough and pNumItems
1567 has the number of tBkidCandidateInfo.
1568 \Note: pNumItems is a number of tBkidCandidateInfo,
1569 not sizeof(tBkidCandidateInfo) * something
1570 ---------------------------------------------------------------------------*/
1571eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1572 tBkidCandidateInfo *pBkidList,
1573 tANI_U32 *pNumItems );
1574#endif /* FEATURE_WLAN_WAPI */
1575
Jeff Johnsone7245742012-09-05 17:12:55 -07001576#ifdef FEATURE_OEM_DATA_SUPPORT
1577/********************************************************************************************
1578 Oem data related modifications
1579*********************************************************************************************/
1580/* ---------------------------------------------------------------------------
1581 \fn sme_OemDataReq
1582 \param sessionId - session id of session to be used for oem data req.
1583 \param pOemDataReqID - pointer to an object to get back the request ID
1584 \param callback - a callback function that is called upon finish
1585 \param pContext - a pointer passed in for the callback
1586 \return eHalStatus
1587 ---------------------------------------------------------------------------*/
1588eHalStatus sme_OemDataReq(tHalHandle hHal,
1589 tANI_U8 sessionId,
1590 tOemDataReqConfig *,
1591 tANI_U32 *pOemDataReqID,
1592 oemData_OemDataReqCompleteCallback callback,
1593 void *pContext);
1594
1595/* ---------------------------------------------------------------------------
1596 \fn sme_getOemDataRsp
1597 \param pOemDataRsp - A pointer to the response object
1598 \param pOemDataReqID - pointer to an object to get back the request ID
1599 \return eHalStatus
1600 ---------------------------------------------------------------------------*/
1601eHalStatus sme_getOemDataRsp(tHalHandle hHal,
1602 tOemDataRsp **pOemDataRsp);
1603
1604#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07001605
1606
1607#ifdef WLAN_SOFTAP_FEATURE
1608
1609/* ---------------------------------------------------------------------------
1610
1611 \fn sme_RoamUpdateAPWPSIE
1612
1613 \brief To update AP's WPS IE. This function should be called after SME AP session is created
1614 This is an asynchronous API.
1615
1616 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
1617
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001618 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07001619
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001620 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001621
1622 -------------------------------------------------------------------------------*/
1623
1624eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
1625/* ---------------------------------------------------------------------------
1626
1627 \fn sme_RoamUpdateAPWPARSNIEs
1628
1629 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
1630 This is an asynchronous API.
1631
1632 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
1633
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001634 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07001635
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001636 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001637
1638 -------------------------------------------------------------------------------*/
1639eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
1640
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001641/* ---------------------------------------------------------------------------
1642
1643 sme_ChangeMCCBeaconInterval
1644
1645 \brief To update P2P-GO's beacon Interval.
1646
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001647 \return eHalStatus SUCCESS
1648 FAILURE or RESOURCES
1649 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001650 -------------------------------------------------------------------------------*/
1651eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
1652
1653
Jeff Johnson295189b2012-06-20 16:38:30 -07001654#endif
1655
1656/* ---------------------------------------------------------------------------
1657 \fn sme_sendBTAmpEvent
1658 \brief API to send the btAMPstate to FW
1659 \param hHal - The handle returned by macOpen.
1660 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001661 \return eHalStatus SUCCESS
1662 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001663
1664--------------------------------------------------------------------------- */
1665
1666eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
1667
1668
1669
1670/* ---------------------------------------------------------------------------
1671 \fn sme_SetHostOffload
1672 \brief API to set the host offload feature.
1673 \param hHal - The handle returned by macOpen.
1674 \param pRequest - Pointer to the offload request.
1675 \return eHalStatus
1676 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001677eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
1678 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001679
1680/* ---------------------------------------------------------------------------
1681 \fn sme_SetKeepAlive
1682 \brief API to set the Keep Alive feature.
1683 \param hHal - The handle returned by macOpen.
1684 \param pRequest - Pointer to the Keep Alive request.
1685 \return eHalStatus
1686 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001687eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
1688 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001689
1690
1691/* ---------------------------------------------------------------------------
1692 \fn sme_AbortMacScan
1693 \brief API to cancel MAC scan.
1694 \param hHal - The handle returned by macOpen.
1695 \return VOS_STATUS
1696 VOS_STATUS_E_FAILURE - failure
1697 VOS_STATUS_SUCCESS success
1698 ---------------------------------------------------------------------------*/
1699eHalStatus sme_AbortMacScan(tHalHandle hHal);
1700
1701/* ----------------------------------------------------------------------------
1702 \fn sme_GetOperationChannel
1703 \brief API to get current channel on which STA is parked
1704 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001705 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07001706 \returns eHAL_STATUS_SUCCESS
1707 eHAL_STATUS_FAILURE
1708-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001709eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001710
1711#ifdef WLAN_FEATURE_P2P
1712/* ---------------------------------------------------------------------------
1713
1714 \fn sme_RegisterMgtFrame
1715
1716 \brief To register managment frame of specified type and subtype.
1717 \param frameType - type of the frame that needs to be passed to HDD.
1718 \param matchData - data which needs to be matched before passing frame
1719 to HDD.
1720 \param matchDataLen - Length of matched data.
1721 \return eHalStatus
1722 -------------------------------------------------------------------------------*/
1723eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1724 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
1725
1726/* ---------------------------------------------------------------------------
1727
1728 \fn sme_DeregisterMgtFrame
1729
1730 \brief To De-register managment frame of specified type and subtype.
1731 \param frameType - type of the frame that needs to be passed to HDD.
1732 \param matchData - data which needs to be matched before passing frame
1733 to HDD.
1734 \param matchDataLen - Length of matched data.
1735 \return eHalStatus
1736 -------------------------------------------------------------------------------*/
1737eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1738 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
1739#endif
1740
1741/* ---------------------------------------------------------------------------
1742
1743 \fn sme_ConfigureRxpFilter
1744
1745 \brief
1746 SME will pass this request to lower mac to set/reset the filter on RXP for
1747 multicast & broadcast traffic.
1748
1749 \param
1750
1751 hHal - The handle returned by macOpen.
1752
1753 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
1754 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
1755 on this param. In future we can use this as a mask to set various types of
1756 filters as suggested below:
1757 FILTER_ALL_MULTICAST:
1758 FILTER_ALL_BROADCAST:
1759 FILTER_ALL_MULTICAST_BROADCAST:
1760
1761
1762 \return eHalStatus
1763
1764
1765--------------------------------------------------------------------------- */
1766eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
1767 tpSirWlanSetRxpFilters wlanRxpFilterParam);
1768
1769/* ---------------------------------------------------------------------------
1770
1771 \fn sme_ConfigureAppsCpuWakeupState
1772
1773 \brief
1774 SME will pass this request to lower mac to dynamically adjusts the listen
1775 interval based on the WLAN/MSM activity. This feature is named as
1776 Telescopic Beacon wakeup feature.
1777
1778 \param
1779
1780 hHal - The handle returned by macOpen.
1781
1782 isAppsAwake- Depicts the state of the Apps CPU
1783
1784
1785 \return eHalStatus
1786
1787
1788--------------------------------------------------------------------------- */
1789eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
1790
1791#ifdef FEATURE_WLAN_INTEGRATED_SOC
1792/* ---------------------------------------------------------------------------
1793
1794 \fn sme_ConfigureSuspendInd
1795
1796 \brief
1797 SME will pass this request to lower mac to Indicate that the wlan needs to
1798 be suspended
1799
1800 \param
1801
1802 hHal - The handle returned by macOpen.
1803
1804 wlanSuspendParam- Depicts the wlan suspend params
1805
1806
1807 \return eHalStatus
1808
1809
1810--------------------------------------------------------------------------- */
1811eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
1812 tpSirWlanSuspendParam wlanSuspendParam);
1813
1814/* ---------------------------------------------------------------------------
1815
1816 \fn sme_ConfigureResumeReq
1817
1818 \brief
1819 SME will pass this request to lower mac to Indicate that the wlan needs to
1820 be Resumed
1821
1822 \param
1823
1824 hHal - The handle returned by macOpen.
1825
1826 wlanResumeParam- Depicts the wlan resume params
1827
1828
1829 \return eHalStatus
1830
1831
1832--------------------------------------------------------------------------- */
1833eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
1834 tpSirWlanResumeParam wlanResumeParam);
1835
1836#endif
1837
1838/* ---------------------------------------------------------------------------
1839
1840 \fn sme_GetInfraSessionId
1841
1842 \brief To get the session ID for infra session, if connected
1843 This is a synchronous API.
1844
1845 \param hHal - The handle returned by macOpen.
1846
1847 \return sessionid, -1 if infra session is not connected
1848
1849 -------------------------------------------------------------------------------*/
1850tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
1851
1852/* ---------------------------------------------------------------------------
1853
1854 \fn sme_GetInfraOperationChannel
1855
1856 \brief To get the operating channel for infra session, if connected
1857 This is a synchronous API.
1858
1859 \param hHal - The handle returned by macOpen.
1860 \param sessionId - the sessionId returned by sme_OpenSession.
1861
1862 \return operating channel, 0 if infra session is not connected
1863
1864 -------------------------------------------------------------------------------*/
1865tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
1866/* ---------------------------------------------------------------------------
1867
1868 \fn sme_GetConcurrentOperationChannel
1869
1870 \brief To get the operating channel for other concurrent sessions, if connected
1871 This is a synchronous API.
1872
1873 \param hHal - The handle returned by macOpen.
1874 \param currentPersona - persona that is trying to come up.
1875
1876 \return operating channel, 0 if infra session is not connected
1877
1878 -------------------------------------------------------------------------------*/
1879tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
1880
1881/* ---------------------------------------------------------------------------
1882 \fn sme_AbortMacScan
1883 \brief API to cancel MAC scan.
1884 \param hHal - The handle returned by macOpen.
1885 \return VOS_STATUS
1886 VOS_STATUS_E_FAILURE - failure
1887 VOS_STATUS_SUCCESS success
1888 ---------------------------------------------------------------------------*/
1889eHalStatus sme_AbortMacScan(tHalHandle hHal);
1890
1891/* ---------------------------------------------------------------------------
1892 \fn sme_GetCfgValidChannels
1893 \brief API to get valid channel list
1894 \param hHal - The handle returned by macOpen.
1895 \param aValidChannels - Pointer to the valid channel list
1896 \param len - valid channel list length
1897 \return eHalStatus
1898 ---------------------------------------------------------------------------*/
1899eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
1900
1901#ifdef FEATURE_WLAN_SCAN_PNO
1902
1903/* ---------------------------------------------------------------------------
1904 \fn sme_SetPreferredNetworkList
1905 \brief API to set the Preferred Network List Offload feature.
1906 \param hHal - The handle returned by macOpen.
1907 \param pRequest - Pointer to the offload request.
1908 \return eHalStatus
1909 ---------------------------------------------------------------------------*/
1910eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
1911
1912/* ---------------------------------------------------------------------------
1913 \fn sme_SetRSSIFilter
1914 \brief API to set RSSI Filter feature.
1915 \param hHal - The handle returned by macOpen.
1916 \param pRequest - Pointer to the offload request.
1917 \return eHalStatus
1918 ---------------------------------------------------------------------------*/
1919eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
1920
1921/******************************************************************************
1922*
1923* Name: sme_PreferredNetworkFoundInd
1924*
1925* Description:
1926* Invoke Preferred Network Found Indication
1927*
1928* Parameters:
1929* hHal - HAL handle for device
1930* pMsg - found network description
1931*
1932* Returns: eHalStatus
1933*
1934******************************************************************************/
1935eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
1936#endif // FEATURE_WLAN_SCAN_PNO
1937
1938/* ---------------------------------------------------------------------------
1939 \fn sme_SetPowerParams
1940 \brief API to set Power Parameters
1941 \param hHal - The handle returned by macOpen.
1942 \param pwParams - Pointer to the power parameters requested.
1943 \return eHalStatus
1944 ---------------------------------------------------------------------------*/
1945eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams);
1946
1947/* ---------------------------------------------------------------------------
1948 \fn sme_SetTxPerTracking
1949 \brief Set Tx PER tracking configuration parameters
1950 \param hHal - The handle returned by macOpen.
1951 \param pTxPerTrackingParam - Tx PER configuration parameters
1952 \return eHalStatus
1953 ---------------------------------------------------------------------------*/
1954eHalStatus sme_SetTxPerTracking (
1955 tHalHandle hHal,
1956 void (*pCallbackfn) (void *pCallbackContext),
1957 void *pCallbackContext,
1958 tpSirTxPerTrackingParam pTxPerTrackingParam);
1959
1960#ifdef WLAN_FEATURE_PACKET_FILTERING
1961/* ---------------------------------------------------------------------------
1962 \fn sme_ReceiveFilterSetFilter
1963 \brief API to set 8023 Multicast Address List
1964 \param hHal - The handle returned by macOpen.
1965 \param pMulticastAddrs - Pointer to the Multicast Address List
1966 \return eHalStatus
1967 ---------------------------------------------------------------------------*/
1968eHalStatus sme_8023MulticastList(tHalHandle hHal, tpSirRcvFltMcAddrList pMulticastAddrs);
1969
1970/* ---------------------------------------------------------------------------
1971 \fn sme_ReceiveFilterSetFilter
1972 \brief API to set Receive Packet Filter
1973 \param hHal - The handle returned by macOpen.
1974 \param pRcvPktFilterCfg - Receive Packet Filter parameter
1975 \return eHalStatus
1976 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001977eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
1978 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001979
1980/* ---------------------------------------------------------------------------
1981 \fn sme_GetFilterMatchCount
1982 \brief API to get D0 PC Filter Match Count
1983 \param hHal - The handle returned by macOpen
1984 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
1985 \param callbackContext - Cookie to be passed back during callback
1986 \return eHalStatus
1987 ---------------------------------------------------------------------------*/
1988eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
1989 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001990 void *callbackContext,
1991 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001992
1993/* ---------------------------------------------------------------------------
1994 \fn sme_ReceiveFilterClearFilter
1995 \brief API to clear Receive Packet Filter
1996 \param hHal - The handle returned by macOpen.
1997 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
1998 \return eHalStatus
1999 ---------------------------------------------------------------------------*/
2000eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002001 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2002 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002003#endif // WLAN_FEATURE_PACKET_FILTERING
2004/* ---------------------------------------------------------------------------
2005
2006 \fn sme_IsChannelValid
2007 \brief To check if the channel is valid for currently established domain
2008 This is a synchronous API.
2009
2010 \param hHal - The handle returned by macOpen.
2011 \param channel - channel to verify
2012
2013 \return TRUE/FALSE, TRUE if channel is valid
2014
2015 -------------------------------------------------------------------------------*/
2016tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2017
2018/* ---------------------------------------------------------------------------
2019 \fn sme_SetFreqBand
2020 \brief Used to set frequency band.
2021 \param hHal
2022 \eBand band value to be configured
2023 \- return eHalStatus
2024 -------------------------------------------------------------------------*/
2025eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2026
2027/* ---------------------------------------------------------------------------
2028 \fn sme_GetFreqBand
2029 \brief Used to get the current band settings.
2030 \param hHal
2031 \pBand pointer to hold the current band value
2032 \- return eHalStatus
2033 -------------------------------------------------------------------------*/
2034eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2035
2036/* ---------------------------------------------------------------------------
2037
2038 \fn sme_SetTxPerTracking
2039 \brief Set Tx PER tracking configuration parameters
2040 \param hHal - The handle returned by macOpen.
2041 \param pTxPerTrackingParam - Tx PER configuration parameters
2042 \return eHalStatus
2043 ---------------------------------------------------------------------------*/
2044eHalStatus sme_SetTxPerTracking (
2045 tHalHandle hHal,
2046 void (*pCallbackfn) (void *pCallbackContext),
2047 void *pCallbackContext,
2048 tpSirTxPerTrackingParam pTxPerTrackingParam);
2049
2050#ifdef WLAN_FEATURE_GTK_OFFLOAD
2051/* ---------------------------------------------------------------------------
2052 \fn sme_SetGTKOffload
2053 \brief API to set GTK offload feature.
2054 \param hHal - The handle returned by macOpen.
2055 \param pRequest - Pointer to the GTK offload request.
2056 \return eHalStatus
2057 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002058eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002059
2060/* ---------------------------------------------------------------------------
2061 \fn sme_GetGTKOffload
2062 \brief API to get GTK offload information.
2063 \param hHal - The handle returned by macOpen.
2064 \param pRequest - Pointer to the GTK offload response.
2065 \return eHalStatus
2066 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002067eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2068 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002069#endif // WLAN_FEATURE_GTK_OFFLOAD
2070
2071#ifdef WLAN_WAKEUP_EVENTS
2072eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2073#endif // WLAN_WAKEUP_EVENTS
2074
2075/* ---------------------------------------------------------------------------
2076 \fn sme_SetTxPerTracking
2077 \brief Set Tx PER tracking configuration parameters
2078 \param hHal - The handle returned by macOpen.
2079 \param pTxPerTrackingParam - Tx PER configuration parameters
2080 \return eHalStatus
2081 ---------------------------------------------------------------------------*/
2082eHalStatus sme_SetTxPerTracking (
2083 tHalHandle hHal,
2084 void (*pCallbackfn) (void *pCallbackContext),
2085 void *pCallbackContext,
2086 tpSirTxPerTrackingParam pTxPerTrackingParam);
2087
2088
2089//return frequency for a particular channel
2090tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2091
2092tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2093
2094#if defined WLAN_FEATURE_P2P_INTERNAL
2095
2096eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2097
2098/* ---------------------------------------------------------------------------
2099 \fn sme_p2pFlushDeviceList
2100 \brief Remove cached P2P result from scan results
2101 \param hHal - The handle returned by macOpen.
2102 \param HDDSessionId - HDD's sessionId. Currently unused.
2103 \return eHalStatus
2104 ---------------------------------------------------------------------------*/
2105eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2106
2107eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2108 tCsrScanResultFilter *pFilter);
2109
2110#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2111
2112/* ---------------------------------------------------------------------------
2113 \fn sme_SetMaxTxPower
2114 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2115 setting will not persist over reboots
2116 \param hHal
2117 \param pBssid BSSID to set the power cap for
2118 \param pBssid pSelfMacAddress self MAC Address
2119 \param pBssid power to set in dB
2120 \- return eHalStatus
2121 -------------------------------------------------------------------------*/
2122eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2123 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2124
2125#ifdef WLAN_SOFTAP_FEATURE
2126/* ---------------------------------------------------------------------------
2127
2128 \fn sme_HideSSID
2129
2130 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2131 not persist over reboots.
2132
2133 \param hHal
2134 \param sessionId
2135 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2136 \- return eHalStatus
2137
2138 -------------------------------------------------------------------------------*/
2139eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
2140#endif
2141
2142/* ---------------------------------------------------------------------------
2143
2144 \fn sme_SetTmLevel
2145 \brief Set Thermal Mitigation Level to RIVA
2146 \param hHal - The handle returned by macOpen.
2147 \param newTMLevel - new Thermal Mitigation Level
2148 \param tmMode - Thermal Mitigation handle mode, default 0
2149 \return eHalStatus
2150 ---------------------------------------------------------------------------*/
2151eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2152
2153/*---------------------------------------------------------------------------
2154
2155 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2156 Host and FW.
2157
2158 \param hHal - HAL handle for device
2159
2160 \return NONE
2161
2162---------------------------------------------------------------------------*/
2163void sme_featureCapsExchange(tHalHandle hHal);
2164
Jeff Johnsond13512a2012-07-17 11:42:19 -07002165/*---------------------------------------------------------------------------
2166
Yathish9f22e662012-12-10 14:21:35 -08002167 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2168 between in Host.
2169
2170 \param hHal - HAL handle for device
2171
2172 \return NONE
2173
2174---------------------------------------------------------------------------*/
2175void sme_disableFeatureCapablity(tANI_U8 feature_index);
2176
2177/*---------------------------------------------------------------------------
2178
Jeff Johnsond13512a2012-07-17 11:42:19 -07002179 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2180 country code
2181 Host and FW.
2182
2183 \param hHal - HAL handle for device
2184 \param pCountry - pointer to country code
2185
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002186 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002187
2188 ---------------------------------------------------------------------------*/
2189eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2190
2191/*---------------------------------------------------------------------------
2192
2193 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2194 country code.
2195
2196 \param hHal - HAL handle for device
2197 \param pCountry - pointer to country code
2198
2199 \return Success or failure
2200
2201 ---------------------------------------------------------------------------*/
2202eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2203
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002204/* ---------------------------------------------------------------------------
2205 \fn sme_transportDebug
2206 \brief Dynamically monitoring Transport channels
2207 Private IOCTL will querry transport channel status if driver loaded
Jeff Johnsonb88db982012-12-10 13:34:59 -08002208 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002209 \param toggleStallDetect Enable stall detect feature
2210 This feature will take effect to data performance
2211 Not integrate till fully verification
2212 \- return NONE
2213 -------------------------------------------------------------------------*/
2214void sme_transportDebug
2215(
2216 v_BOOL_t displaySnapshot,
2217 v_BOOL_t toggleStallDetect
2218);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002219
2220#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
2221/* ---------------------------------------------------------------------------
2222 \fn sme_UpdateRoamPrefer5GHz
2223 \brief enable/disable Roam prefer 5G runtime option
2224 This function is called through dynamic setConfig callback function
2225 to configure the Roam prefer 5G runtime option
2226 \param hHal - HAL handle for device
2227 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2228 \- return Success or failure
2229 -------------------------------------------------------------------------*/
2230
2231eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002232
2233/* ---------------------------------------------------------------------------
2234 \fn sme_UpdateImmediateRoamRssiDiff
2235 \brief Update nImmediateRoamRssiDiff
2236 This function is called through dynamic setConfig callback function
2237 to configure nImmediateRoamRssiDiff
2238 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2239 \param hHal - HAL handle for device
2240 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2241 candidate and current AP.
2242 \- return Success or failure
2243 -------------------------------------------------------------------------*/
2244
2245eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002246#endif
2247
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002248/* ---------------------------------------------------------------------------
2249 \fn sme_IsFeatureSupportedByFW
2250 \brief Check if an feature is enabled by FW
2251
2252 \param feattEnumValue - Enumeration value of the feature to be checked.
2253 A value from enum placeHolderInCapBitmap
2254
2255 \- return 1/0 (TRUE/FALSE)
2256 -------------------------------------------------------------------------*/
2257tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
2258#ifdef FEATURE_WLAN_TDLS
2259/* ---------------------------------------------------------------------------
2260 \fn sme_SendTdlsMgmtFrame
2261 \brief API to send TDLS management frames.
2262
2263 \param peerMac - peer's Mac Adress.
2264 \param frame_type - Type of TDLS mgmt frame to be sent.
2265 \param dialog - dialog token used in the frame.
2266 \param status - status to be incuded in the frame.
2267 \param buf - additional IEs to be included
2268 \param len - lenght of additional Ies
2269 \- return VOS_STATUS_SUCCES
2270 -------------------------------------------------------------------------*/
2271VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
2272 tANI_U8 frame_type, tANI_U8 dialog, tANI_U16 status, tANI_U8 *buf, tANI_U8 len);
2273/* ---------------------------------------------------------------------------
2274 \fn sme_AddTdlsPeerSta
2275 \brief API to Add TDLS peer sta entry.
2276
2277 \param peerMac - peer's Mac Adress.
2278 \- return VOS_STATUS_SUCCES
2279 -------------------------------------------------------------------------*/
2280VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2281/* ---------------------------------------------------------------------------
2282 \fn sme_DeleteTdlsPeerSta
2283 \brief API to Delete TDLS peer sta entry.
2284
2285 \param peerMac - peer's Mac Adress.
2286 \- return VOS_STATUS_SUCCES
2287 -------------------------------------------------------------------------*/
2288VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2289#endif
2290#ifdef FEATURE_WLAN_TDLS_INTERNAL
2291typedef struct smeTdlsDisResult
2292{
2293 tSirMacAddr tdlsPeerMac;
2294 v_S7_t tdlsPeerRssi;
2295} tSmeTdlsDisResult;
2296
2297VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2298v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
2299 tSmeTdlsDisResult *disResult, v_U8_t listType);
2300VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2301VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2302
2303#endif /* FEATURE_WLAN_TDLS */
2304
Jeff Johnson295189b2012-06-20 16:38:30 -07002305#endif //#if !defined( __SME_API_H )