blob: 593f5ab1cd6ae98db0306ae035f4fa7c00b4bd4f [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
Sushant Kaushik33200572015-08-05 16:46:20 +053081#define SME_PER_PKT_STATS 64
Jeff Johnson295189b2012-06-20 16:38:30 -070082
83#define SME_INVALID_COUNTRY_CODE "XX"
84
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070085//Macro to disable split scan
86#define SME_DISABLE_SPLIT_SCAN 255
Padma, Santhosh Kumar859d3712014-11-13 18:00:41 +053087
88//Macro to indicate invalid no of tspecs
89#define INVALID_TSPEC 100
90
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +053091#define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \
92 reg_info_1 &= 0xff00ffff; \
93 reg_info_1 |= ((val & 0xff) << 16); \
94} while(0)
95
96#define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \
97 reg_info_2 &= 0xffff00ff; \
98 reg_info_2 |= ((val & 0xff) << 8); \
99} while(0)
100
Jeff Johnson295189b2012-06-20 16:38:30 -0700101/*--------------------------------------------------------------------------
102 Type declarations
103 ------------------------------------------------------------------------*/
104typedef struct _smeConfigParams
105{
106 tCsrConfigParam csrConfig;
107#if defined WLAN_FEATURE_VOWIFI
108 tRrmConfigParam rrmConfig;
109#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700110#if defined FEATURE_WLAN_LFR
111 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800112 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700113#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800114#if defined FEATURE_WLAN_ESE
115 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700116#endif
117#if defined WLAN_FEATURE_P2P_INTERNAL
118 tP2PConfigParam p2pConfig;
119#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800120#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700121 tANI_U8 isFastTransitionEnabled;
122 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700123 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700124#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530125 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700126 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800127 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530128 tANI_U32 fDeferIMPSTime;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +0530129 tANI_U8 fBtcEnableIndTimerVal;
Jeff Johnson295189b2012-06-20 16:38:30 -0700130} tSmeConfigParams, *tpSmeConfigParams;
131
Sunil Duttc69bccb2014-05-26 21:30:20 +0530132#ifdef WLAN_FEATURE_LINK_LAYER_STATS
133
134/* ---------------------------------------------------------------------------
135 \fn sme_LLStatsSetReq
136 \brief API to set link layer stats request to FW
137 \param hHal - The handle returned by macOpen.
138
139 \Param pStatsReq - a pointer to a caller allocated object of
140 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
141 stats set.
142
143 \return eHalStatus
144 ---------------------------------------------------------------------------*/
145eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
146
147/* ---------------------------------------------------------------------------
148 \fn sme_LLStatsGetReq
149 \brief API to get link layer stats request to FW
150 \param hHal - The handle returned by macOpen.
151
152 \Param pStatsReq - a pointer to a caller allocated object of
153 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
154 stats get.
155
156 \return eHalStatus
157 ---------------------------------------------------------------------------*/
158eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
159
160/* ---------------------------------------------------------------------------
161 \fn sme_LLStatsClearReq
162 \brief API to clear link layer stats request to FW
163 \param hHal - The handle returned by macOpen.
164
165 \Param pStatsReq - a pointer to a caller allocated object of
166 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
167 stats clear.
168
169 \return eHalStatus
170 ---------------------------------------------------------------------------*/
171eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
172
173/* ---------------------------------------------------------------------------
174 \fn sme_SetLinkLayerStatsIndCB
175 \brief API to trigger Link Layer stats result indications from from FW
176 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530177 \param callbackRoutine - HDD callback which needs to be invoked after
178 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530179 \return eHalStatus
180 ---------------------------------------------------------------------------*/
181eHalStatus
182sme_SetLinkLayerStatsIndCB
183(
Dino Mycled3d50022014-07-07 12:58:25 +0530184 tHalHandle hHal,
185 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
186 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530187);
188
189
190#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
191
Dino Mycle2c198072014-06-10 10:15:52 +0530192#ifdef WLAN_FEATURE_EXTSCAN
193/* ---------------------------------------------------------------------------
194 \fn sme_GetValidChannelsByBand
195 \brief SME API to fetch all valid channel filtered by band
196 \param hHal
197 \param wifiBand: RF band information
198 \param aValidChannels: Array to store channel info
199 \param len: number of channels
200 \- return eHalStatus
201 -------------------------------------------------------------------------*/
202eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
203 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
204
205/* ---------------------------------------------------------------------------
206 \fn sme_EXTScanGetCapabilities
207 \brief SME API to fetch Extented Scan capabilities
208 \param hHal
209 \param pReq: Extented Scan capabilities structure
210 \- return eHalStatus
211 -------------------------------------------------------------------------*/
212eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
213 tSirGetEXTScanCapabilitiesReqParams *pReq);
214
215/* ---------------------------------------------------------------------------
216 \fn sme_EXTScanStart
217 \brief SME API to issue Extented Scan start
218 \param hHal
219 \param pStartCmd: Extented Scan start structure
220 \- return eHalStatus
221 -------------------------------------------------------------------------*/
222eHalStatus sme_EXTScanStart (tHalHandle hHal,
223 tSirEXTScanStartReqParams *pStartCmd);
224
225/* ---------------------------------------------------------------------------
226 \fn sme_EXTScanStop
227 \brief SME API to issue Extented Scan stop
228 \param hHal
229 \param pStopReq: Extented Scan stop structure
230 \- return eHalStatus
231 -------------------------------------------------------------------------*/
232eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
233
234/* ---------------------------------------------------------------------------
235 \fn sme_SetBssHotlist
236 \brief SME API to set BSSID hotlist
237 \param hHal
238 \param pSetHotListReq: Extented Scan set hotlist structure
239 \- return eHalStatus
240 -------------------------------------------------------------------------*/
241eHalStatus sme_SetBssHotlist (tHalHandle hHal,
242 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
243
244/* ---------------------------------------------------------------------------
245 \fn sme_ResetBssHotlist
246 \brief SME API to reset BSSID hotlist
247 \param hHal
248 \param pSetHotListReq: Extented Scan set hotlist structure
249 \- return eHalStatus
250 -------------------------------------------------------------------------*/
251eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
252 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
253
Padma, Santhosh Kumar9acee012015-08-21 19:58:01 +0530254/**
255 * sme_set_ssid_hotlist() - Set the SSID hotlist
256 * @hal: SME handle
257 * @request: set ssid hotlist request
258 *
259 * Return: eHalStatus
260 */
261eHalStatus sme_set_ssid_hotlist(tHalHandle hal,
262 tSirEXTScanSetSsidHotListReqParams *request);
263
264/* ---------------------------------------------------------------------------
265 \fn sme_ResetBssHotlist
266 \brief SME API to reset BSSID hotlist
267 \param hHal
268 \param pSetHotListReq: Extented Scan set hotlist structure
269 \- return eHalStatus
270 -------------------------------------------------------------------------*/
271eHalStatus sme_reset_ssid_hotlist (tHalHandle hHal,
272 tSirEXTScanResetSsidHotlistReqParams *pResetReq);
273
274
Dino Mycle2c198072014-06-10 10:15:52 +0530275/* ---------------------------------------------------------------------------
Dino Mycle2c198072014-06-10 10:15:52 +0530276 \fn sme_getCachedResults
277 \brief SME API to get cached results
278 \param hHal
279 \param pCachedResultsReq: Extented Scan get cached results structure
280 \- return eHalStatus
281 -------------------------------------------------------------------------*/
282eHalStatus sme_getCachedResults (tHalHandle hHal,
283 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
284
285/* ---------------------------------------------------------------------------
286 \fn sme_EXTScanRegisterCallback
287 \brief SME API to register Extented Scan notification callback
288 \param pEXTScanIndCb
289 \- return void
290 -------------------------------------------------------------------------*/
291eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
292 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
293 void *);
294
295#endif /* WLAN_FEATURE_EXTSCAN */
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530296
297#ifdef FEATURE_OEM_DATA_SUPPORT
298eHalStatus sme_OemDataRegisterCallback (tHalHandle hHal,
299 void (*pOemDataIndCb)(void *, const tANI_U16, void *),
300 void *callbackContext);
301#endif
302
Siddharth Bhald8a95e82015-02-12 20:14:52 +0530303/* ---------------------------------------------------------------------------
304 \fn sme_SpoofMacAddrReq
305 \brief SME API to send Spoof Mac Addr req to HAL
306 \param macaddr: mac address to be sent
307 \- return eHalStatus
308 -------------------------------------------------------------------------*/
309eHalStatus sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530310
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530311typedef enum
312{
313 eSME_ROAM_TRIGGER_NONE = 0,
314 eSME_ROAM_TRIGGER_SCAN = 1,
315 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
316 eSME_ROAM_TRIGGER_MAX
317} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700318
319/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530320 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700321 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700322/*--------------------------------------------------------------------------
323
324 \brief sme_Open() - Initialze all SME modules and put them at idle state
325
326 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
327 successfully return, all modules are at idle state ready to start.
328
329 smeOpen must be called before any other SME APIs can be involved.
330 smeOpen must be called after macOpen.
331
332 \param hHal - The handle returned by macOpen.
333
334 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
335
336 Other status means SME is failed to be initialized
337 \sa
338
339 --------------------------------------------------------------------------*/
340eHalStatus sme_Open(tHalHandle hHal);
341
342/*--------------------------------------------------------------------------
343
344 \brief sme_Close() - Release all SME modules and their resources.
345
346 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
347 return, all modules are at closed state.
348
349 No SME APIs can be involved after sme_Close except sme_Open.
350 sme_Close must be called before macClose.
351
352 \param hHal - The handle returned by macOpen.
353
354 \return eHAL_STATUS_SUCCESS - SME is successfully close.
355
356 Other status means SME is failed to be closed but caller still cannot
357 call any other SME functions except smeOpen.
358 \sa
359
360 --------------------------------------------------------------------------*/
361eHalStatus sme_Close(tHalHandle hHal);
362
363/*--------------------------------------------------------------------------
Hema Aparna Medicharlaa6cf65e2015-06-01 16:23:28 +0530364
365 \brief sme_PreClose() - Stop SME resources prior to final sme_Stop.
366
367 The function stops resources in SME, PMC, CCM, CSR, etc. as needed
368 to handle fast closure during SSR/unload-load cases.
369
370 \param hHal - The handle returned by macOpen.
371 \return v_VOID_t
372
373 \sa
374
375 --------------------------------------------------------------------------*/
376v_VOID_t sme_PreClose(tHalHandle hHal);
377
378/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700379
380 \brief sme_Start() - Put all SME modules at ready state.
381
382 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
383 successfully return, all modules are ready to run.
384
385 \param hHal - The handle returned by macOpen.
386
387 \return eHAL_STATUS_SUCCESS - SME is ready.
388
389 Other status means SME is failed to start.
390 \sa
391
392 --------------------------------------------------------------------------*/
393eHalStatus sme_Start(tHalHandle hHal);
394
395/*--------------------------------------------------------------------------
396
397 \brief sme_Stop() - Stop all SME modules and put them at idle state
398
399 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
400 return, all modules are at idle state ready to start.
401
402
403 \param hHal - The handle returned by macOpen.
404
Kiet Lama72a2322013-11-15 11:18:11 +0530405 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700406
407 \return eHAL_STATUS_SUCCESS - SME is stopped.
408
409 Other status means SME is failed to stop but caller should still consider
410 SME is stopped.
411 \sa
412
413 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530414eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700415
416
417/*--------------------------------------------------------------------------
418
419 \brief sme_OpenSession() - Open a session for scan/roam operation.
420
421 This is a synchronous API.
422
423
424 \param hHal - The handle returned by macOpen.
425 \param callback - A pointer to the function caller specifies for roam/connect status indication
426 \param pContext - The context passed with callback
427 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
428 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
429
430 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
431
432 Other status means SME is failed to open the session.
433 eHAL_STATUS_RESOURCES - no more session available.
434 \sa
435
436 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700437eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
438 void *pContext, tANI_U8 *pSelfMacAddr,
439 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700440
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700441/*--------------------------------------------------------------------------
442
443 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
444 \param hHal - The handle returned by macOpen.
445 \param currDeviceMode - Current operating device mode.
446 --------------------------------------------------------------------------*/
447
448void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700449
450/*--------------------------------------------------------------------------
451
452 \brief sme_CloseSession() - Open a session for scan/roam operation.
453
454 This is a synchronous API.
455
Jeff Johnson295189b2012-06-20 16:38:30 -0700456 \param hHal - The handle returned by macOpen.
457
458 \param sessionId - A previous opened session's ID.
mukul sharmabab477d2015-06-11 17:14:55 +0530459
460 \param bPurgeSmeCmdList - Whether sme cmd list purging is required or not.
461 TRUE -Purging require FALSE - Purging not require
462
Jeff Johnson295189b2012-06-20 16:38:30 -0700463 \return eHAL_STATUS_SUCCESS - session is closed.
464
465 Other status means SME is failed to open the session.
466 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
467 \sa
mukul sharmabab477d2015-06-11 17:14:55 +0530468
469
Jeff Johnson295189b2012-06-20 16:38:30 -0700470 --------------------------------------------------------------------------*/
471eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
mukul sharmabab477d2015-06-11 17:14:55 +0530472 tANI_U8 bPurgeSmeCmdList,
473 csrRoamSessionCloseCallback callback,
474 void *pContext);
475/*--------------------------------------------------------------------------
476
477 \brief sme_PurgeCmdList() - Purge all the sme cmd list
478
479 This is a synchronous API.
Jeff Johnson295189b2012-06-20 16:38:30 -0700480
481
mukul sharmabab477d2015-06-11 17:14:55 +0530482 \param hHal - The handle returned by macOpen.
483
484 \param sessionId - A previous opened session's ID.
485
486--------------------------------------------------------------------------*/
487
488eHalStatus sme_PurgeCmdList(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700489
490/*--------------------------------------------------------------------------
491
492 \brief sme_UpdateConfig() - Change configurations for all SME moduels
493
494 The function updates some configuration for modules in SME, CCM, CSR, etc
495 during SMEs close -> open sequence.
496
497 Modules inside SME apply the new configuration at the next transaction.
498
499
500 \param hHal - The handle returned by macOpen.
501 \Param pSmeConfigParams - a pointer to a caller allocated object of
502 typedef struct _smeConfigParams.
503
504 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
505
506 Other status means SME is failed to update the config parameters.
507 \sa
508
509 --------------------------------------------------------------------------*/
510eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
511
512#ifdef FEATURE_WLAN_SCAN_PNO
513/*--------------------------------------------------------------------------
514
515 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
516
517 It is used at driver start up to inform RIVA of the default channel
518 configuration.
519
520 This is a synchronuous call
521
522 \param hHal - The handle returned by macOpen.
523
524 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
525
526 Other status means SME is failed to update the channel config.
527 \sa
528
529 --------------------------------------------------------------------------*/
530eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
531
532#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700533/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530534
535 \brief sme_UpdateChannelList() - Update channel List in FW.
536
537
538 \param hHal - The handle returned by macOpen.
539
540 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
541
542 Other status means SME is failed to update the channel config.
543 \sa
544
545 --------------------------------------------------------------------------*/
546eHalStatus sme_UpdateChannelList(tHalHandle hHal);
547
548/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700549
550 \brief sme_set11dinfo() - Set the 11d information about valid channels
551 and there power using information from nvRAM
552 This function is called only for AP.
553
554 This is a synchronuous call
555
556 \param hHal - The handle returned by macOpen.
557 \Param pSmeConfigParams - a pointer to a caller allocated object of
558 typedef struct _smeConfigParams.
559
560 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
561
562 Other status means SME is failed to update the config parameters.
563 \sa
564--------------------------------------------------------------------------*/
565
566eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
567
568/*--------------------------------------------------------------------------
569
570 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
571
572 This is a synchronuous call
573
574 \param hHal - The handle returned by HostapdAdapter.
575 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
576
577 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
578
579 Other status means, failed to get the current regulatory domain.
580 \sa
581--------------------------------------------------------------------------*/
582
583eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
584
585eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
586
Jeff Johnson295189b2012-06-20 16:38:30 -0700587
588/* ---------------------------------------------------------------------------
589 \fn sme_ChangeConfigParams
590 \brief The SME API exposed for HDD to provide config params to SME during
591 SMEs stop -> start sequence.
592
593 If HDD changed the domain that will cause a reset. This function will
594 provide the new set of 11d information for the new domain. Currrently this
595 API provides info regarding 11d only at reset but we can extend this for
596 other params (PMC, QoS) which needs to be initialized again at reset.
597
598 This is a synchronuous call
599
600 \param hHal - The handle returned by macOpen.
601
602 \Param
603 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
604 currently provides 11d related information like Country code,
605 Regulatory domain, valid channel list, Tx power per channel, a
606 list with active/passive scan allowed per valid channel.
607
608 \return eHalStatus
609 ---------------------------------------------------------------------------*/
610eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
611 tCsrUpdateConfigParam *pUpdateConfigParam);
612
613/*--------------------------------------------------------------------------
614
615 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
616 is ready tio run.
617
618 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
619 to running state.
620
621
622 \param hHal - The handle returned by macOpen.
623
624 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
625
626 Other status means SME failed to send the message to PE.
627 \sa
628
629 --------------------------------------------------------------------------*/
630eHalStatus sme_HDDReadyInd(tHalHandle hHal);
631
632
633/*--------------------------------------------------------------------------
634
635 \brief sme_ProcessMsg() - The main message processor for SME.
636
637 The function is called by a message dispatcher when to process a message
638 targeted for SME.
639
640
641 \param hHal - The handle returned by macOpen.
642 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
643
644 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
645
646 Other status means SME failed to process the message.
647 \sa
648
649 --------------------------------------------------------------------------*/
650eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
651
652v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
653
654/* ---------------------------------------------------------------------------
655 \fn sme_ScanRequest
656 \brief a wrapper function to Request a 11d or full scan from CSR.
657 \param pScanRequestID - pointer to an object to get back the request ID
658 \param callback - a callback function that scan calls upon finish, will not
659 be called if csrScanRequest returns error
660 \param pContext - a pointer passed in for the callback
661 \return eHalStatus
662 ---------------------------------------------------------------------------*/
663eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
664 tANI_U32 *pScanRequestID,
665 csrScanCompleteCallback callback, void *pContext);
666
667
668/* ---------------------------------------------------------------------------
669 \fn sme_ScanSetBGScanparams
670 \brief a wrapper function to request CSR to set BG scan params in PE
671 \param pScanReq - BG scan request structure
672 \return eHalStatus
673 ---------------------------------------------------------------------------*/
674eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
675
676
677/* ---------------------------------------------------------------------------
678 \fn sme_ScanGetResult
679 \brief a wrapper function to request scan results from CSR.
680 \param pFilter - If pFilter is NULL, all cached results are returned
681 \param phResult - an object for the result.
682 \return eHalStatus
683 ---------------------------------------------------------------------------*/
684eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
685 tScanResultHandle *phResult);
686
687
688/* ---------------------------------------------------------------------------
689 \fn sme_ScanFlushResult
690 \brief a wrapper function to request CSR to clear scan results.
691 \return eHalStatus
692 ---------------------------------------------------------------------------*/
693eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530694
695/*
696 * ---------------------------------------------------------------------------
697 * \fn sme_FilterScanResults
698 * \brief a wrapper function to request CSR to filter the scan results based
699 * on valid chennel list.
700 * \return eHalStatus
701 *---------------------------------------------------------------------------
702 */
703eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
704
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530705/*
706 * ---------------------------------------------------------------------------
707 * \fn sme_FilterScanDFSResults
708 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
709 * from the scan results.
710 * \return eHalStatus
711 *---------------------------------------------------------------------------
712 */
713eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
714
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700715eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700716
717/* ---------------------------------------------------------------------------
718 \fn sme_ScanResultGetFirst
719 \brief a wrapper function to request CSR to returns the first element of
720 scan result.
721 \param hScanResult - returned from csrScanGetResult
722 \return tCsrScanResultInfo * - NULL if no result
723 ---------------------------------------------------------------------------*/
724tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
725 tScanResultHandle hScanResult);
726
727/* ---------------------------------------------------------------------------
728 \fn sme_ScanResultGetNext
729 \brief a wrapper function to request CSR to returns the next element of
730 scan result. It can be called without calling csrScanResultGetFirst
731 first
732 \param hScanResult - returned from csrScanGetResult
733 \return Null if no result or reach the end
734 ---------------------------------------------------------------------------*/
735tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
736 tScanResultHandle hScanResult);
737
738/* ---------------------------------------------------------------------------
739 \fn sme_ScanResultPurge
740 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
741 in the list and free memory for each item
742 \param hScanResult - returned from csrScanGetResult. hScanResult is
743 considered gone by
744 calling this function and even before this function reutrns.
745 \return eHalStatus
746 ---------------------------------------------------------------------------*/
747eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
748
749/* ---------------------------------------------------------------------------
750 \fn sme_ScanGetPMKIDCandidateList
751 \brief a wrapper function to return the PMKID candidate list
752 \param pPmkidList - caller allocated buffer point to an array of
753 tPmkidCandidateInfo
754 \param pNumItems - pointer to a variable that has the number of
755 tPmkidCandidateInfo allocated when retruning, this is
756 either the number needed or number of items put into
757 pPmkidList
758 \return eHalStatus - when fail, it usually means the buffer allocated is not
759 big enough and pNumItems
760 has the number of tPmkidCandidateInfo.
761 \Note: pNumItems is a number of tPmkidCandidateInfo,
762 not sizeof(tPmkidCandidateInfo) * something
763 ---------------------------------------------------------------------------*/
764eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
765 tPmkidCandidateInfo *pPmkidList,
766 tANI_U32 *pNumItems );
767
768
769/*----------------------------------------------------------------------------
770 \fn sme_RoamRegisterLinkQualityIndCallback
771
772 \brief
773 a wrapper function to allow HDD to register a callback handler with CSR for
774 link quality indications.
775
776 Only one callback may be registered at any time.
777 In order to deregister the callback, a NULL cback may be provided.
778
779 Registration happens in the task context of the caller.
780
781 \param callback - Call back being registered
782 \param pContext - user data
783
784 DEPENDENCIES: After CSR open
785
786 \return eHalStatus
787-----------------------------------------------------------------------------*/
788eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
789 csrRoamLinkQualityIndCallback callback,
790 void *pContext);
791
792
793/* ---------------------------------------------------------------------------
794 \fn sme_RoamConnect
795 \brief a wrapper function to request CSR to inititiate an association
796 \param sessionId - the sessionId returned by sme_OpenSession.
797 \param pProfile - can be NULL to join to any open ones
798 \param pRoamId - to get back the request ID
799 \return eHalStatus
800 ---------------------------------------------------------------------------*/
801eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
802 tANI_U32 *pRoamId);
803
804/* ---------------------------------------------------------------------------
805 \fn sme_RoamReassoc
806 \brief a wrapper function to request CSR to inititiate a re-association
807 \param pProfile - can be NULL to join the currently connected AP. In that
808 case modProfileFields should carry the modified field(s) which could trigger
809 reassoc
810 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
811 that might need modification dynamically once STA is up & running and this
812 could trigger a reassoc
813 \param pRoamId - to get back the request ID
814 \return eHalStatus
815 -------------------------------------------------------------------------------*/
816eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
817 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700818 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700819
820/* ---------------------------------------------------------------------------
821 \fn sme_RoamConnectToLastProfile
822 \brief a wrapper function to request CSR to disconnect and reconnect with
823 the same profile
824 \return eHalStatus. It returns fail if currently connected
825 ---------------------------------------------------------------------------*/
826eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
827
828/* ---------------------------------------------------------------------------
829 \fn sme_RoamDisconnect
830 \brief a wrapper function to request CSR to disconnect from a network
831 \param reason -- To indicate the reason for disconnecting. Currently, only
832 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
833 \return eHalStatus
834 ---------------------------------------------------------------------------*/
835eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
836
Jeff Johnson295189b2012-06-20 16:38:30 -0700837/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530838 \fn.sme_abortConnection
839 \brief a wrapper function to request CSR to stop from connecting a network
840 \retun void.
841---------------------------------------------------------------------------*/
842
843void sme_abortConnection(tHalHandle hHal, tANI_U8 sessionId);
844
845/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700846 \fn sme_RoamStopBss
847 \brief a wrapper function to request CSR to stop bss
848 \param sessionId - sessionId of SoftAP
849 \return eHalStatus
850 ---------------------------------------------------------------------------*/
851eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
852
853/* ---------------------------------------------------------------------------
854 \fn sme_RoamGetAssociatedStas
855 \brief To probe the list of associated stations from various modules of CORE stack.
856 \This is an asynchronous API.
857 \param sessionId - sessionId of SoftAP
858 \param modId - Module from whom list of associtated stations is to be probed.
859 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
860 \param pUsrContext - Opaque HDD context
861 \param pfnSapEventCallback - Sap event callback in HDD
862 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
863 \return eHalStatus
864 -------------------------------------------------------------------------------*/
865eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
866 VOS_MODULE_ID modId, void *pUsrContext,
867 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
868
869/* ---------------------------------------------------------------------------
870 \fn sme_RoamDisconnectSta
871 \brief To disassociate a station. This is an asynchronous API.
872 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
873 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
874 -------------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +0530875eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId,
876#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
877 const tANI_U8 *pPeerMacAddr
878#else
879 tANI_U8 *pPeerMacAddr
880#endif
881 );
Jeff Johnson295189b2012-06-20 16:38:30 -0700882
883/* ---------------------------------------------------------------------------
884 \fn sme_RoamDeauthSta
885 \brief To disassociate a station. This is an asynchronous API.
886 \param hHal - Global structure
887 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530888 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700889 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
890 -------------------------------------------------------------------------------*/
891eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530892 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700893
894/* ---------------------------------------------------------------------------
895 \fn sme_RoamTKIPCounterMeasures
896 \brief To start or stop TKIP counter measures. This is an asynchronous API.
897 \param sessionId - sessionId of SoftAP
898 \param bEnable - Flag to start/stop TKIP countermeasures
899 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
900 -------------------------------------------------------------------------------*/
901eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
902
903/* ---------------------------------------------------------------------------
904 \fn sme_RoamGetWpsSessionOverlap
905 \brief To get the WPS PBC session overlap information.
906 \This is an asynchronous API.
907 \param sessionId - sessionId of SoftAP
908 \param pUsrContext - Opaque HDD context
909 \param pfnSapEventCallback - Sap event callback in HDD
910 \return eHalStatus
911 -------------------------------------------------------------------------------*/
912eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
913 void *pUsrContext, void *pfnSapEventCallback,
914 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700915
916/* ---------------------------------------------------------------------------
917 \fn sme_RoamGetConnectState
918 \brief a wrapper function to request CSR to return the current connect state
919 of Roaming
920 \return eHalStatus
921 ---------------------------------------------------------------------------*/
922eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
923
924/* ---------------------------------------------------------------------------
925 \fn sme_RoamGetConnectProfile
926 \brief a wrapper function to request CSR to return the current connect
927 profile. Caller must call csrRoamFreeConnectProfile after it is done
928 and before reuse for another csrRoamGetConnectProfile call.
929 \param pProfile - pointer to a caller allocated structure
930 tCsrRoamConnectedProfile
931 \return eHalStatus. Failure if not connected
932 ---------------------------------------------------------------------------*/
933eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
934 tCsrRoamConnectedProfile *pProfile);
935
936/* ---------------------------------------------------------------------------
937 \fn sme_RoamFreeConnectProfile
938 \brief a wrapper function to request CSR to free and reinitialize the
939 profile returned previously by csrRoamGetConnectProfile.
940 \param pProfile - pointer to a caller allocated structure
941 tCsrRoamConnectedProfile
942 \return eHalStatus.
943 ---------------------------------------------------------------------------*/
944eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
945 tCsrRoamConnectedProfile *pProfile);
946
947/* ---------------------------------------------------------------------------
948 \fn sme_RoamSetPMKIDCache
949 \brief a wrapper function to request CSR to return the PMKID candidate list
950 \param pPMKIDCache - caller allocated buffer point to an array of
951 tPmkidCacheInfo
952 \param numItems - a variable that has the number of tPmkidCacheInfo
953 allocated when retruning, this is either the number needed
954 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530955 \param update_entire_cache - if TRUE, then it overwrites the entire cache
956 with pPMKIDCache, else it updates entry by
957 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700958 \return eHalStatus - when fail, it usually means the buffer allocated is not
959 big enough and pNumItems has the number of
960 tPmkidCacheInfo.
961 \Note: pNumItems is a number of tPmkidCacheInfo,
962 not sizeof(tPmkidCacheInfo) * something
963 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530964eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
965 tPmkidCacheInfo *pPMKIDCache,
966 tANI_U32 numItems,
967 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700968
969/* ---------------------------------------------------------------------------
970 \fn sme_RoamGetSecurityReqIE
971 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
972 passes to PE to JOIN request or START_BSS request
973 This is a synchronuous call.
974 \param sessionId - returned by sme_OpenSession.
975 \param pLen - caller allocated memory that has the length of pBuf as input.
976 Upon returned, *pLen has the needed or IE length in pBuf.
977 \param pBuf - Caller allocated memory that contain the IE field, if any,
978 upon return
979 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
980 \return eHalStatus - when fail, it usually means the buffer allocated is not
981 big enough
982 ---------------------------------------------------------------------------*/
983eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
984 tANI_U8 *pBuf, eCsrSecurityType secType);
985
986/* ---------------------------------------------------------------------------
987 \fn sme_RoamGetSecurityRspIE
988 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
989 the beacon or probe rsp if connected
990 \param sessionId - returned by sme_OpenSession.
991 \param pLen - caller allocated memory that has the length of pBuf as input.
992 Upon returned, *pLen has the needed or IE length in pBuf.
993 \param pBuf - Caller allocated memory that contain the IE field, if any,
994 upon return
995 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
996 \return eHalStatus - when fail, it usually means the buffer allocated is not
997 big enough
998 ---------------------------------------------------------------------------*/
999eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1000 tANI_U8 *pBuf, eCsrSecurityType secType);
1001
1002
1003/* ---------------------------------------------------------------------------
1004 \fn sme_RoamGetNumPMKIDCache
1005 \brief a wrapper function to request CSR to return number of PMKID cache
1006 entries
1007 \return tANI_U32 - the number of PMKID cache entries
1008 ---------------------------------------------------------------------------*/
1009tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
1010
1011/* ---------------------------------------------------------------------------
1012 \fn sme_RoamGetPMKIDCache
1013 \brief a wrapper function to request CSR to return PMKID cache from CSR
1014 \param pNum - caller allocated memory that has the space of the number of
1015 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
1016 needed or actually number in tPmkidCacheInfo.
1017 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
1018 any, upon return
1019 \return eHalStatus - when fail, it usually means the buffer allocated is not
1020 big enough
1021 ---------------------------------------------------------------------------*/
1022eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
1023 tPmkidCacheInfo *pPmkidCache);
1024
1025/* ---------------------------------------------------------------------------
1026 \fn sme_GetConfigParam
1027 \brief a wrapper function that HDD calls to get the global settings
1028 currently maintained by CSR.
1029 \param pParam - caller allocated memory
1030 \return eHalStatus
1031 ---------------------------------------------------------------------------*/
1032eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
1033
1034/* ---------------------------------------------------------------------------
1035 \fn sme_GetStatistics
1036 \brief a wrapper function that client calls to register a callback to get
1037 different PHY level statistics from CSR.
1038
1039 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1040 \param statsMask - The different category/categories of stats requester is looking for
1041 The order in which you set the bits in the statsMask for requesting
1042 different type of stats is:
1043
1044 eCsrSummaryStats = bit 0
1045 eCsrGlobalClassAStats = bit 1
1046 eCsrGlobalClassBStats = bit 2
1047 eCsrGlobalClassCStats = bit 3
1048 eCsrGlobalClassDStats = bit 4
1049 eCsrPerStaStats = bit 5
1050
1051 \param callback - SME sends back the requested stats using the callback
1052 \param periodicity - If requester needs periodic update, 0 means it's an one
1053 time request
1054 \param cache - If requester is happy with cached stats
1055 \param staId - The station ID for which the stats is requested for
1056 \param pContext - user context to be passed back along with the callback
1057 \return eHalStatus
1058 ---------------------------------------------------------------------------*/
1059eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1060 tANI_U32 statsMask,
1061 tCsrStatsCallback callback,
1062 tANI_U32 periodicity, tANI_BOOLEAN cache,
1063 tANI_U8 staId, void *pContext);
1064
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301065/* ---------------------------------------------------------------------------
1066 \fn smeGetTLSTAState
1067 \helper function to get teh TL STA State whenever the function is called.
1068
1069 \param staId - The staID to be passed to the TL
1070 to get the relevant TL STA State
1071 \return the state as tANI_U16
1072 ---------------------------------------------------------------------------*/
1073tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1074
Jeff Johnson295189b2012-06-20 16:38:30 -07001075eHalStatus sme_GetRssi(tHalHandle hHal,
1076 tCsrRssiCallback callback,
1077 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301078
1079/* ---------------------------------------------------------------------------
1080 \fn sme_GetSnr
1081 \brief a wrapper function that client calls to register a callback to get
1082 SNR from FW
1083
1084 \param callback - SME sends back the requested stats using the callback
1085 \param staId - The station ID for which the stats is requested for
1086 \param bssid - The bssid of the connected session
1087 \param pContext - user context to be passed back along with the callback
1088 ---------------------------------------------------------------------------*/
1089eHalStatus sme_GetSnr(tHalHandle hHal,
1090 tCsrSnrCallback callback,
1091 tANI_U8 staId, tCsrBssid bssId,
1092 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001093#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001094eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1095 tCsrRssiCallback callback,
1096 tANI_U8 staId,
1097 tCsrBssid bssId,
1098 void *pContext,
1099 void* pVosContext);
1100#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001101
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001102#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001103/* ---------------------------------------------------------------------------
1104 \fn sme_GetTsmStats
1105 \brief a wrapper function that client calls to register a callback to get TSM Stats
1106
1107 \param callback - SME sends back the requested stats using the callback
1108 \param staId - The station ID for which the stats is requested for
1109 \param pContext - user context to be passed back along with the callback
1110 \param pVosContext - vos context
1111 \return eHalStatus
1112 ---------------------------------------------------------------------------*/
1113eHalStatus sme_GetTsmStats(tHalHandle hHal,
1114 tCsrTsmStatsCallback callback,
1115 tANI_U8 staId, tCsrBssid bssId,
1116 void *pContext, void* pVosContext, tANI_U8 tid);
1117
1118/* ---------------------------------------------------------------------------
1119 \fn sme_SetCCKMIe
1120 \brief function to store the CCKM IE passed from supplicant and use it while packing
1121 reassociation request
1122 \param hHal - HAL handle for device
1123 \param pCckmIe - pointer to CCKM IE data
1124 \param pCckmIeLen - length of the CCKM IE
1125 \- return Success or failure
1126 -------------------------------------------------------------------------*/
1127eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1128
1129
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001130/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001131 \fn sme_SetEseBeaconRequest
1132 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001133 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001134 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001135 \- return Success or failure
1136 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001137eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1138 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001139
1140
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001141#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001142/* ---------------------------------------------------------------------------
1143 \fn sme_CfgSetInt
1144 \brief a wrapper function that HDD calls to set parameters in CFG.
1145 \param cfgId - Configuration Parameter ID (type) for STA.
1146 \param ccmValue - The information related to Configuration Parameter ID
1147 which needs to be saved in CFG
1148 \param callback - To be registered by CSR with CCM. Once the CFG done with
1149 saving the information in the database, it notifies CCM &
1150 then the callback will be invoked to notify.
1151 \param toBeSaved - To save the request for future reference
1152 \return eHalStatus
1153 ---------------------------------------------------------------------------*/
1154eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1155 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1156
1157/* ---------------------------------------------------------------------------
1158 \fn sme_CfgSetStr
1159 \brief a wrapper function that HDD calls to set parameters in CFG.
1160 \param cfgId - Configuration Parameter ID (type) for STA.
1161 \param pStr - Pointer to the byte array which carries the information needs
1162 to be saved in CFG
1163 \param length - Length of the data to be saved
1164 \param callback - To be registered by CSR with CCM. Once the CFG done with
1165 saving the information in the database, it notifies CCM &
1166 then the callback will be invoked to notify.
1167 \param toBeSaved - To save the request for future reference
1168 \return eHalStatus
1169 ---------------------------------------------------------------------------*/
1170eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1171 tANI_U32 length, tCcmCfgSetCallback callback,
1172 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301173/* ---------------------------------------------------------------------------
1174 \fn sme_GetModifyProfileFields
1175 \brief HDD or SME - QOS calls this function to get the current values of
1176 connected profile fields, changing which can cause reassoc.
1177 This function must be called after CFG is downloaded and STA is in connected
1178 state. Also, make sure to call this function to get the current profile
1179 fields before calling the reassoc. So that pModifyProfileFields will have
1180 all the latest values plus the one(s) has been updated as part of reassoc
1181 request.
1182 \param pModifyProfileFields - pointer to the connected profile fields
1183 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001184
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301185 \return eHalStatus
1186 -------------------------------------------------------------------------------*/
1187eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1188 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301189/* ---------------------------------------------------------------------------
1190 \fn sme_HT40StopOBSSScan
1191 \brief HDD or SME - Command to stop the OBSS scan
1192 THis is implemented only for debugging purpose.
1193 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1194 \param sessionId - sessionId
1195 changing which can cause reassoc
1196
1197 \return eHalStatus
1198 -------------------------------------------------------------------------------*/
1199eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001200
1201/*--------------------------------------------------------------------------
1202 \fn sme_SetConfigPowerSave
1203 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1204 For BMPS related configuration, this function also updates the CFG
1205 and sends a message to FW to pick up the new values. Note: Calling
1206 this function only updates the configuration and does not enable
1207 the specified power save mode.
1208 \param hHal - The handle returned by macOpen.
1209 \param psMode - Power Saving mode being modified
1210 \param pConfigParams - a pointer to a caller allocated object of type
1211 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1212 \return eHalStatus
1213 --------------------------------------------------------------------------*/
1214eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1215 void *pConfigParams);
1216
1217/*--------------------------------------------------------------------------
1218 \fn sme_GetConfigPowerSave
1219 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1220 \param hHal - The handle returned by macOpen.
1221 \param psMode - Power Saving mode
1222 \param pConfigParams - a pointer to a caller allocated object of type
1223 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1224 \return eHalStatus
1225 --------------------------------------------------------------------------*/
1226eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1227 void *pConfigParams);
1228
1229/* ---------------------------------------------------------------------------
1230 \fn sme_SignalPowerEvent
1231 \brief Signals to PMC that a power event has occurred. Used for putting
1232 the chip into deep sleep mode.
1233 \param hHal - The handle returned by macOpen.
1234 \param event - the event that has occurred
1235 \return eHalStatus
1236 ---------------------------------------------------------------------------*/
1237extern eHalStatus sme_SignalPowerEvent (
1238 tHalHandle hHal,
1239 tPmcPowerEvent event);
1240
1241/* ---------------------------------------------------------------------------
1242 \fn sme_EnablePowerSave
1243 \brief Enables one of the power saving modes. This API does not cause a
1244 device state change. This is purely a configuration API.
1245 \param hHal - The handle returned by macOpen.
1246 \param psMode - The power saving mode to enable.
1247 \return eHalStatus
1248 ---------------------------------------------------------------------------*/
1249extern eHalStatus sme_EnablePowerSave (
1250 tHalHandle hHal,
1251 tPmcPowerSavingMode psMode);
1252
1253/* ---------------------------------------------------------------------------
1254 \fn sme_DisablePowerSave
1255 \brief Disables one of the power saving modes.Disabling does not imply
1256 that device will be brought out of the current PS mode. This is
1257 purely a configuration API.
1258 \param hHal - The handle returned by macOpen.
1259 \param psMode - The power saving mode to disable.
1260 \return eHalStatus
1261 ---------------------------------------------------------------------------*/
1262extern eHalStatus sme_DisablePowerSave (
1263 tHalHandle hHal,
1264 tPmcPowerSavingMode psMode);
1265
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301266 /* ---------------------------------------------------------------------------
1267 \fn sme_SetHostPowerSave
1268 \brief The BMPS logic is controlled by the User level Apps
1269 \param hHal - The handle returned by macOpen.
1270 \param psMode - The power saving mode to enable.
1271 \return eHalStatus
1272 ---------------------------------------------------------------------------*/
1273extern eHalStatus sme_SetHostPowerSave (
1274 tHalHandle hHal,
1275 v_BOOL_t psMode);
1276
Jeff Johnson295189b2012-06-20 16:38:30 -07001277/* ---------------------------------------------------------------------------
1278 \fn sme_StartAutoBmpsTimer
1279 \brief Starts a timer that periodically polls all the registered
1280 module for entry into Bmps mode. This timer is started only if BMPS is
1281 enabled and whenever the device is in full power.
1282 \param hHal - The handle returned by macOpen.
1283 \return eHalStatus
1284 ---------------------------------------------------------------------------*/
1285extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1286
1287/* ---------------------------------------------------------------------------
1288 \fn sme_StopAutoBmpsTimer
1289 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1290 Stopping the timer does not cause a device state change. Only the timer
1291 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1292 \param hHal - The handle returned by macOpen.
1293 \return eHalStatus
1294 ---------------------------------------------------------------------------*/
1295extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1296
1297/* ---------------------------------------------------------------------------
1298 \fn sme_QueryPowerState
1299 \brief Returns the current power state of the device.
1300 \param hHal - The handle returned by macOpen.
1301 \param pPowerState - pointer to location to return power state
1302 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1303 \return eHalStatus
1304 ---------------------------------------------------------------------------*/
1305extern eHalStatus sme_QueryPowerState (
1306 tHalHandle hHal,
1307 tPmcPowerState *pPowerState,
1308 tPmcSwitchState *pSwWlanSwitchState);
1309
1310/* ---------------------------------------------------------------------------
1311 \fn sme_IsPowerSaveEnabled
1312 \brief Checks if the device is able to enter a particular power save mode
1313 This does not imply that the device is in a particular PS mode
1314 \param hHal - The handle returned by macOpen.
1315 \param psMode - the power saving mode
1316 \return eHalStatus
1317 ---------------------------------------------------------------------------*/
1318extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1319 tHalHandle hHal,
1320 tPmcPowerSavingMode psMode);
1321
1322/* ---------------------------------------------------------------------------
1323 \fn sme_RequestFullPower
1324 \brief Request that the device be brought to full power state.
1325 Note 1: If "fullPowerReason" specificied in this API is set to
1326 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1327 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1328 HDD is requesting full power, we need to undo any previous HDD requests for
1329 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1330 specified anything other than above, the buffered requests for BMPS and WoWL
1331 will not be cleared.
1332 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1333 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1334 request".
1335 Note 3: When the device finally enters Full Power PMC will start a timer
1336 if any of the following holds true:
1337 - Auto BMPS mode is enabled
1338 - Uapsd request is pending
1339 - HDD's request for BMPS is pending
1340 - HDD's request for WoWL is pending
1341 On timer expiry PMC will attempt to put the device in BMPS mode if following
1342 (in addition to those listed above) holds true:
1343 - Polling of all modules through the Power Save Check routine passes
1344 - STA is associated to an access point
1345 \param hHal - The handle returned by macOpen.
1346 \param - callbackRoutine Callback routine invoked in case of success/failure
1347 \param - callbackContext - Cookie to be passed back during callback
1348 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1349 distinguish between BAP and HDD requests
1350 \return eHalStatus - status
1351 eHAL_STATUS_SUCCESS - device brought to full power state
1352 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1353 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1354 ---------------------------------------------------------------------------*/
1355extern eHalStatus sme_RequestFullPower (
1356 tHalHandle hHal,
1357 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1358 void *callbackContext,
1359 tRequestFullPowerReason fullPowerReason);
1360
1361/* ---------------------------------------------------------------------------
1362 \fn sme_RequestBmps
1363 \brief Request that the device be put in BMPS state. Request will be
1364 accepted only if BMPS mode is enabled and power save check routine
1365 passes. Only HDD should invoke this API.
1366 \param hHal - The handle returned by macOpen.
1367 \param - callbackRoutine Callback routine invoked in case of success/failure
1368 \param - callbackContext - Cookie to be passed back during callback
1369 \return eHalStatus
1370 eHAL_STATUS_SUCCESS - device is in BMPS state
1371 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1372 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1373 ---------------------------------------------------------------------------*/
1374extern eHalStatus sme_RequestBmps (
1375 tHalHandle hHal,
1376 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1377 void *callbackContext);
1378
1379/* ---------------------------------------------------------------------------
1380 \fn sme_SetDHCPTillPowerActiveFlag
1381 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1382 entry by PMC
1383 \param hHal - The handle returned by macOpen.
1384 ---------------------------------------------------------------------------*/
1385void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1386
1387
1388/* ---------------------------------------------------------------------------
1389 \fn sme_StartUapsd
1390 \brief Request that the device be put in UAPSD state. If the device is in
1391 Full Power it will be put in BMPS mode first and then into UAPSD
1392 mode.
1393 \param hHal - The handle returned by macOpen.
1394 \param - callbackRoutine Callback routine invoked in case of success/failure
1395 \param - callbackContext - Cookie to be passed back during callback
1396 eHAL_STATUS_SUCCESS - device is in UAPSD state
1397 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1398 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1399 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1400 \return eHalStatus
1401 ---------------------------------------------------------------------------*/
1402extern eHalStatus sme_StartUapsd (
1403 tHalHandle hHal,
1404 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1405 void *callbackContext);
1406
1407/* ---------------------------------------------------------------------------
1408 \fn sme_StopUapsd
1409 \brief Request that the device be put out of UAPSD state. Device will be
1410 put in in BMPS state after stop UAPSD completes. Buffered requests for
1411 UAPSD will be cleared after this.
1412 \param hHal - The handle returned by macOpen.
1413 \return eHalStatus
1414 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1415 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1416 ---------------------------------------------------------------------------*/
1417extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1418
1419/* ---------------------------------------------------------------------------
1420 \fn sme_RequestStandby
1421 \brief Request that the device be put in standby. It is HDD's responsibility
1422 to bring the chip to full power and do a discconnect before calling
1423 this API. Request for standby will be rejected if STA is associated
1424 to an AP.
1425 \param hHal - The handle returned by macOpen.
1426 \param - callbackRoutine Callback routine invoked in case of success/failure
1427 \param - callbackContext - Cookie to be passed back during callback
1428 \return eHalStatus
1429 eHAL_STATUS_SUCCESS - device is in Standby mode
1430 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1431 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1432 ---------------------------------------------------------------------------*/
1433extern eHalStatus sme_RequestStandby (
1434 tHalHandle hHal,
1435 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1436 void *callbackContext);
1437
1438/* ---------------------------------------------------------------------------
1439 \fn sme_RegisterPowerSaveCheck
1440 \brief Register a power save check routine that is called whenever
1441 the device is about to enter one of the power save modes.
1442 \param hHal - The handle returned by macOpen.
1443 \param checkRoutine - Power save check routine to be registered
1444 \param callbackContext - Cookie to be passed back during callback
1445 \return eHalStatus
1446 eHAL_STATUS_SUCCESS - successfully registered
1447 eHAL_STATUS_FAILURE - not successfully registered
1448 ---------------------------------------------------------------------------*/
1449extern eHalStatus sme_RegisterPowerSaveCheck (
1450 tHalHandle hHal,
1451 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1452
1453/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301454 \fn sme_Register11dScanDoneCallback
1455 \brief Register a routine of type csrScanCompleteCallback which is
1456 called whenever an 11d scan is done
1457 \param hHal - The handle returned by macOpen.
1458 \param callback - 11d scan complete routine to be registered
1459 \return eHalStatus
1460 ---------------------------------------------------------------------------*/
1461extern eHalStatus sme_Register11dScanDoneCallback (
1462 tHalHandle hHal,
1463 csrScanCompleteCallback);
1464
1465/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001466 \fn sme_DeregisterPowerSaveCheck
1467 \brief Deregister a power save check routine
1468 \param hHal - The handle returned by macOpen.
1469 \param checkRoutine - Power save check routine to be deregistered
1470 \return eHalStatus
1471 eHAL_STATUS_SUCCESS - successfully deregistered
1472 eHAL_STATUS_FAILURE - not successfully deregistered
1473 ---------------------------------------------------------------------------*/
1474extern eHalStatus sme_DeregisterPowerSaveCheck (
1475 tHalHandle hHal,
1476 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1477
1478/* ---------------------------------------------------------------------------
1479 \fn sme_RegisterDeviceStateUpdateInd
1480 \brief Register a callback routine that is called whenever
1481 the device enters a new device state (Full Power, BMPS, UAPSD)
1482 \param hHal - The handle returned by macOpen.
1483 \param callbackRoutine - Callback routine to be registered
1484 \param callbackContext - Cookie to be passed back during callback
1485 \return eHalStatus
1486 eHAL_STATUS_SUCCESS - successfully registered
1487 eHAL_STATUS_FAILURE - not successfully registered
1488 ---------------------------------------------------------------------------*/
1489extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1490 tHalHandle hHal,
1491 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1492 void *callbackContext);
1493
1494/* ---------------------------------------------------------------------------
1495 \fn sme_DeregisterDeviceStateUpdateInd
1496 \brief Deregister a routine that was registered for device state changes
1497 \param hHal - The handle returned by macOpen.
1498 \param callbackRoutine - Callback routine to be deregistered
1499 \return eHalStatus
1500 eHAL_STATUS_SUCCESS - successfully deregistered
1501 eHAL_STATUS_FAILURE - not successfully deregistered
1502 ---------------------------------------------------------------------------*/
1503extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1504 tHalHandle hHal,
1505 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1506
1507/* ---------------------------------------------------------------------------
1508 \fn sme_WowlAddBcastPattern
1509 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1510 do a pattern match on these patterns when Wowl is enabled during BMPS
1511 mode.
1512 \param hHal - The handle returned by macOpen.
1513 \param pattern - Pattern to be added
1514 \return eHalStatus
1515 eHAL_STATUS_FAILURE Cannot add pattern
1516 eHAL_STATUS_SUCCESS Request accepted.
1517 ---------------------------------------------------------------------------*/
1518extern eHalStatus sme_WowlAddBcastPattern (
1519 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001520 tpSirWowlAddBcastPtrn pattern,
1521 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001522
1523/* ---------------------------------------------------------------------------
1524 \fn sme_WowlDelBcastPattern
1525 \brief Delete a pattern that was added for Pattern Byte Matching.
1526 \param hHal - The handle returned by macOpen.
1527 \param pattern - Pattern to be deleted
1528 \return eHalStatus
1529 eHAL_STATUS_FAILURE Cannot delete pattern
1530 eHAL_STATUS_SUCCESS Request accepted.
1531 ---------------------------------------------------------------------------*/
1532extern eHalStatus sme_WowlDelBcastPattern (
1533 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001534 tpSirWowlDelBcastPtrn pattern,
1535 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001536
1537/* ---------------------------------------------------------------------------
1538 \fn sme_EnterWowl
1539 \brief This is the API to request entry into WOWL mode.
1540 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1541 SME will will cache the information that WOWL has been requested and
1542 attempt to put the device in BMPS first. On entry into BMPS, SME will
1543 enter the WOWL mode.
1544 Note 1: After WoWL request is accepted, If module other than HDD requests
1545 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1546 and attempt to put the chip into BMPS+WOWL based on a timer.
1547 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1548 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1549 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1550 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1551 are required. Currently there is no requirement or use case to support UAPSD
1552 and WOWL at the same time.
1553 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1554 Note 5. Request for WoWL is rejected if BMPS is disabled.
1555
1556 \param hHal - The handle returned by macOpen.
1557 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1558 Used for success/failure notification by SME
1559 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1560 at the time of callback.
1561 \param wakeReasonIndCB - Callback routine provided by HDD.
1562 Used for Wake Reason Indication by SME
1563 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1564 at the time of callback.
1565 \return eHalStatus
1566 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1567 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1568 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1569 mode is entered.
1570 ---------------------------------------------------------------------------*/
1571extern eHalStatus sme_EnterWowl (
1572 tHalHandle hHal,
1573 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1574 void *enterWowlCallbackContext,
1575#ifdef WLAN_WAKEUP_EVENTS
1576 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1577 void *wakeReasonIndCBContext,
1578#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001579 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001580
1581/* ---------------------------------------------------------------------------
1582 \fn sme_ExitWowl
1583 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1584 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1585 mode. Any Buffered request for WoWL will be cleared after this API.
1586 \param hHal - The handle returned by macOpen.
1587 \return eHalStatus
1588 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1589 only if the previous "Enter WOWL" transaction has
1590 not even completed.
1591 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1592 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301593extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001594
1595/* ---------------------------------------------------------------------------
1596
1597 \fn sme_RoamSetKey
1598
1599 \brief To set encryption key. This function should be called only when connected
1600 This is an asynchronous API.
1601
1602 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1603
1604 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1605
1606 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1607
1608 FAILURE or RESOURCES The API finished and failed.
1609
1610 -------------------------------------------------------------------------------*/
1611eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1612
1613/* ---------------------------------------------------------------------------
1614
1615 \fn sme_RoamRemoveKey
1616
1617 \brief To set encryption key. This is an asynchronous API.
1618
1619 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1620
1621 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1622
1623 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1624
1625 FAILURE or RESOURCES The API finished and failed.
1626
1627 -------------------------------------------------------------------------------*/
1628eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1629
1630
1631/* ---------------------------------------------------------------------------
1632
1633 \fn sme_GetCountryCode
1634
1635 \brief To return the current country code. If no country code is applied, default country code is
1636 used to fill the buffer.
1637 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1638 This is a synchronous API.
1639
1640 \param pBuf - pointer to a caller allocated buffer for returned country code.
1641
1642 \param pbLen For input, this parameter indicates how big is the buffer.
1643 Upon return, this parameter has the number of bytes for country. If pBuf
1644 doesn't have enough space, this function returns
1645 fail status and this parameter contains the number that is needed.
1646
1647 \return eHalStatus SUCCESS.
1648
1649 FAILURE or RESOURCES The API finished and failed.
1650
1651 -------------------------------------------------------------------------------*/
1652eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1653
1654/* ---------------------------------------------------------------------------
1655
1656 \fn sme_SetCountryCode
1657
1658 \brief To change the current/default country code.
1659 If 11d supported is turned off, an error is return.
1660 This is a synchronous API.
1661
1662 \param pCountry - pointer to a caller allocated buffer for the country code.
1663
1664 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1665 whether a reset is required.
1666
1667 \return eHalStatus SUCCESS.
1668
1669 FAILURE or RESOURCES The API finished and failed.
1670
1671 -------------------------------------------------------------------------------*/
1672eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1673
1674/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301675
1676 \fn sme_InitChannels
1677
1678 \brief Used to initialize CSR channel lists while driver loading
1679
1680 \param hHal - global pMac structure
1681
1682 \return eHalStatus SUCCESS.
1683
1684 FAILURE or RESOURCES The API finished and failed.
1685
1686 -------------------------------------------------------------------------------*/
1687eHalStatus sme_InitChannels(tHalHandle hHal);
1688
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301689
Mihir Shete04206452014-11-20 17:50:58 +05301690#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301691/* ---------------------------------------------------------------------------
1692 \fn sme_InitChannelsForCC
1693
1694 \brief Used to issue regulatory hint to user
1695
1696 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301697 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301698
1699 \return eHalStatus SUCCESS.
1700
1701 FAILURE or RESOURCES The API finished and failed.
1702
1703 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301704eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301705#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301706
Mihir Shetee1093ba2014-01-21 20:13:32 +05301707/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001708 \fn sme_ResetCountryCodeInformation
1709 \brief this function is to reset the country code current being used back to EEPROM default
1710 this includes channel list and power setting. This is a synchronous API.
1711 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1712 a restart is needed to apply the change
1713 \return eHalStatus
1714 -------------------------------------------------------------------------------*/
1715eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1716
1717/* ---------------------------------------------------------------------------
1718 \fn sme_GetSupportedCountryCode
1719 \brief this function is to get a list of the country code current being supported
1720 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1721 this has the country code list. 3 bytes for each country code. This may be NULL if
1722 caller wants to know the needed byte count.
1723 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1724 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1725 \return eHalStatus
1726 -------------------------------------------------------------------------------*/
1727eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1728
1729/* ---------------------------------------------------------------------------
1730 \fn sme_GetCurrentRegulatoryDomain
1731 \brief this function is to get the current regulatory domain. This is a synchronous API.
1732 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1733 SME. The function fails if 11d support is turned off.
1734 \param pDomain - Caller allocated buffer to return the current domain.
1735 \return eHalStatus SUCCESS.
1736
1737 FAILURE or RESOURCES The API finished and failed.
1738 -------------------------------------------------------------------------------*/
1739eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1740
1741/* ---------------------------------------------------------------------------
1742 \fn sme_SetRegulatoryDomain
1743 \brief this function is to set the current regulatory domain.
1744 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1745 SME. This is a synchronous API.
1746 \param domainId - indicate the domain (defined in the driver) needs to set to.
1747 See v_REGDOMAIN_t for definition
1748 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1749 a restart is needed to apply the change
1750 \return eHalStatus
1751 -------------------------------------------------------------------------------*/
1752eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1753
1754/* ---------------------------------------------------------------------------
1755
1756 \fn sme_GetRegulatoryDomainForCountry
1757
1758 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1759
1760 \param pCountry - pointer to a caller allocated buffer for input country code.
1761
1762 \param pDomainId Upon successful return, it is the domain that country belongs to.
1763 If it is NULL, returning success means that the country code is known.
1764
1765 \return eHalStatus SUCCESS.
1766
1767 FAILURE or RESOURCES The API finished and failed.
1768
1769 -------------------------------------------------------------------------------*/
1770eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1771
1772
1773
1774/* ---------------------------------------------------------------------------
1775
1776 \fn sme_GetSupportedRegulatoryDomains
1777
1778 \brief To return a list of supported regulatory domains. This is a synchronous API.
1779
1780 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1781
1782 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1783 Upon return, this parameter has the number for supported domains. If pDomains
1784 doesn't have enough space for all the supported domains, this function returns
1785 fail status and this parameter contains the number that is needed.
1786
1787 \return eHalStatus SUCCESS.
1788
1789 FAILURE or RESOURCES The API finished and failed.
1790
1791 -------------------------------------------------------------------------------*/
1792eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1793
1794//some support functions
1795tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1796tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1797tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1798//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1799eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1800
1801typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1802/* ---------------------------------------------------------------------------
1803
1804 \fn sme_ChangeCountryCode
1805
1806 \brief Change Country code from upperlayer during WLAN driver operation.
1807 This is a synchronous API.
1808
1809 \param hHal - The handle returned by macOpen.
1810
1811 \param pCountry New Country Code String
1812
Abhishek Singha306a442013-11-07 18:39:01 +05301813 \param sendRegHint If we want to send reg hint to nl80211
1814
Jeff Johnson295189b2012-06-20 16:38:30 -07001815 \return eHalStatus SUCCESS.
1816
1817 FAILURE or RESOURCES The API finished and failed.
1818
1819 -------------------------------------------------------------------------------*/
1820eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1821 tSmeChangeCountryCallback callback,
1822 tANI_U8 *pCountry,
1823 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301824 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301825 tAniBool countryFromUserSpace,
1826 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001827
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301828/* ---------------------------------------------------------------------------
1829
Amar Singhal0d15bd52013-10-12 23:13:13 -07001830 \fn sme_GenericChangeCountryCode
1831
1832 \brief Generic API to change country code
1833
1834 \param hHal - The handle returned by macOpen.
1835
1836 \param pCountry New Country Code String
1837
1838 \param reg_domain Regulatory domain for the new country code
1839
1840 \return eHalStatus SUCCESS.
1841
1842 FAILURE or RESOURCES The API finished and failed.
1843
1844 -------------------------------------------------------------------------------*/
1845eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1846 tANI_U8 *pCountry,
1847 v_REGDOMAIN_t reg_domain);
1848
1849/* ---------------------------------------------------------------------------
1850
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301851 \fn sme_DHCPStartInd
1852
1853 \brief Indicate FW about DHCP start event.
1854
1855 \param hHal - The handle returned by macOpen.
1856
1857 \param device_mode the mode of the device
1858
c_hpothu0b0cab72014-02-13 21:52:40 +05301859 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301860
1861 \return eHalStatus SUCCESS.
1862
1863 FAILURE or RESOURCES The API finished and failed.
1864
1865 -------------------------------------------------------------------------------*/
1866
1867eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1868 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301869 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301870
1871/* ---------------------------------------------------------------------------
1872
1873 \fn sme_DHCPStopInd
1874
1875 \brief Indicate FW about DHCP stop event.
1876
1877 \param hHal - The handle returned by macOpen.
1878
1879 \param device_mode the mode of the device
1880
c_hpothu0b0cab72014-02-13 21:52:40 +05301881 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301882
1883 \return eHalStatus SUCCESS.
1884
1885 FAILURE or RESOURCES The API finished and failed.
1886
1887 -------------------------------------------------------------------------------*/
1888eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1889 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301890 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301891
Jeff Johnson295189b2012-06-20 16:38:30 -07001892
1893/* ---------------------------------------------------------------------------
1894 \fn sme_BtcSignalBtEvent
1895 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1896 BT event type and the current operating mode of Libra (full power,
1897 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1898 would be employed.
1899 \param hHal - The handle returned by macOpen.
1900 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1901 Caller owns the memory and is responsible for freeing it.
1902 \return VOS_STATUS
1903 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1904 if driver has not yet been initialized or if BTC
1905 Events Layer has been disabled.
1906 VOS_STATUS_SUCCESS BT Event passed to HAL
1907 ---------------------------------------------------------------------------*/
1908VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1909
1910/* ---------------------------------------------------------------------------
1911 \fn sme_BtcSetConfig
1912 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1913 This function should be invoked only after CFG download has completed.
1914 Calling it after sme_HDDReadyInd is recommended.
1915 \param hHal - The handle returned by macOpen.
1916 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1917 tSmeBtcConfig. Caller owns the memory and is responsible
1918 for freeing it.
1919 \return VOS_STATUS
1920 VOS_STATUS_E_FAILURE Config not passed to HAL.
1921 VOS_STATUS_SUCCESS Config passed to HAL
1922 ---------------------------------------------------------------------------*/
1923VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1924
1925/* ---------------------------------------------------------------------------
1926 \fn sme_BtcGetConfig
1927 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1928 \param hHal - The handle returned by macOpen.
1929 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1930 Caller owns the memory and is responsible for freeing it.
1931 \return VOS_STATUS
1932 VOS_STATUS_E_FAILURE - failure
1933 VOS_STATUS_SUCCESS success
1934 ---------------------------------------------------------------------------*/
1935VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1936
1937/* ---------------------------------------------------------------------------
1938 \fn sme_SetCfgPrivacy
1939 \brief API to set configure privacy parameters
1940 \param hHal - The handle returned by macOpen.
1941 \param pProfile - Pointer CSR Roam profile.
1942 \param fPrivacy - This parameter indicates status of privacy
1943
1944 \return void
1945 ---------------------------------------------------------------------------*/
1946void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1947
1948#if defined WLAN_FEATURE_VOWIFI
1949/* ---------------------------------------------------------------------------
1950 \fn sme_NeighborReportRequest
1951 \brief API to request neighbor report.
1952 \param hHal - The handle returned by macOpen.
1953 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1954 tRrmNeighborReq. Caller owns the memory and is responsible
1955 for freeing it.
1956 \return VOS_STATUS
1957 VOS_STATUS_E_FAILURE - failure
1958 VOS_STATUS_SUCCESS success
1959 ---------------------------------------------------------------------------*/
1960VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1961 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1962#endif
1963
1964//The following are debug APIs to support direct read/write register/memory
1965//They are placed in SME because HW cannot be access when in LOW_POWER state
1966//AND not connected. The knowledge and synchronization is done in SME
1967
1968//sme_DbgReadRegister
1969//Caller needs to validate the input values
1970VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1971
1972//sme_DbgWriteRegister
1973//Caller needs to validate the input values
1974VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1975
1976//sme_DbgReadMemory
1977//Caller needs to validate the input values
1978//pBuf caller allocated buffer has the length of nLen
1979VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1980
1981//sme_DbgWriteMemory
1982//Caller needs to validate the input values
1983VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1984
Jeff Johnson295189b2012-06-20 16:38:30 -07001985VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1986 tSirVersionType *pVersion);
1987VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1988 tSirVersionType *pVersion);
1989VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1990 tANI_U8 *pVersion,
1991 tANI_U32 versionBufferSize);
1992VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1993 tANI_U8 *pVersion,
1994 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001995eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1996 csrRoamCompleteCallback callback,
1997 void *pContext);
1998
1999#ifdef FEATURE_WLAN_WAPI
2000/* ---------------------------------------------------------------------------
2001 \fn sme_RoamSetBKIDCache
2002 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
2003 candidate list.
2004 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2005 it is opened (by calling halOpen).
2006 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
2007 \param numItems - a variable that has the number of tBkidCacheInfo allocated
2008 when retruning, this is the number of items put into pBKIDCache
2009 \return eHalStatus - when fail, it usually means the buffer allocated is not
2010 big enough and pNumItems has the number of tBkidCacheInfo.
2011 ---------------------------------------------------------------------------*/
2012eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
2013 tANI_U32 numItems );
2014
2015/* ---------------------------------------------------------------------------
2016 \fn sme_RoamGetBKIDCache
2017 \brief The SME API exposed to HDD to allow HDD to request SME to return its
2018 BKID cache.
2019 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2020 it is opened (by calling halOpen).
2021 \param pNum - caller allocated memory that has the space of the number of
2022 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
2023 in SME cache.
2024 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
2025 upon return
2026 \return eHalStatus - when fail, it usually means the buffer allocated is not
2027 big enough.
2028 ---------------------------------------------------------------------------*/
2029eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
2030 tBkidCacheInfo *pBkidCache);
2031
2032/* ---------------------------------------------------------------------------
2033 \fn sme_RoamGetNumBKIDCache
2034 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2035 number of BKID cache entries.
2036 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2037 it is opened (by calling halOpen).
2038 \return tANI_U32 - the number of BKID cache entries.
2039 ---------------------------------------------------------------------------*/
2040tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2041
2042/* ---------------------------------------------------------------------------
2043 \fn sme_ScanGetBKIDCandidateList
2044 \brief a wrapper function to return the BKID candidate list
2045 \param pBkidList - caller allocated buffer point to an array of
2046 tBkidCandidateInfo
2047 \param pNumItems - pointer to a variable that has the number of
2048 tBkidCandidateInfo allocated when retruning, this is
2049 either the number needed or number of items put into
2050 pPmkidList
2051 \return eHalStatus - when fail, it usually means the buffer allocated is not
2052 big enough and pNumItems
2053 has the number of tBkidCandidateInfo.
2054 \Note: pNumItems is a number of tBkidCandidateInfo,
2055 not sizeof(tBkidCandidateInfo) * something
2056 ---------------------------------------------------------------------------*/
2057eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2058 tBkidCandidateInfo *pBkidList,
2059 tANI_U32 *pNumItems );
2060#endif /* FEATURE_WLAN_WAPI */
2061
Jeff Johnsone7245742012-09-05 17:12:55 -07002062#ifdef FEATURE_OEM_DATA_SUPPORT
2063/********************************************************************************************
2064 Oem data related modifications
2065*********************************************************************************************/
2066/* ---------------------------------------------------------------------------
2067 \fn sme_OemDataReq
2068 \param sessionId - session id of session to be used for oem data req.
2069 \param pOemDataReqID - pointer to an object to get back the request ID
2070 \param callback - a callback function that is called upon finish
2071 \param pContext - a pointer passed in for the callback
2072 \return eHalStatus
2073 ---------------------------------------------------------------------------*/
2074eHalStatus sme_OemDataReq(tHalHandle hHal,
2075 tANI_U8 sessionId,
2076 tOemDataReqConfig *,
2077 tANI_U32 *pOemDataReqID,
2078 oemData_OemDataReqCompleteCallback callback,
2079 void *pContext);
2080
2081/* ---------------------------------------------------------------------------
2082 \fn sme_getOemDataRsp
2083 \param pOemDataRsp - A pointer to the response object
2084 \param pOemDataReqID - pointer to an object to get back the request ID
2085 \return eHalStatus
2086 ---------------------------------------------------------------------------*/
2087eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2088 tOemDataRsp **pOemDataRsp);
2089
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +05302090/* ---------------------------------------------------------------------------
2091 \fn sme_OemDataReqNew
2092 \brief a wrapper function for OEM DATA REQ NEW
2093 \param pOemDataReqNewConfig - Data to be passed to FW
2094 ---------------------------------------------------------------------------*/
2095void sme_OemDataReqNew(tHalHandle hHal,
2096 tOemDataReqNewConfig *pOemDataReqNewConfig);
2097
Jeff Johnsone7245742012-09-05 17:12:55 -07002098#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002099
2100
Jeff Johnson295189b2012-06-20 16:38:30 -07002101
2102/* ---------------------------------------------------------------------------
2103
2104 \fn sme_RoamUpdateAPWPSIE
2105
2106 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2107 This is an asynchronous API.
2108
2109 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2110
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002111 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002112
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002113 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002114
2115 -------------------------------------------------------------------------------*/
2116
2117eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2118/* ---------------------------------------------------------------------------
2119
2120 \fn sme_RoamUpdateAPWPARSNIEs
2121
2122 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2123 This is an asynchronous API.
2124
2125 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2126
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002127 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002128
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002129 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002130
2131 -------------------------------------------------------------------------------*/
2132eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2133
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002134/* ---------------------------------------------------------------------------
2135
2136 sme_ChangeMCCBeaconInterval
2137
2138 \brief To update P2P-GO's beacon Interval.
2139
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002140 \return eHalStatus SUCCESS
2141 FAILURE or RESOURCES
2142 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002143 -------------------------------------------------------------------------------*/
2144eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2145
2146
Jeff Johnson295189b2012-06-20 16:38:30 -07002147
2148/* ---------------------------------------------------------------------------
2149 \fn sme_sendBTAmpEvent
2150 \brief API to send the btAMPstate to FW
2151 \param hHal - The handle returned by macOpen.
2152 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002153 \return eHalStatus SUCCESS
2154 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002155
2156--------------------------------------------------------------------------- */
2157
2158eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2159
2160
2161
2162/* ---------------------------------------------------------------------------
2163 \fn sme_SetHostOffload
2164 \brief API to set the host offload feature.
2165 \param hHal - The handle returned by macOpen.
2166 \param pRequest - Pointer to the offload request.
2167 \return eHalStatus
2168 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002169eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2170 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002171
2172/* ---------------------------------------------------------------------------
2173 \fn sme_SetKeepAlive
2174 \brief API to set the Keep Alive feature.
2175 \param hHal - The handle returned by macOpen.
2176 \param pRequest - Pointer to the Keep Alive request.
2177 \return eHalStatus
2178 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002179eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2180 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002181
Jeff Johnson295189b2012-06-20 16:38:30 -07002182/* ----------------------------------------------------------------------------
2183 \fn sme_GetOperationChannel
2184 \brief API to get current channel on which STA is parked
2185 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002186 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002187 \returns eHAL_STATUS_SUCCESS
2188 eHAL_STATUS_FAILURE
2189-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002190eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002191
Jeff Johnson295189b2012-06-20 16:38:30 -07002192/* ---------------------------------------------------------------------------
2193
2194 \fn sme_RegisterMgtFrame
2195
2196 \brief To register managment frame of specified type and subtype.
2197 \param frameType - type of the frame that needs to be passed to HDD.
2198 \param matchData - data which needs to be matched before passing frame
2199 to HDD.
2200 \param matchDataLen - Length of matched data.
2201 \return eHalStatus
2202 -------------------------------------------------------------------------------*/
2203eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2204 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2205
2206/* ---------------------------------------------------------------------------
2207
2208 \fn sme_DeregisterMgtFrame
2209
2210 \brief To De-register managment frame of specified type and subtype.
2211 \param frameType - type of the frame that needs to be passed to HDD.
2212 \param matchData - data which needs to be matched before passing frame
2213 to HDD.
2214 \param matchDataLen - Length of matched data.
2215 \return eHalStatus
2216 -------------------------------------------------------------------------------*/
2217eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2218 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302219/* ---------------------------------------------------------------------------
2220 \fn sme_GetFramesLog
2221 \brief a wrapper function that client calls to register a callback to get
2222 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302223 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302224 \return eHalStatus
2225 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302226eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002227/* ---------------------------------------------------------------------------
2228
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302229 \fn sme_InitMgmtFrameLogging
2230
2231 \brief
2232 SME will pass this request to lower mac to initialize Frame Logging.
2233
2234 \param
2235
2236 hHal - The handle returned by macOpen.
2237
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302238 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302239
2240 \return eHalStatus
2241--------------------------------------------------------------------------- */
2242eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302243 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302244
Gupta, Kapil7c34b322015-09-30 13:12:35 +05302245
2246/* ---------------------------------------------------------------------------
2247
2248 \fn sme_StopRssiMonitoring
2249
2250 \brief
2251 SME will pass this request to lower mac to stop monitoring rssi range on
2252 a bssid.
2253
2254 \param
2255
2256 hHal - The handle returned by macOpen.
2257
2258 tSirRssiMonitorReq req- depict the monitor req params.
2259
2260 \return eHalStatus
2261
2262--------------------------------------------------------------------------- */
2263eHalStatus sme_StopRssiMonitoring(tHalHandle hHal,
2264 tSirRssiMonitorReq *req);
2265
2266/* ---------------------------------------------------------------------------
2267
2268 \fn sme_StartRssiMonitoring
2269
2270 \brief
2271 SME will pass this request to lower mac to start monitoring rssi range on
2272 a bssid.
2273
2274 \param
2275
2276 hHal - The handle returned by macOpen.
2277
2278 tSirRssiMonitorReq req- depict the monitor req params.
2279
2280 \return eHalStatus
2281
2282--------------------------------------------------------------------------- */
2283eHalStatus sme_StartRssiMonitoring(tHalHandle hHal,
2284 tSirRssiMonitorReq *req);
2285
2286
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302287/* ---------------------------------------------------------------------------
2288
Jeff Johnson295189b2012-06-20 16:38:30 -07002289 \fn sme_ConfigureRxpFilter
2290
2291 \brief
2292 SME will pass this request to lower mac to set/reset the filter on RXP for
2293 multicast & broadcast traffic.
2294
2295 \param
2296
2297 hHal - The handle returned by macOpen.
2298
2299 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2300 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2301 on this param. In future we can use this as a mask to set various types of
2302 filters as suggested below:
2303 FILTER_ALL_MULTICAST:
2304 FILTER_ALL_BROADCAST:
2305 FILTER_ALL_MULTICAST_BROADCAST:
2306
2307
2308 \return eHalStatus
2309
2310
2311--------------------------------------------------------------------------- */
2312eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2313 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2314
2315/* ---------------------------------------------------------------------------
2316
2317 \fn sme_ConfigureAppsCpuWakeupState
2318
2319 \brief
2320 SME will pass this request to lower mac to dynamically adjusts the listen
2321 interval based on the WLAN/MSM activity. This feature is named as
2322 Telescopic Beacon wakeup feature.
2323
2324 \param
2325
2326 hHal - The handle returned by macOpen.
2327
2328 isAppsAwake- Depicts the state of the Apps CPU
2329
2330
2331 \return eHalStatus
2332
2333
2334--------------------------------------------------------------------------- */
2335eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2336
Jeff Johnson295189b2012-06-20 16:38:30 -07002337/* ---------------------------------------------------------------------------
2338
2339 \fn sme_ConfigureSuspendInd
2340
2341 \brief
2342 SME will pass this request to lower mac to Indicate that the wlan needs to
2343 be suspended
2344
2345 \param
2346
2347 hHal - The handle returned by macOpen.
2348
2349 wlanSuspendParam- Depicts the wlan suspend params
2350
2351
2352 \return eHalStatus
2353
2354
2355--------------------------------------------------------------------------- */
2356eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2357 tpSirWlanSuspendParam wlanSuspendParam);
2358
2359/* ---------------------------------------------------------------------------
2360
2361 \fn sme_ConfigureResumeReq
2362
2363 \brief
2364 SME will pass this request to lower mac to Indicate that the wlan needs to
2365 be Resumed
2366
2367 \param
2368
2369 hHal - The handle returned by macOpen.
2370
2371 wlanResumeParam- Depicts the wlan resume params
2372
2373
2374 \return eHalStatus
2375
2376
2377--------------------------------------------------------------------------- */
2378eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2379 tpSirWlanResumeParam wlanResumeParam);
2380
Jeff Johnson295189b2012-06-20 16:38:30 -07002381
2382/* ---------------------------------------------------------------------------
2383
2384 \fn sme_GetInfraSessionId
2385
2386 \brief To get the session ID for infra session, if connected
2387 This is a synchronous API.
2388
2389 \param hHal - The handle returned by macOpen.
2390
2391 \return sessionid, -1 if infra session is not connected
2392
2393 -------------------------------------------------------------------------------*/
2394tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2395
2396/* ---------------------------------------------------------------------------
2397
2398 \fn sme_GetInfraOperationChannel
2399
2400 \brief To get the operating channel for infra session, if connected
2401 This is a synchronous API.
2402
2403 \param hHal - The handle returned by macOpen.
2404 \param sessionId - the sessionId returned by sme_OpenSession.
2405
2406 \return operating channel, 0 if infra session is not connected
2407
2408 -------------------------------------------------------------------------------*/
2409tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2410/* ---------------------------------------------------------------------------
2411
2412 \fn sme_GetConcurrentOperationChannel
2413
2414 \brief To get the operating channel for other concurrent sessions, if connected
2415 This is a synchronous API.
2416
2417 \param hHal - The handle returned by macOpen.
2418 \param currentPersona - persona that is trying to come up.
2419
2420 \return operating channel, 0 if infra session is not connected
2421
2422 -------------------------------------------------------------------------------*/
2423tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2424
2425/* ---------------------------------------------------------------------------
2426 \fn sme_AbortMacScan
2427 \brief API to cancel MAC scan.
2428 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302429 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302430 \return tSirAbortScanStatus return status abort scan
2431
Jeff Johnson295189b2012-06-20 16:38:30 -07002432 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302433tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2434 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002435
2436/* ---------------------------------------------------------------------------
2437 \fn sme_GetCfgValidChannels
2438 \brief API to get valid channel list
2439 \param hHal - The handle returned by macOpen.
2440 \param aValidChannels - Pointer to the valid channel list
2441 \param len - valid channel list length
2442 \return eHalStatus
2443 ---------------------------------------------------------------------------*/
2444eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2445
2446#ifdef FEATURE_WLAN_SCAN_PNO
2447
2448/* ---------------------------------------------------------------------------
2449 \fn sme_SetPreferredNetworkList
2450 \brief API to set the Preferred Network List Offload feature.
2451 \param hHal - The handle returned by macOpen.
2452 \param pRequest - Pointer to the offload request.
2453 \return eHalStatus
2454 ---------------------------------------------------------------------------*/
2455eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2456
2457/* ---------------------------------------------------------------------------
2458 \fn sme_SetRSSIFilter
2459 \brief API to set RSSI Filter feature.
2460 \param hHal - The handle returned by macOpen.
2461 \param pRequest - Pointer to the offload request.
2462 \return eHalStatus
2463 ---------------------------------------------------------------------------*/
2464eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2465
2466/******************************************************************************
2467*
2468* Name: sme_PreferredNetworkFoundInd
2469*
2470* Description:
2471* Invoke Preferred Network Found Indication
2472*
2473* Parameters:
2474* hHal - HAL handle for device
2475* pMsg - found network description
2476*
2477* Returns: eHalStatus
2478*
2479******************************************************************************/
2480eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2481#endif // FEATURE_WLAN_SCAN_PNO
2482
2483/* ---------------------------------------------------------------------------
2484 \fn sme_SetPowerParams
2485 \brief API to set Power Parameters
2486 \param hHal - The handle returned by macOpen.
2487 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002488 \param forced - if true, not to be dropped silently in host, it must reach
2489 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2490 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002491 \return eHalStatus
2492 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002493eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002494
2495/* ---------------------------------------------------------------------------
2496 \fn sme_SetTxPerTracking
2497 \brief Set Tx PER tracking configuration parameters
2498 \param hHal - The handle returned by macOpen.
2499 \param pTxPerTrackingParam - Tx PER configuration parameters
2500 \return eHalStatus
2501 ---------------------------------------------------------------------------*/
2502eHalStatus sme_SetTxPerTracking (
2503 tHalHandle hHal,
2504 void (*pCallbackfn) (void *pCallbackContext),
2505 void *pCallbackContext,
2506 tpSirTxPerTrackingParam pTxPerTrackingParam);
2507
2508#ifdef WLAN_FEATURE_PACKET_FILTERING
2509/* ---------------------------------------------------------------------------
2510 \fn sme_ReceiveFilterSetFilter
2511 \brief API to set 8023 Multicast Address List
2512 \param hHal - The handle returned by macOpen.
2513 \param pMulticastAddrs - Pointer to the Multicast Address List
2514 \return eHalStatus
2515 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002516eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002517
2518/* ---------------------------------------------------------------------------
2519 \fn sme_ReceiveFilterSetFilter
2520 \brief API to set Receive Packet Filter
2521 \param hHal - The handle returned by macOpen.
2522 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2523 \return eHalStatus
2524 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002525eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2526 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002527
2528/* ---------------------------------------------------------------------------
2529 \fn sme_GetFilterMatchCount
2530 \brief API to get D0 PC Filter Match Count
2531 \param hHal - The handle returned by macOpen
2532 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2533 \param callbackContext - Cookie to be passed back during callback
2534 \return eHalStatus
2535 ---------------------------------------------------------------------------*/
2536eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2537 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002538 void *callbackContext,
2539 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002540
2541/* ---------------------------------------------------------------------------
2542 \fn sme_ReceiveFilterClearFilter
2543 \brief API to clear Receive Packet Filter
2544 \param hHal - The handle returned by macOpen.
2545 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2546 \return eHalStatus
2547 ---------------------------------------------------------------------------*/
2548eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002549 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2550 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002551#endif // WLAN_FEATURE_PACKET_FILTERING
2552/* ---------------------------------------------------------------------------
2553
2554 \fn sme_IsChannelValid
2555 \brief To check if the channel is valid for currently established domain
2556 This is a synchronous API.
2557
2558 \param hHal - The handle returned by macOpen.
2559 \param channel - channel to verify
2560
2561 \return TRUE/FALSE, TRUE if channel is valid
2562
2563 -------------------------------------------------------------------------------*/
2564tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2565
2566/* ---------------------------------------------------------------------------
2567 \fn sme_SetFreqBand
2568 \brief Used to set frequency band.
2569 \param hHal
2570 \eBand band value to be configured
2571 \- return eHalStatus
2572 -------------------------------------------------------------------------*/
2573eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2574
2575/* ---------------------------------------------------------------------------
2576 \fn sme_GetFreqBand
2577 \brief Used to get the current band settings.
2578 \param hHal
2579 \pBand pointer to hold the current band value
2580 \- return eHalStatus
2581 -------------------------------------------------------------------------*/
2582eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2583
2584/* ---------------------------------------------------------------------------
2585
2586 \fn sme_SetTxPerTracking
2587 \brief Set Tx PER tracking configuration parameters
2588 \param hHal - The handle returned by macOpen.
2589 \param pTxPerTrackingParam - Tx PER configuration parameters
2590 \return eHalStatus
2591 ---------------------------------------------------------------------------*/
2592eHalStatus sme_SetTxPerTracking (
2593 tHalHandle hHal,
2594 void (*pCallbackfn) (void *pCallbackContext),
2595 void *pCallbackContext,
2596 tpSirTxPerTrackingParam pTxPerTrackingParam);
2597
2598#ifdef WLAN_FEATURE_GTK_OFFLOAD
2599/* ---------------------------------------------------------------------------
2600 \fn sme_SetGTKOffload
2601 \brief API to set GTK offload feature.
2602 \param hHal - The handle returned by macOpen.
2603 \param pRequest - Pointer to the GTK offload request.
2604 \return eHalStatus
2605 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002606eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002607
2608/* ---------------------------------------------------------------------------
2609 \fn sme_GetGTKOffload
2610 \brief API to get GTK offload information.
2611 \param hHal - The handle returned by macOpen.
2612 \param pRequest - Pointer to the GTK offload response.
2613 \return eHalStatus
2614 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002615eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2616 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002617#endif // WLAN_FEATURE_GTK_OFFLOAD
2618
2619#ifdef WLAN_WAKEUP_EVENTS
2620eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2621#endif // WLAN_WAKEUP_EVENTS
2622
2623/* ---------------------------------------------------------------------------
2624 \fn sme_SetTxPerTracking
2625 \brief Set Tx PER tracking configuration parameters
2626 \param hHal - The handle returned by macOpen.
2627 \param pTxPerTrackingParam - Tx PER configuration parameters
2628 \return eHalStatus
2629 ---------------------------------------------------------------------------*/
2630eHalStatus sme_SetTxPerTracking (
2631 tHalHandle hHal,
2632 void (*pCallbackfn) (void *pCallbackContext),
2633 void *pCallbackContext,
2634 tpSirTxPerTrackingParam pTxPerTrackingParam);
2635
2636
2637//return frequency for a particular channel
2638tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2639
2640tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2641
2642#if defined WLAN_FEATURE_P2P_INTERNAL
2643
2644eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2645
2646/* ---------------------------------------------------------------------------
2647 \fn sme_p2pFlushDeviceList
2648 \brief Remove cached P2P result from scan results
2649 \param hHal - The handle returned by macOpen.
2650 \param HDDSessionId - HDD's sessionId. Currently unused.
2651 \return eHalStatus
2652 ---------------------------------------------------------------------------*/
2653eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2654
2655eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2656 tCsrScanResultFilter *pFilter);
2657
2658#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2659
2660/* ---------------------------------------------------------------------------
2661 \fn sme_SetMaxTxPower
2662 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2663 setting will not persist over reboots
2664 \param hHal
2665 \param pBssid BSSID to set the power cap for
2666 \param pBssid pSelfMacAddress self MAC Address
2667 \param pBssid power to set in dB
2668 \- return eHalStatus
2669 -------------------------------------------------------------------------*/
2670eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2671 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2672
Jeff Johnson295189b2012-06-20 16:38:30 -07002673/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002674 \fn sme_SetMaxTxPowerPerBand
2675 \brief Used to set the Maximum Transmit Power for
2676 specific band dynamically. Note: this setting will not persist over reboots
2677 \param band
2678 \param power to set in dB
2679 \- return eHalStatus
2680 -------------------------------------------------------------------------*/
2681eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2682
2683/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002684
schang86c22c42013-03-13 18:41:24 -07002685 \fn sme_SetTxPower
2686
2687 \brief Set Transmit Power dynamically. Note: this setting will
2688 not persist over reboots.
2689
2690 \param hHal
2691 \param sessionId Target Session ID
2692 \param mW power to set in mW
2693 \- return eHalStatus
2694
2695 -------------------------------------------------------------------------------*/
2696eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2697
2698/* ---------------------------------------------------------------------------
2699
Jeff Johnson295189b2012-06-20 16:38:30 -07002700 \fn sme_HideSSID
2701
2702 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2703 not persist over reboots.
2704
2705 \param hHal
2706 \param sessionId
2707 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2708 \- return eHalStatus
2709
2710 -------------------------------------------------------------------------------*/
2711eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002712
2713/* ---------------------------------------------------------------------------
2714
2715 \fn sme_SetTmLevel
2716 \brief Set Thermal Mitigation Level to RIVA
2717 \param hHal - The handle returned by macOpen.
2718 \param newTMLevel - new Thermal Mitigation Level
2719 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002720 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002721 ---------------------------------------------------------------------------*/
2722eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2723
2724/*---------------------------------------------------------------------------
2725
2726 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2727 Host and FW.
2728
2729 \param hHal - HAL handle for device
2730
2731 \return NONE
2732
2733---------------------------------------------------------------------------*/
2734void sme_featureCapsExchange(tHalHandle hHal);
2735
Jeff Johnsond13512a2012-07-17 11:42:19 -07002736/*---------------------------------------------------------------------------
2737
Yathish9f22e662012-12-10 14:21:35 -08002738 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2739 between in Host.
2740
2741 \param hHal - HAL handle for device
2742
2743 \return NONE
2744
2745---------------------------------------------------------------------------*/
2746void sme_disableFeatureCapablity(tANI_U8 feature_index);
2747
2748/*---------------------------------------------------------------------------
2749
Jeff Johnsond13512a2012-07-17 11:42:19 -07002750 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2751 country code
2752 Host and FW.
2753
2754 \param hHal - HAL handle for device
2755 \param pCountry - pointer to country code
2756
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002757 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002758
2759 ---------------------------------------------------------------------------*/
2760eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2761
2762/*---------------------------------------------------------------------------
2763
2764 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2765 country code.
2766
2767 \param hHal - HAL handle for device
2768 \param pCountry - pointer to country code
2769
2770 \return Success or failure
2771
2772 ---------------------------------------------------------------------------*/
2773eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2774
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002775/* ---------------------------------------------------------------------------
2776 \fn sme_transportDebug
2777 \brief Dynamically monitoring Transport channels
2778 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002779 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002780 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002781 \param toggleStallDetect Enable stall detect feature
2782 This feature will take effect to data performance
2783 Not integrate till fully verification
2784 \- return NONE
2785 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002786void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002787
Kiran4a17ebe2013-01-31 10:43:43 -08002788/* ---------------------------------------------------------------------------
2789 \fn sme_ResetPowerValuesFor5G
2790 \brief Reset the power values for 5G band with NV power values.
2791 \param hHal - HAL handle for device
2792 \- return NONE
2793 -------------------------------------------------------------------------*/
2794void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2795
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002796#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002797/* ---------------------------------------------------------------------------
2798 \fn sme_UpdateRoamPrefer5GHz
2799 \brief enable/disable Roam prefer 5G runtime option
2800 This function is called through dynamic setConfig callback function
2801 to configure the Roam prefer 5G runtime option
2802 \param hHal - HAL handle for device
2803 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2804 \- return Success or failure
2805 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002806eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002807
2808/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002809 \fn sme_setRoamIntraBand
2810 \brief enable/disable Intra band roaming
2811 This function is called through dynamic setConfig callback function
2812 to configure the intra band roaming
2813 \param hHal - HAL handle for device
2814 \param nRoamIntraBand Enable/Disable Intra band roaming
2815 \- return Success or failure
2816 -------------------------------------------------------------------------*/
2817eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2818
2819/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002820 \fn sme_UpdateRoamScanNProbes
2821 \brief function to update roam scan N probes
2822 This function is called through dynamic setConfig callback function
2823 to update roam scan N probes
2824 \param hHal - HAL handle for device
2825 \param nProbes number of probe requests to be sent out
2826 \- return Success or failure
2827 -------------------------------------------------------------------------*/
2828eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2829
2830/* ---------------------------------------------------------------------------
2831 \fn sme_UpdateRoamScanHomeAwayTime
2832 \brief function to update roam scan Home away time
2833 This function is called through dynamic setConfig callback function
2834 to update roam scan home away time
2835 \param hHal - HAL handle for device
2836 \param nRoamScanAwayTime Scan home away time
2837 \- return Success or failure
2838 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002839eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2840 const v_U16_t nRoamScanHomeAwayTime,
2841 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002842
2843/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002844 \fn sme_getRoamIntraBand
2845 \brief get Intra band roaming
2846 \param hHal - HAL handle for device
2847 \- return Success or failure
2848 -------------------------------------------------------------------------*/
2849v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2850
2851/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002852 \fn sme_getRoamScanNProbes
2853 \brief get N Probes
2854 \param hHal - HAL handle for device
2855 \- return Success or failure
2856 -------------------------------------------------------------------------*/
2857v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2858
2859/* ---------------------------------------------------------------------------
2860 \fn sme_getRoamScanHomeAwayTime
2861 \brief get Roam scan home away time
2862 \param hHal - HAL handle for device
2863 \- return Success or failure
2864 -------------------------------------------------------------------------*/
2865v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2866
2867/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002868 \fn sme_UpdateImmediateRoamRssiDiff
2869 \brief Update nImmediateRoamRssiDiff
2870 This function is called through dynamic setConfig callback function
2871 to configure nImmediateRoamRssiDiff
2872 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2873 \param hHal - HAL handle for device
2874 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2875 candidate and current AP.
2876 \- return Success or failure
2877 -------------------------------------------------------------------------*/
2878
2879eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002880
Srinivas Girigowdade697412013-02-14 16:31:48 -08002881/* ---------------------------------------------------------------------------
2882 \fn sme_UpdateRoamRssiDiff
2883 \brief Update RoamRssiDiff
2884 This function is called through dynamic setConfig callback function
2885 to configure RoamRssiDiff
2886 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2887 \param hHal - HAL handle for device
2888 \param RoamRssiDiff - minimum rssi difference between potential
2889 candidate and current AP.
2890 \- return Success or failure
2891 -------------------------------------------------------------------------*/
2892
2893eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2894
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002895/*--------------------------------------------------------------------------
2896 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2897 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2898 isFastTransitionEnabled.
2899 This is a synchronuous call
2900 \param hHal - The handle returned by macOpen.
2901 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2902 Other status means SME is failed to update isFastTransitionEnabled.
2903 \sa
2904 --------------------------------------------------------------------------*/
2905
2906eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2907 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002908
2909/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002910 \fn sme_UpdateWESMode
2911 \brief Update WESMode
2912 This function is called through dynamic setConfig callback function
2913 to configure isWESModeEnabled
2914 \param hHal - HAL handle for device
2915 \param isWESModeEnabled - Enable/Disable WES Mode
2916 \- return Success or failure
2917 -------------------------------------------------------------------------*/
2918eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2919
2920/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002921 \fn sme_SetRoamScanControl
2922 \brief Set roam scan control
2923 This function is called to set roam scan control
2924 if roam scan control is set to 0, roaming scan cache is cleared
2925 any value other than 0 is treated as invalid value
2926 \param hHal - HAL handle for device
2927 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2928 Other status means SME failure to update
2929 -------------------------------------------------------------------------*/
2930eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002931#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002932
2933#ifdef FEATURE_WLAN_LFR
2934/*--------------------------------------------------------------------------
2935 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002936 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002937 isFastRoamIniFeatureEnabled.
2938 This is a synchronuous call
2939 \param hHal - The handle returned by macOpen.
2940 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2941 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2942 \sa
2943 --------------------------------------------------------------------------*/
2944
Srinivas Girigowdade697412013-02-14 16:31:48 -08002945eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002946 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002947
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002948/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302949 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2950 When Supplicant issue enabled / disable fwr based roaming on the basis
2951 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2952
2953 This is a synchronous call
2954 \param hHal - The handle returned by macOpen.
2955 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2956 Other status means SME is failed to (enabled/disabled) offload scan.
2957 \sa
2958 --------------------------------------------------------------------------*/
2959
2960eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2961 const v_BOOL_t isFastRoamEnabled);
2962
2963/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002964 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2965 Enable/disable LFR MAWC support at runtime
2966 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2967 isMAWCIniFeatureEnabled.
2968 This is a synchronous call
2969 \param hHal - The handle returned by macOpen.
2970 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2971 Other status means SME is failed to update MAWCEnabled.
2972 \sa
2973 --------------------------------------------------------------------------*/
2974eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2975 const v_BOOL_t MAWCEnabled);
2976
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002977
2978#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2979/*--------------------------------------------------------------------------
2980 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2981 This is a synchronuous call
2982 \param hHal - The handle returned by macOpen.
2983 \return eHAL_STATUS_SUCCESS
2984 Other status means SME is failed
2985 \sa
2986 --------------------------------------------------------------------------*/
2987
2988eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2989 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2990#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002991#endif /* FEATURE_WLAN_LFR */
2992
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002993#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002994/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002995 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002996 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002997 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002998 This is a synchronuous call
2999 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003000 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
3001 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003002 \sa
3003 --------------------------------------------------------------------------*/
3004
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003005eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
3006 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003007
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003008#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003009
3010/*--------------------------------------------------------------------------
3011 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
3012 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3013 fEnableFwRssiMonitoring.
3014 This is a synchronuous call
3015 \param hHal - The handle returned by macOpen.
3016 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
3017 Other status means SME is failed to update
3018 \sa
3019 --------------------------------------------------------------------------*/
3020
3021eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
3022 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08003023
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003024#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08003025/*--------------------------------------------------------------------------
3026 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
3027 This is a synchronuous call
3028 \param hHal - The handle returned by macOpen.
3029 \return eHAL_STATUS_SUCCESS - SME update config successful.
3030 Other status means SME is failed to update
3031 \sa
3032 --------------------------------------------------------------------------*/
3033eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
3034 v_U8_t neighborLookupRssiThreshold);
3035
3036/*--------------------------------------------------------------------------
3037 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
3038 This is a synchronuous call
3039 \param hHal - The handle returned by macOpen.
3040 \return eHAL_STATUS_SUCCESS - SME update config successful.
3041 Other status means SME is failed to update
3042 \sa
3043 --------------------------------------------------------------------------*/
3044eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
3045 v_U8_t neighborReassocRssiThreshold);
3046
3047/*--------------------------------------------------------------------------
3048 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
3049 This is a synchronuous call
3050 \param hHal - The handle returned by macOpen.
3051 \return eHAL_STATUS_SUCCESS - SME update config successful.
3052 Other status means SME is failed to update
3053 \sa
3054 --------------------------------------------------------------------------*/
3055v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
3056
3057/*--------------------------------------------------------------------------
3058 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
3059 This is a synchronuous call
3060 \param hHal - The handle returned by macOpen.
3061 \return eHAL_STATUS_SUCCESS - SME update config successful.
3062 Other status means SME is failed to update
3063 \sa
3064 --------------------------------------------------------------------------*/
3065eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
3066 v_U16_t neighborScanResultsRefreshPeriod);
3067
3068/*--------------------------------------------------------------------------
3069 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
3070 This is a synchronuous call
3071 \param hHal - The handle returned by macOpen.
3072 \return eHAL_STATUS_SUCCESS - SME update config successful.
3073 Other status means SME is failed to update
3074 \sa
3075 --------------------------------------------------------------------------*/
3076v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
3077
3078/*--------------------------------------------------------------------------
3079 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3080 This is a synchronuous call
3081 \param hHal - The handle returned by macOpen.
3082 \return eHAL_STATUS_SUCCESS - SME update config successful.
3083 Other status means SME is failed to update
3084 \sa
3085 --------------------------------------------------------------------------*/
3086v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3087
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003088/* ---------------------------------------------------------------------------
3089 \fn sme_UpdateEmptyScanRefreshPeriod
3090 \brief Update nEmptyScanRefreshPeriod
3091 This function is called through dynamic setConfig callback function
3092 to configure nEmptyScanRefreshPeriod
3093 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3094 \param hHal - HAL handle for device
3095 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3096 \- return Success or failure
3097 -------------------------------------------------------------------------*/
3098eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3099
3100/* ---------------------------------------------------------------------------
3101 \fn sme_setNeighborScanMinChanTime
3102 \brief Update nNeighborScanMinChanTime
3103 This function is called through dynamic setConfig callback function
3104 to configure gNeighborScanChannelMinTime
3105 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3106 \param hHal - HAL handle for device
3107 \param nNeighborScanMinChanTime - Channel minimum dwell time
3108 \- return Success or failure
3109 -------------------------------------------------------------------------*/
3110eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3111
3112/* ---------------------------------------------------------------------------
3113 \fn sme_setNeighborScanMaxChanTime
3114 \brief Update nNeighborScanMaxChanTime
3115 This function is called through dynamic setConfig callback function
3116 to configure gNeighborScanChannelMaxTime
3117 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3118 \param hHal - HAL handle for device
3119 \param nNeighborScanMinChanTime - Channel maximum dwell time
3120 \- return Success or failure
3121 -------------------------------------------------------------------------*/
3122eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3123
3124/* ---------------------------------------------------------------------------
3125 \fn sme_getNeighborScanMinChanTime
3126 \brief get neighbor scan min channel time
3127 \param hHal - The handle returned by macOpen.
3128 \return v_U16_t - channel min time value
3129 -------------------------------------------------------------------------*/
3130v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3131
3132/* ---------------------------------------------------------------------------
3133 \fn sme_getNeighborScanMaxChanTime
3134 \brief get neighbor scan max channel time
3135 \param hHal - The handle returned by macOpen.
3136 \return v_U16_t - channel max time value
3137 -------------------------------------------------------------------------*/
3138v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3139
3140/* ---------------------------------------------------------------------------
3141 \fn sme_setNeighborScanPeriod
3142 \brief Update nNeighborScanPeriod
3143 This function is called through dynamic setConfig callback function
3144 to configure nNeighborScanPeriod
3145 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3146 \param hHal - HAL handle for device
3147 \param nNeighborScanPeriod - neighbor scan period
3148 \- return Success or failure
3149 -------------------------------------------------------------------------*/
3150eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3151
3152/* ---------------------------------------------------------------------------
3153 \fn sme_getNeighborScanPeriod
3154 \brief get neighbor scan period
3155 \param hHal - The handle returned by macOpen.
3156 \return v_U16_t - neighbor scan period
3157 -------------------------------------------------------------------------*/
3158v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3159
3160#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003161
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003162#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003163/*--------------------------------------------------------------------------
3164 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3165 This is a synchronuous call
3166 \param hHal - The handle returned by macOpen.
3167 \return eHAL_STATUS_SUCCESS - SME update config successful.
3168 Other status means SME is failed to update
3169 \sa
3170 --------------------------------------------------------------------------*/
3171v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3172
3173/*--------------------------------------------------------------------------
3174 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3175 This is a synchronuous call
3176 \param hHal - The handle returned by macOpen.
3177 \return eHAL_STATUS_SUCCESS - SME update config successful.
3178 Other status means SME is failed to update
3179 \sa
3180 --------------------------------------------------------------------------*/
3181eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3182 tANI_U8 numChannels);
3183
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003184#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003185/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003186 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003187 This is a synchronuous call
3188 \param hHal - The handle returned by macOpen.
3189 \return eHAL_STATUS_SUCCESS - SME update config successful.
3190 Other status means SME is failed to update
3191 \sa
3192 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003193eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003194 tANI_U8 *pChannelList,
3195 tANI_U8 numChannels);
3196#endif
3197
Srinivas Girigowdade697412013-02-14 16:31:48 -08003198/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003199 \brief sme_getRoamScanChannelList() - get roam scan channel list
3200 This is a synchronuous call
3201 \param hHal - The handle returned by macOpen.
3202 \return eHAL_STATUS_SUCCESS - SME update config successful.
3203 Other status means SME is failed to update
3204 \sa
3205 --------------------------------------------------------------------------*/
3206eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3207 tANI_U8 *pNumChannels);
3208
3209/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003210 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003211 This is a synchronuous call
3212 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003213 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003214 FALSE (0) - if feature is disabled (compile or runtime)
3215 \sa
3216 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003217tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003218
3219/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003220 \brief sme_getWESMode() - getWES Mode
3221 This is a synchronous call
3222 \param hHal - The handle returned by macOpen.
3223 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3224 \sa
3225 --------------------------------------------------------------------------*/
3226v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3227
3228/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003229 \brief sme_GetRoamScanControl() - get scan control
3230 This is a synchronous call
3231 \param hHal - The handle returned by macOpen.
3232 \return v_BOOL_t - Enabled(1)/Disabled(0)
3233 \sa
3234 --------------------------------------------------------------------------*/
3235v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3236
3237/* ---------------------------------------------------------------------------
3238 \fn sme_UpdateEmptyScanRefreshPeriod
3239 \brief Update nnEmptyScanRefreshPeriod
3240 This function is called through dynamic setConfig callback function
3241 to configure nnEmptyScanRefreshPeriod
3242 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3243 \param hHal - HAL handle for device
3244 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3245 \- return Success or failure
3246 -------------------------------------------------------------------------*/
3247
3248/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003249 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3250 This is a synchronuous call
3251 \param hHal - The handle returned by macOpen.
3252 \return TRUE (1) - if the feature is enabled
3253 FALSE (0) - if feature is disabled (compile or runtime)
3254 \sa
3255 --------------------------------------------------------------------------*/
3256tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3257
3258/*--------------------------------------------------------------------------
3259 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3260 This is a synchronuous call
3261 \param hHal - The handle returned by macOpen.
3262 \return TRUE (1) - if the feature is enabled
3263 FALSE (0) - if feature is disabled (compile or runtime)
3264 \sa
3265 --------------------------------------------------------------------------*/
3266tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3267
Srinivas Girigowdade697412013-02-14 16:31:48 -08003268#endif
3269
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003270#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3271/*--------------------------------------------------------------------------
3272 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3273 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3274 gRoamScanOffloadEnabled.
3275 This is a synchronous call
3276 \param hHal - The handle returned by macOpen.
3277 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3278 Other status means SME is failed to update.
3279 \sa
3280 --------------------------------------------------------------------------*/
3281
3282eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3283#endif
3284
c_manjeecfd1efb2015-09-25 19:32:34 +05303285eHalStatus sme_FwMemDumpReq(tHalHandle hHal, tAniFwrDumpReq *recv_req);
3286
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003287
Srinivas Girigowdade697412013-02-14 16:31:48 -08003288/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003289 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303290 \brief Check if a feature is enabled by FW
3291
3292 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003293 A value from enum placeHolderInCapBitmap
3294
3295 \- return 1/0 (TRUE/FALSE)
3296 -------------------------------------------------------------------------*/
3297tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303298
3299/* ---------------------------------------------------------------------------
3300 \fn sme_IsFeatureSupportedByDriver
3301 \brief Check if a feature is enabled by driver
3302
3303 \param featEnumValue - Enumeration value of the feature to be checked.
3304 A value from enum placeHolderInCapBitmap
3305
3306 \- return 1/0 (TRUE/FALSE)
3307 -------------------------------------------------------------------------*/
3308tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3309
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003310#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303311
3312/* ---------------------------------------------------------------------------
3313 \fn sme_SendTdlsLinkEstablishParams
3314 \brief API to send TDLS Link Establishment Parameters.
3315
3316 \param peerMac - peer's Mac Adress.
3317 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3318 \- return VOS_STATUS_SUCCES
3319 -------------------------------------------------------------------------*/
3320
3321VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303322 tANI_U8 sessionId,
3323#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3324 const tSirMacAddr peerMac,
3325#else
3326 tSirMacAddr peerMac,
3327#endif
3328 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303329
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003330/* ---------------------------------------------------------------------------
3331 \fn sme_SendTdlsMgmtFrame
3332 \brief API to send TDLS management frames.
3333
3334 \param peerMac - peer's Mac Adress.
3335 \param frame_type - Type of TDLS mgmt frame to be sent.
3336 \param dialog - dialog token used in the frame.
3337 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303338 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003339 \param buf - additional IEs to be included
3340 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003341 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003342 \- return VOS_STATUS_SUCCES
3343 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303344VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3345#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3346 const tSirMacAddr peerMac,
3347#else
3348 tSirMacAddr peerMac,
3349#endif
3350 tANI_U8 frame_type, tANI_U8 dialog,
3351 tANI_U16 status, tANI_U32 peerCapability,
3352 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003353/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003354 \fn sme_ChangeTdlsPeerSta
3355 \brief API to Update TDLS peer sta parameters.
3356
3357 \param peerMac - peer's Mac Adress.
3358 \param staParams - Peer Station Parameters.
3359 \- return VOS_STATUS_SUCCES
3360 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303361VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3362#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3363 const tSirMacAddr peerMac,
3364#else
3365 tSirMacAddr peerMac,
3366#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003367 tCsrStaParams *pstaParams);
3368/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003369 \fn sme_AddTdlsPeerSta
3370 \brief API to Add TDLS peer sta entry.
3371
3372 \param peerMac - peer's Mac Adress.
3373 \- return VOS_STATUS_SUCCES
3374 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303375VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3376#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3377 const tSirMacAddr peerMac
3378#else
3379 tSirMacAddr peerMac
3380#endif
3381 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003382/* ---------------------------------------------------------------------------
3383 \fn sme_DeleteTdlsPeerSta
3384 \brief API to Delete TDLS peer sta entry.
3385
3386 \param peerMac - peer's Mac Adress.
3387 \- return VOS_STATUS_SUCCES
3388 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303389VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3390#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3391 const tSirMacAddr peerMac
3392#else
3393 tSirMacAddr peerMac
3394#endif
3395 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003396/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003397 \fn sme_SetTdlsPowerSaveProhibited
3398 \API to set/reset the isTdlsPowerSaveProhibited.
3399
3400 \- return void
3401 -------------------------------------------------------------------------*/
3402void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003403#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303404/* ---------------------------------------------------------------------------
3405 \fn sme_IsPmcBmps
3406 \brief API to Check if PMC state is BMPS.
3407
3408 \- return v_BOOL_t
3409 -------------------------------------------------------------------------*/
3410v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3411
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003412eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003413
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303414/* ---------------------------------------------------------------------------
3415 \fn sme_UpdateDFSRoamMode
3416 \brief Update DFS roam scan mode
3417 This function is called to configure allowDFSChannelRoam
3418 dynamically
3419 \param hHal - HAL handle for device
3420 \param allowDFSChannelRoam - DFS roaming scan mode
3421 mode 0 disable roam scan on DFS channels
3422 mode 1 enables roam scan (passive/active) on DFS channels
3423 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3424 successfully.
3425 Other status means SME failed to update DFS roaming scan config.
3426 \sa
3427 -------------------------------------------------------------------------*/
3428eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3429
3430/* ---------------------------------------------------------------------------
3431 \fn sme_UpdateDFSScanMode
3432 \brief Update DFS scan mode
3433 This function is called to configure fEnableDFSChnlScan.
3434 \param hHal - HAL handle for device
3435 \param dfsScanMode - DFS scan mode
3436 mode 0 disable scan on DFS channels
3437 mode 1 enables passive scan on DFS channels
3438 mode 2 enables active scan on DFS channels for static list
3439 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3440 successfully.
3441 Other status means SME failed to update DFS scan config.
3442 \sa
3443 -------------------------------------------------------------------------*/
3444eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3445
3446/*--------------------------------------------------------------------------
3447 \brief sme_GetDFSScanMode() - get DFS scan mode
3448 \param hHal - The handle returned by macOpen.
3449 \return DFS scan mode
3450 mode 0 disable scan on DFS channels
3451 mode 1 enables passive scan on DFS channels
3452 mode 2 enables active scan on DFS channels for static list
3453 \sa
3454 --------------------------------------------------------------------------*/
3455v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3456
3457/* ---------------------------------------------------------------------------
3458 \fn sme_HandleDFSChanScan
3459 \brief Gets Valid channel list and updates scan control list according to
3460 dfsScanMode
3461 \param hHal - HAL handle for device
3462 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3463 Otherwise eHAL_STATUS_SUCCESS -
3464 \sa
3465 -------------------------------------------------------------------------*/
3466eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3467
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003468/*
3469 * SME API to enable/disable WLAN driver initiated SSR
3470 */
3471void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3472
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303473/* ---------------------------------------------------------------------------
3474
3475 \fn sme_SetPhyMode
3476
3477 \brief Changes the PhyMode.
3478
3479 \param hHal - The handle returned by macOpen.
3480
3481 \param phyMode new phyMode which is to set
3482
3483 \return eHalStatus SUCCESS.
3484
3485 -------------------------------------------------------------------------------*/
3486eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3487
3488/* ---------------------------------------------------------------------------
3489
3490 \fn sme_GetPhyMode
3491
3492 \brief gets current PhyMode.
3493
3494 \param hHal - The handle returned by macOpen.
3495
3496 \return eHalStatus PhyMode
3497
3498 -------------------------------------------------------------------------------*/
3499eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3500
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003501/*
3502 * SME API to determine the channel bonding mode
3503 */
3504VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3505
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003506#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3507/*--------------------------------------------------------------------------
3508 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3509 from CSR.
3510 This is a synchronous call
3511 \param hHal - The handle returned by macOpen
3512 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3513 BSSID, channel etc.)
3514 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3515 Other status means SME is failed to send the request.
3516 \sa
3517 --------------------------------------------------------------------------*/
3518
3519eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3520#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003521/*--------------------------------------------------------------------------
3522 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3523 is any connected session .
3524 This is a synchronous call
3525 \param hHal - The handle returned by macOpen
3526 \return VOS_STATUS - SME passed the request to CSR successfully.
3527 Other status means SME is failed to send the request.
3528 \sa
3529 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003530VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003531
Agarwal Ashish57e84372014-12-05 18:26:53 +05303532/*--------------------------------------------------------------------------
3533 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3534 is any connected session .
3535 This is a synchronous call
3536 \param hHal - The handle returned by macOpen
3537 \return VOS_STATUS - SME passed the request to CSR successfully.
3538 Other status means SME is failed to send the request.
3539 \sa
3540 --------------------------------------------------------------------------*/
3541VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3542
Leo Chang9056f462013-08-01 19:21:11 -07003543#ifdef FEATURE_WLAN_LPHB
3544/* ---------------------------------------------------------------------------
3545 \fn sme_LPHBConfigReq
3546 \API to make configuration LPHB within FW.
3547 \param hHal - The handle returned by macOpen
3548 \param lphdReq - LPHB request argument by client
3549 \param pCallbackfn - LPHB timeout notification callback function pointer
3550 \- return Configuration message posting status, SUCCESS or Fail
3551 -------------------------------------------------------------------------*/
3552eHalStatus sme_LPHBConfigReq(
3553 tHalHandle hHal,
3554 tSirLPHBReq *lphdReq,
3555 void (*pCallbackfn)(void *pAdapter, void *indParam));
3556#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003557
3558/* ---------------------------------------------------------------------------
3559 \fn sme_AddPeriodicTxPtrn
3560 \brief API to Periodic TX Pattern Offload feature
3561 \param hHal - The handle returned by macOpen
3562 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3563 \return eHalStatus
3564 ---------------------------------------------------------------------------*/
3565eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3566 *addPeriodicTxPtrnParams);
3567
3568/* ---------------------------------------------------------------------------
3569 \fn sme_DelPeriodicTxPtrn
3570 \brief API to Periodic TX Pattern Offload feature
3571 \param hHal - The handle returned by macOpen
3572 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3573 \return eHalStatus
3574 ---------------------------------------------------------------------------*/
3575eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3576 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003577/*--------------------------------------------------------------------------
3578 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3579 scan parameter.
3580 This is a synchronous call
3581 \param hHal - The handle returned by macOpen
3582 \return None.
3583 \sa
3584 --------------------------------------------------------------------------*/
3585void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3586 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303587
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003588/* ---------------------------------------------------------------------------
3589 \fn sme_SendRateUpdateInd
3590 \brief API to Update rate
3591 \param hHal - The handle returned by macOpen
3592 \param rateUpdateParams - Pointer to rate update params
3593 \return eHalStatus
3594 ---------------------------------------------------------------------------*/
3595eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3596
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303597/*
3598 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3599 * triggers
3600 * return status
3601*/
3602eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3603 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303604 tSmeFastRoamTrigger fastRoamTrig,
3605 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303606
3607eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303608#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3609 const tANI_U8 *pBSSId,
3610#else
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303611 tANI_U8 *pBSSId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303612#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303613 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003614
3615void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303616
3617#ifdef FEATURE_WLAN_BATCH_SCAN
3618/* ---------------------------------------------------------------------------
3619 \fn sme_SetBatchScanReq
3620 \brief API to set batch scan request in FW
3621 \param hHal - The handle returned by macOpen.
3622 \param pRequest - Pointer to the batch request.
3623 \param sessionId - session ID
3624 \param callbackRoutine - HDD callback which needs to be invoked after
3625 getting set batch scan response from FW
3626 \param callbackContext - pAdapter context
3627 \return eHalStatus
3628 ---------------------------------------------------------------------------*/
3629eHalStatus
3630sme_SetBatchScanReq
3631(
3632 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3633 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3634 void *callbackContext
3635);
3636
3637/* ---------------------------------------------------------------------------
3638 \fn sme_TriggerBatchScanResultInd
3639 \brief API to trigger batch scan result indications from from FW
3640 \param hHal - The handle returned by macOpen.
3641 \param pRequest - Pointer to get batch request.
3642 \param sessionId - session ID
3643 \param callbackRoutine - HDD callback which needs to be invoked after
3644 getting get batch scan response from FW
3645 \param callbackContext - pAdapter context
3646 \return eHalStatus
3647 ---------------------------------------------------------------------------*/
3648eHalStatus
3649sme_TriggerBatchScanResultInd
3650(
3651 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3652 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3653 void *callbackContext
3654);
3655
3656/* ---------------------------------------------------------------------------
3657 \fn sme_StopBatchScanInd
3658 \brief API to stop batch scan request in FW
3659 \param hHal - The handle returned by macOpen.
3660 \param pRequest - Pointer to stop batch indication
3661 \return eHalStatus
3662 ---------------------------------------------------------------------------*/
3663eHalStatus
3664sme_StopBatchScanInd
3665(
3666 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3667);
3668
3669#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003670
3671#ifdef FEATURE_WLAN_CH_AVOID
3672/* ---------------------------------------------------------------------------
3673 \fn sme_AddChAvoidCallback
3674 \brief Used to plug in callback function
3675 Which notify channel may not be used with SAP or P2PGO mode.
3676 Notification come from FW.
3677 \param hHal
3678 \param pCallbackfn : callback function pointer should be plugged in
3679 \- return eHalStatus
3680 -------------------------------------------------------------------------*/
3681eHalStatus sme_AddChAvoidCallback
3682(
3683 tHalHandle hHal,
3684 void (*pCallbackfn)(void *pAdapter, void *indParam)
3685);
3686#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003687eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303688
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303689/* ---------------------------------------------------------------------------
3690 \fn sme_requestTypetoString
3691 \brief API to convert requestType enum values
3692 to string.
3693 ---------------------------------------------------------------------------*/
3694const char * sme_requestTypetoString(const v_U8_t requestType);
3695/* ---------------------------------------------------------------------------
3696 \fn sme_PmcStatetoString
3697 \brief API to convert PmcState enum values
3698 to string.
3699 ---------------------------------------------------------------------------*/
3700const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303701
3702eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3703
Agarwal Ashish5e414792014-06-08 15:25:23 +05303704tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303705
3706// tdlsoffchan
3707VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3708 tANI_U8 sessionId,
3709 tSirMacAddr peerMac,
3710 tANI_S32 tdlsOffCh,
3711 tANI_S32 tdlsOffChBwOffset,
3712 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303713eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3714 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303715void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303716
3717void sme_resetCoexEevent(tHalHandle hHal);
3718
Peng Xu117eab42014-09-25 13:33:27 +05303719tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3720tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303721#ifdef WLAN_FEATURE_AP_HT40_24G
3722void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3723 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303724eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3725 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303726#endif
Peng Xu117eab42014-09-25 13:33:27 +05303727
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303728eHalStatus sme_set_rssi_threshold_breached_cb(tHalHandle hal,
3729 void (*cb)(void *, struct rssi_breach_event *));
3730
Agarwal Ashish738843c2014-09-25 12:27:56 +05303731void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3732
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303733/* HDD Callback function */
3734typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3735
3736eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3737 u8 *pCmd,
3738 int length,
3739 pEncryptMsgRSPCb encCB);
3740
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303741/* ---------------------------------------------------------------------------
3742 \fn sme_RegisterBtCoexTDLSCallback
3743 \brief Used to plug in callback function
3744 Which notify btcoex on or off.
3745 Notification come from FW.
3746 \param hHal
3747 \param pCallbackfn : callback function pointer should be plugged in
3748 \- return eHalStatus
3749 -------------------------------------------------------------------------*/
3750eHalStatus sme_RegisterBtCoexTDLSCallback
3751(
3752 tHalHandle hHal,
3753 void (*pCallbackfn)(void *pAdapter, int)
3754);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303755
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303756/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303757 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303758
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303759 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303760
3761 \param hHal - The handle returned by macOpen.
3762
3763 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3764 eANI_BOOLEAN_FALSE otherwise
3765---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303766tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303767
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303768/* ---------------------------------------------------------------------------
3769
3770 \fn sme_IsTdlsOffChannelValid
3771 \brief To check if the channel is valid for currently established domain
3772 This is a synchronous API.
3773
3774 \param hHal - The handle returned by macOpen.
3775 \param channel - channel to verify
3776
3777 \return TRUE/FALSE, TRUE if channel is valid
3778
3779 -------------------------------------------------------------------------------*/
3780tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3781
Mukul Sharma4be88422015-03-09 20:29:07 +05303782/* --------------------------------------------------------------------------
3783
3784 \fn sme_IsCoexScoIndicationSet
3785 \brief To check if the BTC module in fwr has sent the SCO
3786 indication to host or not
3787
3788 \param hHal - The handle returned by macOpen.
3789 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3790
3791 --------------------------------------------------------------------------*/
3792tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3793
Abhishek Singh01c73d12015-03-12 15:13:44 +05303794eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3795 tANI_U32 iniNumBuffAdvert,
3796 tANI_U32 set_value);
3797
Mukul Sharma45063942015-04-01 20:07:59 +05303798void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303799
3800/* ---------------------------------------------------------------------------
3801 \fn sme_SetTdls2040BSSCoexistence
3802 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3803
3804 \param isEnabled - Enable or Disable.
3805 \- return VOS_STATUS_SUCCES
3806 -------------------------------------------------------------------------*/
3807eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3808
Abhishek Singh41988ba2015-05-25 19:42:29 +05303809/* ---------------------------------------------------------------------------
3810 \fn sme_SetRtsCtsHtVht
3811 \brief API to to enable/disable RTS/CTS for different modes.
3812
3813 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3814 \- return VOS_STATUS_SUCCES if INdication is posted to
3815 WDA else return eHAL_STATUS_FAILURE
3816 -------------------------------------------------------------------------*/
3817eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3818
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303819tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
3820 tANI_U8 fcc_constraint);
3821
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303822eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303823eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
Abhishek Singh837adf22015-10-01 17:37:37 +05303824 tANI_U32 indicator, tANI_U32 reason_code,
3825 tANI_BOOLEAN dump_vos_trace);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303826
Mahesh A Saptasagarbeca12c2015-09-07 16:21:06 +05303827eHalStatus sme_enableDisableChanAvoidIndEvent(tHalHandle hHal,
3828 tANI_U8 set_value);
3829
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303830/* ---------------------------------------------------------------------------
3831 \fn sme_set_wificonfig_params
3832 \brief API to set WifiConfiguration Parameters.
3833
3834 \param wifi_config_param - Wificonfig parameter 1.Averaging factor 2. Guard time
3835 \- return VOS_STATUS_SUCCES if INdication is posted to
3836 WDA else return eHAL_STATUS_FAILURE
3837 -------------------------------------------------------------------------*/
3838
3839eHalStatus sme_set_wificonfig_params(tHalHandle hHal, tSetWifiConfigParams *req);
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +05303840eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
3841 tANI_U32 *regInfo1, tANI_U32 *regInfo2);
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303842
Jeff Johnson295189b2012-06-20 16:38:30 -07003843#endif //#if !defined( __SME_API_H )