blob: 9e8071b2d78404e652a803cf352d48f1ca657e60 [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
Padma, Santhosh Kumar859d3712014-11-13 18:00:41 +053086
87//Macro to indicate invalid no of tspecs
88#define INVALID_TSPEC 100
89
Jeff Johnson295189b2012-06-20 16:38:30 -070090/*--------------------------------------------------------------------------
91 Type declarations
92 ------------------------------------------------------------------------*/
93typedef struct _smeConfigParams
94{
95 tCsrConfigParam csrConfig;
96#if defined WLAN_FEATURE_VOWIFI
97 tRrmConfigParam rrmConfig;
98#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070099#if defined FEATURE_WLAN_LFR
100 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800101 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700102#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800103#if defined FEATURE_WLAN_ESE
104 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700105#endif
106#if defined WLAN_FEATURE_P2P_INTERNAL
107 tP2PConfigParam p2pConfig;
108#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800109#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700110 tANI_U8 isFastTransitionEnabled;
111 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700112 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700113#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530114 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700115 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800116 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530117 tANI_U32 fDeferIMPSTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700118} tSmeConfigParams, *tpSmeConfigParams;
119
Sunil Duttc69bccb2014-05-26 21:30:20 +0530120#ifdef WLAN_FEATURE_LINK_LAYER_STATS
121
122/* ---------------------------------------------------------------------------
123 \fn sme_LLStatsSetReq
124 \brief API to set link layer stats request to FW
125 \param hHal - The handle returned by macOpen.
126
127 \Param pStatsReq - a pointer to a caller allocated object of
128 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
129 stats set.
130
131 \return eHalStatus
132 ---------------------------------------------------------------------------*/
133eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
134
135/* ---------------------------------------------------------------------------
136 \fn sme_LLStatsGetReq
137 \brief API to get link layer stats request to FW
138 \param hHal - The handle returned by macOpen.
139
140 \Param pStatsReq - a pointer to a caller allocated object of
141 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
142 stats get.
143
144 \return eHalStatus
145 ---------------------------------------------------------------------------*/
146eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
147
148/* ---------------------------------------------------------------------------
149 \fn sme_LLStatsClearReq
150 \brief API to clear link layer stats request to FW
151 \param hHal - The handle returned by macOpen.
152
153 \Param pStatsReq - a pointer to a caller allocated object of
154 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
155 stats clear.
156
157 \return eHalStatus
158 ---------------------------------------------------------------------------*/
159eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
160
161/* ---------------------------------------------------------------------------
162 \fn sme_SetLinkLayerStatsIndCB
163 \brief API to trigger Link Layer stats result indications from from FW
164 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530165 \param callbackRoutine - HDD callback which needs to be invoked after
166 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530167 \return eHalStatus
168 ---------------------------------------------------------------------------*/
169eHalStatus
170sme_SetLinkLayerStatsIndCB
171(
Dino Mycled3d50022014-07-07 12:58:25 +0530172 tHalHandle hHal,
173 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
174 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530175);
176
177
178#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
179
Dino Mycle2c198072014-06-10 10:15:52 +0530180#ifdef WLAN_FEATURE_EXTSCAN
181/* ---------------------------------------------------------------------------
182 \fn sme_GetValidChannelsByBand
183 \brief SME API to fetch all valid channel filtered by band
184 \param hHal
185 \param wifiBand: RF band information
186 \param aValidChannels: Array to store channel info
187 \param len: number of channels
188 \- return eHalStatus
189 -------------------------------------------------------------------------*/
190eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
191 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
192
193/* ---------------------------------------------------------------------------
194 \fn sme_EXTScanGetCapabilities
195 \brief SME API to fetch Extented Scan capabilities
196 \param hHal
197 \param pReq: Extented Scan capabilities structure
198 \- return eHalStatus
199 -------------------------------------------------------------------------*/
200eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
201 tSirGetEXTScanCapabilitiesReqParams *pReq);
202
203/* ---------------------------------------------------------------------------
204 \fn sme_EXTScanStart
205 \brief SME API to issue Extented Scan start
206 \param hHal
207 \param pStartCmd: Extented Scan start structure
208 \- return eHalStatus
209 -------------------------------------------------------------------------*/
210eHalStatus sme_EXTScanStart (tHalHandle hHal,
211 tSirEXTScanStartReqParams *pStartCmd);
212
213/* ---------------------------------------------------------------------------
214 \fn sme_EXTScanStop
215 \brief SME API to issue Extented Scan stop
216 \param hHal
217 \param pStopReq: Extented Scan stop structure
218 \- return eHalStatus
219 -------------------------------------------------------------------------*/
220eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
221
222/* ---------------------------------------------------------------------------
223 \fn sme_SetBssHotlist
224 \brief SME API to set BSSID hotlist
225 \param hHal
226 \param pSetHotListReq: Extented Scan set hotlist structure
227 \- return eHalStatus
228 -------------------------------------------------------------------------*/
229eHalStatus sme_SetBssHotlist (tHalHandle hHal,
230 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
231
232/* ---------------------------------------------------------------------------
233 \fn sme_ResetBssHotlist
234 \brief SME API to reset BSSID hotlist
235 \param hHal
236 \param pSetHotListReq: Extented Scan set hotlist structure
237 \- return eHalStatus
238 -------------------------------------------------------------------------*/
239eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
240 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
241
242/* ---------------------------------------------------------------------------
243 \fn sme_SetSignificantChange
244 \brief SME API to set significant change
245 \param hHal
246 \param pSetSignificantChangeReq: Extented Scan set significant
247 change structure
248 \- return eHalStatus
249 -------------------------------------------------------------------------*/
250eHalStatus sme_SetSignificantChange (tHalHandle hHal,
251 tSirEXTScanSetSignificantChangeReqParams* pSetSignificantChangeReq);
252
253/* ---------------------------------------------------------------------------
254 \fn sme_ResetSignificantChange
255 \brief SME API to reset significant change
256 \param hHal
257 \param pResetReq: Extented Scan reset significant change structure
258 \- return eHalStatus
259 -------------------------------------------------------------------------*/
260eHalStatus sme_ResetSignificantChange (tHalHandle hHal,
261 tSirEXTScanResetSignificantChangeReqParams *pResetReq);
262
263/* ---------------------------------------------------------------------------
264 \fn sme_getCachedResults
265 \brief SME API to get cached results
266 \param hHal
267 \param pCachedResultsReq: Extented Scan get cached results structure
268 \- return eHalStatus
269 -------------------------------------------------------------------------*/
270eHalStatus sme_getCachedResults (tHalHandle hHal,
271 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
272
273/* ---------------------------------------------------------------------------
274 \fn sme_EXTScanRegisterCallback
275 \brief SME API to register Extented Scan notification callback
276 \param pEXTScanIndCb
277 \- return void
278 -------------------------------------------------------------------------*/
279eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
280 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
281 void *);
282
283#endif /* WLAN_FEATURE_EXTSCAN */
Siddharth Bhal6af5d4e2014-09-29 21:11:16 +0530284tANI_BOOLEAN sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530285
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530286typedef enum
287{
288 eSME_ROAM_TRIGGER_NONE = 0,
289 eSME_ROAM_TRIGGER_SCAN = 1,
290 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
291 eSME_ROAM_TRIGGER_MAX
292} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700293
294/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530295 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700296 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700297/*--------------------------------------------------------------------------
298
299 \brief sme_Open() - Initialze all SME modules and put them at idle state
300
301 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
302 successfully return, all modules are at idle state ready to start.
303
304 smeOpen must be called before any other SME APIs can be involved.
305 smeOpen must be called after macOpen.
306
307 \param hHal - The handle returned by macOpen.
308
309 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
310
311 Other status means SME is failed to be initialized
312 \sa
313
314 --------------------------------------------------------------------------*/
315eHalStatus sme_Open(tHalHandle hHal);
316
317/*--------------------------------------------------------------------------
318
319 \brief sme_Close() - Release all SME modules and their resources.
320
321 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
322 return, all modules are at closed state.
323
324 No SME APIs can be involved after sme_Close except sme_Open.
325 sme_Close must be called before macClose.
326
327 \param hHal - The handle returned by macOpen.
328
329 \return eHAL_STATUS_SUCCESS - SME is successfully close.
330
331 Other status means SME is failed to be closed but caller still cannot
332 call any other SME functions except smeOpen.
333 \sa
334
335 --------------------------------------------------------------------------*/
336eHalStatus sme_Close(tHalHandle hHal);
337
338/*--------------------------------------------------------------------------
339
340 \brief sme_Start() - Put all SME modules at ready state.
341
342 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
343 successfully return, all modules are ready to run.
344
345 \param hHal - The handle returned by macOpen.
346
347 \return eHAL_STATUS_SUCCESS - SME is ready.
348
349 Other status means SME is failed to start.
350 \sa
351
352 --------------------------------------------------------------------------*/
353eHalStatus sme_Start(tHalHandle hHal);
354
355/*--------------------------------------------------------------------------
356
357 \brief sme_Stop() - Stop all SME modules and put them at idle state
358
359 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
360 return, all modules are at idle state ready to start.
361
362
363 \param hHal - The handle returned by macOpen.
364
Kiet Lama72a2322013-11-15 11:18:11 +0530365 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700366
367 \return eHAL_STATUS_SUCCESS - SME is stopped.
368
369 Other status means SME is failed to stop but caller should still consider
370 SME is stopped.
371 \sa
372
373 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530374eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700375
376
377/*--------------------------------------------------------------------------
378
379 \brief sme_OpenSession() - Open a session for scan/roam operation.
380
381 This is a synchronous API.
382
383
384 \param hHal - The handle returned by macOpen.
385 \param callback - A pointer to the function caller specifies for roam/connect status indication
386 \param pContext - The context passed with callback
387 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
388 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
389
390 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
391
392 Other status means SME is failed to open the session.
393 eHAL_STATUS_RESOURCES - no more session available.
394 \sa
395
396 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700397eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
398 void *pContext, tANI_U8 *pSelfMacAddr,
399 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700400
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700401/*--------------------------------------------------------------------------
402
403 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
404 \param hHal - The handle returned by macOpen.
405 \param currDeviceMode - Current operating device mode.
406 --------------------------------------------------------------------------*/
407
408void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700409
410/*--------------------------------------------------------------------------
411
412 \brief sme_CloseSession() - Open a session for scan/roam operation.
413
414 This is a synchronous API.
415
416
417 \param hHal - The handle returned by macOpen.
418
419 \param sessionId - A previous opened session's ID.
420
421 \return eHAL_STATUS_SUCCESS - session is closed.
422
423 Other status means SME is failed to open the session.
424 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
425 \sa
426
427 --------------------------------------------------------------------------*/
428eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
429 csrRoamSessionCloseCallback callback, void *pContext);
430
431
432
433/*--------------------------------------------------------------------------
434
435 \brief sme_UpdateConfig() - Change configurations for all SME moduels
436
437 The function updates some configuration for modules in SME, CCM, CSR, etc
438 during SMEs close -> open sequence.
439
440 Modules inside SME apply the new configuration at the next transaction.
441
442
443 \param hHal - The handle returned by macOpen.
444 \Param pSmeConfigParams - a pointer to a caller allocated object of
445 typedef struct _smeConfigParams.
446
447 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
448
449 Other status means SME is failed to update the config parameters.
450 \sa
451
452 --------------------------------------------------------------------------*/
453eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
454
455#ifdef FEATURE_WLAN_SCAN_PNO
456/*--------------------------------------------------------------------------
457
458 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
459
460 It is used at driver start up to inform RIVA of the default channel
461 configuration.
462
463 This is a synchronuous call
464
465 \param hHal - The handle returned by macOpen.
466
467 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
468
469 Other status means SME is failed to update the channel config.
470 \sa
471
472 --------------------------------------------------------------------------*/
473eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
474
475#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700476/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530477
478 \brief sme_UpdateChannelList() - Update channel List in FW.
479
480
481 \param hHal - The handle returned by macOpen.
482
483 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
484
485 Other status means SME is failed to update the channel config.
486 \sa
487
488 --------------------------------------------------------------------------*/
489eHalStatus sme_UpdateChannelList(tHalHandle hHal);
490
491/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700492
493 \brief sme_set11dinfo() - Set the 11d information about valid channels
494 and there power using information from nvRAM
495 This function is called only for AP.
496
497 This is a synchronuous call
498
499 \param hHal - The handle returned by macOpen.
500 \Param pSmeConfigParams - a pointer to a caller allocated object of
501 typedef struct _smeConfigParams.
502
503 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
504
505 Other status means SME is failed to update the config parameters.
506 \sa
507--------------------------------------------------------------------------*/
508
509eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
510
511/*--------------------------------------------------------------------------
512
513 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
514
515 This is a synchronuous call
516
517 \param hHal - The handle returned by HostapdAdapter.
518 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
519
520 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
521
522 Other status means, failed to get the current regulatory domain.
523 \sa
524--------------------------------------------------------------------------*/
525
526eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
527
528eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
529
Jeff Johnson295189b2012-06-20 16:38:30 -0700530
531/* ---------------------------------------------------------------------------
532 \fn sme_ChangeConfigParams
533 \brief The SME API exposed for HDD to provide config params to SME during
534 SMEs stop -> start sequence.
535
536 If HDD changed the domain that will cause a reset. This function will
537 provide the new set of 11d information for the new domain. Currrently this
538 API provides info regarding 11d only at reset but we can extend this for
539 other params (PMC, QoS) which needs to be initialized again at reset.
540
541 This is a synchronuous call
542
543 \param hHal - The handle returned by macOpen.
544
545 \Param
546 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
547 currently provides 11d related information like Country code,
548 Regulatory domain, valid channel list, Tx power per channel, a
549 list with active/passive scan allowed per valid channel.
550
551 \return eHalStatus
552 ---------------------------------------------------------------------------*/
553eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
554 tCsrUpdateConfigParam *pUpdateConfigParam);
555
556/*--------------------------------------------------------------------------
557
558 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
559 is ready tio run.
560
561 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
562 to running state.
563
564
565 \param hHal - The handle returned by macOpen.
566
567 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
568
569 Other status means SME failed to send the message to PE.
570 \sa
571
572 --------------------------------------------------------------------------*/
573eHalStatus sme_HDDReadyInd(tHalHandle hHal);
574
575
576/*--------------------------------------------------------------------------
577
578 \brief sme_ProcessMsg() - The main message processor for SME.
579
580 The function is called by a message dispatcher when to process a message
581 targeted for SME.
582
583
584 \param hHal - The handle returned by macOpen.
585 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
586
587 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
588
589 Other status means SME failed to process the message.
590 \sa
591
592 --------------------------------------------------------------------------*/
593eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
594
595v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
596
597/* ---------------------------------------------------------------------------
598 \fn sme_ScanRequest
599 \brief a wrapper function to Request a 11d or full scan from CSR.
600 \param pScanRequestID - pointer to an object to get back the request ID
601 \param callback - a callback function that scan calls upon finish, will not
602 be called if csrScanRequest returns error
603 \param pContext - a pointer passed in for the callback
604 \return eHalStatus
605 ---------------------------------------------------------------------------*/
606eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
607 tANI_U32 *pScanRequestID,
608 csrScanCompleteCallback callback, void *pContext);
609
610
611/* ---------------------------------------------------------------------------
612 \fn sme_ScanSetBGScanparams
613 \brief a wrapper function to request CSR to set BG scan params in PE
614 \param pScanReq - BG scan request structure
615 \return eHalStatus
616 ---------------------------------------------------------------------------*/
617eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
618
619
620/* ---------------------------------------------------------------------------
621 \fn sme_ScanGetResult
622 \brief a wrapper function to request scan results from CSR.
623 \param pFilter - If pFilter is NULL, all cached results are returned
624 \param phResult - an object for the result.
625 \return eHalStatus
626 ---------------------------------------------------------------------------*/
627eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
628 tScanResultHandle *phResult);
629
630
631/* ---------------------------------------------------------------------------
632 \fn sme_ScanFlushResult
633 \brief a wrapper function to request CSR to clear scan results.
634 \return eHalStatus
635 ---------------------------------------------------------------------------*/
636eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530637
638/*
639 * ---------------------------------------------------------------------------
640 * \fn sme_FilterScanResults
641 * \brief a wrapper function to request CSR to filter the scan results based
642 * on valid chennel list.
643 * \return eHalStatus
644 *---------------------------------------------------------------------------
645 */
646eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
647
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700648eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700649
650/* ---------------------------------------------------------------------------
651 \fn sme_ScanResultGetFirst
652 \brief a wrapper function to request CSR to returns the first element of
653 scan result.
654 \param hScanResult - returned from csrScanGetResult
655 \return tCsrScanResultInfo * - NULL if no result
656 ---------------------------------------------------------------------------*/
657tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
658 tScanResultHandle hScanResult);
659
660/* ---------------------------------------------------------------------------
661 \fn sme_ScanResultGetNext
662 \brief a wrapper function to request CSR to returns the next element of
663 scan result. It can be called without calling csrScanResultGetFirst
664 first
665 \param hScanResult - returned from csrScanGetResult
666 \return Null if no result or reach the end
667 ---------------------------------------------------------------------------*/
668tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
669 tScanResultHandle hScanResult);
670
671/* ---------------------------------------------------------------------------
672 \fn sme_ScanResultPurge
673 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
674 in the list and free memory for each item
675 \param hScanResult - returned from csrScanGetResult. hScanResult is
676 considered gone by
677 calling this function and even before this function reutrns.
678 \return eHalStatus
679 ---------------------------------------------------------------------------*/
680eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
681
682/* ---------------------------------------------------------------------------
683 \fn sme_ScanGetPMKIDCandidateList
684 \brief a wrapper function to return the PMKID candidate list
685 \param pPmkidList - caller allocated buffer point to an array of
686 tPmkidCandidateInfo
687 \param pNumItems - pointer to a variable that has the number of
688 tPmkidCandidateInfo allocated when retruning, this is
689 either the number needed or number of items put into
690 pPmkidList
691 \return eHalStatus - when fail, it usually means the buffer allocated is not
692 big enough and pNumItems
693 has the number of tPmkidCandidateInfo.
694 \Note: pNumItems is a number of tPmkidCandidateInfo,
695 not sizeof(tPmkidCandidateInfo) * something
696 ---------------------------------------------------------------------------*/
697eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
698 tPmkidCandidateInfo *pPmkidList,
699 tANI_U32 *pNumItems );
700
701
702/*----------------------------------------------------------------------------
703 \fn sme_RoamRegisterLinkQualityIndCallback
704
705 \brief
706 a wrapper function to allow HDD to register a callback handler with CSR for
707 link quality indications.
708
709 Only one callback may be registered at any time.
710 In order to deregister the callback, a NULL cback may be provided.
711
712 Registration happens in the task context of the caller.
713
714 \param callback - Call back being registered
715 \param pContext - user data
716
717 DEPENDENCIES: After CSR open
718
719 \return eHalStatus
720-----------------------------------------------------------------------------*/
721eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
722 csrRoamLinkQualityIndCallback callback,
723 void *pContext);
724
725
726/* ---------------------------------------------------------------------------
727 \fn sme_RoamConnect
728 \brief a wrapper function to request CSR to inititiate an association
729 \param sessionId - the sessionId returned by sme_OpenSession.
730 \param pProfile - can be NULL to join to any open ones
731 \param pRoamId - to get back the request ID
732 \return eHalStatus
733 ---------------------------------------------------------------------------*/
734eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
735 tANI_U32 *pRoamId);
736
737/* ---------------------------------------------------------------------------
738 \fn sme_RoamReassoc
739 \brief a wrapper function to request CSR to inititiate a re-association
740 \param pProfile - can be NULL to join the currently connected AP. In that
741 case modProfileFields should carry the modified field(s) which could trigger
742 reassoc
743 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
744 that might need modification dynamically once STA is up & running and this
745 could trigger a reassoc
746 \param pRoamId - to get back the request ID
747 \return eHalStatus
748 -------------------------------------------------------------------------------*/
749eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
750 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700751 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700752
753/* ---------------------------------------------------------------------------
754 \fn sme_RoamConnectToLastProfile
755 \brief a wrapper function to request CSR to disconnect and reconnect with
756 the same profile
757 \return eHalStatus. It returns fail if currently connected
758 ---------------------------------------------------------------------------*/
759eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
760
761/* ---------------------------------------------------------------------------
762 \fn sme_RoamDisconnect
763 \brief a wrapper function to request CSR to disconnect from a network
764 \param reason -- To indicate the reason for disconnecting. Currently, only
765 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
766 \return eHalStatus
767 ---------------------------------------------------------------------------*/
768eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
769
Jeff Johnson295189b2012-06-20 16:38:30 -0700770/* ---------------------------------------------------------------------------
771 \fn sme_RoamStopBss
772 \brief a wrapper function to request CSR to stop bss
773 \param sessionId - sessionId of SoftAP
774 \return eHalStatus
775 ---------------------------------------------------------------------------*/
776eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
777
778/* ---------------------------------------------------------------------------
779 \fn sme_RoamGetAssociatedStas
780 \brief To probe the list of associated stations from various modules of CORE stack.
781 \This is an asynchronous API.
782 \param sessionId - sessionId of SoftAP
783 \param modId - Module from whom list of associtated stations is to be probed.
784 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
785 \param pUsrContext - Opaque HDD context
786 \param pfnSapEventCallback - Sap event callback in HDD
787 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
788 \return eHalStatus
789 -------------------------------------------------------------------------------*/
790eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
791 VOS_MODULE_ID modId, void *pUsrContext,
792 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
793
794/* ---------------------------------------------------------------------------
795 \fn sme_RoamDisconnectSta
796 \brief To disassociate a station. This is an asynchronous API.
797 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
798 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
799 -------------------------------------------------------------------------------*/
800eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
801
802/* ---------------------------------------------------------------------------
803 \fn sme_RoamDeauthSta
804 \brief To disassociate a station. This is an asynchronous API.
805 \param hHal - Global structure
806 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530807 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700808 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
809 -------------------------------------------------------------------------------*/
810eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530811 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700812
813/* ---------------------------------------------------------------------------
814 \fn sme_RoamTKIPCounterMeasures
815 \brief To start or stop TKIP counter measures. This is an asynchronous API.
816 \param sessionId - sessionId of SoftAP
817 \param bEnable - Flag to start/stop TKIP countermeasures
818 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
819 -------------------------------------------------------------------------------*/
820eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
821
822/* ---------------------------------------------------------------------------
823 \fn sme_RoamGetWpsSessionOverlap
824 \brief To get the WPS PBC session overlap information.
825 \This is an asynchronous API.
826 \param sessionId - sessionId of SoftAP
827 \param pUsrContext - Opaque HDD context
828 \param pfnSapEventCallback - Sap event callback in HDD
829 \return eHalStatus
830 -------------------------------------------------------------------------------*/
831eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
832 void *pUsrContext, void *pfnSapEventCallback,
833 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700834
835/* ---------------------------------------------------------------------------
836 \fn sme_RoamGetConnectState
837 \brief a wrapper function to request CSR to return the current connect state
838 of Roaming
839 \return eHalStatus
840 ---------------------------------------------------------------------------*/
841eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
842
843/* ---------------------------------------------------------------------------
844 \fn sme_RoamGetConnectProfile
845 \brief a wrapper function to request CSR to return the current connect
846 profile. Caller must call csrRoamFreeConnectProfile after it is done
847 and before reuse for another csrRoamGetConnectProfile call.
848 \param pProfile - pointer to a caller allocated structure
849 tCsrRoamConnectedProfile
850 \return eHalStatus. Failure if not connected
851 ---------------------------------------------------------------------------*/
852eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
853 tCsrRoamConnectedProfile *pProfile);
854
855/* ---------------------------------------------------------------------------
856 \fn sme_RoamFreeConnectProfile
857 \brief a wrapper function to request CSR to free and reinitialize the
858 profile returned previously by csrRoamGetConnectProfile.
859 \param pProfile - pointer to a caller allocated structure
860 tCsrRoamConnectedProfile
861 \return eHalStatus.
862 ---------------------------------------------------------------------------*/
863eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
864 tCsrRoamConnectedProfile *pProfile);
865
866/* ---------------------------------------------------------------------------
867 \fn sme_RoamSetPMKIDCache
868 \brief a wrapper function to request CSR to return the PMKID candidate list
869 \param pPMKIDCache - caller allocated buffer point to an array of
870 tPmkidCacheInfo
871 \param numItems - a variable that has the number of tPmkidCacheInfo
872 allocated when retruning, this is either the number needed
873 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530874 \param update_entire_cache - if TRUE, then it overwrites the entire cache
875 with pPMKIDCache, else it updates entry by
876 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700877 \return eHalStatus - when fail, it usually means the buffer allocated is not
878 big enough and pNumItems has the number of
879 tPmkidCacheInfo.
880 \Note: pNumItems is a number of tPmkidCacheInfo,
881 not sizeof(tPmkidCacheInfo) * something
882 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530883eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
884 tPmkidCacheInfo *pPMKIDCache,
885 tANI_U32 numItems,
886 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700887
888/* ---------------------------------------------------------------------------
889 \fn sme_RoamGetSecurityReqIE
890 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
891 passes to PE to JOIN request or START_BSS request
892 This is a synchronuous call.
893 \param sessionId - returned by sme_OpenSession.
894 \param pLen - caller allocated memory that has the length of pBuf as input.
895 Upon returned, *pLen has the needed or IE length in pBuf.
896 \param pBuf - Caller allocated memory that contain the IE field, if any,
897 upon return
898 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
899 \return eHalStatus - when fail, it usually means the buffer allocated is not
900 big enough
901 ---------------------------------------------------------------------------*/
902eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
903 tANI_U8 *pBuf, eCsrSecurityType secType);
904
905/* ---------------------------------------------------------------------------
906 \fn sme_RoamGetSecurityRspIE
907 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
908 the beacon or probe rsp if connected
909 \param sessionId - returned by sme_OpenSession.
910 \param pLen - caller allocated memory that has the length of pBuf as input.
911 Upon returned, *pLen has the needed or IE length in pBuf.
912 \param pBuf - Caller allocated memory that contain the IE field, if any,
913 upon return
914 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
915 \return eHalStatus - when fail, it usually means the buffer allocated is not
916 big enough
917 ---------------------------------------------------------------------------*/
918eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
919 tANI_U8 *pBuf, eCsrSecurityType secType);
920
921
922/* ---------------------------------------------------------------------------
923 \fn sme_RoamGetNumPMKIDCache
924 \brief a wrapper function to request CSR to return number of PMKID cache
925 entries
926 \return tANI_U32 - the number of PMKID cache entries
927 ---------------------------------------------------------------------------*/
928tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
929
930/* ---------------------------------------------------------------------------
931 \fn sme_RoamGetPMKIDCache
932 \brief a wrapper function to request CSR to return PMKID cache from CSR
933 \param pNum - caller allocated memory that has the space of the number of
934 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
935 needed or actually number in tPmkidCacheInfo.
936 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
937 any, upon return
938 \return eHalStatus - when fail, it usually means the buffer allocated is not
939 big enough
940 ---------------------------------------------------------------------------*/
941eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
942 tPmkidCacheInfo *pPmkidCache);
943
944/* ---------------------------------------------------------------------------
945 \fn sme_GetConfigParam
946 \brief a wrapper function that HDD calls to get the global settings
947 currently maintained by CSR.
948 \param pParam - caller allocated memory
949 \return eHalStatus
950 ---------------------------------------------------------------------------*/
951eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
952
953/* ---------------------------------------------------------------------------
954 \fn sme_GetStatistics
955 \brief a wrapper function that client calls to register a callback to get
956 different PHY level statistics from CSR.
957
958 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
959 \param statsMask - The different category/categories of stats requester is looking for
960 The order in which you set the bits in the statsMask for requesting
961 different type of stats is:
962
963 eCsrSummaryStats = bit 0
964 eCsrGlobalClassAStats = bit 1
965 eCsrGlobalClassBStats = bit 2
966 eCsrGlobalClassCStats = bit 3
967 eCsrGlobalClassDStats = bit 4
968 eCsrPerStaStats = bit 5
969
970 \param callback - SME sends back the requested stats using the callback
971 \param periodicity - If requester needs periodic update, 0 means it's an one
972 time request
973 \param cache - If requester is happy with cached stats
974 \param staId - The station ID for which the stats is requested for
975 \param pContext - user context to be passed back along with the callback
976 \return eHalStatus
977 ---------------------------------------------------------------------------*/
978eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
979 tANI_U32 statsMask,
980 tCsrStatsCallback callback,
981 tANI_U32 periodicity, tANI_BOOLEAN cache,
982 tANI_U8 staId, void *pContext);
983
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +0530984/* ---------------------------------------------------------------------------
985 \fn smeGetTLSTAState
986 \helper function to get teh TL STA State whenever the function is called.
987
988 \param staId - The staID to be passed to the TL
989 to get the relevant TL STA State
990 \return the state as tANI_U16
991 ---------------------------------------------------------------------------*/
992tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
993
Jeff Johnson295189b2012-06-20 16:38:30 -0700994eHalStatus sme_GetRssi(tHalHandle hHal,
995 tCsrRssiCallback callback,
996 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530997
998/* ---------------------------------------------------------------------------
999 \fn sme_GetSnr
1000 \brief a wrapper function that client calls to register a callback to get
1001 SNR from FW
1002
1003 \param callback - SME sends back the requested stats using the callback
1004 \param staId - The station ID for which the stats is requested for
1005 \param bssid - The bssid of the connected session
1006 \param pContext - user context to be passed back along with the callback
1007 ---------------------------------------------------------------------------*/
1008eHalStatus sme_GetSnr(tHalHandle hHal,
1009 tCsrSnrCallback callback,
1010 tANI_U8 staId, tCsrBssid bssId,
1011 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001012#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001013eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1014 tCsrRssiCallback callback,
1015 tANI_U8 staId,
1016 tCsrBssid bssId,
1017 void *pContext,
1018 void* pVosContext);
1019#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001020
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001021#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001022/* ---------------------------------------------------------------------------
1023 \fn sme_GetTsmStats
1024 \brief a wrapper function that client calls to register a callback to get TSM Stats
1025
1026 \param callback - SME sends back the requested stats using the callback
1027 \param staId - The station ID for which the stats is requested for
1028 \param pContext - user context to be passed back along with the callback
1029 \param pVosContext - vos context
1030 \return eHalStatus
1031 ---------------------------------------------------------------------------*/
1032eHalStatus sme_GetTsmStats(tHalHandle hHal,
1033 tCsrTsmStatsCallback callback,
1034 tANI_U8 staId, tCsrBssid bssId,
1035 void *pContext, void* pVosContext, tANI_U8 tid);
1036
1037/* ---------------------------------------------------------------------------
1038 \fn sme_SetCCKMIe
1039 \brief function to store the CCKM IE passed from supplicant and use it while packing
1040 reassociation request
1041 \param hHal - HAL handle for device
1042 \param pCckmIe - pointer to CCKM IE data
1043 \param pCckmIeLen - length of the CCKM IE
1044 \- return Success or failure
1045 -------------------------------------------------------------------------*/
1046eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1047
1048
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001049/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001050 \fn sme_SetEseBeaconRequest
1051 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001052 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001053 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001054 \- return Success or failure
1055 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001056eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1057 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001058
1059
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001060#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001061/* ---------------------------------------------------------------------------
1062 \fn sme_CfgSetInt
1063 \brief a wrapper function that HDD calls to set parameters in CFG.
1064 \param cfgId - Configuration Parameter ID (type) for STA.
1065 \param ccmValue - The information related to Configuration Parameter ID
1066 which needs to be saved in CFG
1067 \param callback - To be registered by CSR with CCM. Once the CFG done with
1068 saving the information in the database, it notifies CCM &
1069 then the callback will be invoked to notify.
1070 \param toBeSaved - To save the request for future reference
1071 \return eHalStatus
1072 ---------------------------------------------------------------------------*/
1073eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1074 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1075
1076/* ---------------------------------------------------------------------------
1077 \fn sme_CfgSetStr
1078 \brief a wrapper function that HDD calls to set parameters in CFG.
1079 \param cfgId - Configuration Parameter ID (type) for STA.
1080 \param pStr - Pointer to the byte array which carries the information needs
1081 to be saved in CFG
1082 \param length - Length of the data to be saved
1083 \param callback - To be registered by CSR with CCM. Once the CFG done with
1084 saving the information in the database, it notifies CCM &
1085 then the callback will be invoked to notify.
1086 \param toBeSaved - To save the request for future reference
1087 \return eHalStatus
1088 ---------------------------------------------------------------------------*/
1089eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1090 tANI_U32 length, tCcmCfgSetCallback callback,
1091 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301092/* ---------------------------------------------------------------------------
1093 \fn sme_GetModifyProfileFields
1094 \brief HDD or SME - QOS calls this function to get the current values of
1095 connected profile fields, changing which can cause reassoc.
1096 This function must be called after CFG is downloaded and STA is in connected
1097 state. Also, make sure to call this function to get the current profile
1098 fields before calling the reassoc. So that pModifyProfileFields will have
1099 all the latest values plus the one(s) has been updated as part of reassoc
1100 request.
1101 \param pModifyProfileFields - pointer to the connected profile fields
1102 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001103
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301104 \return eHalStatus
1105 -------------------------------------------------------------------------------*/
1106eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1107 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301108/* ---------------------------------------------------------------------------
1109 \fn sme_HT40StopOBSSScan
1110 \brief HDD or SME - Command to stop the OBSS scan
1111 THis is implemented only for debugging purpose.
1112 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1113 \param sessionId - sessionId
1114 changing which can cause reassoc
1115
1116 \return eHalStatus
1117 -------------------------------------------------------------------------------*/
1118eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001119
1120/*--------------------------------------------------------------------------
1121 \fn sme_SetConfigPowerSave
1122 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1123 For BMPS related configuration, this function also updates the CFG
1124 and sends a message to FW to pick up the new values. Note: Calling
1125 this function only updates the configuration and does not enable
1126 the specified power save mode.
1127 \param hHal - The handle returned by macOpen.
1128 \param psMode - Power Saving mode being modified
1129 \param pConfigParams - a pointer to a caller allocated object of type
1130 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1131 \return eHalStatus
1132 --------------------------------------------------------------------------*/
1133eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1134 void *pConfigParams);
1135
1136/*--------------------------------------------------------------------------
1137 \fn sme_GetConfigPowerSave
1138 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1139 \param hHal - The handle returned by macOpen.
1140 \param psMode - Power Saving mode
1141 \param pConfigParams - a pointer to a caller allocated object of type
1142 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1143 \return eHalStatus
1144 --------------------------------------------------------------------------*/
1145eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1146 void *pConfigParams);
1147
1148/* ---------------------------------------------------------------------------
1149 \fn sme_SignalPowerEvent
1150 \brief Signals to PMC that a power event has occurred. Used for putting
1151 the chip into deep sleep mode.
1152 \param hHal - The handle returned by macOpen.
1153 \param event - the event that has occurred
1154 \return eHalStatus
1155 ---------------------------------------------------------------------------*/
1156extern eHalStatus sme_SignalPowerEvent (
1157 tHalHandle hHal,
1158 tPmcPowerEvent event);
1159
1160/* ---------------------------------------------------------------------------
1161 \fn sme_EnablePowerSave
1162 \brief Enables one of the power saving modes. This API does not cause a
1163 device state change. This is purely a configuration API.
1164 \param hHal - The handle returned by macOpen.
1165 \param psMode - The power saving mode to enable.
1166 \return eHalStatus
1167 ---------------------------------------------------------------------------*/
1168extern eHalStatus sme_EnablePowerSave (
1169 tHalHandle hHal,
1170 tPmcPowerSavingMode psMode);
1171
1172/* ---------------------------------------------------------------------------
1173 \fn sme_DisablePowerSave
1174 \brief Disables one of the power saving modes.Disabling does not imply
1175 that device will be brought out of the current PS mode. This is
1176 purely a configuration API.
1177 \param hHal - The handle returned by macOpen.
1178 \param psMode - The power saving mode to disable.
1179 \return eHalStatus
1180 ---------------------------------------------------------------------------*/
1181extern eHalStatus sme_DisablePowerSave (
1182 tHalHandle hHal,
1183 tPmcPowerSavingMode psMode);
1184
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301185 /* ---------------------------------------------------------------------------
1186 \fn sme_SetHostPowerSave
1187 \brief The BMPS logic is controlled by the User level Apps
1188 \param hHal - The handle returned by macOpen.
1189 \param psMode - The power saving mode to enable.
1190 \return eHalStatus
1191 ---------------------------------------------------------------------------*/
1192extern eHalStatus sme_SetHostPowerSave (
1193 tHalHandle hHal,
1194 v_BOOL_t psMode);
1195
Jeff Johnson295189b2012-06-20 16:38:30 -07001196/* ---------------------------------------------------------------------------
1197 \fn sme_StartAutoBmpsTimer
1198 \brief Starts a timer that periodically polls all the registered
1199 module for entry into Bmps mode. This timer is started only if BMPS is
1200 enabled and whenever the device is in full power.
1201 \param hHal - The handle returned by macOpen.
1202 \return eHalStatus
1203 ---------------------------------------------------------------------------*/
1204extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1205
1206/* ---------------------------------------------------------------------------
1207 \fn sme_StopAutoBmpsTimer
1208 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1209 Stopping the timer does not cause a device state change. Only the timer
1210 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1211 \param hHal - The handle returned by macOpen.
1212 \return eHalStatus
1213 ---------------------------------------------------------------------------*/
1214extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1215
1216/* ---------------------------------------------------------------------------
1217 \fn sme_QueryPowerState
1218 \brief Returns the current power state of the device.
1219 \param hHal - The handle returned by macOpen.
1220 \param pPowerState - pointer to location to return power state
1221 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1222 \return eHalStatus
1223 ---------------------------------------------------------------------------*/
1224extern eHalStatus sme_QueryPowerState (
1225 tHalHandle hHal,
1226 tPmcPowerState *pPowerState,
1227 tPmcSwitchState *pSwWlanSwitchState);
1228
1229/* ---------------------------------------------------------------------------
1230 \fn sme_IsPowerSaveEnabled
1231 \brief Checks if the device is able to enter a particular power save mode
1232 This does not imply that the device is in a particular PS mode
1233 \param hHal - The handle returned by macOpen.
1234 \param psMode - the power saving mode
1235 \return eHalStatus
1236 ---------------------------------------------------------------------------*/
1237extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1238 tHalHandle hHal,
1239 tPmcPowerSavingMode psMode);
1240
1241/* ---------------------------------------------------------------------------
1242 \fn sme_RequestFullPower
1243 \brief Request that the device be brought to full power state.
1244 Note 1: If "fullPowerReason" specificied in this API is set to
1245 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1246 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1247 HDD is requesting full power, we need to undo any previous HDD requests for
1248 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1249 specified anything other than above, the buffered requests for BMPS and WoWL
1250 will not be cleared.
1251 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1252 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1253 request".
1254 Note 3: When the device finally enters Full Power PMC will start a timer
1255 if any of the following holds true:
1256 - Auto BMPS mode is enabled
1257 - Uapsd request is pending
1258 - HDD's request for BMPS is pending
1259 - HDD's request for WoWL is pending
1260 On timer expiry PMC will attempt to put the device in BMPS mode if following
1261 (in addition to those listed above) holds true:
1262 - Polling of all modules through the Power Save Check routine passes
1263 - STA is associated to an access point
1264 \param hHal - The handle returned by macOpen.
1265 \param - callbackRoutine Callback routine invoked in case of success/failure
1266 \param - callbackContext - Cookie to be passed back during callback
1267 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1268 distinguish between BAP and HDD requests
1269 \return eHalStatus - status
1270 eHAL_STATUS_SUCCESS - device brought to full power state
1271 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1272 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1273 ---------------------------------------------------------------------------*/
1274extern eHalStatus sme_RequestFullPower (
1275 tHalHandle hHal,
1276 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1277 void *callbackContext,
1278 tRequestFullPowerReason fullPowerReason);
1279
1280/* ---------------------------------------------------------------------------
1281 \fn sme_RequestBmps
1282 \brief Request that the device be put in BMPS state. Request will be
1283 accepted only if BMPS mode is enabled and power save check routine
1284 passes. Only HDD should invoke this API.
1285 \param hHal - The handle returned by macOpen.
1286 \param - callbackRoutine Callback routine invoked in case of success/failure
1287 \param - callbackContext - Cookie to be passed back during callback
1288 \return eHalStatus
1289 eHAL_STATUS_SUCCESS - device is in BMPS state
1290 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1291 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1292 ---------------------------------------------------------------------------*/
1293extern eHalStatus sme_RequestBmps (
1294 tHalHandle hHal,
1295 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1296 void *callbackContext);
1297
1298/* ---------------------------------------------------------------------------
1299 \fn sme_SetDHCPTillPowerActiveFlag
1300 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1301 entry by PMC
1302 \param hHal - The handle returned by macOpen.
1303 ---------------------------------------------------------------------------*/
1304void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1305
1306
1307/* ---------------------------------------------------------------------------
1308 \fn sme_StartUapsd
1309 \brief Request that the device be put in UAPSD state. If the device is in
1310 Full Power it will be put in BMPS mode first and then into UAPSD
1311 mode.
1312 \param hHal - The handle returned by macOpen.
1313 \param - callbackRoutine Callback routine invoked in case of success/failure
1314 \param - callbackContext - Cookie to be passed back during callback
1315 eHAL_STATUS_SUCCESS - device is in UAPSD state
1316 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1317 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1318 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1319 \return eHalStatus
1320 ---------------------------------------------------------------------------*/
1321extern eHalStatus sme_StartUapsd (
1322 tHalHandle hHal,
1323 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1324 void *callbackContext);
1325
1326/* ---------------------------------------------------------------------------
1327 \fn sme_StopUapsd
1328 \brief Request that the device be put out of UAPSD state. Device will be
1329 put in in BMPS state after stop UAPSD completes. Buffered requests for
1330 UAPSD will be cleared after this.
1331 \param hHal - The handle returned by macOpen.
1332 \return eHalStatus
1333 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1334 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1335 ---------------------------------------------------------------------------*/
1336extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1337
1338/* ---------------------------------------------------------------------------
1339 \fn sme_RequestStandby
1340 \brief Request that the device be put in standby. It is HDD's responsibility
1341 to bring the chip to full power and do a discconnect before calling
1342 this API. Request for standby will be rejected if STA is associated
1343 to an AP.
1344 \param hHal - The handle returned by macOpen.
1345 \param - callbackRoutine Callback routine invoked in case of success/failure
1346 \param - callbackContext - Cookie to be passed back during callback
1347 \return eHalStatus
1348 eHAL_STATUS_SUCCESS - device is in Standby mode
1349 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1350 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1351 ---------------------------------------------------------------------------*/
1352extern eHalStatus sme_RequestStandby (
1353 tHalHandle hHal,
1354 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1355 void *callbackContext);
1356
1357/* ---------------------------------------------------------------------------
1358 \fn sme_RegisterPowerSaveCheck
1359 \brief Register a power save check routine that is called whenever
1360 the device is about to enter one of the power save modes.
1361 \param hHal - The handle returned by macOpen.
1362 \param checkRoutine - Power save check routine to be registered
1363 \param callbackContext - Cookie to be passed back during callback
1364 \return eHalStatus
1365 eHAL_STATUS_SUCCESS - successfully registered
1366 eHAL_STATUS_FAILURE - not successfully registered
1367 ---------------------------------------------------------------------------*/
1368extern eHalStatus sme_RegisterPowerSaveCheck (
1369 tHalHandle hHal,
1370 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1371
1372/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301373 \fn sme_Register11dScanDoneCallback
1374 \brief Register a routine of type csrScanCompleteCallback which is
1375 called whenever an 11d scan is done
1376 \param hHal - The handle returned by macOpen.
1377 \param callback - 11d scan complete routine to be registered
1378 \return eHalStatus
1379 ---------------------------------------------------------------------------*/
1380extern eHalStatus sme_Register11dScanDoneCallback (
1381 tHalHandle hHal,
1382 csrScanCompleteCallback);
1383
1384/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001385 \fn sme_DeregisterPowerSaveCheck
1386 \brief Deregister a power save check routine
1387 \param hHal - The handle returned by macOpen.
1388 \param checkRoutine - Power save check routine to be deregistered
1389 \return eHalStatus
1390 eHAL_STATUS_SUCCESS - successfully deregistered
1391 eHAL_STATUS_FAILURE - not successfully deregistered
1392 ---------------------------------------------------------------------------*/
1393extern eHalStatus sme_DeregisterPowerSaveCheck (
1394 tHalHandle hHal,
1395 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1396
1397/* ---------------------------------------------------------------------------
1398 \fn sme_RegisterDeviceStateUpdateInd
1399 \brief Register a callback routine that is called whenever
1400 the device enters a new device state (Full Power, BMPS, UAPSD)
1401 \param hHal - The handle returned by macOpen.
1402 \param callbackRoutine - Callback routine to be registered
1403 \param callbackContext - Cookie to be passed back during callback
1404 \return eHalStatus
1405 eHAL_STATUS_SUCCESS - successfully registered
1406 eHAL_STATUS_FAILURE - not successfully registered
1407 ---------------------------------------------------------------------------*/
1408extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1409 tHalHandle hHal,
1410 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1411 void *callbackContext);
1412
1413/* ---------------------------------------------------------------------------
1414 \fn sme_DeregisterDeviceStateUpdateInd
1415 \brief Deregister a routine that was registered for device state changes
1416 \param hHal - The handle returned by macOpen.
1417 \param callbackRoutine - Callback routine to be deregistered
1418 \return eHalStatus
1419 eHAL_STATUS_SUCCESS - successfully deregistered
1420 eHAL_STATUS_FAILURE - not successfully deregistered
1421 ---------------------------------------------------------------------------*/
1422extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1423 tHalHandle hHal,
1424 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1425
1426/* ---------------------------------------------------------------------------
1427 \fn sme_WowlAddBcastPattern
1428 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1429 do a pattern match on these patterns when Wowl is enabled during BMPS
1430 mode.
1431 \param hHal - The handle returned by macOpen.
1432 \param pattern - Pattern to be added
1433 \return eHalStatus
1434 eHAL_STATUS_FAILURE Cannot add pattern
1435 eHAL_STATUS_SUCCESS Request accepted.
1436 ---------------------------------------------------------------------------*/
1437extern eHalStatus sme_WowlAddBcastPattern (
1438 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001439 tpSirWowlAddBcastPtrn pattern,
1440 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001441
1442/* ---------------------------------------------------------------------------
1443 \fn sme_WowlDelBcastPattern
1444 \brief Delete a pattern that was added for Pattern Byte Matching.
1445 \param hHal - The handle returned by macOpen.
1446 \param pattern - Pattern to be deleted
1447 \return eHalStatus
1448 eHAL_STATUS_FAILURE Cannot delete pattern
1449 eHAL_STATUS_SUCCESS Request accepted.
1450 ---------------------------------------------------------------------------*/
1451extern eHalStatus sme_WowlDelBcastPattern (
1452 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001453 tpSirWowlDelBcastPtrn pattern,
1454 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001455
1456/* ---------------------------------------------------------------------------
1457 \fn sme_EnterWowl
1458 \brief This is the API to request entry into WOWL mode.
1459 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1460 SME will will cache the information that WOWL has been requested and
1461 attempt to put the device in BMPS first. On entry into BMPS, SME will
1462 enter the WOWL mode.
1463 Note 1: After WoWL request is accepted, If module other than HDD requests
1464 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1465 and attempt to put the chip into BMPS+WOWL based on a timer.
1466 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1467 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1468 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1469 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1470 are required. Currently there is no requirement or use case to support UAPSD
1471 and WOWL at the same time.
1472 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1473 Note 5. Request for WoWL is rejected if BMPS is disabled.
1474
1475 \param hHal - The handle returned by macOpen.
1476 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1477 Used for success/failure notification by SME
1478 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1479 at the time of callback.
1480 \param wakeReasonIndCB - Callback routine provided by HDD.
1481 Used for Wake Reason Indication by SME
1482 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1483 at the time of callback.
1484 \return eHalStatus
1485 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1486 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1487 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1488 mode is entered.
1489 ---------------------------------------------------------------------------*/
1490extern eHalStatus sme_EnterWowl (
1491 tHalHandle hHal,
1492 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1493 void *enterWowlCallbackContext,
1494#ifdef WLAN_WAKEUP_EVENTS
1495 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1496 void *wakeReasonIndCBContext,
1497#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001498 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001499
1500/* ---------------------------------------------------------------------------
1501 \fn sme_ExitWowl
1502 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1503 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1504 mode. Any Buffered request for WoWL will be cleared after this API.
1505 \param hHal - The handle returned by macOpen.
1506 \return eHalStatus
1507 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1508 only if the previous "Enter WOWL" transaction has
1509 not even completed.
1510 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1511 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301512extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001513
1514/* ---------------------------------------------------------------------------
1515
1516 \fn sme_RoamSetKey
1517
1518 \brief To set encryption key. This function should be called only when connected
1519 This is an asynchronous API.
1520
1521 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1522
1523 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1524
1525 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1526
1527 FAILURE or RESOURCES The API finished and failed.
1528
1529 -------------------------------------------------------------------------------*/
1530eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1531
1532/* ---------------------------------------------------------------------------
1533
1534 \fn sme_RoamRemoveKey
1535
1536 \brief To set encryption key. This is an asynchronous API.
1537
1538 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1539
1540 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1541
1542 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1543
1544 FAILURE or RESOURCES The API finished and failed.
1545
1546 -------------------------------------------------------------------------------*/
1547eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1548
1549
1550/* ---------------------------------------------------------------------------
1551
1552 \fn sme_GetCountryCode
1553
1554 \brief To return the current country code. If no country code is applied, default country code is
1555 used to fill the buffer.
1556 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1557 This is a synchronous API.
1558
1559 \param pBuf - pointer to a caller allocated buffer for returned country code.
1560
1561 \param pbLen For input, this parameter indicates how big is the buffer.
1562 Upon return, this parameter has the number of bytes for country. If pBuf
1563 doesn't have enough space, this function returns
1564 fail status and this parameter contains the number that is needed.
1565
1566 \return eHalStatus SUCCESS.
1567
1568 FAILURE or RESOURCES The API finished and failed.
1569
1570 -------------------------------------------------------------------------------*/
1571eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1572
1573/* ---------------------------------------------------------------------------
1574
1575 \fn sme_SetCountryCode
1576
1577 \brief To change the current/default country code.
1578 If 11d supported is turned off, an error is return.
1579 This is a synchronous API.
1580
1581 \param pCountry - pointer to a caller allocated buffer for the country code.
1582
1583 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1584 whether a reset is required.
1585
1586 \return eHalStatus SUCCESS.
1587
1588 FAILURE or RESOURCES The API finished and failed.
1589
1590 -------------------------------------------------------------------------------*/
1591eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1592
1593/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301594
1595 \fn sme_InitChannels
1596
1597 \brief Used to initialize CSR channel lists while driver loading
1598
1599 \param hHal - global pMac structure
1600
1601 \return eHalStatus SUCCESS.
1602
1603 FAILURE or RESOURCES The API finished and failed.
1604
1605 -------------------------------------------------------------------------------*/
1606eHalStatus sme_InitChannels(tHalHandle hHal);
1607
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301608
1609/* ---------------------------------------------------------------------------
1610 \fn sme_InitChannelsForCC
1611
1612 \brief Used to issue regulatory hint to user
1613
1614 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301615 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301616
1617 \return eHalStatus SUCCESS.
1618
1619 FAILURE or RESOURCES The API finished and failed.
1620
1621 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301622eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301623
Mihir Shetee1093ba2014-01-21 20:13:32 +05301624/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001625 \fn sme_ResetCountryCodeInformation
1626 \brief this function is to reset the country code current being used back to EEPROM default
1627 this includes channel list and power setting. This is a synchronous API.
1628 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1629 a restart is needed to apply the change
1630 \return eHalStatus
1631 -------------------------------------------------------------------------------*/
1632eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1633
1634/* ---------------------------------------------------------------------------
1635 \fn sme_GetSupportedCountryCode
1636 \brief this function is to get a list of the country code current being supported
1637 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1638 this has the country code list. 3 bytes for each country code. This may be NULL if
1639 caller wants to know the needed byte count.
1640 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1641 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1642 \return eHalStatus
1643 -------------------------------------------------------------------------------*/
1644eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1645
1646/* ---------------------------------------------------------------------------
1647 \fn sme_GetCurrentRegulatoryDomain
1648 \brief this function is to get the current regulatory domain. This is a synchronous API.
1649 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1650 SME. The function fails if 11d support is turned off.
1651 \param pDomain - Caller allocated buffer to return the current domain.
1652 \return eHalStatus SUCCESS.
1653
1654 FAILURE or RESOURCES The API finished and failed.
1655 -------------------------------------------------------------------------------*/
1656eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1657
1658/* ---------------------------------------------------------------------------
1659 \fn sme_SetRegulatoryDomain
1660 \brief this function is to set the current regulatory domain.
1661 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1662 SME. This is a synchronous API.
1663 \param domainId - indicate the domain (defined in the driver) needs to set to.
1664 See v_REGDOMAIN_t for definition
1665 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1666 a restart is needed to apply the change
1667 \return eHalStatus
1668 -------------------------------------------------------------------------------*/
1669eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1670
1671/* ---------------------------------------------------------------------------
1672
1673 \fn sme_GetRegulatoryDomainForCountry
1674
1675 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1676
1677 \param pCountry - pointer to a caller allocated buffer for input country code.
1678
1679 \param pDomainId Upon successful return, it is the domain that country belongs to.
1680 If it is NULL, returning success means that the country code is known.
1681
1682 \return eHalStatus SUCCESS.
1683
1684 FAILURE or RESOURCES The API finished and failed.
1685
1686 -------------------------------------------------------------------------------*/
1687eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1688
1689
1690
1691/* ---------------------------------------------------------------------------
1692
1693 \fn sme_GetSupportedRegulatoryDomains
1694
1695 \brief To return a list of supported regulatory domains. This is a synchronous API.
1696
1697 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1698
1699 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1700 Upon return, this parameter has the number for supported domains. If pDomains
1701 doesn't have enough space for all the supported domains, this function returns
1702 fail status and this parameter contains the number that is needed.
1703
1704 \return eHalStatus SUCCESS.
1705
1706 FAILURE or RESOURCES The API finished and failed.
1707
1708 -------------------------------------------------------------------------------*/
1709eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1710
1711//some support functions
1712tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1713tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1714tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1715//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1716eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1717
1718typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1719/* ---------------------------------------------------------------------------
1720
1721 \fn sme_ChangeCountryCode
1722
1723 \brief Change Country code from upperlayer during WLAN driver operation.
1724 This is a synchronous API.
1725
1726 \param hHal - The handle returned by macOpen.
1727
1728 \param pCountry New Country Code String
1729
Abhishek Singha306a442013-11-07 18:39:01 +05301730 \param sendRegHint If we want to send reg hint to nl80211
1731
Jeff Johnson295189b2012-06-20 16:38:30 -07001732 \return eHalStatus SUCCESS.
1733
1734 FAILURE or RESOURCES The API finished and failed.
1735
1736 -------------------------------------------------------------------------------*/
1737eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1738 tSmeChangeCountryCallback callback,
1739 tANI_U8 *pCountry,
1740 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301741 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301742 tAniBool countryFromUserSpace,
1743 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001744
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301745/* ---------------------------------------------------------------------------
1746
Amar Singhal0d15bd52013-10-12 23:13:13 -07001747 \fn sme_GenericChangeCountryCode
1748
1749 \brief Generic API to change country code
1750
1751 \param hHal - The handle returned by macOpen.
1752
1753 \param pCountry New Country Code String
1754
1755 \param reg_domain Regulatory domain for the new country code
1756
1757 \return eHalStatus SUCCESS.
1758
1759 FAILURE or RESOURCES The API finished and failed.
1760
1761 -------------------------------------------------------------------------------*/
1762eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1763 tANI_U8 *pCountry,
1764 v_REGDOMAIN_t reg_domain);
1765
1766/* ---------------------------------------------------------------------------
1767
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301768 \fn sme_DHCPStartInd
1769
1770 \brief Indicate FW about DHCP start event.
1771
1772 \param hHal - The handle returned by macOpen.
1773
1774 \param device_mode the mode of the device
1775
c_hpothu0b0cab72014-02-13 21:52:40 +05301776 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301777
1778 \return eHalStatus SUCCESS.
1779
1780 FAILURE or RESOURCES The API finished and failed.
1781
1782 -------------------------------------------------------------------------------*/
1783
1784eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1785 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301786 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301787
1788/* ---------------------------------------------------------------------------
1789
1790 \fn sme_DHCPStopInd
1791
1792 \brief Indicate FW about DHCP stop event.
1793
1794 \param hHal - The handle returned by macOpen.
1795
1796 \param device_mode the mode of the device
1797
c_hpothu0b0cab72014-02-13 21:52:40 +05301798 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301799
1800 \return eHalStatus SUCCESS.
1801
1802 FAILURE or RESOURCES The API finished and failed.
1803
1804 -------------------------------------------------------------------------------*/
1805eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1806 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301807 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301808
Jeff Johnson295189b2012-06-20 16:38:30 -07001809
1810/* ---------------------------------------------------------------------------
1811 \fn sme_BtcSignalBtEvent
1812 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1813 BT event type and the current operating mode of Libra (full power,
1814 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1815 would be employed.
1816 \param hHal - The handle returned by macOpen.
1817 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1818 Caller owns the memory and is responsible for freeing it.
1819 \return VOS_STATUS
1820 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1821 if driver has not yet been initialized or if BTC
1822 Events Layer has been disabled.
1823 VOS_STATUS_SUCCESS BT Event passed to HAL
1824 ---------------------------------------------------------------------------*/
1825VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1826
1827/* ---------------------------------------------------------------------------
1828 \fn sme_BtcSetConfig
1829 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1830 This function should be invoked only after CFG download has completed.
1831 Calling it after sme_HDDReadyInd is recommended.
1832 \param hHal - The handle returned by macOpen.
1833 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1834 tSmeBtcConfig. Caller owns the memory and is responsible
1835 for freeing it.
1836 \return VOS_STATUS
1837 VOS_STATUS_E_FAILURE Config not passed to HAL.
1838 VOS_STATUS_SUCCESS Config passed to HAL
1839 ---------------------------------------------------------------------------*/
1840VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1841
1842/* ---------------------------------------------------------------------------
1843 \fn sme_BtcGetConfig
1844 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1845 \param hHal - The handle returned by macOpen.
1846 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1847 Caller owns the memory and is responsible for freeing it.
1848 \return VOS_STATUS
1849 VOS_STATUS_E_FAILURE - failure
1850 VOS_STATUS_SUCCESS success
1851 ---------------------------------------------------------------------------*/
1852VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1853
1854/* ---------------------------------------------------------------------------
1855 \fn sme_SetCfgPrivacy
1856 \brief API to set configure privacy parameters
1857 \param hHal - The handle returned by macOpen.
1858 \param pProfile - Pointer CSR Roam profile.
1859 \param fPrivacy - This parameter indicates status of privacy
1860
1861 \return void
1862 ---------------------------------------------------------------------------*/
1863void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1864
1865#if defined WLAN_FEATURE_VOWIFI
1866/* ---------------------------------------------------------------------------
1867 \fn sme_NeighborReportRequest
1868 \brief API to request neighbor report.
1869 \param hHal - The handle returned by macOpen.
1870 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1871 tRrmNeighborReq. Caller owns the memory and is responsible
1872 for freeing it.
1873 \return VOS_STATUS
1874 VOS_STATUS_E_FAILURE - failure
1875 VOS_STATUS_SUCCESS success
1876 ---------------------------------------------------------------------------*/
1877VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1878 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1879#endif
1880
1881//The following are debug APIs to support direct read/write register/memory
1882//They are placed in SME because HW cannot be access when in LOW_POWER state
1883//AND not connected. The knowledge and synchronization is done in SME
1884
1885//sme_DbgReadRegister
1886//Caller needs to validate the input values
1887VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1888
1889//sme_DbgWriteRegister
1890//Caller needs to validate the input values
1891VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1892
1893//sme_DbgReadMemory
1894//Caller needs to validate the input values
1895//pBuf caller allocated buffer has the length of nLen
1896VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1897
1898//sme_DbgWriteMemory
1899//Caller needs to validate the input values
1900VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1901
Jeff Johnson295189b2012-06-20 16:38:30 -07001902VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1903 tSirVersionType *pVersion);
1904VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1905 tSirVersionType *pVersion);
1906VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1907 tANI_U8 *pVersion,
1908 tANI_U32 versionBufferSize);
1909VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1910 tANI_U8 *pVersion,
1911 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001912eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1913 csrRoamCompleteCallback callback,
1914 void *pContext);
1915
1916#ifdef FEATURE_WLAN_WAPI
1917/* ---------------------------------------------------------------------------
1918 \fn sme_RoamSetBKIDCache
1919 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1920 candidate list.
1921 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1922 it is opened (by calling halOpen).
1923 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1924 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1925 when retruning, this is the number of items put into pBKIDCache
1926 \return eHalStatus - when fail, it usually means the buffer allocated is not
1927 big enough and pNumItems has the number of tBkidCacheInfo.
1928 ---------------------------------------------------------------------------*/
1929eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1930 tANI_U32 numItems );
1931
1932/* ---------------------------------------------------------------------------
1933 \fn sme_RoamGetBKIDCache
1934 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1935 BKID cache.
1936 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1937 it is opened (by calling halOpen).
1938 \param pNum - caller allocated memory that has the space of the number of
1939 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1940 in SME cache.
1941 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1942 upon return
1943 \return eHalStatus - when fail, it usually means the buffer allocated is not
1944 big enough.
1945 ---------------------------------------------------------------------------*/
1946eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1947 tBkidCacheInfo *pBkidCache);
1948
1949/* ---------------------------------------------------------------------------
1950 \fn sme_RoamGetNumBKIDCache
1951 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1952 number of BKID cache entries.
1953 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1954 it is opened (by calling halOpen).
1955 \return tANI_U32 - the number of BKID cache entries.
1956 ---------------------------------------------------------------------------*/
1957tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1958
1959/* ---------------------------------------------------------------------------
1960 \fn sme_ScanGetBKIDCandidateList
1961 \brief a wrapper function to return the BKID candidate list
1962 \param pBkidList - caller allocated buffer point to an array of
1963 tBkidCandidateInfo
1964 \param pNumItems - pointer to a variable that has the number of
1965 tBkidCandidateInfo allocated when retruning, this is
1966 either the number needed or number of items put into
1967 pPmkidList
1968 \return eHalStatus - when fail, it usually means the buffer allocated is not
1969 big enough and pNumItems
1970 has the number of tBkidCandidateInfo.
1971 \Note: pNumItems is a number of tBkidCandidateInfo,
1972 not sizeof(tBkidCandidateInfo) * something
1973 ---------------------------------------------------------------------------*/
1974eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1975 tBkidCandidateInfo *pBkidList,
1976 tANI_U32 *pNumItems );
1977#endif /* FEATURE_WLAN_WAPI */
1978
Jeff Johnsone7245742012-09-05 17:12:55 -07001979#ifdef FEATURE_OEM_DATA_SUPPORT
1980/********************************************************************************************
1981 Oem data related modifications
1982*********************************************************************************************/
1983/* ---------------------------------------------------------------------------
1984 \fn sme_OemDataReq
1985 \param sessionId - session id of session to be used for oem data req.
1986 \param pOemDataReqID - pointer to an object to get back the request ID
1987 \param callback - a callback function that is called upon finish
1988 \param pContext - a pointer passed in for the callback
1989 \return eHalStatus
1990 ---------------------------------------------------------------------------*/
1991eHalStatus sme_OemDataReq(tHalHandle hHal,
1992 tANI_U8 sessionId,
1993 tOemDataReqConfig *,
1994 tANI_U32 *pOemDataReqID,
1995 oemData_OemDataReqCompleteCallback callback,
1996 void *pContext);
1997
1998/* ---------------------------------------------------------------------------
1999 \fn sme_getOemDataRsp
2000 \param pOemDataRsp - A pointer to the response object
2001 \param pOemDataReqID - pointer to an object to get back the request ID
2002 \return eHalStatus
2003 ---------------------------------------------------------------------------*/
2004eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2005 tOemDataRsp **pOemDataRsp);
2006
2007#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002008
2009
Jeff Johnson295189b2012-06-20 16:38:30 -07002010
2011/* ---------------------------------------------------------------------------
2012
2013 \fn sme_RoamUpdateAPWPSIE
2014
2015 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2016 This is an asynchronous API.
2017
2018 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2019
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002020 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002021
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002022 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002023
2024 -------------------------------------------------------------------------------*/
2025
2026eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2027/* ---------------------------------------------------------------------------
2028
2029 \fn sme_RoamUpdateAPWPARSNIEs
2030
2031 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2032 This is an asynchronous API.
2033
2034 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2035
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002036 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002037
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002038 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002039
2040 -------------------------------------------------------------------------------*/
2041eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2042
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002043/* ---------------------------------------------------------------------------
2044
2045 sme_ChangeMCCBeaconInterval
2046
2047 \brief To update P2P-GO's beacon Interval.
2048
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002049 \return eHalStatus SUCCESS
2050 FAILURE or RESOURCES
2051 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002052 -------------------------------------------------------------------------------*/
2053eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2054
2055
Jeff Johnson295189b2012-06-20 16:38:30 -07002056
2057/* ---------------------------------------------------------------------------
2058 \fn sme_sendBTAmpEvent
2059 \brief API to send the btAMPstate to FW
2060 \param hHal - The handle returned by macOpen.
2061 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002062 \return eHalStatus SUCCESS
2063 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002064
2065--------------------------------------------------------------------------- */
2066
2067eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2068
2069
2070
2071/* ---------------------------------------------------------------------------
2072 \fn sme_SetHostOffload
2073 \brief API to set the host offload feature.
2074 \param hHal - The handle returned by macOpen.
2075 \param pRequest - Pointer to the offload request.
2076 \return eHalStatus
2077 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002078eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2079 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002080
2081/* ---------------------------------------------------------------------------
2082 \fn sme_SetKeepAlive
2083 \brief API to set the Keep Alive feature.
2084 \param hHal - The handle returned by macOpen.
2085 \param pRequest - Pointer to the Keep Alive request.
2086 \return eHalStatus
2087 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002088eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2089 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002090
Jeff Johnson295189b2012-06-20 16:38:30 -07002091/* ----------------------------------------------------------------------------
2092 \fn sme_GetOperationChannel
2093 \brief API to get current channel on which STA is parked
2094 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002095 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002096 \returns eHAL_STATUS_SUCCESS
2097 eHAL_STATUS_FAILURE
2098-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002099eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002100
Jeff Johnson295189b2012-06-20 16:38:30 -07002101/* ---------------------------------------------------------------------------
2102
2103 \fn sme_RegisterMgtFrame
2104
2105 \brief To register managment frame of specified type and subtype.
2106 \param frameType - type of the frame that needs to be passed to HDD.
2107 \param matchData - data which needs to be matched before passing frame
2108 to HDD.
2109 \param matchDataLen - Length of matched data.
2110 \return eHalStatus
2111 -------------------------------------------------------------------------------*/
2112eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2113 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2114
2115/* ---------------------------------------------------------------------------
2116
2117 \fn sme_DeregisterMgtFrame
2118
2119 \brief To De-register managment frame of specified type and subtype.
2120 \param frameType - type of the frame that needs to be passed to HDD.
2121 \param matchData - data which needs to be matched before passing frame
2122 to HDD.
2123 \param matchDataLen - Length of matched data.
2124 \return eHalStatus
2125 -------------------------------------------------------------------------------*/
2126eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2127 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07002128
2129/* ---------------------------------------------------------------------------
2130
2131 \fn sme_ConfigureRxpFilter
2132
2133 \brief
2134 SME will pass this request to lower mac to set/reset the filter on RXP for
2135 multicast & broadcast traffic.
2136
2137 \param
2138
2139 hHal - The handle returned by macOpen.
2140
2141 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2142 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2143 on this param. In future we can use this as a mask to set various types of
2144 filters as suggested below:
2145 FILTER_ALL_MULTICAST:
2146 FILTER_ALL_BROADCAST:
2147 FILTER_ALL_MULTICAST_BROADCAST:
2148
2149
2150 \return eHalStatus
2151
2152
2153--------------------------------------------------------------------------- */
2154eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2155 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2156
2157/* ---------------------------------------------------------------------------
2158
2159 \fn sme_ConfigureAppsCpuWakeupState
2160
2161 \brief
2162 SME will pass this request to lower mac to dynamically adjusts the listen
2163 interval based on the WLAN/MSM activity. This feature is named as
2164 Telescopic Beacon wakeup feature.
2165
2166 \param
2167
2168 hHal - The handle returned by macOpen.
2169
2170 isAppsAwake- Depicts the state of the Apps CPU
2171
2172
2173 \return eHalStatus
2174
2175
2176--------------------------------------------------------------------------- */
2177eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2178
Jeff Johnson295189b2012-06-20 16:38:30 -07002179/* ---------------------------------------------------------------------------
2180
2181 \fn sme_ConfigureSuspendInd
2182
2183 \brief
2184 SME will pass this request to lower mac to Indicate that the wlan needs to
2185 be suspended
2186
2187 \param
2188
2189 hHal - The handle returned by macOpen.
2190
2191 wlanSuspendParam- Depicts the wlan suspend params
2192
2193
2194 \return eHalStatus
2195
2196
2197--------------------------------------------------------------------------- */
2198eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2199 tpSirWlanSuspendParam wlanSuspendParam);
2200
2201/* ---------------------------------------------------------------------------
2202
2203 \fn sme_ConfigureResumeReq
2204
2205 \brief
2206 SME will pass this request to lower mac to Indicate that the wlan needs to
2207 be Resumed
2208
2209 \param
2210
2211 hHal - The handle returned by macOpen.
2212
2213 wlanResumeParam- Depicts the wlan resume params
2214
2215
2216 \return eHalStatus
2217
2218
2219--------------------------------------------------------------------------- */
2220eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2221 tpSirWlanResumeParam wlanResumeParam);
2222
Jeff Johnson295189b2012-06-20 16:38:30 -07002223
2224/* ---------------------------------------------------------------------------
2225
2226 \fn sme_GetInfraSessionId
2227
2228 \brief To get the session ID for infra session, if connected
2229 This is a synchronous API.
2230
2231 \param hHal - The handle returned by macOpen.
2232
2233 \return sessionid, -1 if infra session is not connected
2234
2235 -------------------------------------------------------------------------------*/
2236tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2237
2238/* ---------------------------------------------------------------------------
2239
2240 \fn sme_GetInfraOperationChannel
2241
2242 \brief To get the operating channel for infra session, if connected
2243 This is a synchronous API.
2244
2245 \param hHal - The handle returned by macOpen.
2246 \param sessionId - the sessionId returned by sme_OpenSession.
2247
2248 \return operating channel, 0 if infra session is not connected
2249
2250 -------------------------------------------------------------------------------*/
2251tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2252/* ---------------------------------------------------------------------------
2253
2254 \fn sme_GetConcurrentOperationChannel
2255
2256 \brief To get the operating channel for other concurrent sessions, if connected
2257 This is a synchronous API.
2258
2259 \param hHal - The handle returned by macOpen.
2260 \param currentPersona - persona that is trying to come up.
2261
2262 \return operating channel, 0 if infra session is not connected
2263
2264 -------------------------------------------------------------------------------*/
2265tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2266
2267/* ---------------------------------------------------------------------------
2268 \fn sme_AbortMacScan
2269 \brief API to cancel MAC scan.
2270 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302271 \param sessionId - sessionId for interface
Jeff Johnson295189b2012-06-20 16:38:30 -07002272 \return VOS_STATUS
2273 VOS_STATUS_E_FAILURE - failure
2274 VOS_STATUS_SUCCESS success
2275 ---------------------------------------------------------------------------*/
Srinivas, Dasari138af4f2014-02-07 11:13:45 +05302276eHalStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2277 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002278
2279/* ---------------------------------------------------------------------------
2280 \fn sme_GetCfgValidChannels
2281 \brief API to get valid channel list
2282 \param hHal - The handle returned by macOpen.
2283 \param aValidChannels - Pointer to the valid channel list
2284 \param len - valid channel list length
2285 \return eHalStatus
2286 ---------------------------------------------------------------------------*/
2287eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2288
2289#ifdef FEATURE_WLAN_SCAN_PNO
2290
2291/* ---------------------------------------------------------------------------
2292 \fn sme_SetPreferredNetworkList
2293 \brief API to set the Preferred Network List Offload feature.
2294 \param hHal - The handle returned by macOpen.
2295 \param pRequest - Pointer to the offload request.
2296 \return eHalStatus
2297 ---------------------------------------------------------------------------*/
2298eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2299
2300/* ---------------------------------------------------------------------------
2301 \fn sme_SetRSSIFilter
2302 \brief API to set RSSI Filter feature.
2303 \param hHal - The handle returned by macOpen.
2304 \param pRequest - Pointer to the offload request.
2305 \return eHalStatus
2306 ---------------------------------------------------------------------------*/
2307eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2308
2309/******************************************************************************
2310*
2311* Name: sme_PreferredNetworkFoundInd
2312*
2313* Description:
2314* Invoke Preferred Network Found Indication
2315*
2316* Parameters:
2317* hHal - HAL handle for device
2318* pMsg - found network description
2319*
2320* Returns: eHalStatus
2321*
2322******************************************************************************/
2323eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2324#endif // FEATURE_WLAN_SCAN_PNO
2325
2326/* ---------------------------------------------------------------------------
2327 \fn sme_SetPowerParams
2328 \brief API to set Power Parameters
2329 \param hHal - The handle returned by macOpen.
2330 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002331 \param forced - if true, not to be dropped silently in host, it must reach
2332 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2333 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002334 \return eHalStatus
2335 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002336eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002337
2338/* ---------------------------------------------------------------------------
2339 \fn sme_SetTxPerTracking
2340 \brief Set Tx PER tracking configuration parameters
2341 \param hHal - The handle returned by macOpen.
2342 \param pTxPerTrackingParam - Tx PER configuration parameters
2343 \return eHalStatus
2344 ---------------------------------------------------------------------------*/
2345eHalStatus sme_SetTxPerTracking (
2346 tHalHandle hHal,
2347 void (*pCallbackfn) (void *pCallbackContext),
2348 void *pCallbackContext,
2349 tpSirTxPerTrackingParam pTxPerTrackingParam);
2350
2351#ifdef WLAN_FEATURE_PACKET_FILTERING
2352/* ---------------------------------------------------------------------------
2353 \fn sme_ReceiveFilterSetFilter
2354 \brief API to set 8023 Multicast Address List
2355 \param hHal - The handle returned by macOpen.
2356 \param pMulticastAddrs - Pointer to the Multicast Address List
2357 \return eHalStatus
2358 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002359eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002360
2361/* ---------------------------------------------------------------------------
2362 \fn sme_ReceiveFilterSetFilter
2363 \brief API to set Receive Packet Filter
2364 \param hHal - The handle returned by macOpen.
2365 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2366 \return eHalStatus
2367 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002368eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2369 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002370
2371/* ---------------------------------------------------------------------------
2372 \fn sme_GetFilterMatchCount
2373 \brief API to get D0 PC Filter Match Count
2374 \param hHal - The handle returned by macOpen
2375 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2376 \param callbackContext - Cookie to be passed back during callback
2377 \return eHalStatus
2378 ---------------------------------------------------------------------------*/
2379eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2380 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002381 void *callbackContext,
2382 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002383
2384/* ---------------------------------------------------------------------------
2385 \fn sme_ReceiveFilterClearFilter
2386 \brief API to clear Receive Packet Filter
2387 \param hHal - The handle returned by macOpen.
2388 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2389 \return eHalStatus
2390 ---------------------------------------------------------------------------*/
2391eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002392 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2393 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002394#endif // WLAN_FEATURE_PACKET_FILTERING
2395/* ---------------------------------------------------------------------------
2396
2397 \fn sme_IsChannelValid
2398 \brief To check if the channel is valid for currently established domain
2399 This is a synchronous API.
2400
2401 \param hHal - The handle returned by macOpen.
2402 \param channel - channel to verify
2403
2404 \return TRUE/FALSE, TRUE if channel is valid
2405
2406 -------------------------------------------------------------------------------*/
2407tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2408
2409/* ---------------------------------------------------------------------------
2410 \fn sme_SetFreqBand
2411 \brief Used to set frequency band.
2412 \param hHal
2413 \eBand band value to be configured
2414 \- return eHalStatus
2415 -------------------------------------------------------------------------*/
2416eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2417
2418/* ---------------------------------------------------------------------------
2419 \fn sme_GetFreqBand
2420 \brief Used to get the current band settings.
2421 \param hHal
2422 \pBand pointer to hold the current band value
2423 \- return eHalStatus
2424 -------------------------------------------------------------------------*/
2425eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2426
2427/* ---------------------------------------------------------------------------
2428
2429 \fn sme_SetTxPerTracking
2430 \brief Set Tx PER tracking configuration parameters
2431 \param hHal - The handle returned by macOpen.
2432 \param pTxPerTrackingParam - Tx PER configuration parameters
2433 \return eHalStatus
2434 ---------------------------------------------------------------------------*/
2435eHalStatus sme_SetTxPerTracking (
2436 tHalHandle hHal,
2437 void (*pCallbackfn) (void *pCallbackContext),
2438 void *pCallbackContext,
2439 tpSirTxPerTrackingParam pTxPerTrackingParam);
2440
2441#ifdef WLAN_FEATURE_GTK_OFFLOAD
2442/* ---------------------------------------------------------------------------
2443 \fn sme_SetGTKOffload
2444 \brief API to set GTK offload feature.
2445 \param hHal - The handle returned by macOpen.
2446 \param pRequest - Pointer to the GTK offload request.
2447 \return eHalStatus
2448 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002449eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002450
2451/* ---------------------------------------------------------------------------
2452 \fn sme_GetGTKOffload
2453 \brief API to get GTK offload information.
2454 \param hHal - The handle returned by macOpen.
2455 \param pRequest - Pointer to the GTK offload response.
2456 \return eHalStatus
2457 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002458eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2459 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002460#endif // WLAN_FEATURE_GTK_OFFLOAD
2461
2462#ifdef WLAN_WAKEUP_EVENTS
2463eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2464#endif // WLAN_WAKEUP_EVENTS
2465
2466/* ---------------------------------------------------------------------------
2467 \fn sme_SetTxPerTracking
2468 \brief Set Tx PER tracking configuration parameters
2469 \param hHal - The handle returned by macOpen.
2470 \param pTxPerTrackingParam - Tx PER configuration parameters
2471 \return eHalStatus
2472 ---------------------------------------------------------------------------*/
2473eHalStatus sme_SetTxPerTracking (
2474 tHalHandle hHal,
2475 void (*pCallbackfn) (void *pCallbackContext),
2476 void *pCallbackContext,
2477 tpSirTxPerTrackingParam pTxPerTrackingParam);
2478
2479
2480//return frequency for a particular channel
2481tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2482
2483tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2484
2485#if defined WLAN_FEATURE_P2P_INTERNAL
2486
2487eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2488
2489/* ---------------------------------------------------------------------------
2490 \fn sme_p2pFlushDeviceList
2491 \brief Remove cached P2P result from scan results
2492 \param hHal - The handle returned by macOpen.
2493 \param HDDSessionId - HDD's sessionId. Currently unused.
2494 \return eHalStatus
2495 ---------------------------------------------------------------------------*/
2496eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2497
2498eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2499 tCsrScanResultFilter *pFilter);
2500
2501#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2502
2503/* ---------------------------------------------------------------------------
2504 \fn sme_SetMaxTxPower
2505 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2506 setting will not persist over reboots
2507 \param hHal
2508 \param pBssid BSSID to set the power cap for
2509 \param pBssid pSelfMacAddress self MAC Address
2510 \param pBssid power to set in dB
2511 \- return eHalStatus
2512 -------------------------------------------------------------------------*/
2513eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2514 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2515
Jeff Johnson295189b2012-06-20 16:38:30 -07002516/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002517 \fn sme_SetMaxTxPowerPerBand
2518 \brief Used to set the Maximum Transmit Power for
2519 specific band dynamically. Note: this setting will not persist over reboots
2520 \param band
2521 \param power to set in dB
2522 \- return eHalStatus
2523 -------------------------------------------------------------------------*/
2524eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2525
2526/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002527
schang86c22c42013-03-13 18:41:24 -07002528 \fn sme_SetTxPower
2529
2530 \brief Set Transmit Power dynamically. Note: this setting will
2531 not persist over reboots.
2532
2533 \param hHal
2534 \param sessionId Target Session ID
2535 \param mW power to set in mW
2536 \- return eHalStatus
2537
2538 -------------------------------------------------------------------------------*/
2539eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2540
2541/* ---------------------------------------------------------------------------
2542
Jeff Johnson295189b2012-06-20 16:38:30 -07002543 \fn sme_HideSSID
2544
2545 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2546 not persist over reboots.
2547
2548 \param hHal
2549 \param sessionId
2550 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2551 \- return eHalStatus
2552
2553 -------------------------------------------------------------------------------*/
2554eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002555
2556/* ---------------------------------------------------------------------------
2557
2558 \fn sme_SetTmLevel
2559 \brief Set Thermal Mitigation Level to RIVA
2560 \param hHal - The handle returned by macOpen.
2561 \param newTMLevel - new Thermal Mitigation Level
2562 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002563 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002564 ---------------------------------------------------------------------------*/
2565eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2566
2567/*---------------------------------------------------------------------------
2568
2569 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2570 Host and FW.
2571
2572 \param hHal - HAL handle for device
2573
2574 \return NONE
2575
2576---------------------------------------------------------------------------*/
2577void sme_featureCapsExchange(tHalHandle hHal);
2578
Jeff Johnsond13512a2012-07-17 11:42:19 -07002579/*---------------------------------------------------------------------------
2580
Yathish9f22e662012-12-10 14:21:35 -08002581 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2582 between in Host.
2583
2584 \param hHal - HAL handle for device
2585
2586 \return NONE
2587
2588---------------------------------------------------------------------------*/
2589void sme_disableFeatureCapablity(tANI_U8 feature_index);
2590
2591/*---------------------------------------------------------------------------
2592
Jeff Johnsond13512a2012-07-17 11:42:19 -07002593 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2594 country code
2595 Host and FW.
2596
2597 \param hHal - HAL handle for device
2598 \param pCountry - pointer to country code
2599
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002600 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002601
2602 ---------------------------------------------------------------------------*/
2603eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2604
2605/*---------------------------------------------------------------------------
2606
2607 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2608 country code.
2609
2610 \param hHal - HAL handle for device
2611 \param pCountry - pointer to country code
2612
2613 \return Success or failure
2614
2615 ---------------------------------------------------------------------------*/
2616eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2617
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002618/* ---------------------------------------------------------------------------
2619 \fn sme_transportDebug
2620 \brief Dynamically monitoring Transport channels
2621 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002622 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002623 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002624 \param toggleStallDetect Enable stall detect feature
2625 This feature will take effect to data performance
2626 Not integrate till fully verification
2627 \- return NONE
2628 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002629void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002630
Kiran4a17ebe2013-01-31 10:43:43 -08002631/* ---------------------------------------------------------------------------
2632 \fn sme_ResetPowerValuesFor5G
2633 \brief Reset the power values for 5G band with NV power values.
2634 \param hHal - HAL handle for device
2635 \- return NONE
2636 -------------------------------------------------------------------------*/
2637void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2638
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002639#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002640/* ---------------------------------------------------------------------------
2641 \fn sme_UpdateRoamPrefer5GHz
2642 \brief enable/disable Roam prefer 5G runtime option
2643 This function is called through dynamic setConfig callback function
2644 to configure the Roam prefer 5G runtime option
2645 \param hHal - HAL handle for device
2646 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2647 \- return Success or failure
2648 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002649eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002650
2651/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002652 \fn sme_setRoamIntraBand
2653 \brief enable/disable Intra band roaming
2654 This function is called through dynamic setConfig callback function
2655 to configure the intra band roaming
2656 \param hHal - HAL handle for device
2657 \param nRoamIntraBand Enable/Disable Intra band roaming
2658 \- return Success or failure
2659 -------------------------------------------------------------------------*/
2660eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2661
2662/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002663 \fn sme_UpdateRoamScanNProbes
2664 \brief function to update roam scan N probes
2665 This function is called through dynamic setConfig callback function
2666 to update roam scan N probes
2667 \param hHal - HAL handle for device
2668 \param nProbes number of probe requests to be sent out
2669 \- return Success or failure
2670 -------------------------------------------------------------------------*/
2671eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2672
2673/* ---------------------------------------------------------------------------
2674 \fn sme_UpdateRoamScanHomeAwayTime
2675 \brief function to update roam scan Home away time
2676 This function is called through dynamic setConfig callback function
2677 to update roam scan home away time
2678 \param hHal - HAL handle for device
2679 \param nRoamScanAwayTime Scan home away time
2680 \- return Success or failure
2681 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002682eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2683 const v_U16_t nRoamScanHomeAwayTime,
2684 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002685
2686/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002687 \fn sme_getRoamIntraBand
2688 \brief get Intra band roaming
2689 \param hHal - HAL handle for device
2690 \- return Success or failure
2691 -------------------------------------------------------------------------*/
2692v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2693
2694/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002695 \fn sme_getRoamScanNProbes
2696 \brief get N Probes
2697 \param hHal - HAL handle for device
2698 \- return Success or failure
2699 -------------------------------------------------------------------------*/
2700v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2701
2702/* ---------------------------------------------------------------------------
2703 \fn sme_getRoamScanHomeAwayTime
2704 \brief get Roam scan home away time
2705 \param hHal - HAL handle for device
2706 \- return Success or failure
2707 -------------------------------------------------------------------------*/
2708v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2709
2710/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002711 \fn sme_UpdateImmediateRoamRssiDiff
2712 \brief Update nImmediateRoamRssiDiff
2713 This function is called through dynamic setConfig callback function
2714 to configure nImmediateRoamRssiDiff
2715 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2716 \param hHal - HAL handle for device
2717 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2718 candidate and current AP.
2719 \- return Success or failure
2720 -------------------------------------------------------------------------*/
2721
2722eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002723
Srinivas Girigowdade697412013-02-14 16:31:48 -08002724/* ---------------------------------------------------------------------------
2725 \fn sme_UpdateRoamRssiDiff
2726 \brief Update RoamRssiDiff
2727 This function is called through dynamic setConfig callback function
2728 to configure RoamRssiDiff
2729 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2730 \param hHal - HAL handle for device
2731 \param RoamRssiDiff - minimum rssi difference between potential
2732 candidate and current AP.
2733 \- return Success or failure
2734 -------------------------------------------------------------------------*/
2735
2736eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2737
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002738/*--------------------------------------------------------------------------
2739 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2740 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2741 isFastTransitionEnabled.
2742 This is a synchronuous call
2743 \param hHal - The handle returned by macOpen.
2744 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2745 Other status means SME is failed to update isFastTransitionEnabled.
2746 \sa
2747 --------------------------------------------------------------------------*/
2748
2749eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2750 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002751
2752/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002753 \fn sme_UpdateWESMode
2754 \brief Update WESMode
2755 This function is called through dynamic setConfig callback function
2756 to configure isWESModeEnabled
2757 \param hHal - HAL handle for device
2758 \param isWESModeEnabled - Enable/Disable WES Mode
2759 \- return Success or failure
2760 -------------------------------------------------------------------------*/
2761eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2762
2763/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002764 \fn sme_SetRoamScanControl
2765 \brief Set roam scan control
2766 This function is called to set roam scan control
2767 if roam scan control is set to 0, roaming scan cache is cleared
2768 any value other than 0 is treated as invalid value
2769 \param hHal - HAL handle for device
2770 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2771 Other status means SME failure to update
2772 -------------------------------------------------------------------------*/
2773eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002774#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002775
2776#ifdef FEATURE_WLAN_LFR
2777/*--------------------------------------------------------------------------
2778 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002779 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002780 isFastRoamIniFeatureEnabled.
2781 This is a synchronuous call
2782 \param hHal - The handle returned by macOpen.
2783 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2784 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2785 \sa
2786 --------------------------------------------------------------------------*/
2787
Srinivas Girigowdade697412013-02-14 16:31:48 -08002788eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002789 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002790
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002791/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302792 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2793 When Supplicant issue enabled / disable fwr based roaming on the basis
2794 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2795
2796 This is a synchronous call
2797 \param hHal - The handle returned by macOpen.
2798 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2799 Other status means SME is failed to (enabled/disabled) offload scan.
2800 \sa
2801 --------------------------------------------------------------------------*/
2802
2803eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2804 const v_BOOL_t isFastRoamEnabled);
2805
2806/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002807 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2808 Enable/disable LFR MAWC support at runtime
2809 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2810 isMAWCIniFeatureEnabled.
2811 This is a synchronous call
2812 \param hHal - The handle returned by macOpen.
2813 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2814 Other status means SME is failed to update MAWCEnabled.
2815 \sa
2816 --------------------------------------------------------------------------*/
2817eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2818 const v_BOOL_t MAWCEnabled);
2819
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002820
2821#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2822/*--------------------------------------------------------------------------
2823 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2824 This is a synchronuous call
2825 \param hHal - The handle returned by macOpen.
2826 \return eHAL_STATUS_SUCCESS
2827 Other status means SME is failed
2828 \sa
2829 --------------------------------------------------------------------------*/
2830
2831eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2832 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2833#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002834#endif /* FEATURE_WLAN_LFR */
2835
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002836#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002837/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002838 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002839 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002840 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002841 This is a synchronuous call
2842 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002843 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2844 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002845 \sa
2846 --------------------------------------------------------------------------*/
2847
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002848eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2849 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002850
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002851#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002852
2853/*--------------------------------------------------------------------------
2854 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2855 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2856 fEnableFwRssiMonitoring.
2857 This is a synchronuous call
2858 \param hHal - The handle returned by macOpen.
2859 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2860 Other status means SME is failed to update
2861 \sa
2862 --------------------------------------------------------------------------*/
2863
2864eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2865 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002866
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002867#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002868/*--------------------------------------------------------------------------
2869 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2870 This is a synchronuous call
2871 \param hHal - The handle returned by macOpen.
2872 \return eHAL_STATUS_SUCCESS - SME update config successful.
2873 Other status means SME is failed to update
2874 \sa
2875 --------------------------------------------------------------------------*/
2876eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2877 v_U8_t neighborLookupRssiThreshold);
2878
2879/*--------------------------------------------------------------------------
2880 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2881 This is a synchronuous call
2882 \param hHal - The handle returned by macOpen.
2883 \return eHAL_STATUS_SUCCESS - SME update config successful.
2884 Other status means SME is failed to update
2885 \sa
2886 --------------------------------------------------------------------------*/
2887eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2888 v_U8_t neighborReassocRssiThreshold);
2889
2890/*--------------------------------------------------------------------------
2891 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2892 This is a synchronuous call
2893 \param hHal - The handle returned by macOpen.
2894 \return eHAL_STATUS_SUCCESS - SME update config successful.
2895 Other status means SME is failed to update
2896 \sa
2897 --------------------------------------------------------------------------*/
2898v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2899
2900/*--------------------------------------------------------------------------
2901 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2902 This is a synchronuous call
2903 \param hHal - The handle returned by macOpen.
2904 \return eHAL_STATUS_SUCCESS - SME update config successful.
2905 Other status means SME is failed to update
2906 \sa
2907 --------------------------------------------------------------------------*/
2908eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2909 v_U16_t neighborScanResultsRefreshPeriod);
2910
2911/*--------------------------------------------------------------------------
2912 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2913 This is a synchronuous call
2914 \param hHal - The handle returned by macOpen.
2915 \return eHAL_STATUS_SUCCESS - SME update config successful.
2916 Other status means SME is failed to update
2917 \sa
2918 --------------------------------------------------------------------------*/
2919v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2920
2921/*--------------------------------------------------------------------------
2922 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2923 This is a synchronuous call
2924 \param hHal - The handle returned by macOpen.
2925 \return eHAL_STATUS_SUCCESS - SME update config successful.
2926 Other status means SME is failed to update
2927 \sa
2928 --------------------------------------------------------------------------*/
2929v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2930
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002931/* ---------------------------------------------------------------------------
2932 \fn sme_UpdateEmptyScanRefreshPeriod
2933 \brief Update nEmptyScanRefreshPeriod
2934 This function is called through dynamic setConfig callback function
2935 to configure nEmptyScanRefreshPeriod
2936 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2937 \param hHal - HAL handle for device
2938 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2939 \- return Success or failure
2940 -------------------------------------------------------------------------*/
2941eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2942
2943/* ---------------------------------------------------------------------------
2944 \fn sme_setNeighborScanMinChanTime
2945 \brief Update nNeighborScanMinChanTime
2946 This function is called through dynamic setConfig callback function
2947 to configure gNeighborScanChannelMinTime
2948 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2949 \param hHal - HAL handle for device
2950 \param nNeighborScanMinChanTime - Channel minimum dwell time
2951 \- return Success or failure
2952 -------------------------------------------------------------------------*/
2953eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2954
2955/* ---------------------------------------------------------------------------
2956 \fn sme_setNeighborScanMaxChanTime
2957 \brief Update nNeighborScanMaxChanTime
2958 This function is called through dynamic setConfig callback function
2959 to configure gNeighborScanChannelMaxTime
2960 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2961 \param hHal - HAL handle for device
2962 \param nNeighborScanMinChanTime - Channel maximum dwell time
2963 \- return Success or failure
2964 -------------------------------------------------------------------------*/
2965eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2966
2967/* ---------------------------------------------------------------------------
2968 \fn sme_getNeighborScanMinChanTime
2969 \brief get neighbor scan min channel time
2970 \param hHal - The handle returned by macOpen.
2971 \return v_U16_t - channel min time value
2972 -------------------------------------------------------------------------*/
2973v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2974
2975/* ---------------------------------------------------------------------------
2976 \fn sme_getNeighborScanMaxChanTime
2977 \brief get neighbor scan max channel time
2978 \param hHal - The handle returned by macOpen.
2979 \return v_U16_t - channel max time value
2980 -------------------------------------------------------------------------*/
2981v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
2982
2983/* ---------------------------------------------------------------------------
2984 \fn sme_setNeighborScanPeriod
2985 \brief Update nNeighborScanPeriod
2986 This function is called through dynamic setConfig callback function
2987 to configure nNeighborScanPeriod
2988 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
2989 \param hHal - HAL handle for device
2990 \param nNeighborScanPeriod - neighbor scan period
2991 \- return Success or failure
2992 -------------------------------------------------------------------------*/
2993eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
2994
2995/* ---------------------------------------------------------------------------
2996 \fn sme_getNeighborScanPeriod
2997 \brief get neighbor scan period
2998 \param hHal - The handle returned by macOpen.
2999 \return v_U16_t - neighbor scan period
3000 -------------------------------------------------------------------------*/
3001v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3002
3003#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003004
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003005#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003006/*--------------------------------------------------------------------------
3007 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3008 This is a synchronuous call
3009 \param hHal - The handle returned by macOpen.
3010 \return eHAL_STATUS_SUCCESS - SME update config successful.
3011 Other status means SME is failed to update
3012 \sa
3013 --------------------------------------------------------------------------*/
3014v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3015
3016/*--------------------------------------------------------------------------
3017 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3018 This is a synchronuous call
3019 \param hHal - The handle returned by macOpen.
3020 \return eHAL_STATUS_SUCCESS - SME update config successful.
3021 Other status means SME is failed to update
3022 \sa
3023 --------------------------------------------------------------------------*/
3024eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3025 tANI_U8 numChannels);
3026
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003027#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003028/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003029 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003030 This is a synchronuous call
3031 \param hHal - The handle returned by macOpen.
3032 \return eHAL_STATUS_SUCCESS - SME update config successful.
3033 Other status means SME is failed to update
3034 \sa
3035 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003036eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003037 tANI_U8 *pChannelList,
3038 tANI_U8 numChannels);
3039#endif
3040
Srinivas Girigowdade697412013-02-14 16:31:48 -08003041/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003042 \brief sme_getRoamScanChannelList() - get roam scan channel list
3043 This is a synchronuous call
3044 \param hHal - The handle returned by macOpen.
3045 \return eHAL_STATUS_SUCCESS - SME update config successful.
3046 Other status means SME is failed to update
3047 \sa
3048 --------------------------------------------------------------------------*/
3049eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3050 tANI_U8 *pNumChannels);
3051
3052/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003053 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003054 This is a synchronuous call
3055 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003056 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003057 FALSE (0) - if feature is disabled (compile or runtime)
3058 \sa
3059 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003060tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003061
3062/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003063 \brief sme_getWESMode() - getWES Mode
3064 This is a synchronous call
3065 \param hHal - The handle returned by macOpen.
3066 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3067 \sa
3068 --------------------------------------------------------------------------*/
3069v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3070
3071/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003072 \brief sme_GetRoamScanControl() - get scan control
3073 This is a synchronous call
3074 \param hHal - The handle returned by macOpen.
3075 \return v_BOOL_t - Enabled(1)/Disabled(0)
3076 \sa
3077 --------------------------------------------------------------------------*/
3078v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3079
3080/* ---------------------------------------------------------------------------
3081 \fn sme_UpdateEmptyScanRefreshPeriod
3082 \brief Update nnEmptyScanRefreshPeriod
3083 This function is called through dynamic setConfig callback function
3084 to configure nnEmptyScanRefreshPeriod
3085 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3086 \param hHal - HAL handle for device
3087 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3088 \- return Success or failure
3089 -------------------------------------------------------------------------*/
3090
3091/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003092 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3093 This is a synchronuous call
3094 \param hHal - The handle returned by macOpen.
3095 \return TRUE (1) - if the feature is enabled
3096 FALSE (0) - if feature is disabled (compile or runtime)
3097 \sa
3098 --------------------------------------------------------------------------*/
3099tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3100
3101/*--------------------------------------------------------------------------
3102 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3103 This is a synchronuous call
3104 \param hHal - The handle returned by macOpen.
3105 \return TRUE (1) - if the feature is enabled
3106 FALSE (0) - if feature is disabled (compile or runtime)
3107 \sa
3108 --------------------------------------------------------------------------*/
3109tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3110
Srinivas Girigowdade697412013-02-14 16:31:48 -08003111#endif
3112
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003113#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3114/*--------------------------------------------------------------------------
3115 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3116 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3117 gRoamScanOffloadEnabled.
3118 This is a synchronous call
3119 \param hHal - The handle returned by macOpen.
3120 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3121 Other status means SME is failed to update.
3122 \sa
3123 --------------------------------------------------------------------------*/
3124
3125eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3126#endif
3127
3128
Srinivas Girigowdade697412013-02-14 16:31:48 -08003129/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003130 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303131 \brief Check if a feature is enabled by FW
3132
3133 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003134 A value from enum placeHolderInCapBitmap
3135
3136 \- return 1/0 (TRUE/FALSE)
3137 -------------------------------------------------------------------------*/
3138tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303139
3140/* ---------------------------------------------------------------------------
3141 \fn sme_IsFeatureSupportedByDriver
3142 \brief Check if a feature is enabled by driver
3143
3144 \param featEnumValue - Enumeration value of the feature to be checked.
3145 A value from enum placeHolderInCapBitmap
3146
3147 \- return 1/0 (TRUE/FALSE)
3148 -------------------------------------------------------------------------*/
3149tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3150
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003151#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303152
3153/* ---------------------------------------------------------------------------
3154 \fn sme_SendTdlsLinkEstablishParams
3155 \brief API to send TDLS Link Establishment Parameters.
3156
3157 \param peerMac - peer's Mac Adress.
3158 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3159 \- return VOS_STATUS_SUCCES
3160 -------------------------------------------------------------------------*/
3161
3162VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
3163 tANI_U8 sessionId,
3164 tSirMacAddr peerMac,
3165 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
3166
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003167/* ---------------------------------------------------------------------------
3168 \fn sme_SendTdlsMgmtFrame
3169 \brief API to send TDLS management frames.
3170
3171 \param peerMac - peer's Mac Adress.
3172 \param frame_type - Type of TDLS mgmt frame to be sent.
3173 \param dialog - dialog token used in the frame.
3174 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303175 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003176 \param buf - additional IEs to be included
3177 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003178 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003179 \- return VOS_STATUS_SUCCES
3180 -------------------------------------------------------------------------*/
3181VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303182 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 -08003183/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003184 \fn sme_ChangeTdlsPeerSta
3185 \brief API to Update TDLS peer sta parameters.
3186
3187 \param peerMac - peer's Mac Adress.
3188 \param staParams - Peer Station Parameters.
3189 \- return VOS_STATUS_SUCCES
3190 -------------------------------------------------------------------------*/
3191VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
3192 tCsrStaParams *pstaParams);
3193/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003194 \fn sme_AddTdlsPeerSta
3195 \brief API to Add TDLS peer sta entry.
3196
3197 \param peerMac - peer's Mac Adress.
3198 \- return VOS_STATUS_SUCCES
3199 -------------------------------------------------------------------------*/
3200VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3201/* ---------------------------------------------------------------------------
3202 \fn sme_DeleteTdlsPeerSta
3203 \brief API to Delete TDLS peer sta entry.
3204
3205 \param peerMac - peer's Mac Adress.
3206 \- return VOS_STATUS_SUCCES
3207 -------------------------------------------------------------------------*/
3208VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003209/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003210 \fn sme_SetTdlsPowerSaveProhibited
3211 \API to set/reset the isTdlsPowerSaveProhibited.
3212
3213 \- return void
3214 -------------------------------------------------------------------------*/
3215void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003216#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303217/* ---------------------------------------------------------------------------
3218 \fn sme_IsPmcBmps
3219 \brief API to Check if PMC state is BMPS.
3220
3221 \- return v_BOOL_t
3222 -------------------------------------------------------------------------*/
3223v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3224
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003225#ifdef FEATURE_WLAN_TDLS_INTERNAL
3226typedef struct smeTdlsDisResult
3227{
3228 tSirMacAddr tdlsPeerMac;
3229 v_S7_t tdlsPeerRssi;
3230} tSmeTdlsDisResult;
3231
3232VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3233v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
3234 tSmeTdlsDisResult *disResult, v_U8_t listType);
3235VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3236VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003237#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003238eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003239
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003240/*
3241 * SME API to enable/disable WLAN driver initiated SSR
3242 */
3243void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3244
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303245/* ---------------------------------------------------------------------------
3246
3247 \fn sme_SetPhyMode
3248
3249 \brief Changes the PhyMode.
3250
3251 \param hHal - The handle returned by macOpen.
3252
3253 \param phyMode new phyMode which is to set
3254
3255 \return eHalStatus SUCCESS.
3256
3257 -------------------------------------------------------------------------------*/
3258eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3259
3260/* ---------------------------------------------------------------------------
3261
3262 \fn sme_GetPhyMode
3263
3264 \brief gets current PhyMode.
3265
3266 \param hHal - The handle returned by macOpen.
3267
3268 \return eHalStatus PhyMode
3269
3270 -------------------------------------------------------------------------------*/
3271eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3272
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003273/*
3274 * SME API to determine the channel bonding mode
3275 */
3276VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3277
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003278#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3279/*--------------------------------------------------------------------------
3280 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3281 from CSR.
3282 This is a synchronous call
3283 \param hHal - The handle returned by macOpen
3284 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3285 BSSID, channel etc.)
3286 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3287 Other status means SME is failed to send the request.
3288 \sa
3289 --------------------------------------------------------------------------*/
3290
3291eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3292#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003293/*--------------------------------------------------------------------------
3294 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3295 is any connected session .
3296 This is a synchronous call
3297 \param hHal - The handle returned by macOpen
3298 \return VOS_STATUS - SME passed the request to CSR successfully.
3299 Other status means SME is failed to send the request.
3300 \sa
3301 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003302VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003303
3304#ifdef FEATURE_WLAN_LPHB
3305/* ---------------------------------------------------------------------------
3306 \fn sme_LPHBConfigReq
3307 \API to make configuration LPHB within FW.
3308 \param hHal - The handle returned by macOpen
3309 \param lphdReq - LPHB request argument by client
3310 \param pCallbackfn - LPHB timeout notification callback function pointer
3311 \- return Configuration message posting status, SUCCESS or Fail
3312 -------------------------------------------------------------------------*/
3313eHalStatus sme_LPHBConfigReq(
3314 tHalHandle hHal,
3315 tSirLPHBReq *lphdReq,
3316 void (*pCallbackfn)(void *pAdapter, void *indParam));
3317#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003318
3319/* ---------------------------------------------------------------------------
3320 \fn sme_AddPeriodicTxPtrn
3321 \brief API to Periodic TX Pattern Offload feature
3322 \param hHal - The handle returned by macOpen
3323 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3324 \return eHalStatus
3325 ---------------------------------------------------------------------------*/
3326eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3327 *addPeriodicTxPtrnParams);
3328
3329/* ---------------------------------------------------------------------------
3330 \fn sme_DelPeriodicTxPtrn
3331 \brief API to Periodic TX Pattern Offload feature
3332 \param hHal - The handle returned by macOpen
3333 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3334 \return eHalStatus
3335 ---------------------------------------------------------------------------*/
3336eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3337 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003338/*--------------------------------------------------------------------------
3339 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3340 scan parameter.
3341 This is a synchronous call
3342 \param hHal - The handle returned by macOpen
3343 \return None.
3344 \sa
3345 --------------------------------------------------------------------------*/
3346void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3347 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303348
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003349/* ---------------------------------------------------------------------------
3350 \fn sme_SendRateUpdateInd
3351 \brief API to Update rate
3352 \param hHal - The handle returned by macOpen
3353 \param rateUpdateParams - Pointer to rate update params
3354 \return eHalStatus
3355 ---------------------------------------------------------------------------*/
3356eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3357
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303358/*
3359 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3360 * triggers
3361 * return status
3362*/
3363eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3364 tANI_U8 *bssid,
3365 tSmeFastRoamTrigger fastRoamTrig);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303366
3367eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
3368 tANI_U8 *pBSSId,
3369 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003370
3371void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303372
3373#ifdef FEATURE_WLAN_BATCH_SCAN
3374/* ---------------------------------------------------------------------------
3375 \fn sme_SetBatchScanReq
3376 \brief API to set batch scan request in FW
3377 \param hHal - The handle returned by macOpen.
3378 \param pRequest - Pointer to the batch request.
3379 \param sessionId - session ID
3380 \param callbackRoutine - HDD callback which needs to be invoked after
3381 getting set batch scan response from FW
3382 \param callbackContext - pAdapter context
3383 \return eHalStatus
3384 ---------------------------------------------------------------------------*/
3385eHalStatus
3386sme_SetBatchScanReq
3387(
3388 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3389 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3390 void *callbackContext
3391);
3392
3393/* ---------------------------------------------------------------------------
3394 \fn sme_TriggerBatchScanResultInd
3395 \brief API to trigger batch scan result indications from from FW
3396 \param hHal - The handle returned by macOpen.
3397 \param pRequest - Pointer to get batch request.
3398 \param sessionId - session ID
3399 \param callbackRoutine - HDD callback which needs to be invoked after
3400 getting get batch scan response from FW
3401 \param callbackContext - pAdapter context
3402 \return eHalStatus
3403 ---------------------------------------------------------------------------*/
3404eHalStatus
3405sme_TriggerBatchScanResultInd
3406(
3407 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3408 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3409 void *callbackContext
3410);
3411
3412/* ---------------------------------------------------------------------------
3413 \fn sme_StopBatchScanInd
3414 \brief API to stop batch scan request in FW
3415 \param hHal - The handle returned by macOpen.
3416 \param pRequest - Pointer to stop batch indication
3417 \return eHalStatus
3418 ---------------------------------------------------------------------------*/
3419eHalStatus
3420sme_StopBatchScanInd
3421(
3422 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3423);
3424
3425#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003426
3427#ifdef FEATURE_WLAN_CH_AVOID
3428/* ---------------------------------------------------------------------------
3429 \fn sme_AddChAvoidCallback
3430 \brief Used to plug in callback function
3431 Which notify channel may not be used with SAP or P2PGO mode.
3432 Notification come from FW.
3433 \param hHal
3434 \param pCallbackfn : callback function pointer should be plugged in
3435 \- return eHalStatus
3436 -------------------------------------------------------------------------*/
3437eHalStatus sme_AddChAvoidCallback
3438(
3439 tHalHandle hHal,
3440 void (*pCallbackfn)(void *pAdapter, void *indParam)
3441);
3442#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003443eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303444/* ---------------------------------------------------------------------------
3445 \fn sme_requestTypetoString
3446 \brief API to convert requestType enum values
3447 to string.
3448 ---------------------------------------------------------------------------*/
3449const char * sme_requestTypetoString(const v_U8_t requestType);
3450/* ---------------------------------------------------------------------------
3451 \fn sme_PmcStatetoString
3452 \brief API to convert PmcState enum values
3453 to string.
3454 ---------------------------------------------------------------------------*/
3455const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303456
3457eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3458
Agarwal Ashish5e414792014-06-08 15:25:23 +05303459tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303460
3461// tdlsoffchan
3462VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3463 tANI_U8 sessionId,
3464 tSirMacAddr peerMac,
3465 tANI_S32 tdlsOffCh,
3466 tANI_S32 tdlsOffChBwOffset,
3467 tANI_U8 tdlsSwMode);
3468
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303469void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303470
3471void sme_resetCoexEevent(tHalHandle hHal);
3472
Peng Xu117eab42014-09-25 13:33:27 +05303473tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3474tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303475#ifdef WLAN_FEATURE_AP_HT40_24G
3476void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3477 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303478eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3479 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303480#endif
Peng Xu117eab42014-09-25 13:33:27 +05303481
Agarwal Ashish738843c2014-09-25 12:27:56 +05303482void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3483
Jeff Johnson295189b2012-06-20 16:38:30 -07003484#endif //#if !defined( __SME_API_H )