blob: ec4f57dc4881d876e2d2bf7c38e6809133641017 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Siddharth Bhald8a95e82015-02-12 20:14:52 +05302 * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
Kiet Lam0fb93dd2014-02-19 00:32:59 -08003 *
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
Jeff Johnson295189b2012-06-20 16:38:30 -070041
42 ========================================================================*/
43
44/* $Header$ */
45
46/*--------------------------------------------------------------------------
47 Include Files
48 ------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +053049#include <linux/version.h>
Jeff Johnson295189b2012-06-20 16:38:30 -070050#include "ccmApi.h"
51#include "csrApi.h"
52#include "pmcApi.h"
53#include "vos_mq.h"
54#include "vos_lock.h"
55#include "halTypes.h"
56#include "sirApi.h"
57#include "btcApi.h"
58#include "vos_nvitem.h"
59#include "p2p_Api.h"
Sushant Kaushik83392fa2015-05-05 17:44:40 +053060#include "smeInternal.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070061
Jeff Johnsone7245742012-09-05 17:12:55 -070062#ifdef FEATURE_OEM_DATA_SUPPORT
63#include "oemDataApi.h"
64#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070065
66#if defined WLAN_FEATURE_VOWIFI
67#include "smeRrmInternal.h"
68#endif
Srinivas Dasari030bad32015-02-18 23:23:54 +053069#include "nan_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070070
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;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +0530118 tANI_U8 fBtcEnableIndTimerVal;
Jeff Johnson295189b2012-06-20 16:38:30 -0700119} tSmeConfigParams, *tpSmeConfigParams;
120
Sunil Duttc69bccb2014-05-26 21:30:20 +0530121#ifdef WLAN_FEATURE_LINK_LAYER_STATS
122
123/* ---------------------------------------------------------------------------
124 \fn sme_LLStatsSetReq
125 \brief API to set link layer stats request to FW
126 \param hHal - The handle returned by macOpen.
127
128 \Param pStatsReq - a pointer to a caller allocated object of
129 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
130 stats set.
131
132 \return eHalStatus
133 ---------------------------------------------------------------------------*/
134eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
135
136/* ---------------------------------------------------------------------------
137 \fn sme_LLStatsGetReq
138 \brief API to get link layer stats request to FW
139 \param hHal - The handle returned by macOpen.
140
141 \Param pStatsReq - a pointer to a caller allocated object of
142 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
143 stats get.
144
145 \return eHalStatus
146 ---------------------------------------------------------------------------*/
147eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
148
149/* ---------------------------------------------------------------------------
150 \fn sme_LLStatsClearReq
151 \brief API to clear link layer stats request to FW
152 \param hHal - The handle returned by macOpen.
153
154 \Param pStatsReq - a pointer to a caller allocated object of
155 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
156 stats clear.
157
158 \return eHalStatus
159 ---------------------------------------------------------------------------*/
160eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
161
162/* ---------------------------------------------------------------------------
163 \fn sme_SetLinkLayerStatsIndCB
164 \brief API to trigger Link Layer stats result indications from from FW
165 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530166 \param callbackRoutine - HDD callback which needs to be invoked after
167 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530168 \return eHalStatus
169 ---------------------------------------------------------------------------*/
170eHalStatus
171sme_SetLinkLayerStatsIndCB
172(
Dino Mycled3d50022014-07-07 12:58:25 +0530173 tHalHandle hHal,
174 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
175 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530176);
177
178
179#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
180
Dino Mycle2c198072014-06-10 10:15:52 +0530181#ifdef WLAN_FEATURE_EXTSCAN
182/* ---------------------------------------------------------------------------
183 \fn sme_GetValidChannelsByBand
184 \brief SME API to fetch all valid channel filtered by band
185 \param hHal
186 \param wifiBand: RF band information
187 \param aValidChannels: Array to store channel info
188 \param len: number of channels
189 \- return eHalStatus
190 -------------------------------------------------------------------------*/
191eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
192 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
193
194/* ---------------------------------------------------------------------------
195 \fn sme_EXTScanGetCapabilities
196 \brief SME API to fetch Extented Scan capabilities
197 \param hHal
198 \param pReq: Extented Scan capabilities structure
199 \- return eHalStatus
200 -------------------------------------------------------------------------*/
201eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
202 tSirGetEXTScanCapabilitiesReqParams *pReq);
203
204/* ---------------------------------------------------------------------------
205 \fn sme_EXTScanStart
206 \brief SME API to issue Extented Scan start
207 \param hHal
208 \param pStartCmd: Extented Scan start structure
209 \- return eHalStatus
210 -------------------------------------------------------------------------*/
211eHalStatus sme_EXTScanStart (tHalHandle hHal,
212 tSirEXTScanStartReqParams *pStartCmd);
213
214/* ---------------------------------------------------------------------------
215 \fn sme_EXTScanStop
216 \brief SME API to issue Extented Scan stop
217 \param hHal
218 \param pStopReq: Extented Scan stop structure
219 \- return eHalStatus
220 -------------------------------------------------------------------------*/
221eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
222
223/* ---------------------------------------------------------------------------
224 \fn sme_SetBssHotlist
225 \brief SME API to set BSSID hotlist
226 \param hHal
227 \param pSetHotListReq: Extented Scan set hotlist structure
228 \- return eHalStatus
229 -------------------------------------------------------------------------*/
230eHalStatus sme_SetBssHotlist (tHalHandle hHal,
231 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
232
233/* ---------------------------------------------------------------------------
234 \fn sme_ResetBssHotlist
235 \brief SME API to reset BSSID hotlist
236 \param hHal
237 \param pSetHotListReq: Extented Scan set hotlist structure
238 \- return eHalStatus
239 -------------------------------------------------------------------------*/
240eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
241 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
242
243/* ---------------------------------------------------------------------------
Dino Mycle2c198072014-06-10 10:15:52 +0530244 \fn sme_getCachedResults
245 \brief SME API to get cached results
246 \param hHal
247 \param pCachedResultsReq: Extented Scan get cached results structure
248 \- return eHalStatus
249 -------------------------------------------------------------------------*/
250eHalStatus sme_getCachedResults (tHalHandle hHal,
251 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
252
253/* ---------------------------------------------------------------------------
254 \fn sme_EXTScanRegisterCallback
255 \brief SME API to register Extented Scan notification callback
256 \param pEXTScanIndCb
257 \- return void
258 -------------------------------------------------------------------------*/
259eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
260 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
261 void *);
262
263#endif /* WLAN_FEATURE_EXTSCAN */
Siddharth Bhald8a95e82015-02-12 20:14:52 +0530264/* ---------------------------------------------------------------------------
265 \fn sme_SpoofMacAddrReq
266 \brief SME API to send Spoof Mac Addr req to HAL
267 \param macaddr: mac address to be sent
268 \- return eHalStatus
269 -------------------------------------------------------------------------*/
270eHalStatus sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530271
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530272typedef enum
273{
274 eSME_ROAM_TRIGGER_NONE = 0,
275 eSME_ROAM_TRIGGER_SCAN = 1,
276 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
277 eSME_ROAM_TRIGGER_MAX
278} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700279
280/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530281 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700282 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700283/*--------------------------------------------------------------------------
284
285 \brief sme_Open() - Initialze all SME modules and put them at idle state
286
287 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
288 successfully return, all modules are at idle state ready to start.
289
290 smeOpen must be called before any other SME APIs can be involved.
291 smeOpen must be called after macOpen.
292
293 \param hHal - The handle returned by macOpen.
294
295 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
296
297 Other status means SME is failed to be initialized
298 \sa
299
300 --------------------------------------------------------------------------*/
301eHalStatus sme_Open(tHalHandle hHal);
302
303/*--------------------------------------------------------------------------
304
305 \brief sme_Close() - Release all SME modules and their resources.
306
307 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
308 return, all modules are at closed state.
309
310 No SME APIs can be involved after sme_Close except sme_Open.
311 sme_Close must be called before macClose.
312
313 \param hHal - The handle returned by macOpen.
314
315 \return eHAL_STATUS_SUCCESS - SME is successfully close.
316
317 Other status means SME is failed to be closed but caller still cannot
318 call any other SME functions except smeOpen.
319 \sa
320
321 --------------------------------------------------------------------------*/
322eHalStatus sme_Close(tHalHandle hHal);
323
324/*--------------------------------------------------------------------------
Hema Aparna Medicharlaa6cf65e2015-06-01 16:23:28 +0530325
326 \brief sme_PreClose() - Stop SME resources prior to final sme_Stop.
327
328 The function stops resources in SME, PMC, CCM, CSR, etc. as needed
329 to handle fast closure during SSR/unload-load cases.
330
331 \param hHal - The handle returned by macOpen.
332 \return v_VOID_t
333
334 \sa
335
336 --------------------------------------------------------------------------*/
337v_VOID_t sme_PreClose(tHalHandle hHal);
338
339/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700340
341 \brief sme_Start() - Put all SME modules at ready state.
342
343 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
344 successfully return, all modules are ready to run.
345
346 \param hHal - The handle returned by macOpen.
347
348 \return eHAL_STATUS_SUCCESS - SME is ready.
349
350 Other status means SME is failed to start.
351 \sa
352
353 --------------------------------------------------------------------------*/
354eHalStatus sme_Start(tHalHandle hHal);
355
356/*--------------------------------------------------------------------------
357
358 \brief sme_Stop() - Stop all SME modules and put them at idle state
359
360 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
361 return, all modules are at idle state ready to start.
362
363
364 \param hHal - The handle returned by macOpen.
365
Kiet Lama72a2322013-11-15 11:18:11 +0530366 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700367
368 \return eHAL_STATUS_SUCCESS - SME is stopped.
369
370 Other status means SME is failed to stop but caller should still consider
371 SME is stopped.
372 \sa
373
374 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530375eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700376
377
378/*--------------------------------------------------------------------------
379
380 \brief sme_OpenSession() - Open a session for scan/roam operation.
381
382 This is a synchronous API.
383
384
385 \param hHal - The handle returned by macOpen.
386 \param callback - A pointer to the function caller specifies for roam/connect status indication
387 \param pContext - The context passed with callback
388 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
389 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
390
391 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
392
393 Other status means SME is failed to open the session.
394 eHAL_STATUS_RESOURCES - no more session available.
395 \sa
396
397 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700398eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
399 void *pContext, tANI_U8 *pSelfMacAddr,
400 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700401
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700402/*--------------------------------------------------------------------------
403
404 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
405 \param hHal - The handle returned by macOpen.
406 \param currDeviceMode - Current operating device mode.
407 --------------------------------------------------------------------------*/
408
409void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700410
411/*--------------------------------------------------------------------------
412
413 \brief sme_CloseSession() - Open a session for scan/roam operation.
414
415 This is a synchronous API.
416
Jeff Johnson295189b2012-06-20 16:38:30 -0700417 \param hHal - The handle returned by macOpen.
418
419 \param sessionId - A previous opened session's ID.
mukul sharmabab477d2015-06-11 17:14:55 +0530420
421 \param bPurgeSmeCmdList - Whether sme cmd list purging is required or not.
422 TRUE -Purging require FALSE - Purging not require
423
Jeff Johnson295189b2012-06-20 16:38:30 -0700424 \return eHAL_STATUS_SUCCESS - session is closed.
425
426 Other status means SME is failed to open the session.
427 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
428 \sa
mukul sharmabab477d2015-06-11 17:14:55 +0530429
430
Jeff Johnson295189b2012-06-20 16:38:30 -0700431 --------------------------------------------------------------------------*/
432eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
mukul sharmabab477d2015-06-11 17:14:55 +0530433 tANI_U8 bPurgeSmeCmdList,
434 csrRoamSessionCloseCallback callback,
435 void *pContext);
436/*--------------------------------------------------------------------------
437
438 \brief sme_PurgeCmdList() - Purge all the sme cmd list
439
440 This is a synchronous API.
Jeff Johnson295189b2012-06-20 16:38:30 -0700441
442
mukul sharmabab477d2015-06-11 17:14:55 +0530443 \param hHal - The handle returned by macOpen.
444
445 \param sessionId - A previous opened session's ID.
446
447--------------------------------------------------------------------------*/
448
449eHalStatus sme_PurgeCmdList(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700450
451/*--------------------------------------------------------------------------
452
453 \brief sme_UpdateConfig() - Change configurations for all SME moduels
454
455 The function updates some configuration for modules in SME, CCM, CSR, etc
456 during SMEs close -> open sequence.
457
458 Modules inside SME apply the new configuration at the next transaction.
459
460
461 \param hHal - The handle returned by macOpen.
462 \Param pSmeConfigParams - a pointer to a caller allocated object of
463 typedef struct _smeConfigParams.
464
465 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
466
467 Other status means SME is failed to update the config parameters.
468 \sa
469
470 --------------------------------------------------------------------------*/
471eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
472
473#ifdef FEATURE_WLAN_SCAN_PNO
474/*--------------------------------------------------------------------------
475
476 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
477
478 It is used at driver start up to inform RIVA of the default channel
479 configuration.
480
481 This is a synchronuous call
482
483 \param hHal - The handle returned by macOpen.
484
485 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
486
487 Other status means SME is failed to update the channel config.
488 \sa
489
490 --------------------------------------------------------------------------*/
491eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
492
493#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700494/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530495
496 \brief sme_UpdateChannelList() - Update channel List in FW.
497
498
499 \param hHal - The handle returned by macOpen.
500
501 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
502
503 Other status means SME is failed to update the channel config.
504 \sa
505
506 --------------------------------------------------------------------------*/
507eHalStatus sme_UpdateChannelList(tHalHandle hHal);
508
509/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700510
511 \brief sme_set11dinfo() - Set the 11d information about valid channels
512 and there power using information from nvRAM
513 This function is called only for AP.
514
515 This is a synchronuous call
516
517 \param hHal - The handle returned by macOpen.
518 \Param pSmeConfigParams - a pointer to a caller allocated object of
519 typedef struct _smeConfigParams.
520
521 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
522
523 Other status means SME is failed to update the config parameters.
524 \sa
525--------------------------------------------------------------------------*/
526
527eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
528
529/*--------------------------------------------------------------------------
530
531 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
532
533 This is a synchronuous call
534
535 \param hHal - The handle returned by HostapdAdapter.
536 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
537
538 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
539
540 Other status means, failed to get the current regulatory domain.
541 \sa
542--------------------------------------------------------------------------*/
543
544eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
545
546eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
547
Jeff Johnson295189b2012-06-20 16:38:30 -0700548
549/* ---------------------------------------------------------------------------
550 \fn sme_ChangeConfigParams
551 \brief The SME API exposed for HDD to provide config params to SME during
552 SMEs stop -> start sequence.
553
554 If HDD changed the domain that will cause a reset. This function will
555 provide the new set of 11d information for the new domain. Currrently this
556 API provides info regarding 11d only at reset but we can extend this for
557 other params (PMC, QoS) which needs to be initialized again at reset.
558
559 This is a synchronuous call
560
561 \param hHal - The handle returned by macOpen.
562
563 \Param
564 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
565 currently provides 11d related information like Country code,
566 Regulatory domain, valid channel list, Tx power per channel, a
567 list with active/passive scan allowed per valid channel.
568
569 \return eHalStatus
570 ---------------------------------------------------------------------------*/
571eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
572 tCsrUpdateConfigParam *pUpdateConfigParam);
573
574/*--------------------------------------------------------------------------
575
576 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
577 is ready tio run.
578
579 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
580 to running state.
581
582
583 \param hHal - The handle returned by macOpen.
584
585 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
586
587 Other status means SME failed to send the message to PE.
588 \sa
589
590 --------------------------------------------------------------------------*/
591eHalStatus sme_HDDReadyInd(tHalHandle hHal);
592
593
594/*--------------------------------------------------------------------------
595
596 \brief sme_ProcessMsg() - The main message processor for SME.
597
598 The function is called by a message dispatcher when to process a message
599 targeted for SME.
600
601
602 \param hHal - The handle returned by macOpen.
603 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
604
605 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
606
607 Other status means SME failed to process the message.
608 \sa
609
610 --------------------------------------------------------------------------*/
611eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
612
613v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
614
615/* ---------------------------------------------------------------------------
616 \fn sme_ScanRequest
617 \brief a wrapper function to Request a 11d or full scan from CSR.
618 \param pScanRequestID - pointer to an object to get back the request ID
619 \param callback - a callback function that scan calls upon finish, will not
620 be called if csrScanRequest returns error
621 \param pContext - a pointer passed in for the callback
622 \return eHalStatus
623 ---------------------------------------------------------------------------*/
624eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
625 tANI_U32 *pScanRequestID,
626 csrScanCompleteCallback callback, void *pContext);
627
628
629/* ---------------------------------------------------------------------------
630 \fn sme_ScanSetBGScanparams
631 \brief a wrapper function to request CSR to set BG scan params in PE
632 \param pScanReq - BG scan request structure
633 \return eHalStatus
634 ---------------------------------------------------------------------------*/
635eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
636
637
638/* ---------------------------------------------------------------------------
639 \fn sme_ScanGetResult
640 \brief a wrapper function to request scan results from CSR.
641 \param pFilter - If pFilter is NULL, all cached results are returned
642 \param phResult - an object for the result.
643 \return eHalStatus
644 ---------------------------------------------------------------------------*/
645eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
646 tScanResultHandle *phResult);
647
648
649/* ---------------------------------------------------------------------------
650 \fn sme_ScanFlushResult
651 \brief a wrapper function to request CSR to clear scan results.
652 \return eHalStatus
653 ---------------------------------------------------------------------------*/
654eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530655
656/*
657 * ---------------------------------------------------------------------------
658 * \fn sme_FilterScanResults
659 * \brief a wrapper function to request CSR to filter the scan results based
660 * on valid chennel list.
661 * \return eHalStatus
662 *---------------------------------------------------------------------------
663 */
664eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
665
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530666/*
667 * ---------------------------------------------------------------------------
668 * \fn sme_FilterScanDFSResults
669 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
670 * from the scan results.
671 * \return eHalStatus
672 *---------------------------------------------------------------------------
673 */
674eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
675
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700676eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700677
678/* ---------------------------------------------------------------------------
679 \fn sme_ScanResultGetFirst
680 \brief a wrapper function to request CSR to returns the first element of
681 scan result.
682 \param hScanResult - returned from csrScanGetResult
683 \return tCsrScanResultInfo * - NULL if no result
684 ---------------------------------------------------------------------------*/
685tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
686 tScanResultHandle hScanResult);
687
688/* ---------------------------------------------------------------------------
689 \fn sme_ScanResultGetNext
690 \brief a wrapper function to request CSR to returns the next element of
691 scan result. It can be called without calling csrScanResultGetFirst
692 first
693 \param hScanResult - returned from csrScanGetResult
694 \return Null if no result or reach the end
695 ---------------------------------------------------------------------------*/
696tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
697 tScanResultHandle hScanResult);
698
699/* ---------------------------------------------------------------------------
700 \fn sme_ScanResultPurge
701 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
702 in the list and free memory for each item
703 \param hScanResult - returned from csrScanGetResult. hScanResult is
704 considered gone by
705 calling this function and even before this function reutrns.
706 \return eHalStatus
707 ---------------------------------------------------------------------------*/
708eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
709
710/* ---------------------------------------------------------------------------
711 \fn sme_ScanGetPMKIDCandidateList
712 \brief a wrapper function to return the PMKID candidate list
713 \param pPmkidList - caller allocated buffer point to an array of
714 tPmkidCandidateInfo
715 \param pNumItems - pointer to a variable that has the number of
716 tPmkidCandidateInfo allocated when retruning, this is
717 either the number needed or number of items put into
718 pPmkidList
719 \return eHalStatus - when fail, it usually means the buffer allocated is not
720 big enough and pNumItems
721 has the number of tPmkidCandidateInfo.
722 \Note: pNumItems is a number of tPmkidCandidateInfo,
723 not sizeof(tPmkidCandidateInfo) * something
724 ---------------------------------------------------------------------------*/
725eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
726 tPmkidCandidateInfo *pPmkidList,
727 tANI_U32 *pNumItems );
728
729
730/*----------------------------------------------------------------------------
731 \fn sme_RoamRegisterLinkQualityIndCallback
732
733 \brief
734 a wrapper function to allow HDD to register a callback handler with CSR for
735 link quality indications.
736
737 Only one callback may be registered at any time.
738 In order to deregister the callback, a NULL cback may be provided.
739
740 Registration happens in the task context of the caller.
741
742 \param callback - Call back being registered
743 \param pContext - user data
744
745 DEPENDENCIES: After CSR open
746
747 \return eHalStatus
748-----------------------------------------------------------------------------*/
749eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
750 csrRoamLinkQualityIndCallback callback,
751 void *pContext);
752
753
754/* ---------------------------------------------------------------------------
755 \fn sme_RoamConnect
756 \brief a wrapper function to request CSR to inititiate an association
757 \param sessionId - the sessionId returned by sme_OpenSession.
758 \param pProfile - can be NULL to join to any open ones
759 \param pRoamId - to get back the request ID
760 \return eHalStatus
761 ---------------------------------------------------------------------------*/
762eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
763 tANI_U32 *pRoamId);
764
765/* ---------------------------------------------------------------------------
766 \fn sme_RoamReassoc
767 \brief a wrapper function to request CSR to inititiate a re-association
768 \param pProfile - can be NULL to join the currently connected AP. In that
769 case modProfileFields should carry the modified field(s) which could trigger
770 reassoc
771 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
772 that might need modification dynamically once STA is up & running and this
773 could trigger a reassoc
774 \param pRoamId - to get back the request ID
775 \return eHalStatus
776 -------------------------------------------------------------------------------*/
777eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
778 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700779 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700780
781/* ---------------------------------------------------------------------------
782 \fn sme_RoamConnectToLastProfile
783 \brief a wrapper function to request CSR to disconnect and reconnect with
784 the same profile
785 \return eHalStatus. It returns fail if currently connected
786 ---------------------------------------------------------------------------*/
787eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
788
789/* ---------------------------------------------------------------------------
790 \fn sme_RoamDisconnect
791 \brief a wrapper function to request CSR to disconnect from a network
792 \param reason -- To indicate the reason for disconnecting. Currently, only
793 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
794 \return eHalStatus
795 ---------------------------------------------------------------------------*/
796eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
797
Jeff Johnson295189b2012-06-20 16:38:30 -0700798/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530799 \fn.sme_abortConnection
800 \brief a wrapper function to request CSR to stop from connecting a network
801 \retun void.
802---------------------------------------------------------------------------*/
803
804void sme_abortConnection(tHalHandle hHal, tANI_U8 sessionId);
805
806/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700807 \fn sme_RoamStopBss
808 \brief a wrapper function to request CSR to stop bss
809 \param sessionId - sessionId of SoftAP
810 \return eHalStatus
811 ---------------------------------------------------------------------------*/
812eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
813
814/* ---------------------------------------------------------------------------
815 \fn sme_RoamGetAssociatedStas
816 \brief To probe the list of associated stations from various modules of CORE stack.
817 \This is an asynchronous API.
818 \param sessionId - sessionId of SoftAP
819 \param modId - Module from whom list of associtated stations is to be probed.
820 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
821 \param pUsrContext - Opaque HDD context
822 \param pfnSapEventCallback - Sap event callback in HDD
823 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
824 \return eHalStatus
825 -------------------------------------------------------------------------------*/
826eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
827 VOS_MODULE_ID modId, void *pUsrContext,
828 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
829
830/* ---------------------------------------------------------------------------
831 \fn sme_RoamDisconnectSta
832 \brief To disassociate a station. This is an asynchronous API.
833 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
834 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
835 -------------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +0530836eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId,
837#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
838 const tANI_U8 *pPeerMacAddr
839#else
840 tANI_U8 *pPeerMacAddr
841#endif
842 );
Jeff Johnson295189b2012-06-20 16:38:30 -0700843
844/* ---------------------------------------------------------------------------
845 \fn sme_RoamDeauthSta
846 \brief To disassociate a station. This is an asynchronous API.
847 \param hHal - Global structure
848 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530849 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700850 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
851 -------------------------------------------------------------------------------*/
852eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530853 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700854
855/* ---------------------------------------------------------------------------
856 \fn sme_RoamTKIPCounterMeasures
857 \brief To start or stop TKIP counter measures. This is an asynchronous API.
858 \param sessionId - sessionId of SoftAP
859 \param bEnable - Flag to start/stop TKIP countermeasures
860 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
861 -------------------------------------------------------------------------------*/
862eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
863
864/* ---------------------------------------------------------------------------
865 \fn sme_RoamGetWpsSessionOverlap
866 \brief To get the WPS PBC session overlap information.
867 \This is an asynchronous API.
868 \param sessionId - sessionId of SoftAP
869 \param pUsrContext - Opaque HDD context
870 \param pfnSapEventCallback - Sap event callback in HDD
871 \return eHalStatus
872 -------------------------------------------------------------------------------*/
873eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
874 void *pUsrContext, void *pfnSapEventCallback,
875 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700876
877/* ---------------------------------------------------------------------------
878 \fn sme_RoamGetConnectState
879 \brief a wrapper function to request CSR to return the current connect state
880 of Roaming
881 \return eHalStatus
882 ---------------------------------------------------------------------------*/
883eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
884
885/* ---------------------------------------------------------------------------
886 \fn sme_RoamGetConnectProfile
887 \brief a wrapper function to request CSR to return the current connect
888 profile. Caller must call csrRoamFreeConnectProfile after it is done
889 and before reuse for another csrRoamGetConnectProfile call.
890 \param pProfile - pointer to a caller allocated structure
891 tCsrRoamConnectedProfile
892 \return eHalStatus. Failure if not connected
893 ---------------------------------------------------------------------------*/
894eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
895 tCsrRoamConnectedProfile *pProfile);
896
897/* ---------------------------------------------------------------------------
898 \fn sme_RoamFreeConnectProfile
899 \brief a wrapper function to request CSR to free and reinitialize the
900 profile returned previously by csrRoamGetConnectProfile.
901 \param pProfile - pointer to a caller allocated structure
902 tCsrRoamConnectedProfile
903 \return eHalStatus.
904 ---------------------------------------------------------------------------*/
905eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
906 tCsrRoamConnectedProfile *pProfile);
907
908/* ---------------------------------------------------------------------------
909 \fn sme_RoamSetPMKIDCache
910 \brief a wrapper function to request CSR to return the PMKID candidate list
911 \param pPMKIDCache - caller allocated buffer point to an array of
912 tPmkidCacheInfo
913 \param numItems - a variable that has the number of tPmkidCacheInfo
914 allocated when retruning, this is either the number needed
915 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530916 \param update_entire_cache - if TRUE, then it overwrites the entire cache
917 with pPMKIDCache, else it updates entry by
918 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700919 \return eHalStatus - when fail, it usually means the buffer allocated is not
920 big enough and pNumItems has the number of
921 tPmkidCacheInfo.
922 \Note: pNumItems is a number of tPmkidCacheInfo,
923 not sizeof(tPmkidCacheInfo) * something
924 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530925eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
926 tPmkidCacheInfo *pPMKIDCache,
927 tANI_U32 numItems,
928 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700929
930/* ---------------------------------------------------------------------------
931 \fn sme_RoamGetSecurityReqIE
932 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
933 passes to PE to JOIN request or START_BSS request
934 This is a synchronuous call.
935 \param sessionId - returned by sme_OpenSession.
936 \param pLen - caller allocated memory that has the length of pBuf as input.
937 Upon returned, *pLen has the needed or IE length in pBuf.
938 \param pBuf - Caller allocated memory that contain the IE field, if any,
939 upon return
940 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
941 \return eHalStatus - when fail, it usually means the buffer allocated is not
942 big enough
943 ---------------------------------------------------------------------------*/
944eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
945 tANI_U8 *pBuf, eCsrSecurityType secType);
946
947/* ---------------------------------------------------------------------------
948 \fn sme_RoamGetSecurityRspIE
949 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
950 the beacon or probe rsp if connected
951 \param sessionId - returned by sme_OpenSession.
952 \param pLen - caller allocated memory that has the length of pBuf as input.
953 Upon returned, *pLen has the needed or IE length in pBuf.
954 \param pBuf - Caller allocated memory that contain the IE field, if any,
955 upon return
956 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
957 \return eHalStatus - when fail, it usually means the buffer allocated is not
958 big enough
959 ---------------------------------------------------------------------------*/
960eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
961 tANI_U8 *pBuf, eCsrSecurityType secType);
962
963
964/* ---------------------------------------------------------------------------
965 \fn sme_RoamGetNumPMKIDCache
966 \brief a wrapper function to request CSR to return number of PMKID cache
967 entries
968 \return tANI_U32 - the number of PMKID cache entries
969 ---------------------------------------------------------------------------*/
970tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
971
972/* ---------------------------------------------------------------------------
973 \fn sme_RoamGetPMKIDCache
974 \brief a wrapper function to request CSR to return PMKID cache from CSR
975 \param pNum - caller allocated memory that has the space of the number of
976 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
977 needed or actually number in tPmkidCacheInfo.
978 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
979 any, upon return
980 \return eHalStatus - when fail, it usually means the buffer allocated is not
981 big enough
982 ---------------------------------------------------------------------------*/
983eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
984 tPmkidCacheInfo *pPmkidCache);
985
986/* ---------------------------------------------------------------------------
987 \fn sme_GetConfigParam
988 \brief a wrapper function that HDD calls to get the global settings
989 currently maintained by CSR.
990 \param pParam - caller allocated memory
991 \return eHalStatus
992 ---------------------------------------------------------------------------*/
993eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
994
995/* ---------------------------------------------------------------------------
996 \fn sme_GetStatistics
997 \brief a wrapper function that client calls to register a callback to get
998 different PHY level statistics from CSR.
999
1000 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1001 \param statsMask - The different category/categories of stats requester is looking for
1002 The order in which you set the bits in the statsMask for requesting
1003 different type of stats is:
1004
1005 eCsrSummaryStats = bit 0
1006 eCsrGlobalClassAStats = bit 1
1007 eCsrGlobalClassBStats = bit 2
1008 eCsrGlobalClassCStats = bit 3
1009 eCsrGlobalClassDStats = bit 4
1010 eCsrPerStaStats = bit 5
1011
1012 \param callback - SME sends back the requested stats using the callback
1013 \param periodicity - If requester needs periodic update, 0 means it's an one
1014 time request
1015 \param cache - If requester is happy with cached stats
1016 \param staId - The station ID for which the stats is requested for
1017 \param pContext - user context to be passed back along with the callback
1018 \return eHalStatus
1019 ---------------------------------------------------------------------------*/
1020eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1021 tANI_U32 statsMask,
1022 tCsrStatsCallback callback,
1023 tANI_U32 periodicity, tANI_BOOLEAN cache,
1024 tANI_U8 staId, void *pContext);
1025
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301026/* ---------------------------------------------------------------------------
1027 \fn smeGetTLSTAState
1028 \helper function to get teh TL STA State whenever the function is called.
1029
1030 \param staId - The staID to be passed to the TL
1031 to get the relevant TL STA State
1032 \return the state as tANI_U16
1033 ---------------------------------------------------------------------------*/
1034tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1035
Jeff Johnson295189b2012-06-20 16:38:30 -07001036eHalStatus sme_GetRssi(tHalHandle hHal,
1037 tCsrRssiCallback callback,
1038 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301039
1040/* ---------------------------------------------------------------------------
1041 \fn sme_GetSnr
1042 \brief a wrapper function that client calls to register a callback to get
1043 SNR from FW
1044
1045 \param callback - SME sends back the requested stats using the callback
1046 \param staId - The station ID for which the stats is requested for
1047 \param bssid - The bssid of the connected session
1048 \param pContext - user context to be passed back along with the callback
1049 ---------------------------------------------------------------------------*/
1050eHalStatus sme_GetSnr(tHalHandle hHal,
1051 tCsrSnrCallback callback,
1052 tANI_U8 staId, tCsrBssid bssId,
1053 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001054#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001055eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1056 tCsrRssiCallback callback,
1057 tANI_U8 staId,
1058 tCsrBssid bssId,
1059 void *pContext,
1060 void* pVosContext);
1061#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001062
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001063#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001064/* ---------------------------------------------------------------------------
1065 \fn sme_GetTsmStats
1066 \brief a wrapper function that client calls to register a callback to get TSM Stats
1067
1068 \param callback - SME sends back the requested stats using the callback
1069 \param staId - The station ID for which the stats is requested for
1070 \param pContext - user context to be passed back along with the callback
1071 \param pVosContext - vos context
1072 \return eHalStatus
1073 ---------------------------------------------------------------------------*/
1074eHalStatus sme_GetTsmStats(tHalHandle hHal,
1075 tCsrTsmStatsCallback callback,
1076 tANI_U8 staId, tCsrBssid bssId,
1077 void *pContext, void* pVosContext, tANI_U8 tid);
1078
1079/* ---------------------------------------------------------------------------
1080 \fn sme_SetCCKMIe
1081 \brief function to store the CCKM IE passed from supplicant and use it while packing
1082 reassociation request
1083 \param hHal - HAL handle for device
1084 \param pCckmIe - pointer to CCKM IE data
1085 \param pCckmIeLen - length of the CCKM IE
1086 \- return Success or failure
1087 -------------------------------------------------------------------------*/
1088eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1089
1090
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001091/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001092 \fn sme_SetEseBeaconRequest
1093 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001094 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001095 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001096 \- return Success or failure
1097 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001098eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1099 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001100
1101
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001102#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001103/* ---------------------------------------------------------------------------
1104 \fn sme_CfgSetInt
1105 \brief a wrapper function that HDD calls to set parameters in CFG.
1106 \param cfgId - Configuration Parameter ID (type) for STA.
1107 \param ccmValue - The information related to Configuration Parameter ID
1108 which needs to be saved in CFG
1109 \param callback - To be registered by CSR with CCM. Once the CFG done with
1110 saving the information in the database, it notifies CCM &
1111 then the callback will be invoked to notify.
1112 \param toBeSaved - To save the request for future reference
1113 \return eHalStatus
1114 ---------------------------------------------------------------------------*/
1115eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1116 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1117
1118/* ---------------------------------------------------------------------------
1119 \fn sme_CfgSetStr
1120 \brief a wrapper function that HDD calls to set parameters in CFG.
1121 \param cfgId - Configuration Parameter ID (type) for STA.
1122 \param pStr - Pointer to the byte array which carries the information needs
1123 to be saved in CFG
1124 \param length - Length of the data to be saved
1125 \param callback - To be registered by CSR with CCM. Once the CFG done with
1126 saving the information in the database, it notifies CCM &
1127 then the callback will be invoked to notify.
1128 \param toBeSaved - To save the request for future reference
1129 \return eHalStatus
1130 ---------------------------------------------------------------------------*/
1131eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1132 tANI_U32 length, tCcmCfgSetCallback callback,
1133 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301134/* ---------------------------------------------------------------------------
1135 \fn sme_GetModifyProfileFields
1136 \brief HDD or SME - QOS calls this function to get the current values of
1137 connected profile fields, changing which can cause reassoc.
1138 This function must be called after CFG is downloaded and STA is in connected
1139 state. Also, make sure to call this function to get the current profile
1140 fields before calling the reassoc. So that pModifyProfileFields will have
1141 all the latest values plus the one(s) has been updated as part of reassoc
1142 request.
1143 \param pModifyProfileFields - pointer to the connected profile fields
1144 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001145
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301146 \return eHalStatus
1147 -------------------------------------------------------------------------------*/
1148eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1149 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301150/* ---------------------------------------------------------------------------
1151 \fn sme_HT40StopOBSSScan
1152 \brief HDD or SME - Command to stop the OBSS scan
1153 THis is implemented only for debugging purpose.
1154 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1155 \param sessionId - sessionId
1156 changing which can cause reassoc
1157
1158 \return eHalStatus
1159 -------------------------------------------------------------------------------*/
1160eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001161
1162/*--------------------------------------------------------------------------
1163 \fn sme_SetConfigPowerSave
1164 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1165 For BMPS related configuration, this function also updates the CFG
1166 and sends a message to FW to pick up the new values. Note: Calling
1167 this function only updates the configuration and does not enable
1168 the specified power save mode.
1169 \param hHal - The handle returned by macOpen.
1170 \param psMode - Power Saving mode being modified
1171 \param pConfigParams - a pointer to a caller allocated object of type
1172 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1173 \return eHalStatus
1174 --------------------------------------------------------------------------*/
1175eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1176 void *pConfigParams);
1177
1178/*--------------------------------------------------------------------------
1179 \fn sme_GetConfigPowerSave
1180 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1181 \param hHal - The handle returned by macOpen.
1182 \param psMode - Power Saving mode
1183 \param pConfigParams - a pointer to a caller allocated object of type
1184 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1185 \return eHalStatus
1186 --------------------------------------------------------------------------*/
1187eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1188 void *pConfigParams);
1189
1190/* ---------------------------------------------------------------------------
1191 \fn sme_SignalPowerEvent
1192 \brief Signals to PMC that a power event has occurred. Used for putting
1193 the chip into deep sleep mode.
1194 \param hHal - The handle returned by macOpen.
1195 \param event - the event that has occurred
1196 \return eHalStatus
1197 ---------------------------------------------------------------------------*/
1198extern eHalStatus sme_SignalPowerEvent (
1199 tHalHandle hHal,
1200 tPmcPowerEvent event);
1201
1202/* ---------------------------------------------------------------------------
1203 \fn sme_EnablePowerSave
1204 \brief Enables one of the power saving modes. This API does not cause a
1205 device state change. This is purely a configuration API.
1206 \param hHal - The handle returned by macOpen.
1207 \param psMode - The power saving mode to enable.
1208 \return eHalStatus
1209 ---------------------------------------------------------------------------*/
1210extern eHalStatus sme_EnablePowerSave (
1211 tHalHandle hHal,
1212 tPmcPowerSavingMode psMode);
1213
1214/* ---------------------------------------------------------------------------
1215 \fn sme_DisablePowerSave
1216 \brief Disables one of the power saving modes.Disabling does not imply
1217 that device will be brought out of the current PS mode. This is
1218 purely a configuration API.
1219 \param hHal - The handle returned by macOpen.
1220 \param psMode - The power saving mode to disable.
1221 \return eHalStatus
1222 ---------------------------------------------------------------------------*/
1223extern eHalStatus sme_DisablePowerSave (
1224 tHalHandle hHal,
1225 tPmcPowerSavingMode psMode);
1226
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301227 /* ---------------------------------------------------------------------------
1228 \fn sme_SetHostPowerSave
1229 \brief The BMPS logic is controlled by the User level Apps
1230 \param hHal - The handle returned by macOpen.
1231 \param psMode - The power saving mode to enable.
1232 \return eHalStatus
1233 ---------------------------------------------------------------------------*/
1234extern eHalStatus sme_SetHostPowerSave (
1235 tHalHandle hHal,
1236 v_BOOL_t psMode);
1237
Jeff Johnson295189b2012-06-20 16:38:30 -07001238/* ---------------------------------------------------------------------------
1239 \fn sme_StartAutoBmpsTimer
1240 \brief Starts a timer that periodically polls all the registered
1241 module for entry into Bmps mode. This timer is started only if BMPS is
1242 enabled and whenever the device is in full power.
1243 \param hHal - The handle returned by macOpen.
1244 \return eHalStatus
1245 ---------------------------------------------------------------------------*/
1246extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1247
1248/* ---------------------------------------------------------------------------
1249 \fn sme_StopAutoBmpsTimer
1250 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1251 Stopping the timer does not cause a device state change. Only the timer
1252 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1253 \param hHal - The handle returned by macOpen.
1254 \return eHalStatus
1255 ---------------------------------------------------------------------------*/
1256extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1257
1258/* ---------------------------------------------------------------------------
1259 \fn sme_QueryPowerState
1260 \brief Returns the current power state of the device.
1261 \param hHal - The handle returned by macOpen.
1262 \param pPowerState - pointer to location to return power state
1263 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1264 \return eHalStatus
1265 ---------------------------------------------------------------------------*/
1266extern eHalStatus sme_QueryPowerState (
1267 tHalHandle hHal,
1268 tPmcPowerState *pPowerState,
1269 tPmcSwitchState *pSwWlanSwitchState);
1270
1271/* ---------------------------------------------------------------------------
1272 \fn sme_IsPowerSaveEnabled
1273 \brief Checks if the device is able to enter a particular power save mode
1274 This does not imply that the device is in a particular PS mode
1275 \param hHal - The handle returned by macOpen.
1276 \param psMode - the power saving mode
1277 \return eHalStatus
1278 ---------------------------------------------------------------------------*/
1279extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1280 tHalHandle hHal,
1281 tPmcPowerSavingMode psMode);
1282
1283/* ---------------------------------------------------------------------------
1284 \fn sme_RequestFullPower
1285 \brief Request that the device be brought to full power state.
1286 Note 1: If "fullPowerReason" specificied in this API is set to
1287 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1288 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1289 HDD is requesting full power, we need to undo any previous HDD requests for
1290 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1291 specified anything other than above, the buffered requests for BMPS and WoWL
1292 will not be cleared.
1293 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1294 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1295 request".
1296 Note 3: When the device finally enters Full Power PMC will start a timer
1297 if any of the following holds true:
1298 - Auto BMPS mode is enabled
1299 - Uapsd request is pending
1300 - HDD's request for BMPS is pending
1301 - HDD's request for WoWL is pending
1302 On timer expiry PMC will attempt to put the device in BMPS mode if following
1303 (in addition to those listed above) holds true:
1304 - Polling of all modules through the Power Save Check routine passes
1305 - STA is associated to an access point
1306 \param hHal - The handle returned by macOpen.
1307 \param - callbackRoutine Callback routine invoked in case of success/failure
1308 \param - callbackContext - Cookie to be passed back during callback
1309 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1310 distinguish between BAP and HDD requests
1311 \return eHalStatus - status
1312 eHAL_STATUS_SUCCESS - device brought to full power state
1313 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1314 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1315 ---------------------------------------------------------------------------*/
1316extern eHalStatus sme_RequestFullPower (
1317 tHalHandle hHal,
1318 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1319 void *callbackContext,
1320 tRequestFullPowerReason fullPowerReason);
1321
1322/* ---------------------------------------------------------------------------
1323 \fn sme_RequestBmps
1324 \brief Request that the device be put in BMPS state. Request will be
1325 accepted only if BMPS mode is enabled and power save check routine
1326 passes. Only HDD should invoke this API.
1327 \param hHal - The handle returned by macOpen.
1328 \param - callbackRoutine Callback routine invoked in case of success/failure
1329 \param - callbackContext - Cookie to be passed back during callback
1330 \return eHalStatus
1331 eHAL_STATUS_SUCCESS - device is in BMPS state
1332 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1333 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1334 ---------------------------------------------------------------------------*/
1335extern eHalStatus sme_RequestBmps (
1336 tHalHandle hHal,
1337 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1338 void *callbackContext);
1339
1340/* ---------------------------------------------------------------------------
1341 \fn sme_SetDHCPTillPowerActiveFlag
1342 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1343 entry by PMC
1344 \param hHal - The handle returned by macOpen.
1345 ---------------------------------------------------------------------------*/
1346void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1347
1348
1349/* ---------------------------------------------------------------------------
1350 \fn sme_StartUapsd
1351 \brief Request that the device be put in UAPSD state. If the device is in
1352 Full Power it will be put in BMPS mode first and then into UAPSD
1353 mode.
1354 \param hHal - The handle returned by macOpen.
1355 \param - callbackRoutine Callback routine invoked in case of success/failure
1356 \param - callbackContext - Cookie to be passed back during callback
1357 eHAL_STATUS_SUCCESS - device is in UAPSD state
1358 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1359 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1360 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1361 \return eHalStatus
1362 ---------------------------------------------------------------------------*/
1363extern eHalStatus sme_StartUapsd (
1364 tHalHandle hHal,
1365 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1366 void *callbackContext);
1367
1368/* ---------------------------------------------------------------------------
1369 \fn sme_StopUapsd
1370 \brief Request that the device be put out of UAPSD state. Device will be
1371 put in in BMPS state after stop UAPSD completes. Buffered requests for
1372 UAPSD will be cleared after this.
1373 \param hHal - The handle returned by macOpen.
1374 \return eHalStatus
1375 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1376 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1377 ---------------------------------------------------------------------------*/
1378extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1379
1380/* ---------------------------------------------------------------------------
1381 \fn sme_RequestStandby
1382 \brief Request that the device be put in standby. It is HDD's responsibility
1383 to bring the chip to full power and do a discconnect before calling
1384 this API. Request for standby will be rejected if STA is associated
1385 to an AP.
1386 \param hHal - The handle returned by macOpen.
1387 \param - callbackRoutine Callback routine invoked in case of success/failure
1388 \param - callbackContext - Cookie to be passed back during callback
1389 \return eHalStatus
1390 eHAL_STATUS_SUCCESS - device is in Standby mode
1391 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1392 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1393 ---------------------------------------------------------------------------*/
1394extern eHalStatus sme_RequestStandby (
1395 tHalHandle hHal,
1396 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1397 void *callbackContext);
1398
1399/* ---------------------------------------------------------------------------
1400 \fn sme_RegisterPowerSaveCheck
1401 \brief Register a power save check routine that is called whenever
1402 the device is about to enter one of the power save modes.
1403 \param hHal - The handle returned by macOpen.
1404 \param checkRoutine - Power save check routine to be registered
1405 \param callbackContext - Cookie to be passed back during callback
1406 \return eHalStatus
1407 eHAL_STATUS_SUCCESS - successfully registered
1408 eHAL_STATUS_FAILURE - not successfully registered
1409 ---------------------------------------------------------------------------*/
1410extern eHalStatus sme_RegisterPowerSaveCheck (
1411 tHalHandle hHal,
1412 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1413
1414/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301415 \fn sme_Register11dScanDoneCallback
1416 \brief Register a routine of type csrScanCompleteCallback which is
1417 called whenever an 11d scan is done
1418 \param hHal - The handle returned by macOpen.
1419 \param callback - 11d scan complete routine to be registered
1420 \return eHalStatus
1421 ---------------------------------------------------------------------------*/
1422extern eHalStatus sme_Register11dScanDoneCallback (
1423 tHalHandle hHal,
1424 csrScanCompleteCallback);
1425
1426/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001427 \fn sme_DeregisterPowerSaveCheck
1428 \brief Deregister a power save check routine
1429 \param hHal - The handle returned by macOpen.
1430 \param checkRoutine - Power save check routine to be deregistered
1431 \return eHalStatus
1432 eHAL_STATUS_SUCCESS - successfully deregistered
1433 eHAL_STATUS_FAILURE - not successfully deregistered
1434 ---------------------------------------------------------------------------*/
1435extern eHalStatus sme_DeregisterPowerSaveCheck (
1436 tHalHandle hHal,
1437 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1438
1439/* ---------------------------------------------------------------------------
1440 \fn sme_RegisterDeviceStateUpdateInd
1441 \brief Register a callback routine that is called whenever
1442 the device enters a new device state (Full Power, BMPS, UAPSD)
1443 \param hHal - The handle returned by macOpen.
1444 \param callbackRoutine - Callback routine to be registered
1445 \param callbackContext - Cookie to be passed back during callback
1446 \return eHalStatus
1447 eHAL_STATUS_SUCCESS - successfully registered
1448 eHAL_STATUS_FAILURE - not successfully registered
1449 ---------------------------------------------------------------------------*/
1450extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1451 tHalHandle hHal,
1452 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1453 void *callbackContext);
1454
1455/* ---------------------------------------------------------------------------
1456 \fn sme_DeregisterDeviceStateUpdateInd
1457 \brief Deregister a routine that was registered for device state changes
1458 \param hHal - The handle returned by macOpen.
1459 \param callbackRoutine - Callback routine to be deregistered
1460 \return eHalStatus
1461 eHAL_STATUS_SUCCESS - successfully deregistered
1462 eHAL_STATUS_FAILURE - not successfully deregistered
1463 ---------------------------------------------------------------------------*/
1464extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1465 tHalHandle hHal,
1466 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1467
1468/* ---------------------------------------------------------------------------
1469 \fn sme_WowlAddBcastPattern
1470 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1471 do a pattern match on these patterns when Wowl is enabled during BMPS
1472 mode.
1473 \param hHal - The handle returned by macOpen.
1474 \param pattern - Pattern to be added
1475 \return eHalStatus
1476 eHAL_STATUS_FAILURE Cannot add pattern
1477 eHAL_STATUS_SUCCESS Request accepted.
1478 ---------------------------------------------------------------------------*/
1479extern eHalStatus sme_WowlAddBcastPattern (
1480 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001481 tpSirWowlAddBcastPtrn pattern,
1482 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001483
1484/* ---------------------------------------------------------------------------
1485 \fn sme_WowlDelBcastPattern
1486 \brief Delete a pattern that was added for Pattern Byte Matching.
1487 \param hHal - The handle returned by macOpen.
1488 \param pattern - Pattern to be deleted
1489 \return eHalStatus
1490 eHAL_STATUS_FAILURE Cannot delete pattern
1491 eHAL_STATUS_SUCCESS Request accepted.
1492 ---------------------------------------------------------------------------*/
1493extern eHalStatus sme_WowlDelBcastPattern (
1494 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001495 tpSirWowlDelBcastPtrn pattern,
1496 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001497
1498/* ---------------------------------------------------------------------------
1499 \fn sme_EnterWowl
1500 \brief This is the API to request entry into WOWL mode.
1501 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1502 SME will will cache the information that WOWL has been requested and
1503 attempt to put the device in BMPS first. On entry into BMPS, SME will
1504 enter the WOWL mode.
1505 Note 1: After WoWL request is accepted, If module other than HDD requests
1506 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1507 and attempt to put the chip into BMPS+WOWL based on a timer.
1508 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1509 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1510 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1511 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1512 are required. Currently there is no requirement or use case to support UAPSD
1513 and WOWL at the same time.
1514 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1515 Note 5. Request for WoWL is rejected if BMPS is disabled.
1516
1517 \param hHal - The handle returned by macOpen.
1518 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1519 Used for success/failure notification by SME
1520 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1521 at the time of callback.
1522 \param wakeReasonIndCB - Callback routine provided by HDD.
1523 Used for Wake Reason Indication by SME
1524 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1525 at the time of callback.
1526 \return eHalStatus
1527 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1528 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1529 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1530 mode is entered.
1531 ---------------------------------------------------------------------------*/
1532extern eHalStatus sme_EnterWowl (
1533 tHalHandle hHal,
1534 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1535 void *enterWowlCallbackContext,
1536#ifdef WLAN_WAKEUP_EVENTS
1537 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1538 void *wakeReasonIndCBContext,
1539#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001540 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001541
1542/* ---------------------------------------------------------------------------
1543 \fn sme_ExitWowl
1544 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1545 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1546 mode. Any Buffered request for WoWL will be cleared after this API.
1547 \param hHal - The handle returned by macOpen.
1548 \return eHalStatus
1549 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1550 only if the previous "Enter WOWL" transaction has
1551 not even completed.
1552 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1553 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301554extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001555
1556/* ---------------------------------------------------------------------------
1557
1558 \fn sme_RoamSetKey
1559
1560 \brief To set encryption key. This function should be called only when connected
1561 This is an asynchronous API.
1562
1563 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1564
1565 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1566
1567 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1568
1569 FAILURE or RESOURCES The API finished and failed.
1570
1571 -------------------------------------------------------------------------------*/
1572eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1573
1574/* ---------------------------------------------------------------------------
1575
1576 \fn sme_RoamRemoveKey
1577
1578 \brief To set encryption key. This is an asynchronous API.
1579
1580 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1581
1582 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1583
1584 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1585
1586 FAILURE or RESOURCES The API finished and failed.
1587
1588 -------------------------------------------------------------------------------*/
1589eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1590
1591
1592/* ---------------------------------------------------------------------------
1593
1594 \fn sme_GetCountryCode
1595
1596 \brief To return the current country code. If no country code is applied, default country code is
1597 used to fill the buffer.
1598 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1599 This is a synchronous API.
1600
1601 \param pBuf - pointer to a caller allocated buffer for returned country code.
1602
1603 \param pbLen For input, this parameter indicates how big is the buffer.
1604 Upon return, this parameter has the number of bytes for country. If pBuf
1605 doesn't have enough space, this function returns
1606 fail status and this parameter contains the number that is needed.
1607
1608 \return eHalStatus SUCCESS.
1609
1610 FAILURE or RESOURCES The API finished and failed.
1611
1612 -------------------------------------------------------------------------------*/
1613eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1614
1615/* ---------------------------------------------------------------------------
1616
1617 \fn sme_SetCountryCode
1618
1619 \brief To change the current/default country code.
1620 If 11d supported is turned off, an error is return.
1621 This is a synchronous API.
1622
1623 \param pCountry - pointer to a caller allocated buffer for the country code.
1624
1625 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1626 whether a reset is required.
1627
1628 \return eHalStatus SUCCESS.
1629
1630 FAILURE or RESOURCES The API finished and failed.
1631
1632 -------------------------------------------------------------------------------*/
1633eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1634
1635/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301636
1637 \fn sme_InitChannels
1638
1639 \brief Used to initialize CSR channel lists while driver loading
1640
1641 \param hHal - global pMac structure
1642
1643 \return eHalStatus SUCCESS.
1644
1645 FAILURE or RESOURCES The API finished and failed.
1646
1647 -------------------------------------------------------------------------------*/
1648eHalStatus sme_InitChannels(tHalHandle hHal);
1649
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301650
Mihir Shete04206452014-11-20 17:50:58 +05301651#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301652/* ---------------------------------------------------------------------------
1653 \fn sme_InitChannelsForCC
1654
1655 \brief Used to issue regulatory hint to user
1656
1657 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301658 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301659
1660 \return eHalStatus SUCCESS.
1661
1662 FAILURE or RESOURCES The API finished and failed.
1663
1664 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301665eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301666#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301667
Mihir Shetee1093ba2014-01-21 20:13:32 +05301668/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001669 \fn sme_ResetCountryCodeInformation
1670 \brief this function is to reset the country code current being used back to EEPROM default
1671 this includes channel list and power setting. This is a synchronous API.
1672 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1673 a restart is needed to apply the change
1674 \return eHalStatus
1675 -------------------------------------------------------------------------------*/
1676eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1677
1678/* ---------------------------------------------------------------------------
1679 \fn sme_GetSupportedCountryCode
1680 \brief this function is to get a list of the country code current being supported
1681 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1682 this has the country code list. 3 bytes for each country code. This may be NULL if
1683 caller wants to know the needed byte count.
1684 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1685 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1686 \return eHalStatus
1687 -------------------------------------------------------------------------------*/
1688eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1689
1690/* ---------------------------------------------------------------------------
1691 \fn sme_GetCurrentRegulatoryDomain
1692 \brief this function is to get the current regulatory domain. This is a synchronous API.
1693 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1694 SME. The function fails if 11d support is turned off.
1695 \param pDomain - Caller allocated buffer to return the current domain.
1696 \return eHalStatus SUCCESS.
1697
1698 FAILURE or RESOURCES The API finished and failed.
1699 -------------------------------------------------------------------------------*/
1700eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1701
1702/* ---------------------------------------------------------------------------
1703 \fn sme_SetRegulatoryDomain
1704 \brief this function is to set the current regulatory domain.
1705 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1706 SME. This is a synchronous API.
1707 \param domainId - indicate the domain (defined in the driver) needs to set to.
1708 See v_REGDOMAIN_t for definition
1709 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1710 a restart is needed to apply the change
1711 \return eHalStatus
1712 -------------------------------------------------------------------------------*/
1713eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1714
1715/* ---------------------------------------------------------------------------
1716
1717 \fn sme_GetRegulatoryDomainForCountry
1718
1719 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1720
1721 \param pCountry - pointer to a caller allocated buffer for input country code.
1722
1723 \param pDomainId Upon successful return, it is the domain that country belongs to.
1724 If it is NULL, returning success means that the country code is known.
1725
1726 \return eHalStatus SUCCESS.
1727
1728 FAILURE or RESOURCES The API finished and failed.
1729
1730 -------------------------------------------------------------------------------*/
1731eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1732
1733
1734
1735/* ---------------------------------------------------------------------------
1736
1737 \fn sme_GetSupportedRegulatoryDomains
1738
1739 \brief To return a list of supported regulatory domains. This is a synchronous API.
1740
1741 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1742
1743 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1744 Upon return, this parameter has the number for supported domains. If pDomains
1745 doesn't have enough space for all the supported domains, this function returns
1746 fail status and this parameter contains the number that is needed.
1747
1748 \return eHalStatus SUCCESS.
1749
1750 FAILURE or RESOURCES The API finished and failed.
1751
1752 -------------------------------------------------------------------------------*/
1753eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1754
1755//some support functions
1756tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1757tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1758tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1759//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1760eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1761
1762typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1763/* ---------------------------------------------------------------------------
1764
1765 \fn sme_ChangeCountryCode
1766
1767 \brief Change Country code from upperlayer during WLAN driver operation.
1768 This is a synchronous API.
1769
1770 \param hHal - The handle returned by macOpen.
1771
1772 \param pCountry New Country Code String
1773
Abhishek Singha306a442013-11-07 18:39:01 +05301774 \param sendRegHint If we want to send reg hint to nl80211
1775
Jeff Johnson295189b2012-06-20 16:38:30 -07001776 \return eHalStatus SUCCESS.
1777
1778 FAILURE or RESOURCES The API finished and failed.
1779
1780 -------------------------------------------------------------------------------*/
1781eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1782 tSmeChangeCountryCallback callback,
1783 tANI_U8 *pCountry,
1784 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301785 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301786 tAniBool countryFromUserSpace,
1787 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001788
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301789/* ---------------------------------------------------------------------------
1790
Amar Singhal0d15bd52013-10-12 23:13:13 -07001791 \fn sme_GenericChangeCountryCode
1792
1793 \brief Generic API to change country code
1794
1795 \param hHal - The handle returned by macOpen.
1796
1797 \param pCountry New Country Code String
1798
1799 \param reg_domain Regulatory domain for the new country code
1800
1801 \return eHalStatus SUCCESS.
1802
1803 FAILURE or RESOURCES The API finished and failed.
1804
1805 -------------------------------------------------------------------------------*/
1806eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1807 tANI_U8 *pCountry,
1808 v_REGDOMAIN_t reg_domain);
1809
1810/* ---------------------------------------------------------------------------
1811
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301812 \fn sme_DHCPStartInd
1813
1814 \brief Indicate FW about DHCP start event.
1815
1816 \param hHal - The handle returned by macOpen.
1817
1818 \param device_mode the mode of the device
1819
c_hpothu0b0cab72014-02-13 21:52:40 +05301820 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301821
1822 \return eHalStatus SUCCESS.
1823
1824 FAILURE or RESOURCES The API finished and failed.
1825
1826 -------------------------------------------------------------------------------*/
1827
1828eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1829 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301830 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301831
1832/* ---------------------------------------------------------------------------
1833
1834 \fn sme_DHCPStopInd
1835
1836 \brief Indicate FW about DHCP stop event.
1837
1838 \param hHal - The handle returned by macOpen.
1839
1840 \param device_mode the mode of the device
1841
c_hpothu0b0cab72014-02-13 21:52:40 +05301842 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301843
1844 \return eHalStatus SUCCESS.
1845
1846 FAILURE or RESOURCES The API finished and failed.
1847
1848 -------------------------------------------------------------------------------*/
1849eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1850 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301851 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301852
Jeff Johnson295189b2012-06-20 16:38:30 -07001853
1854/* ---------------------------------------------------------------------------
1855 \fn sme_BtcSignalBtEvent
1856 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1857 BT event type and the current operating mode of Libra (full power,
1858 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1859 would be employed.
1860 \param hHal - The handle returned by macOpen.
1861 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1862 Caller owns the memory and is responsible for freeing it.
1863 \return VOS_STATUS
1864 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1865 if driver has not yet been initialized or if BTC
1866 Events Layer has been disabled.
1867 VOS_STATUS_SUCCESS BT Event passed to HAL
1868 ---------------------------------------------------------------------------*/
1869VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1870
1871/* ---------------------------------------------------------------------------
1872 \fn sme_BtcSetConfig
1873 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1874 This function should be invoked only after CFG download has completed.
1875 Calling it after sme_HDDReadyInd is recommended.
1876 \param hHal - The handle returned by macOpen.
1877 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1878 tSmeBtcConfig. Caller owns the memory and is responsible
1879 for freeing it.
1880 \return VOS_STATUS
1881 VOS_STATUS_E_FAILURE Config not passed to HAL.
1882 VOS_STATUS_SUCCESS Config passed to HAL
1883 ---------------------------------------------------------------------------*/
1884VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1885
1886/* ---------------------------------------------------------------------------
1887 \fn sme_BtcGetConfig
1888 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1889 \param hHal - The handle returned by macOpen.
1890 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1891 Caller owns the memory and is responsible for freeing it.
1892 \return VOS_STATUS
1893 VOS_STATUS_E_FAILURE - failure
1894 VOS_STATUS_SUCCESS success
1895 ---------------------------------------------------------------------------*/
1896VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1897
1898/* ---------------------------------------------------------------------------
1899 \fn sme_SetCfgPrivacy
1900 \brief API to set configure privacy parameters
1901 \param hHal - The handle returned by macOpen.
1902 \param pProfile - Pointer CSR Roam profile.
1903 \param fPrivacy - This parameter indicates status of privacy
1904
1905 \return void
1906 ---------------------------------------------------------------------------*/
1907void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1908
1909#if defined WLAN_FEATURE_VOWIFI
1910/* ---------------------------------------------------------------------------
1911 \fn sme_NeighborReportRequest
1912 \brief API to request neighbor report.
1913 \param hHal - The handle returned by macOpen.
1914 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1915 tRrmNeighborReq. Caller owns the memory and is responsible
1916 for freeing it.
1917 \return VOS_STATUS
1918 VOS_STATUS_E_FAILURE - failure
1919 VOS_STATUS_SUCCESS success
1920 ---------------------------------------------------------------------------*/
1921VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1922 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1923#endif
1924
1925//The following are debug APIs to support direct read/write register/memory
1926//They are placed in SME because HW cannot be access when in LOW_POWER state
1927//AND not connected. The knowledge and synchronization is done in SME
1928
1929//sme_DbgReadRegister
1930//Caller needs to validate the input values
1931VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1932
1933//sme_DbgWriteRegister
1934//Caller needs to validate the input values
1935VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1936
1937//sme_DbgReadMemory
1938//Caller needs to validate the input values
1939//pBuf caller allocated buffer has the length of nLen
1940VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1941
1942//sme_DbgWriteMemory
1943//Caller needs to validate the input values
1944VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1945
Jeff Johnson295189b2012-06-20 16:38:30 -07001946VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1947 tSirVersionType *pVersion);
1948VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1949 tSirVersionType *pVersion);
1950VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1951 tANI_U8 *pVersion,
1952 tANI_U32 versionBufferSize);
1953VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1954 tANI_U8 *pVersion,
1955 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001956eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1957 csrRoamCompleteCallback callback,
1958 void *pContext);
1959
1960#ifdef FEATURE_WLAN_WAPI
1961/* ---------------------------------------------------------------------------
1962 \fn sme_RoamSetBKIDCache
1963 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1964 candidate list.
1965 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1966 it is opened (by calling halOpen).
1967 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1968 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1969 when retruning, this is the number of items put into pBKIDCache
1970 \return eHalStatus - when fail, it usually means the buffer allocated is not
1971 big enough and pNumItems has the number of tBkidCacheInfo.
1972 ---------------------------------------------------------------------------*/
1973eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1974 tANI_U32 numItems );
1975
1976/* ---------------------------------------------------------------------------
1977 \fn sme_RoamGetBKIDCache
1978 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1979 BKID cache.
1980 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1981 it is opened (by calling halOpen).
1982 \param pNum - caller allocated memory that has the space of the number of
1983 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1984 in SME cache.
1985 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1986 upon return
1987 \return eHalStatus - when fail, it usually means the buffer allocated is not
1988 big enough.
1989 ---------------------------------------------------------------------------*/
1990eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1991 tBkidCacheInfo *pBkidCache);
1992
1993/* ---------------------------------------------------------------------------
1994 \fn sme_RoamGetNumBKIDCache
1995 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1996 number of BKID cache entries.
1997 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1998 it is opened (by calling halOpen).
1999 \return tANI_U32 - the number of BKID cache entries.
2000 ---------------------------------------------------------------------------*/
2001tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2002
2003/* ---------------------------------------------------------------------------
2004 \fn sme_ScanGetBKIDCandidateList
2005 \brief a wrapper function to return the BKID candidate list
2006 \param pBkidList - caller allocated buffer point to an array of
2007 tBkidCandidateInfo
2008 \param pNumItems - pointer to a variable that has the number of
2009 tBkidCandidateInfo allocated when retruning, this is
2010 either the number needed or number of items put into
2011 pPmkidList
2012 \return eHalStatus - when fail, it usually means the buffer allocated is not
2013 big enough and pNumItems
2014 has the number of tBkidCandidateInfo.
2015 \Note: pNumItems is a number of tBkidCandidateInfo,
2016 not sizeof(tBkidCandidateInfo) * something
2017 ---------------------------------------------------------------------------*/
2018eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2019 tBkidCandidateInfo *pBkidList,
2020 tANI_U32 *pNumItems );
2021#endif /* FEATURE_WLAN_WAPI */
2022
Jeff Johnsone7245742012-09-05 17:12:55 -07002023#ifdef FEATURE_OEM_DATA_SUPPORT
2024/********************************************************************************************
2025 Oem data related modifications
2026*********************************************************************************************/
2027/* ---------------------------------------------------------------------------
2028 \fn sme_OemDataReq
2029 \param sessionId - session id of session to be used for oem data req.
2030 \param pOemDataReqID - pointer to an object to get back the request ID
2031 \param callback - a callback function that is called upon finish
2032 \param pContext - a pointer passed in for the callback
2033 \return eHalStatus
2034 ---------------------------------------------------------------------------*/
2035eHalStatus sme_OemDataReq(tHalHandle hHal,
2036 tANI_U8 sessionId,
2037 tOemDataReqConfig *,
2038 tANI_U32 *pOemDataReqID,
2039 oemData_OemDataReqCompleteCallback callback,
2040 void *pContext);
2041
2042/* ---------------------------------------------------------------------------
2043 \fn sme_getOemDataRsp
2044 \param pOemDataRsp - A pointer to the response object
2045 \param pOemDataReqID - pointer to an object to get back the request ID
2046 \return eHalStatus
2047 ---------------------------------------------------------------------------*/
2048eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2049 tOemDataRsp **pOemDataRsp);
2050
2051#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002052
2053
Jeff Johnson295189b2012-06-20 16:38:30 -07002054
2055/* ---------------------------------------------------------------------------
2056
2057 \fn sme_RoamUpdateAPWPSIE
2058
2059 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2060 This is an asynchronous API.
2061
2062 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2063
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002064 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002065
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002066 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002067
2068 -------------------------------------------------------------------------------*/
2069
2070eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2071/* ---------------------------------------------------------------------------
2072
2073 \fn sme_RoamUpdateAPWPARSNIEs
2074
2075 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2076 This is an asynchronous API.
2077
2078 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2079
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002080 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002081
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002082 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002083
2084 -------------------------------------------------------------------------------*/
2085eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2086
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002087/* ---------------------------------------------------------------------------
2088
2089 sme_ChangeMCCBeaconInterval
2090
2091 \brief To update P2P-GO's beacon Interval.
2092
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002093 \return eHalStatus SUCCESS
2094 FAILURE or RESOURCES
2095 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002096 -------------------------------------------------------------------------------*/
2097eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2098
2099
Jeff Johnson295189b2012-06-20 16:38:30 -07002100
2101/* ---------------------------------------------------------------------------
2102 \fn sme_sendBTAmpEvent
2103 \brief API to send the btAMPstate to FW
2104 \param hHal - The handle returned by macOpen.
2105 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002106 \return eHalStatus SUCCESS
2107 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002108
2109--------------------------------------------------------------------------- */
2110
2111eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2112
2113
2114
2115/* ---------------------------------------------------------------------------
2116 \fn sme_SetHostOffload
2117 \brief API to set the host offload feature.
2118 \param hHal - The handle returned by macOpen.
2119 \param pRequest - Pointer to the offload request.
2120 \return eHalStatus
2121 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002122eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2123 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002124
2125/* ---------------------------------------------------------------------------
2126 \fn sme_SetKeepAlive
2127 \brief API to set the Keep Alive feature.
2128 \param hHal - The handle returned by macOpen.
2129 \param pRequest - Pointer to the Keep Alive request.
2130 \return eHalStatus
2131 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002132eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2133 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002134
Jeff Johnson295189b2012-06-20 16:38:30 -07002135/* ----------------------------------------------------------------------------
2136 \fn sme_GetOperationChannel
2137 \brief API to get current channel on which STA is parked
2138 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002139 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002140 \returns eHAL_STATUS_SUCCESS
2141 eHAL_STATUS_FAILURE
2142-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002143eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002144
Jeff Johnson295189b2012-06-20 16:38:30 -07002145/* ---------------------------------------------------------------------------
2146
2147 \fn sme_RegisterMgtFrame
2148
2149 \brief To register managment frame of specified type and subtype.
2150 \param frameType - type of the frame that needs to be passed to HDD.
2151 \param matchData - data which needs to be matched before passing frame
2152 to HDD.
2153 \param matchDataLen - Length of matched data.
2154 \return eHalStatus
2155 -------------------------------------------------------------------------------*/
2156eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2157 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2158
2159/* ---------------------------------------------------------------------------
2160
2161 \fn sme_DeregisterMgtFrame
2162
2163 \brief To De-register managment frame of specified type and subtype.
2164 \param frameType - type of the frame that needs to be passed to HDD.
2165 \param matchData - data which needs to be matched before passing frame
2166 to HDD.
2167 \param matchDataLen - Length of matched data.
2168 \return eHalStatus
2169 -------------------------------------------------------------------------------*/
2170eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2171 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302172/* ---------------------------------------------------------------------------
2173 \fn sme_GetFramesLog
2174 \brief a wrapper function that client calls to register a callback to get
2175 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302176 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302177 \return eHalStatus
2178 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302179eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002180/* ---------------------------------------------------------------------------
2181
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302182 \fn sme_InitMgmtFrameLogging
2183
2184 \brief
2185 SME will pass this request to lower mac to initialize Frame Logging.
2186
2187 \param
2188
2189 hHal - The handle returned by macOpen.
2190
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302191 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302192
2193 \return eHalStatus
2194--------------------------------------------------------------------------- */
2195eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302196 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302197
2198/* ---------------------------------------------------------------------------
2199
Jeff Johnson295189b2012-06-20 16:38:30 -07002200 \fn sme_ConfigureRxpFilter
2201
2202 \brief
2203 SME will pass this request to lower mac to set/reset the filter on RXP for
2204 multicast & broadcast traffic.
2205
2206 \param
2207
2208 hHal - The handle returned by macOpen.
2209
2210 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2211 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2212 on this param. In future we can use this as a mask to set various types of
2213 filters as suggested below:
2214 FILTER_ALL_MULTICAST:
2215 FILTER_ALL_BROADCAST:
2216 FILTER_ALL_MULTICAST_BROADCAST:
2217
2218
2219 \return eHalStatus
2220
2221
2222--------------------------------------------------------------------------- */
2223eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2224 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2225
2226/* ---------------------------------------------------------------------------
2227
2228 \fn sme_ConfigureAppsCpuWakeupState
2229
2230 \brief
2231 SME will pass this request to lower mac to dynamically adjusts the listen
2232 interval based on the WLAN/MSM activity. This feature is named as
2233 Telescopic Beacon wakeup feature.
2234
2235 \param
2236
2237 hHal - The handle returned by macOpen.
2238
2239 isAppsAwake- Depicts the state of the Apps CPU
2240
2241
2242 \return eHalStatus
2243
2244
2245--------------------------------------------------------------------------- */
2246eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2247
Jeff Johnson295189b2012-06-20 16:38:30 -07002248/* ---------------------------------------------------------------------------
2249
2250 \fn sme_ConfigureSuspendInd
2251
2252 \brief
2253 SME will pass this request to lower mac to Indicate that the wlan needs to
2254 be suspended
2255
2256 \param
2257
2258 hHal - The handle returned by macOpen.
2259
2260 wlanSuspendParam- Depicts the wlan suspend params
2261
2262
2263 \return eHalStatus
2264
2265
2266--------------------------------------------------------------------------- */
2267eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2268 tpSirWlanSuspendParam wlanSuspendParam);
2269
2270/* ---------------------------------------------------------------------------
2271
2272 \fn sme_ConfigureResumeReq
2273
2274 \brief
2275 SME will pass this request to lower mac to Indicate that the wlan needs to
2276 be Resumed
2277
2278 \param
2279
2280 hHal - The handle returned by macOpen.
2281
2282 wlanResumeParam- Depicts the wlan resume params
2283
2284
2285 \return eHalStatus
2286
2287
2288--------------------------------------------------------------------------- */
2289eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2290 tpSirWlanResumeParam wlanResumeParam);
2291
Jeff Johnson295189b2012-06-20 16:38:30 -07002292
2293/* ---------------------------------------------------------------------------
2294
2295 \fn sme_GetInfraSessionId
2296
2297 \brief To get the session ID for infra session, if connected
2298 This is a synchronous API.
2299
2300 \param hHal - The handle returned by macOpen.
2301
2302 \return sessionid, -1 if infra session is not connected
2303
2304 -------------------------------------------------------------------------------*/
2305tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2306
2307/* ---------------------------------------------------------------------------
2308
2309 \fn sme_GetInfraOperationChannel
2310
2311 \brief To get the operating channel for infra session, if connected
2312 This is a synchronous API.
2313
2314 \param hHal - The handle returned by macOpen.
2315 \param sessionId - the sessionId returned by sme_OpenSession.
2316
2317 \return operating channel, 0 if infra session is not connected
2318
2319 -------------------------------------------------------------------------------*/
2320tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2321/* ---------------------------------------------------------------------------
2322
2323 \fn sme_GetConcurrentOperationChannel
2324
2325 \brief To get the operating channel for other concurrent sessions, if connected
2326 This is a synchronous API.
2327
2328 \param hHal - The handle returned by macOpen.
2329 \param currentPersona - persona that is trying to come up.
2330
2331 \return operating channel, 0 if infra session is not connected
2332
2333 -------------------------------------------------------------------------------*/
2334tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2335
2336/* ---------------------------------------------------------------------------
2337 \fn sme_AbortMacScan
2338 \brief API to cancel MAC scan.
2339 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302340 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302341 \return tSirAbortScanStatus return status abort scan
2342
Jeff Johnson295189b2012-06-20 16:38:30 -07002343 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302344tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2345 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002346
2347/* ---------------------------------------------------------------------------
2348 \fn sme_GetCfgValidChannels
2349 \brief API to get valid channel list
2350 \param hHal - The handle returned by macOpen.
2351 \param aValidChannels - Pointer to the valid channel list
2352 \param len - valid channel list length
2353 \return eHalStatus
2354 ---------------------------------------------------------------------------*/
2355eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2356
2357#ifdef FEATURE_WLAN_SCAN_PNO
2358
2359/* ---------------------------------------------------------------------------
2360 \fn sme_SetPreferredNetworkList
2361 \brief API to set the Preferred Network List Offload feature.
2362 \param hHal - The handle returned by macOpen.
2363 \param pRequest - Pointer to the offload request.
2364 \return eHalStatus
2365 ---------------------------------------------------------------------------*/
2366eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2367
2368/* ---------------------------------------------------------------------------
2369 \fn sme_SetRSSIFilter
2370 \brief API to set RSSI Filter feature.
2371 \param hHal - The handle returned by macOpen.
2372 \param pRequest - Pointer to the offload request.
2373 \return eHalStatus
2374 ---------------------------------------------------------------------------*/
2375eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2376
2377/******************************************************************************
2378*
2379* Name: sme_PreferredNetworkFoundInd
2380*
2381* Description:
2382* Invoke Preferred Network Found Indication
2383*
2384* Parameters:
2385* hHal - HAL handle for device
2386* pMsg - found network description
2387*
2388* Returns: eHalStatus
2389*
2390******************************************************************************/
2391eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2392#endif // FEATURE_WLAN_SCAN_PNO
2393
2394/* ---------------------------------------------------------------------------
2395 \fn sme_SetPowerParams
2396 \brief API to set Power Parameters
2397 \param hHal - The handle returned by macOpen.
2398 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002399 \param forced - if true, not to be dropped silently in host, it must reach
2400 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2401 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002402 \return eHalStatus
2403 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002404eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002405
2406/* ---------------------------------------------------------------------------
2407 \fn sme_SetTxPerTracking
2408 \brief Set Tx PER tracking configuration parameters
2409 \param hHal - The handle returned by macOpen.
2410 \param pTxPerTrackingParam - Tx PER configuration parameters
2411 \return eHalStatus
2412 ---------------------------------------------------------------------------*/
2413eHalStatus sme_SetTxPerTracking (
2414 tHalHandle hHal,
2415 void (*pCallbackfn) (void *pCallbackContext),
2416 void *pCallbackContext,
2417 tpSirTxPerTrackingParam pTxPerTrackingParam);
2418
2419#ifdef WLAN_FEATURE_PACKET_FILTERING
2420/* ---------------------------------------------------------------------------
2421 \fn sme_ReceiveFilterSetFilter
2422 \brief API to set 8023 Multicast Address List
2423 \param hHal - The handle returned by macOpen.
2424 \param pMulticastAddrs - Pointer to the Multicast Address List
2425 \return eHalStatus
2426 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002427eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002428
2429/* ---------------------------------------------------------------------------
2430 \fn sme_ReceiveFilterSetFilter
2431 \brief API to set Receive Packet Filter
2432 \param hHal - The handle returned by macOpen.
2433 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2434 \return eHalStatus
2435 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002436eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2437 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002438
2439/* ---------------------------------------------------------------------------
2440 \fn sme_GetFilterMatchCount
2441 \brief API to get D0 PC Filter Match Count
2442 \param hHal - The handle returned by macOpen
2443 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2444 \param callbackContext - Cookie to be passed back during callback
2445 \return eHalStatus
2446 ---------------------------------------------------------------------------*/
2447eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2448 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002449 void *callbackContext,
2450 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002451
2452/* ---------------------------------------------------------------------------
2453 \fn sme_ReceiveFilterClearFilter
2454 \brief API to clear Receive Packet Filter
2455 \param hHal - The handle returned by macOpen.
2456 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2457 \return eHalStatus
2458 ---------------------------------------------------------------------------*/
2459eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002460 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2461 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002462#endif // WLAN_FEATURE_PACKET_FILTERING
2463/* ---------------------------------------------------------------------------
2464
2465 \fn sme_IsChannelValid
2466 \brief To check if the channel is valid for currently established domain
2467 This is a synchronous API.
2468
2469 \param hHal - The handle returned by macOpen.
2470 \param channel - channel to verify
2471
2472 \return TRUE/FALSE, TRUE if channel is valid
2473
2474 -------------------------------------------------------------------------------*/
2475tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2476
2477/* ---------------------------------------------------------------------------
2478 \fn sme_SetFreqBand
2479 \brief Used to set frequency band.
2480 \param hHal
2481 \eBand band value to be configured
2482 \- return eHalStatus
2483 -------------------------------------------------------------------------*/
2484eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2485
2486/* ---------------------------------------------------------------------------
2487 \fn sme_GetFreqBand
2488 \brief Used to get the current band settings.
2489 \param hHal
2490 \pBand pointer to hold the current band value
2491 \- return eHalStatus
2492 -------------------------------------------------------------------------*/
2493eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2494
2495/* ---------------------------------------------------------------------------
2496
2497 \fn sme_SetTxPerTracking
2498 \brief Set Tx PER tracking configuration parameters
2499 \param hHal - The handle returned by macOpen.
2500 \param pTxPerTrackingParam - Tx PER configuration parameters
2501 \return eHalStatus
2502 ---------------------------------------------------------------------------*/
2503eHalStatus sme_SetTxPerTracking (
2504 tHalHandle hHal,
2505 void (*pCallbackfn) (void *pCallbackContext),
2506 void *pCallbackContext,
2507 tpSirTxPerTrackingParam pTxPerTrackingParam);
2508
2509#ifdef WLAN_FEATURE_GTK_OFFLOAD
2510/* ---------------------------------------------------------------------------
2511 \fn sme_SetGTKOffload
2512 \brief API to set GTK offload feature.
2513 \param hHal - The handle returned by macOpen.
2514 \param pRequest - Pointer to the GTK offload request.
2515 \return eHalStatus
2516 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002517eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002518
2519/* ---------------------------------------------------------------------------
2520 \fn sme_GetGTKOffload
2521 \brief API to get GTK offload information.
2522 \param hHal - The handle returned by macOpen.
2523 \param pRequest - Pointer to the GTK offload response.
2524 \return eHalStatus
2525 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002526eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2527 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002528#endif // WLAN_FEATURE_GTK_OFFLOAD
2529
2530#ifdef WLAN_WAKEUP_EVENTS
2531eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2532#endif // WLAN_WAKEUP_EVENTS
2533
2534/* ---------------------------------------------------------------------------
2535 \fn sme_SetTxPerTracking
2536 \brief Set Tx PER tracking configuration parameters
2537 \param hHal - The handle returned by macOpen.
2538 \param pTxPerTrackingParam - Tx PER configuration parameters
2539 \return eHalStatus
2540 ---------------------------------------------------------------------------*/
2541eHalStatus sme_SetTxPerTracking (
2542 tHalHandle hHal,
2543 void (*pCallbackfn) (void *pCallbackContext),
2544 void *pCallbackContext,
2545 tpSirTxPerTrackingParam pTxPerTrackingParam);
2546
2547
2548//return frequency for a particular channel
2549tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2550
2551tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2552
2553#if defined WLAN_FEATURE_P2P_INTERNAL
2554
2555eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2556
2557/* ---------------------------------------------------------------------------
2558 \fn sme_p2pFlushDeviceList
2559 \brief Remove cached P2P result from scan results
2560 \param hHal - The handle returned by macOpen.
2561 \param HDDSessionId - HDD's sessionId. Currently unused.
2562 \return eHalStatus
2563 ---------------------------------------------------------------------------*/
2564eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2565
2566eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2567 tCsrScanResultFilter *pFilter);
2568
2569#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2570
2571/* ---------------------------------------------------------------------------
2572 \fn sme_SetMaxTxPower
2573 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2574 setting will not persist over reboots
2575 \param hHal
2576 \param pBssid BSSID to set the power cap for
2577 \param pBssid pSelfMacAddress self MAC Address
2578 \param pBssid power to set in dB
2579 \- return eHalStatus
2580 -------------------------------------------------------------------------*/
2581eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2582 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2583
Jeff Johnson295189b2012-06-20 16:38:30 -07002584/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002585 \fn sme_SetMaxTxPowerPerBand
2586 \brief Used to set the Maximum Transmit Power for
2587 specific band dynamically. Note: this setting will not persist over reboots
2588 \param band
2589 \param power to set in dB
2590 \- return eHalStatus
2591 -------------------------------------------------------------------------*/
2592eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2593
2594/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002595
schang86c22c42013-03-13 18:41:24 -07002596 \fn sme_SetTxPower
2597
2598 \brief Set Transmit Power dynamically. Note: this setting will
2599 not persist over reboots.
2600
2601 \param hHal
2602 \param sessionId Target Session ID
2603 \param mW power to set in mW
2604 \- return eHalStatus
2605
2606 -------------------------------------------------------------------------------*/
2607eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2608
2609/* ---------------------------------------------------------------------------
2610
Jeff Johnson295189b2012-06-20 16:38:30 -07002611 \fn sme_HideSSID
2612
2613 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2614 not persist over reboots.
2615
2616 \param hHal
2617 \param sessionId
2618 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2619 \- return eHalStatus
2620
2621 -------------------------------------------------------------------------------*/
2622eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002623
2624/* ---------------------------------------------------------------------------
2625
2626 \fn sme_SetTmLevel
2627 \brief Set Thermal Mitigation Level to RIVA
2628 \param hHal - The handle returned by macOpen.
2629 \param newTMLevel - new Thermal Mitigation Level
2630 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002631 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002632 ---------------------------------------------------------------------------*/
2633eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2634
2635/*---------------------------------------------------------------------------
2636
2637 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2638 Host and FW.
2639
2640 \param hHal - HAL handle for device
2641
2642 \return NONE
2643
2644---------------------------------------------------------------------------*/
2645void sme_featureCapsExchange(tHalHandle hHal);
2646
Jeff Johnsond13512a2012-07-17 11:42:19 -07002647/*---------------------------------------------------------------------------
2648
Yathish9f22e662012-12-10 14:21:35 -08002649 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2650 between in Host.
2651
2652 \param hHal - HAL handle for device
2653
2654 \return NONE
2655
2656---------------------------------------------------------------------------*/
2657void sme_disableFeatureCapablity(tANI_U8 feature_index);
2658
2659/*---------------------------------------------------------------------------
2660
Jeff Johnsond13512a2012-07-17 11:42:19 -07002661 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2662 country code
2663 Host and FW.
2664
2665 \param hHal - HAL handle for device
2666 \param pCountry - pointer to country code
2667
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002668 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002669
2670 ---------------------------------------------------------------------------*/
2671eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2672
2673/*---------------------------------------------------------------------------
2674
2675 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2676 country code.
2677
2678 \param hHal - HAL handle for device
2679 \param pCountry - pointer to country code
2680
2681 \return Success or failure
2682
2683 ---------------------------------------------------------------------------*/
2684eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2685
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002686/* ---------------------------------------------------------------------------
2687 \fn sme_transportDebug
2688 \brief Dynamically monitoring Transport channels
2689 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002690 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002691 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002692 \param toggleStallDetect Enable stall detect feature
2693 This feature will take effect to data performance
2694 Not integrate till fully verification
2695 \- return NONE
2696 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002697void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002698
Kiran4a17ebe2013-01-31 10:43:43 -08002699/* ---------------------------------------------------------------------------
2700 \fn sme_ResetPowerValuesFor5G
2701 \brief Reset the power values for 5G band with NV power values.
2702 \param hHal - HAL handle for device
2703 \- return NONE
2704 -------------------------------------------------------------------------*/
2705void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2706
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002707#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002708/* ---------------------------------------------------------------------------
2709 \fn sme_UpdateRoamPrefer5GHz
2710 \brief enable/disable Roam prefer 5G runtime option
2711 This function is called through dynamic setConfig callback function
2712 to configure the Roam prefer 5G runtime option
2713 \param hHal - HAL handle for device
2714 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2715 \- return Success or failure
2716 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002717eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002718
2719/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002720 \fn sme_setRoamIntraBand
2721 \brief enable/disable Intra band roaming
2722 This function is called through dynamic setConfig callback function
2723 to configure the intra band roaming
2724 \param hHal - HAL handle for device
2725 \param nRoamIntraBand Enable/Disable Intra band roaming
2726 \- return Success or failure
2727 -------------------------------------------------------------------------*/
2728eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2729
2730/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002731 \fn sme_UpdateRoamScanNProbes
2732 \brief function to update roam scan N probes
2733 This function is called through dynamic setConfig callback function
2734 to update roam scan N probes
2735 \param hHal - HAL handle for device
2736 \param nProbes number of probe requests to be sent out
2737 \- return Success or failure
2738 -------------------------------------------------------------------------*/
2739eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2740
2741/* ---------------------------------------------------------------------------
2742 \fn sme_UpdateRoamScanHomeAwayTime
2743 \brief function to update roam scan Home away time
2744 This function is called through dynamic setConfig callback function
2745 to update roam scan home away time
2746 \param hHal - HAL handle for device
2747 \param nRoamScanAwayTime Scan home away time
2748 \- return Success or failure
2749 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002750eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2751 const v_U16_t nRoamScanHomeAwayTime,
2752 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002753
2754/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002755 \fn sme_getRoamIntraBand
2756 \brief get Intra band roaming
2757 \param hHal - HAL handle for device
2758 \- return Success or failure
2759 -------------------------------------------------------------------------*/
2760v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2761
2762/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002763 \fn sme_getRoamScanNProbes
2764 \brief get N Probes
2765 \param hHal - HAL handle for device
2766 \- return Success or failure
2767 -------------------------------------------------------------------------*/
2768v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2769
2770/* ---------------------------------------------------------------------------
2771 \fn sme_getRoamScanHomeAwayTime
2772 \brief get Roam scan home away time
2773 \param hHal - HAL handle for device
2774 \- return Success or failure
2775 -------------------------------------------------------------------------*/
2776v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2777
2778/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002779 \fn sme_UpdateImmediateRoamRssiDiff
2780 \brief Update nImmediateRoamRssiDiff
2781 This function is called through dynamic setConfig callback function
2782 to configure nImmediateRoamRssiDiff
2783 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2784 \param hHal - HAL handle for device
2785 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2786 candidate and current AP.
2787 \- return Success or failure
2788 -------------------------------------------------------------------------*/
2789
2790eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002791
Srinivas Girigowdade697412013-02-14 16:31:48 -08002792/* ---------------------------------------------------------------------------
2793 \fn sme_UpdateRoamRssiDiff
2794 \brief Update RoamRssiDiff
2795 This function is called through dynamic setConfig callback function
2796 to configure RoamRssiDiff
2797 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2798 \param hHal - HAL handle for device
2799 \param RoamRssiDiff - minimum rssi difference between potential
2800 candidate and current AP.
2801 \- return Success or failure
2802 -------------------------------------------------------------------------*/
2803
2804eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2805
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002806/*--------------------------------------------------------------------------
2807 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2808 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2809 isFastTransitionEnabled.
2810 This is a synchronuous call
2811 \param hHal - The handle returned by macOpen.
2812 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2813 Other status means SME is failed to update isFastTransitionEnabled.
2814 \sa
2815 --------------------------------------------------------------------------*/
2816
2817eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2818 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002819
2820/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002821 \fn sme_UpdateWESMode
2822 \brief Update WESMode
2823 This function is called through dynamic setConfig callback function
2824 to configure isWESModeEnabled
2825 \param hHal - HAL handle for device
2826 \param isWESModeEnabled - Enable/Disable WES Mode
2827 \- return Success or failure
2828 -------------------------------------------------------------------------*/
2829eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2830
2831/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002832 \fn sme_SetRoamScanControl
2833 \brief Set roam scan control
2834 This function is called to set roam scan control
2835 if roam scan control is set to 0, roaming scan cache is cleared
2836 any value other than 0 is treated as invalid value
2837 \param hHal - HAL handle for device
2838 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2839 Other status means SME failure to update
2840 -------------------------------------------------------------------------*/
2841eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002842#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002843
2844#ifdef FEATURE_WLAN_LFR
2845/*--------------------------------------------------------------------------
2846 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002847 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002848 isFastRoamIniFeatureEnabled.
2849 This is a synchronuous call
2850 \param hHal - The handle returned by macOpen.
2851 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2852 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2853 \sa
2854 --------------------------------------------------------------------------*/
2855
Srinivas Girigowdade697412013-02-14 16:31:48 -08002856eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002857 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002858
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002859/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302860 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2861 When Supplicant issue enabled / disable fwr based roaming on the basis
2862 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2863
2864 This is a synchronous call
2865 \param hHal - The handle returned by macOpen.
2866 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2867 Other status means SME is failed to (enabled/disabled) offload scan.
2868 \sa
2869 --------------------------------------------------------------------------*/
2870
2871eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2872 const v_BOOL_t isFastRoamEnabled);
2873
2874/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002875 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2876 Enable/disable LFR MAWC support at runtime
2877 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2878 isMAWCIniFeatureEnabled.
2879 This is a synchronous call
2880 \param hHal - The handle returned by macOpen.
2881 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2882 Other status means SME is failed to update MAWCEnabled.
2883 \sa
2884 --------------------------------------------------------------------------*/
2885eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2886 const v_BOOL_t MAWCEnabled);
2887
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002888
2889#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2890/*--------------------------------------------------------------------------
2891 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2892 This is a synchronuous call
2893 \param hHal - The handle returned by macOpen.
2894 \return eHAL_STATUS_SUCCESS
2895 Other status means SME is failed
2896 \sa
2897 --------------------------------------------------------------------------*/
2898
2899eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2900 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2901#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002902#endif /* FEATURE_WLAN_LFR */
2903
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002904#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002905/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002906 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002907 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002908 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002909 This is a synchronuous call
2910 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002911 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2912 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002913 \sa
2914 --------------------------------------------------------------------------*/
2915
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002916eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2917 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002918
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002919#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002920
2921/*--------------------------------------------------------------------------
2922 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2923 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2924 fEnableFwRssiMonitoring.
2925 This is a synchronuous call
2926 \param hHal - The handle returned by macOpen.
2927 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2928 Other status means SME is failed to update
2929 \sa
2930 --------------------------------------------------------------------------*/
2931
2932eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2933 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002934
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002935#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002936/*--------------------------------------------------------------------------
2937 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2938 This is a synchronuous call
2939 \param hHal - The handle returned by macOpen.
2940 \return eHAL_STATUS_SUCCESS - SME update config successful.
2941 Other status means SME is failed to update
2942 \sa
2943 --------------------------------------------------------------------------*/
2944eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2945 v_U8_t neighborLookupRssiThreshold);
2946
2947/*--------------------------------------------------------------------------
2948 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2949 This is a synchronuous call
2950 \param hHal - The handle returned by macOpen.
2951 \return eHAL_STATUS_SUCCESS - SME update config successful.
2952 Other status means SME is failed to update
2953 \sa
2954 --------------------------------------------------------------------------*/
2955eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2956 v_U8_t neighborReassocRssiThreshold);
2957
2958/*--------------------------------------------------------------------------
2959 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2960 This is a synchronuous call
2961 \param hHal - The handle returned by macOpen.
2962 \return eHAL_STATUS_SUCCESS - SME update config successful.
2963 Other status means SME is failed to update
2964 \sa
2965 --------------------------------------------------------------------------*/
2966v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2967
2968/*--------------------------------------------------------------------------
2969 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2970 This is a synchronuous call
2971 \param hHal - The handle returned by macOpen.
2972 \return eHAL_STATUS_SUCCESS - SME update config successful.
2973 Other status means SME is failed to update
2974 \sa
2975 --------------------------------------------------------------------------*/
2976eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2977 v_U16_t neighborScanResultsRefreshPeriod);
2978
2979/*--------------------------------------------------------------------------
2980 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2981 This is a synchronuous call
2982 \param hHal - The handle returned by macOpen.
2983 \return eHAL_STATUS_SUCCESS - SME update config successful.
2984 Other status means SME is failed to update
2985 \sa
2986 --------------------------------------------------------------------------*/
2987v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2988
2989/*--------------------------------------------------------------------------
2990 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2991 This is a synchronuous call
2992 \param hHal - The handle returned by macOpen.
2993 \return eHAL_STATUS_SUCCESS - SME update config successful.
2994 Other status means SME is failed to update
2995 \sa
2996 --------------------------------------------------------------------------*/
2997v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2998
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002999/* ---------------------------------------------------------------------------
3000 \fn sme_UpdateEmptyScanRefreshPeriod
3001 \brief Update nEmptyScanRefreshPeriod
3002 This function is called through dynamic setConfig callback function
3003 to configure nEmptyScanRefreshPeriod
3004 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3005 \param hHal - HAL handle for device
3006 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3007 \- return Success or failure
3008 -------------------------------------------------------------------------*/
3009eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3010
3011/* ---------------------------------------------------------------------------
3012 \fn sme_setNeighborScanMinChanTime
3013 \brief Update nNeighborScanMinChanTime
3014 This function is called through dynamic setConfig callback function
3015 to configure gNeighborScanChannelMinTime
3016 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3017 \param hHal - HAL handle for device
3018 \param nNeighborScanMinChanTime - Channel minimum dwell time
3019 \- return Success or failure
3020 -------------------------------------------------------------------------*/
3021eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3022
3023/* ---------------------------------------------------------------------------
3024 \fn sme_setNeighborScanMaxChanTime
3025 \brief Update nNeighborScanMaxChanTime
3026 This function is called through dynamic setConfig callback function
3027 to configure gNeighborScanChannelMaxTime
3028 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3029 \param hHal - HAL handle for device
3030 \param nNeighborScanMinChanTime - Channel maximum dwell time
3031 \- return Success or failure
3032 -------------------------------------------------------------------------*/
3033eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3034
3035/* ---------------------------------------------------------------------------
3036 \fn sme_getNeighborScanMinChanTime
3037 \brief get neighbor scan min channel time
3038 \param hHal - The handle returned by macOpen.
3039 \return v_U16_t - channel min time value
3040 -------------------------------------------------------------------------*/
3041v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3042
3043/* ---------------------------------------------------------------------------
3044 \fn sme_getNeighborScanMaxChanTime
3045 \brief get neighbor scan max channel time
3046 \param hHal - The handle returned by macOpen.
3047 \return v_U16_t - channel max time value
3048 -------------------------------------------------------------------------*/
3049v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3050
3051/* ---------------------------------------------------------------------------
3052 \fn sme_setNeighborScanPeriod
3053 \brief Update nNeighborScanPeriod
3054 This function is called through dynamic setConfig callback function
3055 to configure nNeighborScanPeriod
3056 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3057 \param hHal - HAL handle for device
3058 \param nNeighborScanPeriod - neighbor scan period
3059 \- return Success or failure
3060 -------------------------------------------------------------------------*/
3061eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3062
3063/* ---------------------------------------------------------------------------
3064 \fn sme_getNeighborScanPeriod
3065 \brief get neighbor scan period
3066 \param hHal - The handle returned by macOpen.
3067 \return v_U16_t - neighbor scan period
3068 -------------------------------------------------------------------------*/
3069v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3070
3071#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003072
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003073#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003074/*--------------------------------------------------------------------------
3075 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3076 This is a synchronuous call
3077 \param hHal - The handle returned by macOpen.
3078 \return eHAL_STATUS_SUCCESS - SME update config successful.
3079 Other status means SME is failed to update
3080 \sa
3081 --------------------------------------------------------------------------*/
3082v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3083
3084/*--------------------------------------------------------------------------
3085 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3086 This is a synchronuous call
3087 \param hHal - The handle returned by macOpen.
3088 \return eHAL_STATUS_SUCCESS - SME update config successful.
3089 Other status means SME is failed to update
3090 \sa
3091 --------------------------------------------------------------------------*/
3092eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3093 tANI_U8 numChannels);
3094
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003095#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003096/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003097 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003098 This is a synchronuous call
3099 \param hHal - The handle returned by macOpen.
3100 \return eHAL_STATUS_SUCCESS - SME update config successful.
3101 Other status means SME is failed to update
3102 \sa
3103 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003104eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003105 tANI_U8 *pChannelList,
3106 tANI_U8 numChannels);
3107#endif
3108
Srinivas Girigowdade697412013-02-14 16:31:48 -08003109/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003110 \brief sme_getRoamScanChannelList() - get roam scan channel list
3111 This is a synchronuous call
3112 \param hHal - The handle returned by macOpen.
3113 \return eHAL_STATUS_SUCCESS - SME update config successful.
3114 Other status means SME is failed to update
3115 \sa
3116 --------------------------------------------------------------------------*/
3117eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3118 tANI_U8 *pNumChannels);
3119
3120/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003121 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003122 This is a synchronuous call
3123 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003124 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003125 FALSE (0) - if feature is disabled (compile or runtime)
3126 \sa
3127 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003128tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003129
3130/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003131 \brief sme_getWESMode() - getWES Mode
3132 This is a synchronous call
3133 \param hHal - The handle returned by macOpen.
3134 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3135 \sa
3136 --------------------------------------------------------------------------*/
3137v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3138
3139/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003140 \brief sme_GetRoamScanControl() - get scan control
3141 This is a synchronous call
3142 \param hHal - The handle returned by macOpen.
3143 \return v_BOOL_t - Enabled(1)/Disabled(0)
3144 \sa
3145 --------------------------------------------------------------------------*/
3146v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3147
3148/* ---------------------------------------------------------------------------
3149 \fn sme_UpdateEmptyScanRefreshPeriod
3150 \brief Update nnEmptyScanRefreshPeriod
3151 This function is called through dynamic setConfig callback function
3152 to configure nnEmptyScanRefreshPeriod
3153 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3154 \param hHal - HAL handle for device
3155 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3156 \- return Success or failure
3157 -------------------------------------------------------------------------*/
3158
3159/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003160 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3161 This is a synchronuous call
3162 \param hHal - The handle returned by macOpen.
3163 \return TRUE (1) - if the feature is enabled
3164 FALSE (0) - if feature is disabled (compile or runtime)
3165 \sa
3166 --------------------------------------------------------------------------*/
3167tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3168
3169/*--------------------------------------------------------------------------
3170 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3171 This is a synchronuous call
3172 \param hHal - The handle returned by macOpen.
3173 \return TRUE (1) - if the feature is enabled
3174 FALSE (0) - if feature is disabled (compile or runtime)
3175 \sa
3176 --------------------------------------------------------------------------*/
3177tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3178
Srinivas Girigowdade697412013-02-14 16:31:48 -08003179#endif
3180
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003181#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3182/*--------------------------------------------------------------------------
3183 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3184 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3185 gRoamScanOffloadEnabled.
3186 This is a synchronous call
3187 \param hHal - The handle returned by macOpen.
3188 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3189 Other status means SME is failed to update.
3190 \sa
3191 --------------------------------------------------------------------------*/
3192
3193eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3194#endif
3195
3196
Srinivas Girigowdade697412013-02-14 16:31:48 -08003197/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003198 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303199 \brief Check if a feature is enabled by FW
3200
3201 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003202 A value from enum placeHolderInCapBitmap
3203
3204 \- return 1/0 (TRUE/FALSE)
3205 -------------------------------------------------------------------------*/
3206tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303207
3208/* ---------------------------------------------------------------------------
3209 \fn sme_IsFeatureSupportedByDriver
3210 \brief Check if a feature is enabled by driver
3211
3212 \param featEnumValue - Enumeration value of the feature to be checked.
3213 A value from enum placeHolderInCapBitmap
3214
3215 \- return 1/0 (TRUE/FALSE)
3216 -------------------------------------------------------------------------*/
3217tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3218
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003219#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303220
3221/* ---------------------------------------------------------------------------
3222 \fn sme_SendTdlsLinkEstablishParams
3223 \brief API to send TDLS Link Establishment Parameters.
3224
3225 \param peerMac - peer's Mac Adress.
3226 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3227 \- return VOS_STATUS_SUCCES
3228 -------------------------------------------------------------------------*/
3229
3230VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303231 tANI_U8 sessionId,
3232#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3233 const tSirMacAddr peerMac,
3234#else
3235 tSirMacAddr peerMac,
3236#endif
3237 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303238
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003239/* ---------------------------------------------------------------------------
3240 \fn sme_SendTdlsMgmtFrame
3241 \brief API to send TDLS management frames.
3242
3243 \param peerMac - peer's Mac Adress.
3244 \param frame_type - Type of TDLS mgmt frame to be sent.
3245 \param dialog - dialog token used in the frame.
3246 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303247 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003248 \param buf - additional IEs to be included
3249 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003250 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003251 \- return VOS_STATUS_SUCCES
3252 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303253VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3254#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3255 const tSirMacAddr peerMac,
3256#else
3257 tSirMacAddr peerMac,
3258#endif
3259 tANI_U8 frame_type, tANI_U8 dialog,
3260 tANI_U16 status, tANI_U32 peerCapability,
3261 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003262/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003263 \fn sme_ChangeTdlsPeerSta
3264 \brief API to Update TDLS peer sta parameters.
3265
3266 \param peerMac - peer's Mac Adress.
3267 \param staParams - Peer Station Parameters.
3268 \- return VOS_STATUS_SUCCES
3269 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303270VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3271#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3272 const tSirMacAddr peerMac,
3273#else
3274 tSirMacAddr peerMac,
3275#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003276 tCsrStaParams *pstaParams);
3277/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003278 \fn sme_AddTdlsPeerSta
3279 \brief API to Add TDLS peer sta entry.
3280
3281 \param peerMac - peer's Mac Adress.
3282 \- return VOS_STATUS_SUCCES
3283 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303284VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3285#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3286 const tSirMacAddr peerMac
3287#else
3288 tSirMacAddr peerMac
3289#endif
3290 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003291/* ---------------------------------------------------------------------------
3292 \fn sme_DeleteTdlsPeerSta
3293 \brief API to Delete TDLS peer sta entry.
3294
3295 \param peerMac - peer's Mac Adress.
3296 \- return VOS_STATUS_SUCCES
3297 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303298VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3299#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3300 const tSirMacAddr peerMac
3301#else
3302 tSirMacAddr peerMac
3303#endif
3304 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003305/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003306 \fn sme_SetTdlsPowerSaveProhibited
3307 \API to set/reset the isTdlsPowerSaveProhibited.
3308
3309 \- return void
3310 -------------------------------------------------------------------------*/
3311void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003312#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303313/* ---------------------------------------------------------------------------
3314 \fn sme_IsPmcBmps
3315 \brief API to Check if PMC state is BMPS.
3316
3317 \- return v_BOOL_t
3318 -------------------------------------------------------------------------*/
3319v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3320
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003321eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003322
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303323/* ---------------------------------------------------------------------------
3324 \fn sme_UpdateDFSRoamMode
3325 \brief Update DFS roam scan mode
3326 This function is called to configure allowDFSChannelRoam
3327 dynamically
3328 \param hHal - HAL handle for device
3329 \param allowDFSChannelRoam - DFS roaming scan mode
3330 mode 0 disable roam scan on DFS channels
3331 mode 1 enables roam scan (passive/active) on DFS channels
3332 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3333 successfully.
3334 Other status means SME failed to update DFS roaming scan config.
3335 \sa
3336 -------------------------------------------------------------------------*/
3337eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3338
3339/* ---------------------------------------------------------------------------
3340 \fn sme_UpdateDFSScanMode
3341 \brief Update DFS scan mode
3342 This function is called to configure fEnableDFSChnlScan.
3343 \param hHal - HAL handle for device
3344 \param dfsScanMode - DFS scan mode
3345 mode 0 disable scan on DFS channels
3346 mode 1 enables passive scan on DFS channels
3347 mode 2 enables active scan on DFS channels for static list
3348 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3349 successfully.
3350 Other status means SME failed to update DFS scan config.
3351 \sa
3352 -------------------------------------------------------------------------*/
3353eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3354
3355/*--------------------------------------------------------------------------
3356 \brief sme_GetDFSScanMode() - get DFS scan mode
3357 \param hHal - The handle returned by macOpen.
3358 \return DFS scan mode
3359 mode 0 disable scan on DFS channels
3360 mode 1 enables passive scan on DFS channels
3361 mode 2 enables active scan on DFS channels for static list
3362 \sa
3363 --------------------------------------------------------------------------*/
3364v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3365
3366/* ---------------------------------------------------------------------------
3367 \fn sme_HandleDFSChanScan
3368 \brief Gets Valid channel list and updates scan control list according to
3369 dfsScanMode
3370 \param hHal - HAL handle for device
3371 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3372 Otherwise eHAL_STATUS_SUCCESS -
3373 \sa
3374 -------------------------------------------------------------------------*/
3375eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3376
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003377/*
3378 * SME API to enable/disable WLAN driver initiated SSR
3379 */
3380void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3381
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303382/* ---------------------------------------------------------------------------
3383
3384 \fn sme_SetPhyMode
3385
3386 \brief Changes the PhyMode.
3387
3388 \param hHal - The handle returned by macOpen.
3389
3390 \param phyMode new phyMode which is to set
3391
3392 \return eHalStatus SUCCESS.
3393
3394 -------------------------------------------------------------------------------*/
3395eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3396
3397/* ---------------------------------------------------------------------------
3398
3399 \fn sme_GetPhyMode
3400
3401 \brief gets current PhyMode.
3402
3403 \param hHal - The handle returned by macOpen.
3404
3405 \return eHalStatus PhyMode
3406
3407 -------------------------------------------------------------------------------*/
3408eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3409
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003410/*
3411 * SME API to determine the channel bonding mode
3412 */
3413VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3414
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003415#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3416/*--------------------------------------------------------------------------
3417 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3418 from CSR.
3419 This is a synchronous call
3420 \param hHal - The handle returned by macOpen
3421 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3422 BSSID, channel etc.)
3423 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3424 Other status means SME is failed to send the request.
3425 \sa
3426 --------------------------------------------------------------------------*/
3427
3428eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3429#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003430/*--------------------------------------------------------------------------
3431 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3432 is any connected session .
3433 This is a synchronous call
3434 \param hHal - The handle returned by macOpen
3435 \return VOS_STATUS - SME passed the request to CSR successfully.
3436 Other status means SME is failed to send the request.
3437 \sa
3438 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003439VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003440
Agarwal Ashish57e84372014-12-05 18:26:53 +05303441/*--------------------------------------------------------------------------
3442 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3443 is any connected session .
3444 This is a synchronous call
3445 \param hHal - The handle returned by macOpen
3446 \return VOS_STATUS - SME passed the request to CSR successfully.
3447 Other status means SME is failed to send the request.
3448 \sa
3449 --------------------------------------------------------------------------*/
3450VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3451
Leo Chang9056f462013-08-01 19:21:11 -07003452#ifdef FEATURE_WLAN_LPHB
3453/* ---------------------------------------------------------------------------
3454 \fn sme_LPHBConfigReq
3455 \API to make configuration LPHB within FW.
3456 \param hHal - The handle returned by macOpen
3457 \param lphdReq - LPHB request argument by client
3458 \param pCallbackfn - LPHB timeout notification callback function pointer
3459 \- return Configuration message posting status, SUCCESS or Fail
3460 -------------------------------------------------------------------------*/
3461eHalStatus sme_LPHBConfigReq(
3462 tHalHandle hHal,
3463 tSirLPHBReq *lphdReq,
3464 void (*pCallbackfn)(void *pAdapter, void *indParam));
3465#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003466
3467/* ---------------------------------------------------------------------------
3468 \fn sme_AddPeriodicTxPtrn
3469 \brief API to Periodic TX Pattern Offload feature
3470 \param hHal - The handle returned by macOpen
3471 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3472 \return eHalStatus
3473 ---------------------------------------------------------------------------*/
3474eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3475 *addPeriodicTxPtrnParams);
3476
3477/* ---------------------------------------------------------------------------
3478 \fn sme_DelPeriodicTxPtrn
3479 \brief API to Periodic TX Pattern Offload feature
3480 \param hHal - The handle returned by macOpen
3481 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3482 \return eHalStatus
3483 ---------------------------------------------------------------------------*/
3484eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3485 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003486/*--------------------------------------------------------------------------
3487 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3488 scan parameter.
3489 This is a synchronous call
3490 \param hHal - The handle returned by macOpen
3491 \return None.
3492 \sa
3493 --------------------------------------------------------------------------*/
3494void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3495 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303496
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003497/* ---------------------------------------------------------------------------
3498 \fn sme_SendRateUpdateInd
3499 \brief API to Update rate
3500 \param hHal - The handle returned by macOpen
3501 \param rateUpdateParams - Pointer to rate update params
3502 \return eHalStatus
3503 ---------------------------------------------------------------------------*/
3504eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3505
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303506/*
3507 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3508 * triggers
3509 * return status
3510*/
3511eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3512 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303513 tSmeFastRoamTrigger fastRoamTrig,
3514 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303515
3516eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303517#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3518 const tANI_U8 *pBSSId,
3519#else
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303520 tANI_U8 *pBSSId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303521#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303522 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003523
3524void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303525
3526#ifdef FEATURE_WLAN_BATCH_SCAN
3527/* ---------------------------------------------------------------------------
3528 \fn sme_SetBatchScanReq
3529 \brief API to set batch scan request in FW
3530 \param hHal - The handle returned by macOpen.
3531 \param pRequest - Pointer to the batch request.
3532 \param sessionId - session ID
3533 \param callbackRoutine - HDD callback which needs to be invoked after
3534 getting set batch scan response from FW
3535 \param callbackContext - pAdapter context
3536 \return eHalStatus
3537 ---------------------------------------------------------------------------*/
3538eHalStatus
3539sme_SetBatchScanReq
3540(
3541 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3542 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3543 void *callbackContext
3544);
3545
3546/* ---------------------------------------------------------------------------
3547 \fn sme_TriggerBatchScanResultInd
3548 \brief API to trigger batch scan result indications from from FW
3549 \param hHal - The handle returned by macOpen.
3550 \param pRequest - Pointer to get batch request.
3551 \param sessionId - session ID
3552 \param callbackRoutine - HDD callback which needs to be invoked after
3553 getting get batch scan response from FW
3554 \param callbackContext - pAdapter context
3555 \return eHalStatus
3556 ---------------------------------------------------------------------------*/
3557eHalStatus
3558sme_TriggerBatchScanResultInd
3559(
3560 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3561 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3562 void *callbackContext
3563);
3564
3565/* ---------------------------------------------------------------------------
3566 \fn sme_StopBatchScanInd
3567 \brief API to stop batch scan request in FW
3568 \param hHal - The handle returned by macOpen.
3569 \param pRequest - Pointer to stop batch indication
3570 \return eHalStatus
3571 ---------------------------------------------------------------------------*/
3572eHalStatus
3573sme_StopBatchScanInd
3574(
3575 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3576);
3577
3578#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003579
3580#ifdef FEATURE_WLAN_CH_AVOID
3581/* ---------------------------------------------------------------------------
3582 \fn sme_AddChAvoidCallback
3583 \brief Used to plug in callback function
3584 Which notify channel may not be used with SAP or P2PGO mode.
3585 Notification come from FW.
3586 \param hHal
3587 \param pCallbackfn : callback function pointer should be plugged in
3588 \- return eHalStatus
3589 -------------------------------------------------------------------------*/
3590eHalStatus sme_AddChAvoidCallback
3591(
3592 tHalHandle hHal,
3593 void (*pCallbackfn)(void *pAdapter, void *indParam)
3594);
3595#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003596eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303597
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303598/* ---------------------------------------------------------------------------
3599 \fn sme_requestTypetoString
3600 \brief API to convert requestType enum values
3601 to string.
3602 ---------------------------------------------------------------------------*/
3603const char * sme_requestTypetoString(const v_U8_t requestType);
3604/* ---------------------------------------------------------------------------
3605 \fn sme_PmcStatetoString
3606 \brief API to convert PmcState enum values
3607 to string.
3608 ---------------------------------------------------------------------------*/
3609const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303610
3611eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3612
Agarwal Ashish5e414792014-06-08 15:25:23 +05303613tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303614
3615// tdlsoffchan
3616VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3617 tANI_U8 sessionId,
3618 tSirMacAddr peerMac,
3619 tANI_S32 tdlsOffCh,
3620 tANI_S32 tdlsOffChBwOffset,
3621 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303622eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3623 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303624void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303625
3626void sme_resetCoexEevent(tHalHandle hHal);
3627
Peng Xu117eab42014-09-25 13:33:27 +05303628tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3629tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303630#ifdef WLAN_FEATURE_AP_HT40_24G
3631void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3632 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303633eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3634 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303635#endif
Peng Xu117eab42014-09-25 13:33:27 +05303636
Agarwal Ashish738843c2014-09-25 12:27:56 +05303637void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3638
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303639/* HDD Callback function */
3640typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3641
3642eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3643 u8 *pCmd,
3644 int length,
3645 pEncryptMsgRSPCb encCB);
3646
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303647/* ---------------------------------------------------------------------------
3648 \fn sme_RegisterBtCoexTDLSCallback
3649 \brief Used to plug in callback function
3650 Which notify btcoex on or off.
3651 Notification come from FW.
3652 \param hHal
3653 \param pCallbackfn : callback function pointer should be plugged in
3654 \- return eHalStatus
3655 -------------------------------------------------------------------------*/
3656eHalStatus sme_RegisterBtCoexTDLSCallback
3657(
3658 tHalHandle hHal,
3659 void (*pCallbackfn)(void *pAdapter, int)
3660);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303661
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303662/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303663 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303664
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303665 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303666
3667 \param hHal - The handle returned by macOpen.
3668
3669 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3670 eANI_BOOLEAN_FALSE otherwise
3671---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303672tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303673
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303674/* ---------------------------------------------------------------------------
3675
3676 \fn sme_IsTdlsOffChannelValid
3677 \brief To check if the channel is valid for currently established domain
3678 This is a synchronous API.
3679
3680 \param hHal - The handle returned by macOpen.
3681 \param channel - channel to verify
3682
3683 \return TRUE/FALSE, TRUE if channel is valid
3684
3685 -------------------------------------------------------------------------------*/
3686tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3687
Mukul Sharma4be88422015-03-09 20:29:07 +05303688/* --------------------------------------------------------------------------
3689
3690 \fn sme_IsCoexScoIndicationSet
3691 \brief To check if the BTC module in fwr has sent the SCO
3692 indication to host or not
3693
3694 \param hHal - The handle returned by macOpen.
3695 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3696
3697 --------------------------------------------------------------------------*/
3698tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3699
Abhishek Singh01c73d12015-03-12 15:13:44 +05303700eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3701 tANI_U32 iniNumBuffAdvert,
3702 tANI_U32 set_value);
3703
Mukul Sharma45063942015-04-01 20:07:59 +05303704void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303705
3706/* ---------------------------------------------------------------------------
3707 \fn sme_SetTdls2040BSSCoexistence
3708 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3709
3710 \param isEnabled - Enable or Disable.
3711 \- return VOS_STATUS_SUCCES
3712 -------------------------------------------------------------------------*/
3713eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3714
Abhishek Singh41988ba2015-05-25 19:42:29 +05303715/* ---------------------------------------------------------------------------
3716 \fn sme_SetRtsCtsHtVht
3717 \brief API to to enable/disable RTS/CTS for different modes.
3718
3719 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3720 \- return VOS_STATUS_SUCCES if INdication is posted to
3721 WDA else return eHAL_STATUS_FAILURE
3722 -------------------------------------------------------------------------*/
3723eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3724
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303725tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
3726 tANI_U8 fcc_constraint);
3727
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303728eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303729eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
3730 tANI_U32 indicator, tANI_U32 reason_code);
3731
Mahesh A Saptasagarbeca12c2015-09-07 16:21:06 +05303732eHalStatus sme_enableDisableChanAvoidIndEvent(tHalHandle hHal,
3733 tANI_U8 set_value);
3734
Jeff Johnson295189b2012-06-20 16:38:30 -07003735#endif //#if !defined( __SME_API_H )