blob: 9feb77ace596de8ccfb0425aef0c5fd325d3b958 [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
1488 \return eHalStatus SUCCESS.
1489
1490 FAILURE or RESOURCES The API finished and failed.
1491
1492 -------------------------------------------------------------------------------*/
1493eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1494 tSmeChangeCountryCallback callback,
1495 tANI_U8 *pCountry,
1496 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301497 void* pVosContext,
1498 tAniBool countryFromUserSpace );
Jeff Johnson295189b2012-06-20 16:38:30 -07001499
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301500/* ---------------------------------------------------------------------------
1501
Amar Singhal0d15bd52013-10-12 23:13:13 -07001502 \fn sme_GenericChangeCountryCode
1503
1504 \brief Generic API to change country code
1505
1506 \param hHal - The handle returned by macOpen.
1507
1508 \param pCountry New Country Code String
1509
1510 \param reg_domain Regulatory domain for the new country code
1511
1512 \return eHalStatus SUCCESS.
1513
1514 FAILURE or RESOURCES The API finished and failed.
1515
1516 -------------------------------------------------------------------------------*/
1517eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1518 tANI_U8 *pCountry,
1519 v_REGDOMAIN_t reg_domain);
1520
1521/* ---------------------------------------------------------------------------
1522
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301523 \fn sme_DHCPStartInd
1524
1525 \brief Indicate FW about DHCP start event.
1526
1527 \param hHal - The handle returned by macOpen.
1528
1529 \param device_mode the mode of the device
1530
1531 \param macAddr the macAddress of the devices
1532
1533 \return eHalStatus SUCCESS.
1534
1535 FAILURE or RESOURCES The API finished and failed.
1536
1537 -------------------------------------------------------------------------------*/
1538
1539eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1540 tANI_U8 device_mode,
1541 tANI_U8 *macAddr );
1542
1543/* ---------------------------------------------------------------------------
1544
1545 \fn sme_DHCPStopInd
1546
1547 \brief Indicate FW about DHCP stop event.
1548
1549 \param hHal - The handle returned by macOpen.
1550
1551 \param device_mode the mode of the device
1552
1553 \param macAddr the macAddress of the devices
1554
1555 \return eHalStatus SUCCESS.
1556
1557 FAILURE or RESOURCES The API finished and failed.
1558
1559 -------------------------------------------------------------------------------*/
1560eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1561 tANI_U8 device_mode,
1562 tANI_U8 *macAddr );
1563
Jeff Johnson295189b2012-06-20 16:38:30 -07001564
1565/* ---------------------------------------------------------------------------
1566 \fn sme_BtcSignalBtEvent
1567 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1568 BT event type and the current operating mode of Libra (full power,
1569 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1570 would be employed.
1571 \param hHal - The handle returned by macOpen.
1572 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1573 Caller owns the memory and is responsible for freeing it.
1574 \return VOS_STATUS
1575 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1576 if driver has not yet been initialized or if BTC
1577 Events Layer has been disabled.
1578 VOS_STATUS_SUCCESS BT Event passed to HAL
1579 ---------------------------------------------------------------------------*/
1580VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1581
1582/* ---------------------------------------------------------------------------
1583 \fn sme_BtcSetConfig
1584 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1585 This function should be invoked only after CFG download has completed.
1586 Calling it after sme_HDDReadyInd is recommended.
1587 \param hHal - The handle returned by macOpen.
1588 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1589 tSmeBtcConfig. Caller owns the memory and is responsible
1590 for freeing it.
1591 \return VOS_STATUS
1592 VOS_STATUS_E_FAILURE Config not passed to HAL.
1593 VOS_STATUS_SUCCESS Config passed to HAL
1594 ---------------------------------------------------------------------------*/
1595VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1596
1597/* ---------------------------------------------------------------------------
1598 \fn sme_BtcGetConfig
1599 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1600 \param hHal - The handle returned by macOpen.
1601 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1602 Caller owns the memory and is responsible for freeing it.
1603 \return VOS_STATUS
1604 VOS_STATUS_E_FAILURE - failure
1605 VOS_STATUS_SUCCESS success
1606 ---------------------------------------------------------------------------*/
1607VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1608
1609/* ---------------------------------------------------------------------------
1610 \fn sme_SetCfgPrivacy
1611 \brief API to set configure privacy parameters
1612 \param hHal - The handle returned by macOpen.
1613 \param pProfile - Pointer CSR Roam profile.
1614 \param fPrivacy - This parameter indicates status of privacy
1615
1616 \return void
1617 ---------------------------------------------------------------------------*/
1618void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1619
1620#if defined WLAN_FEATURE_VOWIFI
1621/* ---------------------------------------------------------------------------
1622 \fn sme_NeighborReportRequest
1623 \brief API to request neighbor report.
1624 \param hHal - The handle returned by macOpen.
1625 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1626 tRrmNeighborReq. Caller owns the memory and is responsible
1627 for freeing it.
1628 \return VOS_STATUS
1629 VOS_STATUS_E_FAILURE - failure
1630 VOS_STATUS_SUCCESS success
1631 ---------------------------------------------------------------------------*/
1632VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1633 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1634#endif
1635
1636//The following are debug APIs to support direct read/write register/memory
1637//They are placed in SME because HW cannot be access when in LOW_POWER state
1638//AND not connected. The knowledge and synchronization is done in SME
1639
1640//sme_DbgReadRegister
1641//Caller needs to validate the input values
1642VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1643
1644//sme_DbgWriteRegister
1645//Caller needs to validate the input values
1646VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1647
1648//sme_DbgReadMemory
1649//Caller needs to validate the input values
1650//pBuf caller allocated buffer has the length of nLen
1651VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1652
1653//sme_DbgWriteMemory
1654//Caller needs to validate the input values
1655VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1656
Jeff Johnson295189b2012-06-20 16:38:30 -07001657VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1658 tSirVersionType *pVersion);
1659VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1660 tSirVersionType *pVersion);
1661VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1662 tANI_U8 *pVersion,
1663 tANI_U32 versionBufferSize);
1664VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1665 tANI_U8 *pVersion,
1666 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001667eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1668 csrRoamCompleteCallback callback,
1669 void *pContext);
1670
1671#ifdef FEATURE_WLAN_WAPI
1672/* ---------------------------------------------------------------------------
1673 \fn sme_RoamSetBKIDCache
1674 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1675 candidate list.
1676 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1677 it is opened (by calling halOpen).
1678 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1679 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1680 when retruning, this is the number of items put into pBKIDCache
1681 \return eHalStatus - when fail, it usually means the buffer allocated is not
1682 big enough and pNumItems has the number of tBkidCacheInfo.
1683 ---------------------------------------------------------------------------*/
1684eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1685 tANI_U32 numItems );
1686
1687/* ---------------------------------------------------------------------------
1688 \fn sme_RoamGetBKIDCache
1689 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1690 BKID cache.
1691 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1692 it is opened (by calling halOpen).
1693 \param pNum - caller allocated memory that has the space of the number of
1694 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1695 in SME cache.
1696 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1697 upon return
1698 \return eHalStatus - when fail, it usually means the buffer allocated is not
1699 big enough.
1700 ---------------------------------------------------------------------------*/
1701eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1702 tBkidCacheInfo *pBkidCache);
1703
1704/* ---------------------------------------------------------------------------
1705 \fn sme_RoamGetNumBKIDCache
1706 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1707 number of BKID cache entries.
1708 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1709 it is opened (by calling halOpen).
1710 \return tANI_U32 - the number of BKID cache entries.
1711 ---------------------------------------------------------------------------*/
1712tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1713
1714/* ---------------------------------------------------------------------------
1715 \fn sme_ScanGetBKIDCandidateList
1716 \brief a wrapper function to return the BKID candidate list
1717 \param pBkidList - caller allocated buffer point to an array of
1718 tBkidCandidateInfo
1719 \param pNumItems - pointer to a variable that has the number of
1720 tBkidCandidateInfo allocated when retruning, this is
1721 either the number needed or number of items put into
1722 pPmkidList
1723 \return eHalStatus - when fail, it usually means the buffer allocated is not
1724 big enough and pNumItems
1725 has the number of tBkidCandidateInfo.
1726 \Note: pNumItems is a number of tBkidCandidateInfo,
1727 not sizeof(tBkidCandidateInfo) * something
1728 ---------------------------------------------------------------------------*/
1729eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1730 tBkidCandidateInfo *pBkidList,
1731 tANI_U32 *pNumItems );
1732#endif /* FEATURE_WLAN_WAPI */
1733
Jeff Johnsone7245742012-09-05 17:12:55 -07001734#ifdef FEATURE_OEM_DATA_SUPPORT
1735/********************************************************************************************
1736 Oem data related modifications
1737*********************************************************************************************/
1738/* ---------------------------------------------------------------------------
1739 \fn sme_OemDataReq
1740 \param sessionId - session id of session to be used for oem data req.
1741 \param pOemDataReqID - pointer to an object to get back the request ID
1742 \param callback - a callback function that is called upon finish
1743 \param pContext - a pointer passed in for the callback
1744 \return eHalStatus
1745 ---------------------------------------------------------------------------*/
1746eHalStatus sme_OemDataReq(tHalHandle hHal,
1747 tANI_U8 sessionId,
1748 tOemDataReqConfig *,
1749 tANI_U32 *pOemDataReqID,
1750 oemData_OemDataReqCompleteCallback callback,
1751 void *pContext);
1752
1753/* ---------------------------------------------------------------------------
1754 \fn sme_getOemDataRsp
1755 \param pOemDataRsp - A pointer to the response object
1756 \param pOemDataReqID - pointer to an object to get back the request ID
1757 \return eHalStatus
1758 ---------------------------------------------------------------------------*/
1759eHalStatus sme_getOemDataRsp(tHalHandle hHal,
1760 tOemDataRsp **pOemDataRsp);
1761
1762#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07001763
1764
Jeff Johnson295189b2012-06-20 16:38:30 -07001765
1766/* ---------------------------------------------------------------------------
1767
1768 \fn sme_RoamUpdateAPWPSIE
1769
1770 \brief To update AP's WPS IE. This function should be called after SME AP session is created
1771 This is an asynchronous API.
1772
1773 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
1774
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001775 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07001776
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001777 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001778
1779 -------------------------------------------------------------------------------*/
1780
1781eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
1782/* ---------------------------------------------------------------------------
1783
1784 \fn sme_RoamUpdateAPWPARSNIEs
1785
1786 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
1787 This is an asynchronous API.
1788
1789 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
1790
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001791 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07001792
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001793 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001794
1795 -------------------------------------------------------------------------------*/
1796eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
1797
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001798/* ---------------------------------------------------------------------------
1799
1800 sme_ChangeMCCBeaconInterval
1801
1802 \brief To update P2P-GO's beacon Interval.
1803
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001804 \return eHalStatus SUCCESS
1805 FAILURE or RESOURCES
1806 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001807 -------------------------------------------------------------------------------*/
1808eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
1809
1810
Jeff Johnson295189b2012-06-20 16:38:30 -07001811
1812/* ---------------------------------------------------------------------------
1813 \fn sme_sendBTAmpEvent
1814 \brief API to send the btAMPstate to FW
1815 \param hHal - The handle returned by macOpen.
1816 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001817 \return eHalStatus SUCCESS
1818 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07001819
1820--------------------------------------------------------------------------- */
1821
1822eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
1823
1824
1825
1826/* ---------------------------------------------------------------------------
1827 \fn sme_SetHostOffload
1828 \brief API to set the host offload feature.
1829 \param hHal - The handle returned by macOpen.
1830 \param pRequest - Pointer to the offload request.
1831 \return eHalStatus
1832 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001833eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
1834 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001835
1836/* ---------------------------------------------------------------------------
1837 \fn sme_SetKeepAlive
1838 \brief API to set the Keep Alive feature.
1839 \param hHal - The handle returned by macOpen.
1840 \param pRequest - Pointer to the Keep Alive request.
1841 \return eHalStatus
1842 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07001843eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
1844 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07001845
Jeff Johnson295189b2012-06-20 16:38:30 -07001846/* ----------------------------------------------------------------------------
1847 \fn sme_GetOperationChannel
1848 \brief API to get current channel on which STA is parked
1849 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001850 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07001851 \returns eHAL_STATUS_SUCCESS
1852 eHAL_STATUS_FAILURE
1853-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001854eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001855
Jeff Johnson295189b2012-06-20 16:38:30 -07001856/* ---------------------------------------------------------------------------
1857
1858 \fn sme_RegisterMgtFrame
1859
1860 \brief To register managment frame of specified type and subtype.
1861 \param frameType - type of the frame that needs to be passed to HDD.
1862 \param matchData - data which needs to be matched before passing frame
1863 to HDD.
1864 \param matchDataLen - Length of matched data.
1865 \return eHalStatus
1866 -------------------------------------------------------------------------------*/
1867eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1868 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
1869
1870/* ---------------------------------------------------------------------------
1871
1872 \fn sme_DeregisterMgtFrame
1873
1874 \brief To De-register managment frame of specified type and subtype.
1875 \param frameType - type of the frame that needs to be passed to HDD.
1876 \param matchData - data which needs to be matched before passing frame
1877 to HDD.
1878 \param matchDataLen - Length of matched data.
1879 \return eHalStatus
1880 -------------------------------------------------------------------------------*/
1881eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
1882 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07001883
1884/* ---------------------------------------------------------------------------
1885
1886 \fn sme_ConfigureRxpFilter
1887
1888 \brief
1889 SME will pass this request to lower mac to set/reset the filter on RXP for
1890 multicast & broadcast traffic.
1891
1892 \param
1893
1894 hHal - The handle returned by macOpen.
1895
1896 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
1897 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
1898 on this param. In future we can use this as a mask to set various types of
1899 filters as suggested below:
1900 FILTER_ALL_MULTICAST:
1901 FILTER_ALL_BROADCAST:
1902 FILTER_ALL_MULTICAST_BROADCAST:
1903
1904
1905 \return eHalStatus
1906
1907
1908--------------------------------------------------------------------------- */
1909eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
1910 tpSirWlanSetRxpFilters wlanRxpFilterParam);
1911
1912/* ---------------------------------------------------------------------------
1913
1914 \fn sme_ConfigureAppsCpuWakeupState
1915
1916 \brief
1917 SME will pass this request to lower mac to dynamically adjusts the listen
1918 interval based on the WLAN/MSM activity. This feature is named as
1919 Telescopic Beacon wakeup feature.
1920
1921 \param
1922
1923 hHal - The handle returned by macOpen.
1924
1925 isAppsAwake- Depicts the state of the Apps CPU
1926
1927
1928 \return eHalStatus
1929
1930
1931--------------------------------------------------------------------------- */
1932eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
1933
Jeff Johnson295189b2012-06-20 16:38:30 -07001934/* ---------------------------------------------------------------------------
1935
1936 \fn sme_ConfigureSuspendInd
1937
1938 \brief
1939 SME will pass this request to lower mac to Indicate that the wlan needs to
1940 be suspended
1941
1942 \param
1943
1944 hHal - The handle returned by macOpen.
1945
1946 wlanSuspendParam- Depicts the wlan suspend params
1947
1948
1949 \return eHalStatus
1950
1951
1952--------------------------------------------------------------------------- */
1953eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
1954 tpSirWlanSuspendParam wlanSuspendParam);
1955
1956/* ---------------------------------------------------------------------------
1957
1958 \fn sme_ConfigureResumeReq
1959
1960 \brief
1961 SME will pass this request to lower mac to Indicate that the wlan needs to
1962 be Resumed
1963
1964 \param
1965
1966 hHal - The handle returned by macOpen.
1967
1968 wlanResumeParam- Depicts the wlan resume params
1969
1970
1971 \return eHalStatus
1972
1973
1974--------------------------------------------------------------------------- */
1975eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
1976 tpSirWlanResumeParam wlanResumeParam);
1977
Jeff Johnson295189b2012-06-20 16:38:30 -07001978
1979/* ---------------------------------------------------------------------------
1980
1981 \fn sme_GetInfraSessionId
1982
1983 \brief To get the session ID for infra session, if connected
1984 This is a synchronous API.
1985
1986 \param hHal - The handle returned by macOpen.
1987
1988 \return sessionid, -1 if infra session is not connected
1989
1990 -------------------------------------------------------------------------------*/
1991tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
1992
1993/* ---------------------------------------------------------------------------
1994
1995 \fn sme_GetInfraOperationChannel
1996
1997 \brief To get the operating channel for infra session, if connected
1998 This is a synchronous API.
1999
2000 \param hHal - The handle returned by macOpen.
2001 \param sessionId - the sessionId returned by sme_OpenSession.
2002
2003 \return operating channel, 0 if infra session is not connected
2004
2005 -------------------------------------------------------------------------------*/
2006tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2007/* ---------------------------------------------------------------------------
2008
2009 \fn sme_GetConcurrentOperationChannel
2010
2011 \brief To get the operating channel for other concurrent sessions, if connected
2012 This is a synchronous API.
2013
2014 \param hHal - The handle returned by macOpen.
2015 \param currentPersona - persona that is trying to come up.
2016
2017 \return operating channel, 0 if infra session is not connected
2018
2019 -------------------------------------------------------------------------------*/
2020tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2021
2022/* ---------------------------------------------------------------------------
2023 \fn sme_AbortMacScan
2024 \brief API to cancel MAC scan.
2025 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302026 \param sessionId - sessionId for interface
Jeff Johnson295189b2012-06-20 16:38:30 -07002027 \return VOS_STATUS
2028 VOS_STATUS_E_FAILURE - failure
2029 VOS_STATUS_SUCCESS success
2030 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302031eHalStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002032
2033/* ---------------------------------------------------------------------------
2034 \fn sme_GetCfgValidChannels
2035 \brief API to get valid channel list
2036 \param hHal - The handle returned by macOpen.
2037 \param aValidChannels - Pointer to the valid channel list
2038 \param len - valid channel list length
2039 \return eHalStatus
2040 ---------------------------------------------------------------------------*/
2041eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2042
2043#ifdef FEATURE_WLAN_SCAN_PNO
2044
2045/* ---------------------------------------------------------------------------
2046 \fn sme_SetPreferredNetworkList
2047 \brief API to set the Preferred Network List Offload feature.
2048 \param hHal - The handle returned by macOpen.
2049 \param pRequest - Pointer to the offload request.
2050 \return eHalStatus
2051 ---------------------------------------------------------------------------*/
2052eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2053
2054/* ---------------------------------------------------------------------------
2055 \fn sme_SetRSSIFilter
2056 \brief API to set RSSI Filter feature.
2057 \param hHal - The handle returned by macOpen.
2058 \param pRequest - Pointer to the offload request.
2059 \return eHalStatus
2060 ---------------------------------------------------------------------------*/
2061eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2062
2063/******************************************************************************
2064*
2065* Name: sme_PreferredNetworkFoundInd
2066*
2067* Description:
2068* Invoke Preferred Network Found Indication
2069*
2070* Parameters:
2071* hHal - HAL handle for device
2072* pMsg - found network description
2073*
2074* Returns: eHalStatus
2075*
2076******************************************************************************/
2077eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2078#endif // FEATURE_WLAN_SCAN_PNO
2079
2080/* ---------------------------------------------------------------------------
2081 \fn sme_SetPowerParams
2082 \brief API to set Power Parameters
2083 \param hHal - The handle returned by macOpen.
2084 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002085 \param forced - if true, not to be dropped silently in host, it must reach
2086 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2087 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002088 \return eHalStatus
2089 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002090eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002091
2092/* ---------------------------------------------------------------------------
2093 \fn sme_SetTxPerTracking
2094 \brief Set Tx PER tracking configuration parameters
2095 \param hHal - The handle returned by macOpen.
2096 \param pTxPerTrackingParam - Tx PER configuration parameters
2097 \return eHalStatus
2098 ---------------------------------------------------------------------------*/
2099eHalStatus sme_SetTxPerTracking (
2100 tHalHandle hHal,
2101 void (*pCallbackfn) (void *pCallbackContext),
2102 void *pCallbackContext,
2103 tpSirTxPerTrackingParam pTxPerTrackingParam);
2104
2105#ifdef WLAN_FEATURE_PACKET_FILTERING
2106/* ---------------------------------------------------------------------------
2107 \fn sme_ReceiveFilterSetFilter
2108 \brief API to set 8023 Multicast Address List
2109 \param hHal - The handle returned by macOpen.
2110 \param pMulticastAddrs - Pointer to the Multicast Address List
2111 \return eHalStatus
2112 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002113eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002114
2115/* ---------------------------------------------------------------------------
2116 \fn sme_ReceiveFilterSetFilter
2117 \brief API to set Receive Packet Filter
2118 \param hHal - The handle returned by macOpen.
2119 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2120 \return eHalStatus
2121 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002122eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2123 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002124
2125/* ---------------------------------------------------------------------------
2126 \fn sme_GetFilterMatchCount
2127 \brief API to get D0 PC Filter Match Count
2128 \param hHal - The handle returned by macOpen
2129 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2130 \param callbackContext - Cookie to be passed back during callback
2131 \return eHalStatus
2132 ---------------------------------------------------------------------------*/
2133eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2134 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002135 void *callbackContext,
2136 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002137
2138/* ---------------------------------------------------------------------------
2139 \fn sme_ReceiveFilterClearFilter
2140 \brief API to clear Receive Packet Filter
2141 \param hHal - The handle returned by macOpen.
2142 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2143 \return eHalStatus
2144 ---------------------------------------------------------------------------*/
2145eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002146 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2147 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002148#endif // WLAN_FEATURE_PACKET_FILTERING
2149/* ---------------------------------------------------------------------------
2150
2151 \fn sme_IsChannelValid
2152 \brief To check if the channel is valid for currently established domain
2153 This is a synchronous API.
2154
2155 \param hHal - The handle returned by macOpen.
2156 \param channel - channel to verify
2157
2158 \return TRUE/FALSE, TRUE if channel is valid
2159
2160 -------------------------------------------------------------------------------*/
2161tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2162
2163/* ---------------------------------------------------------------------------
2164 \fn sme_SetFreqBand
2165 \brief Used to set frequency band.
2166 \param hHal
2167 \eBand band value to be configured
2168 \- return eHalStatus
2169 -------------------------------------------------------------------------*/
2170eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2171
2172/* ---------------------------------------------------------------------------
2173 \fn sme_GetFreqBand
2174 \brief Used to get the current band settings.
2175 \param hHal
2176 \pBand pointer to hold the current band value
2177 \- return eHalStatus
2178 -------------------------------------------------------------------------*/
2179eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2180
2181/* ---------------------------------------------------------------------------
2182
2183 \fn sme_SetTxPerTracking
2184 \brief Set Tx PER tracking configuration parameters
2185 \param hHal - The handle returned by macOpen.
2186 \param pTxPerTrackingParam - Tx PER configuration parameters
2187 \return eHalStatus
2188 ---------------------------------------------------------------------------*/
2189eHalStatus sme_SetTxPerTracking (
2190 tHalHandle hHal,
2191 void (*pCallbackfn) (void *pCallbackContext),
2192 void *pCallbackContext,
2193 tpSirTxPerTrackingParam pTxPerTrackingParam);
2194
2195#ifdef WLAN_FEATURE_GTK_OFFLOAD
2196/* ---------------------------------------------------------------------------
2197 \fn sme_SetGTKOffload
2198 \brief API to set GTK offload feature.
2199 \param hHal - The handle returned by macOpen.
2200 \param pRequest - Pointer to the GTK offload request.
2201 \return eHalStatus
2202 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002203eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002204
2205/* ---------------------------------------------------------------------------
2206 \fn sme_GetGTKOffload
2207 \brief API to get GTK offload information.
2208 \param hHal - The handle returned by macOpen.
2209 \param pRequest - Pointer to the GTK offload response.
2210 \return eHalStatus
2211 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002212eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2213 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002214#endif // WLAN_FEATURE_GTK_OFFLOAD
2215
2216#ifdef WLAN_WAKEUP_EVENTS
2217eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2218#endif // WLAN_WAKEUP_EVENTS
2219
2220/* ---------------------------------------------------------------------------
2221 \fn sme_SetTxPerTracking
2222 \brief Set Tx PER tracking configuration parameters
2223 \param hHal - The handle returned by macOpen.
2224 \param pTxPerTrackingParam - Tx PER configuration parameters
2225 \return eHalStatus
2226 ---------------------------------------------------------------------------*/
2227eHalStatus sme_SetTxPerTracking (
2228 tHalHandle hHal,
2229 void (*pCallbackfn) (void *pCallbackContext),
2230 void *pCallbackContext,
2231 tpSirTxPerTrackingParam pTxPerTrackingParam);
2232
2233
2234//return frequency for a particular channel
2235tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2236
2237tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2238
2239#if defined WLAN_FEATURE_P2P_INTERNAL
2240
2241eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2242
2243/* ---------------------------------------------------------------------------
2244 \fn sme_p2pFlushDeviceList
2245 \brief Remove cached P2P result from scan results
2246 \param hHal - The handle returned by macOpen.
2247 \param HDDSessionId - HDD's sessionId. Currently unused.
2248 \return eHalStatus
2249 ---------------------------------------------------------------------------*/
2250eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2251
2252eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2253 tCsrScanResultFilter *pFilter);
2254
2255#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2256
2257/* ---------------------------------------------------------------------------
2258 \fn sme_SetMaxTxPower
2259 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2260 setting will not persist over reboots
2261 \param hHal
2262 \param pBssid BSSID to set the power cap for
2263 \param pBssid pSelfMacAddress self MAC Address
2264 \param pBssid power to set in dB
2265 \- return eHalStatus
2266 -------------------------------------------------------------------------*/
2267eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2268 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2269
Jeff Johnson295189b2012-06-20 16:38:30 -07002270/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002271 \fn sme_SetMaxTxPowerPerBand
2272 \brief Used to set the Maximum Transmit Power for
2273 specific band dynamically. Note: this setting will not persist over reboots
2274 \param band
2275 \param power to set in dB
2276 \- return eHalStatus
2277 -------------------------------------------------------------------------*/
2278eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2279
2280/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002281
schang86c22c42013-03-13 18:41:24 -07002282 \fn sme_SetTxPower
2283
2284 \brief Set Transmit Power dynamically. Note: this setting will
2285 not persist over reboots.
2286
2287 \param hHal
2288 \param sessionId Target Session ID
2289 \param mW power to set in mW
2290 \- return eHalStatus
2291
2292 -------------------------------------------------------------------------------*/
2293eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2294
2295/* ---------------------------------------------------------------------------
2296
Jeff Johnson295189b2012-06-20 16:38:30 -07002297 \fn sme_HideSSID
2298
2299 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2300 not persist over reboots.
2301
2302 \param hHal
2303 \param sessionId
2304 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2305 \- return eHalStatus
2306
2307 -------------------------------------------------------------------------------*/
2308eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002309
2310/* ---------------------------------------------------------------------------
2311
2312 \fn sme_SetTmLevel
2313 \brief Set Thermal Mitigation Level to RIVA
2314 \param hHal - The handle returned by macOpen.
2315 \param newTMLevel - new Thermal Mitigation Level
2316 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002317 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002318 ---------------------------------------------------------------------------*/
2319eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2320
2321/*---------------------------------------------------------------------------
2322
2323 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2324 Host and FW.
2325
2326 \param hHal - HAL handle for device
2327
2328 \return NONE
2329
2330---------------------------------------------------------------------------*/
2331void sme_featureCapsExchange(tHalHandle hHal);
2332
Jeff Johnsond13512a2012-07-17 11:42:19 -07002333/*---------------------------------------------------------------------------
2334
Yathish9f22e662012-12-10 14:21:35 -08002335 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2336 between in Host.
2337
2338 \param hHal - HAL handle for device
2339
2340 \return NONE
2341
2342---------------------------------------------------------------------------*/
2343void sme_disableFeatureCapablity(tANI_U8 feature_index);
2344
2345/*---------------------------------------------------------------------------
2346
Jeff Johnsond13512a2012-07-17 11:42:19 -07002347 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2348 country code
2349 Host and FW.
2350
2351 \param hHal - HAL handle for device
2352 \param pCountry - pointer to country code
2353
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002354 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002355
2356 ---------------------------------------------------------------------------*/
2357eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2358
2359/*---------------------------------------------------------------------------
2360
2361 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2362 country code.
2363
2364 \param hHal - HAL handle for device
2365 \param pCountry - pointer to country code
2366
2367 \return Success or failure
2368
2369 ---------------------------------------------------------------------------*/
2370eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2371
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002372/* ---------------------------------------------------------------------------
2373 \fn sme_transportDebug
2374 \brief Dynamically monitoring Transport channels
2375 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002376 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002377 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002378 \param toggleStallDetect Enable stall detect feature
2379 This feature will take effect to data performance
2380 Not integrate till fully verification
2381 \- return NONE
2382 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002383void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002384
Kiran4a17ebe2013-01-31 10:43:43 -08002385/* ---------------------------------------------------------------------------
2386 \fn sme_ResetPowerValuesFor5G
2387 \brief Reset the power values for 5G band with NV power values.
2388 \param hHal - HAL handle for device
2389 \- return NONE
2390 -------------------------------------------------------------------------*/
2391void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2392
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002393#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
2394/* ---------------------------------------------------------------------------
2395 \fn sme_UpdateRoamPrefer5GHz
2396 \brief enable/disable Roam prefer 5G runtime option
2397 This function is called through dynamic setConfig callback function
2398 to configure the Roam prefer 5G runtime option
2399 \param hHal - HAL handle for device
2400 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2401 \- return Success or failure
2402 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002403eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002404
2405/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002406 \fn sme_setRoamIntraBand
2407 \brief enable/disable Intra band roaming
2408 This function is called through dynamic setConfig callback function
2409 to configure the intra band roaming
2410 \param hHal - HAL handle for device
2411 \param nRoamIntraBand Enable/Disable Intra band roaming
2412 \- return Success or failure
2413 -------------------------------------------------------------------------*/
2414eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2415
2416/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002417 \fn sme_UpdateRoamScanNProbes
2418 \brief function to update roam scan N probes
2419 This function is called through dynamic setConfig callback function
2420 to update roam scan N probes
2421 \param hHal - HAL handle for device
2422 \param nProbes number of probe requests to be sent out
2423 \- return Success or failure
2424 -------------------------------------------------------------------------*/
2425eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2426
2427/* ---------------------------------------------------------------------------
2428 \fn sme_UpdateRoamScanHomeAwayTime
2429 \brief function to update roam scan Home away time
2430 This function is called through dynamic setConfig callback function
2431 to update roam scan home away time
2432 \param hHal - HAL handle for device
2433 \param nRoamScanAwayTime Scan home away time
2434 \- return Success or failure
2435 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002436eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2437 const v_U16_t nRoamScanHomeAwayTime,
2438 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002439
2440/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002441 \fn sme_getRoamIntraBand
2442 \brief get Intra band roaming
2443 \param hHal - HAL handle for device
2444 \- return Success or failure
2445 -------------------------------------------------------------------------*/
2446v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2447
2448/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002449 \fn sme_getRoamScanNProbes
2450 \brief get N Probes
2451 \param hHal - HAL handle for device
2452 \- return Success or failure
2453 -------------------------------------------------------------------------*/
2454v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2455
2456/* ---------------------------------------------------------------------------
2457 \fn sme_getRoamScanHomeAwayTime
2458 \brief get Roam scan home away time
2459 \param hHal - HAL handle for device
2460 \- return Success or failure
2461 -------------------------------------------------------------------------*/
2462v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2463
2464/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002465 \fn sme_UpdateImmediateRoamRssiDiff
2466 \brief Update nImmediateRoamRssiDiff
2467 This function is called through dynamic setConfig callback function
2468 to configure nImmediateRoamRssiDiff
2469 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2470 \param hHal - HAL handle for device
2471 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2472 candidate and current AP.
2473 \- return Success or failure
2474 -------------------------------------------------------------------------*/
2475
2476eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002477
Srinivas Girigowdade697412013-02-14 16:31:48 -08002478/* ---------------------------------------------------------------------------
2479 \fn sme_UpdateRoamRssiDiff
2480 \brief Update RoamRssiDiff
2481 This function is called through dynamic setConfig callback function
2482 to configure RoamRssiDiff
2483 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2484 \param hHal - HAL handle for device
2485 \param RoamRssiDiff - minimum rssi difference between potential
2486 candidate and current AP.
2487 \- return Success or failure
2488 -------------------------------------------------------------------------*/
2489
2490eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2491
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002492/*--------------------------------------------------------------------------
2493 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2494 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2495 isFastTransitionEnabled.
2496 This is a synchronuous call
2497 \param hHal - The handle returned by macOpen.
2498 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2499 Other status means SME is failed to update isFastTransitionEnabled.
2500 \sa
2501 --------------------------------------------------------------------------*/
2502
2503eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2504 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002505
2506/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002507 \fn sme_UpdateWESMode
2508 \brief Update WESMode
2509 This function is called through dynamic setConfig callback function
2510 to configure isWESModeEnabled
2511 \param hHal - HAL handle for device
2512 \param isWESModeEnabled - Enable/Disable WES Mode
2513 \- return Success or failure
2514 -------------------------------------------------------------------------*/
2515eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2516
2517/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002518 \fn sme_SetRoamScanControl
2519 \brief Set roam scan control
2520 This function is called to set roam scan control
2521 if roam scan control is set to 0, roaming scan cache is cleared
2522 any value other than 0 is treated as invalid value
2523 \param hHal - HAL handle for device
2524 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2525 Other status means SME failure to update
2526 -------------------------------------------------------------------------*/
2527eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002528#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_CCX) || (FEATURE_WLAN_LFR) */
2529
2530#ifdef FEATURE_WLAN_LFR
2531/*--------------------------------------------------------------------------
2532 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002533 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002534 isFastRoamIniFeatureEnabled.
2535 This is a synchronuous call
2536 \param hHal - The handle returned by macOpen.
2537 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2538 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2539 \sa
2540 --------------------------------------------------------------------------*/
2541
Srinivas Girigowdade697412013-02-14 16:31:48 -08002542eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002543 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002544
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002545/*--------------------------------------------------------------------------
2546 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2547 Enable/disable LFR MAWC support at runtime
2548 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2549 isMAWCIniFeatureEnabled.
2550 This is a synchronous call
2551 \param hHal - The handle returned by macOpen.
2552 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2553 Other status means SME is failed to update MAWCEnabled.
2554 \sa
2555 --------------------------------------------------------------------------*/
2556eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2557 const v_BOOL_t MAWCEnabled);
2558
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002559
2560#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2561/*--------------------------------------------------------------------------
2562 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2563 This is a synchronuous call
2564 \param hHal - The handle returned by macOpen.
2565 \return eHAL_STATUS_SUCCESS
2566 Other status means SME is failed
2567 \sa
2568 --------------------------------------------------------------------------*/
2569
2570eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2571 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2572#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002573#endif /* FEATURE_WLAN_LFR */
2574
2575#ifdef FEATURE_WLAN_CCX
2576/*--------------------------------------------------------------------------
2577 \brief sme_UpdateIsCcxFeatureEnabled() - enable/disable CCX support at runtime
2578 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2579 isCcxIniFeatureEnabled.
2580 This is a synchronuous call
2581 \param hHal - The handle returned by macOpen.
2582 \return eHAL_STATUS_SUCCESS - SME update isCcxIniFeatureEnabled config successfully.
2583 Other status means SME is failed to update isCcxIniFeatureEnabled.
2584 \sa
2585 --------------------------------------------------------------------------*/
2586
2587eHalStatus sme_UpdateIsCcxFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002588 const v_BOOL_t isCcxIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002589
2590#endif /* FEATURE_WLAN_CCX */
2591
2592/*--------------------------------------------------------------------------
2593 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2594 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2595 fEnableFwRssiMonitoring.
2596 This is a synchronuous call
2597 \param hHal - The handle returned by macOpen.
2598 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2599 Other status means SME is failed to update
2600 \sa
2601 --------------------------------------------------------------------------*/
2602
2603eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2604 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002605
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002606#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002607/*--------------------------------------------------------------------------
2608 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2609 This is a synchronuous call
2610 \param hHal - The handle returned by macOpen.
2611 \return eHAL_STATUS_SUCCESS - SME update config successful.
2612 Other status means SME is failed to update
2613 \sa
2614 --------------------------------------------------------------------------*/
2615eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2616 v_U8_t neighborLookupRssiThreshold);
2617
2618/*--------------------------------------------------------------------------
2619 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2620 This is a synchronuous call
2621 \param hHal - The handle returned by macOpen.
2622 \return eHAL_STATUS_SUCCESS - SME update config successful.
2623 Other status means SME is failed to update
2624 \sa
2625 --------------------------------------------------------------------------*/
2626eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2627 v_U8_t neighborReassocRssiThreshold);
2628
2629/*--------------------------------------------------------------------------
2630 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2631 This is a synchronuous call
2632 \param hHal - The handle returned by macOpen.
2633 \return eHAL_STATUS_SUCCESS - SME update config successful.
2634 Other status means SME is failed to update
2635 \sa
2636 --------------------------------------------------------------------------*/
2637v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2638
2639/*--------------------------------------------------------------------------
2640 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2641 This is a synchronuous call
2642 \param hHal - The handle returned by macOpen.
2643 \return eHAL_STATUS_SUCCESS - SME update config successful.
2644 Other status means SME is failed to update
2645 \sa
2646 --------------------------------------------------------------------------*/
2647eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2648 v_U16_t neighborScanResultsRefreshPeriod);
2649
2650/*--------------------------------------------------------------------------
2651 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2652 This is a synchronuous call
2653 \param hHal - The handle returned by macOpen.
2654 \return eHAL_STATUS_SUCCESS - SME update config successful.
2655 Other status means SME is failed to update
2656 \sa
2657 --------------------------------------------------------------------------*/
2658v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2659
2660/*--------------------------------------------------------------------------
2661 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2662 This is a synchronuous call
2663 \param hHal - The handle returned by macOpen.
2664 \return eHAL_STATUS_SUCCESS - SME update config successful.
2665 Other status means SME is failed to update
2666 \sa
2667 --------------------------------------------------------------------------*/
2668v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2669
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002670/* ---------------------------------------------------------------------------
2671 \fn sme_UpdateEmptyScanRefreshPeriod
2672 \brief Update nEmptyScanRefreshPeriod
2673 This function is called through dynamic setConfig callback function
2674 to configure nEmptyScanRefreshPeriod
2675 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2676 \param hHal - HAL handle for device
2677 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2678 \- return Success or failure
2679 -------------------------------------------------------------------------*/
2680eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2681
2682/* ---------------------------------------------------------------------------
2683 \fn sme_setNeighborScanMinChanTime
2684 \brief Update nNeighborScanMinChanTime
2685 This function is called through dynamic setConfig callback function
2686 to configure gNeighborScanChannelMinTime
2687 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2688 \param hHal - HAL handle for device
2689 \param nNeighborScanMinChanTime - Channel minimum dwell time
2690 \- return Success or failure
2691 -------------------------------------------------------------------------*/
2692eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2693
2694/* ---------------------------------------------------------------------------
2695 \fn sme_setNeighborScanMaxChanTime
2696 \brief Update nNeighborScanMaxChanTime
2697 This function is called through dynamic setConfig callback function
2698 to configure gNeighborScanChannelMaxTime
2699 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2700 \param hHal - HAL handle for device
2701 \param nNeighborScanMinChanTime - Channel maximum dwell time
2702 \- return Success or failure
2703 -------------------------------------------------------------------------*/
2704eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2705
2706/* ---------------------------------------------------------------------------
2707 \fn sme_getNeighborScanMinChanTime
2708 \brief get neighbor scan min channel time
2709 \param hHal - The handle returned by macOpen.
2710 \return v_U16_t - channel min time value
2711 -------------------------------------------------------------------------*/
2712v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2713
2714/* ---------------------------------------------------------------------------
2715 \fn sme_getNeighborScanMaxChanTime
2716 \brief get neighbor scan max channel time
2717 \param hHal - The handle returned by macOpen.
2718 \return v_U16_t - channel max time value
2719 -------------------------------------------------------------------------*/
2720v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
2721
2722/* ---------------------------------------------------------------------------
2723 \fn sme_setNeighborScanPeriod
2724 \brief Update nNeighborScanPeriod
2725 This function is called through dynamic setConfig callback function
2726 to configure nNeighborScanPeriod
2727 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
2728 \param hHal - HAL handle for device
2729 \param nNeighborScanPeriod - neighbor scan period
2730 \- return Success or failure
2731 -------------------------------------------------------------------------*/
2732eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
2733
2734/* ---------------------------------------------------------------------------
2735 \fn sme_getNeighborScanPeriod
2736 \brief get neighbor scan period
2737 \param hHal - The handle returned by macOpen.
2738 \return v_U16_t - neighbor scan period
2739 -------------------------------------------------------------------------*/
2740v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
2741
2742#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08002743
2744#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
2745/*--------------------------------------------------------------------------
2746 \brief sme_getRoamRssiDiff() - get Roam rssi diff
2747 This is a synchronuous call
2748 \param hHal - The handle returned by macOpen.
2749 \return eHAL_STATUS_SUCCESS - SME update config successful.
2750 Other status means SME is failed to update
2751 \sa
2752 --------------------------------------------------------------------------*/
2753v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
2754
2755/*--------------------------------------------------------------------------
2756 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
2757 This is a synchronuous call
2758 \param hHal - The handle returned by macOpen.
2759 \return eHAL_STATUS_SUCCESS - SME update config successful.
2760 Other status means SME is failed to update
2761 \sa
2762 --------------------------------------------------------------------------*/
2763eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2764 tANI_U8 numChannels);
2765
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07002766#ifdef FEATURE_WLAN_CCX_UPLOAD
2767/*--------------------------------------------------------------------------
2768 \brief sme_SetCcxRoamScanChannelList() - set ccx roam scan channel list
2769 This is a synchronuous call
2770 \param hHal - The handle returned by macOpen.
2771 \return eHAL_STATUS_SUCCESS - SME update config successful.
2772 Other status means SME is failed to update
2773 \sa
2774 --------------------------------------------------------------------------*/
2775eHalStatus sme_SetCcxRoamScanChannelList(tHalHandle hHal,
2776 tANI_U8 *pChannelList,
2777 tANI_U8 numChannels);
2778#endif
2779
Srinivas Girigowdade697412013-02-14 16:31:48 -08002780/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08002781 \brief csrUpdateBgScanConfigIniChannelList() - Update bgscan roam cache
2782 This is a synchronuous call
2783 \param hHal - The handle returned by macOpen.
2784 \return eHAL_STATUS_SUCCESS - SME update config successful.
2785 Other status means SME is failed to update
2786 \sa
2787 --------------------------------------------------------------------------*/
2788eHalStatus sme_UpdateBgScanConfigIniChannelList(tHalHandle hHal,
2789 eCsrBand eBand);
2790
2791
2792/*--------------------------------------------------------------------------
2793 \brief sme_getRoamScanChannelList() - get roam scan channel list
2794 This is a synchronuous call
2795 \param hHal - The handle returned by macOpen.
2796 \return eHAL_STATUS_SUCCESS - SME update config successful.
2797 Other status means SME is failed to update
2798 \sa
2799 --------------------------------------------------------------------------*/
2800eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2801 tANI_U8 *pNumChannels);
2802
2803/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002804 \brief sme_getIsCcxFeatureEnabled() - get CCX feature enabled or not
2805 This is a synchronuous call
2806 \param hHal - The handle returned by macOpen.
2807 \return TRUE (1) - if the CCX feature is enabled
2808 FALSE (0) - if feature is disabled (compile or runtime)
2809 \sa
2810 --------------------------------------------------------------------------*/
2811tANI_BOOLEAN sme_getIsCcxFeatureEnabled(tHalHandle hHal);
2812
2813/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002814 \brief sme_getWESMode() - getWES Mode
2815 This is a synchronous call
2816 \param hHal - The handle returned by macOpen.
2817 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
2818 \sa
2819 --------------------------------------------------------------------------*/
2820v_BOOL_t sme_GetWESMode(tHalHandle hHal);
2821
2822/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002823 \brief sme_GetRoamScanControl() - get scan control
2824 This is a synchronous call
2825 \param hHal - The handle returned by macOpen.
2826 \return v_BOOL_t - Enabled(1)/Disabled(0)
2827 \sa
2828 --------------------------------------------------------------------------*/
2829v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
2830
2831/* ---------------------------------------------------------------------------
2832 \fn sme_UpdateEmptyScanRefreshPeriod
2833 \brief Update nnEmptyScanRefreshPeriod
2834 This function is called through dynamic setConfig callback function
2835 to configure nnEmptyScanRefreshPeriod
2836 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2837 \param hHal - HAL handle for device
2838 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2839 \- return Success or failure
2840 -------------------------------------------------------------------------*/
2841
2842/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002843 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
2844 This is a synchronuous call
2845 \param hHal - The handle returned by macOpen.
2846 \return TRUE (1) - if the feature is enabled
2847 FALSE (0) - if feature is disabled (compile or runtime)
2848 \sa
2849 --------------------------------------------------------------------------*/
2850tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
2851
2852/*--------------------------------------------------------------------------
2853 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
2854 This is a synchronuous call
2855 \param hHal - The handle returned by macOpen.
2856 \return TRUE (1) - if the feature is enabled
2857 FALSE (0) - if feature is disabled (compile or runtime)
2858 \sa
2859 --------------------------------------------------------------------------*/
2860tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
2861
Srinivas Girigowdade697412013-02-14 16:31:48 -08002862#endif
2863
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07002864#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2865/*--------------------------------------------------------------------------
2866 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
2867 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2868 gRoamScanOffloadEnabled.
2869 This is a synchronous call
2870 \param hHal - The handle returned by macOpen.
2871 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2872 Other status means SME is failed to update.
2873 \sa
2874 --------------------------------------------------------------------------*/
2875
2876eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
2877#endif
2878
2879
Srinivas Girigowdade697412013-02-14 16:31:48 -08002880/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002881 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05302882 \brief Check if a feature is enabled by FW
2883
2884 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002885 A value from enum placeHolderInCapBitmap
2886
2887 \- return 1/0 (TRUE/FALSE)
2888 -------------------------------------------------------------------------*/
2889tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05302890
2891/* ---------------------------------------------------------------------------
2892 \fn sme_IsFeatureSupportedByDriver
2893 \brief Check if a feature is enabled by driver
2894
2895 \param featEnumValue - Enumeration value of the feature to be checked.
2896 A value from enum placeHolderInCapBitmap
2897
2898 \- return 1/0 (TRUE/FALSE)
2899 -------------------------------------------------------------------------*/
2900tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
2901
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002902#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05302903
2904/* ---------------------------------------------------------------------------
2905 \fn sme_SendTdlsLinkEstablishParams
2906 \brief API to send TDLS Link Establishment Parameters.
2907
2908 \param peerMac - peer's Mac Adress.
2909 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
2910 \- return VOS_STATUS_SUCCES
2911 -------------------------------------------------------------------------*/
2912
2913VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
2914 tANI_U8 sessionId,
2915 tSirMacAddr peerMac,
2916 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
2917
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002918/* ---------------------------------------------------------------------------
2919 \fn sme_SendTdlsMgmtFrame
2920 \brief API to send TDLS management frames.
2921
2922 \param peerMac - peer's Mac Adress.
2923 \param frame_type - Type of TDLS mgmt frame to be sent.
2924 \param dialog - dialog token used in the frame.
2925 \param status - status to be incuded in the frame.
2926 \param buf - additional IEs to be included
2927 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08002928 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002929 \- return VOS_STATUS_SUCCES
2930 -------------------------------------------------------------------------*/
2931VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Hoonki Leea34dd892013-02-05 22:56:02 -08002932 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 -08002933/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08002934 \fn sme_ChangeTdlsPeerSta
2935 \brief API to Update TDLS peer sta parameters.
2936
2937 \param peerMac - peer's Mac Adress.
2938 \param staParams - Peer Station Parameters.
2939 \- return VOS_STATUS_SUCCES
2940 -------------------------------------------------------------------------*/
2941VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
2942 tCsrStaParams *pstaParams);
2943/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002944 \fn sme_AddTdlsPeerSta
2945 \brief API to Add TDLS peer sta entry.
2946
2947 \param peerMac - peer's Mac Adress.
2948 \- return VOS_STATUS_SUCCES
2949 -------------------------------------------------------------------------*/
2950VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2951/* ---------------------------------------------------------------------------
2952 \fn sme_DeleteTdlsPeerSta
2953 \brief API to Delete TDLS peer sta entry.
2954
2955 \param peerMac - peer's Mac Adress.
2956 \- return VOS_STATUS_SUCCES
2957 -------------------------------------------------------------------------*/
2958VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07002959/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07002960 \fn sme_SetTdlsPowerSaveProhibited
2961 \API to set/reset the isTdlsPowerSaveProhibited.
2962
2963 \- return void
2964 -------------------------------------------------------------------------*/
2965void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002966#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05302967/* ---------------------------------------------------------------------------
2968 \fn sme_IsPmcBmps
2969 \brief API to Check if PMC state is BMPS.
2970
2971 \- return v_BOOL_t
2972 -------------------------------------------------------------------------*/
2973v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
2974
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002975#ifdef FEATURE_WLAN_TDLS_INTERNAL
2976typedef struct smeTdlsDisResult
2977{
2978 tSirMacAddr tdlsPeerMac;
2979 v_S7_t tdlsPeerRssi;
2980} tSmeTdlsDisResult;
2981
2982VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2983v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
2984 tSmeTdlsDisResult *disResult, v_U8_t listType);
2985VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
2986VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002987#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07002988eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002989
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07002990/*
2991 * SME API to enable/disable WLAN driver initiated SSR
2992 */
2993void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
2994
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05302995/* ---------------------------------------------------------------------------
2996
2997 \fn sme_SetPhyMode
2998
2999 \brief Changes the PhyMode.
3000
3001 \param hHal - The handle returned by macOpen.
3002
3003 \param phyMode new phyMode which is to set
3004
3005 \return eHalStatus SUCCESS.
3006
3007 -------------------------------------------------------------------------------*/
3008eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3009
3010/* ---------------------------------------------------------------------------
3011
3012 \fn sme_GetPhyMode
3013
3014 \brief gets current PhyMode.
3015
3016 \param hHal - The handle returned by macOpen.
3017
3018 \return eHalStatus PhyMode
3019
3020 -------------------------------------------------------------------------------*/
3021eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3022
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003023/*
3024 * SME API to determine the channel bonding mode
3025 */
3026VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3027
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003028#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3029/*--------------------------------------------------------------------------
3030 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3031 from CSR.
3032 This is a synchronous call
3033 \param hHal - The handle returned by macOpen
3034 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3035 BSSID, channel etc.)
3036 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3037 Other status means SME is failed to send the request.
3038 \sa
3039 --------------------------------------------------------------------------*/
3040
3041eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3042#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003043/*--------------------------------------------------------------------------
3044 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3045 is any connected session .
3046 This is a synchronous call
3047 \param hHal - The handle returned by macOpen
3048 \return VOS_STATUS - SME passed the request to CSR successfully.
3049 Other status means SME is failed to send the request.
3050 \sa
3051 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003052VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003053
3054#ifdef FEATURE_WLAN_LPHB
3055/* ---------------------------------------------------------------------------
3056 \fn sme_LPHBConfigReq
3057 \API to make configuration LPHB within FW.
3058 \param hHal - The handle returned by macOpen
3059 \param lphdReq - LPHB request argument by client
3060 \param pCallbackfn - LPHB timeout notification callback function pointer
3061 \- return Configuration message posting status, SUCCESS or Fail
3062 -------------------------------------------------------------------------*/
3063eHalStatus sme_LPHBConfigReq(
3064 tHalHandle hHal,
3065 tSirLPHBReq *lphdReq,
3066 void (*pCallbackfn)(void *pAdapter, void *indParam));
3067#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003068
3069/* ---------------------------------------------------------------------------
3070 \fn sme_AddPeriodicTxPtrn
3071 \brief API to Periodic TX Pattern Offload feature
3072 \param hHal - The handle returned by macOpen
3073 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3074 \return eHalStatus
3075 ---------------------------------------------------------------------------*/
3076eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3077 *addPeriodicTxPtrnParams);
3078
3079/* ---------------------------------------------------------------------------
3080 \fn sme_DelPeriodicTxPtrn
3081 \brief API to Periodic TX Pattern Offload feature
3082 \param hHal - The handle returned by macOpen
3083 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3084 \return eHalStatus
3085 ---------------------------------------------------------------------------*/
3086eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3087 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003088/*--------------------------------------------------------------------------
3089 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3090 scan parameter.
3091 This is a synchronous call
3092 \param hHal - The handle returned by macOpen
3093 \return None.
3094 \sa
3095 --------------------------------------------------------------------------*/
3096void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3097 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303098
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003099/* ---------------------------------------------------------------------------
3100 \fn sme_SendRateUpdateInd
3101 \brief API to Update rate
3102 \param hHal - The handle returned by macOpen
3103 \param rateUpdateParams - Pointer to rate update params
3104 \return eHalStatus
3105 ---------------------------------------------------------------------------*/
3106eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3107
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303108/*
3109 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3110 * triggers
3111 * return status
3112*/
3113eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3114 tANI_U8 *bssid,
3115 tSmeFastRoamTrigger fastRoamTrig);
Leela Venkata Kiran Kumar Reddy Chiralaede10652013-09-11 18:48:46 -07003116eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pBSSId );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003117
3118void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303119
3120#ifdef FEATURE_WLAN_BATCH_SCAN
3121/* ---------------------------------------------------------------------------
3122 \fn sme_SetBatchScanReq
3123 \brief API to set batch scan request in FW
3124 \param hHal - The handle returned by macOpen.
3125 \param pRequest - Pointer to the batch request.
3126 \param sessionId - session ID
3127 \param callbackRoutine - HDD callback which needs to be invoked after
3128 getting set batch scan response from FW
3129 \param callbackContext - pAdapter context
3130 \return eHalStatus
3131 ---------------------------------------------------------------------------*/
3132eHalStatus
3133sme_SetBatchScanReq
3134(
3135 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3136 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3137 void *callbackContext
3138);
3139
3140/* ---------------------------------------------------------------------------
3141 \fn sme_TriggerBatchScanResultInd
3142 \brief API to trigger batch scan result indications from from FW
3143 \param hHal - The handle returned by macOpen.
3144 \param pRequest - Pointer to get batch request.
3145 \param sessionId - session ID
3146 \param callbackRoutine - HDD callback which needs to be invoked after
3147 getting get batch scan response from FW
3148 \param callbackContext - pAdapter context
3149 \return eHalStatus
3150 ---------------------------------------------------------------------------*/
3151eHalStatus
3152sme_TriggerBatchScanResultInd
3153(
3154 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3155 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3156 void *callbackContext
3157);
3158
3159/* ---------------------------------------------------------------------------
3160 \fn sme_StopBatchScanInd
3161 \brief API to stop batch scan request in FW
3162 \param hHal - The handle returned by macOpen.
3163 \param pRequest - Pointer to stop batch indication
3164 \return eHalStatus
3165 ---------------------------------------------------------------------------*/
3166eHalStatus
3167sme_StopBatchScanInd
3168(
3169 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3170);
3171
3172#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07003173#endif //#if !defined( __SME_API_H )