blob: e246729507bf837aecf34b9ea701972d08ef3e00 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam0fb93dd2014-02-19 00:32:59 -08002 * Copyright (c) 2012-2014 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
22/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Kiet Lam0fb93dd2014-02-19 00:32:59 -080026 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Jeff Johnson295189b2012-06-20 16:38:30 -070031#if !defined( __SME_API_H )
32#define __SME_API_H
33
34
35/**=========================================================================
36
37 \file smeApi.h
38
39 \brief prototype for SME APIs
40
41 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
42
43 Qualcomm Confidential and Proprietary.
44
45 ========================================================================*/
46
47/* $Header$ */
48
49/*--------------------------------------------------------------------------
50 Include Files
51 ------------------------------------------------------------------------*/
52#include "ccmApi.h"
53#include "csrApi.h"
54#include "pmcApi.h"
55#include "vos_mq.h"
56#include "vos_lock.h"
57#include "halTypes.h"
58#include "sirApi.h"
59#include "btcApi.h"
60#include "vos_nvitem.h"
61#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070062
Jeff Johnsone7245742012-09-05 17:12:55 -070063#ifdef FEATURE_OEM_DATA_SUPPORT
64#include "oemDataApi.h"
65#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070066
67#if defined WLAN_FEATURE_VOWIFI
68#include "smeRrmInternal.h"
69#endif
70
71/*--------------------------------------------------------------------------
72 Preprocessor definitions and constants
73 ------------------------------------------------------------------------*/
74
75#define SME_SUMMARY_STATS 1
76#define SME_GLOBAL_CLASSA_STATS 2
77#define SME_GLOBAL_CLASSB_STATS 4
78#define SME_GLOBAL_CLASSC_STATS 8
79#define SME_GLOBAL_CLASSD_STATS 16
80#define SME_PER_STA_STATS 32
81
82#define SME_INVALID_COUNTRY_CODE "XX"
83
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070084//Macro to disable split scan
85#define SME_DISABLE_SPLIT_SCAN 255
Jeff Johnson295189b2012-06-20 16:38:30 -070086/*--------------------------------------------------------------------------
87 Type declarations
88 ------------------------------------------------------------------------*/
89typedef struct _smeConfigParams
90{
91 tCsrConfigParam csrConfig;
92#if defined WLAN_FEATURE_VOWIFI
93 tRrmConfigParam rrmConfig;
94#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070095#if defined FEATURE_WLAN_LFR
96 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -080097 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -070098#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080099#if defined FEATURE_WLAN_ESE
100 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700101#endif
102#if defined WLAN_FEATURE_P2P_INTERNAL
103 tP2PConfigParam p2pConfig;
104#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800105#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700106 tANI_U8 isFastTransitionEnabled;
107 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700108 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700109#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530110 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700111 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800112 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530113 tANI_U32 fDeferIMPSTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700114} tSmeConfigParams, *tpSmeConfigParams;
115
Sunil Duttc69bccb2014-05-26 21:30:20 +0530116#ifdef WLAN_FEATURE_LINK_LAYER_STATS
117
118/* ---------------------------------------------------------------------------
119 \fn sme_LLStatsSetReq
120 \brief API to set link layer stats request to FW
121 \param hHal - The handle returned by macOpen.
122
123 \Param pStatsReq - a pointer to a caller allocated object of
124 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
125 stats set.
126
127 \return eHalStatus
128 ---------------------------------------------------------------------------*/
129eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
130
131/* ---------------------------------------------------------------------------
132 \fn sme_LLStatsGetReq
133 \brief API to get link layer stats request to FW
134 \param hHal - The handle returned by macOpen.
135
136 \Param pStatsReq - a pointer to a caller allocated object of
137 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
138 stats get.
139
140 \return eHalStatus
141 ---------------------------------------------------------------------------*/
142eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
143
144/* ---------------------------------------------------------------------------
145 \fn sme_LLStatsClearReq
146 \brief API to clear link layer stats request to FW
147 \param hHal - The handle returned by macOpen.
148
149 \Param pStatsReq - a pointer to a caller allocated object of
150 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
151 stats clear.
152
153 \return eHalStatus
154 ---------------------------------------------------------------------------*/
155eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
156
157/* ---------------------------------------------------------------------------
158 \fn sme_SetLinkLayerStatsIndCB
159 \brief API to trigger Link Layer stats result indications from from FW
160 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530161 \param callbackRoutine - HDD callback which needs to be invoked after
162 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530163 \return eHalStatus
164 ---------------------------------------------------------------------------*/
165eHalStatus
166sme_SetLinkLayerStatsIndCB
167(
Dino Mycled3d50022014-07-07 12:58:25 +0530168 tHalHandle hHal,
169 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
170 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530171);
172
173
174#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
175
Dino Mycle2c198072014-06-10 10:15:52 +0530176#ifdef WLAN_FEATURE_EXTSCAN
177/* ---------------------------------------------------------------------------
178 \fn sme_GetValidChannelsByBand
179 \brief SME API to fetch all valid channel filtered by band
180 \param hHal
181 \param wifiBand: RF band information
182 \param aValidChannels: Array to store channel info
183 \param len: number of channels
184 \- return eHalStatus
185 -------------------------------------------------------------------------*/
186eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
187 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
188
189/* ---------------------------------------------------------------------------
190 \fn sme_EXTScanGetCapabilities
191 \brief SME API to fetch Extented Scan capabilities
192 \param hHal
193 \param pReq: Extented Scan capabilities structure
194 \- return eHalStatus
195 -------------------------------------------------------------------------*/
196eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
197 tSirGetEXTScanCapabilitiesReqParams *pReq);
198
199/* ---------------------------------------------------------------------------
200 \fn sme_EXTScanStart
201 \brief SME API to issue Extented Scan start
202 \param hHal
203 \param pStartCmd: Extented Scan start structure
204 \- return eHalStatus
205 -------------------------------------------------------------------------*/
206eHalStatus sme_EXTScanStart (tHalHandle hHal,
207 tSirEXTScanStartReqParams *pStartCmd);
208
209/* ---------------------------------------------------------------------------
210 \fn sme_EXTScanStop
211 \brief SME API to issue Extented Scan stop
212 \param hHal
213 \param pStopReq: Extented Scan stop structure
214 \- return eHalStatus
215 -------------------------------------------------------------------------*/
216eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
217
218/* ---------------------------------------------------------------------------
219 \fn sme_SetBssHotlist
220 \brief SME API to set BSSID hotlist
221 \param hHal
222 \param pSetHotListReq: Extented Scan set hotlist structure
223 \- return eHalStatus
224 -------------------------------------------------------------------------*/
225eHalStatus sme_SetBssHotlist (tHalHandle hHal,
226 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
227
228/* ---------------------------------------------------------------------------
229 \fn sme_ResetBssHotlist
230 \brief SME API to reset BSSID hotlist
231 \param hHal
232 \param pSetHotListReq: Extented Scan set hotlist structure
233 \- return eHalStatus
234 -------------------------------------------------------------------------*/
235eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
236 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
237
238/* ---------------------------------------------------------------------------
239 \fn sme_SetSignificantChange
240 \brief SME API to set significant change
241 \param hHal
242 \param pSetSignificantChangeReq: Extented Scan set significant
243 change structure
244 \- return eHalStatus
245 -------------------------------------------------------------------------*/
246eHalStatus sme_SetSignificantChange (tHalHandle hHal,
247 tSirEXTScanSetSignificantChangeReqParams* pSetSignificantChangeReq);
248
249/* ---------------------------------------------------------------------------
250 \fn sme_ResetSignificantChange
251 \brief SME API to reset significant change
252 \param hHal
253 \param pResetReq: Extented Scan reset significant change structure
254 \- return eHalStatus
255 -------------------------------------------------------------------------*/
256eHalStatus sme_ResetSignificantChange (tHalHandle hHal,
257 tSirEXTScanResetSignificantChangeReqParams *pResetReq);
258
259/* ---------------------------------------------------------------------------
260 \fn sme_getCachedResults
261 \brief SME API to get cached results
262 \param hHal
263 \param pCachedResultsReq: Extented Scan get cached results structure
264 \- return eHalStatus
265 -------------------------------------------------------------------------*/
266eHalStatus sme_getCachedResults (tHalHandle hHal,
267 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
268
269/* ---------------------------------------------------------------------------
270 \fn sme_EXTScanRegisterCallback
271 \brief SME API to register Extented Scan notification callback
272 \param pEXTScanIndCb
273 \- return void
274 -------------------------------------------------------------------------*/
275eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
276 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
277 void *);
278
279#endif /* WLAN_FEATURE_EXTSCAN */
280
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530281typedef enum
282{
283 eSME_ROAM_TRIGGER_NONE = 0,
284 eSME_ROAM_TRIGGER_SCAN = 1,
285 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
286 eSME_ROAM_TRIGGER_MAX
287} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700288
289/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530290 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700291 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700292/*--------------------------------------------------------------------------
293
294 \brief sme_Open() - Initialze all SME modules and put them at idle state
295
296 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
297 successfully return, all modules are at idle state ready to start.
298
299 smeOpen must be called before any other SME APIs can be involved.
300 smeOpen must be called after macOpen.
301
302 \param hHal - The handle returned by macOpen.
303
304 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
305
306 Other status means SME is failed to be initialized
307 \sa
308
309 --------------------------------------------------------------------------*/
310eHalStatus sme_Open(tHalHandle hHal);
311
312/*--------------------------------------------------------------------------
313
314 \brief sme_Close() - Release all SME modules and their resources.
315
316 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
317 return, all modules are at closed state.
318
319 No SME APIs can be involved after sme_Close except sme_Open.
320 sme_Close must be called before macClose.
321
322 \param hHal - The handle returned by macOpen.
323
324 \return eHAL_STATUS_SUCCESS - SME is successfully close.
325
326 Other status means SME is failed to be closed but caller still cannot
327 call any other SME functions except smeOpen.
328 \sa
329
330 --------------------------------------------------------------------------*/
331eHalStatus sme_Close(tHalHandle hHal);
332
333/*--------------------------------------------------------------------------
334
335 \brief sme_Start() - Put all SME modules at ready state.
336
337 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
338 successfully return, all modules are ready to run.
339
340 \param hHal - The handle returned by macOpen.
341
342 \return eHAL_STATUS_SUCCESS - SME is ready.
343
344 Other status means SME is failed to start.
345 \sa
346
347 --------------------------------------------------------------------------*/
348eHalStatus sme_Start(tHalHandle hHal);
349
350/*--------------------------------------------------------------------------
351
352 \brief sme_Stop() - Stop all SME modules and put them at idle state
353
354 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
355 return, all modules are at idle state ready to start.
356
357
358 \param hHal - The handle returned by macOpen.
359
Kiet Lama72a2322013-11-15 11:18:11 +0530360 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700361
362 \return eHAL_STATUS_SUCCESS - SME is stopped.
363
364 Other status means SME is failed to stop but caller should still consider
365 SME is stopped.
366 \sa
367
368 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530369eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700370
371
372/*--------------------------------------------------------------------------
373
374 \brief sme_OpenSession() - Open a session for scan/roam operation.
375
376 This is a synchronous API.
377
378
379 \param hHal - The handle returned by macOpen.
380 \param callback - A pointer to the function caller specifies for roam/connect status indication
381 \param pContext - The context passed with callback
382 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
383 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
384
385 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
386
387 Other status means SME is failed to open the session.
388 eHAL_STATUS_RESOURCES - no more session available.
389 \sa
390
391 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700392eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
393 void *pContext, tANI_U8 *pSelfMacAddr,
394 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700395
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700396/*--------------------------------------------------------------------------
397
398 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
399 \param hHal - The handle returned by macOpen.
400 \param currDeviceMode - Current operating device mode.
401 --------------------------------------------------------------------------*/
402
403void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700404
405/*--------------------------------------------------------------------------
406
407 \brief sme_CloseSession() - Open a session for scan/roam operation.
408
409 This is a synchronous API.
410
411
412 \param hHal - The handle returned by macOpen.
413
414 \param sessionId - A previous opened session's ID.
415
416 \return eHAL_STATUS_SUCCESS - session is closed.
417
418 Other status means SME is failed to open the session.
419 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
420 \sa
421
422 --------------------------------------------------------------------------*/
423eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
424 csrRoamSessionCloseCallback callback, void *pContext);
425
426
427
428/*--------------------------------------------------------------------------
429
430 \brief sme_UpdateConfig() - Change configurations for all SME moduels
431
432 The function updates some configuration for modules in SME, CCM, CSR, etc
433 during SMEs close -> open sequence.
434
435 Modules inside SME apply the new configuration at the next transaction.
436
437
438 \param hHal - The handle returned by macOpen.
439 \Param pSmeConfigParams - a pointer to a caller allocated object of
440 typedef struct _smeConfigParams.
441
442 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
443
444 Other status means SME is failed to update the config parameters.
445 \sa
446
447 --------------------------------------------------------------------------*/
448eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
449
450#ifdef FEATURE_WLAN_SCAN_PNO
451/*--------------------------------------------------------------------------
452
453 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
454
455 It is used at driver start up to inform RIVA of the default channel
456 configuration.
457
458 This is a synchronuous call
459
460 \param hHal - The handle returned by macOpen.
461
462 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
463
464 Other status means SME is failed to update the channel config.
465 \sa
466
467 --------------------------------------------------------------------------*/
468eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
469
470#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700471/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530472
473 \brief sme_UpdateChannelList() - Update channel List in FW.
474
475
476 \param hHal - The handle returned by macOpen.
477
478 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
479
480 Other status means SME is failed to update the channel config.
481 \sa
482
483 --------------------------------------------------------------------------*/
484eHalStatus sme_UpdateChannelList(tHalHandle hHal);
485
486/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700487
488 \brief sme_set11dinfo() - Set the 11d information about valid channels
489 and there power using information from nvRAM
490 This function is called only for AP.
491
492 This is a synchronuous call
493
494 \param hHal - The handle returned by macOpen.
495 \Param pSmeConfigParams - a pointer to a caller allocated object of
496 typedef struct _smeConfigParams.
497
498 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
499
500 Other status means SME is failed to update the config parameters.
501 \sa
502--------------------------------------------------------------------------*/
503
504eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
505
506/*--------------------------------------------------------------------------
507
508 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
509
510 This is a synchronuous call
511
512 \param hHal - The handle returned by HostapdAdapter.
513 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
514
515 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
516
517 Other status means, failed to get the current regulatory domain.
518 \sa
519--------------------------------------------------------------------------*/
520
521eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
522
523eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
524
Jeff Johnson295189b2012-06-20 16:38:30 -0700525
526/* ---------------------------------------------------------------------------
527 \fn sme_ChangeConfigParams
528 \brief The SME API exposed for HDD to provide config params to SME during
529 SMEs stop -> start sequence.
530
531 If HDD changed the domain that will cause a reset. This function will
532 provide the new set of 11d information for the new domain. Currrently this
533 API provides info regarding 11d only at reset but we can extend this for
534 other params (PMC, QoS) which needs to be initialized again at reset.
535
536 This is a synchronuous call
537
538 \param hHal - The handle returned by macOpen.
539
540 \Param
541 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
542 currently provides 11d related information like Country code,
543 Regulatory domain, valid channel list, Tx power per channel, a
544 list with active/passive scan allowed per valid channel.
545
546 \return eHalStatus
547 ---------------------------------------------------------------------------*/
548eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
549 tCsrUpdateConfigParam *pUpdateConfigParam);
550
551/*--------------------------------------------------------------------------
552
553 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
554 is ready tio run.
555
556 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
557 to running state.
558
559
560 \param hHal - The handle returned by macOpen.
561
562 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
563
564 Other status means SME failed to send the message to PE.
565 \sa
566
567 --------------------------------------------------------------------------*/
568eHalStatus sme_HDDReadyInd(tHalHandle hHal);
569
570
571/*--------------------------------------------------------------------------
572
573 \brief sme_ProcessMsg() - The main message processor for SME.
574
575 The function is called by a message dispatcher when to process a message
576 targeted for SME.
577
578
579 \param hHal - The handle returned by macOpen.
580 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
581
582 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
583
584 Other status means SME failed to process the message.
585 \sa
586
587 --------------------------------------------------------------------------*/
588eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
589
590v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
591
592/* ---------------------------------------------------------------------------
593 \fn sme_ScanRequest
594 \brief a wrapper function to Request a 11d or full scan from CSR.
595 \param pScanRequestID - pointer to an object to get back the request ID
596 \param callback - a callback function that scan calls upon finish, will not
597 be called if csrScanRequest returns error
598 \param pContext - a pointer passed in for the callback
599 \return eHalStatus
600 ---------------------------------------------------------------------------*/
601eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
602 tANI_U32 *pScanRequestID,
603 csrScanCompleteCallback callback, void *pContext);
604
605
606/* ---------------------------------------------------------------------------
607 \fn sme_ScanSetBGScanparams
608 \brief a wrapper function to request CSR to set BG scan params in PE
609 \param pScanReq - BG scan request structure
610 \return eHalStatus
611 ---------------------------------------------------------------------------*/
612eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
613
614
615/* ---------------------------------------------------------------------------
616 \fn sme_ScanGetResult
617 \brief a wrapper function to request scan results from CSR.
618 \param pFilter - If pFilter is NULL, all cached results are returned
619 \param phResult - an object for the result.
620 \return eHalStatus
621 ---------------------------------------------------------------------------*/
622eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
623 tScanResultHandle *phResult);
624
625
626/* ---------------------------------------------------------------------------
627 \fn sme_ScanFlushResult
628 \brief a wrapper function to request CSR to clear scan results.
629 \return eHalStatus
630 ---------------------------------------------------------------------------*/
631eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530632
633/*
634 * ---------------------------------------------------------------------------
635 * \fn sme_FilterScanResults
636 * \brief a wrapper function to request CSR to filter the scan results based
637 * on valid chennel list.
638 * \return eHalStatus
639 *---------------------------------------------------------------------------
640 */
641eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
642
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700643eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700644
645/* ---------------------------------------------------------------------------
646 \fn sme_ScanResultGetFirst
647 \brief a wrapper function to request CSR to returns the first element of
648 scan result.
649 \param hScanResult - returned from csrScanGetResult
650 \return tCsrScanResultInfo * - NULL if no result
651 ---------------------------------------------------------------------------*/
652tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
653 tScanResultHandle hScanResult);
654
655/* ---------------------------------------------------------------------------
656 \fn sme_ScanResultGetNext
657 \brief a wrapper function to request CSR to returns the next element of
658 scan result. It can be called without calling csrScanResultGetFirst
659 first
660 \param hScanResult - returned from csrScanGetResult
661 \return Null if no result or reach the end
662 ---------------------------------------------------------------------------*/
663tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
664 tScanResultHandle hScanResult);
665
666/* ---------------------------------------------------------------------------
667 \fn sme_ScanResultPurge
668 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
669 in the list and free memory for each item
670 \param hScanResult - returned from csrScanGetResult. hScanResult is
671 considered gone by
672 calling this function and even before this function reutrns.
673 \return eHalStatus
674 ---------------------------------------------------------------------------*/
675eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
676
677/* ---------------------------------------------------------------------------
678 \fn sme_ScanGetPMKIDCandidateList
679 \brief a wrapper function to return the PMKID candidate list
680 \param pPmkidList - caller allocated buffer point to an array of
681 tPmkidCandidateInfo
682 \param pNumItems - pointer to a variable that has the number of
683 tPmkidCandidateInfo allocated when retruning, this is
684 either the number needed or number of items put into
685 pPmkidList
686 \return eHalStatus - when fail, it usually means the buffer allocated is not
687 big enough and pNumItems
688 has the number of tPmkidCandidateInfo.
689 \Note: pNumItems is a number of tPmkidCandidateInfo,
690 not sizeof(tPmkidCandidateInfo) * something
691 ---------------------------------------------------------------------------*/
692eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
693 tPmkidCandidateInfo *pPmkidList,
694 tANI_U32 *pNumItems );
695
696
697/*----------------------------------------------------------------------------
698 \fn sme_RoamRegisterLinkQualityIndCallback
699
700 \brief
701 a wrapper function to allow HDD to register a callback handler with CSR for
702 link quality indications.
703
704 Only one callback may be registered at any time.
705 In order to deregister the callback, a NULL cback may be provided.
706
707 Registration happens in the task context of the caller.
708
709 \param callback - Call back being registered
710 \param pContext - user data
711
712 DEPENDENCIES: After CSR open
713
714 \return eHalStatus
715-----------------------------------------------------------------------------*/
716eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
717 csrRoamLinkQualityIndCallback callback,
718 void *pContext);
719
720
721/* ---------------------------------------------------------------------------
722 \fn sme_RoamConnect
723 \brief a wrapper function to request CSR to inititiate an association
724 \param sessionId - the sessionId returned by sme_OpenSession.
725 \param pProfile - can be NULL to join to any open ones
726 \param pRoamId - to get back the request ID
727 \return eHalStatus
728 ---------------------------------------------------------------------------*/
729eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
730 tANI_U32 *pRoamId);
731
732/* ---------------------------------------------------------------------------
733 \fn sme_RoamReassoc
734 \brief a wrapper function to request CSR to inititiate a re-association
735 \param pProfile - can be NULL to join the currently connected AP. In that
736 case modProfileFields should carry the modified field(s) which could trigger
737 reassoc
738 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
739 that might need modification dynamically once STA is up & running and this
740 could trigger a reassoc
741 \param pRoamId - to get back the request ID
742 \return eHalStatus
743 -------------------------------------------------------------------------------*/
744eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
745 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700746 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700747
748/* ---------------------------------------------------------------------------
749 \fn sme_RoamConnectToLastProfile
750 \brief a wrapper function to request CSR to disconnect and reconnect with
751 the same profile
752 \return eHalStatus. It returns fail if currently connected
753 ---------------------------------------------------------------------------*/
754eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
755
756/* ---------------------------------------------------------------------------
757 \fn sme_RoamDisconnect
758 \brief a wrapper function to request CSR to disconnect from a network
759 \param reason -- To indicate the reason for disconnecting. Currently, only
760 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
761 \return eHalStatus
762 ---------------------------------------------------------------------------*/
763eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
764
Jeff Johnson295189b2012-06-20 16:38:30 -0700765/* ---------------------------------------------------------------------------
766 \fn sme_RoamStopBss
767 \brief a wrapper function to request CSR to stop bss
768 \param sessionId - sessionId of SoftAP
769 \return eHalStatus
770 ---------------------------------------------------------------------------*/
771eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
772
773/* ---------------------------------------------------------------------------
774 \fn sme_RoamGetAssociatedStas
775 \brief To probe the list of associated stations from various modules of CORE stack.
776 \This is an asynchronous API.
777 \param sessionId - sessionId of SoftAP
778 \param modId - Module from whom list of associtated stations is to be probed.
779 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
780 \param pUsrContext - Opaque HDD context
781 \param pfnSapEventCallback - Sap event callback in HDD
782 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
783 \return eHalStatus
784 -------------------------------------------------------------------------------*/
785eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
786 VOS_MODULE_ID modId, void *pUsrContext,
787 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
788
789/* ---------------------------------------------------------------------------
790 \fn sme_RoamDisconnectSta
791 \brief To disassociate a station. This is an asynchronous API.
792 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
793 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
794 -------------------------------------------------------------------------------*/
795eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
796
797/* ---------------------------------------------------------------------------
798 \fn sme_RoamDeauthSta
799 \brief To disassociate a station. This is an asynchronous API.
800 \param hHal - Global structure
801 \param sessionId - sessionId of SoftAP
802 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
803 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
804 -------------------------------------------------------------------------------*/
805eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
806 tANI_U8 *pPeerMacAddr);
807
808/* ---------------------------------------------------------------------------
809 \fn sme_RoamTKIPCounterMeasures
810 \brief To start or stop TKIP counter measures. This is an asynchronous API.
811 \param sessionId - sessionId of SoftAP
812 \param bEnable - Flag to start/stop TKIP countermeasures
813 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
814 -------------------------------------------------------------------------------*/
815eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
816
817/* ---------------------------------------------------------------------------
818 \fn sme_RoamGetWpsSessionOverlap
819 \brief To get the WPS PBC session overlap information.
820 \This is an asynchronous API.
821 \param sessionId - sessionId of SoftAP
822 \param pUsrContext - Opaque HDD context
823 \param pfnSapEventCallback - Sap event callback in HDD
824 \return eHalStatus
825 -------------------------------------------------------------------------------*/
826eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
827 void *pUsrContext, void *pfnSapEventCallback,
828 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700829
830/* ---------------------------------------------------------------------------
831 \fn sme_RoamGetConnectState
832 \brief a wrapper function to request CSR to return the current connect state
833 of Roaming
834 \return eHalStatus
835 ---------------------------------------------------------------------------*/
836eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
837
838/* ---------------------------------------------------------------------------
839 \fn sme_RoamGetConnectProfile
840 \brief a wrapper function to request CSR to return the current connect
841 profile. Caller must call csrRoamFreeConnectProfile after it is done
842 and before reuse for another csrRoamGetConnectProfile call.
843 \param pProfile - pointer to a caller allocated structure
844 tCsrRoamConnectedProfile
845 \return eHalStatus. Failure if not connected
846 ---------------------------------------------------------------------------*/
847eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
848 tCsrRoamConnectedProfile *pProfile);
849
850/* ---------------------------------------------------------------------------
851 \fn sme_RoamFreeConnectProfile
852 \brief a wrapper function to request CSR to free and reinitialize the
853 profile returned previously by csrRoamGetConnectProfile.
854 \param pProfile - pointer to a caller allocated structure
855 tCsrRoamConnectedProfile
856 \return eHalStatus.
857 ---------------------------------------------------------------------------*/
858eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
859 tCsrRoamConnectedProfile *pProfile);
860
861/* ---------------------------------------------------------------------------
862 \fn sme_RoamSetPMKIDCache
863 \brief a wrapper function to request CSR to return the PMKID candidate list
864 \param pPMKIDCache - caller allocated buffer point to an array of
865 tPmkidCacheInfo
866 \param numItems - a variable that has the number of tPmkidCacheInfo
867 allocated when retruning, this is either the number needed
868 or number of items put into pPMKIDCache
869 \return eHalStatus - when fail, it usually means the buffer allocated is not
870 big enough and pNumItems has the number of
871 tPmkidCacheInfo.
872 \Note: pNumItems is a number of tPmkidCacheInfo,
873 not sizeof(tPmkidCacheInfo) * something
874 ---------------------------------------------------------------------------*/
875eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId, tPmkidCacheInfo *pPMKIDCache,
876 tANI_U32 numItems );
877
878/* ---------------------------------------------------------------------------
879 \fn sme_RoamGetSecurityReqIE
880 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
881 passes to PE to JOIN request or START_BSS request
882 This is a synchronuous call.
883 \param sessionId - returned by sme_OpenSession.
884 \param pLen - caller allocated memory that has the length of pBuf as input.
885 Upon returned, *pLen has the needed or IE length in pBuf.
886 \param pBuf - Caller allocated memory that contain the IE field, if any,
887 upon return
888 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
889 \return eHalStatus - when fail, it usually means the buffer allocated is not
890 big enough
891 ---------------------------------------------------------------------------*/
892eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
893 tANI_U8 *pBuf, eCsrSecurityType secType);
894
895/* ---------------------------------------------------------------------------
896 \fn sme_RoamGetSecurityRspIE
897 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
898 the beacon or probe rsp if connected
899 \param sessionId - returned by sme_OpenSession.
900 \param pLen - caller allocated memory that has the length of pBuf as input.
901 Upon returned, *pLen has the needed or IE length in pBuf.
902 \param pBuf - Caller allocated memory that contain the IE field, if any,
903 upon return
904 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
905 \return eHalStatus - when fail, it usually means the buffer allocated is not
906 big enough
907 ---------------------------------------------------------------------------*/
908eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
909 tANI_U8 *pBuf, eCsrSecurityType secType);
910
911
912/* ---------------------------------------------------------------------------
913 \fn sme_RoamGetNumPMKIDCache
914 \brief a wrapper function to request CSR to return number of PMKID cache
915 entries
916 \return tANI_U32 - the number of PMKID cache entries
917 ---------------------------------------------------------------------------*/
918tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
919
920/* ---------------------------------------------------------------------------
921 \fn sme_RoamGetPMKIDCache
922 \brief a wrapper function to request CSR to return PMKID cache from CSR
923 \param pNum - caller allocated memory that has the space of the number of
924 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
925 needed or actually number in tPmkidCacheInfo.
926 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
927 any, upon return
928 \return eHalStatus - when fail, it usually means the buffer allocated is not
929 big enough
930 ---------------------------------------------------------------------------*/
931eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
932 tPmkidCacheInfo *pPmkidCache);
933
934/* ---------------------------------------------------------------------------
935 \fn sme_GetConfigParam
936 \brief a wrapper function that HDD calls to get the global settings
937 currently maintained by CSR.
938 \param pParam - caller allocated memory
939 \return eHalStatus
940 ---------------------------------------------------------------------------*/
941eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
942
943/* ---------------------------------------------------------------------------
944 \fn sme_GetStatistics
945 \brief a wrapper function that client calls to register a callback to get
946 different PHY level statistics from CSR.
947
948 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
949 \param statsMask - The different category/categories of stats requester is looking for
950 The order in which you set the bits in the statsMask for requesting
951 different type of stats is:
952
953 eCsrSummaryStats = bit 0
954 eCsrGlobalClassAStats = bit 1
955 eCsrGlobalClassBStats = bit 2
956 eCsrGlobalClassCStats = bit 3
957 eCsrGlobalClassDStats = bit 4
958 eCsrPerStaStats = bit 5
959
960 \param callback - SME sends back the requested stats using the callback
961 \param periodicity - If requester needs periodic update, 0 means it's an one
962 time request
963 \param cache - If requester is happy with cached stats
964 \param staId - The station ID for which the stats is requested for
965 \param pContext - user context to be passed back along with the callback
966 \return eHalStatus
967 ---------------------------------------------------------------------------*/
968eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
969 tANI_U32 statsMask,
970 tCsrStatsCallback callback,
971 tANI_U32 periodicity, tANI_BOOLEAN cache,
972 tANI_U8 staId, void *pContext);
973
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +0530974/* ---------------------------------------------------------------------------
975 \fn smeGetTLSTAState
976 \helper function to get teh TL STA State whenever the function is called.
977
978 \param staId - The staID to be passed to the TL
979 to get the relevant TL STA State
980 \return the state as tANI_U16
981 ---------------------------------------------------------------------------*/
982tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
983
Jeff Johnson295189b2012-06-20 16:38:30 -0700984eHalStatus sme_GetRssi(tHalHandle hHal,
985 tCsrRssiCallback callback,
986 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530987
988/* ---------------------------------------------------------------------------
989 \fn sme_GetSnr
990 \brief a wrapper function that client calls to register a callback to get
991 SNR from FW
992
993 \param callback - SME sends back the requested stats using the callback
994 \param staId - The station ID for which the stats is requested for
995 \param bssid - The bssid of the connected session
996 \param pContext - user context to be passed back along with the callback
997 ---------------------------------------------------------------------------*/
998eHalStatus sme_GetSnr(tHalHandle hHal,
999 tCsrSnrCallback callback,
1000 tANI_U8 staId, tCsrBssid bssId,
1001 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001002#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001003eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1004 tCsrRssiCallback callback,
1005 tANI_U8 staId,
1006 tCsrBssid bssId,
1007 void *pContext,
1008 void* pVosContext);
1009#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001010
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001011#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001012/* ---------------------------------------------------------------------------
1013 \fn sme_GetTsmStats
1014 \brief a wrapper function that client calls to register a callback to get TSM Stats
1015
1016 \param callback - SME sends back the requested stats using the callback
1017 \param staId - The station ID for which the stats is requested for
1018 \param pContext - user context to be passed back along with the callback
1019 \param pVosContext - vos context
1020 \return eHalStatus
1021 ---------------------------------------------------------------------------*/
1022eHalStatus sme_GetTsmStats(tHalHandle hHal,
1023 tCsrTsmStatsCallback callback,
1024 tANI_U8 staId, tCsrBssid bssId,
1025 void *pContext, void* pVosContext, tANI_U8 tid);
1026
1027/* ---------------------------------------------------------------------------
1028 \fn sme_SetCCKMIe
1029 \brief function to store the CCKM IE passed from supplicant and use it while packing
1030 reassociation request
1031 \param hHal - HAL handle for device
1032 \param pCckmIe - pointer to CCKM IE data
1033 \param pCckmIeLen - length of the CCKM IE
1034 \- return Success or failure
1035 -------------------------------------------------------------------------*/
1036eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1037
1038
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001039/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001040 \fn sme_SetEseBeaconRequest
1041 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001042 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001043 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001044 \- return Success or failure
1045 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001046eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1047 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001048
1049
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001050#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001051/* ---------------------------------------------------------------------------
1052 \fn sme_CfgSetInt
1053 \brief a wrapper function that HDD calls to set parameters in CFG.
1054 \param cfgId - Configuration Parameter ID (type) for STA.
1055 \param ccmValue - The information related to Configuration Parameter ID
1056 which needs to be saved in CFG
1057 \param callback - To be registered by CSR with CCM. Once the CFG done with
1058 saving the information in the database, it notifies CCM &
1059 then the callback will be invoked to notify.
1060 \param toBeSaved - To save the request for future reference
1061 \return eHalStatus
1062 ---------------------------------------------------------------------------*/
1063eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1064 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1065
1066/* ---------------------------------------------------------------------------
1067 \fn sme_CfgSetStr
1068 \brief a wrapper function that HDD calls to set parameters in CFG.
1069 \param cfgId - Configuration Parameter ID (type) for STA.
1070 \param pStr - Pointer to the byte array which carries the information needs
1071 to be saved in CFG
1072 \param length - Length of the data to be saved
1073 \param callback - To be registered by CSR with CCM. Once the CFG done with
1074 saving the information in the database, it notifies CCM &
1075 then the callback will be invoked to notify.
1076 \param toBeSaved - To save the request for future reference
1077 \return eHalStatus
1078 ---------------------------------------------------------------------------*/
1079eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1080 tANI_U32 length, tCcmCfgSetCallback callback,
1081 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301082/* ---------------------------------------------------------------------------
1083 \fn sme_GetModifyProfileFields
1084 \brief HDD or SME - QOS calls this function to get the current values of
1085 connected profile fields, changing which can cause reassoc.
1086 This function must be called after CFG is downloaded and STA is in connected
1087 state. Also, make sure to call this function to get the current profile
1088 fields before calling the reassoc. So that pModifyProfileFields will have
1089 all the latest values plus the one(s) has been updated as part of reassoc
1090 request.
1091 \param pModifyProfileFields - pointer to the connected profile fields
1092 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001093
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301094 \return eHalStatus
1095 -------------------------------------------------------------------------------*/
1096eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1097 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301098/* ---------------------------------------------------------------------------
1099 \fn sme_HT40StopOBSSScan
1100 \brief HDD or SME - Command to stop the OBSS scan
1101 THis is implemented only for debugging purpose.
1102 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1103 \param sessionId - sessionId
1104 changing which can cause reassoc
1105
1106 \return eHalStatus
1107 -------------------------------------------------------------------------------*/
1108eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001109
1110/*--------------------------------------------------------------------------
1111 \fn sme_SetConfigPowerSave
1112 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1113 For BMPS related configuration, this function also updates the CFG
1114 and sends a message to FW to pick up the new values. Note: Calling
1115 this function only updates the configuration and does not enable
1116 the specified power save mode.
1117 \param hHal - The handle returned by macOpen.
1118 \param psMode - Power Saving mode being modified
1119 \param pConfigParams - a pointer to a caller allocated object of type
1120 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1121 \return eHalStatus
1122 --------------------------------------------------------------------------*/
1123eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1124 void *pConfigParams);
1125
1126/*--------------------------------------------------------------------------
1127 \fn sme_GetConfigPowerSave
1128 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1129 \param hHal - The handle returned by macOpen.
1130 \param psMode - Power Saving mode
1131 \param pConfigParams - a pointer to a caller allocated object of type
1132 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1133 \return eHalStatus
1134 --------------------------------------------------------------------------*/
1135eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1136 void *pConfigParams);
1137
1138/* ---------------------------------------------------------------------------
1139 \fn sme_SignalPowerEvent
1140 \brief Signals to PMC that a power event has occurred. Used for putting
1141 the chip into deep sleep mode.
1142 \param hHal - The handle returned by macOpen.
1143 \param event - the event that has occurred
1144 \return eHalStatus
1145 ---------------------------------------------------------------------------*/
1146extern eHalStatus sme_SignalPowerEvent (
1147 tHalHandle hHal,
1148 tPmcPowerEvent event);
1149
1150/* ---------------------------------------------------------------------------
1151 \fn sme_EnablePowerSave
1152 \brief Enables one of the power saving modes. This API does not cause a
1153 device state change. This is purely a configuration API.
1154 \param hHal - The handle returned by macOpen.
1155 \param psMode - The power saving mode to enable.
1156 \return eHalStatus
1157 ---------------------------------------------------------------------------*/
1158extern eHalStatus sme_EnablePowerSave (
1159 tHalHandle hHal,
1160 tPmcPowerSavingMode psMode);
1161
1162/* ---------------------------------------------------------------------------
1163 \fn sme_DisablePowerSave
1164 \brief Disables one of the power saving modes.Disabling does not imply
1165 that device will be brought out of the current PS mode. This is
1166 purely a configuration API.
1167 \param hHal - The handle returned by macOpen.
1168 \param psMode - The power saving mode to disable.
1169 \return eHalStatus
1170 ---------------------------------------------------------------------------*/
1171extern eHalStatus sme_DisablePowerSave (
1172 tHalHandle hHal,
1173 tPmcPowerSavingMode psMode);
1174
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301175 /* ---------------------------------------------------------------------------
1176 \fn sme_SetHostPowerSave
1177 \brief The BMPS logic is controlled by the User level Apps
1178 \param hHal - The handle returned by macOpen.
1179 \param psMode - The power saving mode to enable.
1180 \return eHalStatus
1181 ---------------------------------------------------------------------------*/
1182extern eHalStatus sme_SetHostPowerSave (
1183 tHalHandle hHal,
1184 v_BOOL_t psMode);
1185
Jeff Johnson295189b2012-06-20 16:38:30 -07001186/* ---------------------------------------------------------------------------
1187 \fn sme_StartAutoBmpsTimer
1188 \brief Starts a timer that periodically polls all the registered
1189 module for entry into Bmps mode. This timer is started only if BMPS is
1190 enabled and whenever the device is in full power.
1191 \param hHal - The handle returned by macOpen.
1192 \return eHalStatus
1193 ---------------------------------------------------------------------------*/
1194extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1195
1196/* ---------------------------------------------------------------------------
1197 \fn sme_StopAutoBmpsTimer
1198 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1199 Stopping the timer does not cause a device state change. Only the timer
1200 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1201 \param hHal - The handle returned by macOpen.
1202 \return eHalStatus
1203 ---------------------------------------------------------------------------*/
1204extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1205
1206/* ---------------------------------------------------------------------------
1207 \fn sme_QueryPowerState
1208 \brief Returns the current power state of the device.
1209 \param hHal - The handle returned by macOpen.
1210 \param pPowerState - pointer to location to return power state
1211 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1212 \return eHalStatus
1213 ---------------------------------------------------------------------------*/
1214extern eHalStatus sme_QueryPowerState (
1215 tHalHandle hHal,
1216 tPmcPowerState *pPowerState,
1217 tPmcSwitchState *pSwWlanSwitchState);
1218
1219/* ---------------------------------------------------------------------------
1220 \fn sme_IsPowerSaveEnabled
1221 \brief Checks if the device is able to enter a particular power save mode
1222 This does not imply that the device is in a particular PS mode
1223 \param hHal - The handle returned by macOpen.
1224 \param psMode - the power saving mode
1225 \return eHalStatus
1226 ---------------------------------------------------------------------------*/
1227extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1228 tHalHandle hHal,
1229 tPmcPowerSavingMode psMode);
1230
1231/* ---------------------------------------------------------------------------
1232 \fn sme_RequestFullPower
1233 \brief Request that the device be brought to full power state.
1234 Note 1: If "fullPowerReason" specificied in this API is set to
1235 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1236 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1237 HDD is requesting full power, we need to undo any previous HDD requests for
1238 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1239 specified anything other than above, the buffered requests for BMPS and WoWL
1240 will not be cleared.
1241 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1242 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1243 request".
1244 Note 3: When the device finally enters Full Power PMC will start a timer
1245 if any of the following holds true:
1246 - Auto BMPS mode is enabled
1247 - Uapsd request is pending
1248 - HDD's request for BMPS is pending
1249 - HDD's request for WoWL is pending
1250 On timer expiry PMC will attempt to put the device in BMPS mode if following
1251 (in addition to those listed above) holds true:
1252 - Polling of all modules through the Power Save Check routine passes
1253 - STA is associated to an access point
1254 \param hHal - The handle returned by macOpen.
1255 \param - callbackRoutine Callback routine invoked in case of success/failure
1256 \param - callbackContext - Cookie to be passed back during callback
1257 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1258 distinguish between BAP and HDD requests
1259 \return eHalStatus - status
1260 eHAL_STATUS_SUCCESS - device brought to full power state
1261 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1262 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1263 ---------------------------------------------------------------------------*/
1264extern eHalStatus sme_RequestFullPower (
1265 tHalHandle hHal,
1266 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1267 void *callbackContext,
1268 tRequestFullPowerReason fullPowerReason);
1269
1270/* ---------------------------------------------------------------------------
1271 \fn sme_RequestBmps
1272 \brief Request that the device be put in BMPS state. Request will be
1273 accepted only if BMPS mode is enabled and power save check routine
1274 passes. Only HDD should invoke this API.
1275 \param hHal - The handle returned by macOpen.
1276 \param - callbackRoutine Callback routine invoked in case of success/failure
1277 \param - callbackContext - Cookie to be passed back during callback
1278 \return eHalStatus
1279 eHAL_STATUS_SUCCESS - device is in BMPS state
1280 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1281 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1282 ---------------------------------------------------------------------------*/
1283extern eHalStatus sme_RequestBmps (
1284 tHalHandle hHal,
1285 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1286 void *callbackContext);
1287
1288/* ---------------------------------------------------------------------------
1289 \fn sme_SetDHCPTillPowerActiveFlag
1290 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1291 entry by PMC
1292 \param hHal - The handle returned by macOpen.
1293 ---------------------------------------------------------------------------*/
1294void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1295
1296
1297/* ---------------------------------------------------------------------------
1298 \fn sme_StartUapsd
1299 \brief Request that the device be put in UAPSD state. If the device is in
1300 Full Power it will be put in BMPS mode first and then into UAPSD
1301 mode.
1302 \param hHal - The handle returned by macOpen.
1303 \param - callbackRoutine Callback routine invoked in case of success/failure
1304 \param - callbackContext - Cookie to be passed back during callback
1305 eHAL_STATUS_SUCCESS - device is in UAPSD state
1306 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1307 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1308 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1309 \return eHalStatus
1310 ---------------------------------------------------------------------------*/
1311extern eHalStatus sme_StartUapsd (
1312 tHalHandle hHal,
1313 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1314 void *callbackContext);
1315
1316/* ---------------------------------------------------------------------------
1317 \fn sme_StopUapsd
1318 \brief Request that the device be put out of UAPSD state. Device will be
1319 put in in BMPS state after stop UAPSD completes. Buffered requests for
1320 UAPSD will be cleared after this.
1321 \param hHal - The handle returned by macOpen.
1322 \return eHalStatus
1323 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1324 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1325 ---------------------------------------------------------------------------*/
1326extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1327
1328/* ---------------------------------------------------------------------------
1329 \fn sme_RequestStandby
1330 \brief Request that the device be put in standby. It is HDD's responsibility
1331 to bring the chip to full power and do a discconnect before calling
1332 this API. Request for standby will be rejected if STA is associated
1333 to an AP.
1334 \param hHal - The handle returned by macOpen.
1335 \param - callbackRoutine Callback routine invoked in case of success/failure
1336 \param - callbackContext - Cookie to be passed back during callback
1337 \return eHalStatus
1338 eHAL_STATUS_SUCCESS - device is in Standby mode
1339 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1340 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1341 ---------------------------------------------------------------------------*/
1342extern eHalStatus sme_RequestStandby (
1343 tHalHandle hHal,
1344 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1345 void *callbackContext);
1346
1347/* ---------------------------------------------------------------------------
1348 \fn sme_RegisterPowerSaveCheck
1349 \brief Register a power save check routine that is called whenever
1350 the device is about to enter one of the power save modes.
1351 \param hHal - The handle returned by macOpen.
1352 \param checkRoutine - Power save check routine to be registered
1353 \param callbackContext - Cookie to be passed back during callback
1354 \return eHalStatus
1355 eHAL_STATUS_SUCCESS - successfully registered
1356 eHAL_STATUS_FAILURE - not successfully registered
1357 ---------------------------------------------------------------------------*/
1358extern eHalStatus sme_RegisterPowerSaveCheck (
1359 tHalHandle hHal,
1360 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1361
1362/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301363 \fn sme_Register11dScanDoneCallback
1364 \brief Register a routine of type csrScanCompleteCallback which is
1365 called whenever an 11d scan is done
1366 \param hHal - The handle returned by macOpen.
1367 \param callback - 11d scan complete routine to be registered
1368 \return eHalStatus
1369 ---------------------------------------------------------------------------*/
1370extern eHalStatus sme_Register11dScanDoneCallback (
1371 tHalHandle hHal,
1372 csrScanCompleteCallback);
1373
1374/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001375 \fn sme_DeregisterPowerSaveCheck
1376 \brief Deregister a power save check routine
1377 \param hHal - The handle returned by macOpen.
1378 \param checkRoutine - Power save check routine to be deregistered
1379 \return eHalStatus
1380 eHAL_STATUS_SUCCESS - successfully deregistered
1381 eHAL_STATUS_FAILURE - not successfully deregistered
1382 ---------------------------------------------------------------------------*/
1383extern eHalStatus sme_DeregisterPowerSaveCheck (
1384 tHalHandle hHal,
1385 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1386
1387/* ---------------------------------------------------------------------------
1388 \fn sme_RegisterDeviceStateUpdateInd
1389 \brief Register a callback routine that is called whenever
1390 the device enters a new device state (Full Power, BMPS, UAPSD)
1391 \param hHal - The handle returned by macOpen.
1392 \param callbackRoutine - Callback routine to be registered
1393 \param callbackContext - Cookie to be passed back during callback
1394 \return eHalStatus
1395 eHAL_STATUS_SUCCESS - successfully registered
1396 eHAL_STATUS_FAILURE - not successfully registered
1397 ---------------------------------------------------------------------------*/
1398extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1399 tHalHandle hHal,
1400 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1401 void *callbackContext);
1402
1403/* ---------------------------------------------------------------------------
1404 \fn sme_DeregisterDeviceStateUpdateInd
1405 \brief Deregister a routine that was registered for device state changes
1406 \param hHal - The handle returned by macOpen.
1407 \param callbackRoutine - Callback routine to be deregistered
1408 \return eHalStatus
1409 eHAL_STATUS_SUCCESS - successfully deregistered
1410 eHAL_STATUS_FAILURE - not successfully deregistered
1411 ---------------------------------------------------------------------------*/
1412extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1413 tHalHandle hHal,
1414 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1415
1416/* ---------------------------------------------------------------------------
1417 \fn sme_WowlAddBcastPattern
1418 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1419 do a pattern match on these patterns when Wowl is enabled during BMPS
1420 mode.
1421 \param hHal - The handle returned by macOpen.
1422 \param pattern - Pattern to be added
1423 \return eHalStatus
1424 eHAL_STATUS_FAILURE Cannot add pattern
1425 eHAL_STATUS_SUCCESS Request accepted.
1426 ---------------------------------------------------------------------------*/
1427extern eHalStatus sme_WowlAddBcastPattern (
1428 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001429 tpSirWowlAddBcastPtrn pattern,
1430 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001431
1432/* ---------------------------------------------------------------------------
1433 \fn sme_WowlDelBcastPattern
1434 \brief Delete a pattern that was added for Pattern Byte Matching.
1435 \param hHal - The handle returned by macOpen.
1436 \param pattern - Pattern to be deleted
1437 \return eHalStatus
1438 eHAL_STATUS_FAILURE Cannot delete pattern
1439 eHAL_STATUS_SUCCESS Request accepted.
1440 ---------------------------------------------------------------------------*/
1441extern eHalStatus sme_WowlDelBcastPattern (
1442 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001443 tpSirWowlDelBcastPtrn pattern,
1444 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001445
1446/* ---------------------------------------------------------------------------
1447 \fn sme_EnterWowl
1448 \brief This is the API to request entry into WOWL mode.
1449 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1450 SME will will cache the information that WOWL has been requested and
1451 attempt to put the device in BMPS first. On entry into BMPS, SME will
1452 enter the WOWL mode.
1453 Note 1: After WoWL request is accepted, If module other than HDD requests
1454 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1455 and attempt to put the chip into BMPS+WOWL based on a timer.
1456 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1457 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1458 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1459 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1460 are required. Currently there is no requirement or use case to support UAPSD
1461 and WOWL at the same time.
1462 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1463 Note 5. Request for WoWL is rejected if BMPS is disabled.
1464
1465 \param hHal - The handle returned by macOpen.
1466 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1467 Used for success/failure notification by SME
1468 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1469 at the time of callback.
1470 \param wakeReasonIndCB - Callback routine provided by HDD.
1471 Used for Wake Reason Indication by SME
1472 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1473 at the time of callback.
1474 \return eHalStatus
1475 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1476 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1477 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1478 mode is entered.
1479 ---------------------------------------------------------------------------*/
1480extern eHalStatus sme_EnterWowl (
1481 tHalHandle hHal,
1482 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1483 void *enterWowlCallbackContext,
1484#ifdef WLAN_WAKEUP_EVENTS
1485 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1486 void *wakeReasonIndCBContext,
1487#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001488 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001489
1490/* ---------------------------------------------------------------------------
1491 \fn sme_ExitWowl
1492 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1493 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1494 mode. Any Buffered request for WoWL will be cleared after this API.
1495 \param hHal - The handle returned by macOpen.
1496 \return eHalStatus
1497 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1498 only if the previous "Enter WOWL" transaction has
1499 not even completed.
1500 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1501 ---------------------------------------------------------------------------*/
1502extern eHalStatus sme_ExitWowl (tHalHandle hHal);
1503
1504/* ---------------------------------------------------------------------------
1505
1506 \fn sme_RoamSetKey
1507
1508 \brief To set encryption key. This function should be called only when connected
1509 This is an asynchronous API.
1510
1511 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1512
1513 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1514
1515 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1516
1517 FAILURE or RESOURCES The API finished and failed.
1518
1519 -------------------------------------------------------------------------------*/
1520eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1521
1522/* ---------------------------------------------------------------------------
1523
1524 \fn sme_RoamRemoveKey
1525
1526 \brief To set encryption key. This is an asynchronous API.
1527
1528 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1529
1530 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1531
1532 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1533
1534 FAILURE or RESOURCES The API finished and failed.
1535
1536 -------------------------------------------------------------------------------*/
1537eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1538
1539
1540/* ---------------------------------------------------------------------------
1541
1542 \fn sme_GetCountryCode
1543
1544 \brief To return the current country code. If no country code is applied, default country code is
1545 used to fill the buffer.
1546 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1547 This is a synchronous API.
1548
1549 \param pBuf - pointer to a caller allocated buffer for returned country code.
1550
1551 \param pbLen For input, this parameter indicates how big is the buffer.
1552 Upon return, this parameter has the number of bytes for country. If pBuf
1553 doesn't have enough space, this function returns
1554 fail status and this parameter contains the number that is needed.
1555
1556 \return eHalStatus SUCCESS.
1557
1558 FAILURE or RESOURCES The API finished and failed.
1559
1560 -------------------------------------------------------------------------------*/
1561eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1562
1563/* ---------------------------------------------------------------------------
1564
1565 \fn sme_SetCountryCode
1566
1567 \brief To change the current/default country code.
1568 If 11d supported is turned off, an error is return.
1569 This is a synchronous API.
1570
1571 \param pCountry - pointer to a caller allocated buffer for the country code.
1572
1573 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1574 whether a reset is required.
1575
1576 \return eHalStatus SUCCESS.
1577
1578 FAILURE or RESOURCES The API finished and failed.
1579
1580 -------------------------------------------------------------------------------*/
1581eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1582
1583/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301584
1585 \fn sme_InitChannels
1586
1587 \brief Used to initialize CSR channel lists while driver loading
1588
1589 \param hHal - global pMac structure
1590
1591 \return eHalStatus SUCCESS.
1592
1593 FAILURE or RESOURCES The API finished and failed.
1594
1595 -------------------------------------------------------------------------------*/
1596eHalStatus sme_InitChannels(tHalHandle hHal);
1597
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301598
1599/* ---------------------------------------------------------------------------
1600 \fn sme_InitChannelsForCC
1601
1602 \brief Used to issue regulatory hint to user
1603
1604 \param hHal - global pMac structure
1605
1606 \return eHalStatus SUCCESS.
1607
1608 FAILURE or RESOURCES The API finished and failed.
1609
1610 -------------------------------------------------------------------------------*/
1611eHalStatus sme_InitChannelsForCC(tHalHandle hHal);
1612
Mihir Shetee1093ba2014-01-21 20:13:32 +05301613/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001614 \fn sme_ResetCountryCodeInformation
1615 \brief this function is to reset the country code current being used back to EEPROM default
1616 this includes channel list and power setting. This is a synchronous API.
1617 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1618 a restart is needed to apply the change
1619 \return eHalStatus
1620 -------------------------------------------------------------------------------*/
1621eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1622
1623/* ---------------------------------------------------------------------------
1624 \fn sme_GetSupportedCountryCode
1625 \brief this function is to get a list of the country code current being supported
1626 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1627 this has the country code list. 3 bytes for each country code. This may be NULL if
1628 caller wants to know the needed byte count.
1629 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1630 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1631 \return eHalStatus
1632 -------------------------------------------------------------------------------*/
1633eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1634
1635/* ---------------------------------------------------------------------------
1636 \fn sme_GetCurrentRegulatoryDomain
1637 \brief this function is to get the current regulatory domain. This is a synchronous API.
1638 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1639 SME. The function fails if 11d support is turned off.
1640 \param pDomain - Caller allocated buffer to return the current domain.
1641 \return eHalStatus SUCCESS.
1642
1643 FAILURE or RESOURCES The API finished and failed.
1644 -------------------------------------------------------------------------------*/
1645eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1646
1647/* ---------------------------------------------------------------------------
1648 \fn sme_SetRegulatoryDomain
1649 \brief this function is to set the current regulatory domain.
1650 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1651 SME. This is a synchronous API.
1652 \param domainId - indicate the domain (defined in the driver) needs to set to.
1653 See v_REGDOMAIN_t for definition
1654 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1655 a restart is needed to apply the change
1656 \return eHalStatus
1657 -------------------------------------------------------------------------------*/
1658eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1659
1660/* ---------------------------------------------------------------------------
1661
1662 \fn sme_GetRegulatoryDomainForCountry
1663
1664 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1665
1666 \param pCountry - pointer to a caller allocated buffer for input country code.
1667
1668 \param pDomainId Upon successful return, it is the domain that country belongs to.
1669 If it is NULL, returning success means that the country code is known.
1670
1671 \return eHalStatus SUCCESS.
1672
1673 FAILURE or RESOURCES The API finished and failed.
1674
1675 -------------------------------------------------------------------------------*/
1676eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1677
1678
1679
1680/* ---------------------------------------------------------------------------
1681
1682 \fn sme_GetSupportedRegulatoryDomains
1683
1684 \brief To return a list of supported regulatory domains. This is a synchronous API.
1685
1686 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1687
1688 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1689 Upon return, this parameter has the number for supported domains. If pDomains
1690 doesn't have enough space for all the supported domains, this function returns
1691 fail status and this parameter contains the number that is needed.
1692
1693 \return eHalStatus SUCCESS.
1694
1695 FAILURE or RESOURCES The API finished and failed.
1696
1697 -------------------------------------------------------------------------------*/
1698eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1699
1700//some support functions
1701tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1702tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1703tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1704//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1705eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1706
1707typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1708/* ---------------------------------------------------------------------------
1709
1710 \fn sme_ChangeCountryCode
1711
1712 \brief Change Country code from upperlayer during WLAN driver operation.
1713 This is a synchronous API.
1714
1715 \param hHal - The handle returned by macOpen.
1716
1717 \param pCountry New Country Code String
1718
Abhishek Singha306a442013-11-07 18:39:01 +05301719 \param sendRegHint If we want to send reg hint to nl80211
1720
Jeff Johnson295189b2012-06-20 16:38:30 -07001721 \return eHalStatus SUCCESS.
1722
1723 FAILURE or RESOURCES The API finished and failed.
1724
1725 -------------------------------------------------------------------------------*/
1726eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1727 tSmeChangeCountryCallback callback,
1728 tANI_U8 *pCountry,
1729 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301730 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301731 tAniBool countryFromUserSpace,
1732 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001733
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301734/* ---------------------------------------------------------------------------
1735
Amar Singhal0d15bd52013-10-12 23:13:13 -07001736 \fn sme_GenericChangeCountryCode
1737
1738 \brief Generic API to change country code
1739
1740 \param hHal - The handle returned by macOpen.
1741
1742 \param pCountry New Country Code String
1743
1744 \param reg_domain Regulatory domain for the new country code
1745
1746 \return eHalStatus SUCCESS.
1747
1748 FAILURE or RESOURCES The API finished and failed.
1749
1750 -------------------------------------------------------------------------------*/
1751eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1752 tANI_U8 *pCountry,
1753 v_REGDOMAIN_t reg_domain);
1754
1755/* ---------------------------------------------------------------------------
1756
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301757 \fn sme_DHCPStartInd
1758
1759 \brief Indicate FW about DHCP start event.
1760
1761 \param hHal - The handle returned by macOpen.
1762
1763 \param device_mode the mode of the device
1764
c_hpothu0b0cab72014-02-13 21:52:40 +05301765 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301766
1767 \return eHalStatus SUCCESS.
1768
1769 FAILURE or RESOURCES The API finished and failed.
1770
1771 -------------------------------------------------------------------------------*/
1772
1773eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1774 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301775 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301776
1777/* ---------------------------------------------------------------------------
1778
1779 \fn sme_DHCPStopInd
1780
1781 \brief Indicate FW about DHCP stop event.
1782
1783 \param hHal - The handle returned by macOpen.
1784
1785 \param device_mode the mode of the device
1786
c_hpothu0b0cab72014-02-13 21:52:40 +05301787 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301788
1789 \return eHalStatus SUCCESS.
1790
1791 FAILURE or RESOURCES The API finished and failed.
1792
1793 -------------------------------------------------------------------------------*/
1794eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1795 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301796 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301797
Jeff Johnson295189b2012-06-20 16:38:30 -07001798
1799/* ---------------------------------------------------------------------------
1800 \fn sme_BtcSignalBtEvent
1801 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1802 BT event type and the current operating mode of Libra (full power,
1803 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1804 would be employed.
1805 \param hHal - The handle returned by macOpen.
1806 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1807 Caller owns the memory and is responsible for freeing it.
1808 \return VOS_STATUS
1809 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1810 if driver has not yet been initialized or if BTC
1811 Events Layer has been disabled.
1812 VOS_STATUS_SUCCESS BT Event passed to HAL
1813 ---------------------------------------------------------------------------*/
1814VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1815
1816/* ---------------------------------------------------------------------------
1817 \fn sme_BtcSetConfig
1818 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1819 This function should be invoked only after CFG download has completed.
1820 Calling it after sme_HDDReadyInd is recommended.
1821 \param hHal - The handle returned by macOpen.
1822 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1823 tSmeBtcConfig. Caller owns the memory and is responsible
1824 for freeing it.
1825 \return VOS_STATUS
1826 VOS_STATUS_E_FAILURE Config not passed to HAL.
1827 VOS_STATUS_SUCCESS Config passed to HAL
1828 ---------------------------------------------------------------------------*/
1829VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1830
1831/* ---------------------------------------------------------------------------
1832 \fn sme_BtcGetConfig
1833 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1834 \param hHal - The handle returned by macOpen.
1835 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1836 Caller owns the memory and is responsible for freeing it.
1837 \return VOS_STATUS
1838 VOS_STATUS_E_FAILURE - failure
1839 VOS_STATUS_SUCCESS success
1840 ---------------------------------------------------------------------------*/
1841VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1842
1843/* ---------------------------------------------------------------------------
1844 \fn sme_SetCfgPrivacy
1845 \brief API to set configure privacy parameters
1846 \param hHal - The handle returned by macOpen.
1847 \param pProfile - Pointer CSR Roam profile.
1848 \param fPrivacy - This parameter indicates status of privacy
1849
1850 \return void
1851 ---------------------------------------------------------------------------*/
1852void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1853
1854#if defined WLAN_FEATURE_VOWIFI
1855/* ---------------------------------------------------------------------------
1856 \fn sme_NeighborReportRequest
1857 \brief API to request neighbor report.
1858 \param hHal - The handle returned by macOpen.
1859 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1860 tRrmNeighborReq. Caller owns the memory and is responsible
1861 for freeing it.
1862 \return VOS_STATUS
1863 VOS_STATUS_E_FAILURE - failure
1864 VOS_STATUS_SUCCESS success
1865 ---------------------------------------------------------------------------*/
1866VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1867 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1868#endif
1869
1870//The following are debug APIs to support direct read/write register/memory
1871//They are placed in SME because HW cannot be access when in LOW_POWER state
1872//AND not connected. The knowledge and synchronization is done in SME
1873
1874//sme_DbgReadRegister
1875//Caller needs to validate the input values
1876VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1877
1878//sme_DbgWriteRegister
1879//Caller needs to validate the input values
1880VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1881
1882//sme_DbgReadMemory
1883//Caller needs to validate the input values
1884//pBuf caller allocated buffer has the length of nLen
1885VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1886
1887//sme_DbgWriteMemory
1888//Caller needs to validate the input values
1889VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1890
Jeff Johnson295189b2012-06-20 16:38:30 -07001891VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1892 tSirVersionType *pVersion);
1893VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1894 tSirVersionType *pVersion);
1895VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1896 tANI_U8 *pVersion,
1897 tANI_U32 versionBufferSize);
1898VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1899 tANI_U8 *pVersion,
1900 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001901eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1902 csrRoamCompleteCallback callback,
1903 void *pContext);
1904
1905#ifdef FEATURE_WLAN_WAPI
1906/* ---------------------------------------------------------------------------
1907 \fn sme_RoamSetBKIDCache
1908 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1909 candidate list.
1910 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1911 it is opened (by calling halOpen).
1912 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1913 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1914 when retruning, this is the number of items put into pBKIDCache
1915 \return eHalStatus - when fail, it usually means the buffer allocated is not
1916 big enough and pNumItems has the number of tBkidCacheInfo.
1917 ---------------------------------------------------------------------------*/
1918eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1919 tANI_U32 numItems );
1920
1921/* ---------------------------------------------------------------------------
1922 \fn sme_RoamGetBKIDCache
1923 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1924 BKID cache.
1925 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1926 it is opened (by calling halOpen).
1927 \param pNum - caller allocated memory that has the space of the number of
1928 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1929 in SME cache.
1930 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1931 upon return
1932 \return eHalStatus - when fail, it usually means the buffer allocated is not
1933 big enough.
1934 ---------------------------------------------------------------------------*/
1935eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1936 tBkidCacheInfo *pBkidCache);
1937
1938/* ---------------------------------------------------------------------------
1939 \fn sme_RoamGetNumBKIDCache
1940 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1941 number of BKID cache entries.
1942 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1943 it is opened (by calling halOpen).
1944 \return tANI_U32 - the number of BKID cache entries.
1945 ---------------------------------------------------------------------------*/
1946tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1947
1948/* ---------------------------------------------------------------------------
1949 \fn sme_ScanGetBKIDCandidateList
1950 \brief a wrapper function to return the BKID candidate list
1951 \param pBkidList - caller allocated buffer point to an array of
1952 tBkidCandidateInfo
1953 \param pNumItems - pointer to a variable that has the number of
1954 tBkidCandidateInfo allocated when retruning, this is
1955 either the number needed or number of items put into
1956 pPmkidList
1957 \return eHalStatus - when fail, it usually means the buffer allocated is not
1958 big enough and pNumItems
1959 has the number of tBkidCandidateInfo.
1960 \Note: pNumItems is a number of tBkidCandidateInfo,
1961 not sizeof(tBkidCandidateInfo) * something
1962 ---------------------------------------------------------------------------*/
1963eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1964 tBkidCandidateInfo *pBkidList,
1965 tANI_U32 *pNumItems );
1966#endif /* FEATURE_WLAN_WAPI */
1967
Jeff Johnsone7245742012-09-05 17:12:55 -07001968#ifdef FEATURE_OEM_DATA_SUPPORT
1969/********************************************************************************************
1970 Oem data related modifications
1971*********************************************************************************************/
1972/* ---------------------------------------------------------------------------
1973 \fn sme_OemDataReq
1974 \param sessionId - session id of session to be used for oem data req.
1975 \param pOemDataReqID - pointer to an object to get back the request ID
1976 \param callback - a callback function that is called upon finish
1977 \param pContext - a pointer passed in for the callback
1978 \return eHalStatus
1979 ---------------------------------------------------------------------------*/
1980eHalStatus sme_OemDataReq(tHalHandle hHal,
1981 tANI_U8 sessionId,
1982 tOemDataReqConfig *,
1983 tANI_U32 *pOemDataReqID,
1984 oemData_OemDataReqCompleteCallback callback,
1985 void *pContext);
1986
1987/* ---------------------------------------------------------------------------
1988 \fn sme_getOemDataRsp
1989 \param pOemDataRsp - A pointer to the response object
1990 \param pOemDataReqID - pointer to an object to get back the request ID
1991 \return eHalStatus
1992 ---------------------------------------------------------------------------*/
1993eHalStatus sme_getOemDataRsp(tHalHandle hHal,
1994 tOemDataRsp **pOemDataRsp);
1995
1996#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07001997
1998
Jeff Johnson295189b2012-06-20 16:38:30 -07001999
2000/* ---------------------------------------------------------------------------
2001
2002 \fn sme_RoamUpdateAPWPSIE
2003
2004 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2005 This is an asynchronous API.
2006
2007 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2008
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002009 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002010
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002011 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002012
2013 -------------------------------------------------------------------------------*/
2014
2015eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2016/* ---------------------------------------------------------------------------
2017
2018 \fn sme_RoamUpdateAPWPARSNIEs
2019
2020 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2021 This is an asynchronous API.
2022
2023 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2024
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002025 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002026
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002027 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002028
2029 -------------------------------------------------------------------------------*/
2030eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2031
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002032/* ---------------------------------------------------------------------------
2033
2034 sme_ChangeMCCBeaconInterval
2035
2036 \brief To update P2P-GO's beacon Interval.
2037
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002038 \return eHalStatus SUCCESS
2039 FAILURE or RESOURCES
2040 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002041 -------------------------------------------------------------------------------*/
2042eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2043
2044
Jeff Johnson295189b2012-06-20 16:38:30 -07002045
2046/* ---------------------------------------------------------------------------
2047 \fn sme_sendBTAmpEvent
2048 \brief API to send the btAMPstate to FW
2049 \param hHal - The handle returned by macOpen.
2050 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002051 \return eHalStatus SUCCESS
2052 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002053
2054--------------------------------------------------------------------------- */
2055
2056eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2057
2058
2059
2060/* ---------------------------------------------------------------------------
2061 \fn sme_SetHostOffload
2062 \brief API to set the host offload feature.
2063 \param hHal - The handle returned by macOpen.
2064 \param pRequest - Pointer to the offload request.
2065 \return eHalStatus
2066 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002067eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2068 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002069
2070/* ---------------------------------------------------------------------------
2071 \fn sme_SetKeepAlive
2072 \brief API to set the Keep Alive feature.
2073 \param hHal - The handle returned by macOpen.
2074 \param pRequest - Pointer to the Keep Alive request.
2075 \return eHalStatus
2076 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002077eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2078 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002079
Jeff Johnson295189b2012-06-20 16:38:30 -07002080/* ----------------------------------------------------------------------------
2081 \fn sme_GetOperationChannel
2082 \brief API to get current channel on which STA is parked
2083 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002084 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002085 \returns eHAL_STATUS_SUCCESS
2086 eHAL_STATUS_FAILURE
2087-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002088eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002089
Jeff Johnson295189b2012-06-20 16:38:30 -07002090/* ---------------------------------------------------------------------------
2091
2092 \fn sme_RegisterMgtFrame
2093
2094 \brief To register managment frame of specified type and subtype.
2095 \param frameType - type of the frame that needs to be passed to HDD.
2096 \param matchData - data which needs to be matched before passing frame
2097 to HDD.
2098 \param matchDataLen - Length of matched data.
2099 \return eHalStatus
2100 -------------------------------------------------------------------------------*/
2101eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2102 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2103
2104/* ---------------------------------------------------------------------------
2105
2106 \fn sme_DeregisterMgtFrame
2107
2108 \brief To De-register managment frame of specified type and subtype.
2109 \param frameType - type of the frame that needs to be passed to HDD.
2110 \param matchData - data which needs to be matched before passing frame
2111 to HDD.
2112 \param matchDataLen - Length of matched data.
2113 \return eHalStatus
2114 -------------------------------------------------------------------------------*/
2115eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2116 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07002117
2118/* ---------------------------------------------------------------------------
2119
2120 \fn sme_ConfigureRxpFilter
2121
2122 \brief
2123 SME will pass this request to lower mac to set/reset the filter on RXP for
2124 multicast & broadcast traffic.
2125
2126 \param
2127
2128 hHal - The handle returned by macOpen.
2129
2130 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2131 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2132 on this param. In future we can use this as a mask to set various types of
2133 filters as suggested below:
2134 FILTER_ALL_MULTICAST:
2135 FILTER_ALL_BROADCAST:
2136 FILTER_ALL_MULTICAST_BROADCAST:
2137
2138
2139 \return eHalStatus
2140
2141
2142--------------------------------------------------------------------------- */
2143eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2144 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2145
2146/* ---------------------------------------------------------------------------
2147
2148 \fn sme_ConfigureAppsCpuWakeupState
2149
2150 \brief
2151 SME will pass this request to lower mac to dynamically adjusts the listen
2152 interval based on the WLAN/MSM activity. This feature is named as
2153 Telescopic Beacon wakeup feature.
2154
2155 \param
2156
2157 hHal - The handle returned by macOpen.
2158
2159 isAppsAwake- Depicts the state of the Apps CPU
2160
2161
2162 \return eHalStatus
2163
2164
2165--------------------------------------------------------------------------- */
2166eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2167
Jeff Johnson295189b2012-06-20 16:38:30 -07002168/* ---------------------------------------------------------------------------
2169
2170 \fn sme_ConfigureSuspendInd
2171
2172 \brief
2173 SME will pass this request to lower mac to Indicate that the wlan needs to
2174 be suspended
2175
2176 \param
2177
2178 hHal - The handle returned by macOpen.
2179
2180 wlanSuspendParam- Depicts the wlan suspend params
2181
2182
2183 \return eHalStatus
2184
2185
2186--------------------------------------------------------------------------- */
2187eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2188 tpSirWlanSuspendParam wlanSuspendParam);
2189
2190/* ---------------------------------------------------------------------------
2191
2192 \fn sme_ConfigureResumeReq
2193
2194 \brief
2195 SME will pass this request to lower mac to Indicate that the wlan needs to
2196 be Resumed
2197
2198 \param
2199
2200 hHal - The handle returned by macOpen.
2201
2202 wlanResumeParam- Depicts the wlan resume params
2203
2204
2205 \return eHalStatus
2206
2207
2208--------------------------------------------------------------------------- */
2209eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2210 tpSirWlanResumeParam wlanResumeParam);
2211
Jeff Johnson295189b2012-06-20 16:38:30 -07002212
2213/* ---------------------------------------------------------------------------
2214
2215 \fn sme_GetInfraSessionId
2216
2217 \brief To get the session ID for infra session, if connected
2218 This is a synchronous API.
2219
2220 \param hHal - The handle returned by macOpen.
2221
2222 \return sessionid, -1 if infra session is not connected
2223
2224 -------------------------------------------------------------------------------*/
2225tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2226
2227/* ---------------------------------------------------------------------------
2228
2229 \fn sme_GetInfraOperationChannel
2230
2231 \brief To get the operating channel for infra session, if connected
2232 This is a synchronous API.
2233
2234 \param hHal - The handle returned by macOpen.
2235 \param sessionId - the sessionId returned by sme_OpenSession.
2236
2237 \return operating channel, 0 if infra session is not connected
2238
2239 -------------------------------------------------------------------------------*/
2240tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2241/* ---------------------------------------------------------------------------
2242
2243 \fn sme_GetConcurrentOperationChannel
2244
2245 \brief To get the operating channel for other concurrent sessions, if connected
2246 This is a synchronous API.
2247
2248 \param hHal - The handle returned by macOpen.
2249 \param currentPersona - persona that is trying to come up.
2250
2251 \return operating channel, 0 if infra session is not connected
2252
2253 -------------------------------------------------------------------------------*/
2254tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2255
2256/* ---------------------------------------------------------------------------
2257 \fn sme_AbortMacScan
2258 \brief API to cancel MAC scan.
2259 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302260 \param sessionId - sessionId for interface
Jeff Johnson295189b2012-06-20 16:38:30 -07002261 \return VOS_STATUS
2262 VOS_STATUS_E_FAILURE - failure
2263 VOS_STATUS_SUCCESS success
2264 ---------------------------------------------------------------------------*/
Srinivas, Dasari138af4f2014-02-07 11:13:45 +05302265eHalStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2266 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002267
2268/* ---------------------------------------------------------------------------
2269 \fn sme_GetCfgValidChannels
2270 \brief API to get valid channel list
2271 \param hHal - The handle returned by macOpen.
2272 \param aValidChannels - Pointer to the valid channel list
2273 \param len - valid channel list length
2274 \return eHalStatus
2275 ---------------------------------------------------------------------------*/
2276eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2277
2278#ifdef FEATURE_WLAN_SCAN_PNO
2279
2280/* ---------------------------------------------------------------------------
2281 \fn sme_SetPreferredNetworkList
2282 \brief API to set the Preferred Network List Offload feature.
2283 \param hHal - The handle returned by macOpen.
2284 \param pRequest - Pointer to the offload request.
2285 \return eHalStatus
2286 ---------------------------------------------------------------------------*/
2287eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2288
2289/* ---------------------------------------------------------------------------
2290 \fn sme_SetRSSIFilter
2291 \brief API to set RSSI Filter feature.
2292 \param hHal - The handle returned by macOpen.
2293 \param pRequest - Pointer to the offload request.
2294 \return eHalStatus
2295 ---------------------------------------------------------------------------*/
2296eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2297
2298/******************************************************************************
2299*
2300* Name: sme_PreferredNetworkFoundInd
2301*
2302* Description:
2303* Invoke Preferred Network Found Indication
2304*
2305* Parameters:
2306* hHal - HAL handle for device
2307* pMsg - found network description
2308*
2309* Returns: eHalStatus
2310*
2311******************************************************************************/
2312eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2313#endif // FEATURE_WLAN_SCAN_PNO
2314
2315/* ---------------------------------------------------------------------------
2316 \fn sme_SetPowerParams
2317 \brief API to set Power Parameters
2318 \param hHal - The handle returned by macOpen.
2319 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002320 \param forced - if true, not to be dropped silently in host, it must reach
2321 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2322 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002323 \return eHalStatus
2324 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002325eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002326
2327/* ---------------------------------------------------------------------------
2328 \fn sme_SetTxPerTracking
2329 \brief Set Tx PER tracking configuration parameters
2330 \param hHal - The handle returned by macOpen.
2331 \param pTxPerTrackingParam - Tx PER configuration parameters
2332 \return eHalStatus
2333 ---------------------------------------------------------------------------*/
2334eHalStatus sme_SetTxPerTracking (
2335 tHalHandle hHal,
2336 void (*pCallbackfn) (void *pCallbackContext),
2337 void *pCallbackContext,
2338 tpSirTxPerTrackingParam pTxPerTrackingParam);
2339
2340#ifdef WLAN_FEATURE_PACKET_FILTERING
2341/* ---------------------------------------------------------------------------
2342 \fn sme_ReceiveFilterSetFilter
2343 \brief API to set 8023 Multicast Address List
2344 \param hHal - The handle returned by macOpen.
2345 \param pMulticastAddrs - Pointer to the Multicast Address List
2346 \return eHalStatus
2347 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002348eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002349
2350/* ---------------------------------------------------------------------------
2351 \fn sme_ReceiveFilterSetFilter
2352 \brief API to set Receive Packet Filter
2353 \param hHal - The handle returned by macOpen.
2354 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2355 \return eHalStatus
2356 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002357eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2358 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002359
2360/* ---------------------------------------------------------------------------
2361 \fn sme_GetFilterMatchCount
2362 \brief API to get D0 PC Filter Match Count
2363 \param hHal - The handle returned by macOpen
2364 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2365 \param callbackContext - Cookie to be passed back during callback
2366 \return eHalStatus
2367 ---------------------------------------------------------------------------*/
2368eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2369 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002370 void *callbackContext,
2371 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002372
2373/* ---------------------------------------------------------------------------
2374 \fn sme_ReceiveFilterClearFilter
2375 \brief API to clear Receive Packet Filter
2376 \param hHal - The handle returned by macOpen.
2377 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2378 \return eHalStatus
2379 ---------------------------------------------------------------------------*/
2380eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002381 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2382 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002383#endif // WLAN_FEATURE_PACKET_FILTERING
2384/* ---------------------------------------------------------------------------
2385
2386 \fn sme_IsChannelValid
2387 \brief To check if the channel is valid for currently established domain
2388 This is a synchronous API.
2389
2390 \param hHal - The handle returned by macOpen.
2391 \param channel - channel to verify
2392
2393 \return TRUE/FALSE, TRUE if channel is valid
2394
2395 -------------------------------------------------------------------------------*/
2396tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2397
2398/* ---------------------------------------------------------------------------
2399 \fn sme_SetFreqBand
2400 \brief Used to set frequency band.
2401 \param hHal
2402 \eBand band value to be configured
2403 \- return eHalStatus
2404 -------------------------------------------------------------------------*/
2405eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2406
2407/* ---------------------------------------------------------------------------
2408 \fn sme_GetFreqBand
2409 \brief Used to get the current band settings.
2410 \param hHal
2411 \pBand pointer to hold the current band value
2412 \- return eHalStatus
2413 -------------------------------------------------------------------------*/
2414eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2415
2416/* ---------------------------------------------------------------------------
2417
2418 \fn sme_SetTxPerTracking
2419 \brief Set Tx PER tracking configuration parameters
2420 \param hHal - The handle returned by macOpen.
2421 \param pTxPerTrackingParam - Tx PER configuration parameters
2422 \return eHalStatus
2423 ---------------------------------------------------------------------------*/
2424eHalStatus sme_SetTxPerTracking (
2425 tHalHandle hHal,
2426 void (*pCallbackfn) (void *pCallbackContext),
2427 void *pCallbackContext,
2428 tpSirTxPerTrackingParam pTxPerTrackingParam);
2429
2430#ifdef WLAN_FEATURE_GTK_OFFLOAD
2431/* ---------------------------------------------------------------------------
2432 \fn sme_SetGTKOffload
2433 \brief API to set GTK offload feature.
2434 \param hHal - The handle returned by macOpen.
2435 \param pRequest - Pointer to the GTK offload request.
2436 \return eHalStatus
2437 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002438eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002439
2440/* ---------------------------------------------------------------------------
2441 \fn sme_GetGTKOffload
2442 \brief API to get GTK offload information.
2443 \param hHal - The handle returned by macOpen.
2444 \param pRequest - Pointer to the GTK offload response.
2445 \return eHalStatus
2446 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002447eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2448 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002449#endif // WLAN_FEATURE_GTK_OFFLOAD
2450
2451#ifdef WLAN_WAKEUP_EVENTS
2452eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2453#endif // WLAN_WAKEUP_EVENTS
2454
2455/* ---------------------------------------------------------------------------
2456 \fn sme_SetTxPerTracking
2457 \brief Set Tx PER tracking configuration parameters
2458 \param hHal - The handle returned by macOpen.
2459 \param pTxPerTrackingParam - Tx PER configuration parameters
2460 \return eHalStatus
2461 ---------------------------------------------------------------------------*/
2462eHalStatus sme_SetTxPerTracking (
2463 tHalHandle hHal,
2464 void (*pCallbackfn) (void *pCallbackContext),
2465 void *pCallbackContext,
2466 tpSirTxPerTrackingParam pTxPerTrackingParam);
2467
2468
2469//return frequency for a particular channel
2470tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2471
2472tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2473
2474#if defined WLAN_FEATURE_P2P_INTERNAL
2475
2476eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2477
2478/* ---------------------------------------------------------------------------
2479 \fn sme_p2pFlushDeviceList
2480 \brief Remove cached P2P result from scan results
2481 \param hHal - The handle returned by macOpen.
2482 \param HDDSessionId - HDD's sessionId. Currently unused.
2483 \return eHalStatus
2484 ---------------------------------------------------------------------------*/
2485eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2486
2487eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2488 tCsrScanResultFilter *pFilter);
2489
2490#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2491
2492/* ---------------------------------------------------------------------------
2493 \fn sme_SetMaxTxPower
2494 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2495 setting will not persist over reboots
2496 \param hHal
2497 \param pBssid BSSID to set the power cap for
2498 \param pBssid pSelfMacAddress self MAC Address
2499 \param pBssid power to set in dB
2500 \- return eHalStatus
2501 -------------------------------------------------------------------------*/
2502eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2503 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2504
Jeff Johnson295189b2012-06-20 16:38:30 -07002505/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002506 \fn sme_SetMaxTxPowerPerBand
2507 \brief Used to set the Maximum Transmit Power for
2508 specific band dynamically. Note: this setting will not persist over reboots
2509 \param band
2510 \param power to set in dB
2511 \- return eHalStatus
2512 -------------------------------------------------------------------------*/
2513eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2514
2515/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002516
schang86c22c42013-03-13 18:41:24 -07002517 \fn sme_SetTxPower
2518
2519 \brief Set Transmit Power dynamically. Note: this setting will
2520 not persist over reboots.
2521
2522 \param hHal
2523 \param sessionId Target Session ID
2524 \param mW power to set in mW
2525 \- return eHalStatus
2526
2527 -------------------------------------------------------------------------------*/
2528eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2529
2530/* ---------------------------------------------------------------------------
2531
Jeff Johnson295189b2012-06-20 16:38:30 -07002532 \fn sme_HideSSID
2533
2534 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2535 not persist over reboots.
2536
2537 \param hHal
2538 \param sessionId
2539 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2540 \- return eHalStatus
2541
2542 -------------------------------------------------------------------------------*/
2543eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002544
2545/* ---------------------------------------------------------------------------
2546
2547 \fn sme_SetTmLevel
2548 \brief Set Thermal Mitigation Level to RIVA
2549 \param hHal - The handle returned by macOpen.
2550 \param newTMLevel - new Thermal Mitigation Level
2551 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002552 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002553 ---------------------------------------------------------------------------*/
2554eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2555
2556/*---------------------------------------------------------------------------
2557
2558 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2559 Host and FW.
2560
2561 \param hHal - HAL handle for device
2562
2563 \return NONE
2564
2565---------------------------------------------------------------------------*/
2566void sme_featureCapsExchange(tHalHandle hHal);
2567
Jeff Johnsond13512a2012-07-17 11:42:19 -07002568/*---------------------------------------------------------------------------
2569
Yathish9f22e662012-12-10 14:21:35 -08002570 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2571 between in Host.
2572
2573 \param hHal - HAL handle for device
2574
2575 \return NONE
2576
2577---------------------------------------------------------------------------*/
2578void sme_disableFeatureCapablity(tANI_U8 feature_index);
2579
2580/*---------------------------------------------------------------------------
2581
Jeff Johnsond13512a2012-07-17 11:42:19 -07002582 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2583 country code
2584 Host and FW.
2585
2586 \param hHal - HAL handle for device
2587 \param pCountry - pointer to country code
2588
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002589 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002590
2591 ---------------------------------------------------------------------------*/
2592eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2593
2594/*---------------------------------------------------------------------------
2595
2596 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2597 country code.
2598
2599 \param hHal - HAL handle for device
2600 \param pCountry - pointer to country code
2601
2602 \return Success or failure
2603
2604 ---------------------------------------------------------------------------*/
2605eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2606
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002607/* ---------------------------------------------------------------------------
2608 \fn sme_transportDebug
2609 \brief Dynamically monitoring Transport channels
2610 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002611 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002612 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002613 \param toggleStallDetect Enable stall detect feature
2614 This feature will take effect to data performance
2615 Not integrate till fully verification
2616 \- return NONE
2617 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002618void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002619
Kiran4a17ebe2013-01-31 10:43:43 -08002620/* ---------------------------------------------------------------------------
2621 \fn sme_ResetPowerValuesFor5G
2622 \brief Reset the power values for 5G band with NV power values.
2623 \param hHal - HAL handle for device
2624 \- return NONE
2625 -------------------------------------------------------------------------*/
2626void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2627
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002628#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002629/* ---------------------------------------------------------------------------
2630 \fn sme_UpdateRoamPrefer5GHz
2631 \brief enable/disable Roam prefer 5G runtime option
2632 This function is called through dynamic setConfig callback function
2633 to configure the Roam prefer 5G runtime option
2634 \param hHal - HAL handle for device
2635 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2636 \- return Success or failure
2637 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002638eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002639
2640/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002641 \fn sme_setRoamIntraBand
2642 \brief enable/disable Intra band roaming
2643 This function is called through dynamic setConfig callback function
2644 to configure the intra band roaming
2645 \param hHal - HAL handle for device
2646 \param nRoamIntraBand Enable/Disable Intra band roaming
2647 \- return Success or failure
2648 -------------------------------------------------------------------------*/
2649eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2650
2651/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002652 \fn sme_UpdateRoamScanNProbes
2653 \brief function to update roam scan N probes
2654 This function is called through dynamic setConfig callback function
2655 to update roam scan N probes
2656 \param hHal - HAL handle for device
2657 \param nProbes number of probe requests to be sent out
2658 \- return Success or failure
2659 -------------------------------------------------------------------------*/
2660eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2661
2662/* ---------------------------------------------------------------------------
2663 \fn sme_UpdateRoamScanHomeAwayTime
2664 \brief function to update roam scan Home away time
2665 This function is called through dynamic setConfig callback function
2666 to update roam scan home away time
2667 \param hHal - HAL handle for device
2668 \param nRoamScanAwayTime Scan home away time
2669 \- return Success or failure
2670 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002671eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2672 const v_U16_t nRoamScanHomeAwayTime,
2673 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002674
2675/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002676 \fn sme_getRoamIntraBand
2677 \brief get Intra band roaming
2678 \param hHal - HAL handle for device
2679 \- return Success or failure
2680 -------------------------------------------------------------------------*/
2681v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2682
2683/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002684 \fn sme_getRoamScanNProbes
2685 \brief get N Probes
2686 \param hHal - HAL handle for device
2687 \- return Success or failure
2688 -------------------------------------------------------------------------*/
2689v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2690
2691/* ---------------------------------------------------------------------------
2692 \fn sme_getRoamScanHomeAwayTime
2693 \brief get Roam scan home away time
2694 \param hHal - HAL handle for device
2695 \- return Success or failure
2696 -------------------------------------------------------------------------*/
2697v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2698
2699/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002700 \fn sme_UpdateImmediateRoamRssiDiff
2701 \brief Update nImmediateRoamRssiDiff
2702 This function is called through dynamic setConfig callback function
2703 to configure nImmediateRoamRssiDiff
2704 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2705 \param hHal - HAL handle for device
2706 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2707 candidate and current AP.
2708 \- return Success or failure
2709 -------------------------------------------------------------------------*/
2710
2711eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002712
Srinivas Girigowdade697412013-02-14 16:31:48 -08002713/* ---------------------------------------------------------------------------
2714 \fn sme_UpdateRoamRssiDiff
2715 \brief Update RoamRssiDiff
2716 This function is called through dynamic setConfig callback function
2717 to configure RoamRssiDiff
2718 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2719 \param hHal - HAL handle for device
2720 \param RoamRssiDiff - minimum rssi difference between potential
2721 candidate and current AP.
2722 \- return Success or failure
2723 -------------------------------------------------------------------------*/
2724
2725eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2726
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002727/*--------------------------------------------------------------------------
2728 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2729 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2730 isFastTransitionEnabled.
2731 This is a synchronuous call
2732 \param hHal - The handle returned by macOpen.
2733 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2734 Other status means SME is failed to update isFastTransitionEnabled.
2735 \sa
2736 --------------------------------------------------------------------------*/
2737
2738eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2739 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002740
2741/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002742 \fn sme_UpdateWESMode
2743 \brief Update WESMode
2744 This function is called through dynamic setConfig callback function
2745 to configure isWESModeEnabled
2746 \param hHal - HAL handle for device
2747 \param isWESModeEnabled - Enable/Disable WES Mode
2748 \- return Success or failure
2749 -------------------------------------------------------------------------*/
2750eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2751
2752/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002753 \fn sme_SetRoamScanControl
2754 \brief Set roam scan control
2755 This function is called to set roam scan control
2756 if roam scan control is set to 0, roaming scan cache is cleared
2757 any value other than 0 is treated as invalid value
2758 \param hHal - HAL handle for device
2759 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2760 Other status means SME failure to update
2761 -------------------------------------------------------------------------*/
2762eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002763#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002764
2765#ifdef FEATURE_WLAN_LFR
2766/*--------------------------------------------------------------------------
2767 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002768 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002769 isFastRoamIniFeatureEnabled.
2770 This is a synchronuous call
2771 \param hHal - The handle returned by macOpen.
2772 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2773 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2774 \sa
2775 --------------------------------------------------------------------------*/
2776
Srinivas Girigowdade697412013-02-14 16:31:48 -08002777eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002778 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002779
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002780/*--------------------------------------------------------------------------
2781 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2782 Enable/disable LFR MAWC support at runtime
2783 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2784 isMAWCIniFeatureEnabled.
2785 This is a synchronous call
2786 \param hHal - The handle returned by macOpen.
2787 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2788 Other status means SME is failed to update MAWCEnabled.
2789 \sa
2790 --------------------------------------------------------------------------*/
2791eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2792 const v_BOOL_t MAWCEnabled);
2793
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002794
2795#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2796/*--------------------------------------------------------------------------
2797 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2798 This is a synchronuous call
2799 \param hHal - The handle returned by macOpen.
2800 \return eHAL_STATUS_SUCCESS
2801 Other status means SME is failed
2802 \sa
2803 --------------------------------------------------------------------------*/
2804
2805eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2806 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2807#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002808#endif /* FEATURE_WLAN_LFR */
2809
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002810#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002811/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002812 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002813 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002814 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002815 This is a synchronuous call
2816 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002817 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2818 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002819 \sa
2820 --------------------------------------------------------------------------*/
2821
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002822eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2823 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002824
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002825#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002826
2827/*--------------------------------------------------------------------------
2828 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2829 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2830 fEnableFwRssiMonitoring.
2831 This is a synchronuous call
2832 \param hHal - The handle returned by macOpen.
2833 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2834 Other status means SME is failed to update
2835 \sa
2836 --------------------------------------------------------------------------*/
2837
2838eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2839 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002840
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002841#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002842/*--------------------------------------------------------------------------
2843 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2844 This is a synchronuous call
2845 \param hHal - The handle returned by macOpen.
2846 \return eHAL_STATUS_SUCCESS - SME update config successful.
2847 Other status means SME is failed to update
2848 \sa
2849 --------------------------------------------------------------------------*/
2850eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2851 v_U8_t neighborLookupRssiThreshold);
2852
2853/*--------------------------------------------------------------------------
2854 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2855 This is a synchronuous call
2856 \param hHal - The handle returned by macOpen.
2857 \return eHAL_STATUS_SUCCESS - SME update config successful.
2858 Other status means SME is failed to update
2859 \sa
2860 --------------------------------------------------------------------------*/
2861eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2862 v_U8_t neighborReassocRssiThreshold);
2863
2864/*--------------------------------------------------------------------------
2865 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2866 This is a synchronuous call
2867 \param hHal - The handle returned by macOpen.
2868 \return eHAL_STATUS_SUCCESS - SME update config successful.
2869 Other status means SME is failed to update
2870 \sa
2871 --------------------------------------------------------------------------*/
2872v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2873
2874/*--------------------------------------------------------------------------
2875 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2876 This is a synchronuous call
2877 \param hHal - The handle returned by macOpen.
2878 \return eHAL_STATUS_SUCCESS - SME update config successful.
2879 Other status means SME is failed to update
2880 \sa
2881 --------------------------------------------------------------------------*/
2882eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2883 v_U16_t neighborScanResultsRefreshPeriod);
2884
2885/*--------------------------------------------------------------------------
2886 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2887 This is a synchronuous call
2888 \param hHal - The handle returned by macOpen.
2889 \return eHAL_STATUS_SUCCESS - SME update config successful.
2890 Other status means SME is failed to update
2891 \sa
2892 --------------------------------------------------------------------------*/
2893v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2894
2895/*--------------------------------------------------------------------------
2896 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2897 This is a synchronuous call
2898 \param hHal - The handle returned by macOpen.
2899 \return eHAL_STATUS_SUCCESS - SME update config successful.
2900 Other status means SME is failed to update
2901 \sa
2902 --------------------------------------------------------------------------*/
2903v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2904
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002905/* ---------------------------------------------------------------------------
2906 \fn sme_UpdateEmptyScanRefreshPeriod
2907 \brief Update nEmptyScanRefreshPeriod
2908 This function is called through dynamic setConfig callback function
2909 to configure nEmptyScanRefreshPeriod
2910 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2911 \param hHal - HAL handle for device
2912 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2913 \- return Success or failure
2914 -------------------------------------------------------------------------*/
2915eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2916
2917/* ---------------------------------------------------------------------------
2918 \fn sme_setNeighborScanMinChanTime
2919 \brief Update nNeighborScanMinChanTime
2920 This function is called through dynamic setConfig callback function
2921 to configure gNeighborScanChannelMinTime
2922 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2923 \param hHal - HAL handle for device
2924 \param nNeighborScanMinChanTime - Channel minimum dwell time
2925 \- return Success or failure
2926 -------------------------------------------------------------------------*/
2927eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2928
2929/* ---------------------------------------------------------------------------
2930 \fn sme_setNeighborScanMaxChanTime
2931 \brief Update nNeighborScanMaxChanTime
2932 This function is called through dynamic setConfig callback function
2933 to configure gNeighborScanChannelMaxTime
2934 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2935 \param hHal - HAL handle for device
2936 \param nNeighborScanMinChanTime - Channel maximum dwell time
2937 \- return Success or failure
2938 -------------------------------------------------------------------------*/
2939eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2940
2941/* ---------------------------------------------------------------------------
2942 \fn sme_getNeighborScanMinChanTime
2943 \brief get neighbor scan min channel time
2944 \param hHal - The handle returned by macOpen.
2945 \return v_U16_t - channel min time value
2946 -------------------------------------------------------------------------*/
2947v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2948
2949/* ---------------------------------------------------------------------------
2950 \fn sme_getNeighborScanMaxChanTime
2951 \brief get neighbor scan max channel time
2952 \param hHal - The handle returned by macOpen.
2953 \return v_U16_t - channel max time value
2954 -------------------------------------------------------------------------*/
2955v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
2956
2957/* ---------------------------------------------------------------------------
2958 \fn sme_setNeighborScanPeriod
2959 \brief Update nNeighborScanPeriod
2960 This function is called through dynamic setConfig callback function
2961 to configure nNeighborScanPeriod
2962 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
2963 \param hHal - HAL handle for device
2964 \param nNeighborScanPeriod - neighbor scan period
2965 \- return Success or failure
2966 -------------------------------------------------------------------------*/
2967eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
2968
2969/* ---------------------------------------------------------------------------
2970 \fn sme_getNeighborScanPeriod
2971 \brief get neighbor scan period
2972 \param hHal - The handle returned by macOpen.
2973 \return v_U16_t - neighbor scan period
2974 -------------------------------------------------------------------------*/
2975v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
2976
2977#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08002978
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002979#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08002980/*--------------------------------------------------------------------------
2981 \brief sme_getRoamRssiDiff() - get Roam rssi diff
2982 This is a synchronuous call
2983 \param hHal - The handle returned by macOpen.
2984 \return eHAL_STATUS_SUCCESS - SME update config successful.
2985 Other status means SME is failed to update
2986 \sa
2987 --------------------------------------------------------------------------*/
2988v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
2989
2990/*--------------------------------------------------------------------------
2991 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
2992 This is a synchronuous call
2993 \param hHal - The handle returned by macOpen.
2994 \return eHAL_STATUS_SUCCESS - SME update config successful.
2995 Other status means SME is failed to update
2996 \sa
2997 --------------------------------------------------------------------------*/
2998eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
2999 tANI_U8 numChannels);
3000
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003001#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003002/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003003 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003004 This is a synchronuous call
3005 \param hHal - The handle returned by macOpen.
3006 \return eHAL_STATUS_SUCCESS - SME update config successful.
3007 Other status means SME is failed to update
3008 \sa
3009 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003010eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003011 tANI_U8 *pChannelList,
3012 tANI_U8 numChannels);
3013#endif
3014
Srinivas Girigowdade697412013-02-14 16:31:48 -08003015/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003016 \brief sme_getRoamScanChannelList() - get roam scan channel list
3017 This is a synchronuous call
3018 \param hHal - The handle returned by macOpen.
3019 \return eHAL_STATUS_SUCCESS - SME update config successful.
3020 Other status means SME is failed to update
3021 \sa
3022 --------------------------------------------------------------------------*/
3023eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3024 tANI_U8 *pNumChannels);
3025
3026/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003027 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003028 This is a synchronuous call
3029 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003030 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003031 FALSE (0) - if feature is disabled (compile or runtime)
3032 \sa
3033 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003034tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003035
3036/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003037 \brief sme_getWESMode() - getWES Mode
3038 This is a synchronous call
3039 \param hHal - The handle returned by macOpen.
3040 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3041 \sa
3042 --------------------------------------------------------------------------*/
3043v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3044
3045/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003046 \brief sme_GetRoamScanControl() - get scan control
3047 This is a synchronous call
3048 \param hHal - The handle returned by macOpen.
3049 \return v_BOOL_t - Enabled(1)/Disabled(0)
3050 \sa
3051 --------------------------------------------------------------------------*/
3052v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3053
3054/* ---------------------------------------------------------------------------
3055 \fn sme_UpdateEmptyScanRefreshPeriod
3056 \brief Update nnEmptyScanRefreshPeriod
3057 This function is called through dynamic setConfig callback function
3058 to configure nnEmptyScanRefreshPeriod
3059 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3060 \param hHal - HAL handle for device
3061 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3062 \- return Success or failure
3063 -------------------------------------------------------------------------*/
3064
3065/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003066 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3067 This is a synchronuous call
3068 \param hHal - The handle returned by macOpen.
3069 \return TRUE (1) - if the feature is enabled
3070 FALSE (0) - if feature is disabled (compile or runtime)
3071 \sa
3072 --------------------------------------------------------------------------*/
3073tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3074
3075/*--------------------------------------------------------------------------
3076 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3077 This is a synchronuous call
3078 \param hHal - The handle returned by macOpen.
3079 \return TRUE (1) - if the feature is enabled
3080 FALSE (0) - if feature is disabled (compile or runtime)
3081 \sa
3082 --------------------------------------------------------------------------*/
3083tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3084
Srinivas Girigowdade697412013-02-14 16:31:48 -08003085#endif
3086
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003087#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3088/*--------------------------------------------------------------------------
3089 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3090 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3091 gRoamScanOffloadEnabled.
3092 This is a synchronous call
3093 \param hHal - The handle returned by macOpen.
3094 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3095 Other status means SME is failed to update.
3096 \sa
3097 --------------------------------------------------------------------------*/
3098
3099eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3100#endif
3101
3102
Srinivas Girigowdade697412013-02-14 16:31:48 -08003103/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003104 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303105 \brief Check if a feature is enabled by FW
3106
3107 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003108 A value from enum placeHolderInCapBitmap
3109
3110 \- return 1/0 (TRUE/FALSE)
3111 -------------------------------------------------------------------------*/
3112tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303113
3114/* ---------------------------------------------------------------------------
3115 \fn sme_IsFeatureSupportedByDriver
3116 \brief Check if a feature is enabled by driver
3117
3118 \param featEnumValue - Enumeration value of the feature to be checked.
3119 A value from enum placeHolderInCapBitmap
3120
3121 \- return 1/0 (TRUE/FALSE)
3122 -------------------------------------------------------------------------*/
3123tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3124
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003125#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303126
3127/* ---------------------------------------------------------------------------
3128 \fn sme_SendTdlsLinkEstablishParams
3129 \brief API to send TDLS Link Establishment Parameters.
3130
3131 \param peerMac - peer's Mac Adress.
3132 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3133 \- return VOS_STATUS_SUCCES
3134 -------------------------------------------------------------------------*/
3135
3136VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
3137 tANI_U8 sessionId,
3138 tSirMacAddr peerMac,
3139 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
3140
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003141/* ---------------------------------------------------------------------------
3142 \fn sme_SendTdlsMgmtFrame
3143 \brief API to send TDLS management frames.
3144
3145 \param peerMac - peer's Mac Adress.
3146 \param frame_type - Type of TDLS mgmt frame to be sent.
3147 \param dialog - dialog token used in the frame.
3148 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303149 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003150 \param buf - additional IEs to be included
3151 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003152 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003153 \- return VOS_STATUS_SUCCES
3154 -------------------------------------------------------------------------*/
3155VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303156 tANI_U8 frame_type, tANI_U8 dialog, tANI_U16 status, tANI_U32 peerCapability, tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003157/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003158 \fn sme_ChangeTdlsPeerSta
3159 \brief API to Update TDLS peer sta parameters.
3160
3161 \param peerMac - peer's Mac Adress.
3162 \param staParams - Peer Station Parameters.
3163 \- return VOS_STATUS_SUCCES
3164 -------------------------------------------------------------------------*/
3165VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
3166 tCsrStaParams *pstaParams);
3167/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003168 \fn sme_AddTdlsPeerSta
3169 \brief API to Add TDLS peer sta entry.
3170
3171 \param peerMac - peer's Mac Adress.
3172 \- return VOS_STATUS_SUCCES
3173 -------------------------------------------------------------------------*/
3174VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3175/* ---------------------------------------------------------------------------
3176 \fn sme_DeleteTdlsPeerSta
3177 \brief API to Delete TDLS peer sta entry.
3178
3179 \param peerMac - peer's Mac Adress.
3180 \- return VOS_STATUS_SUCCES
3181 -------------------------------------------------------------------------*/
3182VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003183/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003184 \fn sme_SetTdlsPowerSaveProhibited
3185 \API to set/reset the isTdlsPowerSaveProhibited.
3186
3187 \- return void
3188 -------------------------------------------------------------------------*/
3189void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003190#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303191/* ---------------------------------------------------------------------------
3192 \fn sme_IsPmcBmps
3193 \brief API to Check if PMC state is BMPS.
3194
3195 \- return v_BOOL_t
3196 -------------------------------------------------------------------------*/
3197v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3198
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003199#ifdef FEATURE_WLAN_TDLS_INTERNAL
3200typedef struct smeTdlsDisResult
3201{
3202 tSirMacAddr tdlsPeerMac;
3203 v_S7_t tdlsPeerRssi;
3204} tSmeTdlsDisResult;
3205
3206VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3207v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
3208 tSmeTdlsDisResult *disResult, v_U8_t listType);
3209VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3210VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003211#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003212eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003213
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003214/*
3215 * SME API to enable/disable WLAN driver initiated SSR
3216 */
3217void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3218
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303219/* ---------------------------------------------------------------------------
3220
3221 \fn sme_SetPhyMode
3222
3223 \brief Changes the PhyMode.
3224
3225 \param hHal - The handle returned by macOpen.
3226
3227 \param phyMode new phyMode which is to set
3228
3229 \return eHalStatus SUCCESS.
3230
3231 -------------------------------------------------------------------------------*/
3232eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3233
3234/* ---------------------------------------------------------------------------
3235
3236 \fn sme_GetPhyMode
3237
3238 \brief gets current PhyMode.
3239
3240 \param hHal - The handle returned by macOpen.
3241
3242 \return eHalStatus PhyMode
3243
3244 -------------------------------------------------------------------------------*/
3245eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3246
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003247/*
3248 * SME API to determine the channel bonding mode
3249 */
3250VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3251
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003252#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3253/*--------------------------------------------------------------------------
3254 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3255 from CSR.
3256 This is a synchronous call
3257 \param hHal - The handle returned by macOpen
3258 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3259 BSSID, channel etc.)
3260 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3261 Other status means SME is failed to send the request.
3262 \sa
3263 --------------------------------------------------------------------------*/
3264
3265eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3266#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003267/*--------------------------------------------------------------------------
3268 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3269 is any connected session .
3270 This is a synchronous call
3271 \param hHal - The handle returned by macOpen
3272 \return VOS_STATUS - SME passed the request to CSR successfully.
3273 Other status means SME is failed to send the request.
3274 \sa
3275 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003276VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003277
3278#ifdef FEATURE_WLAN_LPHB
3279/* ---------------------------------------------------------------------------
3280 \fn sme_LPHBConfigReq
3281 \API to make configuration LPHB within FW.
3282 \param hHal - The handle returned by macOpen
3283 \param lphdReq - LPHB request argument by client
3284 \param pCallbackfn - LPHB timeout notification callback function pointer
3285 \- return Configuration message posting status, SUCCESS or Fail
3286 -------------------------------------------------------------------------*/
3287eHalStatus sme_LPHBConfigReq(
3288 tHalHandle hHal,
3289 tSirLPHBReq *lphdReq,
3290 void (*pCallbackfn)(void *pAdapter, void *indParam));
3291#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003292
3293/* ---------------------------------------------------------------------------
3294 \fn sme_AddPeriodicTxPtrn
3295 \brief API to Periodic TX Pattern Offload feature
3296 \param hHal - The handle returned by macOpen
3297 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3298 \return eHalStatus
3299 ---------------------------------------------------------------------------*/
3300eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3301 *addPeriodicTxPtrnParams);
3302
3303/* ---------------------------------------------------------------------------
3304 \fn sme_DelPeriodicTxPtrn
3305 \brief API to Periodic TX Pattern Offload feature
3306 \param hHal - The handle returned by macOpen
3307 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3308 \return eHalStatus
3309 ---------------------------------------------------------------------------*/
3310eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3311 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003312/*--------------------------------------------------------------------------
3313 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3314 scan parameter.
3315 This is a synchronous call
3316 \param hHal - The handle returned by macOpen
3317 \return None.
3318 \sa
3319 --------------------------------------------------------------------------*/
3320void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3321 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303322
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003323/* ---------------------------------------------------------------------------
3324 \fn sme_SendRateUpdateInd
3325 \brief API to Update rate
3326 \param hHal - The handle returned by macOpen
3327 \param rateUpdateParams - Pointer to rate update params
3328 \return eHalStatus
3329 ---------------------------------------------------------------------------*/
3330eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3331
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303332/*
3333 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3334 * triggers
3335 * return status
3336*/
3337eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3338 tANI_U8 *bssid,
3339 tSmeFastRoamTrigger fastRoamTrig);
Leela Venkata Kiran Kumar Reddy Chiralaede10652013-09-11 18:48:46 -07003340eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pBSSId );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003341
3342void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303343
3344#ifdef FEATURE_WLAN_BATCH_SCAN
3345/* ---------------------------------------------------------------------------
3346 \fn sme_SetBatchScanReq
3347 \brief API to set batch scan request in FW
3348 \param hHal - The handle returned by macOpen.
3349 \param pRequest - Pointer to the batch request.
3350 \param sessionId - session ID
3351 \param callbackRoutine - HDD callback which needs to be invoked after
3352 getting set batch scan response from FW
3353 \param callbackContext - pAdapter context
3354 \return eHalStatus
3355 ---------------------------------------------------------------------------*/
3356eHalStatus
3357sme_SetBatchScanReq
3358(
3359 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3360 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3361 void *callbackContext
3362);
3363
3364/* ---------------------------------------------------------------------------
3365 \fn sme_TriggerBatchScanResultInd
3366 \brief API to trigger batch scan result indications from from FW
3367 \param hHal - The handle returned by macOpen.
3368 \param pRequest - Pointer to get batch request.
3369 \param sessionId - session ID
3370 \param callbackRoutine - HDD callback which needs to be invoked after
3371 getting get batch scan response from FW
3372 \param callbackContext - pAdapter context
3373 \return eHalStatus
3374 ---------------------------------------------------------------------------*/
3375eHalStatus
3376sme_TriggerBatchScanResultInd
3377(
3378 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3379 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3380 void *callbackContext
3381);
3382
3383/* ---------------------------------------------------------------------------
3384 \fn sme_StopBatchScanInd
3385 \brief API to stop batch scan request in FW
3386 \param hHal - The handle returned by macOpen.
3387 \param pRequest - Pointer to stop batch indication
3388 \return eHalStatus
3389 ---------------------------------------------------------------------------*/
3390eHalStatus
3391sme_StopBatchScanInd
3392(
3393 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3394);
3395
3396#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003397
3398#ifdef FEATURE_WLAN_CH_AVOID
3399/* ---------------------------------------------------------------------------
3400 \fn sme_AddChAvoidCallback
3401 \brief Used to plug in callback function
3402 Which notify channel may not be used with SAP or P2PGO mode.
3403 Notification come from FW.
3404 \param hHal
3405 \param pCallbackfn : callback function pointer should be plugged in
3406 \- return eHalStatus
3407 -------------------------------------------------------------------------*/
3408eHalStatus sme_AddChAvoidCallback
3409(
3410 tHalHandle hHal,
3411 void (*pCallbackfn)(void *pAdapter, void *indParam)
3412);
3413#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003414eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303415/* ---------------------------------------------------------------------------
3416 \fn sme_requestTypetoString
3417 \brief API to convert requestType enum values
3418 to string.
3419 ---------------------------------------------------------------------------*/
3420const char * sme_requestTypetoString(const v_U8_t requestType);
3421/* ---------------------------------------------------------------------------
3422 \fn sme_PmcStatetoString
3423 \brief API to convert PmcState enum values
3424 to string.
3425 ---------------------------------------------------------------------------*/
3426const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303427
3428eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3429
Agarwal Ashish5e414792014-06-08 15:25:23 +05303430tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303431
3432// tdlsoffchan
3433VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3434 tANI_U8 sessionId,
3435 tSirMacAddr peerMac,
3436 tANI_S32 tdlsOffCh,
3437 tANI_S32 tdlsOffChBwOffset,
3438 tANI_U8 tdlsSwMode);
3439
Jeff Johnson295189b2012-06-20 16:38:30 -07003440#endif //#if !defined( __SME_API_H )