blob: 5fe1fa53780a9ae855713a5f2c038cadb7534838 [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
Abhishek Singh16e05762015-11-30 14:29:27 +05302192eHalStatus sme_register_mgmt_frame_ind_callback(tHalHandle hHal,
2193 sir_mgmt_frame_ind_callback callback);
2194
Jeff Johnson295189b2012-06-20 16:38:30 -07002195/* ---------------------------------------------------------------------------
2196
2197 \fn sme_RegisterMgtFrame
2198
2199 \brief To register managment frame of specified type and subtype.
2200 \param frameType - type of the frame that needs to be passed to HDD.
2201 \param matchData - data which needs to be matched before passing frame
2202 to HDD.
2203 \param matchDataLen - Length of matched data.
2204 \return eHalStatus
2205 -------------------------------------------------------------------------------*/
2206eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2207 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2208
2209/* ---------------------------------------------------------------------------
2210
2211 \fn sme_DeregisterMgtFrame
2212
2213 \brief To De-register managment frame of specified type and subtype.
2214 \param frameType - type of the frame that needs to be passed to HDD.
2215 \param matchData - data which needs to be matched before passing frame
2216 to HDD.
2217 \param matchDataLen - Length of matched data.
2218 \return eHalStatus
2219 -------------------------------------------------------------------------------*/
2220eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2221 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302222/* ---------------------------------------------------------------------------
2223 \fn sme_GetFramesLog
2224 \brief a wrapper function that client calls to register a callback to get
2225 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302226 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302227 \return eHalStatus
2228 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302229eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002230/* ---------------------------------------------------------------------------
2231
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302232 \fn sme_InitMgmtFrameLogging
2233
2234 \brief
2235 SME will pass this request to lower mac to initialize Frame Logging.
2236
2237 \param
2238
2239 hHal - The handle returned by macOpen.
2240
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302241 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302242
2243 \return eHalStatus
2244--------------------------------------------------------------------------- */
2245eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302246 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302247
Gupta, Kapil7c34b322015-09-30 13:12:35 +05302248
2249/* ---------------------------------------------------------------------------
2250
2251 \fn sme_StopRssiMonitoring
2252
2253 \brief
2254 SME will pass this request to lower mac to stop monitoring rssi range on
2255 a bssid.
2256
2257 \param
2258
2259 hHal - The handle returned by macOpen.
2260
2261 tSirRssiMonitorReq req- depict the monitor req params.
2262
2263 \return eHalStatus
2264
2265--------------------------------------------------------------------------- */
2266eHalStatus sme_StopRssiMonitoring(tHalHandle hHal,
2267 tSirRssiMonitorReq *req);
2268
2269/* ---------------------------------------------------------------------------
2270
2271 \fn sme_StartRssiMonitoring
2272
2273 \brief
2274 SME will pass this request to lower mac to start monitoring rssi range on
2275 a bssid.
2276
2277 \param
2278
2279 hHal - The handle returned by macOpen.
2280
2281 tSirRssiMonitorReq req- depict the monitor req params.
2282
2283 \return eHalStatus
2284
2285--------------------------------------------------------------------------- */
2286eHalStatus sme_StartRssiMonitoring(tHalHandle hHal,
2287 tSirRssiMonitorReq *req);
2288
2289
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302290/* ---------------------------------------------------------------------------
2291
Jeff Johnson295189b2012-06-20 16:38:30 -07002292 \fn sme_ConfigureRxpFilter
2293
2294 \brief
2295 SME will pass this request to lower mac to set/reset the filter on RXP for
2296 multicast & broadcast traffic.
2297
2298 \param
2299
2300 hHal - The handle returned by macOpen.
2301
2302 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2303 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2304 on this param. In future we can use this as a mask to set various types of
2305 filters as suggested below:
2306 FILTER_ALL_MULTICAST:
2307 FILTER_ALL_BROADCAST:
2308 FILTER_ALL_MULTICAST_BROADCAST:
2309
2310
2311 \return eHalStatus
2312
2313
2314--------------------------------------------------------------------------- */
2315eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2316 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2317
2318/* ---------------------------------------------------------------------------
2319
2320 \fn sme_ConfigureAppsCpuWakeupState
2321
2322 \brief
2323 SME will pass this request to lower mac to dynamically adjusts the listen
2324 interval based on the WLAN/MSM activity. This feature is named as
2325 Telescopic Beacon wakeup feature.
2326
2327 \param
2328
2329 hHal - The handle returned by macOpen.
2330
2331 isAppsAwake- Depicts the state of the Apps CPU
2332
2333
2334 \return eHalStatus
2335
2336
2337--------------------------------------------------------------------------- */
2338eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2339
Jeff Johnson295189b2012-06-20 16:38:30 -07002340/* ---------------------------------------------------------------------------
2341
2342 \fn sme_ConfigureSuspendInd
2343
2344 \brief
2345 SME will pass this request to lower mac to Indicate that the wlan needs to
2346 be suspended
2347
2348 \param
2349
2350 hHal - The handle returned by macOpen.
2351
2352 wlanSuspendParam- Depicts the wlan suspend params
2353
2354
2355 \return eHalStatus
2356
2357
2358--------------------------------------------------------------------------- */
2359eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2360 tpSirWlanSuspendParam wlanSuspendParam);
2361
2362/* ---------------------------------------------------------------------------
2363
2364 \fn sme_ConfigureResumeReq
2365
2366 \brief
2367 SME will pass this request to lower mac to Indicate that the wlan needs to
2368 be Resumed
2369
2370 \param
2371
2372 hHal - The handle returned by macOpen.
2373
2374 wlanResumeParam- Depicts the wlan resume params
2375
2376
2377 \return eHalStatus
2378
2379
2380--------------------------------------------------------------------------- */
2381eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2382 tpSirWlanResumeParam wlanResumeParam);
2383
Jeff Johnson295189b2012-06-20 16:38:30 -07002384
2385/* ---------------------------------------------------------------------------
2386
2387 \fn sme_GetInfraSessionId
2388
2389 \brief To get the session ID for infra session, if connected
2390 This is a synchronous API.
2391
2392 \param hHal - The handle returned by macOpen.
2393
2394 \return sessionid, -1 if infra session is not connected
2395
2396 -------------------------------------------------------------------------------*/
2397tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2398
2399/* ---------------------------------------------------------------------------
2400
2401 \fn sme_GetInfraOperationChannel
2402
2403 \brief To get the operating channel for infra session, if connected
2404 This is a synchronous API.
2405
2406 \param hHal - The handle returned by macOpen.
2407 \param sessionId - the sessionId returned by sme_OpenSession.
2408
2409 \return operating channel, 0 if infra session is not connected
2410
2411 -------------------------------------------------------------------------------*/
2412tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2413/* ---------------------------------------------------------------------------
2414
2415 \fn sme_GetConcurrentOperationChannel
2416
2417 \brief To get the operating channel for other concurrent sessions, if connected
2418 This is a synchronous API.
2419
2420 \param hHal - The handle returned by macOpen.
2421 \param currentPersona - persona that is trying to come up.
2422
2423 \return operating channel, 0 if infra session is not connected
2424
2425 -------------------------------------------------------------------------------*/
2426tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2427
2428/* ---------------------------------------------------------------------------
2429 \fn sme_AbortMacScan
2430 \brief API to cancel MAC scan.
2431 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302432 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302433 \return tSirAbortScanStatus return status abort scan
2434
Jeff Johnson295189b2012-06-20 16:38:30 -07002435 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302436tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2437 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002438
2439/* ---------------------------------------------------------------------------
2440 \fn sme_GetCfgValidChannels
2441 \brief API to get valid channel list
2442 \param hHal - The handle returned by macOpen.
2443 \param aValidChannels - Pointer to the valid channel list
2444 \param len - valid channel list length
2445 \return eHalStatus
2446 ---------------------------------------------------------------------------*/
2447eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2448
2449#ifdef FEATURE_WLAN_SCAN_PNO
2450
2451/* ---------------------------------------------------------------------------
2452 \fn sme_SetPreferredNetworkList
2453 \brief API to set the Preferred Network List Offload feature.
2454 \param hHal - The handle returned by macOpen.
2455 \param pRequest - Pointer to the offload request.
2456 \return eHalStatus
2457 ---------------------------------------------------------------------------*/
2458eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2459
2460/* ---------------------------------------------------------------------------
2461 \fn sme_SetRSSIFilter
2462 \brief API to set RSSI Filter feature.
2463 \param hHal - The handle returned by macOpen.
2464 \param pRequest - Pointer to the offload request.
2465 \return eHalStatus
2466 ---------------------------------------------------------------------------*/
2467eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2468
2469/******************************************************************************
2470*
2471* Name: sme_PreferredNetworkFoundInd
2472*
2473* Description:
2474* Invoke Preferred Network Found Indication
2475*
2476* Parameters:
2477* hHal - HAL handle for device
2478* pMsg - found network description
2479*
2480* Returns: eHalStatus
2481*
2482******************************************************************************/
2483eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2484#endif // FEATURE_WLAN_SCAN_PNO
2485
2486/* ---------------------------------------------------------------------------
2487 \fn sme_SetPowerParams
2488 \brief API to set Power Parameters
2489 \param hHal - The handle returned by macOpen.
2490 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002491 \param forced - if true, not to be dropped silently in host, it must reach
2492 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2493 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002494 \return eHalStatus
2495 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002496eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002497
2498/* ---------------------------------------------------------------------------
2499 \fn sme_SetTxPerTracking
2500 \brief Set Tx PER tracking configuration parameters
2501 \param hHal - The handle returned by macOpen.
2502 \param pTxPerTrackingParam - Tx PER configuration parameters
2503 \return eHalStatus
2504 ---------------------------------------------------------------------------*/
2505eHalStatus sme_SetTxPerTracking (
2506 tHalHandle hHal,
2507 void (*pCallbackfn) (void *pCallbackContext),
2508 void *pCallbackContext,
2509 tpSirTxPerTrackingParam pTxPerTrackingParam);
2510
2511#ifdef WLAN_FEATURE_PACKET_FILTERING
2512/* ---------------------------------------------------------------------------
2513 \fn sme_ReceiveFilterSetFilter
2514 \brief API to set 8023 Multicast Address List
2515 \param hHal - The handle returned by macOpen.
2516 \param pMulticastAddrs - Pointer to the Multicast Address List
2517 \return eHalStatus
2518 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002519eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002520
2521/* ---------------------------------------------------------------------------
2522 \fn sme_ReceiveFilterSetFilter
2523 \brief API to set Receive Packet Filter
2524 \param hHal - The handle returned by macOpen.
2525 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2526 \return eHalStatus
2527 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002528eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2529 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002530
2531/* ---------------------------------------------------------------------------
2532 \fn sme_GetFilterMatchCount
2533 \brief API to get D0 PC Filter Match Count
2534 \param hHal - The handle returned by macOpen
2535 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2536 \param callbackContext - Cookie to be passed back during callback
2537 \return eHalStatus
2538 ---------------------------------------------------------------------------*/
2539eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2540 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002541 void *callbackContext,
2542 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002543
2544/* ---------------------------------------------------------------------------
2545 \fn sme_ReceiveFilterClearFilter
2546 \brief API to clear Receive Packet Filter
2547 \param hHal - The handle returned by macOpen.
2548 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2549 \return eHalStatus
2550 ---------------------------------------------------------------------------*/
2551eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002552 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2553 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002554#endif // WLAN_FEATURE_PACKET_FILTERING
2555/* ---------------------------------------------------------------------------
2556
2557 \fn sme_IsChannelValid
2558 \brief To check if the channel is valid for currently established domain
2559 This is a synchronous API.
2560
2561 \param hHal - The handle returned by macOpen.
2562 \param channel - channel to verify
2563
2564 \return TRUE/FALSE, TRUE if channel is valid
2565
2566 -------------------------------------------------------------------------------*/
2567tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2568
2569/* ---------------------------------------------------------------------------
2570 \fn sme_SetFreqBand
2571 \brief Used to set frequency band.
2572 \param hHal
2573 \eBand band value to be configured
2574 \- return eHalStatus
2575 -------------------------------------------------------------------------*/
2576eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2577
2578/* ---------------------------------------------------------------------------
2579 \fn sme_GetFreqBand
2580 \brief Used to get the current band settings.
2581 \param hHal
2582 \pBand pointer to hold the current band value
2583 \- return eHalStatus
2584 -------------------------------------------------------------------------*/
2585eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2586
2587/* ---------------------------------------------------------------------------
2588
2589 \fn sme_SetTxPerTracking
2590 \brief Set Tx PER tracking configuration parameters
2591 \param hHal - The handle returned by macOpen.
2592 \param pTxPerTrackingParam - Tx PER configuration parameters
2593 \return eHalStatus
2594 ---------------------------------------------------------------------------*/
2595eHalStatus sme_SetTxPerTracking (
2596 tHalHandle hHal,
2597 void (*pCallbackfn) (void *pCallbackContext),
2598 void *pCallbackContext,
2599 tpSirTxPerTrackingParam pTxPerTrackingParam);
2600
2601#ifdef WLAN_FEATURE_GTK_OFFLOAD
2602/* ---------------------------------------------------------------------------
2603 \fn sme_SetGTKOffload
2604 \brief API to set GTK offload feature.
2605 \param hHal - The handle returned by macOpen.
2606 \param pRequest - Pointer to the GTK offload request.
2607 \return eHalStatus
2608 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002609eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002610
2611/* ---------------------------------------------------------------------------
2612 \fn sme_GetGTKOffload
2613 \brief API to get GTK offload information.
2614 \param hHal - The handle returned by macOpen.
2615 \param pRequest - Pointer to the GTK offload response.
2616 \return eHalStatus
2617 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002618eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2619 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002620#endif // WLAN_FEATURE_GTK_OFFLOAD
2621
2622#ifdef WLAN_WAKEUP_EVENTS
2623eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2624#endif // WLAN_WAKEUP_EVENTS
2625
2626/* ---------------------------------------------------------------------------
2627 \fn sme_SetTxPerTracking
2628 \brief Set Tx PER tracking configuration parameters
2629 \param hHal - The handle returned by macOpen.
2630 \param pTxPerTrackingParam - Tx PER configuration parameters
2631 \return eHalStatus
2632 ---------------------------------------------------------------------------*/
2633eHalStatus sme_SetTxPerTracking (
2634 tHalHandle hHal,
2635 void (*pCallbackfn) (void *pCallbackContext),
2636 void *pCallbackContext,
2637 tpSirTxPerTrackingParam pTxPerTrackingParam);
2638
2639
2640//return frequency for a particular channel
2641tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2642
2643tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2644
2645#if defined WLAN_FEATURE_P2P_INTERNAL
2646
2647eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2648
2649/* ---------------------------------------------------------------------------
2650 \fn sme_p2pFlushDeviceList
2651 \brief Remove cached P2P result from scan results
2652 \param hHal - The handle returned by macOpen.
2653 \param HDDSessionId - HDD's sessionId. Currently unused.
2654 \return eHalStatus
2655 ---------------------------------------------------------------------------*/
2656eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2657
2658eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2659 tCsrScanResultFilter *pFilter);
2660
2661#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2662
2663/* ---------------------------------------------------------------------------
2664 \fn sme_SetMaxTxPower
2665 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2666 setting will not persist over reboots
2667 \param hHal
2668 \param pBssid BSSID to set the power cap for
2669 \param pBssid pSelfMacAddress self MAC Address
2670 \param pBssid power to set in dB
2671 \- return eHalStatus
2672 -------------------------------------------------------------------------*/
2673eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2674 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2675
Jeff Johnson295189b2012-06-20 16:38:30 -07002676/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002677 \fn sme_SetMaxTxPowerPerBand
2678 \brief Used to set the Maximum Transmit Power for
2679 specific band dynamically. Note: this setting will not persist over reboots
2680 \param band
2681 \param power to set in dB
2682 \- return eHalStatus
2683 -------------------------------------------------------------------------*/
2684eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2685
2686/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002687
schang86c22c42013-03-13 18:41:24 -07002688 \fn sme_SetTxPower
2689
2690 \brief Set Transmit Power dynamically. Note: this setting will
2691 not persist over reboots.
2692
2693 \param hHal
2694 \param sessionId Target Session ID
2695 \param mW power to set in mW
2696 \- return eHalStatus
2697
2698 -------------------------------------------------------------------------------*/
2699eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2700
2701/* ---------------------------------------------------------------------------
2702
Jeff Johnson295189b2012-06-20 16:38:30 -07002703 \fn sme_HideSSID
2704
2705 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2706 not persist over reboots.
2707
2708 \param hHal
2709 \param sessionId
2710 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2711 \- return eHalStatus
2712
2713 -------------------------------------------------------------------------------*/
2714eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002715
2716/* ---------------------------------------------------------------------------
2717
2718 \fn sme_SetTmLevel
2719 \brief Set Thermal Mitigation Level to RIVA
2720 \param hHal - The handle returned by macOpen.
2721 \param newTMLevel - new Thermal Mitigation Level
2722 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002723 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002724 ---------------------------------------------------------------------------*/
2725eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2726
2727/*---------------------------------------------------------------------------
2728
2729 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2730 Host and FW.
2731
2732 \param hHal - HAL handle for device
2733
2734 \return NONE
2735
2736---------------------------------------------------------------------------*/
2737void sme_featureCapsExchange(tHalHandle hHal);
2738
Jeff Johnsond13512a2012-07-17 11:42:19 -07002739/*---------------------------------------------------------------------------
2740
Yathish9f22e662012-12-10 14:21:35 -08002741 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2742 between in Host.
2743
2744 \param hHal - HAL handle for device
2745
2746 \return NONE
2747
2748---------------------------------------------------------------------------*/
2749void sme_disableFeatureCapablity(tANI_U8 feature_index);
2750
2751/*---------------------------------------------------------------------------
2752
Jeff Johnsond13512a2012-07-17 11:42:19 -07002753 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2754 country code
2755 Host and FW.
2756
2757 \param hHal - HAL handle for device
2758 \param pCountry - pointer to country code
2759
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002760 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002761
2762 ---------------------------------------------------------------------------*/
2763eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2764
2765/*---------------------------------------------------------------------------
2766
2767 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2768 country code.
2769
2770 \param hHal - HAL handle for device
2771 \param pCountry - pointer to country code
2772
2773 \return Success or failure
2774
2775 ---------------------------------------------------------------------------*/
2776eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2777
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002778/* ---------------------------------------------------------------------------
2779 \fn sme_transportDebug
2780 \brief Dynamically monitoring Transport channels
2781 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002782 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002783 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002784 \param toggleStallDetect Enable stall detect feature
2785 This feature will take effect to data performance
2786 Not integrate till fully verification
2787 \- return NONE
2788 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002789void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002790
Kiran4a17ebe2013-01-31 10:43:43 -08002791/* ---------------------------------------------------------------------------
2792 \fn sme_ResetPowerValuesFor5G
2793 \brief Reset the power values for 5G band with NV power values.
2794 \param hHal - HAL handle for device
2795 \- return NONE
2796 -------------------------------------------------------------------------*/
2797void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2798
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002799#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002800/* ---------------------------------------------------------------------------
2801 \fn sme_UpdateRoamPrefer5GHz
2802 \brief enable/disable Roam prefer 5G runtime option
2803 This function is called through dynamic setConfig callback function
2804 to configure the Roam prefer 5G runtime option
2805 \param hHal - HAL handle for device
2806 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2807 \- return Success or failure
2808 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002809eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002810
2811/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002812 \fn sme_setRoamIntraBand
2813 \brief enable/disable Intra band roaming
2814 This function is called through dynamic setConfig callback function
2815 to configure the intra band roaming
2816 \param hHal - HAL handle for device
2817 \param nRoamIntraBand Enable/Disable Intra band roaming
2818 \- return Success or failure
2819 -------------------------------------------------------------------------*/
2820eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2821
2822/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002823 \fn sme_UpdateRoamScanNProbes
2824 \brief function to update roam scan N probes
2825 This function is called through dynamic setConfig callback function
2826 to update roam scan N probes
2827 \param hHal - HAL handle for device
2828 \param nProbes number of probe requests to be sent out
2829 \- return Success or failure
2830 -------------------------------------------------------------------------*/
2831eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2832
2833/* ---------------------------------------------------------------------------
2834 \fn sme_UpdateRoamScanHomeAwayTime
2835 \brief function to update roam scan Home away time
2836 This function is called through dynamic setConfig callback function
2837 to update roam scan home away time
2838 \param hHal - HAL handle for device
2839 \param nRoamScanAwayTime Scan home away time
2840 \- return Success or failure
2841 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002842eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2843 const v_U16_t nRoamScanHomeAwayTime,
2844 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002845
2846/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002847 \fn sme_getRoamIntraBand
2848 \brief get Intra band roaming
2849 \param hHal - HAL handle for device
2850 \- return Success or failure
2851 -------------------------------------------------------------------------*/
2852v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2853
2854/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002855 \fn sme_getRoamScanNProbes
2856 \brief get N Probes
2857 \param hHal - HAL handle for device
2858 \- return Success or failure
2859 -------------------------------------------------------------------------*/
2860v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2861
2862/* ---------------------------------------------------------------------------
2863 \fn sme_getRoamScanHomeAwayTime
2864 \brief get Roam scan home away time
2865 \param hHal - HAL handle for device
2866 \- return Success or failure
2867 -------------------------------------------------------------------------*/
2868v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2869
2870/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002871 \fn sme_UpdateImmediateRoamRssiDiff
2872 \brief Update nImmediateRoamRssiDiff
2873 This function is called through dynamic setConfig callback function
2874 to configure nImmediateRoamRssiDiff
2875 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2876 \param hHal - HAL handle for device
2877 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2878 candidate and current AP.
2879 \- return Success or failure
2880 -------------------------------------------------------------------------*/
2881
2882eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002883
Srinivas Girigowdade697412013-02-14 16:31:48 -08002884/* ---------------------------------------------------------------------------
2885 \fn sme_UpdateRoamRssiDiff
2886 \brief Update RoamRssiDiff
2887 This function is called through dynamic setConfig callback function
2888 to configure RoamRssiDiff
2889 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2890 \param hHal - HAL handle for device
2891 \param RoamRssiDiff - minimum rssi difference between potential
2892 candidate and current AP.
2893 \- return Success or failure
2894 -------------------------------------------------------------------------*/
2895
2896eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2897
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002898/*--------------------------------------------------------------------------
2899 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2900 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2901 isFastTransitionEnabled.
2902 This is a synchronuous call
2903 \param hHal - The handle returned by macOpen.
2904 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2905 Other status means SME is failed to update isFastTransitionEnabled.
2906 \sa
2907 --------------------------------------------------------------------------*/
2908
2909eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2910 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002911
2912/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002913 \fn sme_UpdateWESMode
2914 \brief Update WESMode
2915 This function is called through dynamic setConfig callback function
2916 to configure isWESModeEnabled
2917 \param hHal - HAL handle for device
2918 \param isWESModeEnabled - Enable/Disable WES Mode
2919 \- return Success or failure
2920 -------------------------------------------------------------------------*/
2921eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2922
2923/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002924 \fn sme_SetRoamScanControl
2925 \brief Set roam scan control
2926 This function is called to set roam scan control
2927 if roam scan control is set to 0, roaming scan cache is cleared
2928 any value other than 0 is treated as invalid value
2929 \param hHal - HAL handle for device
2930 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2931 Other status means SME failure to update
2932 -------------------------------------------------------------------------*/
2933eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002934#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002935
2936#ifdef FEATURE_WLAN_LFR
2937/*--------------------------------------------------------------------------
2938 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002939 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002940 isFastRoamIniFeatureEnabled.
2941 This is a synchronuous call
2942 \param hHal - The handle returned by macOpen.
2943 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2944 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2945 \sa
2946 --------------------------------------------------------------------------*/
2947
Srinivas Girigowdade697412013-02-14 16:31:48 -08002948eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002949 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002950
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002951/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302952 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2953 When Supplicant issue enabled / disable fwr based roaming on the basis
2954 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2955
2956 This is a synchronous call
2957 \param hHal - The handle returned by macOpen.
2958 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2959 Other status means SME is failed to (enabled/disabled) offload scan.
2960 \sa
2961 --------------------------------------------------------------------------*/
2962
2963eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2964 const v_BOOL_t isFastRoamEnabled);
2965
2966/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002967 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2968 Enable/disable LFR MAWC support at runtime
2969 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2970 isMAWCIniFeatureEnabled.
2971 This is a synchronous call
2972 \param hHal - The handle returned by macOpen.
2973 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2974 Other status means SME is failed to update MAWCEnabled.
2975 \sa
2976 --------------------------------------------------------------------------*/
2977eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2978 const v_BOOL_t MAWCEnabled);
2979
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002980
2981#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2982/*--------------------------------------------------------------------------
2983 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2984 This is a synchronuous call
2985 \param hHal - The handle returned by macOpen.
2986 \return eHAL_STATUS_SUCCESS
2987 Other status means SME is failed
2988 \sa
2989 --------------------------------------------------------------------------*/
2990
2991eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2992 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2993#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002994#endif /* FEATURE_WLAN_LFR */
2995
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002996#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002997/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002998 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002999 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003000 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003001 This is a synchronuous call
3002 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003003 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
3004 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003005 \sa
3006 --------------------------------------------------------------------------*/
3007
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003008eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
3009 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003010
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003011#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003012
3013/*--------------------------------------------------------------------------
3014 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
3015 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3016 fEnableFwRssiMonitoring.
3017 This is a synchronuous call
3018 \param hHal - The handle returned by macOpen.
3019 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
3020 Other status means SME is failed to update
3021 \sa
3022 --------------------------------------------------------------------------*/
3023
3024eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
3025 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08003026
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003027#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08003028/*--------------------------------------------------------------------------
3029 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
3030 This is a synchronuous call
3031 \param hHal - The handle returned by macOpen.
3032 \return eHAL_STATUS_SUCCESS - SME update config successful.
3033 Other status means SME is failed to update
3034 \sa
3035 --------------------------------------------------------------------------*/
3036eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
3037 v_U8_t neighborLookupRssiThreshold);
3038
3039/*--------------------------------------------------------------------------
3040 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
3041 This is a synchronuous call
3042 \param hHal - The handle returned by macOpen.
3043 \return eHAL_STATUS_SUCCESS - SME update config successful.
3044 Other status means SME is failed to update
3045 \sa
3046 --------------------------------------------------------------------------*/
3047eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
3048 v_U8_t neighborReassocRssiThreshold);
3049
3050/*--------------------------------------------------------------------------
3051 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
3052 This is a synchronuous call
3053 \param hHal - The handle returned by macOpen.
3054 \return eHAL_STATUS_SUCCESS - SME update config successful.
3055 Other status means SME is failed to update
3056 \sa
3057 --------------------------------------------------------------------------*/
3058v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
3059
3060/*--------------------------------------------------------------------------
3061 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
3062 This is a synchronuous call
3063 \param hHal - The handle returned by macOpen.
3064 \return eHAL_STATUS_SUCCESS - SME update config successful.
3065 Other status means SME is failed to update
3066 \sa
3067 --------------------------------------------------------------------------*/
3068eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
3069 v_U16_t neighborScanResultsRefreshPeriod);
3070
3071/*--------------------------------------------------------------------------
3072 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
3073 This is a synchronuous call
3074 \param hHal - The handle returned by macOpen.
3075 \return eHAL_STATUS_SUCCESS - SME update config successful.
3076 Other status means SME is failed to update
3077 \sa
3078 --------------------------------------------------------------------------*/
3079v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
3080
3081/*--------------------------------------------------------------------------
3082 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3083 This is a synchronuous call
3084 \param hHal - The handle returned by macOpen.
3085 \return eHAL_STATUS_SUCCESS - SME update config successful.
3086 Other status means SME is failed to update
3087 \sa
3088 --------------------------------------------------------------------------*/
3089v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3090
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003091/* ---------------------------------------------------------------------------
3092 \fn sme_UpdateEmptyScanRefreshPeriod
3093 \brief Update nEmptyScanRefreshPeriod
3094 This function is called through dynamic setConfig callback function
3095 to configure nEmptyScanRefreshPeriod
3096 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3097 \param hHal - HAL handle for device
3098 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3099 \- return Success or failure
3100 -------------------------------------------------------------------------*/
3101eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3102
3103/* ---------------------------------------------------------------------------
3104 \fn sme_setNeighborScanMinChanTime
3105 \brief Update nNeighborScanMinChanTime
3106 This function is called through dynamic setConfig callback function
3107 to configure gNeighborScanChannelMinTime
3108 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3109 \param hHal - HAL handle for device
3110 \param nNeighborScanMinChanTime - Channel minimum dwell time
3111 \- return Success or failure
3112 -------------------------------------------------------------------------*/
3113eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3114
3115/* ---------------------------------------------------------------------------
3116 \fn sme_setNeighborScanMaxChanTime
3117 \brief Update nNeighborScanMaxChanTime
3118 This function is called through dynamic setConfig callback function
3119 to configure gNeighborScanChannelMaxTime
3120 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3121 \param hHal - HAL handle for device
3122 \param nNeighborScanMinChanTime - Channel maximum dwell time
3123 \- return Success or failure
3124 -------------------------------------------------------------------------*/
3125eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3126
3127/* ---------------------------------------------------------------------------
3128 \fn sme_getNeighborScanMinChanTime
3129 \brief get neighbor scan min channel time
3130 \param hHal - The handle returned by macOpen.
3131 \return v_U16_t - channel min time value
3132 -------------------------------------------------------------------------*/
3133v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3134
3135/* ---------------------------------------------------------------------------
3136 \fn sme_getNeighborScanMaxChanTime
3137 \brief get neighbor scan max channel time
3138 \param hHal - The handle returned by macOpen.
3139 \return v_U16_t - channel max time value
3140 -------------------------------------------------------------------------*/
3141v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3142
3143/* ---------------------------------------------------------------------------
3144 \fn sme_setNeighborScanPeriod
3145 \brief Update nNeighborScanPeriod
3146 This function is called through dynamic setConfig callback function
3147 to configure nNeighborScanPeriod
3148 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3149 \param hHal - HAL handle for device
3150 \param nNeighborScanPeriod - neighbor scan period
3151 \- return Success or failure
3152 -------------------------------------------------------------------------*/
3153eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3154
3155/* ---------------------------------------------------------------------------
3156 \fn sme_getNeighborScanPeriod
3157 \brief get neighbor scan period
3158 \param hHal - The handle returned by macOpen.
3159 \return v_U16_t - neighbor scan period
3160 -------------------------------------------------------------------------*/
3161v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3162
3163#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003164
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003165#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003166/*--------------------------------------------------------------------------
3167 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3168 This is a synchronuous call
3169 \param hHal - The handle returned by macOpen.
3170 \return eHAL_STATUS_SUCCESS - SME update config successful.
3171 Other status means SME is failed to update
3172 \sa
3173 --------------------------------------------------------------------------*/
3174v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3175
3176/*--------------------------------------------------------------------------
3177 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3178 This is a synchronuous call
3179 \param hHal - The handle returned by macOpen.
3180 \return eHAL_STATUS_SUCCESS - SME update config successful.
3181 Other status means SME is failed to update
3182 \sa
3183 --------------------------------------------------------------------------*/
3184eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3185 tANI_U8 numChannels);
3186
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003187#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003188/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003189 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003190 This is a synchronuous call
3191 \param hHal - The handle returned by macOpen.
3192 \return eHAL_STATUS_SUCCESS - SME update config successful.
3193 Other status means SME is failed to update
3194 \sa
3195 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003196eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003197 tANI_U8 *pChannelList,
3198 tANI_U8 numChannels);
3199#endif
3200
Srinivas Girigowdade697412013-02-14 16:31:48 -08003201/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003202 \brief sme_getRoamScanChannelList() - get roam scan channel list
3203 This is a synchronuous call
3204 \param hHal - The handle returned by macOpen.
3205 \return eHAL_STATUS_SUCCESS - SME update config successful.
3206 Other status means SME is failed to update
3207 \sa
3208 --------------------------------------------------------------------------*/
3209eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3210 tANI_U8 *pNumChannels);
3211
3212/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003213 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003214 This is a synchronuous call
3215 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003216 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003217 FALSE (0) - if feature is disabled (compile or runtime)
3218 \sa
3219 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003220tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003221
3222/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003223 \brief sme_getWESMode() - getWES Mode
3224 This is a synchronous call
3225 \param hHal - The handle returned by macOpen.
3226 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3227 \sa
3228 --------------------------------------------------------------------------*/
3229v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3230
3231/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003232 \brief sme_GetRoamScanControl() - get scan control
3233 This is a synchronous call
3234 \param hHal - The handle returned by macOpen.
3235 \return v_BOOL_t - Enabled(1)/Disabled(0)
3236 \sa
3237 --------------------------------------------------------------------------*/
3238v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3239
3240/* ---------------------------------------------------------------------------
3241 \fn sme_UpdateEmptyScanRefreshPeriod
3242 \brief Update nnEmptyScanRefreshPeriod
3243 This function is called through dynamic setConfig callback function
3244 to configure nnEmptyScanRefreshPeriod
3245 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3246 \param hHal - HAL handle for device
3247 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3248 \- return Success or failure
3249 -------------------------------------------------------------------------*/
3250
3251/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003252 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3253 This is a synchronuous call
3254 \param hHal - The handle returned by macOpen.
3255 \return TRUE (1) - if the feature is enabled
3256 FALSE (0) - if feature is disabled (compile or runtime)
3257 \sa
3258 --------------------------------------------------------------------------*/
3259tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3260
3261/*--------------------------------------------------------------------------
3262 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3263 This is a synchronuous call
3264 \param hHal - The handle returned by macOpen.
3265 \return TRUE (1) - if the feature is enabled
3266 FALSE (0) - if feature is disabled (compile or runtime)
3267 \sa
3268 --------------------------------------------------------------------------*/
3269tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3270
Srinivas Girigowdade697412013-02-14 16:31:48 -08003271#endif
3272
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003273#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3274/*--------------------------------------------------------------------------
3275 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3276 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3277 gRoamScanOffloadEnabled.
3278 This is a synchronous call
3279 \param hHal - The handle returned by macOpen.
3280 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3281 Other status means SME is failed to update.
3282 \sa
3283 --------------------------------------------------------------------------*/
3284
3285eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3286#endif
3287
c_manjeecfd1efb2015-09-25 19:32:34 +05303288eHalStatus sme_FwMemDumpReq(tHalHandle hHal, tAniFwrDumpReq *recv_req);
3289
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003290
Srinivas Girigowdade697412013-02-14 16:31:48 -08003291/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003292 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303293 \brief Check if a feature is enabled by FW
3294
3295 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003296 A value from enum placeHolderInCapBitmap
3297
3298 \- return 1/0 (TRUE/FALSE)
3299 -------------------------------------------------------------------------*/
3300tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303301
3302/* ---------------------------------------------------------------------------
3303 \fn sme_IsFeatureSupportedByDriver
3304 \brief Check if a feature is enabled by driver
3305
3306 \param featEnumValue - Enumeration value of the feature to be checked.
3307 A value from enum placeHolderInCapBitmap
3308
3309 \- return 1/0 (TRUE/FALSE)
3310 -------------------------------------------------------------------------*/
3311tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3312
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003313#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303314
3315/* ---------------------------------------------------------------------------
3316 \fn sme_SendTdlsLinkEstablishParams
3317 \brief API to send TDLS Link Establishment Parameters.
3318
3319 \param peerMac - peer's Mac Adress.
3320 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3321 \- return VOS_STATUS_SUCCES
3322 -------------------------------------------------------------------------*/
3323
3324VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303325 tANI_U8 sessionId,
3326#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3327 const tSirMacAddr peerMac,
3328#else
3329 tSirMacAddr peerMac,
3330#endif
3331 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303332
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003333/* ---------------------------------------------------------------------------
3334 \fn sme_SendTdlsMgmtFrame
3335 \brief API to send TDLS management frames.
3336
3337 \param peerMac - peer's Mac Adress.
3338 \param frame_type - Type of TDLS mgmt frame to be sent.
3339 \param dialog - dialog token used in the frame.
3340 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303341 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003342 \param buf - additional IEs to be included
3343 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003344 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003345 \- return VOS_STATUS_SUCCES
3346 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303347VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3348#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3349 const tSirMacAddr peerMac,
3350#else
3351 tSirMacAddr peerMac,
3352#endif
3353 tANI_U8 frame_type, tANI_U8 dialog,
3354 tANI_U16 status, tANI_U32 peerCapability,
3355 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003356/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003357 \fn sme_ChangeTdlsPeerSta
3358 \brief API to Update TDLS peer sta parameters.
3359
3360 \param peerMac - peer's Mac Adress.
3361 \param staParams - Peer Station Parameters.
3362 \- return VOS_STATUS_SUCCES
3363 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303364VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3365#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3366 const tSirMacAddr peerMac,
3367#else
3368 tSirMacAddr peerMac,
3369#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003370 tCsrStaParams *pstaParams);
3371/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003372 \fn sme_AddTdlsPeerSta
3373 \brief API to Add TDLS peer sta entry.
3374
3375 \param peerMac - peer's Mac Adress.
3376 \- return VOS_STATUS_SUCCES
3377 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303378VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3379#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3380 const tSirMacAddr peerMac
3381#else
3382 tSirMacAddr peerMac
3383#endif
3384 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003385/* ---------------------------------------------------------------------------
3386 \fn sme_DeleteTdlsPeerSta
3387 \brief API to Delete TDLS peer sta entry.
3388
3389 \param peerMac - peer's Mac Adress.
3390 \- return VOS_STATUS_SUCCES
3391 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303392VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3393#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3394 const tSirMacAddr peerMac
3395#else
3396 tSirMacAddr peerMac
3397#endif
3398 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003399/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003400 \fn sme_SetTdlsPowerSaveProhibited
3401 \API to set/reset the isTdlsPowerSaveProhibited.
3402
3403 \- return void
3404 -------------------------------------------------------------------------*/
3405void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003406#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303407/* ---------------------------------------------------------------------------
3408 \fn sme_IsPmcBmps
3409 \brief API to Check if PMC state is BMPS.
3410
3411 \- return v_BOOL_t
3412 -------------------------------------------------------------------------*/
3413v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3414
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003415eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003416
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303417/* ---------------------------------------------------------------------------
3418 \fn sme_UpdateDFSRoamMode
3419 \brief Update DFS roam scan mode
3420 This function is called to configure allowDFSChannelRoam
3421 dynamically
3422 \param hHal - HAL handle for device
3423 \param allowDFSChannelRoam - DFS roaming scan mode
3424 mode 0 disable roam scan on DFS channels
3425 mode 1 enables roam scan (passive/active) on DFS channels
3426 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3427 successfully.
3428 Other status means SME failed to update DFS roaming scan config.
3429 \sa
3430 -------------------------------------------------------------------------*/
3431eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3432
3433/* ---------------------------------------------------------------------------
3434 \fn sme_UpdateDFSScanMode
3435 \brief Update DFS scan mode
3436 This function is called to configure fEnableDFSChnlScan.
3437 \param hHal - HAL handle for device
3438 \param dfsScanMode - DFS scan mode
3439 mode 0 disable scan on DFS channels
3440 mode 1 enables passive scan on DFS channels
3441 mode 2 enables active scan on DFS channels for static list
3442 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3443 successfully.
3444 Other status means SME failed to update DFS scan config.
3445 \sa
3446 -------------------------------------------------------------------------*/
3447eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3448
3449/*--------------------------------------------------------------------------
3450 \brief sme_GetDFSScanMode() - get DFS scan mode
3451 \param hHal - The handle returned by macOpen.
3452 \return DFS scan mode
3453 mode 0 disable scan on DFS channels
3454 mode 1 enables passive scan on DFS channels
3455 mode 2 enables active scan on DFS channels for static list
3456 \sa
3457 --------------------------------------------------------------------------*/
3458v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3459
3460/* ---------------------------------------------------------------------------
3461 \fn sme_HandleDFSChanScan
3462 \brief Gets Valid channel list and updates scan control list according to
3463 dfsScanMode
3464 \param hHal - HAL handle for device
3465 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3466 Otherwise eHAL_STATUS_SUCCESS -
3467 \sa
3468 -------------------------------------------------------------------------*/
3469eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3470
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003471/*
3472 * SME API to enable/disable WLAN driver initiated SSR
3473 */
3474void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3475
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303476/* ---------------------------------------------------------------------------
3477
3478 \fn sme_SetPhyMode
3479
3480 \brief Changes the PhyMode.
3481
3482 \param hHal - The handle returned by macOpen.
3483
3484 \param phyMode new phyMode which is to set
3485
3486 \return eHalStatus SUCCESS.
3487
3488 -------------------------------------------------------------------------------*/
3489eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3490
3491/* ---------------------------------------------------------------------------
3492
3493 \fn sme_GetPhyMode
3494
3495 \brief gets current PhyMode.
3496
3497 \param hHal - The handle returned by macOpen.
3498
3499 \return eHalStatus PhyMode
3500
3501 -------------------------------------------------------------------------------*/
3502eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3503
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003504/*
3505 * SME API to determine the channel bonding mode
3506 */
3507VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3508
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003509#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3510/*--------------------------------------------------------------------------
3511 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3512 from CSR.
3513 This is a synchronous call
3514 \param hHal - The handle returned by macOpen
3515 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3516 BSSID, channel etc.)
3517 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3518 Other status means SME is failed to send the request.
3519 \sa
3520 --------------------------------------------------------------------------*/
3521
3522eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3523#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003524/*--------------------------------------------------------------------------
3525 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3526 is any connected session .
3527 This is a synchronous call
3528 \param hHal - The handle returned by macOpen
3529 \return VOS_STATUS - SME passed the request to CSR successfully.
3530 Other status means SME is failed to send the request.
3531 \sa
3532 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003533VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003534
Agarwal Ashish57e84372014-12-05 18:26:53 +05303535/*--------------------------------------------------------------------------
3536 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3537 is any connected session .
3538 This is a synchronous call
3539 \param hHal - The handle returned by macOpen
3540 \return VOS_STATUS - SME passed the request to CSR successfully.
3541 Other status means SME is failed to send the request.
3542 \sa
3543 --------------------------------------------------------------------------*/
3544VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3545
Leo Chang9056f462013-08-01 19:21:11 -07003546#ifdef FEATURE_WLAN_LPHB
3547/* ---------------------------------------------------------------------------
3548 \fn sme_LPHBConfigReq
3549 \API to make configuration LPHB within FW.
3550 \param hHal - The handle returned by macOpen
3551 \param lphdReq - LPHB request argument by client
3552 \param pCallbackfn - LPHB timeout notification callback function pointer
3553 \- return Configuration message posting status, SUCCESS or Fail
3554 -------------------------------------------------------------------------*/
3555eHalStatus sme_LPHBConfigReq(
3556 tHalHandle hHal,
3557 tSirLPHBReq *lphdReq,
3558 void (*pCallbackfn)(void *pAdapter, void *indParam));
3559#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003560
3561/* ---------------------------------------------------------------------------
3562 \fn sme_AddPeriodicTxPtrn
3563 \brief API to Periodic TX Pattern Offload feature
3564 \param hHal - The handle returned by macOpen
3565 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3566 \return eHalStatus
3567 ---------------------------------------------------------------------------*/
3568eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3569 *addPeriodicTxPtrnParams);
3570
3571/* ---------------------------------------------------------------------------
3572 \fn sme_DelPeriodicTxPtrn
3573 \brief API to Periodic TX Pattern Offload feature
3574 \param hHal - The handle returned by macOpen
3575 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3576 \return eHalStatus
3577 ---------------------------------------------------------------------------*/
3578eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3579 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003580/*--------------------------------------------------------------------------
3581 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3582 scan parameter.
3583 This is a synchronous call
3584 \param hHal - The handle returned by macOpen
3585 \return None.
3586 \sa
3587 --------------------------------------------------------------------------*/
3588void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3589 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303590
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003591/* ---------------------------------------------------------------------------
3592 \fn sme_SendRateUpdateInd
3593 \brief API to Update rate
3594 \param hHal - The handle returned by macOpen
3595 \param rateUpdateParams - Pointer to rate update params
3596 \return eHalStatus
3597 ---------------------------------------------------------------------------*/
3598eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3599
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303600/*
3601 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3602 * triggers
3603 * return status
3604*/
3605eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3606 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303607 tSmeFastRoamTrigger fastRoamTrig,
3608 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303609
3610eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303611#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3612 const tANI_U8 *pBSSId,
3613#else
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303614 tANI_U8 *pBSSId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303615#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303616 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003617
3618void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303619
3620#ifdef FEATURE_WLAN_BATCH_SCAN
3621/* ---------------------------------------------------------------------------
3622 \fn sme_SetBatchScanReq
3623 \brief API to set batch scan request in FW
3624 \param hHal - The handle returned by macOpen.
3625 \param pRequest - Pointer to the batch request.
3626 \param sessionId - session ID
3627 \param callbackRoutine - HDD callback which needs to be invoked after
3628 getting set batch scan response from FW
3629 \param callbackContext - pAdapter context
3630 \return eHalStatus
3631 ---------------------------------------------------------------------------*/
3632eHalStatus
3633sme_SetBatchScanReq
3634(
3635 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3636 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3637 void *callbackContext
3638);
3639
3640/* ---------------------------------------------------------------------------
3641 \fn sme_TriggerBatchScanResultInd
3642 \brief API to trigger batch scan result indications from from FW
3643 \param hHal - The handle returned by macOpen.
3644 \param pRequest - Pointer to get batch request.
3645 \param sessionId - session ID
3646 \param callbackRoutine - HDD callback which needs to be invoked after
3647 getting get batch scan response from FW
3648 \param callbackContext - pAdapter context
3649 \return eHalStatus
3650 ---------------------------------------------------------------------------*/
3651eHalStatus
3652sme_TriggerBatchScanResultInd
3653(
3654 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3655 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3656 void *callbackContext
3657);
3658
3659/* ---------------------------------------------------------------------------
3660 \fn sme_StopBatchScanInd
3661 \brief API to stop batch scan request in FW
3662 \param hHal - The handle returned by macOpen.
3663 \param pRequest - Pointer to stop batch indication
3664 \return eHalStatus
3665 ---------------------------------------------------------------------------*/
3666eHalStatus
3667sme_StopBatchScanInd
3668(
3669 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3670);
3671
3672#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003673
3674#ifdef FEATURE_WLAN_CH_AVOID
3675/* ---------------------------------------------------------------------------
3676 \fn sme_AddChAvoidCallback
3677 \brief Used to plug in callback function
3678 Which notify channel may not be used with SAP or P2PGO mode.
3679 Notification come from FW.
3680 \param hHal
3681 \param pCallbackfn : callback function pointer should be plugged in
3682 \- return eHalStatus
3683 -------------------------------------------------------------------------*/
3684eHalStatus sme_AddChAvoidCallback
3685(
3686 tHalHandle hHal,
3687 void (*pCallbackfn)(void *pAdapter, void *indParam)
3688);
3689#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003690eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303691
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303692/* ---------------------------------------------------------------------------
3693 \fn sme_requestTypetoString
3694 \brief API to convert requestType enum values
3695 to string.
3696 ---------------------------------------------------------------------------*/
3697const char * sme_requestTypetoString(const v_U8_t requestType);
3698/* ---------------------------------------------------------------------------
3699 \fn sme_PmcStatetoString
3700 \brief API to convert PmcState enum values
3701 to string.
3702 ---------------------------------------------------------------------------*/
3703const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303704
3705eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3706
Agarwal Ashish5e414792014-06-08 15:25:23 +05303707tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303708
3709// tdlsoffchan
3710VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3711 tANI_U8 sessionId,
3712 tSirMacAddr peerMac,
3713 tANI_S32 tdlsOffCh,
3714 tANI_S32 tdlsOffChBwOffset,
3715 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303716eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3717 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303718void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303719
3720void sme_resetCoexEevent(tHalHandle hHal);
3721
Peng Xu117eab42014-09-25 13:33:27 +05303722tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3723tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303724#ifdef WLAN_FEATURE_AP_HT40_24G
3725void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3726 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303727eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3728 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303729#endif
Peng Xu117eab42014-09-25 13:33:27 +05303730
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303731eHalStatus sme_set_rssi_threshold_breached_cb(tHalHandle hal,
3732 void (*cb)(void *, struct rssi_breach_event *));
3733
Agarwal Ashish738843c2014-09-25 12:27:56 +05303734void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3735
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303736/* HDD Callback function */
3737typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3738
3739eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3740 u8 *pCmd,
3741 int length,
3742 pEncryptMsgRSPCb encCB);
3743
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303744/* ---------------------------------------------------------------------------
3745 \fn sme_RegisterBtCoexTDLSCallback
3746 \brief Used to plug in callback function
3747 Which notify btcoex on or off.
3748 Notification come from FW.
3749 \param hHal
3750 \param pCallbackfn : callback function pointer should be plugged in
3751 \- return eHalStatus
3752 -------------------------------------------------------------------------*/
3753eHalStatus sme_RegisterBtCoexTDLSCallback
3754(
3755 tHalHandle hHal,
3756 void (*pCallbackfn)(void *pAdapter, int)
3757);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303758
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303759/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303760 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303761
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303762 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303763
3764 \param hHal - The handle returned by macOpen.
3765
3766 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3767 eANI_BOOLEAN_FALSE otherwise
3768---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303769tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303770
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303771/* ---------------------------------------------------------------------------
3772
3773 \fn sme_IsTdlsOffChannelValid
3774 \brief To check if the channel is valid for currently established domain
3775 This is a synchronous API.
3776
3777 \param hHal - The handle returned by macOpen.
3778 \param channel - channel to verify
3779
3780 \return TRUE/FALSE, TRUE if channel is valid
3781
3782 -------------------------------------------------------------------------------*/
3783tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3784
Mukul Sharma4be88422015-03-09 20:29:07 +05303785/* --------------------------------------------------------------------------
3786
3787 \fn sme_IsCoexScoIndicationSet
3788 \brief To check if the BTC module in fwr has sent the SCO
3789 indication to host or not
3790
3791 \param hHal - The handle returned by macOpen.
3792 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3793
3794 --------------------------------------------------------------------------*/
3795tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3796
Abhishek Singh01c73d12015-03-12 15:13:44 +05303797eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3798 tANI_U32 iniNumBuffAdvert,
3799 tANI_U32 set_value);
3800
Mukul Sharma45063942015-04-01 20:07:59 +05303801void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303802
3803/* ---------------------------------------------------------------------------
3804 \fn sme_SetTdls2040BSSCoexistence
3805 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3806
3807 \param isEnabled - Enable or Disable.
3808 \- return VOS_STATUS_SUCCES
3809 -------------------------------------------------------------------------*/
3810eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3811
Abhishek Singh41988ba2015-05-25 19:42:29 +05303812/* ---------------------------------------------------------------------------
3813 \fn sme_SetRtsCtsHtVht
3814 \brief API to to enable/disable RTS/CTS for different modes.
3815
3816 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3817 \- return VOS_STATUS_SUCCES if INdication is posted to
3818 WDA else return eHAL_STATUS_FAILURE
3819 -------------------------------------------------------------------------*/
3820eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3821
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303822tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
3823 tANI_U8 fcc_constraint);
3824
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303825eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303826eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
Abhishek Singh837adf22015-10-01 17:37:37 +05303827 tANI_U32 indicator, tANI_U32 reason_code,
3828 tANI_BOOLEAN dump_vos_trace);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303829
Mahesh A Saptasagarbeca12c2015-09-07 16:21:06 +05303830eHalStatus sme_enableDisableChanAvoidIndEvent(tHalHandle hHal,
3831 tANI_U8 set_value);
3832
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303833/* ---------------------------------------------------------------------------
3834 \fn sme_set_wificonfig_params
3835 \brief API to set WifiConfiguration Parameters.
3836
3837 \param wifi_config_param - Wificonfig parameter 1.Averaging factor 2. Guard time
3838 \- return VOS_STATUS_SUCCES if INdication is posted to
3839 WDA else return eHAL_STATUS_FAILURE
3840 -------------------------------------------------------------------------*/
3841
3842eHalStatus sme_set_wificonfig_params(tHalHandle hHal, tSetWifiConfigParams *req);
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +05303843eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
3844 tANI_U32 *regInfo1, tANI_U32 *regInfo2);
Mahesh A Saptasagarb63b3e22015-12-22 15:06:10 +05303845eHalStatus sme_GetCurrentAntennaIndex(tHalHandle hHal,
3846 tCsrAntennaIndexCallback callback,
3847 void *pContext, tANI_U8 sessionId);
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303848
Jeff Johnson295189b2012-06-20 16:38:30 -07003849#endif //#if !defined( __SME_API_H )