blob: 1680abe77571f42b3ff4e729690010dd455e732c [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42#if !defined( __SME_API_H )
43#define __SME_API_H
44
45
46/**=========================================================================
47
48 \file smeApi.h
49
50 \brief prototype for SME APIs
51
52 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
53
54 Qualcomm Confidential and Proprietary.
55
56 ========================================================================*/
57
58/* $Header$ */
59
60/*--------------------------------------------------------------------------
61 Include Files
62 ------------------------------------------------------------------------*/
63#include "ccmApi.h"
64#include "csrApi.h"
65#include "pmcApi.h"
66#include "vos_mq.h"
67#include "vos_lock.h"
68#include "halTypes.h"
69#include "sirApi.h"
70#include "btcApi.h"
71#include "vos_nvitem.h"
72#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070073
Jeff Johnsone7245742012-09-05 17:12:55 -070074#ifdef FEATURE_OEM_DATA_SUPPORT
75#include "oemDataApi.h"
76#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070077
78#if defined WLAN_FEATURE_VOWIFI
79#include "smeRrmInternal.h"
80#endif
81
82/*--------------------------------------------------------------------------
83 Preprocessor definitions and constants
84 ------------------------------------------------------------------------*/
85
86#define SME_SUMMARY_STATS 1
87#define SME_GLOBAL_CLASSA_STATS 2
88#define SME_GLOBAL_CLASSB_STATS 4
89#define SME_GLOBAL_CLASSC_STATS 8
90#define SME_GLOBAL_CLASSD_STATS 16
91#define SME_PER_STA_STATS 32
92
93#define SME_INVALID_COUNTRY_CODE "XX"
94
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070095//Macro to disable split scan
96#define SME_DISABLE_SPLIT_SCAN 255
Jeff Johnson295189b2012-06-20 16:38:30 -070097/*--------------------------------------------------------------------------
98 Type declarations
99 ------------------------------------------------------------------------*/
100typedef struct _smeConfigParams
101{
102 tCsrConfigParam csrConfig;
103#if defined WLAN_FEATURE_VOWIFI
104 tRrmConfigParam rrmConfig;
105#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700106#if defined FEATURE_WLAN_LFR
107 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800108 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700109#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700110#if defined FEATURE_WLAN_CCX
111 tANI_U8 isCcxIniFeatureEnabled;
112#endif
113#if defined WLAN_FEATURE_P2P_INTERNAL
114 tP2PConfigParam p2pConfig;
115#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700116#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700117 tANI_U8 isFastTransitionEnabled;
118 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700119 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700120#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530121 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700122 tANI_U8 isAmsduSupportInAMPDU;
Jeff Johnson295189b2012-06-20 16:38:30 -0700123} tSmeConfigParams, *tpSmeConfigParams;
124
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530125typedef enum
126{
127 eSME_ROAM_TRIGGER_NONE = 0,
128 eSME_ROAM_TRIGGER_SCAN = 1,
129 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
130 eSME_ROAM_TRIGGER_MAX
131} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700132
133/*-------------------------------------------------------------------------
134 Function declarations and documenation
135 ------------------------------------------------------------------------*/
136
137/*--------------------------------------------------------------------------
138
139 \brief sme_Open() - Initialze all SME modules and put them at idle state
140
141 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
142 successfully return, all modules are at idle state ready to start.
143
144 smeOpen must be called before any other SME APIs can be involved.
145 smeOpen must be called after macOpen.
146
147 \param hHal - The handle returned by macOpen.
148
149 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
150
151 Other status means SME is failed to be initialized
152 \sa
153
154 --------------------------------------------------------------------------*/
155eHalStatus sme_Open(tHalHandle hHal);
156
157/*--------------------------------------------------------------------------
158
159 \brief sme_Close() - Release all SME modules and their resources.
160
161 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
162 return, all modules are at closed state.
163
164 No SME APIs can be involved after sme_Close except sme_Open.
165 sme_Close must be called before macClose.
166
167 \param hHal - The handle returned by macOpen.
168
169 \return eHAL_STATUS_SUCCESS - SME is successfully close.
170
171 Other status means SME is failed to be closed but caller still cannot
172 call any other SME functions except smeOpen.
173 \sa
174
175 --------------------------------------------------------------------------*/
176eHalStatus sme_Close(tHalHandle hHal);
177
178/*--------------------------------------------------------------------------
179
180 \brief sme_Start() - Put all SME modules at ready state.
181
182 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
183 successfully return, all modules are ready to run.
184
185 \param hHal - The handle returned by macOpen.
186
187 \return eHAL_STATUS_SUCCESS - SME is ready.
188
189 Other status means SME is failed to start.
190 \sa
191
192 --------------------------------------------------------------------------*/
193eHalStatus sme_Start(tHalHandle hHal);
194
195/*--------------------------------------------------------------------------
196
197 \brief sme_Stop() - Stop all SME modules and put them at idle state
198
199 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
200 return, all modules are at idle state ready to start.
201
202
203 \param hHal - The handle returned by macOpen.
204
Kiet Lama72a2322013-11-15 11:18:11 +0530205 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700206
207 \return eHAL_STATUS_SUCCESS - SME is stopped.
208
209 Other status means SME is failed to stop but caller should still consider
210 SME is stopped.
211 \sa
212
213 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530214eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700215
216
217/*--------------------------------------------------------------------------
218
219 \brief sme_OpenSession() - Open a session for scan/roam operation.
220
221 This is a synchronous API.
222
223
224 \param hHal - The handle returned by macOpen.
225 \param callback - A pointer to the function caller specifies for roam/connect status indication
226 \param pContext - The context passed with callback
227 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
228 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
229
230 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
231
232 Other status means SME is failed to open the session.
233 eHAL_STATUS_RESOURCES - no more session available.
234 \sa
235
236 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700237eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
238 void *pContext, tANI_U8 *pSelfMacAddr,
239 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700240
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700241/*--------------------------------------------------------------------------
242
243 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
244 \param hHal - The handle returned by macOpen.
245 \param currDeviceMode - Current operating device mode.
246 --------------------------------------------------------------------------*/
247
248void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700249
250/*--------------------------------------------------------------------------
251
252 \brief sme_CloseSession() - Open a session for scan/roam operation.
253
254 This is a synchronous API.
255
256
257 \param hHal - The handle returned by macOpen.
258
259 \param sessionId - A previous opened session's ID.
260
261 \return eHAL_STATUS_SUCCESS - session is closed.
262
263 Other status means SME is failed to open the session.
264 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
265 \sa
266
267 --------------------------------------------------------------------------*/
268eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
269 csrRoamSessionCloseCallback callback, void *pContext);
270
271
272
273/*--------------------------------------------------------------------------
274
275 \brief sme_UpdateConfig() - Change configurations for all SME moduels
276
277 The function updates some configuration for modules in SME, CCM, CSR, etc
278 during SMEs close -> open sequence.
279
280 Modules inside SME apply the new configuration at the next transaction.
281
282
283 \param hHal - The handle returned by macOpen.
284 \Param pSmeConfigParams - a pointer to a caller allocated object of
285 typedef struct _smeConfigParams.
286
287 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
288
289 Other status means SME is failed to update the config parameters.
290 \sa
291
292 --------------------------------------------------------------------------*/
293eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
294
295#ifdef FEATURE_WLAN_SCAN_PNO
296/*--------------------------------------------------------------------------
297
298 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
299
300 It is used at driver start up to inform RIVA of the default channel
301 configuration.
302
303 This is a synchronuous call
304
305 \param hHal - The handle returned by macOpen.
306
307 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
308
309 Other status means SME is failed to update the channel config.
310 \sa
311
312 --------------------------------------------------------------------------*/
313eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
314
315#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700316/*--------------------------------------------------------------------------
317
318 \brief sme_set11dinfo() - Set the 11d information about valid channels
319 and there power using information from nvRAM
320 This function is called only for AP.
321
322 This is a synchronuous call
323
324 \param hHal - The handle returned by macOpen.
325 \Param pSmeConfigParams - a pointer to a caller allocated object of
326 typedef struct _smeConfigParams.
327
328 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
329
330 Other status means SME is failed to update the config parameters.
331 \sa
332--------------------------------------------------------------------------*/
333
334eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
335
336/*--------------------------------------------------------------------------
337
338 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
339
340 This is a synchronuous call
341
342 \param hHal - The handle returned by HostapdAdapter.
343 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
344
345 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
346
347 Other status means, failed to get the current regulatory domain.
348 \sa
349--------------------------------------------------------------------------*/
350
351eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
352
353eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
354
Jeff Johnson295189b2012-06-20 16:38:30 -0700355
356/* ---------------------------------------------------------------------------
357 \fn sme_ChangeConfigParams
358 \brief The SME API exposed for HDD to provide config params to SME during
359 SMEs stop -> start sequence.
360
361 If HDD changed the domain that will cause a reset. This function will
362 provide the new set of 11d information for the new domain. Currrently this
363 API provides info regarding 11d only at reset but we can extend this for
364 other params (PMC, QoS) which needs to be initialized again at reset.
365
366 This is a synchronuous call
367
368 \param hHal - The handle returned by macOpen.
369
370 \Param
371 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
372 currently provides 11d related information like Country code,
373 Regulatory domain, valid channel list, Tx power per channel, a
374 list with active/passive scan allowed per valid channel.
375
376 \return eHalStatus
377 ---------------------------------------------------------------------------*/
378eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
379 tCsrUpdateConfigParam *pUpdateConfigParam);
380
381/*--------------------------------------------------------------------------
382
383 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
384 is ready tio run.
385
386 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
387 to running state.
388
389
390 \param hHal - The handle returned by macOpen.
391
392 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
393
394 Other status means SME failed to send the message to PE.
395 \sa
396
397 --------------------------------------------------------------------------*/
398eHalStatus sme_HDDReadyInd(tHalHandle hHal);
399
400
401/*--------------------------------------------------------------------------
402
403 \brief sme_ProcessMsg() - The main message processor for SME.
404
405 The function is called by a message dispatcher when to process a message
406 targeted for SME.
407
408
409 \param hHal - The handle returned by macOpen.
410 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
411
412 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
413
414 Other status means SME failed to process the message.
415 \sa
416
417 --------------------------------------------------------------------------*/
418eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
419
420v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
421
422/* ---------------------------------------------------------------------------
423 \fn sme_ScanRequest
424 \brief a wrapper function to Request a 11d or full scan from CSR.
425 \param pScanRequestID - pointer to an object to get back the request ID
426 \param callback - a callback function that scan calls upon finish, will not
427 be called if csrScanRequest returns error
428 \param pContext - a pointer passed in for the callback
429 \return eHalStatus
430 ---------------------------------------------------------------------------*/
431eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
432 tANI_U32 *pScanRequestID,
433 csrScanCompleteCallback callback, void *pContext);
434
435
436/* ---------------------------------------------------------------------------
437 \fn sme_ScanSetBGScanparams
438 \brief a wrapper function to request CSR to set BG scan params in PE
439 \param pScanReq - BG scan request structure
440 \return eHalStatus
441 ---------------------------------------------------------------------------*/
442eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
443
444
445/* ---------------------------------------------------------------------------
446 \fn sme_ScanGetResult
447 \brief a wrapper function to request scan results from CSR.
448 \param pFilter - If pFilter is NULL, all cached results are returned
449 \param phResult - an object for the result.
450 \return eHalStatus
451 ---------------------------------------------------------------------------*/
452eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
453 tScanResultHandle *phResult);
454
455
456/* ---------------------------------------------------------------------------
457 \fn sme_ScanFlushResult
458 \brief a wrapper function to request CSR to clear scan results.
459 \return eHalStatus
460 ---------------------------------------------------------------------------*/
461eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700462eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700463
464/* ---------------------------------------------------------------------------
465 \fn sme_ScanResultGetFirst
466 \brief a wrapper function to request CSR to returns the first element of
467 scan result.
468 \param hScanResult - returned from csrScanGetResult
469 \return tCsrScanResultInfo * - NULL if no result
470 ---------------------------------------------------------------------------*/
471tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
472 tScanResultHandle hScanResult);
473
474/* ---------------------------------------------------------------------------
475 \fn sme_ScanResultGetNext
476 \brief a wrapper function to request CSR to returns the next element of
477 scan result. It can be called without calling csrScanResultGetFirst
478 first
479 \param hScanResult - returned from csrScanGetResult
480 \return Null if no result or reach the end
481 ---------------------------------------------------------------------------*/
482tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
483 tScanResultHandle hScanResult);
484
485/* ---------------------------------------------------------------------------
486 \fn sme_ScanResultPurge
487 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
488 in the list and free memory for each item
489 \param hScanResult - returned from csrScanGetResult. hScanResult is
490 considered gone by
491 calling this function and even before this function reutrns.
492 \return eHalStatus
493 ---------------------------------------------------------------------------*/
494eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
495
496/* ---------------------------------------------------------------------------
497 \fn sme_ScanGetPMKIDCandidateList
498 \brief a wrapper function to return the PMKID candidate list
499 \param pPmkidList - caller allocated buffer point to an array of
500 tPmkidCandidateInfo
501 \param pNumItems - pointer to a variable that has the number of
502 tPmkidCandidateInfo allocated when retruning, this is
503 either the number needed or number of items put into
504 pPmkidList
505 \return eHalStatus - when fail, it usually means the buffer allocated is not
506 big enough and pNumItems
507 has the number of tPmkidCandidateInfo.
508 \Note: pNumItems is a number of tPmkidCandidateInfo,
509 not sizeof(tPmkidCandidateInfo) * something
510 ---------------------------------------------------------------------------*/
511eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
512 tPmkidCandidateInfo *pPmkidList,
513 tANI_U32 *pNumItems );
514
515
516/*----------------------------------------------------------------------------
517 \fn sme_RoamRegisterLinkQualityIndCallback
518
519 \brief
520 a wrapper function to allow HDD to register a callback handler with CSR for
521 link quality indications.
522
523 Only one callback may be registered at any time.
524 In order to deregister the callback, a NULL cback may be provided.
525
526 Registration happens in the task context of the caller.
527
528 \param callback - Call back being registered
529 \param pContext - user data
530
531 DEPENDENCIES: After CSR open
532
533 \return eHalStatus
534-----------------------------------------------------------------------------*/
535eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
536 csrRoamLinkQualityIndCallback callback,
537 void *pContext);
538
539
540/* ---------------------------------------------------------------------------
541 \fn sme_RoamConnect
542 \brief a wrapper function to request CSR to inititiate an association
543 \param sessionId - the sessionId returned by sme_OpenSession.
544 \param pProfile - can be NULL to join to any open ones
545 \param pRoamId - to get back the request ID
546 \return eHalStatus
547 ---------------------------------------------------------------------------*/
548eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
549 tANI_U32 *pRoamId);
550
551/* ---------------------------------------------------------------------------
552 \fn sme_RoamReassoc
553 \brief a wrapper function to request CSR to inititiate a re-association
554 \param pProfile - can be NULL to join the currently connected AP. In that
555 case modProfileFields should carry the modified field(s) which could trigger
556 reassoc
557 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
558 that might need modification dynamically once STA is up & running and this
559 could trigger a reassoc
560 \param pRoamId - to get back the request ID
561 \return eHalStatus
562 -------------------------------------------------------------------------------*/
563eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
564 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700565 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700566
567/* ---------------------------------------------------------------------------
568 \fn sme_RoamConnectToLastProfile
569 \brief a wrapper function to request CSR to disconnect and reconnect with
570 the same profile
571 \return eHalStatus. It returns fail if currently connected
572 ---------------------------------------------------------------------------*/
573eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
574
575/* ---------------------------------------------------------------------------
576 \fn sme_RoamDisconnect
577 \brief a wrapper function to request CSR to disconnect from a network
578 \param reason -- To indicate the reason for disconnecting. Currently, only
579 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
580 \return eHalStatus
581 ---------------------------------------------------------------------------*/
582eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
583
Jeff Johnson295189b2012-06-20 16:38:30 -0700584/* ---------------------------------------------------------------------------
585 \fn sme_RoamStopBss
586 \brief a wrapper function to request CSR to stop bss
587 \param sessionId - sessionId of SoftAP
588 \return eHalStatus
589 ---------------------------------------------------------------------------*/
590eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
591
592/* ---------------------------------------------------------------------------
593 \fn sme_RoamGetAssociatedStas
594 \brief To probe the list of associated stations from various modules of CORE stack.
595 \This is an asynchronous API.
596 \param sessionId - sessionId of SoftAP
597 \param modId - Module from whom list of associtated stations is to be probed.
598 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
599 \param pUsrContext - Opaque HDD context
600 \param pfnSapEventCallback - Sap event callback in HDD
601 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
602 \return eHalStatus
603 -------------------------------------------------------------------------------*/
604eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
605 VOS_MODULE_ID modId, void *pUsrContext,
606 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
607
608/* ---------------------------------------------------------------------------
609 \fn sme_RoamDisconnectSta
610 \brief To disassociate a station. This is an asynchronous API.
611 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
612 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
613 -------------------------------------------------------------------------------*/
614eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
615
616/* ---------------------------------------------------------------------------
617 \fn sme_RoamDeauthSta
618 \brief To disassociate a station. This is an asynchronous API.
619 \param hHal - Global structure
620 \param sessionId - sessionId of SoftAP
621 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
622 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
623 -------------------------------------------------------------------------------*/
624eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
625 tANI_U8 *pPeerMacAddr);
626
627/* ---------------------------------------------------------------------------
628 \fn sme_RoamTKIPCounterMeasures
629 \brief To start or stop TKIP counter measures. This is an asynchronous API.
630 \param sessionId - sessionId of SoftAP
631 \param bEnable - Flag to start/stop TKIP countermeasures
632 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
633 -------------------------------------------------------------------------------*/
634eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
635
636/* ---------------------------------------------------------------------------
637 \fn sme_RoamGetWpsSessionOverlap
638 \brief To get the WPS PBC session overlap information.
639 \This is an asynchronous API.
640 \param sessionId - sessionId of SoftAP
641 \param pUsrContext - Opaque HDD context
642 \param pfnSapEventCallback - Sap event callback in HDD
643 \return eHalStatus
644 -------------------------------------------------------------------------------*/
645eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
646 void *pUsrContext, void *pfnSapEventCallback,
647 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700648
649/* ---------------------------------------------------------------------------
650 \fn sme_RoamGetConnectState
651 \brief a wrapper function to request CSR to return the current connect state
652 of Roaming
653 \return eHalStatus
654 ---------------------------------------------------------------------------*/
655eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
656
657/* ---------------------------------------------------------------------------
658 \fn sme_RoamGetConnectProfile
659 \brief a wrapper function to request CSR to return the current connect
660 profile. Caller must call csrRoamFreeConnectProfile after it is done
661 and before reuse for another csrRoamGetConnectProfile call.
662 \param pProfile - pointer to a caller allocated structure
663 tCsrRoamConnectedProfile
664 \return eHalStatus. Failure if not connected
665 ---------------------------------------------------------------------------*/
666eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
667 tCsrRoamConnectedProfile *pProfile);
668
669/* ---------------------------------------------------------------------------
670 \fn sme_RoamFreeConnectProfile
671 \brief a wrapper function to request CSR to free and reinitialize the
672 profile returned previously by csrRoamGetConnectProfile.
673 \param pProfile - pointer to a caller allocated structure
674 tCsrRoamConnectedProfile
675 \return eHalStatus.
676 ---------------------------------------------------------------------------*/
677eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
678 tCsrRoamConnectedProfile *pProfile);
679
680/* ---------------------------------------------------------------------------
681 \fn sme_RoamSetPMKIDCache
682 \brief a wrapper function to request CSR to return the PMKID candidate list
683 \param pPMKIDCache - caller allocated buffer point to an array of
684 tPmkidCacheInfo
685 \param numItems - a variable that has the number of tPmkidCacheInfo
686 allocated when retruning, this is either the number needed
687 or number of items put into pPMKIDCache
688 \return eHalStatus - when fail, it usually means the buffer allocated is not
689 big enough and pNumItems has the number of
690 tPmkidCacheInfo.
691 \Note: pNumItems is a number of tPmkidCacheInfo,
692 not sizeof(tPmkidCacheInfo) * something
693 ---------------------------------------------------------------------------*/
694eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId, tPmkidCacheInfo *pPMKIDCache,
695 tANI_U32 numItems );
696
697/* ---------------------------------------------------------------------------
698 \fn sme_RoamGetSecurityReqIE
699 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
700 passes to PE to JOIN request or START_BSS request
701 This is a synchronuous call.
702 \param sessionId - returned by sme_OpenSession.
703 \param pLen - caller allocated memory that has the length of pBuf as input.
704 Upon returned, *pLen has the needed or IE length in pBuf.
705 \param pBuf - Caller allocated memory that contain the IE field, if any,
706 upon return
707 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
708 \return eHalStatus - when fail, it usually means the buffer allocated is not
709 big enough
710 ---------------------------------------------------------------------------*/
711eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
712 tANI_U8 *pBuf, eCsrSecurityType secType);
713
714/* ---------------------------------------------------------------------------
715 \fn sme_RoamGetSecurityRspIE
716 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
717 the beacon or probe rsp if connected
718 \param sessionId - returned by sme_OpenSession.
719 \param pLen - caller allocated memory that has the length of pBuf as input.
720 Upon returned, *pLen has the needed or IE length in pBuf.
721 \param pBuf - Caller allocated memory that contain the IE field, if any,
722 upon return
723 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
724 \return eHalStatus - when fail, it usually means the buffer allocated is not
725 big enough
726 ---------------------------------------------------------------------------*/
727eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
728 tANI_U8 *pBuf, eCsrSecurityType secType);
729
730
731/* ---------------------------------------------------------------------------
732 \fn sme_RoamGetNumPMKIDCache
733 \brief a wrapper function to request CSR to return number of PMKID cache
734 entries
735 \return tANI_U32 - the number of PMKID cache entries
736 ---------------------------------------------------------------------------*/
737tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
738
739/* ---------------------------------------------------------------------------
740 \fn sme_RoamGetPMKIDCache
741 \brief a wrapper function to request CSR to return PMKID cache from CSR
742 \param pNum - caller allocated memory that has the space of the number of
743 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
744 needed or actually number in tPmkidCacheInfo.
745 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
746 any, upon return
747 \return eHalStatus - when fail, it usually means the buffer allocated is not
748 big enough
749 ---------------------------------------------------------------------------*/
750eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
751 tPmkidCacheInfo *pPmkidCache);
752
753/* ---------------------------------------------------------------------------
754 \fn sme_GetConfigParam
755 \brief a wrapper function that HDD calls to get the global settings
756 currently maintained by CSR.
757 \param pParam - caller allocated memory
758 \return eHalStatus
759 ---------------------------------------------------------------------------*/
760eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
761
762/* ---------------------------------------------------------------------------
763 \fn sme_GetStatistics
764 \brief a wrapper function that client calls to register a callback to get
765 different PHY level statistics from CSR.
766
767 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
768 \param statsMask - The different category/categories of stats requester is looking for
769 The order in which you set the bits in the statsMask for requesting
770 different type of stats is:
771
772 eCsrSummaryStats = bit 0
773 eCsrGlobalClassAStats = bit 1
774 eCsrGlobalClassBStats = bit 2
775 eCsrGlobalClassCStats = bit 3
776 eCsrGlobalClassDStats = bit 4
777 eCsrPerStaStats = bit 5
778
779 \param callback - SME sends back the requested stats using the callback
780 \param periodicity - If requester needs periodic update, 0 means it's an one
781 time request
782 \param cache - If requester is happy with cached stats
783 \param staId - The station ID for which the stats is requested for
784 \param pContext - user context to be passed back along with the callback
785 \return eHalStatus
786 ---------------------------------------------------------------------------*/
787eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
788 tANI_U32 statsMask,
789 tCsrStatsCallback callback,
790 tANI_U32 periodicity, tANI_BOOLEAN cache,
791 tANI_U8 staId, void *pContext);
792
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +0530793/* ---------------------------------------------------------------------------
794 \fn smeGetTLSTAState
795 \helper function to get teh TL STA State whenever the function is called.
796
797 \param staId - The staID to be passed to the TL
798 to get the relevant TL STA State
799 \return the state as tANI_U16
800 ---------------------------------------------------------------------------*/
801tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
802
Jeff Johnson295189b2012-06-20 16:38:30 -0700803eHalStatus sme_GetRssi(tHalHandle hHal,
804 tCsrRssiCallback callback,
805 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530806
807/* ---------------------------------------------------------------------------
808 \fn sme_GetSnr
809 \brief a wrapper function that client calls to register a callback to get
810 SNR from FW
811
812 \param callback - SME sends back the requested stats using the callback
813 \param staId - The station ID for which the stats is requested for
814 \param bssid - The bssid of the connected session
815 \param pContext - user context to be passed back along with the callback
816 ---------------------------------------------------------------------------*/
817eHalStatus sme_GetSnr(tHalHandle hHal,
818 tCsrSnrCallback callback,
819 tANI_U8 staId, tCsrBssid bssId,
820 void *pContext);
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -0800821#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
822eHalStatus sme_GetRoamRssi(tHalHandle hHal,
823 tCsrRssiCallback callback,
824 tANI_U8 staId,
825 tCsrBssid bssId,
826 void *pContext,
827 void* pVosContext);
828#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700829
830#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
831/* ---------------------------------------------------------------------------
832 \fn sme_GetTsmStats
833 \brief a wrapper function that client calls to register a callback to get TSM Stats
834
835 \param callback - SME sends back the requested stats using the callback
836 \param staId - The station ID for which the stats is requested for
837 \param pContext - user context to be passed back along with the callback
838 \param pVosContext - vos context
839 \return eHalStatus
840 ---------------------------------------------------------------------------*/
841eHalStatus sme_GetTsmStats(tHalHandle hHal,
842 tCsrTsmStatsCallback callback,
843 tANI_U8 staId, tCsrBssid bssId,
844 void *pContext, void* pVosContext, tANI_U8 tid);
845
846/* ---------------------------------------------------------------------------
847 \fn sme_SetCCKMIe
848 \brief function to store the CCKM IE passed from supplicant and use it while packing
849 reassociation request
850 \param hHal - HAL handle for device
851 \param pCckmIe - pointer to CCKM IE data
852 \param pCckmIeLen - length of the CCKM IE
853 \- return Success or failure
854 -------------------------------------------------------------------------*/
855eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
856
857
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800858/* ---------------------------------------------------------------------------
859 \fn sme_SetCcxBeaconRequest
860 \brief function to set CCX beacon request parameters
861 \param hHal - HAL handle for device
862 \param pCcxBcnReq - pointer to CCX beacon request
863 \- return Success or failure
864 -------------------------------------------------------------------------*/
865eHalStatus sme_SetCcxBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
866 const tCsrCcxBeaconReq* pCcxBcnReq);
867
868
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700869#endif /*FEATURE_WLAN_CCX && FEATURE_WLAN_CCX_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700870/* ---------------------------------------------------------------------------
871 \fn sme_CfgSetInt
872 \brief a wrapper function that HDD calls to set parameters in CFG.
873 \param cfgId - Configuration Parameter ID (type) for STA.
874 \param ccmValue - The information related to Configuration Parameter ID
875 which needs to be saved in CFG
876 \param callback - To be registered by CSR with CCM. Once the CFG done with
877 saving the information in the database, it notifies CCM &
878 then the callback will be invoked to notify.
879 \param toBeSaved - To save the request for future reference
880 \return eHalStatus
881 ---------------------------------------------------------------------------*/
882eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
883 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
884
885/* ---------------------------------------------------------------------------
886 \fn sme_CfgSetStr
887 \brief a wrapper function that HDD calls to set parameters in CFG.
888 \param cfgId - Configuration Parameter ID (type) for STA.
889 \param pStr - Pointer to the byte array which carries the information needs
890 to be saved in CFG
891 \param length - Length of the data to be saved
892 \param callback - To be registered by CSR with CCM. Once the CFG done with
893 saving the information in the database, it notifies CCM &
894 then the callback will be invoked to notify.
895 \param toBeSaved - To save the request for future reference
896 \return eHalStatus
897 ---------------------------------------------------------------------------*/
898eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
899 tANI_U32 length, tCcmCfgSetCallback callback,
900 eAniBoolean toBeSaved) ;
901
902
903/* ---------------------------------------------------------------------------
904 \fn sme_GetModifyProfileFields
905 \brief HDD or SME - QOS calls this function to get the current values of
906 connected profile fields, changing which can cause reassoc.
907 This function must be called after CFG is downloaded and STA is in connected
908 state. Also, make sure to call this function to get the current profile
909 fields before calling the reassoc. So that pModifyProfileFields will have
910 all the latest values plus the one(s) has been updated as part of reassoc
911 request.
912 \param pModifyProfileFields - pointer to the connected profile fields
913 changing which can cause reassoc
914
915 \return eHalStatus
916 -------------------------------------------------------------------------------*/
917eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
918 tCsrRoamModifyProfileFields * pModifyProfileFields);
919
920
921/*--------------------------------------------------------------------------
922 \fn sme_SetConfigPowerSave
923 \brief Wrapper fn to change power save configuration in SME (PMC) module.
924 For BMPS related configuration, this function also updates the CFG
925 and sends a message to FW to pick up the new values. Note: Calling
926 this function only updates the configuration and does not enable
927 the specified power save mode.
928 \param hHal - The handle returned by macOpen.
929 \param psMode - Power Saving mode being modified
930 \param pConfigParams - a pointer to a caller allocated object of type
931 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
932 \return eHalStatus
933 --------------------------------------------------------------------------*/
934eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
935 void *pConfigParams);
936
937/*--------------------------------------------------------------------------
938 \fn sme_GetConfigPowerSave
939 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
940 \param hHal - The handle returned by macOpen.
941 \param psMode - Power Saving mode
942 \param pConfigParams - a pointer to a caller allocated object of type
943 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
944 \return eHalStatus
945 --------------------------------------------------------------------------*/
946eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
947 void *pConfigParams);
948
949/* ---------------------------------------------------------------------------
950 \fn sme_SignalPowerEvent
951 \brief Signals to PMC that a power event has occurred. Used for putting
952 the chip into deep sleep mode.
953 \param hHal - The handle returned by macOpen.
954 \param event - the event that has occurred
955 \return eHalStatus
956 ---------------------------------------------------------------------------*/
957extern eHalStatus sme_SignalPowerEvent (
958 tHalHandle hHal,
959 tPmcPowerEvent event);
960
961/* ---------------------------------------------------------------------------
962 \fn sme_EnablePowerSave
963 \brief Enables one of the power saving modes. This API does not cause a
964 device state change. This is purely a configuration API.
965 \param hHal - The handle returned by macOpen.
966 \param psMode - The power saving mode to enable.
967 \return eHalStatus
968 ---------------------------------------------------------------------------*/
969extern eHalStatus sme_EnablePowerSave (
970 tHalHandle hHal,
971 tPmcPowerSavingMode psMode);
972
973/* ---------------------------------------------------------------------------
974 \fn sme_DisablePowerSave
975 \brief Disables one of the power saving modes.Disabling does not imply
976 that device will be brought out of the current PS mode. This is
977 purely a configuration API.
978 \param hHal - The handle returned by macOpen.
979 \param psMode - The power saving mode to disable.
980 \return eHalStatus
981 ---------------------------------------------------------------------------*/
982extern eHalStatus sme_DisablePowerSave (
983 tHalHandle hHal,
984 tPmcPowerSavingMode psMode);
985
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +0530986 /* ---------------------------------------------------------------------------
987 \fn sme_SetHostPowerSave
988 \brief The BMPS logic is controlled by the User level Apps
989 \param hHal - The handle returned by macOpen.
990 \param psMode - The power saving mode to enable.
991 \return eHalStatus
992 ---------------------------------------------------------------------------*/
993extern eHalStatus sme_SetHostPowerSave (
994 tHalHandle hHal,
995 v_BOOL_t psMode);
996
Jeff Johnson295189b2012-06-20 16:38:30 -0700997/* ---------------------------------------------------------------------------
998 \fn sme_StartAutoBmpsTimer
999 \brief Starts a timer that periodically polls all the registered
1000 module for entry into Bmps mode. This timer is started only if BMPS is
1001 enabled and whenever the device is in full power.
1002 \param hHal - The handle returned by macOpen.
1003 \return eHalStatus
1004 ---------------------------------------------------------------------------*/
1005extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1006
1007/* ---------------------------------------------------------------------------
1008 \fn sme_StopAutoBmpsTimer
1009 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1010 Stopping the timer does not cause a device state change. Only the timer
1011 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1012 \param hHal - The handle returned by macOpen.
1013 \return eHalStatus
1014 ---------------------------------------------------------------------------*/
1015extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1016
1017/* ---------------------------------------------------------------------------
1018 \fn sme_QueryPowerState
1019 \brief Returns the current power state of the device.
1020 \param hHal - The handle returned by macOpen.
1021 \param pPowerState - pointer to location to return power state
1022 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1023 \return eHalStatus
1024 ---------------------------------------------------------------------------*/
1025extern eHalStatus sme_QueryPowerState (
1026 tHalHandle hHal,
1027 tPmcPowerState *pPowerState,
1028 tPmcSwitchState *pSwWlanSwitchState);
1029
1030/* ---------------------------------------------------------------------------
1031 \fn sme_IsPowerSaveEnabled
1032 \brief Checks if the device is able to enter a particular power save mode
1033 This does not imply that the device is in a particular PS mode
1034 \param hHal - The handle returned by macOpen.
1035 \param psMode - the power saving mode
1036 \return eHalStatus
1037 ---------------------------------------------------------------------------*/
1038extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1039 tHalHandle hHal,
1040 tPmcPowerSavingMode psMode);
1041
1042/* ---------------------------------------------------------------------------
1043 \fn sme_RequestFullPower
1044 \brief Request that the device be brought to full power state.
1045 Note 1: If "fullPowerReason" specificied in this API is set to
1046 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1047 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1048 HDD is requesting full power, we need to undo any previous HDD requests for
1049 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1050 specified anything other than above, the buffered requests for BMPS and WoWL
1051 will not be cleared.
1052 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1053 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1054 request".
1055 Note 3: When the device finally enters Full Power PMC will start a timer
1056 if any of the following holds true:
1057 - Auto BMPS mode is enabled
1058 - Uapsd request is pending
1059 - HDD's request for BMPS is pending
1060 - HDD's request for WoWL is pending
1061 On timer expiry PMC will attempt to put the device in BMPS mode if following
1062 (in addition to those listed above) holds true:
1063 - Polling of all modules through the Power Save Check routine passes
1064 - STA is associated to an access point
1065 \param hHal - The handle returned by macOpen.
1066 \param - callbackRoutine Callback routine invoked in case of success/failure
1067 \param - callbackContext - Cookie to be passed back during callback
1068 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1069 distinguish between BAP and HDD requests
1070 \return eHalStatus - status
1071 eHAL_STATUS_SUCCESS - device brought to full power state
1072 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1073 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1074 ---------------------------------------------------------------------------*/
1075extern eHalStatus sme_RequestFullPower (
1076 tHalHandle hHal,
1077 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1078 void *callbackContext,
1079 tRequestFullPowerReason fullPowerReason);
1080
1081/* ---------------------------------------------------------------------------
1082 \fn sme_RequestBmps
1083 \brief Request that the device be put in BMPS state. Request will be
1084 accepted only if BMPS mode is enabled and power save check routine
1085 passes. Only HDD should invoke this API.
1086 \param hHal - The handle returned by macOpen.
1087 \param - callbackRoutine Callback routine invoked in case of success/failure
1088 \param - callbackContext - Cookie to be passed back during callback
1089 \return eHalStatus
1090 eHAL_STATUS_SUCCESS - device is in BMPS state
1091 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1092 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1093 ---------------------------------------------------------------------------*/
1094extern eHalStatus sme_RequestBmps (
1095 tHalHandle hHal,
1096 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1097 void *callbackContext);
1098
1099/* ---------------------------------------------------------------------------
1100 \fn sme_SetDHCPTillPowerActiveFlag
1101 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1102 entry by PMC
1103 \param hHal - The handle returned by macOpen.
1104 ---------------------------------------------------------------------------*/
1105void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1106
1107
1108/* ---------------------------------------------------------------------------
1109 \fn sme_StartUapsd
1110 \brief Request that the device be put in UAPSD state. If the device is in
1111 Full Power it will be put in BMPS mode first and then into UAPSD
1112 mode.
1113 \param hHal - The handle returned by macOpen.
1114 \param - callbackRoutine Callback routine invoked in case of success/failure
1115 \param - callbackContext - Cookie to be passed back during callback
1116 eHAL_STATUS_SUCCESS - device is in UAPSD state
1117 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1118 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1119 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1120 \return eHalStatus
1121 ---------------------------------------------------------------------------*/
1122extern eHalStatus sme_StartUapsd (
1123 tHalHandle hHal,
1124 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1125 void *callbackContext);
1126
1127/* ---------------------------------------------------------------------------
1128 \fn sme_StopUapsd
1129 \brief Request that the device be put out of UAPSD state. Device will be
1130 put in in BMPS state after stop UAPSD completes. Buffered requests for
1131 UAPSD will be cleared after this.
1132 \param hHal - The handle returned by macOpen.
1133 \return eHalStatus
1134 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1135 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1136 ---------------------------------------------------------------------------*/
1137extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1138
1139/* ---------------------------------------------------------------------------
1140 \fn sme_RequestStandby
1141 \brief Request that the device be put in standby. It is HDD's responsibility
1142 to bring the chip to full power and do a discconnect before calling
1143 this API. Request for standby will be rejected if STA is associated
1144 to an AP.
1145 \param hHal - The handle returned by macOpen.
1146 \param - callbackRoutine Callback routine invoked in case of success/failure
1147 \param - callbackContext - Cookie to be passed back during callback
1148 \return eHalStatus
1149 eHAL_STATUS_SUCCESS - device is in Standby mode
1150 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1151 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1152 ---------------------------------------------------------------------------*/
1153extern eHalStatus sme_RequestStandby (
1154 tHalHandle hHal,
1155 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1156 void *callbackContext);
1157
1158/* ---------------------------------------------------------------------------
1159 \fn sme_RegisterPowerSaveCheck
1160 \brief Register a power save check routine that is called whenever
1161 the device is about to enter one of the power save modes.
1162 \param hHal - The handle returned by macOpen.
1163 \param checkRoutine - Power save check routine to be registered
1164 \param callbackContext - Cookie to be passed back during callback
1165 \return eHalStatus
1166 eHAL_STATUS_SUCCESS - successfully registered
1167 eHAL_STATUS_FAILURE - not successfully registered
1168 ---------------------------------------------------------------------------*/
1169extern eHalStatus sme_RegisterPowerSaveCheck (
1170 tHalHandle hHal,
1171 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1172
1173/* ---------------------------------------------------------------------------
1174 \fn sme_DeregisterPowerSaveCheck
1175 \brief Deregister a power save check routine
1176 \param hHal - The handle returned by macOpen.
1177 \param checkRoutine - Power save check routine to be deregistered
1178 \return eHalStatus
1179 eHAL_STATUS_SUCCESS - successfully deregistered
1180 eHAL_STATUS_FAILURE - not successfully deregistered
1181 ---------------------------------------------------------------------------*/
1182extern eHalStatus sme_DeregisterPowerSaveCheck (
1183 tHalHandle hHal,
1184 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1185
1186/* ---------------------------------------------------------------------------
1187 \fn sme_RegisterDeviceStateUpdateInd
1188 \brief Register a callback routine that is called whenever
1189 the device enters a new device state (Full Power, BMPS, UAPSD)
1190 \param hHal - The handle returned by macOpen.
1191 \param callbackRoutine - Callback routine to be registered
1192 \param callbackContext - Cookie to be passed back during callback
1193 \return eHalStatus
1194 eHAL_STATUS_SUCCESS - successfully registered
1195 eHAL_STATUS_FAILURE - not successfully registered
1196 ---------------------------------------------------------------------------*/
1197extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1198 tHalHandle hHal,
1199 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1200 void *callbackContext);
1201
1202/* ---------------------------------------------------------------------------
1203 \fn sme_DeregisterDeviceStateUpdateInd
1204 \brief Deregister a routine that was registered for device state changes
1205 \param hHal - The handle returned by macOpen.
1206 \param callbackRoutine - Callback routine to be deregistered
1207 \return eHalStatus
1208 eHAL_STATUS_SUCCESS - successfully deregistered
1209 eHAL_STATUS_FAILURE - not successfully deregistered
1210 ---------------------------------------------------------------------------*/
1211extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1212 tHalHandle hHal,
1213 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1214
1215/* ---------------------------------------------------------------------------
1216 \fn sme_WowlAddBcastPattern
1217 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1218 do a pattern match on these patterns when Wowl is enabled during BMPS
1219 mode.
1220 \param hHal - The handle returned by macOpen.
1221 \param pattern - Pattern to be added
1222 \return eHalStatus
1223 eHAL_STATUS_FAILURE Cannot add pattern
1224 eHAL_STATUS_SUCCESS Request accepted.
1225 ---------------------------------------------------------------------------*/
1226extern eHalStatus sme_WowlAddBcastPattern (
1227 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001228 tpSirWowlAddBcastPtrn pattern,
1229 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001230
1231/* ---------------------------------------------------------------------------
1232 \fn sme_WowlDelBcastPattern
1233 \brief Delete a pattern that was added for Pattern Byte Matching.
1234 \param hHal - The handle returned by macOpen.
1235 \param pattern - Pattern to be deleted
1236 \return eHalStatus
1237 eHAL_STATUS_FAILURE Cannot delete pattern
1238 eHAL_STATUS_SUCCESS Request accepted.
1239 ---------------------------------------------------------------------------*/
1240extern eHalStatus sme_WowlDelBcastPattern (
1241 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001242 tpSirWowlDelBcastPtrn pattern,
1243 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001244
1245/* ---------------------------------------------------------------------------
1246 \fn sme_EnterWowl
1247 \brief This is the API to request entry into WOWL mode.
1248 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1249 SME will will cache the information that WOWL has been requested and
1250 attempt to put the device in BMPS first. On entry into BMPS, SME will
1251 enter the WOWL mode.
1252 Note 1: After WoWL request is accepted, If module other than HDD requests
1253 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1254 and attempt to put the chip into BMPS+WOWL based on a timer.
1255 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1256 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1257 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1258 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1259 are required. Currently there is no requirement or use case to support UAPSD
1260 and WOWL at the same time.
1261 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1262 Note 5. Request for WoWL is rejected if BMPS is disabled.
1263
1264 \param hHal - The handle returned by macOpen.
1265 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1266 Used for success/failure notification by SME
1267 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1268 at the time of callback.
1269 \param wakeReasonIndCB - Callback routine provided by HDD.
1270 Used for Wake Reason Indication by SME
1271 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1272 at the time of callback.
1273 \return eHalStatus
1274 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1275 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1276 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1277 mode is entered.
1278 ---------------------------------------------------------------------------*/
1279extern eHalStatus sme_EnterWowl (
1280 tHalHandle hHal,
1281 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1282 void *enterWowlCallbackContext,
1283#ifdef WLAN_WAKEUP_EVENTS
1284 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1285 void *wakeReasonIndCBContext,
1286#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001287 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001288
1289/* ---------------------------------------------------------------------------
1290 \fn sme_ExitWowl
1291 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1292 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1293 mode. Any Buffered request for WoWL will be cleared after this API.
1294 \param hHal - The handle returned by macOpen.
1295 \return eHalStatus
1296 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1297 only if the previous "Enter WOWL" transaction has
1298 not even completed.
1299 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1300 ---------------------------------------------------------------------------*/
1301extern eHalStatus sme_ExitWowl (tHalHandle hHal);
1302
1303/* ---------------------------------------------------------------------------
1304
1305 \fn sme_RoamSetKey
1306
1307 \brief To set encryption key. This function should be called only when connected
1308 This is an asynchronous API.
1309
1310 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1311
1312 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1313
1314 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1315
1316 FAILURE or RESOURCES The API finished and failed.
1317
1318 -------------------------------------------------------------------------------*/
1319eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1320
1321/* ---------------------------------------------------------------------------
1322
1323 \fn sme_RoamRemoveKey
1324
1325 \brief To set encryption key. This is an asynchronous API.
1326
1327 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1328
1329 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1330
1331 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1332
1333 FAILURE or RESOURCES The API finished and failed.
1334
1335 -------------------------------------------------------------------------------*/
1336eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1337
1338
1339/* ---------------------------------------------------------------------------
1340
1341 \fn sme_GetCountryCode
1342
1343 \brief To return the current country code. If no country code is applied, default country code is
1344 used to fill the buffer.
1345 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1346 This is a synchronous API.
1347
1348 \param pBuf - pointer to a caller allocated buffer for returned country code.
1349
1350 \param pbLen For input, this parameter indicates how big is the buffer.
1351 Upon return, this parameter has the number of bytes for country. If pBuf
1352 doesn't have enough space, this function returns
1353 fail status and this parameter contains the number that is needed.
1354
1355 \return eHalStatus SUCCESS.
1356
1357 FAILURE or RESOURCES The API finished and failed.
1358
1359 -------------------------------------------------------------------------------*/
1360eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1361
1362/* ---------------------------------------------------------------------------
1363
1364 \fn sme_SetCountryCode
1365
1366 \brief To change the current/default country code.
1367 If 11d supported is turned off, an error is return.
1368 This is a synchronous API.
1369
1370 \param pCountry - pointer to a caller allocated buffer for the country code.
1371
1372 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1373 whether a reset is required.
1374
1375 \return eHalStatus SUCCESS.
1376
1377 FAILURE or RESOURCES The API finished and failed.
1378
1379 -------------------------------------------------------------------------------*/
1380eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1381
1382/* ---------------------------------------------------------------------------
1383 \fn sme_ResetCountryCodeInformation
1384 \brief this function is to reset the country code current being used back to EEPROM default
1385 this includes channel list and power setting. This is a synchronous API.
1386 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1387 a restart is needed to apply the change
1388 \return eHalStatus
1389 -------------------------------------------------------------------------------*/
1390eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1391
1392/* ---------------------------------------------------------------------------
1393 \fn sme_GetSupportedCountryCode
1394 \brief this function is to get a list of the country code current being supported
1395 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1396 this has the country code list. 3 bytes for each country code. This may be NULL if
1397 caller wants to know the needed byte count.
1398 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1399 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1400 \return eHalStatus
1401 -------------------------------------------------------------------------------*/
1402eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1403
1404/* ---------------------------------------------------------------------------
1405 \fn sme_GetCurrentRegulatoryDomain
1406 \brief this function is to get the current regulatory domain. This is a synchronous API.
1407 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1408 SME. The function fails if 11d support is turned off.
1409 \param pDomain - Caller allocated buffer to return the current domain.
1410 \return eHalStatus SUCCESS.
1411
1412 FAILURE or RESOURCES The API finished and failed.
1413 -------------------------------------------------------------------------------*/
1414eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1415
1416/* ---------------------------------------------------------------------------
1417 \fn sme_SetRegulatoryDomain
1418 \brief this function is to set the current regulatory domain.
1419 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1420 SME. This is a synchronous API.
1421 \param domainId - indicate the domain (defined in the driver) needs to set to.
1422 See v_REGDOMAIN_t for definition
1423 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1424 a restart is needed to apply the change
1425 \return eHalStatus
1426 -------------------------------------------------------------------------------*/
1427eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1428
1429/* ---------------------------------------------------------------------------
1430
1431 \fn sme_GetRegulatoryDomainForCountry
1432
1433 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1434
1435 \param pCountry - pointer to a caller allocated buffer for input country code.
1436
1437 \param pDomainId Upon successful return, it is the domain that country belongs to.
1438 If it is NULL, returning success means that the country code is known.
1439
1440 \return eHalStatus SUCCESS.
1441
1442 FAILURE or RESOURCES The API finished and failed.
1443
1444 -------------------------------------------------------------------------------*/
1445eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1446
1447
1448
1449/* ---------------------------------------------------------------------------
1450
1451 \fn sme_GetSupportedRegulatoryDomains
1452
1453 \brief To return a list of supported regulatory domains. This is a synchronous API.
1454
1455 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1456
1457 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1458 Upon return, this parameter has the number for supported domains. If pDomains
1459 doesn't have enough space for all the supported domains, this function returns
1460 fail status and this parameter contains the number that is needed.
1461
1462 \return eHalStatus SUCCESS.
1463
1464 FAILURE or RESOURCES The API finished and failed.
1465
1466 -------------------------------------------------------------------------------*/
1467eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1468
1469//some support functions
1470tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1471tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1472tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1473//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1474eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1475
1476typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1477/* ---------------------------------------------------------------------------
1478
1479 \fn sme_ChangeCountryCode
1480
1481 \brief Change Country code from upperlayer during WLAN driver operation.
1482 This is a synchronous API.
1483
1484 \param hHal - The handle returned by macOpen.
1485
1486 \param pCountry New Country Code String
1487
Abhishek Singha306a442013-11-07 18:39:01 +05301488 \param sendRegHint If we want to send reg hint to nl80211
1489
Jeff Johnson295189b2012-06-20 16:38:30 -07001490 \return eHalStatus SUCCESS.
1491
1492 FAILURE or RESOURCES The API finished and failed.
1493
1494 -------------------------------------------------------------------------------*/
1495eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1496 tSmeChangeCountryCallback callback,
1497 tANI_U8 *pCountry,
1498 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301499 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301500 tAniBool countryFromUserSpace,
1501 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001502
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301503/* ---------------------------------------------------------------------------
1504
Amar Singhal0d15bd52013-10-12 23:13:13 -07001505 \fn sme_GenericChangeCountryCode
1506
1507 \brief Generic API to change country code
1508
1509 \param hHal - The handle returned by macOpen.
1510
1511 \param pCountry New Country Code String
1512
1513 \param reg_domain Regulatory domain for the new country code
1514
1515 \return eHalStatus SUCCESS.
1516
1517 FAILURE or RESOURCES The API finished and failed.
1518
1519 -------------------------------------------------------------------------------*/
1520eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1521 tANI_U8 *pCountry,
1522 v_REGDOMAIN_t reg_domain);
1523
1524/* ---------------------------------------------------------------------------
1525
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301526 \fn sme_DHCPStartInd
1527
1528 \brief Indicate FW about DHCP start event.
1529
1530 \param hHal - The handle returned by macOpen.
1531
1532 \param device_mode the mode of the device
1533
1534 \param macAddr the macAddress of the devices
1535
1536 \return eHalStatus SUCCESS.
1537
1538 FAILURE or RESOURCES The API finished and failed.
1539
1540 -------------------------------------------------------------------------------*/
1541
1542eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1543 tANI_U8 device_mode,
1544 tANI_U8 *macAddr );
1545
1546/* ---------------------------------------------------------------------------
1547
1548 \fn sme_DHCPStopInd
1549
1550 \brief Indicate FW about DHCP stop event.
1551
1552 \param hHal - The handle returned by macOpen.
1553
1554 \param device_mode the mode of the device
1555
1556 \param macAddr the macAddress of the devices
1557
1558 \return eHalStatus SUCCESS.
1559
1560 FAILURE or RESOURCES The API finished and failed.
1561
1562 -------------------------------------------------------------------------------*/
1563eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1564 tANI_U8 device_mode,
1565 tANI_U8 *macAddr );
1566
Jeff Johnson295189b2012-06-20 16:38:30 -07001567
1568/* ---------------------------------------------------------------------------
1569 \fn sme_BtcSignalBtEvent
1570 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1571 BT event type and the current operating mode of Libra (full power,
1572 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1573 would be employed.
1574 \param hHal - The handle returned by macOpen.
1575 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1576 Caller owns the memory and is responsible for freeing it.
1577 \return VOS_STATUS
1578 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1579 if driver has not yet been initialized or if BTC
1580 Events Layer has been disabled.
1581 VOS_STATUS_SUCCESS BT Event passed to HAL
1582 ---------------------------------------------------------------------------*/
1583VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1584
1585/* ---------------------------------------------------------------------------
1586 \fn sme_BtcSetConfig
1587 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1588 This function should be invoked only after CFG download has completed.
1589 Calling it after sme_HDDReadyInd is recommended.
1590 \param hHal - The handle returned by macOpen.
1591 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1592 tSmeBtcConfig. Caller owns the memory and is responsible
1593 for freeing it.
1594 \return VOS_STATUS
1595 VOS_STATUS_E_FAILURE Config not passed to HAL.
1596 VOS_STATUS_SUCCESS Config passed to HAL
1597 ---------------------------------------------------------------------------*/
1598VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1599
1600/* ---------------------------------------------------------------------------
1601 \fn sme_BtcGetConfig
1602 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1603 \param hHal - The handle returned by macOpen.
1604 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1605 Caller owns the memory and is responsible for freeing it.
1606 \return VOS_STATUS
1607 VOS_STATUS_E_FAILURE - failure
1608 VOS_STATUS_SUCCESS success
1609 ---------------------------------------------------------------------------*/
1610VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1611
1612/* ---------------------------------------------------------------------------
1613 \fn sme_SetCfgPrivacy
1614 \brief API to set configure privacy parameters
1615 \param hHal - The handle returned by macOpen.
1616 \param pProfile - Pointer CSR Roam profile.
1617 \param fPrivacy - This parameter indicates status of privacy
1618
1619 \return void
1620 ---------------------------------------------------------------------------*/
1621void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1622
1623#if defined WLAN_FEATURE_VOWIFI
1624/* ---------------------------------------------------------------------------
1625 \fn sme_NeighborReportRequest
1626 \brief API to request neighbor report.
1627 \param hHal - The handle returned by macOpen.
1628 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1629 tRrmNeighborReq. Caller owns the memory and is responsible
1630 for freeing it.
1631 \return VOS_STATUS
1632 VOS_STATUS_E_FAILURE - failure
1633 VOS_STATUS_SUCCESS success
1634 ---------------------------------------------------------------------------*/
1635VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1636 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1637#endif
1638
1639//The following are debug APIs to support direct read/write register/memory
1640//They are placed in SME because HW cannot be access when in LOW_POWER state
1641//AND not connected. The knowledge and synchronization is done in SME
1642
1643//sme_DbgReadRegister
1644//Caller needs to validate the input values
1645VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1646
1647//sme_DbgWriteRegister
1648//Caller needs to validate the input values
1649VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1650
1651//sme_DbgReadMemory
1652//Caller needs to validate the input values
1653//pBuf caller allocated buffer has the length of nLen
1654VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1655
1656//sme_DbgWriteMemory
1657//Caller needs to validate the input values
1658VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1659
Jeff Johnson295189b2012-06-20 16:38:30 -07001660VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1661 tSirVersionType *pVersion);
1662VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1663 tSirVersionType *pVersion);
1664VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1665 tANI_U8 *pVersion,
1666 tANI_U32 versionBufferSize);
1667VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1668 tANI_U8 *pVersion,
1669 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001670eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1671 csrRoamCompleteCallback callback,
1672 void *pContext);
1673
1674#ifdef FEATURE_WLAN_WAPI
1675/* ---------------------------------------------------------------------------
1676 \fn sme_RoamSetBKIDCache
1677 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1678 candidate list.
1679 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1680 it is opened (by calling halOpen).
1681 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1682 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1683 when retruning, this is the number of items put into pBKIDCache
1684 \return eHalStatus - when fail, it usually means the buffer allocated is not
1685 big enough and pNumItems has the number of tBkidCacheInfo.
1686 ---------------------------------------------------------------------------*/
1687eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1688 tANI_U32 numItems );
1689
1690/* ---------------------------------------------------------------------------
1691 \fn sme_RoamGetBKIDCache
1692 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1693 BKID cache.
1694 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1695 it is opened (by calling halOpen).
1696 \param pNum - caller allocated memory that has the space of the number of
1697 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1698 in SME cache.
1699 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1700 upon return
1701 \return eHalStatus - when fail, it usually means the buffer allocated is not
1702 big enough.
1703 ---------------------------------------------------------------------------*/
1704eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1705 tBkidCacheInfo *pBkidCache);
1706
1707/* ---------------------------------------------------------------------------
1708 \fn sme_RoamGetNumBKIDCache
1709 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1710 number of BKID cache entries.
1711 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1712 it is opened (by calling halOpen).
1713 \return tANI_U32 - the number of BKID cache entries.
1714 ---------------------------------------------------------------------------*/
1715tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1716
1717/* ---------------------------------------------------------------------------
1718 \fn sme_ScanGetBKIDCandidateList
1719 \brief a wrapper function to return the BKID candidate list
1720 \param pBkidList - caller allocated buffer point to an array of
1721 tBkidCandidateInfo
1722 \param pNumItems - pointer to a variable that has the number of
1723 tBkidCandidateInfo allocated when retruning, this is
1724 either the number needed or number of items put into
1725 pPmkidList
1726 \return eHalStatus - when fail, it usually means the buffer allocated is not
1727 big enough and pNumItems
1728 has the number of tBkidCandidateInfo.
1729 \Note: pNumItems is a number of tBkidCandidateInfo,
1730 not sizeof(tBkidCandidateInfo) * something
1731 ---------------------------------------------------------------------------*/
1732eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1733 tBkidCandidateInfo *pBkidList,
1734 tANI_U32 *pNumItems );
1735#endif /* FEATURE_WLAN_WAPI */
1736
Jeff Johnsone7245742012-09-05 17:12:55 -07001737#ifdef FEATURE_OEM_DATA_SUPPORT
1738/********************************************************************************************
1739 Oem data related modifications
1740*********************************************************************************************/
1741/* ---------------------------------------------------------------------------
1742 \fn sme_OemDataReq
1743 \param sessionId - session id of session to be used for oem data req.
1744 \param pOemDataReqID - pointer to an object to get back the request ID
1745 \param callback - a callback function that is called upon finish
1746 \param pContext - a pointer passed in for the callback
1747 \return eHalStatus
1748 ---------------------------------------------------------------------------*/
1749eHalStatus sme_OemDataReq(tHalHandle hHal,
1750 tANI_U8 sessionId,
1751 tOemDataReqConfig *,
1752 tANI_U32 *pOemDataReqID,
1753 oemData_OemDataReqCompleteCallback callback,
1754 void *pContext);
1755
1756/* ---------------------------------------------------------------------------
1757 \fn sme_getOemDataRsp
1758 \param pOemDataRsp - A pointer to the response object
1759 \param pOemDataReqID - pointer to an object to get back the request ID
1760 \return eHalStatus
1761 ---------------------------------------------------------------------------*/
1762eHalStatus sme_getOemDataRsp(tHalHandle hHal,
1763 tOemDataRsp **pOemDataRsp);
1764
1765#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07001766
1767
Jeff Johnson295189b2012-06-20 16:38:30 -07001768
1769/* ---------------------------------------------------------------------------
1770
1771 \fn sme_RoamUpdateAPWPSIE
1772
1773 \brief To update AP's WPS IE. This function should be called after SME AP session is created
1774 This is an asynchronous API.
1775
1776 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
1777
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001778 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07001779
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001780 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001781
1782 -------------------------------------------------------------------------------*/
1783
1784eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
1785/* ---------------------------------------------------------------------------
1786
1787 \fn sme_RoamUpdateAPWPARSNIEs
1788
1789 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
1790 This is an asynchronous API.
1791
1792 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
1793
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001794 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07001795
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001796 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001797
1798 -------------------------------------------------------------------------------*/
1799eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
1800
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001801/* ---------------------------------------------------------------------------
1802
1803 sme_ChangeMCCBeaconInterval
1804
1805 \brief To update P2P-GO's beacon Interval.
1806
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001807 \return eHalStatus SUCCESS
1808 FAILURE or RESOURCES
1809 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001810 -------------------------------------------------------------------------------*/
1811eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
1812
1813
Jeff Johnson295189b2012-06-20 16:38:30 -07001814
1815/* ---------------------------------------------------------------------------
1816 \fn sme_sendBTAmpEvent
1817 \brief API to send the btAMPstate to FW
1818 \param hHal - The handle returned by macOpen.
1819 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001820 \return eHalStatus SUCCESS
1821 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001822
1823--------------------------------------------------------------------------- */
1824
1825eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
1826
1827
1828
1829/* ---------------------------------------------------------------------------
1830 \fn sme_SetHostOffload
1831 \brief API to set the host offload feature.
1832 \param hHal - The handle returned by macOpen.
1833 \param pRequest - Pointer to the offload request.
1834 \return eHalStatus
1835 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001836eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
1837 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001838
1839/* ---------------------------------------------------------------------------
1840 \fn sme_SetKeepAlive
1841 \brief API to set the Keep Alive feature.
1842 \param hHal - The handle returned by macOpen.
1843 \param pRequest - Pointer to the Keep Alive request.
1844 \return eHalStatus
1845 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001846eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
1847 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001848
Jeff Johnson295189b2012-06-20 16:38:30 -07001849/* ----------------------------------------------------------------------------
1850 \fn sme_GetOperationChannel
1851 \brief API to get current channel on which STA is parked
1852 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001853 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07001854 \returns eHAL_STATUS_SUCCESS
1855 eHAL_STATUS_FAILURE
1856-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001857eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001858
Jeff Johnson295189b2012-06-20 16:38:30 -07001859/* ---------------------------------------------------------------------------
1860
1861 \fn sme_RegisterMgtFrame
1862
1863 \brief To register managment frame of specified type and subtype.
1864 \param frameType - type of the frame that needs to be passed to HDD.
1865 \param matchData - data which needs to be matched before passing frame
1866 to HDD.
1867 \param matchDataLen - Length of matched data.
1868 \return eHalStatus
1869 -------------------------------------------------------------------------------*/
1870eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1871 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
1872
1873/* ---------------------------------------------------------------------------
1874
1875 \fn sme_DeregisterMgtFrame
1876
1877 \brief To De-register managment frame of specified type and subtype.
1878 \param frameType - type of the frame that needs to be passed to HDD.
1879 \param matchData - data which needs to be matched before passing frame
1880 to HDD.
1881 \param matchDataLen - Length of matched data.
1882 \return eHalStatus
1883 -------------------------------------------------------------------------------*/
1884eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1885 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07001886
1887/* ---------------------------------------------------------------------------
1888
1889 \fn sme_ConfigureRxpFilter
1890
1891 \brief
1892 SME will pass this request to lower mac to set/reset the filter on RXP for
1893 multicast & broadcast traffic.
1894
1895 \param
1896
1897 hHal - The handle returned by macOpen.
1898
1899 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
1900 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
1901 on this param. In future we can use this as a mask to set various types of
1902 filters as suggested below:
1903 FILTER_ALL_MULTICAST:
1904 FILTER_ALL_BROADCAST:
1905 FILTER_ALL_MULTICAST_BROADCAST:
1906
1907
1908 \return eHalStatus
1909
1910
1911--------------------------------------------------------------------------- */
1912eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
1913 tpSirWlanSetRxpFilters wlanRxpFilterParam);
1914
1915/* ---------------------------------------------------------------------------
1916
1917 \fn sme_ConfigureAppsCpuWakeupState
1918
1919 \brief
1920 SME will pass this request to lower mac to dynamically adjusts the listen
1921 interval based on the WLAN/MSM activity. This feature is named as
1922 Telescopic Beacon wakeup feature.
1923
1924 \param
1925
1926 hHal - The handle returned by macOpen.
1927
1928 isAppsAwake- Depicts the state of the Apps CPU
1929
1930
1931 \return eHalStatus
1932
1933
1934--------------------------------------------------------------------------- */
1935eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
1936
Jeff Johnson295189b2012-06-20 16:38:30 -07001937/* ---------------------------------------------------------------------------
1938
1939 \fn sme_ConfigureSuspendInd
1940
1941 \brief
1942 SME will pass this request to lower mac to Indicate that the wlan needs to
1943 be suspended
1944
1945 \param
1946
1947 hHal - The handle returned by macOpen.
1948
1949 wlanSuspendParam- Depicts the wlan suspend params
1950
1951
1952 \return eHalStatus
1953
1954
1955--------------------------------------------------------------------------- */
1956eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
1957 tpSirWlanSuspendParam wlanSuspendParam);
1958
1959/* ---------------------------------------------------------------------------
1960
1961 \fn sme_ConfigureResumeReq
1962
1963 \brief
1964 SME will pass this request to lower mac to Indicate that the wlan needs to
1965 be Resumed
1966
1967 \param
1968
1969 hHal - The handle returned by macOpen.
1970
1971 wlanResumeParam- Depicts the wlan resume params
1972
1973
1974 \return eHalStatus
1975
1976
1977--------------------------------------------------------------------------- */
1978eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
1979 tpSirWlanResumeParam wlanResumeParam);
1980
Jeff Johnson295189b2012-06-20 16:38:30 -07001981
1982/* ---------------------------------------------------------------------------
1983
1984 \fn sme_GetInfraSessionId
1985
1986 \brief To get the session ID for infra session, if connected
1987 This is a synchronous API.
1988
1989 \param hHal - The handle returned by macOpen.
1990
1991 \return sessionid, -1 if infra session is not connected
1992
1993 -------------------------------------------------------------------------------*/
1994tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
1995
1996/* ---------------------------------------------------------------------------
1997
1998 \fn sme_GetInfraOperationChannel
1999
2000 \brief To get the operating channel for infra session, if connected
2001 This is a synchronous API.
2002
2003 \param hHal - The handle returned by macOpen.
2004 \param sessionId - the sessionId returned by sme_OpenSession.
2005
2006 \return operating channel, 0 if infra session is not connected
2007
2008 -------------------------------------------------------------------------------*/
2009tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2010/* ---------------------------------------------------------------------------
2011
2012 \fn sme_GetConcurrentOperationChannel
2013
2014 \brief To get the operating channel for other concurrent sessions, if connected
2015 This is a synchronous API.
2016
2017 \param hHal - The handle returned by macOpen.
2018 \param currentPersona - persona that is trying to come up.
2019
2020 \return operating channel, 0 if infra session is not connected
2021
2022 -------------------------------------------------------------------------------*/
2023tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2024
2025/* ---------------------------------------------------------------------------
2026 \fn sme_AbortMacScan
2027 \brief API to cancel MAC scan.
2028 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302029 \param sessionId - sessionId for interface
Jeff Johnson295189b2012-06-20 16:38:30 -07002030 \return VOS_STATUS
2031 VOS_STATUS_E_FAILURE - failure
2032 VOS_STATUS_SUCCESS success
2033 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302034eHalStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002035
2036/* ---------------------------------------------------------------------------
2037 \fn sme_GetCfgValidChannels
2038 \brief API to get valid channel list
2039 \param hHal - The handle returned by macOpen.
2040 \param aValidChannels - Pointer to the valid channel list
2041 \param len - valid channel list length
2042 \return eHalStatus
2043 ---------------------------------------------------------------------------*/
2044eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2045
2046#ifdef FEATURE_WLAN_SCAN_PNO
2047
2048/* ---------------------------------------------------------------------------
2049 \fn sme_SetPreferredNetworkList
2050 \brief API to set the Preferred Network List Offload feature.
2051 \param hHal - The handle returned by macOpen.
2052 \param pRequest - Pointer to the offload request.
2053 \return eHalStatus
2054 ---------------------------------------------------------------------------*/
2055eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2056
2057/* ---------------------------------------------------------------------------
2058 \fn sme_SetRSSIFilter
2059 \brief API to set RSSI Filter feature.
2060 \param hHal - The handle returned by macOpen.
2061 \param pRequest - Pointer to the offload request.
2062 \return eHalStatus
2063 ---------------------------------------------------------------------------*/
2064eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2065
2066/******************************************************************************
2067*
2068* Name: sme_PreferredNetworkFoundInd
2069*
2070* Description:
2071* Invoke Preferred Network Found Indication
2072*
2073* Parameters:
2074* hHal - HAL handle for device
2075* pMsg - found network description
2076*
2077* Returns: eHalStatus
2078*
2079******************************************************************************/
2080eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2081#endif // FEATURE_WLAN_SCAN_PNO
2082
2083/* ---------------------------------------------------------------------------
2084 \fn sme_SetPowerParams
2085 \brief API to set Power Parameters
2086 \param hHal - The handle returned by macOpen.
2087 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002088 \param forced - if true, not to be dropped silently in host, it must reach
2089 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2090 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002091 \return eHalStatus
2092 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002093eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002094
2095/* ---------------------------------------------------------------------------
2096 \fn sme_SetTxPerTracking
2097 \brief Set Tx PER tracking configuration parameters
2098 \param hHal - The handle returned by macOpen.
2099 \param pTxPerTrackingParam - Tx PER configuration parameters
2100 \return eHalStatus
2101 ---------------------------------------------------------------------------*/
2102eHalStatus sme_SetTxPerTracking (
2103 tHalHandle hHal,
2104 void (*pCallbackfn) (void *pCallbackContext),
2105 void *pCallbackContext,
2106 tpSirTxPerTrackingParam pTxPerTrackingParam);
2107
2108#ifdef WLAN_FEATURE_PACKET_FILTERING
2109/* ---------------------------------------------------------------------------
2110 \fn sme_ReceiveFilterSetFilter
2111 \brief API to set 8023 Multicast Address List
2112 \param hHal - The handle returned by macOpen.
2113 \param pMulticastAddrs - Pointer to the Multicast Address List
2114 \return eHalStatus
2115 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002116eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002117
2118/* ---------------------------------------------------------------------------
2119 \fn sme_ReceiveFilterSetFilter
2120 \brief API to set Receive Packet Filter
2121 \param hHal - The handle returned by macOpen.
2122 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2123 \return eHalStatus
2124 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002125eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2126 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002127
2128/* ---------------------------------------------------------------------------
2129 \fn sme_GetFilterMatchCount
2130 \brief API to get D0 PC Filter Match Count
2131 \param hHal - The handle returned by macOpen
2132 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2133 \param callbackContext - Cookie to be passed back during callback
2134 \return eHalStatus
2135 ---------------------------------------------------------------------------*/
2136eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2137 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002138 void *callbackContext,
2139 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002140
2141/* ---------------------------------------------------------------------------
2142 \fn sme_ReceiveFilterClearFilter
2143 \brief API to clear Receive Packet Filter
2144 \param hHal - The handle returned by macOpen.
2145 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2146 \return eHalStatus
2147 ---------------------------------------------------------------------------*/
2148eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002149 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2150 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002151#endif // WLAN_FEATURE_PACKET_FILTERING
2152/* ---------------------------------------------------------------------------
2153
2154 \fn sme_IsChannelValid
2155 \brief To check if the channel is valid for currently established domain
2156 This is a synchronous API.
2157
2158 \param hHal - The handle returned by macOpen.
2159 \param channel - channel to verify
2160
2161 \return TRUE/FALSE, TRUE if channel is valid
2162
2163 -------------------------------------------------------------------------------*/
2164tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2165
2166/* ---------------------------------------------------------------------------
2167 \fn sme_SetFreqBand
2168 \brief Used to set frequency band.
2169 \param hHal
2170 \eBand band value to be configured
2171 \- return eHalStatus
2172 -------------------------------------------------------------------------*/
2173eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2174
2175/* ---------------------------------------------------------------------------
2176 \fn sme_GetFreqBand
2177 \brief Used to get the current band settings.
2178 \param hHal
2179 \pBand pointer to hold the current band value
2180 \- return eHalStatus
2181 -------------------------------------------------------------------------*/
2182eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2183
2184/* ---------------------------------------------------------------------------
2185
2186 \fn sme_SetTxPerTracking
2187 \brief Set Tx PER tracking configuration parameters
2188 \param hHal - The handle returned by macOpen.
2189 \param pTxPerTrackingParam - Tx PER configuration parameters
2190 \return eHalStatus
2191 ---------------------------------------------------------------------------*/
2192eHalStatus sme_SetTxPerTracking (
2193 tHalHandle hHal,
2194 void (*pCallbackfn) (void *pCallbackContext),
2195 void *pCallbackContext,
2196 tpSirTxPerTrackingParam pTxPerTrackingParam);
2197
2198#ifdef WLAN_FEATURE_GTK_OFFLOAD
2199/* ---------------------------------------------------------------------------
2200 \fn sme_SetGTKOffload
2201 \brief API to set GTK offload feature.
2202 \param hHal - The handle returned by macOpen.
2203 \param pRequest - Pointer to the GTK offload request.
2204 \return eHalStatus
2205 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002206eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002207
2208/* ---------------------------------------------------------------------------
2209 \fn sme_GetGTKOffload
2210 \brief API to get GTK offload information.
2211 \param hHal - The handle returned by macOpen.
2212 \param pRequest - Pointer to the GTK offload response.
2213 \return eHalStatus
2214 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002215eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2216 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002217#endif // WLAN_FEATURE_GTK_OFFLOAD
2218
2219#ifdef WLAN_WAKEUP_EVENTS
2220eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2221#endif // WLAN_WAKEUP_EVENTS
2222
2223/* ---------------------------------------------------------------------------
2224 \fn sme_SetTxPerTracking
2225 \brief Set Tx PER tracking configuration parameters
2226 \param hHal - The handle returned by macOpen.
2227 \param pTxPerTrackingParam - Tx PER configuration parameters
2228 \return eHalStatus
2229 ---------------------------------------------------------------------------*/
2230eHalStatus sme_SetTxPerTracking (
2231 tHalHandle hHal,
2232 void (*pCallbackfn) (void *pCallbackContext),
2233 void *pCallbackContext,
2234 tpSirTxPerTrackingParam pTxPerTrackingParam);
2235
2236
2237//return frequency for a particular channel
2238tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2239
2240tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2241
2242#if defined WLAN_FEATURE_P2P_INTERNAL
2243
2244eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2245
2246/* ---------------------------------------------------------------------------
2247 \fn sme_p2pFlushDeviceList
2248 \brief Remove cached P2P result from scan results
2249 \param hHal - The handle returned by macOpen.
2250 \param HDDSessionId - HDD's sessionId. Currently unused.
2251 \return eHalStatus
2252 ---------------------------------------------------------------------------*/
2253eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2254
2255eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2256 tCsrScanResultFilter *pFilter);
2257
2258#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2259
2260/* ---------------------------------------------------------------------------
2261 \fn sme_SetMaxTxPower
2262 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2263 setting will not persist over reboots
2264 \param hHal
2265 \param pBssid BSSID to set the power cap for
2266 \param pBssid pSelfMacAddress self MAC Address
2267 \param pBssid power to set in dB
2268 \- return eHalStatus
2269 -------------------------------------------------------------------------*/
2270eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2271 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2272
Jeff Johnson295189b2012-06-20 16:38:30 -07002273/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002274 \fn sme_SetMaxTxPowerPerBand
2275 \brief Used to set the Maximum Transmit Power for
2276 specific band dynamically. Note: this setting will not persist over reboots
2277 \param band
2278 \param power to set in dB
2279 \- return eHalStatus
2280 -------------------------------------------------------------------------*/
2281eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2282
2283/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002284
schang86c22c42013-03-13 18:41:24 -07002285 \fn sme_SetTxPower
2286
2287 \brief Set Transmit Power dynamically. Note: this setting will
2288 not persist over reboots.
2289
2290 \param hHal
2291 \param sessionId Target Session ID
2292 \param mW power to set in mW
2293 \- return eHalStatus
2294
2295 -------------------------------------------------------------------------------*/
2296eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2297
2298/* ---------------------------------------------------------------------------
2299
Jeff Johnson295189b2012-06-20 16:38:30 -07002300 \fn sme_HideSSID
2301
2302 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2303 not persist over reboots.
2304
2305 \param hHal
2306 \param sessionId
2307 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2308 \- return eHalStatus
2309
2310 -------------------------------------------------------------------------------*/
2311eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002312
2313/* ---------------------------------------------------------------------------
2314
2315 \fn sme_SetTmLevel
2316 \brief Set Thermal Mitigation Level to RIVA
2317 \param hHal - The handle returned by macOpen.
2318 \param newTMLevel - new Thermal Mitigation Level
2319 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002320 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002321 ---------------------------------------------------------------------------*/
2322eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2323
2324/*---------------------------------------------------------------------------
2325
2326 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2327 Host and FW.
2328
2329 \param hHal - HAL handle for device
2330
2331 \return NONE
2332
2333---------------------------------------------------------------------------*/
2334void sme_featureCapsExchange(tHalHandle hHal);
2335
Jeff Johnsond13512a2012-07-17 11:42:19 -07002336/*---------------------------------------------------------------------------
2337
Yathish9f22e662012-12-10 14:21:35 -08002338 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2339 between in Host.
2340
2341 \param hHal - HAL handle for device
2342
2343 \return NONE
2344
2345---------------------------------------------------------------------------*/
2346void sme_disableFeatureCapablity(tANI_U8 feature_index);
2347
2348/*---------------------------------------------------------------------------
2349
Jeff Johnsond13512a2012-07-17 11:42:19 -07002350 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2351 country code
2352 Host and FW.
2353
2354 \param hHal - HAL handle for device
2355 \param pCountry - pointer to country code
2356
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002357 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002358
2359 ---------------------------------------------------------------------------*/
2360eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2361
2362/*---------------------------------------------------------------------------
2363
2364 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2365 country code.
2366
2367 \param hHal - HAL handle for device
2368 \param pCountry - pointer to country code
2369
2370 \return Success or failure
2371
2372 ---------------------------------------------------------------------------*/
2373eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2374
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002375/* ---------------------------------------------------------------------------
2376 \fn sme_transportDebug
2377 \brief Dynamically monitoring Transport channels
2378 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002379 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002380 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002381 \param toggleStallDetect Enable stall detect feature
2382 This feature will take effect to data performance
2383 Not integrate till fully verification
2384 \- return NONE
2385 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002386void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002387
Kiran4a17ebe2013-01-31 10:43:43 -08002388/* ---------------------------------------------------------------------------
2389 \fn sme_ResetPowerValuesFor5G
2390 \brief Reset the power values for 5G band with NV power values.
2391 \param hHal - HAL handle for device
2392 \- return NONE
2393 -------------------------------------------------------------------------*/
2394void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2395
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002396#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
2397/* ---------------------------------------------------------------------------
2398 \fn sme_UpdateRoamPrefer5GHz
2399 \brief enable/disable Roam prefer 5G runtime option
2400 This function is called through dynamic setConfig callback function
2401 to configure the Roam prefer 5G runtime option
2402 \param hHal - HAL handle for device
2403 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2404 \- return Success or failure
2405 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002406eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002407
2408/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002409 \fn sme_setRoamIntraBand
2410 \brief enable/disable Intra band roaming
2411 This function is called through dynamic setConfig callback function
2412 to configure the intra band roaming
2413 \param hHal - HAL handle for device
2414 \param nRoamIntraBand Enable/Disable Intra band roaming
2415 \- return Success or failure
2416 -------------------------------------------------------------------------*/
2417eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2418
2419/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002420 \fn sme_UpdateRoamScanNProbes
2421 \brief function to update roam scan N probes
2422 This function is called through dynamic setConfig callback function
2423 to update roam scan N probes
2424 \param hHal - HAL handle for device
2425 \param nProbes number of probe requests to be sent out
2426 \- return Success or failure
2427 -------------------------------------------------------------------------*/
2428eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2429
2430/* ---------------------------------------------------------------------------
2431 \fn sme_UpdateRoamScanHomeAwayTime
2432 \brief function to update roam scan Home away time
2433 This function is called through dynamic setConfig callback function
2434 to update roam scan home away time
2435 \param hHal - HAL handle for device
2436 \param nRoamScanAwayTime Scan home away time
2437 \- return Success or failure
2438 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002439eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2440 const v_U16_t nRoamScanHomeAwayTime,
2441 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002442
2443/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002444 \fn sme_getRoamIntraBand
2445 \brief get Intra band roaming
2446 \param hHal - HAL handle for device
2447 \- return Success or failure
2448 -------------------------------------------------------------------------*/
2449v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2450
2451/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002452 \fn sme_getRoamScanNProbes
2453 \brief get N Probes
2454 \param hHal - HAL handle for device
2455 \- return Success or failure
2456 -------------------------------------------------------------------------*/
2457v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2458
2459/* ---------------------------------------------------------------------------
2460 \fn sme_getRoamScanHomeAwayTime
2461 \brief get Roam scan home away time
2462 \param hHal - HAL handle for device
2463 \- return Success or failure
2464 -------------------------------------------------------------------------*/
2465v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2466
2467/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002468 \fn sme_UpdateImmediateRoamRssiDiff
2469 \brief Update nImmediateRoamRssiDiff
2470 This function is called through dynamic setConfig callback function
2471 to configure nImmediateRoamRssiDiff
2472 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2473 \param hHal - HAL handle for device
2474 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2475 candidate and current AP.
2476 \- return Success or failure
2477 -------------------------------------------------------------------------*/
2478
2479eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002480
Srinivas Girigowdade697412013-02-14 16:31:48 -08002481/* ---------------------------------------------------------------------------
2482 \fn sme_UpdateRoamRssiDiff
2483 \brief Update RoamRssiDiff
2484 This function is called through dynamic setConfig callback function
2485 to configure RoamRssiDiff
2486 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2487 \param hHal - HAL handle for device
2488 \param RoamRssiDiff - minimum rssi difference between potential
2489 candidate and current AP.
2490 \- return Success or failure
2491 -------------------------------------------------------------------------*/
2492
2493eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2494
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002495/*--------------------------------------------------------------------------
2496 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2497 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2498 isFastTransitionEnabled.
2499 This is a synchronuous call
2500 \param hHal - The handle returned by macOpen.
2501 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2502 Other status means SME is failed to update isFastTransitionEnabled.
2503 \sa
2504 --------------------------------------------------------------------------*/
2505
2506eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2507 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002508
2509/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002510 \fn sme_UpdateWESMode
2511 \brief Update WESMode
2512 This function is called through dynamic setConfig callback function
2513 to configure isWESModeEnabled
2514 \param hHal - HAL handle for device
2515 \param isWESModeEnabled - Enable/Disable WES Mode
2516 \- return Success or failure
2517 -------------------------------------------------------------------------*/
2518eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2519
2520/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002521 \fn sme_SetRoamScanControl
2522 \brief Set roam scan control
2523 This function is called to set roam scan control
2524 if roam scan control is set to 0, roaming scan cache is cleared
2525 any value other than 0 is treated as invalid value
2526 \param hHal - HAL handle for device
2527 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2528 Other status means SME failure to update
2529 -------------------------------------------------------------------------*/
2530eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002531#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_CCX) || (FEATURE_WLAN_LFR) */
2532
2533#ifdef FEATURE_WLAN_LFR
2534/*--------------------------------------------------------------------------
2535 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002536 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002537 isFastRoamIniFeatureEnabled.
2538 This is a synchronuous call
2539 \param hHal - The handle returned by macOpen.
2540 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2541 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2542 \sa
2543 --------------------------------------------------------------------------*/
2544
Srinivas Girigowdade697412013-02-14 16:31:48 -08002545eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002546 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002547
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002548/*--------------------------------------------------------------------------
2549 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2550 Enable/disable LFR MAWC support at runtime
2551 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2552 isMAWCIniFeatureEnabled.
2553 This is a synchronous call
2554 \param hHal - The handle returned by macOpen.
2555 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2556 Other status means SME is failed to update MAWCEnabled.
2557 \sa
2558 --------------------------------------------------------------------------*/
2559eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2560 const v_BOOL_t MAWCEnabled);
2561
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002562
2563#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2564/*--------------------------------------------------------------------------
2565 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2566 This is a synchronuous call
2567 \param hHal - The handle returned by macOpen.
2568 \return eHAL_STATUS_SUCCESS
2569 Other status means SME is failed
2570 \sa
2571 --------------------------------------------------------------------------*/
2572
2573eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2574 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2575#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002576#endif /* FEATURE_WLAN_LFR */
2577
2578#ifdef FEATURE_WLAN_CCX
2579/*--------------------------------------------------------------------------
2580 \brief sme_UpdateIsCcxFeatureEnabled() - enable/disable CCX support at runtime
2581 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2582 isCcxIniFeatureEnabled.
2583 This is a synchronuous call
2584 \param hHal - The handle returned by macOpen.
2585 \return eHAL_STATUS_SUCCESS - SME update isCcxIniFeatureEnabled config successfully.
2586 Other status means SME is failed to update isCcxIniFeatureEnabled.
2587 \sa
2588 --------------------------------------------------------------------------*/
2589
2590eHalStatus sme_UpdateIsCcxFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002591 const v_BOOL_t isCcxIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002592
2593#endif /* FEATURE_WLAN_CCX */
2594
2595/*--------------------------------------------------------------------------
2596 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2597 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2598 fEnableFwRssiMonitoring.
2599 This is a synchronuous call
2600 \param hHal - The handle returned by macOpen.
2601 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2602 Other status means SME is failed to update
2603 \sa
2604 --------------------------------------------------------------------------*/
2605
2606eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2607 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002608
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002609#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002610/*--------------------------------------------------------------------------
2611 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2612 This is a synchronuous call
2613 \param hHal - The handle returned by macOpen.
2614 \return eHAL_STATUS_SUCCESS - SME update config successful.
2615 Other status means SME is failed to update
2616 \sa
2617 --------------------------------------------------------------------------*/
2618eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2619 v_U8_t neighborLookupRssiThreshold);
2620
2621/*--------------------------------------------------------------------------
2622 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2623 This is a synchronuous call
2624 \param hHal - The handle returned by macOpen.
2625 \return eHAL_STATUS_SUCCESS - SME update config successful.
2626 Other status means SME is failed to update
2627 \sa
2628 --------------------------------------------------------------------------*/
2629eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2630 v_U8_t neighborReassocRssiThreshold);
2631
2632/*--------------------------------------------------------------------------
2633 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2634 This is a synchronuous call
2635 \param hHal - The handle returned by macOpen.
2636 \return eHAL_STATUS_SUCCESS - SME update config successful.
2637 Other status means SME is failed to update
2638 \sa
2639 --------------------------------------------------------------------------*/
2640v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2641
2642/*--------------------------------------------------------------------------
2643 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2644 This is a synchronuous call
2645 \param hHal - The handle returned by macOpen.
2646 \return eHAL_STATUS_SUCCESS - SME update config successful.
2647 Other status means SME is failed to update
2648 \sa
2649 --------------------------------------------------------------------------*/
2650eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2651 v_U16_t neighborScanResultsRefreshPeriod);
2652
2653/*--------------------------------------------------------------------------
2654 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2655 This is a synchronuous call
2656 \param hHal - The handle returned by macOpen.
2657 \return eHAL_STATUS_SUCCESS - SME update config successful.
2658 Other status means SME is failed to update
2659 \sa
2660 --------------------------------------------------------------------------*/
2661v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2662
2663/*--------------------------------------------------------------------------
2664 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2665 This is a synchronuous call
2666 \param hHal - The handle returned by macOpen.
2667 \return eHAL_STATUS_SUCCESS - SME update config successful.
2668 Other status means SME is failed to update
2669 \sa
2670 --------------------------------------------------------------------------*/
2671v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2672
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002673/* ---------------------------------------------------------------------------
2674 \fn sme_UpdateEmptyScanRefreshPeriod
2675 \brief Update nEmptyScanRefreshPeriod
2676 This function is called through dynamic setConfig callback function
2677 to configure nEmptyScanRefreshPeriod
2678 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2679 \param hHal - HAL handle for device
2680 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2681 \- return Success or failure
2682 -------------------------------------------------------------------------*/
2683eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2684
2685/* ---------------------------------------------------------------------------
2686 \fn sme_setNeighborScanMinChanTime
2687 \brief Update nNeighborScanMinChanTime
2688 This function is called through dynamic setConfig callback function
2689 to configure gNeighborScanChannelMinTime
2690 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2691 \param hHal - HAL handle for device
2692 \param nNeighborScanMinChanTime - Channel minimum dwell time
2693 \- return Success or failure
2694 -------------------------------------------------------------------------*/
2695eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2696
2697/* ---------------------------------------------------------------------------
2698 \fn sme_setNeighborScanMaxChanTime
2699 \brief Update nNeighborScanMaxChanTime
2700 This function is called through dynamic setConfig callback function
2701 to configure gNeighborScanChannelMaxTime
2702 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2703 \param hHal - HAL handle for device
2704 \param nNeighborScanMinChanTime - Channel maximum dwell time
2705 \- return Success or failure
2706 -------------------------------------------------------------------------*/
2707eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2708
2709/* ---------------------------------------------------------------------------
2710 \fn sme_getNeighborScanMinChanTime
2711 \brief get neighbor scan min channel time
2712 \param hHal - The handle returned by macOpen.
2713 \return v_U16_t - channel min time value
2714 -------------------------------------------------------------------------*/
2715v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2716
2717/* ---------------------------------------------------------------------------
2718 \fn sme_getNeighborScanMaxChanTime
2719 \brief get neighbor scan max channel time
2720 \param hHal - The handle returned by macOpen.
2721 \return v_U16_t - channel max time value
2722 -------------------------------------------------------------------------*/
2723v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
2724
2725/* ---------------------------------------------------------------------------
2726 \fn sme_setNeighborScanPeriod
2727 \brief Update nNeighborScanPeriod
2728 This function is called through dynamic setConfig callback function
2729 to configure nNeighborScanPeriod
2730 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
2731 \param hHal - HAL handle for device
2732 \param nNeighborScanPeriod - neighbor scan period
2733 \- return Success or failure
2734 -------------------------------------------------------------------------*/
2735eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
2736
2737/* ---------------------------------------------------------------------------
2738 \fn sme_getNeighborScanPeriod
2739 \brief get neighbor scan period
2740 \param hHal - The handle returned by macOpen.
2741 \return v_U16_t - neighbor scan period
2742 -------------------------------------------------------------------------*/
2743v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
2744
2745#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08002746
2747#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
2748/*--------------------------------------------------------------------------
2749 \brief sme_getRoamRssiDiff() - get Roam rssi diff
2750 This is a synchronuous call
2751 \param hHal - The handle returned by macOpen.
2752 \return eHAL_STATUS_SUCCESS - SME update config successful.
2753 Other status means SME is failed to update
2754 \sa
2755 --------------------------------------------------------------------------*/
2756v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
2757
2758/*--------------------------------------------------------------------------
2759 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
2760 This is a synchronuous call
2761 \param hHal - The handle returned by macOpen.
2762 \return eHAL_STATUS_SUCCESS - SME update config successful.
2763 Other status means SME is failed to update
2764 \sa
2765 --------------------------------------------------------------------------*/
2766eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2767 tANI_U8 numChannels);
2768
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002769#ifdef FEATURE_WLAN_CCX_UPLOAD
2770/*--------------------------------------------------------------------------
2771 \brief sme_SetCcxRoamScanChannelList() - set ccx roam scan channel list
2772 This is a synchronuous call
2773 \param hHal - The handle returned by macOpen.
2774 \return eHAL_STATUS_SUCCESS - SME update config successful.
2775 Other status means SME is failed to update
2776 \sa
2777 --------------------------------------------------------------------------*/
2778eHalStatus sme_SetCcxRoamScanChannelList(tHalHandle hHal,
2779 tANI_U8 *pChannelList,
2780 tANI_U8 numChannels);
2781#endif
2782
Srinivas Girigowdade697412013-02-14 16:31:48 -08002783/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08002784 \brief sme_getRoamScanChannelList() - get roam scan channel list
2785 This is a synchronuous call
2786 \param hHal - The handle returned by macOpen.
2787 \return eHAL_STATUS_SUCCESS - SME update config successful.
2788 Other status means SME is failed to update
2789 \sa
2790 --------------------------------------------------------------------------*/
2791eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2792 tANI_U8 *pNumChannels);
2793
2794/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002795 \brief sme_getIsCcxFeatureEnabled() - get CCX feature enabled or not
2796 This is a synchronuous call
2797 \param hHal - The handle returned by macOpen.
2798 \return TRUE (1) - if the CCX feature is enabled
2799 FALSE (0) - if feature is disabled (compile or runtime)
2800 \sa
2801 --------------------------------------------------------------------------*/
2802tANI_BOOLEAN sme_getIsCcxFeatureEnabled(tHalHandle hHal);
2803
2804/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002805 \brief sme_getWESMode() - getWES Mode
2806 This is a synchronous call
2807 \param hHal - The handle returned by macOpen.
2808 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
2809 \sa
2810 --------------------------------------------------------------------------*/
2811v_BOOL_t sme_GetWESMode(tHalHandle hHal);
2812
2813/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002814 \brief sme_GetRoamScanControl() - get scan control
2815 This is a synchronous call
2816 \param hHal - The handle returned by macOpen.
2817 \return v_BOOL_t - Enabled(1)/Disabled(0)
2818 \sa
2819 --------------------------------------------------------------------------*/
2820v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
2821
2822/* ---------------------------------------------------------------------------
2823 \fn sme_UpdateEmptyScanRefreshPeriod
2824 \brief Update nnEmptyScanRefreshPeriod
2825 This function is called through dynamic setConfig callback function
2826 to configure nnEmptyScanRefreshPeriod
2827 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2828 \param hHal - HAL handle for device
2829 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2830 \- return Success or failure
2831 -------------------------------------------------------------------------*/
2832
2833/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002834 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
2835 This is a synchronuous call
2836 \param hHal - The handle returned by macOpen.
2837 \return TRUE (1) - if the feature is enabled
2838 FALSE (0) - if feature is disabled (compile or runtime)
2839 \sa
2840 --------------------------------------------------------------------------*/
2841tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
2842
2843/*--------------------------------------------------------------------------
2844 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
2845 This is a synchronuous call
2846 \param hHal - The handle returned by macOpen.
2847 \return TRUE (1) - if the feature is enabled
2848 FALSE (0) - if feature is disabled (compile or runtime)
2849 \sa
2850 --------------------------------------------------------------------------*/
2851tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
2852
Srinivas Girigowdade697412013-02-14 16:31:48 -08002853#endif
2854
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07002855#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2856/*--------------------------------------------------------------------------
2857 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
2858 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2859 gRoamScanOffloadEnabled.
2860 This is a synchronous call
2861 \param hHal - The handle returned by macOpen.
2862 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2863 Other status means SME is failed to update.
2864 \sa
2865 --------------------------------------------------------------------------*/
2866
2867eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
2868#endif
2869
2870
Srinivas Girigowdade697412013-02-14 16:31:48 -08002871/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002872 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05302873 \brief Check if a feature is enabled by FW
2874
2875 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002876 A value from enum placeHolderInCapBitmap
2877
2878 \- return 1/0 (TRUE/FALSE)
2879 -------------------------------------------------------------------------*/
2880tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05302881
2882/* ---------------------------------------------------------------------------
2883 \fn sme_IsFeatureSupportedByDriver
2884 \brief Check if a feature is enabled by driver
2885
2886 \param featEnumValue - Enumeration value of the feature to be checked.
2887 A value from enum placeHolderInCapBitmap
2888
2889 \- return 1/0 (TRUE/FALSE)
2890 -------------------------------------------------------------------------*/
2891tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
2892
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002893#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302894
2895/* ---------------------------------------------------------------------------
2896 \fn sme_SendTdlsLinkEstablishParams
2897 \brief API to send TDLS Link Establishment Parameters.
2898
2899 \param peerMac - peer's Mac Adress.
2900 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
2901 \- return VOS_STATUS_SUCCES
2902 -------------------------------------------------------------------------*/
2903
2904VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
2905 tANI_U8 sessionId,
2906 tSirMacAddr peerMac,
2907 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
2908
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002909/* ---------------------------------------------------------------------------
2910 \fn sme_SendTdlsMgmtFrame
2911 \brief API to send TDLS management frames.
2912
2913 \param peerMac - peer's Mac Adress.
2914 \param frame_type - Type of TDLS mgmt frame to be sent.
2915 \param dialog - dialog token used in the frame.
2916 \param status - status to be incuded in the frame.
2917 \param buf - additional IEs to be included
2918 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08002919 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002920 \- return VOS_STATUS_SUCCES
2921 -------------------------------------------------------------------------*/
2922VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Hoonki Leea34dd892013-02-05 22:56:02 -08002923 tANI_U8 frame_type, tANI_U8 dialog, tANI_U16 status, tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002924/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08002925 \fn sme_ChangeTdlsPeerSta
2926 \brief API to Update TDLS peer sta parameters.
2927
2928 \param peerMac - peer's Mac Adress.
2929 \param staParams - Peer Station Parameters.
2930 \- return VOS_STATUS_SUCCES
2931 -------------------------------------------------------------------------*/
2932VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
2933 tCsrStaParams *pstaParams);
2934/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002935 \fn sme_AddTdlsPeerSta
2936 \brief API to Add TDLS peer sta entry.
2937
2938 \param peerMac - peer's Mac Adress.
2939 \- return VOS_STATUS_SUCCES
2940 -------------------------------------------------------------------------*/
2941VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2942/* ---------------------------------------------------------------------------
2943 \fn sme_DeleteTdlsPeerSta
2944 \brief API to Delete TDLS peer sta entry.
2945
2946 \param peerMac - peer's Mac Adress.
2947 \- return VOS_STATUS_SUCCES
2948 -------------------------------------------------------------------------*/
2949VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07002950/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07002951 \fn sme_SetTdlsPowerSaveProhibited
2952 \API to set/reset the isTdlsPowerSaveProhibited.
2953
2954 \- return void
2955 -------------------------------------------------------------------------*/
2956void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002957#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05302958/* ---------------------------------------------------------------------------
2959 \fn sme_IsPmcBmps
2960 \brief API to Check if PMC state is BMPS.
2961
2962 \- return v_BOOL_t
2963 -------------------------------------------------------------------------*/
2964v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
2965
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002966#ifdef FEATURE_WLAN_TDLS_INTERNAL
2967typedef struct smeTdlsDisResult
2968{
2969 tSirMacAddr tdlsPeerMac;
2970 v_S7_t tdlsPeerRssi;
2971} tSmeTdlsDisResult;
2972
2973VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2974v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
2975 tSmeTdlsDisResult *disResult, v_U8_t listType);
2976VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2977VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002978#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07002979eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002980
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07002981/*
2982 * SME API to enable/disable WLAN driver initiated SSR
2983 */
2984void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
2985
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05302986/* ---------------------------------------------------------------------------
2987
2988 \fn sme_SetPhyMode
2989
2990 \brief Changes the PhyMode.
2991
2992 \param hHal - The handle returned by macOpen.
2993
2994 \param phyMode new phyMode which is to set
2995
2996 \return eHalStatus SUCCESS.
2997
2998 -------------------------------------------------------------------------------*/
2999eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3000
3001/* ---------------------------------------------------------------------------
3002
3003 \fn sme_GetPhyMode
3004
3005 \brief gets current PhyMode.
3006
3007 \param hHal - The handle returned by macOpen.
3008
3009 \return eHalStatus PhyMode
3010
3011 -------------------------------------------------------------------------------*/
3012eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3013
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003014/*
3015 * SME API to determine the channel bonding mode
3016 */
3017VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3018
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003019#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3020/*--------------------------------------------------------------------------
3021 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3022 from CSR.
3023 This is a synchronous call
3024 \param hHal - The handle returned by macOpen
3025 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3026 BSSID, channel etc.)
3027 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3028 Other status means SME is failed to send the request.
3029 \sa
3030 --------------------------------------------------------------------------*/
3031
3032eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3033#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003034/*--------------------------------------------------------------------------
3035 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3036 is any connected session .
3037 This is a synchronous call
3038 \param hHal - The handle returned by macOpen
3039 \return VOS_STATUS - SME passed the request to CSR successfully.
3040 Other status means SME is failed to send the request.
3041 \sa
3042 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003043VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003044
3045#ifdef FEATURE_WLAN_LPHB
3046/* ---------------------------------------------------------------------------
3047 \fn sme_LPHBConfigReq
3048 \API to make configuration LPHB within FW.
3049 \param hHal - The handle returned by macOpen
3050 \param lphdReq - LPHB request argument by client
3051 \param pCallbackfn - LPHB timeout notification callback function pointer
3052 \- return Configuration message posting status, SUCCESS or Fail
3053 -------------------------------------------------------------------------*/
3054eHalStatus sme_LPHBConfigReq(
3055 tHalHandle hHal,
3056 tSirLPHBReq *lphdReq,
3057 void (*pCallbackfn)(void *pAdapter, void *indParam));
3058#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003059
3060/* ---------------------------------------------------------------------------
3061 \fn sme_AddPeriodicTxPtrn
3062 \brief API to Periodic TX Pattern Offload feature
3063 \param hHal - The handle returned by macOpen
3064 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3065 \return eHalStatus
3066 ---------------------------------------------------------------------------*/
3067eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3068 *addPeriodicTxPtrnParams);
3069
3070/* ---------------------------------------------------------------------------
3071 \fn sme_DelPeriodicTxPtrn
3072 \brief API to Periodic TX Pattern Offload feature
3073 \param hHal - The handle returned by macOpen
3074 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3075 \return eHalStatus
3076 ---------------------------------------------------------------------------*/
3077eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3078 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003079/*--------------------------------------------------------------------------
3080 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3081 scan parameter.
3082 This is a synchronous call
3083 \param hHal - The handle returned by macOpen
3084 \return None.
3085 \sa
3086 --------------------------------------------------------------------------*/
3087void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3088 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303089
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003090/* ---------------------------------------------------------------------------
3091 \fn sme_SendRateUpdateInd
3092 \brief API to Update rate
3093 \param hHal - The handle returned by macOpen
3094 \param rateUpdateParams - Pointer to rate update params
3095 \return eHalStatus
3096 ---------------------------------------------------------------------------*/
3097eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3098
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303099/*
3100 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3101 * triggers
3102 * return status
3103*/
3104eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3105 tANI_U8 *bssid,
3106 tSmeFastRoamTrigger fastRoamTrig);
Leela Venkata Kiran Kumar Reddy Chiralaede10652013-09-11 18:48:46 -07003107eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pBSSId );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003108
3109void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303110
3111#ifdef FEATURE_WLAN_BATCH_SCAN
3112/* ---------------------------------------------------------------------------
3113 \fn sme_SetBatchScanReq
3114 \brief API to set batch scan request in FW
3115 \param hHal - The handle returned by macOpen.
3116 \param pRequest - Pointer to the batch request.
3117 \param sessionId - session ID
3118 \param callbackRoutine - HDD callback which needs to be invoked after
3119 getting set batch scan response from FW
3120 \param callbackContext - pAdapter context
3121 \return eHalStatus
3122 ---------------------------------------------------------------------------*/
3123eHalStatus
3124sme_SetBatchScanReq
3125(
3126 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3127 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3128 void *callbackContext
3129);
3130
3131/* ---------------------------------------------------------------------------
3132 \fn sme_TriggerBatchScanResultInd
3133 \brief API to trigger batch scan result indications from from FW
3134 \param hHal - The handle returned by macOpen.
3135 \param pRequest - Pointer to get batch request.
3136 \param sessionId - session ID
3137 \param callbackRoutine - HDD callback which needs to be invoked after
3138 getting get batch scan response from FW
3139 \param callbackContext - pAdapter context
3140 \return eHalStatus
3141 ---------------------------------------------------------------------------*/
3142eHalStatus
3143sme_TriggerBatchScanResultInd
3144(
3145 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3146 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3147 void *callbackContext
3148);
3149
3150/* ---------------------------------------------------------------------------
3151 \fn sme_StopBatchScanInd
3152 \brief API to stop batch scan request in FW
3153 \param hHal - The handle returned by macOpen.
3154 \param pRequest - Pointer to stop batch indication
3155 \return eHalStatus
3156 ---------------------------------------------------------------------------*/
3157eHalStatus
3158sme_StopBatchScanInd
3159(
3160 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3161);
3162
3163#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003164
3165#ifdef FEATURE_WLAN_CH_AVOID
3166/* ---------------------------------------------------------------------------
3167 \fn sme_AddChAvoidCallback
3168 \brief Used to plug in callback function
3169 Which notify channel may not be used with SAP or P2PGO mode.
3170 Notification come from FW.
3171 \param hHal
3172 \param pCallbackfn : callback function pointer should be plugged in
3173 \- return eHalStatus
3174 -------------------------------------------------------------------------*/
3175eHalStatus sme_AddChAvoidCallback
3176(
3177 tHalHandle hHal,
3178 void (*pCallbackfn)(void *pAdapter, void *indParam)
3179);
3180#endif /* FEATURE_WLAN_CH_AVOID */
Jeff Johnson295189b2012-06-20 16:38:30 -07003181#endif //#if !defined( __SME_API_H )