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