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