blob: 431f5681a98169eca8e21fecb029b9e81f4277ad [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Manjeet Singh3ed79242017-01-11 19:04:32 +05302 * Copyright (c) 2012-2017 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"
Abhishek Singh00b71972016-01-07 10:51:04 +053060#ifdef WLAN_FEATURE_RMC
Sushant Kaushik83392fa2015-05-05 17:44:40 +053061#include "smeInternal.h"
Abhishek Singh00b71972016-01-07 10:51:04 +053062#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070063
Jeff Johnsone7245742012-09-05 17:12:55 -070064#ifdef FEATURE_OEM_DATA_SUPPORT
65#include "oemDataApi.h"
66#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070067
68#if defined WLAN_FEATURE_VOWIFI
69#include "smeRrmInternal.h"
70#endif
Srinivas Dasari030bad32015-02-18 23:23:54 +053071#include "nan_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070072
73/*--------------------------------------------------------------------------
74 Preprocessor definitions and constants
75 ------------------------------------------------------------------------*/
76
77#define SME_SUMMARY_STATS 1
78#define SME_GLOBAL_CLASSA_STATS 2
79#define SME_GLOBAL_CLASSB_STATS 4
80#define SME_GLOBAL_CLASSC_STATS 8
81#define SME_GLOBAL_CLASSD_STATS 16
82#define SME_PER_STA_STATS 32
Sushant Kaushik33200572015-08-05 16:46:20 +053083#define SME_PER_PKT_STATS 64
Jeff Johnson295189b2012-06-20 16:38:30 -070084
85#define SME_INVALID_COUNTRY_CODE "XX"
86
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070087//Macro to disable split scan
88#define SME_DISABLE_SPLIT_SCAN 255
Padma, Santhosh Kumar859d3712014-11-13 18:00:41 +053089
90//Macro to indicate invalid no of tspecs
91#define INVALID_TSPEC 100
92
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +053093#define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \
94 reg_info_1 &= 0xff00ffff; \
95 reg_info_1 |= ((val & 0xff) << 16); \
96} while(0)
97
98#define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \
99 reg_info_2 &= 0xffff00ff; \
100 reg_info_2 |= ((val & 0xff) << 8); \
101} while(0)
102
Selvaraj, Sridharc045b8b2016-04-06 12:22:35 +0530103/**
104 * ALLOWED_ACTION_FRAMES_BITMAP
105 *
106 * Bitmask is based on the below.The frames with 0's
107 * set to their corresponding bit can be dropped in FW.
108 *
109 * -----------------------------+-----+-------+
110 * Type | Bit | Allow |
111 * -----------------------------+-----+-------+
112 * SIR_MAC_ACTION_SPECTRUM_MGMT 0 1
113 * SIR_MAC_ACTION_QOS_MGMT 1 1
114 * SIR_MAC_ACTION_DLP 2 0
115 * SIR_MAC_ACTION_BLKACK 3 1
116 * SIR_MAC_ACTION_PUBLIC_USAGE 4 1
117 * SIR_MAC_ACTION_RRM 5 1
118 * SIR_MAC_ACTION_FAST_BSS_TRNST 6 0
119 * SIR_MAC_ACTION_HT 7 0
120 * SIR_MAC_ACTION_SA_QUERY 8 1
121 * SIR_MAC_ACTION_PROT_DUAL_PUB 9 0
122 * SIR_MAC_ACTION_WNM 10 1
123 * SIR_MAC_ACTION_UNPROT_WNM 11 0
124 * SIR_MAC_ACTION_TDLS 12 0
125 * SIR_MAC_ACITON_MESH 13 0
126 * SIR_MAC_ACTION_MHF 14 0
127 * SIR_MAC_SELF_PROTECTED 15 0
128 * SIR_MAC_ACTION_WME 17 1
129 * SIR_MAC_ACTION_FST 18 0
130 * SIR_MAC_ACTION_VHT 21 1
131 * ----------------------------+------+-------+
132 */
133#define ALLOWED_ACTION_FRAMES_BITMAP \
134 ((1 << SIR_MAC_ACTION_SPECTRUM_MGMT) | \
135 (1 << SIR_MAC_ACTION_QOS_MGMT) | \
136 (1 << SIR_MAC_ACTION_BLKACK) | \
137 (1 << SIR_MAC_ACTION_PUBLIC_USAGE) | \
138 (1 << SIR_MAC_ACTION_RRM) | \
139 (1 << SIR_MAC_ACTION_SA_QUERY) | \
140 (1 << SIR_MAC_ACTION_WNM) | \
141 (1 << SIR_MAC_ACTION_WME) | \
142 (1 << SIR_MAC_ACTION_VHT))
Jeff Johnson295189b2012-06-20 16:38:30 -0700143/*--------------------------------------------------------------------------
144 Type declarations
145 ------------------------------------------------------------------------*/
146typedef struct _smeConfigParams
147{
148 tCsrConfigParam csrConfig;
149#if defined WLAN_FEATURE_VOWIFI
150 tRrmConfigParam rrmConfig;
151#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700152#if defined FEATURE_WLAN_LFR
153 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800154 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700155#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800156#if defined FEATURE_WLAN_ESE
157 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700158#endif
159#if defined WLAN_FEATURE_P2P_INTERNAL
160 tP2PConfigParam p2pConfig;
161#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800162#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700163 tANI_U8 isFastTransitionEnabled;
164 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700165 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700166#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530167 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700168 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800169 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530170 tANI_U32 fDeferIMPSTime;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +0530171 tANI_U8 fBtcEnableIndTimerVal;
Jeff Johnson295189b2012-06-20 16:38:30 -0700172} tSmeConfigParams, *tpSmeConfigParams;
173
Sunil Duttc69bccb2014-05-26 21:30:20 +0530174#ifdef WLAN_FEATURE_LINK_LAYER_STATS
175
176/* ---------------------------------------------------------------------------
177 \fn sme_LLStatsSetReq
178 \brief API to set link layer stats request to FW
179 \param hHal - The handle returned by macOpen.
180
181 \Param pStatsReq - a pointer to a caller allocated object of
182 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
183 stats set.
184
185 \return eHalStatus
186 ---------------------------------------------------------------------------*/
187eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
188
189/* ---------------------------------------------------------------------------
190 \fn sme_LLStatsGetReq
191 \brief API to get link layer stats request to FW
192 \param hHal - The handle returned by macOpen.
193
194 \Param pStatsReq - a pointer to a caller allocated object of
195 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
196 stats get.
197
198 \return eHalStatus
199 ---------------------------------------------------------------------------*/
200eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
201
202/* ---------------------------------------------------------------------------
203 \fn sme_LLStatsClearReq
204 \brief API to clear link layer stats request to FW
205 \param hHal - The handle returned by macOpen.
206
207 \Param pStatsReq - a pointer to a caller allocated object of
208 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
209 stats clear.
210
211 \return eHalStatus
212 ---------------------------------------------------------------------------*/
213eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
214
215/* ---------------------------------------------------------------------------
216 \fn sme_SetLinkLayerStatsIndCB
217 \brief API to trigger Link Layer stats result indications from from FW
218 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530219 \param callbackRoutine - HDD callback which needs to be invoked after
220 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530221 \return eHalStatus
222 ---------------------------------------------------------------------------*/
223eHalStatus
224sme_SetLinkLayerStatsIndCB
225(
Dino Mycled3d50022014-07-07 12:58:25 +0530226 tHalHandle hHal,
227 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
228 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530229);
230
231
232#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
233
Dino Mycle2c198072014-06-10 10:15:52 +0530234#ifdef WLAN_FEATURE_EXTSCAN
235/* ---------------------------------------------------------------------------
236 \fn sme_GetValidChannelsByBand
237 \brief SME API to fetch all valid channel filtered by band
238 \param hHal
239 \param wifiBand: RF band information
240 \param aValidChannels: Array to store channel info
241 \param len: number of channels
242 \- return eHalStatus
243 -------------------------------------------------------------------------*/
244eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
245 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
246
247/* ---------------------------------------------------------------------------
248 \fn sme_EXTScanGetCapabilities
249 \brief SME API to fetch Extented Scan capabilities
250 \param hHal
251 \param pReq: Extented Scan capabilities structure
252 \- return eHalStatus
253 -------------------------------------------------------------------------*/
254eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
255 tSirGetEXTScanCapabilitiesReqParams *pReq);
256
257/* ---------------------------------------------------------------------------
258 \fn sme_EXTScanStart
259 \brief SME API to issue Extented Scan start
260 \param hHal
261 \param pStartCmd: Extented Scan start structure
262 \- return eHalStatus
263 -------------------------------------------------------------------------*/
264eHalStatus sme_EXTScanStart (tHalHandle hHal,
265 tSirEXTScanStartReqParams *pStartCmd);
266
267/* ---------------------------------------------------------------------------
268 \fn sme_EXTScanStop
269 \brief SME API to issue Extented Scan stop
270 \param hHal
271 \param pStopReq: Extented Scan stop structure
272 \- return eHalStatus
273 -------------------------------------------------------------------------*/
274eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
275
276/* ---------------------------------------------------------------------------
277 \fn sme_SetBssHotlist
278 \brief SME API to set BSSID hotlist
279 \param hHal
280 \param pSetHotListReq: Extented Scan set hotlist structure
281 \- return eHalStatus
282 -------------------------------------------------------------------------*/
283eHalStatus sme_SetBssHotlist (tHalHandle hHal,
284 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
285
286/* ---------------------------------------------------------------------------
287 \fn sme_ResetBssHotlist
288 \brief SME API to reset BSSID hotlist
289 \param hHal
290 \param pSetHotListReq: Extented Scan set hotlist structure
291 \- return eHalStatus
292 -------------------------------------------------------------------------*/
293eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
294 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
295
296/* ---------------------------------------------------------------------------
Dino Mycle2c198072014-06-10 10:15:52 +0530297 \fn sme_getCachedResults
298 \brief SME API to get cached results
299 \param hHal
300 \param pCachedResultsReq: Extented Scan get cached results structure
301 \- return eHalStatus
302 -------------------------------------------------------------------------*/
303eHalStatus sme_getCachedResults (tHalHandle hHal,
304 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
305
306/* ---------------------------------------------------------------------------
307 \fn sme_EXTScanRegisterCallback
308 \brief SME API to register Extented Scan notification callback
309 \param pEXTScanIndCb
310 \- return void
311 -------------------------------------------------------------------------*/
312eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
313 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
314 void *);
315
316#endif /* WLAN_FEATURE_EXTSCAN */
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530317
318#ifdef FEATURE_OEM_DATA_SUPPORT
319eHalStatus sme_OemDataRegisterCallback (tHalHandle hHal,
Padma, Santhosh Kumaree7c3d22016-01-25 10:36:08 +0530320 void (*pOemDataIndCb)(void *, const tANI_U16, void *, tANI_U32),
321 void *callbackContext);
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530322#endif
323
Siddharth Bhald8a95e82015-02-12 20:14:52 +0530324/* ---------------------------------------------------------------------------
325 \fn sme_SpoofMacAddrReq
326 \brief SME API to send Spoof Mac Addr req to HAL
327 \param macaddr: mac address to be sent
328 \- return eHalStatus
329 -------------------------------------------------------------------------*/
330eHalStatus sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530331
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530332typedef enum
333{
334 eSME_ROAM_TRIGGER_NONE = 0,
335 eSME_ROAM_TRIGGER_SCAN = 1,
336 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
337 eSME_ROAM_TRIGGER_MAX
338} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700339
Kapil Gupta3d923fb2016-12-20 18:59:27 +0530340#ifdef WLAN_FEATURE_APFIND
341struct sme_ap_find_request_req
342{
343 u_int16_t request_data_len;
344 const u_int8_t* request_data;
345};
346#endif /* WLAN_FEATURE_APFIND */
347
348
Jeff Johnson295189b2012-06-20 16:38:30 -0700349/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530350 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700351 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700352/*--------------------------------------------------------------------------
353
354 \brief sme_Open() - Initialze all SME modules and put them at idle state
355
356 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
357 successfully return, all modules are at idle state ready to start.
358
359 smeOpen must be called before any other SME APIs can be involved.
360 smeOpen must be called after macOpen.
361
362 \param hHal - The handle returned by macOpen.
363
364 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
365
366 Other status means SME is failed to be initialized
367 \sa
368
369 --------------------------------------------------------------------------*/
370eHalStatus sme_Open(tHalHandle hHal);
371
372/*--------------------------------------------------------------------------
373
374 \brief sme_Close() - Release all SME modules and their resources.
375
376 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
377 return, all modules are at closed state.
378
379 No SME APIs can be involved after sme_Close except sme_Open.
380 sme_Close must be called before macClose.
381
382 \param hHal - The handle returned by macOpen.
383
384 \return eHAL_STATUS_SUCCESS - SME is successfully close.
385
386 Other status means SME is failed to be closed but caller still cannot
387 call any other SME functions except smeOpen.
388 \sa
389
390 --------------------------------------------------------------------------*/
391eHalStatus sme_Close(tHalHandle hHal);
392
393/*--------------------------------------------------------------------------
Hema Aparna Medicharlaa6cf65e2015-06-01 16:23:28 +0530394
395 \brief sme_PreClose() - Stop SME resources prior to final sme_Stop.
396
397 The function stops resources in SME, PMC, CCM, CSR, etc. as needed
398 to handle fast closure during SSR/unload-load cases.
399
400 \param hHal - The handle returned by macOpen.
401 \return v_VOID_t
402
403 \sa
404
405 --------------------------------------------------------------------------*/
406v_VOID_t sme_PreClose(tHalHandle hHal);
407
408/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700409
410 \brief sme_Start() - Put all SME modules at ready state.
411
412 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
413 successfully return, all modules are ready to run.
414
415 \param hHal - The handle returned by macOpen.
416
417 \return eHAL_STATUS_SUCCESS - SME is ready.
418
419 Other status means SME is failed to start.
420 \sa
421
422 --------------------------------------------------------------------------*/
423eHalStatus sme_Start(tHalHandle hHal);
424
425/*--------------------------------------------------------------------------
426
427 \brief sme_Stop() - Stop all SME modules and put them at idle state
428
429 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
430 return, all modules are at idle state ready to start.
431
432
433 \param hHal - The handle returned by macOpen.
434
Kiet Lama72a2322013-11-15 11:18:11 +0530435 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700436
437 \return eHAL_STATUS_SUCCESS - SME is stopped.
438
439 Other status means SME is failed to stop but caller should still consider
440 SME is stopped.
441 \sa
442
443 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530444eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700445
446
447/*--------------------------------------------------------------------------
448
449 \brief sme_OpenSession() - Open a session for scan/roam operation.
450
451 This is a synchronous API.
452
453
454 \param hHal - The handle returned by macOpen.
455 \param callback - A pointer to the function caller specifies for roam/connect status indication
456 \param pContext - The context passed with callback
457 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
458 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
459
460 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
461
462 Other status means SME is failed to open the session.
463 eHAL_STATUS_RESOURCES - no more session available.
464 \sa
465
466 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700467eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
468 void *pContext, tANI_U8 *pSelfMacAddr,
469 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700470
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700471/*--------------------------------------------------------------------------
472
473 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
474 \param hHal - The handle returned by macOpen.
475 \param currDeviceMode - Current operating device mode.
476 --------------------------------------------------------------------------*/
477
478void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700479
480/*--------------------------------------------------------------------------
481
482 \brief sme_CloseSession() - Open a session for scan/roam operation.
483
484 This is a synchronous API.
485
Jeff Johnson295189b2012-06-20 16:38:30 -0700486 \param hHal - The handle returned by macOpen.
487
488 \param sessionId - A previous opened session's ID.
mukul sharmabab477d2015-06-11 17:14:55 +0530489
490 \param bPurgeSmeCmdList - Whether sme cmd list purging is required or not.
491 TRUE -Purging require FALSE - Purging not require
492
Jeff Johnson295189b2012-06-20 16:38:30 -0700493 \return eHAL_STATUS_SUCCESS - session is closed.
494
495 Other status means SME is failed to open the session.
496 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
497 \sa
mukul sharmabab477d2015-06-11 17:14:55 +0530498
499
Jeff Johnson295189b2012-06-20 16:38:30 -0700500 --------------------------------------------------------------------------*/
501eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
Agrawal Ashish5a3522c2016-03-02 15:08:28 +0530502 tANI_BOOLEAN fSync,
mukul sharmabab477d2015-06-11 17:14:55 +0530503 tANI_U8 bPurgeSmeCmdList,
504 csrRoamSessionCloseCallback callback,
505 void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -0700506
507/*--------------------------------------------------------------------------
508
509 \brief sme_UpdateConfig() - Change configurations for all SME moduels
510
511 The function updates some configuration for modules in SME, CCM, CSR, etc
512 during SMEs close -> open sequence.
513
514 Modules inside SME apply the new configuration at the next transaction.
515
516
517 \param hHal - The handle returned by macOpen.
518 \Param pSmeConfigParams - a pointer to a caller allocated object of
519 typedef struct _smeConfigParams.
520
521 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
522
523 Other status means SME is failed to update the config parameters.
524 \sa
525
526 --------------------------------------------------------------------------*/
527eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
528
529#ifdef FEATURE_WLAN_SCAN_PNO
530/*--------------------------------------------------------------------------
531
532 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
533
534 It is used at driver start up to inform RIVA of the default channel
535 configuration.
536
537 This is a synchronuous call
538
539 \param hHal - The handle returned by macOpen.
540
541 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
542
543 Other status means SME is failed to update the channel config.
544 \sa
545
546 --------------------------------------------------------------------------*/
547eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
548
549#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700550/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530551
552 \brief sme_UpdateChannelList() - Update channel List in FW.
553
554
555 \param hHal - The handle returned by macOpen.
556
557 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
558
559 Other status means SME is failed to update the channel config.
560 \sa
561
562 --------------------------------------------------------------------------*/
563eHalStatus sme_UpdateChannelList(tHalHandle hHal);
564
565/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700566
567 \brief sme_set11dinfo() - Set the 11d information about valid channels
568 and there power using information from nvRAM
569 This function is called only for AP.
570
571 This is a synchronuous call
572
573 \param hHal - The handle returned by macOpen.
574 \Param pSmeConfigParams - a pointer to a caller allocated object of
575 typedef struct _smeConfigParams.
576
577 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
578
579 Other status means SME is failed to update the config parameters.
580 \sa
581--------------------------------------------------------------------------*/
582
583eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
584
585/*--------------------------------------------------------------------------
586
587 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
588
589 This is a synchronuous call
590
591 \param hHal - The handle returned by HostapdAdapter.
592 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
593
594 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
595
596 Other status means, failed to get the current regulatory domain.
597 \sa
598--------------------------------------------------------------------------*/
599
600eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
601
602eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
603
Jeff Johnson295189b2012-06-20 16:38:30 -0700604
605/* ---------------------------------------------------------------------------
606 \fn sme_ChangeConfigParams
607 \brief The SME API exposed for HDD to provide config params to SME during
608 SMEs stop -> start sequence.
609
610 If HDD changed the domain that will cause a reset. This function will
611 provide the new set of 11d information for the new domain. Currrently this
612 API provides info regarding 11d only at reset but we can extend this for
613 other params (PMC, QoS) which needs to be initialized again at reset.
614
615 This is a synchronuous call
616
617 \param hHal - The handle returned by macOpen.
618
619 \Param
620 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
621 currently provides 11d related information like Country code,
622 Regulatory domain, valid channel list, Tx power per channel, a
623 list with active/passive scan allowed per valid channel.
624
625 \return eHalStatus
626 ---------------------------------------------------------------------------*/
627eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
628 tCsrUpdateConfigParam *pUpdateConfigParam);
629
630/*--------------------------------------------------------------------------
631
632 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
633 is ready tio run.
634
635 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
636 to running state.
637
638
639 \param hHal - The handle returned by macOpen.
640
641 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
642
643 Other status means SME failed to send the message to PE.
644 \sa
645
646 --------------------------------------------------------------------------*/
647eHalStatus sme_HDDReadyInd(tHalHandle hHal);
648
649
650/*--------------------------------------------------------------------------
651
652 \brief sme_ProcessMsg() - The main message processor for SME.
653
654 The function is called by a message dispatcher when to process a message
655 targeted for SME.
656
657
658 \param hHal - The handle returned by macOpen.
659 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
660
661 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
662
663 Other status means SME failed to process the message.
664 \sa
665
666 --------------------------------------------------------------------------*/
667eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
668
669v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
670
671/* ---------------------------------------------------------------------------
672 \fn sme_ScanRequest
673 \brief a wrapper function to Request a 11d or full scan from CSR.
674 \param pScanRequestID - pointer to an object to get back the request ID
675 \param callback - a callback function that scan calls upon finish, will not
676 be called if csrScanRequest returns error
677 \param pContext - a pointer passed in for the callback
678 \return eHalStatus
679 ---------------------------------------------------------------------------*/
680eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
681 tANI_U32 *pScanRequestID,
682 csrScanCompleteCallback callback, void *pContext);
683
684
685/* ---------------------------------------------------------------------------
686 \fn sme_ScanSetBGScanparams
687 \brief a wrapper function to request CSR to set BG scan params in PE
688 \param pScanReq - BG scan request structure
689 \return eHalStatus
690 ---------------------------------------------------------------------------*/
691eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
692
693
694/* ---------------------------------------------------------------------------
695 \fn sme_ScanGetResult
696 \brief a wrapper function to request scan results from CSR.
697 \param pFilter - If pFilter is NULL, all cached results are returned
698 \param phResult - an object for the result.
699 \return eHalStatus
700 ---------------------------------------------------------------------------*/
701eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
702 tScanResultHandle *phResult);
703
704
705/* ---------------------------------------------------------------------------
706 \fn sme_ScanFlushResult
707 \brief a wrapper function to request CSR to clear scan results.
708 \return eHalStatus
709 ---------------------------------------------------------------------------*/
710eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530711
712/*
713 * ---------------------------------------------------------------------------
714 * \fn sme_FilterScanResults
715 * \brief a wrapper function to request CSR to filter the scan results based
716 * on valid chennel list.
717 * \return eHalStatus
718 *---------------------------------------------------------------------------
719 */
720eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
721
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530722/*
723 * ---------------------------------------------------------------------------
724 * \fn sme_FilterScanDFSResults
725 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
726 * from the scan results.
727 * \return eHalStatus
728 *---------------------------------------------------------------------------
729 */
730eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
731
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700732eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700733
734/* ---------------------------------------------------------------------------
735 \fn sme_ScanResultGetFirst
736 \brief a wrapper function to request CSR to returns the first element of
737 scan result.
738 \param hScanResult - returned from csrScanGetResult
739 \return tCsrScanResultInfo * - NULL if no result
740 ---------------------------------------------------------------------------*/
741tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
742 tScanResultHandle hScanResult);
743
744/* ---------------------------------------------------------------------------
745 \fn sme_ScanResultGetNext
746 \brief a wrapper function to request CSR to returns the next element of
747 scan result. It can be called without calling csrScanResultGetFirst
748 first
749 \param hScanResult - returned from csrScanGetResult
750 \return Null if no result or reach the end
751 ---------------------------------------------------------------------------*/
752tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
753 tScanResultHandle hScanResult);
754
755/* ---------------------------------------------------------------------------
756 \fn sme_ScanResultPurge
757 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
758 in the list and free memory for each item
759 \param hScanResult - returned from csrScanGetResult. hScanResult is
760 considered gone by
761 calling this function and even before this function reutrns.
762 \return eHalStatus
763 ---------------------------------------------------------------------------*/
764eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
765
766/* ---------------------------------------------------------------------------
767 \fn sme_ScanGetPMKIDCandidateList
768 \brief a wrapper function to return the PMKID candidate list
769 \param pPmkidList - caller allocated buffer point to an array of
770 tPmkidCandidateInfo
771 \param pNumItems - pointer to a variable that has the number of
772 tPmkidCandidateInfo allocated when retruning, this is
773 either the number needed or number of items put into
774 pPmkidList
775 \return eHalStatus - when fail, it usually means the buffer allocated is not
776 big enough and pNumItems
777 has the number of tPmkidCandidateInfo.
778 \Note: pNumItems is a number of tPmkidCandidateInfo,
779 not sizeof(tPmkidCandidateInfo) * something
780 ---------------------------------------------------------------------------*/
781eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
782 tPmkidCandidateInfo *pPmkidList,
783 tANI_U32 *pNumItems );
784
785
786/*----------------------------------------------------------------------------
787 \fn sme_RoamRegisterLinkQualityIndCallback
788
789 \brief
790 a wrapper function to allow HDD to register a callback handler with CSR for
791 link quality indications.
792
793 Only one callback may be registered at any time.
794 In order to deregister the callback, a NULL cback may be provided.
795
796 Registration happens in the task context of the caller.
797
798 \param callback - Call back being registered
799 \param pContext - user data
800
801 DEPENDENCIES: After CSR open
802
803 \return eHalStatus
804-----------------------------------------------------------------------------*/
805eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
806 csrRoamLinkQualityIndCallback callback,
807 void *pContext);
808
809
810/* ---------------------------------------------------------------------------
811 \fn sme_RoamConnect
812 \brief a wrapper function to request CSR to inititiate an association
813 \param sessionId - the sessionId returned by sme_OpenSession.
814 \param pProfile - can be NULL to join to any open ones
815 \param pRoamId - to get back the request ID
816 \return eHalStatus
817 ---------------------------------------------------------------------------*/
818eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
819 tANI_U32 *pRoamId);
820
821/* ---------------------------------------------------------------------------
822 \fn sme_RoamReassoc
823 \brief a wrapper function to request CSR to inititiate a re-association
824 \param pProfile - can be NULL to join the currently connected AP. In that
825 case modProfileFields should carry the modified field(s) which could trigger
826 reassoc
827 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
828 that might need modification dynamically once STA is up & running and this
829 could trigger a reassoc
830 \param pRoamId - to get back the request ID
831 \return eHalStatus
832 -------------------------------------------------------------------------------*/
833eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
834 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700835 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700836
837/* ---------------------------------------------------------------------------
838 \fn sme_RoamConnectToLastProfile
839 \brief a wrapper function to request CSR to disconnect and reconnect with
840 the same profile
841 \return eHalStatus. It returns fail if currently connected
842 ---------------------------------------------------------------------------*/
843eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
844
845/* ---------------------------------------------------------------------------
846 \fn sme_RoamDisconnect
847 \brief a wrapper function to request CSR to disconnect from a network
848 \param reason -- To indicate the reason for disconnecting. Currently, only
849 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
850 \return eHalStatus
851 ---------------------------------------------------------------------------*/
852eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
853
Jeff Johnson295189b2012-06-20 16:38:30 -0700854/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530855 \fn.sme_abortConnection
856 \brief a wrapper function to request CSR to stop from connecting a network
857 \retun void.
858---------------------------------------------------------------------------*/
859
860void sme_abortConnection(tHalHandle hHal, tANI_U8 sessionId);
861
862/* ---------------------------------------------------------------------------
Abhishek Singhe0bc0992016-05-20 17:58:18 +0530863 \fn.sme_dhcp_done_ind
864 \brief a wrapper function to set dhcp done ind in sme session
865 \retun void.
866---------------------------------------------------------------------------*/
867void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id);
868
869/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700870 \fn sme_RoamStopBss
871 \brief a wrapper function to request CSR to stop bss
872 \param sessionId - sessionId of SoftAP
873 \return eHalStatus
874 ---------------------------------------------------------------------------*/
875eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
876
877/* ---------------------------------------------------------------------------
878 \fn sme_RoamGetAssociatedStas
879 \brief To probe the list of associated stations from various modules of CORE stack.
880 \This is an asynchronous API.
881 \param sessionId - sessionId of SoftAP
882 \param modId - Module from whom list of associtated stations is to be probed.
883 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
884 \param pUsrContext - Opaque HDD context
885 \param pfnSapEventCallback - Sap event callback in HDD
886 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
887 \return eHalStatus
888 -------------------------------------------------------------------------------*/
889eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
890 VOS_MODULE_ID modId, void *pUsrContext,
891 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
892
893/* ---------------------------------------------------------------------------
894 \fn sme_RoamDisconnectSta
895 \brief To disassociate a station. This is an asynchronous API.
896 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
897 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
898 -------------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +0530899eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId,
900#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
901 const tANI_U8 *pPeerMacAddr
902#else
903 tANI_U8 *pPeerMacAddr
904#endif
905 );
Jeff Johnson295189b2012-06-20 16:38:30 -0700906
907/* ---------------------------------------------------------------------------
908 \fn sme_RoamDeauthSta
909 \brief To disassociate a station. This is an asynchronous API.
910 \param hHal - Global structure
911 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530912 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700913 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
914 -------------------------------------------------------------------------------*/
915eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530916 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700917
918/* ---------------------------------------------------------------------------
919 \fn sme_RoamTKIPCounterMeasures
920 \brief To start or stop TKIP counter measures. This is an asynchronous API.
921 \param sessionId - sessionId of SoftAP
922 \param bEnable - Flag to start/stop TKIP countermeasures
923 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
924 -------------------------------------------------------------------------------*/
925eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
926
927/* ---------------------------------------------------------------------------
928 \fn sme_RoamGetWpsSessionOverlap
929 \brief To get the WPS PBC session overlap information.
930 \This is an asynchronous API.
931 \param sessionId - sessionId of SoftAP
932 \param pUsrContext - Opaque HDD context
933 \param pfnSapEventCallback - Sap event callback in HDD
934 \return eHalStatus
935 -------------------------------------------------------------------------------*/
936eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
937 void *pUsrContext, void *pfnSapEventCallback,
938 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700939
940/* ---------------------------------------------------------------------------
941 \fn sme_RoamGetConnectState
942 \brief a wrapper function to request CSR to return the current connect state
943 of Roaming
944 \return eHalStatus
945 ---------------------------------------------------------------------------*/
946eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
947
948/* ---------------------------------------------------------------------------
949 \fn sme_RoamGetConnectProfile
950 \brief a wrapper function to request CSR to return the current connect
951 profile. Caller must call csrRoamFreeConnectProfile after it is done
952 and before reuse for another csrRoamGetConnectProfile call.
953 \param pProfile - pointer to a caller allocated structure
954 tCsrRoamConnectedProfile
955 \return eHalStatus. Failure if not connected
956 ---------------------------------------------------------------------------*/
957eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
958 tCsrRoamConnectedProfile *pProfile);
959
960/* ---------------------------------------------------------------------------
961 \fn sme_RoamFreeConnectProfile
962 \brief a wrapper function to request CSR to free and reinitialize the
963 profile returned previously by csrRoamGetConnectProfile.
964 \param pProfile - pointer to a caller allocated structure
965 tCsrRoamConnectedProfile
966 \return eHalStatus.
967 ---------------------------------------------------------------------------*/
968eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
969 tCsrRoamConnectedProfile *pProfile);
970
971/* ---------------------------------------------------------------------------
972 \fn sme_RoamSetPMKIDCache
973 \brief a wrapper function to request CSR to return the PMKID candidate list
974 \param pPMKIDCache - caller allocated buffer point to an array of
975 tPmkidCacheInfo
976 \param numItems - a variable that has the number of tPmkidCacheInfo
977 allocated when retruning, this is either the number needed
978 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530979 \param update_entire_cache - if TRUE, then it overwrites the entire cache
980 with pPMKIDCache, else it updates entry by
981 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700982 \return eHalStatus - when fail, it usually means the buffer allocated is not
983 big enough and pNumItems has the number of
984 tPmkidCacheInfo.
985 \Note: pNumItems is a number of tPmkidCacheInfo,
986 not sizeof(tPmkidCacheInfo) * something
987 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530988eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
989 tPmkidCacheInfo *pPMKIDCache,
990 tANI_U32 numItems,
991 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700992
993/* ---------------------------------------------------------------------------
994 \fn sme_RoamGetSecurityReqIE
995 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
996 passes to PE to JOIN request or START_BSS request
997 This is a synchronuous call.
998 \param sessionId - returned by sme_OpenSession.
999 \param pLen - caller allocated memory that has the length of pBuf as input.
1000 Upon returned, *pLen has the needed or IE length in pBuf.
1001 \param pBuf - Caller allocated memory that contain the IE field, if any,
1002 upon return
1003 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1004 \return eHalStatus - when fail, it usually means the buffer allocated is not
1005 big enough
1006 ---------------------------------------------------------------------------*/
1007eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1008 tANI_U8 *pBuf, eCsrSecurityType secType);
1009
1010/* ---------------------------------------------------------------------------
1011 \fn sme_RoamGetSecurityRspIE
1012 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
1013 the beacon or probe rsp if connected
1014 \param sessionId - returned by sme_OpenSession.
1015 \param pLen - caller allocated memory that has the length of pBuf as input.
1016 Upon returned, *pLen has the needed or IE length in pBuf.
1017 \param pBuf - Caller allocated memory that contain the IE field, if any,
1018 upon return
1019 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1020 \return eHalStatus - when fail, it usually means the buffer allocated is not
1021 big enough
1022 ---------------------------------------------------------------------------*/
1023eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1024 tANI_U8 *pBuf, eCsrSecurityType secType);
1025
1026
1027/* ---------------------------------------------------------------------------
1028 \fn sme_RoamGetNumPMKIDCache
1029 \brief a wrapper function to request CSR to return number of PMKID cache
1030 entries
1031 \return tANI_U32 - the number of PMKID cache entries
1032 ---------------------------------------------------------------------------*/
1033tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
1034
1035/* ---------------------------------------------------------------------------
1036 \fn sme_RoamGetPMKIDCache
1037 \brief a wrapper function to request CSR to return PMKID cache from CSR
1038 \param pNum - caller allocated memory that has the space of the number of
1039 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
1040 needed or actually number in tPmkidCacheInfo.
1041 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
1042 any, upon return
1043 \return eHalStatus - when fail, it usually means the buffer allocated is not
1044 big enough
1045 ---------------------------------------------------------------------------*/
1046eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
1047 tPmkidCacheInfo *pPmkidCache);
1048
1049/* ---------------------------------------------------------------------------
1050 \fn sme_GetConfigParam
1051 \brief a wrapper function that HDD calls to get the global settings
1052 currently maintained by CSR.
1053 \param pParam - caller allocated memory
1054 \return eHalStatus
1055 ---------------------------------------------------------------------------*/
1056eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
1057
1058/* ---------------------------------------------------------------------------
1059 \fn sme_GetStatistics
1060 \brief a wrapper function that client calls to register a callback to get
1061 different PHY level statistics from CSR.
1062
1063 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1064 \param statsMask - The different category/categories of stats requester is looking for
1065 The order in which you set the bits in the statsMask for requesting
1066 different type of stats is:
1067
1068 eCsrSummaryStats = bit 0
1069 eCsrGlobalClassAStats = bit 1
1070 eCsrGlobalClassBStats = bit 2
1071 eCsrGlobalClassCStats = bit 3
1072 eCsrGlobalClassDStats = bit 4
1073 eCsrPerStaStats = bit 5
1074
1075 \param callback - SME sends back the requested stats using the callback
1076 \param periodicity - If requester needs periodic update, 0 means it's an one
1077 time request
1078 \param cache - If requester is happy with cached stats
1079 \param staId - The station ID for which the stats is requested for
1080 \param pContext - user context to be passed back along with the callback
1081 \return eHalStatus
1082 ---------------------------------------------------------------------------*/
1083eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1084 tANI_U32 statsMask,
1085 tCsrStatsCallback callback,
1086 tANI_U32 periodicity, tANI_BOOLEAN cache,
1087 tANI_U8 staId, void *pContext);
1088
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301089/* ---------------------------------------------------------------------------
1090 \fn smeGetTLSTAState
1091 \helper function to get teh TL STA State whenever the function is called.
1092
1093 \param staId - The staID to be passed to the TL
1094 to get the relevant TL STA State
1095 \return the state as tANI_U16
1096 ---------------------------------------------------------------------------*/
1097tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1098
Jeff Johnson295189b2012-06-20 16:38:30 -07001099eHalStatus sme_GetRssi(tHalHandle hHal,
1100 tCsrRssiCallback callback,
1101 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301102
1103/* ---------------------------------------------------------------------------
1104 \fn sme_GetSnr
1105 \brief a wrapper function that client calls to register a callback to get
1106 SNR from FW
1107
1108 \param callback - SME sends back the requested stats using the callback
1109 \param staId - The station ID for which the stats is requested for
1110 \param bssid - The bssid of the connected session
1111 \param pContext - user context to be passed back along with the callback
1112 ---------------------------------------------------------------------------*/
1113eHalStatus sme_GetSnr(tHalHandle hHal,
1114 tCsrSnrCallback callback,
1115 tANI_U8 staId, tCsrBssid bssId,
1116 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001117#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001118eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1119 tCsrRssiCallback callback,
1120 tANI_U8 staId,
1121 tCsrBssid bssId,
1122 void *pContext,
1123 void* pVosContext);
1124#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001125
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001126#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001127/* ---------------------------------------------------------------------------
1128 \fn sme_GetTsmStats
1129 \brief a wrapper function that client calls to register a callback to get TSM Stats
1130
1131 \param callback - SME sends back the requested stats using the callback
1132 \param staId - The station ID for which the stats is requested for
1133 \param pContext - user context to be passed back along with the callback
1134 \param pVosContext - vos context
1135 \return eHalStatus
1136 ---------------------------------------------------------------------------*/
1137eHalStatus sme_GetTsmStats(tHalHandle hHal,
1138 tCsrTsmStatsCallback callback,
1139 tANI_U8 staId, tCsrBssid bssId,
1140 void *pContext, void* pVosContext, tANI_U8 tid);
1141
1142/* ---------------------------------------------------------------------------
1143 \fn sme_SetCCKMIe
1144 \brief function to store the CCKM IE passed from supplicant and use it while packing
1145 reassociation request
1146 \param hHal - HAL handle for device
1147 \param pCckmIe - pointer to CCKM IE data
1148 \param pCckmIeLen - length of the CCKM IE
1149 \- return Success or failure
1150 -------------------------------------------------------------------------*/
1151eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1152
1153
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001154/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001155 \fn sme_SetEseBeaconRequest
1156 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001157 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001158 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001159 \- return Success or failure
1160 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001161eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1162 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001163
1164
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001165#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001166/* ---------------------------------------------------------------------------
1167 \fn sme_CfgSetInt
1168 \brief a wrapper function that HDD calls to set parameters in CFG.
1169 \param cfgId - Configuration Parameter ID (type) for STA.
1170 \param ccmValue - The information related to Configuration Parameter ID
1171 which needs to be saved in CFG
1172 \param callback - To be registered by CSR with CCM. Once the CFG done with
1173 saving the information in the database, it notifies CCM &
1174 then the callback will be invoked to notify.
1175 \param toBeSaved - To save the request for future reference
1176 \return eHalStatus
1177 ---------------------------------------------------------------------------*/
1178eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1179 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1180
1181/* ---------------------------------------------------------------------------
1182 \fn sme_CfgSetStr
1183 \brief a wrapper function that HDD calls to set parameters in CFG.
1184 \param cfgId - Configuration Parameter ID (type) for STA.
1185 \param pStr - Pointer to the byte array which carries the information needs
1186 to be saved in CFG
1187 \param length - Length of the data to be saved
1188 \param callback - To be registered by CSR with CCM. Once the CFG done with
1189 saving the information in the database, it notifies CCM &
1190 then the callback will be invoked to notify.
1191 \param toBeSaved - To save the request for future reference
1192 \return eHalStatus
1193 ---------------------------------------------------------------------------*/
1194eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1195 tANI_U32 length, tCcmCfgSetCallback callback,
1196 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301197/* ---------------------------------------------------------------------------
1198 \fn sme_GetModifyProfileFields
1199 \brief HDD or SME - QOS calls this function to get the current values of
1200 connected profile fields, changing which can cause reassoc.
1201 This function must be called after CFG is downloaded and STA is in connected
1202 state. Also, make sure to call this function to get the current profile
1203 fields before calling the reassoc. So that pModifyProfileFields will have
1204 all the latest values plus the one(s) has been updated as part of reassoc
1205 request.
1206 \param pModifyProfileFields - pointer to the connected profile fields
1207 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001208
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301209 \return eHalStatus
1210 -------------------------------------------------------------------------------*/
1211eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1212 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301213/* ---------------------------------------------------------------------------
1214 \fn sme_HT40StopOBSSScan
1215 \brief HDD or SME - Command to stop the OBSS scan
1216 THis is implemented only for debugging purpose.
1217 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1218 \param sessionId - sessionId
1219 changing which can cause reassoc
1220
1221 \return eHalStatus
1222 -------------------------------------------------------------------------------*/
1223eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001224
1225/*--------------------------------------------------------------------------
1226 \fn sme_SetConfigPowerSave
1227 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1228 For BMPS related configuration, this function also updates the CFG
1229 and sends a message to FW to pick up the new values. Note: Calling
1230 this function only updates the configuration and does not enable
1231 the specified power save mode.
1232 \param hHal - The handle returned by macOpen.
1233 \param psMode - Power Saving mode being modified
1234 \param pConfigParams - a pointer to a caller allocated object of type
1235 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1236 \return eHalStatus
1237 --------------------------------------------------------------------------*/
1238eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1239 void *pConfigParams);
1240
1241/*--------------------------------------------------------------------------
1242 \fn sme_GetConfigPowerSave
1243 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1244 \param hHal - The handle returned by macOpen.
1245 \param psMode - Power Saving mode
1246 \param pConfigParams - a pointer to a caller allocated object of type
1247 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1248 \return eHalStatus
1249 --------------------------------------------------------------------------*/
1250eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1251 void *pConfigParams);
1252
1253/* ---------------------------------------------------------------------------
1254 \fn sme_SignalPowerEvent
1255 \brief Signals to PMC that a power event has occurred. Used for putting
1256 the chip into deep sleep mode.
1257 \param hHal - The handle returned by macOpen.
1258 \param event - the event that has occurred
1259 \return eHalStatus
1260 ---------------------------------------------------------------------------*/
1261extern eHalStatus sme_SignalPowerEvent (
1262 tHalHandle hHal,
1263 tPmcPowerEvent event);
1264
1265/* ---------------------------------------------------------------------------
1266 \fn sme_EnablePowerSave
1267 \brief Enables one of the power saving modes. This API does not cause a
1268 device state change. This is purely a configuration API.
1269 \param hHal - The handle returned by macOpen.
1270 \param psMode - The power saving mode to enable.
1271 \return eHalStatus
1272 ---------------------------------------------------------------------------*/
1273extern eHalStatus sme_EnablePowerSave (
1274 tHalHandle hHal,
1275 tPmcPowerSavingMode psMode);
1276
1277/* ---------------------------------------------------------------------------
1278 \fn sme_DisablePowerSave
1279 \brief Disables one of the power saving modes.Disabling does not imply
1280 that device will be brought out of the current PS mode. This is
1281 purely a configuration API.
1282 \param hHal - The handle returned by macOpen.
1283 \param psMode - The power saving mode to disable.
1284 \return eHalStatus
1285 ---------------------------------------------------------------------------*/
1286extern eHalStatus sme_DisablePowerSave (
1287 tHalHandle hHal,
1288 tPmcPowerSavingMode psMode);
1289
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301290 /* ---------------------------------------------------------------------------
1291 \fn sme_SetHostPowerSave
1292 \brief The BMPS logic is controlled by the User level Apps
1293 \param hHal - The handle returned by macOpen.
1294 \param psMode - The power saving mode to enable.
1295 \return eHalStatus
1296 ---------------------------------------------------------------------------*/
1297extern eHalStatus sme_SetHostPowerSave (
1298 tHalHandle hHal,
1299 v_BOOL_t psMode);
1300
Jeff Johnson295189b2012-06-20 16:38:30 -07001301/* ---------------------------------------------------------------------------
1302 \fn sme_StartAutoBmpsTimer
1303 \brief Starts a timer that periodically polls all the registered
1304 module for entry into Bmps mode. This timer is started only if BMPS is
1305 enabled and whenever the device is in full power.
1306 \param hHal - The handle returned by macOpen.
1307 \return eHalStatus
1308 ---------------------------------------------------------------------------*/
1309extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1310
1311/* ---------------------------------------------------------------------------
1312 \fn sme_StopAutoBmpsTimer
1313 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1314 Stopping the timer does not cause a device state change. Only the timer
1315 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1316 \param hHal - The handle returned by macOpen.
1317 \return eHalStatus
1318 ---------------------------------------------------------------------------*/
1319extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1320
1321/* ---------------------------------------------------------------------------
1322 \fn sme_QueryPowerState
1323 \brief Returns the current power state of the device.
1324 \param hHal - The handle returned by macOpen.
1325 \param pPowerState - pointer to location to return power state
1326 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1327 \return eHalStatus
1328 ---------------------------------------------------------------------------*/
1329extern eHalStatus sme_QueryPowerState (
1330 tHalHandle hHal,
1331 tPmcPowerState *pPowerState,
1332 tPmcSwitchState *pSwWlanSwitchState);
1333
1334/* ---------------------------------------------------------------------------
1335 \fn sme_IsPowerSaveEnabled
1336 \brief Checks if the device is able to enter a particular power save mode
1337 This does not imply that the device is in a particular PS mode
1338 \param hHal - The handle returned by macOpen.
1339 \param psMode - the power saving mode
1340 \return eHalStatus
1341 ---------------------------------------------------------------------------*/
1342extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1343 tHalHandle hHal,
1344 tPmcPowerSavingMode psMode);
1345
1346/* ---------------------------------------------------------------------------
1347 \fn sme_RequestFullPower
1348 \brief Request that the device be brought to full power state.
1349 Note 1: If "fullPowerReason" specificied in this API is set to
1350 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1351 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1352 HDD is requesting full power, we need to undo any previous HDD requests for
1353 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1354 specified anything other than above, the buffered requests for BMPS and WoWL
1355 will not be cleared.
1356 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1357 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1358 request".
1359 Note 3: When the device finally enters Full Power PMC will start a timer
1360 if any of the following holds true:
1361 - Auto BMPS mode is enabled
1362 - Uapsd request is pending
1363 - HDD's request for BMPS is pending
1364 - HDD's request for WoWL is pending
1365 On timer expiry PMC will attempt to put the device in BMPS mode if following
1366 (in addition to those listed above) holds true:
1367 - Polling of all modules through the Power Save Check routine passes
1368 - STA is associated to an access point
1369 \param hHal - The handle returned by macOpen.
1370 \param - callbackRoutine Callback routine invoked in case of success/failure
1371 \param - callbackContext - Cookie to be passed back during callback
1372 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1373 distinguish between BAP and HDD requests
1374 \return eHalStatus - status
1375 eHAL_STATUS_SUCCESS - device brought to full power state
1376 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1377 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1378 ---------------------------------------------------------------------------*/
1379extern eHalStatus sme_RequestFullPower (
1380 tHalHandle hHal,
1381 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1382 void *callbackContext,
1383 tRequestFullPowerReason fullPowerReason);
1384
1385/* ---------------------------------------------------------------------------
1386 \fn sme_RequestBmps
1387 \brief Request that the device be put in BMPS state. Request will be
1388 accepted only if BMPS mode is enabled and power save check routine
1389 passes. Only HDD should invoke this API.
1390 \param hHal - The handle returned by macOpen.
1391 \param - callbackRoutine Callback routine invoked in case of success/failure
1392 \param - callbackContext - Cookie to be passed back during callback
1393 \return eHalStatus
1394 eHAL_STATUS_SUCCESS - device is in BMPS state
1395 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1396 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1397 ---------------------------------------------------------------------------*/
1398extern eHalStatus sme_RequestBmps (
1399 tHalHandle hHal,
1400 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1401 void *callbackContext);
1402
1403/* ---------------------------------------------------------------------------
1404 \fn sme_SetDHCPTillPowerActiveFlag
1405 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1406 entry by PMC
1407 \param hHal - The handle returned by macOpen.
1408 ---------------------------------------------------------------------------*/
1409void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1410
1411
1412/* ---------------------------------------------------------------------------
1413 \fn sme_StartUapsd
1414 \brief Request that the device be put in UAPSD state. If the device is in
1415 Full Power it will be put in BMPS mode first and then into UAPSD
1416 mode.
1417 \param hHal - The handle returned by macOpen.
1418 \param - callbackRoutine Callback routine invoked in case of success/failure
1419 \param - callbackContext - Cookie to be passed back during callback
1420 eHAL_STATUS_SUCCESS - device is in UAPSD state
1421 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1422 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1423 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1424 \return eHalStatus
1425 ---------------------------------------------------------------------------*/
1426extern eHalStatus sme_StartUapsd (
1427 tHalHandle hHal,
1428 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1429 void *callbackContext);
1430
1431/* ---------------------------------------------------------------------------
1432 \fn sme_StopUapsd
1433 \brief Request that the device be put out of UAPSD state. Device will be
1434 put in in BMPS state after stop UAPSD completes. Buffered requests for
1435 UAPSD will be cleared after this.
1436 \param hHal - The handle returned by macOpen.
1437 \return eHalStatus
1438 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1439 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1440 ---------------------------------------------------------------------------*/
1441extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1442
1443/* ---------------------------------------------------------------------------
1444 \fn sme_RequestStandby
1445 \brief Request that the device be put in standby. It is HDD's responsibility
1446 to bring the chip to full power and do a discconnect before calling
1447 this API. Request for standby will be rejected if STA is associated
1448 to an AP.
1449 \param hHal - The handle returned by macOpen.
1450 \param - callbackRoutine Callback routine invoked in case of success/failure
1451 \param - callbackContext - Cookie to be passed back during callback
1452 \return eHalStatus
1453 eHAL_STATUS_SUCCESS - device is in Standby mode
1454 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1455 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1456 ---------------------------------------------------------------------------*/
1457extern eHalStatus sme_RequestStandby (
1458 tHalHandle hHal,
1459 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1460 void *callbackContext);
1461
1462/* ---------------------------------------------------------------------------
1463 \fn sme_RegisterPowerSaveCheck
1464 \brief Register a power save check routine that is called whenever
1465 the device is about to enter one of the power save modes.
1466 \param hHal - The handle returned by macOpen.
1467 \param checkRoutine - Power save check routine to be registered
1468 \param callbackContext - Cookie to be passed back during callback
1469 \return eHalStatus
1470 eHAL_STATUS_SUCCESS - successfully registered
1471 eHAL_STATUS_FAILURE - not successfully registered
1472 ---------------------------------------------------------------------------*/
1473extern eHalStatus sme_RegisterPowerSaveCheck (
1474 tHalHandle hHal,
1475 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1476
1477/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301478 \fn sme_Register11dScanDoneCallback
1479 \brief Register a routine of type csrScanCompleteCallback which is
1480 called whenever an 11d scan is done
1481 \param hHal - The handle returned by macOpen.
1482 \param callback - 11d scan complete routine to be registered
1483 \return eHalStatus
1484 ---------------------------------------------------------------------------*/
1485extern eHalStatus sme_Register11dScanDoneCallback (
1486 tHalHandle hHal,
1487 csrScanCompleteCallback);
1488
1489/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001490 \fn sme_DeregisterPowerSaveCheck
1491 \brief Deregister a power save check routine
1492 \param hHal - The handle returned by macOpen.
1493 \param checkRoutine - Power save check routine to be deregistered
1494 \return eHalStatus
1495 eHAL_STATUS_SUCCESS - successfully deregistered
1496 eHAL_STATUS_FAILURE - not successfully deregistered
1497 ---------------------------------------------------------------------------*/
1498extern eHalStatus sme_DeregisterPowerSaveCheck (
1499 tHalHandle hHal,
1500 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1501
1502/* ---------------------------------------------------------------------------
1503 \fn sme_RegisterDeviceStateUpdateInd
1504 \brief Register a callback routine that is called whenever
1505 the device enters a new device state (Full Power, BMPS, UAPSD)
1506 \param hHal - The handle returned by macOpen.
1507 \param callbackRoutine - Callback routine to be registered
1508 \param callbackContext - Cookie to be passed back during callback
1509 \return eHalStatus
1510 eHAL_STATUS_SUCCESS - successfully registered
1511 eHAL_STATUS_FAILURE - not successfully registered
1512 ---------------------------------------------------------------------------*/
1513extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1514 tHalHandle hHal,
1515 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1516 void *callbackContext);
1517
1518/* ---------------------------------------------------------------------------
1519 \fn sme_DeregisterDeviceStateUpdateInd
1520 \brief Deregister a routine that was registered for device state changes
1521 \param hHal - The handle returned by macOpen.
1522 \param callbackRoutine - Callback routine to be deregistered
1523 \return eHalStatus
1524 eHAL_STATUS_SUCCESS - successfully deregistered
1525 eHAL_STATUS_FAILURE - not successfully deregistered
1526 ---------------------------------------------------------------------------*/
1527extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1528 tHalHandle hHal,
1529 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1530
1531/* ---------------------------------------------------------------------------
1532 \fn sme_WowlAddBcastPattern
1533 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1534 do a pattern match on these patterns when Wowl is enabled during BMPS
1535 mode.
1536 \param hHal - The handle returned by macOpen.
1537 \param pattern - Pattern to be added
1538 \return eHalStatus
1539 eHAL_STATUS_FAILURE Cannot add pattern
1540 eHAL_STATUS_SUCCESS Request accepted.
1541 ---------------------------------------------------------------------------*/
1542extern eHalStatus sme_WowlAddBcastPattern (
1543 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001544 tpSirWowlAddBcastPtrn pattern,
1545 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001546
1547/* ---------------------------------------------------------------------------
1548 \fn sme_WowlDelBcastPattern
1549 \brief Delete a pattern that was added for Pattern Byte Matching.
1550 \param hHal - The handle returned by macOpen.
1551 \param pattern - Pattern to be deleted
1552 \return eHalStatus
1553 eHAL_STATUS_FAILURE Cannot delete pattern
1554 eHAL_STATUS_SUCCESS Request accepted.
1555 ---------------------------------------------------------------------------*/
1556extern eHalStatus sme_WowlDelBcastPattern (
1557 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001558 tpSirWowlDelBcastPtrn pattern,
1559 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001560
1561/* ---------------------------------------------------------------------------
1562 \fn sme_EnterWowl
1563 \brief This is the API to request entry into WOWL mode.
1564 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1565 SME will will cache the information that WOWL has been requested and
1566 attempt to put the device in BMPS first. On entry into BMPS, SME will
1567 enter the WOWL mode.
1568 Note 1: After WoWL request is accepted, If module other than HDD requests
1569 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1570 and attempt to put the chip into BMPS+WOWL based on a timer.
1571 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1572 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1573 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1574 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1575 are required. Currently there is no requirement or use case to support UAPSD
1576 and WOWL at the same time.
1577 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1578 Note 5. Request for WoWL is rejected if BMPS is disabled.
1579
1580 \param hHal - The handle returned by macOpen.
1581 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1582 Used for success/failure notification by SME
1583 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1584 at the time of callback.
1585 \param wakeReasonIndCB - Callback routine provided by HDD.
1586 Used for Wake Reason Indication by SME
1587 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1588 at the time of callback.
1589 \return eHalStatus
1590 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1591 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1592 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1593 mode is entered.
1594 ---------------------------------------------------------------------------*/
1595extern eHalStatus sme_EnterWowl (
1596 tHalHandle hHal,
1597 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1598 void *enterWowlCallbackContext,
1599#ifdef WLAN_WAKEUP_EVENTS
1600 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1601 void *wakeReasonIndCBContext,
1602#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001603 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001604
1605/* ---------------------------------------------------------------------------
1606 \fn sme_ExitWowl
1607 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1608 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1609 mode. Any Buffered request for WoWL will be cleared after this API.
1610 \param hHal - The handle returned by macOpen.
1611 \return eHalStatus
1612 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1613 only if the previous "Enter WOWL" transaction has
1614 not even completed.
1615 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1616 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301617extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001618
1619/* ---------------------------------------------------------------------------
1620
1621 \fn sme_RoamSetKey
1622
1623 \brief To set encryption key. This function should be called only when connected
1624 This is an asynchronous API.
1625
1626 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1627
1628 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1629
1630 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1631
1632 FAILURE or RESOURCES The API finished and failed.
1633
1634 -------------------------------------------------------------------------------*/
1635eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1636
1637/* ---------------------------------------------------------------------------
1638
1639 \fn sme_RoamRemoveKey
1640
1641 \brief To set encryption key. This is an asynchronous API.
1642
1643 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1644
1645 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1646
1647 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1648
1649 FAILURE or RESOURCES The API finished and failed.
1650
1651 -------------------------------------------------------------------------------*/
1652eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1653
1654
1655/* ---------------------------------------------------------------------------
1656
1657 \fn sme_GetCountryCode
1658
1659 \brief To return the current country code. If no country code is applied, default country code is
1660 used to fill the buffer.
1661 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1662 This is a synchronous API.
1663
1664 \param pBuf - pointer to a caller allocated buffer for returned country code.
1665
1666 \param pbLen For input, this parameter indicates how big is the buffer.
1667 Upon return, this parameter has the number of bytes for country. If pBuf
1668 doesn't have enough space, this function returns
1669 fail status and this parameter contains the number that is needed.
1670
1671 \return eHalStatus SUCCESS.
1672
1673 FAILURE or RESOURCES The API finished and failed.
1674
1675 -------------------------------------------------------------------------------*/
1676eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1677
1678/* ---------------------------------------------------------------------------
1679
1680 \fn sme_SetCountryCode
1681
1682 \brief To change the current/default country code.
1683 If 11d supported is turned off, an error is return.
1684 This is a synchronous API.
1685
1686 \param pCountry - pointer to a caller allocated buffer for the country code.
1687
1688 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1689 whether a reset is required.
1690
1691 \return eHalStatus SUCCESS.
1692
1693 FAILURE or RESOURCES The API finished and failed.
1694
1695 -------------------------------------------------------------------------------*/
1696eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1697
1698/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301699
1700 \fn sme_InitChannels
1701
1702 \brief Used to initialize CSR channel lists while driver loading
1703
1704 \param hHal - global pMac structure
1705
1706 \return eHalStatus SUCCESS.
1707
1708 FAILURE or RESOURCES The API finished and failed.
1709
1710 -------------------------------------------------------------------------------*/
1711eHalStatus sme_InitChannels(tHalHandle hHal);
1712
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301713
Mihir Shete04206452014-11-20 17:50:58 +05301714#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301715/* ---------------------------------------------------------------------------
1716 \fn sme_InitChannelsForCC
1717
1718 \brief Used to issue regulatory hint to user
1719
1720 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301721 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301722
1723 \return eHalStatus SUCCESS.
1724
1725 FAILURE or RESOURCES The API finished and failed.
1726
1727 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301728eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301729#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301730
Mihir Shetee1093ba2014-01-21 20:13:32 +05301731/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001732 \fn sme_ResetCountryCodeInformation
1733 \brief this function is to reset the country code current being used back to EEPROM default
1734 this includes channel list and power setting. This is a synchronous API.
1735 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1736 a restart is needed to apply the change
1737 \return eHalStatus
1738 -------------------------------------------------------------------------------*/
1739eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1740
1741/* ---------------------------------------------------------------------------
1742 \fn sme_GetSupportedCountryCode
1743 \brief this function is to get a list of the country code current being supported
1744 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1745 this has the country code list. 3 bytes for each country code. This may be NULL if
1746 caller wants to know the needed byte count.
1747 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1748 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1749 \return eHalStatus
1750 -------------------------------------------------------------------------------*/
1751eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1752
1753/* ---------------------------------------------------------------------------
1754 \fn sme_GetCurrentRegulatoryDomain
1755 \brief this function is to get the current regulatory domain. This is a synchronous API.
1756 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1757 SME. The function fails if 11d support is turned off.
1758 \param pDomain - Caller allocated buffer to return the current domain.
1759 \return eHalStatus SUCCESS.
1760
1761 FAILURE or RESOURCES The API finished and failed.
1762 -------------------------------------------------------------------------------*/
1763eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1764
1765/* ---------------------------------------------------------------------------
1766 \fn sme_SetRegulatoryDomain
1767 \brief this function is to set the current regulatory domain.
1768 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1769 SME. This is a synchronous API.
1770 \param domainId - indicate the domain (defined in the driver) needs to set to.
1771 See v_REGDOMAIN_t for definition
1772 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1773 a restart is needed to apply the change
1774 \return eHalStatus
1775 -------------------------------------------------------------------------------*/
1776eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1777
1778/* ---------------------------------------------------------------------------
1779
1780 \fn sme_GetRegulatoryDomainForCountry
1781
1782 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1783
1784 \param pCountry - pointer to a caller allocated buffer for input country code.
1785
1786 \param pDomainId Upon successful return, it is the domain that country belongs to.
1787 If it is NULL, returning success means that the country code is known.
1788
1789 \return eHalStatus SUCCESS.
1790
1791 FAILURE or RESOURCES The API finished and failed.
1792
1793 -------------------------------------------------------------------------------*/
1794eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1795
1796
1797
1798/* ---------------------------------------------------------------------------
1799
1800 \fn sme_GetSupportedRegulatoryDomains
1801
1802 \brief To return a list of supported regulatory domains. This is a synchronous API.
1803
1804 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1805
1806 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1807 Upon return, this parameter has the number for supported domains. If pDomains
1808 doesn't have enough space for all the supported domains, this function returns
1809 fail status and this parameter contains the number that is needed.
1810
1811 \return eHalStatus SUCCESS.
1812
1813 FAILURE or RESOURCES The API finished and failed.
1814
1815 -------------------------------------------------------------------------------*/
1816eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1817
1818//some support functions
1819tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1820tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1821tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1822//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1823eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1824
1825typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1826/* ---------------------------------------------------------------------------
1827
1828 \fn sme_ChangeCountryCode
1829
1830 \brief Change Country code from upperlayer during WLAN driver operation.
1831 This is a synchronous API.
1832
1833 \param hHal - The handle returned by macOpen.
1834
1835 \param pCountry New Country Code String
1836
Abhishek Singha306a442013-11-07 18:39:01 +05301837 \param sendRegHint If we want to send reg hint to nl80211
1838
Jeff Johnson295189b2012-06-20 16:38:30 -07001839 \return eHalStatus SUCCESS.
1840
1841 FAILURE or RESOURCES The API finished and failed.
1842
1843 -------------------------------------------------------------------------------*/
1844eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1845 tSmeChangeCountryCallback callback,
1846 tANI_U8 *pCountry,
1847 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301848 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301849 tAniBool countryFromUserSpace,
1850 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001851
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301852/* ---------------------------------------------------------------------------
1853
Amar Singhal0d15bd52013-10-12 23:13:13 -07001854 \fn sme_GenericChangeCountryCode
1855
1856 \brief Generic API to change country code
1857
1858 \param hHal - The handle returned by macOpen.
1859
1860 \param pCountry New Country Code String
1861
1862 \param reg_domain Regulatory domain for the new country code
1863
1864 \return eHalStatus SUCCESS.
1865
1866 FAILURE or RESOURCES The API finished and failed.
1867
1868 -------------------------------------------------------------------------------*/
1869eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1870 tANI_U8 *pCountry,
1871 v_REGDOMAIN_t reg_domain);
1872
Abhishek Singh00b71972016-01-07 10:51:04 +05301873#ifdef WLAN_FEATURE_RMC
1874/* ---------------------------------------------------------------------------
1875
1876 \fn sme_TXFailMonitorStartStopInd
1877
1878 \brief Indicate FW about TX Fail Monitor Indication`
1879
1880 \param hHal - The handle returned by macOpen.
1881
1882 \param tx_fail_count number of failures after which the firmware sends
1883 an indication to host
1884
1885 \param txFailIndCallback function to be called after receiving TX Fail
1886 indication
1887 \return eHalStatus SUCCESS.
1888
1889 FAILURE or RESOURCES The API finished and failed.
1890
1891 -------------------------------------------------------------------------------*/
1892eHalStatus sme_TXFailMonitorStartStopInd(tHalHandle hHal,
1893 tANI_U8 tx_fail_count,
1894 void * txFailIndCallback);
1895#endif /* WLAN_FEATURE_RMC */
1896
Kapil Gupta04ab1992016-06-26 13:36:51 +05301897#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1898VOS_STATUS sme_set_per_roam_rxconfig (tHalHandle hHal, v_U8_t sessionId,
1899 v_U16_t minRate, v_U16_t maxRate, v_U8_t minPercentage,
1900 v_U16_t minPktRequired, v_U64_t waitPeriodForNextPERScan);
1901
1902VOS_STATUS sme_unset_per_roam_rxconfig (tHalHandle hHal);
1903
1904void sme_PERRoamScanStartStop(void *hHal, tANI_U8 start);
1905#endif
1906
Amar Singhal0d15bd52013-10-12 23:13:13 -07001907/* ---------------------------------------------------------------------------
1908
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301909 \fn sme_DHCPStartInd
1910
1911 \brief Indicate FW about DHCP start event.
1912
1913 \param hHal - The handle returned by macOpen.
1914
1915 \param device_mode the mode of the device
1916
c_hpothu0b0cab72014-02-13 21:52:40 +05301917 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301918
1919 \return eHalStatus SUCCESS.
1920
1921 FAILURE or RESOURCES The API finished and failed.
1922
1923 -------------------------------------------------------------------------------*/
1924
1925eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1926 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301927 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301928
1929/* ---------------------------------------------------------------------------
1930
1931 \fn sme_DHCPStopInd
1932
1933 \brief Indicate FW about DHCP stop event.
1934
1935 \param hHal - The handle returned by macOpen.
1936
1937 \param device_mode the mode of the device
1938
c_hpothu0b0cab72014-02-13 21:52:40 +05301939 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301940
1941 \return eHalStatus SUCCESS.
1942
1943 FAILURE or RESOURCES The API finished and failed.
1944
1945 -------------------------------------------------------------------------------*/
1946eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1947 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301948 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301949
Jeff Johnson295189b2012-06-20 16:38:30 -07001950
1951/* ---------------------------------------------------------------------------
1952 \fn sme_BtcSignalBtEvent
1953 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1954 BT event type and the current operating mode of Libra (full power,
1955 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1956 would be employed.
1957 \param hHal - The handle returned by macOpen.
1958 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1959 Caller owns the memory and is responsible for freeing it.
1960 \return VOS_STATUS
1961 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1962 if driver has not yet been initialized or if BTC
1963 Events Layer has been disabled.
1964 VOS_STATUS_SUCCESS BT Event passed to HAL
1965 ---------------------------------------------------------------------------*/
1966VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1967
1968/* ---------------------------------------------------------------------------
1969 \fn sme_BtcSetConfig
1970 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1971 This function should be invoked only after CFG download has completed.
1972 Calling it after sme_HDDReadyInd is recommended.
1973 \param hHal - The handle returned by macOpen.
1974 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1975 tSmeBtcConfig. Caller owns the memory and is responsible
1976 for freeing it.
1977 \return VOS_STATUS
1978 VOS_STATUS_E_FAILURE Config not passed to HAL.
1979 VOS_STATUS_SUCCESS Config passed to HAL
1980 ---------------------------------------------------------------------------*/
1981VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1982
1983/* ---------------------------------------------------------------------------
1984 \fn sme_BtcGetConfig
1985 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1986 \param hHal - The handle returned by macOpen.
1987 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1988 Caller owns the memory and is responsible for freeing it.
1989 \return VOS_STATUS
1990 VOS_STATUS_E_FAILURE - failure
1991 VOS_STATUS_SUCCESS success
1992 ---------------------------------------------------------------------------*/
1993VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1994
1995/* ---------------------------------------------------------------------------
1996 \fn sme_SetCfgPrivacy
1997 \brief API to set configure privacy parameters
1998 \param hHal - The handle returned by macOpen.
1999 \param pProfile - Pointer CSR Roam profile.
2000 \param fPrivacy - This parameter indicates status of privacy
2001
2002 \return void
2003 ---------------------------------------------------------------------------*/
2004void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
2005
2006#if defined WLAN_FEATURE_VOWIFI
2007/* ---------------------------------------------------------------------------
2008 \fn sme_NeighborReportRequest
2009 \brief API to request neighbor report.
2010 \param hHal - The handle returned by macOpen.
2011 \param pRrmNeighborReq - Pointer to a caller allocated object of type
2012 tRrmNeighborReq. Caller owns the memory and is responsible
2013 for freeing it.
2014 \return VOS_STATUS
2015 VOS_STATUS_E_FAILURE - failure
2016 VOS_STATUS_SUCCESS success
2017 ---------------------------------------------------------------------------*/
2018VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
2019 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
2020#endif
2021
2022//The following are debug APIs to support direct read/write register/memory
2023//They are placed in SME because HW cannot be access when in LOW_POWER state
2024//AND not connected. The knowledge and synchronization is done in SME
2025
2026//sme_DbgReadRegister
2027//Caller needs to validate the input values
2028VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
2029
2030//sme_DbgWriteRegister
2031//Caller needs to validate the input values
2032VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
2033
2034//sme_DbgReadMemory
2035//Caller needs to validate the input values
2036//pBuf caller allocated buffer has the length of nLen
2037VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2038
2039//sme_DbgWriteMemory
2040//Caller needs to validate the input values
2041VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2042
Jeff Johnson295189b2012-06-20 16:38:30 -07002043VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
2044 tSirVersionType *pVersion);
2045VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
2046 tSirVersionType *pVersion);
2047VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
2048 tANI_U8 *pVersion,
2049 tANI_U32 versionBufferSize);
2050VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
2051 tANI_U8 *pVersion,
2052 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07002053eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
2054 csrRoamCompleteCallback callback,
2055 void *pContext);
2056
2057#ifdef FEATURE_WLAN_WAPI
2058/* ---------------------------------------------------------------------------
2059 \fn sme_RoamSetBKIDCache
2060 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
2061 candidate list.
2062 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2063 it is opened (by calling halOpen).
2064 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
2065 \param numItems - a variable that has the number of tBkidCacheInfo allocated
2066 when retruning, this is the number of items put into pBKIDCache
2067 \return eHalStatus - when fail, it usually means the buffer allocated is not
2068 big enough and pNumItems has the number of tBkidCacheInfo.
2069 ---------------------------------------------------------------------------*/
2070eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
2071 tANI_U32 numItems );
2072
2073/* ---------------------------------------------------------------------------
2074 \fn sme_RoamGetBKIDCache
2075 \brief The SME API exposed to HDD to allow HDD to request SME to return its
2076 BKID cache.
2077 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2078 it is opened (by calling halOpen).
2079 \param pNum - caller allocated memory that has the space of the number of
2080 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
2081 in SME cache.
2082 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
2083 upon return
2084 \return eHalStatus - when fail, it usually means the buffer allocated is not
2085 big enough.
2086 ---------------------------------------------------------------------------*/
2087eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
2088 tBkidCacheInfo *pBkidCache);
2089
2090/* ---------------------------------------------------------------------------
2091 \fn sme_RoamGetNumBKIDCache
2092 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2093 number of BKID cache entries.
2094 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2095 it is opened (by calling halOpen).
2096 \return tANI_U32 - the number of BKID cache entries.
2097 ---------------------------------------------------------------------------*/
2098tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2099
2100/* ---------------------------------------------------------------------------
2101 \fn sme_ScanGetBKIDCandidateList
2102 \brief a wrapper function to return the BKID candidate list
2103 \param pBkidList - caller allocated buffer point to an array of
2104 tBkidCandidateInfo
2105 \param pNumItems - pointer to a variable that has the number of
2106 tBkidCandidateInfo allocated when retruning, this is
2107 either the number needed or number of items put into
2108 pPmkidList
2109 \return eHalStatus - when fail, it usually means the buffer allocated is not
2110 big enough and pNumItems
2111 has the number of tBkidCandidateInfo.
2112 \Note: pNumItems is a number of tBkidCandidateInfo,
2113 not sizeof(tBkidCandidateInfo) * something
2114 ---------------------------------------------------------------------------*/
2115eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2116 tBkidCandidateInfo *pBkidList,
2117 tANI_U32 *pNumItems );
2118#endif /* FEATURE_WLAN_WAPI */
2119
Jeff Johnsone7245742012-09-05 17:12:55 -07002120#ifdef FEATURE_OEM_DATA_SUPPORT
2121/********************************************************************************************
2122 Oem data related modifications
2123*********************************************************************************************/
2124/* ---------------------------------------------------------------------------
2125 \fn sme_OemDataReq
2126 \param sessionId - session id of session to be used for oem data req.
2127 \param pOemDataReqID - pointer to an object to get back the request ID
2128 \param callback - a callback function that is called upon finish
2129 \param pContext - a pointer passed in for the callback
2130 \return eHalStatus
2131 ---------------------------------------------------------------------------*/
2132eHalStatus sme_OemDataReq(tHalHandle hHal,
2133 tANI_U8 sessionId,
2134 tOemDataReqConfig *,
2135 tANI_U32 *pOemDataReqID,
2136 oemData_OemDataReqCompleteCallback callback,
2137 void *pContext);
2138
2139/* ---------------------------------------------------------------------------
2140 \fn sme_getOemDataRsp
2141 \param pOemDataRsp - A pointer to the response object
2142 \param pOemDataReqID - pointer to an object to get back the request ID
2143 \return eHalStatus
2144 ---------------------------------------------------------------------------*/
2145eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2146 tOemDataRsp **pOemDataRsp);
2147
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +05302148/* ---------------------------------------------------------------------------
2149 \fn sme_OemDataReqNew
2150 \brief a wrapper function for OEM DATA REQ NEW
2151 \param pOemDataReqNewConfig - Data to be passed to FW
2152 ---------------------------------------------------------------------------*/
2153void sme_OemDataReqNew(tHalHandle hHal,
2154 tOemDataReqNewConfig *pOemDataReqNewConfig);
2155
Jeff Johnsone7245742012-09-05 17:12:55 -07002156#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002157
2158
Jeff Johnson295189b2012-06-20 16:38:30 -07002159
2160/* ---------------------------------------------------------------------------
2161
2162 \fn sme_RoamUpdateAPWPSIE
2163
2164 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2165 This is an asynchronous API.
2166
2167 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2168
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002169 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002170
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002171 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002172
2173 -------------------------------------------------------------------------------*/
2174
2175eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2176/* ---------------------------------------------------------------------------
2177
2178 \fn sme_RoamUpdateAPWPARSNIEs
2179
2180 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2181 This is an asynchronous API.
2182
2183 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2184
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002185 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002186
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002187 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002188
2189 -------------------------------------------------------------------------------*/
2190eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2191
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002192/* ---------------------------------------------------------------------------
2193
2194 sme_ChangeMCCBeaconInterval
2195
2196 \brief To update P2P-GO's beacon Interval.
2197
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002198 \return eHalStatus SUCCESS
2199 FAILURE or RESOURCES
2200 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002201 -------------------------------------------------------------------------------*/
2202eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2203
2204
Jeff Johnson295189b2012-06-20 16:38:30 -07002205
2206/* ---------------------------------------------------------------------------
2207 \fn sme_sendBTAmpEvent
2208 \brief API to send the btAMPstate to FW
2209 \param hHal - The handle returned by macOpen.
2210 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002211 \return eHalStatus SUCCESS
2212 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002213
2214--------------------------------------------------------------------------- */
2215
2216eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2217
2218
2219
2220/* ---------------------------------------------------------------------------
2221 \fn sme_SetHostOffload
2222 \brief API to set the host offload feature.
2223 \param hHal - The handle returned by macOpen.
2224 \param pRequest - Pointer to the offload request.
2225 \return eHalStatus
2226 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002227eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2228 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002229
2230/* ---------------------------------------------------------------------------
2231 \fn sme_SetKeepAlive
2232 \brief API to set the Keep Alive feature.
2233 \param hHal - The handle returned by macOpen.
2234 \param pRequest - Pointer to the Keep Alive request.
2235 \return eHalStatus
2236 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002237eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2238 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002239
Jeff Johnson295189b2012-06-20 16:38:30 -07002240/* ----------------------------------------------------------------------------
2241 \fn sme_GetOperationChannel
2242 \brief API to get current channel on which STA is parked
2243 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002244 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002245 \returns eHAL_STATUS_SUCCESS
2246 eHAL_STATUS_FAILURE
2247-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002248eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002249
Abhishek Singh7d624e12015-11-30 14:29:27 +05302250eHalStatus sme_register_mgmt_frame_ind_callback(tHalHandle hHal,
2251 sir_mgmt_frame_ind_callback callback);
2252
Jeff Johnson295189b2012-06-20 16:38:30 -07002253/* ---------------------------------------------------------------------------
2254
2255 \fn sme_RegisterMgtFrame
2256
2257 \brief To register managment frame of specified type and subtype.
2258 \param frameType - type of the frame that needs to be passed to HDD.
2259 \param matchData - data which needs to be matched before passing frame
2260 to HDD.
2261 \param matchDataLen - Length of matched data.
2262 \return eHalStatus
2263 -------------------------------------------------------------------------------*/
2264eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2265 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2266
2267/* ---------------------------------------------------------------------------
2268
2269 \fn sme_DeregisterMgtFrame
2270
2271 \brief To De-register managment frame of specified type and subtype.
2272 \param frameType - type of the frame that needs to be passed to HDD.
2273 \param matchData - data which needs to be matched before passing frame
2274 to HDD.
2275 \param matchDataLen - Length of matched data.
2276 \return eHalStatus
2277 -------------------------------------------------------------------------------*/
2278eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2279 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302280/* ---------------------------------------------------------------------------
2281 \fn sme_GetFramesLog
2282 \brief a wrapper function that client calls to register a callback to get
2283 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302284 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302285 \return eHalStatus
2286 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302287eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002288/* ---------------------------------------------------------------------------
2289
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302290 \fn sme_InitMgmtFrameLogging
2291
2292 \brief
2293 SME will pass this request to lower mac to initialize Frame Logging.
2294
2295 \param
2296
2297 hHal - The handle returned by macOpen.
2298
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302299 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302300
2301 \return eHalStatus
2302--------------------------------------------------------------------------- */
2303eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302304 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302305
Gupta, Kapil7c34b322015-09-30 13:12:35 +05302306
2307/* ---------------------------------------------------------------------------
2308
2309 \fn sme_StopRssiMonitoring
2310
2311 \brief
2312 SME will pass this request to lower mac to stop monitoring rssi range on
2313 a bssid.
2314
2315 \param
2316
2317 hHal - The handle returned by macOpen.
2318
2319 tSirRssiMonitorReq req- depict the monitor req params.
2320
2321 \return eHalStatus
2322
2323--------------------------------------------------------------------------- */
2324eHalStatus sme_StopRssiMonitoring(tHalHandle hHal,
2325 tSirRssiMonitorReq *req);
2326
2327/* ---------------------------------------------------------------------------
2328
2329 \fn sme_StartRssiMonitoring
2330
2331 \brief
2332 SME will pass this request to lower mac to start monitoring rssi range on
2333 a bssid.
2334
2335 \param
2336
2337 hHal - The handle returned by macOpen.
2338
2339 tSirRssiMonitorReq req- depict the monitor req params.
2340
2341 \return eHalStatus
2342
2343--------------------------------------------------------------------------- */
2344eHalStatus sme_StartRssiMonitoring(tHalHandle hHal,
2345 tSirRssiMonitorReq *req);
2346
2347
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302348/* ---------------------------------------------------------------------------
2349
Jeff Johnson295189b2012-06-20 16:38:30 -07002350 \fn sme_ConfigureRxpFilter
2351
2352 \brief
2353 SME will pass this request to lower mac to set/reset the filter on RXP for
2354 multicast & broadcast traffic.
2355
2356 \param
2357
2358 hHal - The handle returned by macOpen.
2359
2360 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2361 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2362 on this param. In future we can use this as a mask to set various types of
2363 filters as suggested below:
2364 FILTER_ALL_MULTICAST:
2365 FILTER_ALL_BROADCAST:
2366 FILTER_ALL_MULTICAST_BROADCAST:
2367
2368
2369 \return eHalStatus
2370
2371
2372--------------------------------------------------------------------------- */
2373eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2374 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2375
2376/* ---------------------------------------------------------------------------
2377
2378 \fn sme_ConfigureAppsCpuWakeupState
2379
2380 \brief
2381 SME will pass this request to lower mac to dynamically adjusts the listen
2382 interval based on the WLAN/MSM activity. This feature is named as
2383 Telescopic Beacon wakeup feature.
2384
2385 \param
2386
2387 hHal - The handle returned by macOpen.
2388
2389 isAppsAwake- Depicts the state of the Apps CPU
2390
2391
2392 \return eHalStatus
2393
2394
2395--------------------------------------------------------------------------- */
2396eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2397
Jeff Johnson295189b2012-06-20 16:38:30 -07002398/* ---------------------------------------------------------------------------
2399
2400 \fn sme_ConfigureSuspendInd
2401
2402 \brief
2403 SME will pass this request to lower mac to Indicate that the wlan needs to
2404 be suspended
2405
2406 \param
2407
2408 hHal - The handle returned by macOpen.
2409
2410 wlanSuspendParam- Depicts the wlan suspend params
2411
2412
2413 \return eHalStatus
2414
2415
2416--------------------------------------------------------------------------- */
2417eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2418 tpSirWlanSuspendParam wlanSuspendParam);
2419
2420/* ---------------------------------------------------------------------------
2421
2422 \fn sme_ConfigureResumeReq
2423
2424 \brief
2425 SME will pass this request to lower mac to Indicate that the wlan needs to
2426 be Resumed
2427
2428 \param
2429
2430 hHal - The handle returned by macOpen.
2431
2432 wlanResumeParam- Depicts the wlan resume params
2433
2434
2435 \return eHalStatus
2436
2437
2438--------------------------------------------------------------------------- */
2439eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2440 tpSirWlanResumeParam wlanResumeParam);
2441
Jeff Johnson295189b2012-06-20 16:38:30 -07002442
2443/* ---------------------------------------------------------------------------
2444
2445 \fn sme_GetInfraSessionId
2446
2447 \brief To get the session ID for infra session, if connected
2448 This is a synchronous API.
2449
2450 \param hHal - The handle returned by macOpen.
2451
2452 \return sessionid, -1 if infra session is not connected
2453
2454 -------------------------------------------------------------------------------*/
2455tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2456
2457/* ---------------------------------------------------------------------------
2458
2459 \fn sme_GetInfraOperationChannel
2460
2461 \brief To get the operating channel for infra session, if connected
2462 This is a synchronous API.
2463
2464 \param hHal - The handle returned by macOpen.
2465 \param sessionId - the sessionId returned by sme_OpenSession.
2466
2467 \return operating channel, 0 if infra session is not connected
2468
2469 -------------------------------------------------------------------------------*/
2470tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2471/* ---------------------------------------------------------------------------
2472
2473 \fn sme_GetConcurrentOperationChannel
2474
2475 \brief To get the operating channel for other concurrent sessions, if connected
2476 This is a synchronous API.
2477
2478 \param hHal - The handle returned by macOpen.
2479 \param currentPersona - persona that is trying to come up.
2480
2481 \return operating channel, 0 if infra session is not connected
2482
2483 -------------------------------------------------------------------------------*/
2484tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2485
2486/* ---------------------------------------------------------------------------
2487 \fn sme_AbortMacScan
2488 \brief API to cancel MAC scan.
2489 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302490 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302491 \return tSirAbortScanStatus return status abort scan
2492
Jeff Johnson295189b2012-06-20 16:38:30 -07002493 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302494tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2495 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002496
2497/* ---------------------------------------------------------------------------
2498 \fn sme_GetCfgValidChannels
2499 \brief API to get valid channel list
2500 \param hHal - The handle returned by macOpen.
2501 \param aValidChannels - Pointer to the valid channel list
2502 \param len - valid channel list length
2503 \return eHalStatus
2504 ---------------------------------------------------------------------------*/
2505eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2506
2507#ifdef FEATURE_WLAN_SCAN_PNO
2508
2509/* ---------------------------------------------------------------------------
2510 \fn sme_SetPreferredNetworkList
2511 \brief API to set the Preferred Network List Offload feature.
2512 \param hHal - The handle returned by macOpen.
2513 \param pRequest - Pointer to the offload request.
2514 \return eHalStatus
2515 ---------------------------------------------------------------------------*/
2516eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2517
2518/* ---------------------------------------------------------------------------
2519 \fn sme_SetRSSIFilter
2520 \brief API to set RSSI Filter feature.
2521 \param hHal - The handle returned by macOpen.
2522 \param pRequest - Pointer to the offload request.
2523 \return eHalStatus
2524 ---------------------------------------------------------------------------*/
2525eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2526
2527/******************************************************************************
2528*
2529* Name: sme_PreferredNetworkFoundInd
2530*
2531* Description:
2532* Invoke Preferred Network Found Indication
2533*
2534* Parameters:
2535* hHal - HAL handle for device
2536* pMsg - found network description
2537*
2538* Returns: eHalStatus
2539*
2540******************************************************************************/
2541eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2542#endif // FEATURE_WLAN_SCAN_PNO
2543
2544/* ---------------------------------------------------------------------------
2545 \fn sme_SetPowerParams
2546 \brief API to set Power Parameters
2547 \param hHal - The handle returned by macOpen.
2548 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002549 \param forced - if true, not to be dropped silently in host, it must reach
2550 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2551 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002552 \return eHalStatus
2553 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002554eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002555
2556/* ---------------------------------------------------------------------------
2557 \fn sme_SetTxPerTracking
2558 \brief Set Tx PER tracking configuration parameters
2559 \param hHal - The handle returned by macOpen.
2560 \param pTxPerTrackingParam - Tx PER configuration parameters
2561 \return eHalStatus
2562 ---------------------------------------------------------------------------*/
2563eHalStatus sme_SetTxPerTracking (
2564 tHalHandle hHal,
2565 void (*pCallbackfn) (void *pCallbackContext),
2566 void *pCallbackContext,
2567 tpSirTxPerTrackingParam pTxPerTrackingParam);
2568
2569#ifdef WLAN_FEATURE_PACKET_FILTERING
2570/* ---------------------------------------------------------------------------
2571 \fn sme_ReceiveFilterSetFilter
2572 \brief API to set 8023 Multicast Address List
2573 \param hHal - The handle returned by macOpen.
2574 \param pMulticastAddrs - Pointer to the Multicast Address List
2575 \return eHalStatus
2576 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002577eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002578
2579/* ---------------------------------------------------------------------------
2580 \fn sme_ReceiveFilterSetFilter
2581 \brief API to set Receive Packet Filter
2582 \param hHal - The handle returned by macOpen.
2583 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2584 \return eHalStatus
2585 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002586eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2587 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002588
2589/* ---------------------------------------------------------------------------
2590 \fn sme_GetFilterMatchCount
2591 \brief API to get D0 PC Filter Match Count
2592 \param hHal - The handle returned by macOpen
2593 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2594 \param callbackContext - Cookie to be passed back during callback
2595 \return eHalStatus
2596 ---------------------------------------------------------------------------*/
2597eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2598 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002599 void *callbackContext,
2600 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002601
2602/* ---------------------------------------------------------------------------
2603 \fn sme_ReceiveFilterClearFilter
2604 \brief API to clear Receive Packet Filter
2605 \param hHal - The handle returned by macOpen.
2606 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2607 \return eHalStatus
2608 ---------------------------------------------------------------------------*/
2609eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002610 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2611 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002612#endif // WLAN_FEATURE_PACKET_FILTERING
2613/* ---------------------------------------------------------------------------
2614
2615 \fn sme_IsChannelValid
2616 \brief To check if the channel is valid for currently established domain
2617 This is a synchronous API.
2618
2619 \param hHal - The handle returned by macOpen.
2620 \param channel - channel to verify
2621
2622 \return TRUE/FALSE, TRUE if channel is valid
2623
2624 -------------------------------------------------------------------------------*/
2625tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2626
2627/* ---------------------------------------------------------------------------
2628 \fn sme_SetFreqBand
2629 \brief Used to set frequency band.
2630 \param hHal
2631 \eBand band value to be configured
2632 \- return eHalStatus
2633 -------------------------------------------------------------------------*/
2634eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2635
2636/* ---------------------------------------------------------------------------
2637 \fn sme_GetFreqBand
2638 \brief Used to get the current band settings.
2639 \param hHal
2640 \pBand pointer to hold the current band value
2641 \- return eHalStatus
2642 -------------------------------------------------------------------------*/
2643eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2644
2645/* ---------------------------------------------------------------------------
2646
2647 \fn sme_SetTxPerTracking
2648 \brief Set Tx PER tracking configuration parameters
2649 \param hHal - The handle returned by macOpen.
2650 \param pTxPerTrackingParam - Tx PER configuration parameters
2651 \return eHalStatus
2652 ---------------------------------------------------------------------------*/
2653eHalStatus sme_SetTxPerTracking (
2654 tHalHandle hHal,
2655 void (*pCallbackfn) (void *pCallbackContext),
2656 void *pCallbackContext,
2657 tpSirTxPerTrackingParam pTxPerTrackingParam);
2658
2659#ifdef WLAN_FEATURE_GTK_OFFLOAD
2660/* ---------------------------------------------------------------------------
2661 \fn sme_SetGTKOffload
2662 \brief API to set GTK offload feature.
2663 \param hHal - The handle returned by macOpen.
2664 \param pRequest - Pointer to the GTK offload request.
2665 \return eHalStatus
2666 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002667eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002668
2669/* ---------------------------------------------------------------------------
2670 \fn sme_GetGTKOffload
2671 \brief API to get GTK offload information.
2672 \param hHal - The handle returned by macOpen.
2673 \param pRequest - Pointer to the GTK offload response.
2674 \return eHalStatus
2675 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002676eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2677 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002678#endif // WLAN_FEATURE_GTK_OFFLOAD
2679
2680#ifdef WLAN_WAKEUP_EVENTS
2681eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2682#endif // WLAN_WAKEUP_EVENTS
2683
2684/* ---------------------------------------------------------------------------
2685 \fn sme_SetTxPerTracking
2686 \brief Set Tx PER tracking configuration parameters
2687 \param hHal - The handle returned by macOpen.
2688 \param pTxPerTrackingParam - Tx PER configuration parameters
2689 \return eHalStatus
2690 ---------------------------------------------------------------------------*/
2691eHalStatus sme_SetTxPerTracking (
2692 tHalHandle hHal,
2693 void (*pCallbackfn) (void *pCallbackContext),
2694 void *pCallbackContext,
2695 tpSirTxPerTrackingParam pTxPerTrackingParam);
2696
2697
2698//return frequency for a particular channel
2699tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2700
2701tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2702
2703#if defined WLAN_FEATURE_P2P_INTERNAL
2704
2705eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2706
2707/* ---------------------------------------------------------------------------
2708 \fn sme_p2pFlushDeviceList
2709 \brief Remove cached P2P result from scan results
2710 \param hHal - The handle returned by macOpen.
2711 \param HDDSessionId - HDD's sessionId. Currently unused.
2712 \return eHalStatus
2713 ---------------------------------------------------------------------------*/
2714eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2715
2716eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2717 tCsrScanResultFilter *pFilter);
2718
2719#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2720
2721/* ---------------------------------------------------------------------------
2722 \fn sme_SetMaxTxPower
2723 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2724 setting will not persist over reboots
2725 \param hHal
2726 \param pBssid BSSID to set the power cap for
2727 \param pBssid pSelfMacAddress self MAC Address
2728 \param pBssid power to set in dB
2729 \- return eHalStatus
2730 -------------------------------------------------------------------------*/
2731eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2732 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2733
Padma, Santhosh Kumar98b5d252016-10-17 17:30:41 +05302734/**
2735 * sme_SetMaxTxPowerPerBand() - Set the Maximum Transmit Power
2736 * specific to band dynamically
2737 * @band: Band for which power needs to be applied
2738 * @dB: power to set in dB
2739 * @hal: HAL handle
2740 *
2741 * Set the maximum transmit power dynamically per band
2742 *
2743 * Return: eHalStatus
2744 */
2745eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t dB,
2746 tHalHandle hal);
Arif Hussaina5ebce02013-08-09 15:09:58 -07002747
2748/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002749
schang86c22c42013-03-13 18:41:24 -07002750 \fn sme_SetTxPower
2751
2752 \brief Set Transmit Power dynamically. Note: this setting will
2753 not persist over reboots.
2754
2755 \param hHal
2756 \param sessionId Target Session ID
2757 \param mW power to set in mW
2758 \- return eHalStatus
2759
2760 -------------------------------------------------------------------------------*/
2761eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2762
2763/* ---------------------------------------------------------------------------
2764
Jeff Johnson295189b2012-06-20 16:38:30 -07002765 \fn sme_HideSSID
2766
2767 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2768 not persist over reboots.
2769
2770 \param hHal
2771 \param sessionId
2772 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2773 \- return eHalStatus
2774
2775 -------------------------------------------------------------------------------*/
2776eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002777
2778/* ---------------------------------------------------------------------------
2779
2780 \fn sme_SetTmLevel
2781 \brief Set Thermal Mitigation Level to RIVA
2782 \param hHal - The handle returned by macOpen.
2783 \param newTMLevel - new Thermal Mitigation Level
2784 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002785 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002786 ---------------------------------------------------------------------------*/
2787eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2788
2789/*---------------------------------------------------------------------------
2790
2791 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2792 Host and FW.
2793
2794 \param hHal - HAL handle for device
2795
2796 \return NONE
2797
2798---------------------------------------------------------------------------*/
2799void sme_featureCapsExchange(tHalHandle hHal);
2800
Jeff Johnsond13512a2012-07-17 11:42:19 -07002801/*---------------------------------------------------------------------------
2802
Yathish9f22e662012-12-10 14:21:35 -08002803 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2804 between in Host.
2805
2806 \param hHal - HAL handle for device
2807
2808 \return NONE
2809
2810---------------------------------------------------------------------------*/
2811void sme_disableFeatureCapablity(tANI_U8 feature_index);
2812
2813/*---------------------------------------------------------------------------
2814
Jeff Johnsond13512a2012-07-17 11:42:19 -07002815 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2816 country code
2817 Host and FW.
2818
2819 \param hHal - HAL handle for device
2820 \param pCountry - pointer to country code
2821
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002822 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002823
2824 ---------------------------------------------------------------------------*/
2825eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2826
2827/*---------------------------------------------------------------------------
2828
2829 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2830 country code.
2831
2832 \param hHal - HAL handle for device
2833 \param pCountry - pointer to country code
2834
2835 \return Success or failure
2836
2837 ---------------------------------------------------------------------------*/
2838eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2839
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002840/* ---------------------------------------------------------------------------
2841 \fn sme_transportDebug
2842 \brief Dynamically monitoring Transport channels
2843 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002844 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002845 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002846 \param toggleStallDetect Enable stall detect feature
2847 This feature will take effect to data performance
2848 Not integrate till fully verification
2849 \- return NONE
2850 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002851void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002852
Kiran4a17ebe2013-01-31 10:43:43 -08002853/* ---------------------------------------------------------------------------
2854 \fn sme_ResetPowerValuesFor5G
2855 \brief Reset the power values for 5G band with NV power values.
2856 \param hHal - HAL handle for device
2857 \- return NONE
2858 -------------------------------------------------------------------------*/
2859void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2860
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002861#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002862/* ---------------------------------------------------------------------------
2863 \fn sme_UpdateRoamPrefer5GHz
2864 \brief enable/disable Roam prefer 5G runtime option
2865 This function is called through dynamic setConfig callback function
2866 to configure the Roam prefer 5G runtime option
2867 \param hHal - HAL handle for device
2868 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2869 \- return Success or failure
2870 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002871eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002872
2873/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002874 \fn sme_setRoamIntraBand
2875 \brief enable/disable Intra band roaming
2876 This function is called through dynamic setConfig callback function
2877 to configure the intra band roaming
2878 \param hHal - HAL handle for device
2879 \param nRoamIntraBand Enable/Disable Intra band roaming
2880 \- return Success or failure
2881 -------------------------------------------------------------------------*/
2882eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2883
2884/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002885 \fn sme_UpdateRoamScanNProbes
2886 \brief function to update roam scan N probes
2887 This function is called through dynamic setConfig callback function
2888 to update roam scan N probes
2889 \param hHal - HAL handle for device
2890 \param nProbes number of probe requests to be sent out
2891 \- return Success or failure
2892 -------------------------------------------------------------------------*/
2893eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2894
2895/* ---------------------------------------------------------------------------
2896 \fn sme_UpdateRoamScanHomeAwayTime
2897 \brief function to update roam scan Home away time
2898 This function is called through dynamic setConfig callback function
2899 to update roam scan home away time
2900 \param hHal - HAL handle for device
2901 \param nRoamScanAwayTime Scan home away time
2902 \- return Success or failure
2903 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002904eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2905 const v_U16_t nRoamScanHomeAwayTime,
2906 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002907
2908/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002909 \fn sme_getRoamIntraBand
2910 \brief get Intra band roaming
2911 \param hHal - HAL handle for device
2912 \- return Success or failure
2913 -------------------------------------------------------------------------*/
2914v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2915
2916/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002917 \fn sme_getRoamScanNProbes
2918 \brief get N Probes
2919 \param hHal - HAL handle for device
2920 \- return Success or failure
2921 -------------------------------------------------------------------------*/
2922v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2923
2924/* ---------------------------------------------------------------------------
2925 \fn sme_getRoamScanHomeAwayTime
2926 \brief get Roam scan home away time
2927 \param hHal - HAL handle for device
2928 \- return Success or failure
2929 -------------------------------------------------------------------------*/
2930v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2931
2932/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002933 \fn sme_UpdateImmediateRoamRssiDiff
2934 \brief Update nImmediateRoamRssiDiff
2935 This function is called through dynamic setConfig callback function
2936 to configure nImmediateRoamRssiDiff
2937 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2938 \param hHal - HAL handle for device
2939 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2940 candidate and current AP.
2941 \- return Success or failure
2942 -------------------------------------------------------------------------*/
2943
2944eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002945
Srinivas Girigowdade697412013-02-14 16:31:48 -08002946/* ---------------------------------------------------------------------------
2947 \fn sme_UpdateRoamRssiDiff
2948 \brief Update RoamRssiDiff
2949 This function is called through dynamic setConfig callback function
2950 to configure RoamRssiDiff
2951 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2952 \param hHal - HAL handle for device
2953 \param RoamRssiDiff - minimum rssi difference between potential
2954 candidate and current AP.
2955 \- return Success or failure
2956 -------------------------------------------------------------------------*/
2957
2958eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2959
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002960/*--------------------------------------------------------------------------
2961 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2962 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2963 isFastTransitionEnabled.
2964 This is a synchronuous call
2965 \param hHal - The handle returned by macOpen.
2966 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2967 Other status means SME is failed to update isFastTransitionEnabled.
2968 \sa
2969 --------------------------------------------------------------------------*/
2970
2971eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2972 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002973
2974/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002975 \fn sme_UpdateWESMode
2976 \brief Update WESMode
2977 This function is called through dynamic setConfig callback function
2978 to configure isWESModeEnabled
2979 \param hHal - HAL handle for device
2980 \param isWESModeEnabled - Enable/Disable WES Mode
2981 \- return Success or failure
2982 -------------------------------------------------------------------------*/
2983eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2984
2985/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002986 \fn sme_SetRoamScanControl
2987 \brief Set roam scan control
2988 This function is called to set roam scan control
2989 if roam scan control is set to 0, roaming scan cache is cleared
2990 any value other than 0 is treated as invalid value
2991 \param hHal - HAL handle for device
2992 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2993 Other status means SME failure to update
2994 -------------------------------------------------------------------------*/
2995eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002996#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002997
2998#ifdef FEATURE_WLAN_LFR
2999/*--------------------------------------------------------------------------
3000 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08003001 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003002 isFastRoamIniFeatureEnabled.
3003 This is a synchronuous call
3004 \param hHal - The handle returned by macOpen.
3005 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
3006 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
3007 \sa
3008 --------------------------------------------------------------------------*/
3009
Srinivas Girigowdade697412013-02-14 16:31:48 -08003010eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003011 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003012
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003013/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05303014 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
3015 When Supplicant issue enabled / disable fwr based roaming on the basis
3016 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
3017
3018 This is a synchronous call
3019 \param hHal - The handle returned by macOpen.
3020 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
3021 Other status means SME is failed to (enabled/disabled) offload scan.
3022 \sa
3023 --------------------------------------------------------------------------*/
3024
3025eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
3026 const v_BOOL_t isFastRoamEnabled);
3027
3028/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003029 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
3030 Enable/disable LFR MAWC support at runtime
3031 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3032 isMAWCIniFeatureEnabled.
3033 This is a synchronous call
3034 \param hHal - The handle returned by macOpen.
3035 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
3036 Other status means SME is failed to update MAWCEnabled.
3037 \sa
3038 --------------------------------------------------------------------------*/
3039eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
3040 const v_BOOL_t MAWCEnabled);
3041
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003042
3043#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3044/*--------------------------------------------------------------------------
3045 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
3046 This is a synchronuous call
3047 \param hHal - The handle returned by macOpen.
3048 \return eHAL_STATUS_SUCCESS
3049 Other status means SME is failed
3050 \sa
3051 --------------------------------------------------------------------------*/
3052
3053eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
3054 v_BOOL_t bFastRoamInConIniFeatureEnabled);
3055#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003056#endif /* FEATURE_WLAN_LFR */
3057
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003058#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003059/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003060 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003061 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003062 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003063 This is a synchronuous call
3064 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003065 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
3066 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003067 \sa
3068 --------------------------------------------------------------------------*/
3069
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003070eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
3071 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003072
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003073#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003074
3075/*--------------------------------------------------------------------------
3076 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
3077 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3078 fEnableFwRssiMonitoring.
3079 This is a synchronuous call
3080 \param hHal - The handle returned by macOpen.
3081 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
3082 Other status means SME is failed to update
3083 \sa
3084 --------------------------------------------------------------------------*/
3085
3086eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
3087 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08003088
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003089#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08003090/*--------------------------------------------------------------------------
3091 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
3092 This is a synchronuous call
3093 \param hHal - The handle returned by macOpen.
3094 \return eHAL_STATUS_SUCCESS - SME update config successful.
3095 Other status means SME is failed to update
3096 \sa
3097 --------------------------------------------------------------------------*/
3098eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
3099 v_U8_t neighborLookupRssiThreshold);
3100
3101/*--------------------------------------------------------------------------
3102 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
3103 This is a synchronuous call
3104 \param hHal - The handle returned by macOpen.
3105 \return eHAL_STATUS_SUCCESS - SME update config successful.
3106 Other status means SME is failed to update
3107 \sa
3108 --------------------------------------------------------------------------*/
3109eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
3110 v_U8_t neighborReassocRssiThreshold);
3111
3112/*--------------------------------------------------------------------------
3113 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
3114 This is a synchronuous call
3115 \param hHal - The handle returned by macOpen.
3116 \return eHAL_STATUS_SUCCESS - SME update config successful.
3117 Other status means SME is failed to update
3118 \sa
3119 --------------------------------------------------------------------------*/
3120v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
3121
3122/*--------------------------------------------------------------------------
3123 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
3124 This is a synchronuous call
3125 \param hHal - The handle returned by macOpen.
3126 \return eHAL_STATUS_SUCCESS - SME update config successful.
3127 Other status means SME is failed to update
3128 \sa
3129 --------------------------------------------------------------------------*/
3130eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
3131 v_U16_t neighborScanResultsRefreshPeriod);
3132
3133/*--------------------------------------------------------------------------
3134 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
3135 This is a synchronuous call
3136 \param hHal - The handle returned by macOpen.
3137 \return eHAL_STATUS_SUCCESS - SME update config successful.
3138 Other status means SME is failed to update
3139 \sa
3140 --------------------------------------------------------------------------*/
3141v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
3142
3143/*--------------------------------------------------------------------------
3144 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3145 This is a synchronuous call
3146 \param hHal - The handle returned by macOpen.
3147 \return eHAL_STATUS_SUCCESS - SME update config successful.
3148 Other status means SME is failed to update
3149 \sa
3150 --------------------------------------------------------------------------*/
3151v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3152
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003153/* ---------------------------------------------------------------------------
3154 \fn sme_UpdateEmptyScanRefreshPeriod
3155 \brief Update nEmptyScanRefreshPeriod
3156 This function is called through dynamic setConfig callback function
3157 to configure nEmptyScanRefreshPeriod
3158 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3159 \param hHal - HAL handle for device
3160 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3161 \- return Success or failure
3162 -------------------------------------------------------------------------*/
3163eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3164
3165/* ---------------------------------------------------------------------------
3166 \fn sme_setNeighborScanMinChanTime
3167 \brief Update nNeighborScanMinChanTime
3168 This function is called through dynamic setConfig callback function
3169 to configure gNeighborScanChannelMinTime
3170 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3171 \param hHal - HAL handle for device
3172 \param nNeighborScanMinChanTime - Channel minimum dwell time
3173 \- return Success or failure
3174 -------------------------------------------------------------------------*/
3175eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3176
3177/* ---------------------------------------------------------------------------
3178 \fn sme_setNeighborScanMaxChanTime
3179 \brief Update nNeighborScanMaxChanTime
3180 This function is called through dynamic setConfig callback function
3181 to configure gNeighborScanChannelMaxTime
3182 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3183 \param hHal - HAL handle for device
3184 \param nNeighborScanMinChanTime - Channel maximum dwell time
3185 \- return Success or failure
3186 -------------------------------------------------------------------------*/
3187eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3188
3189/* ---------------------------------------------------------------------------
3190 \fn sme_getNeighborScanMinChanTime
3191 \brief get neighbor scan min channel time
3192 \param hHal - The handle returned by macOpen.
3193 \return v_U16_t - channel min time value
3194 -------------------------------------------------------------------------*/
3195v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3196
3197/* ---------------------------------------------------------------------------
3198 \fn sme_getNeighborScanMaxChanTime
3199 \brief get neighbor scan max channel time
3200 \param hHal - The handle returned by macOpen.
3201 \return v_U16_t - channel max time value
3202 -------------------------------------------------------------------------*/
3203v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3204
3205/* ---------------------------------------------------------------------------
3206 \fn sme_setNeighborScanPeriod
3207 \brief Update nNeighborScanPeriod
3208 This function is called through dynamic setConfig callback function
3209 to configure nNeighborScanPeriod
3210 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3211 \param hHal - HAL handle for device
3212 \param nNeighborScanPeriod - neighbor scan period
3213 \- return Success or failure
3214 -------------------------------------------------------------------------*/
3215eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3216
3217/* ---------------------------------------------------------------------------
3218 \fn sme_getNeighborScanPeriod
3219 \brief get neighbor scan period
3220 \param hHal - The handle returned by macOpen.
3221 \return v_U16_t - neighbor scan period
3222 -------------------------------------------------------------------------*/
3223v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3224
3225#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003226
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003227#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003228/*--------------------------------------------------------------------------
3229 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3230 This is a synchronuous call
3231 \param hHal - The handle returned by macOpen.
3232 \return eHAL_STATUS_SUCCESS - SME update config successful.
3233 Other status means SME is failed to update
3234 \sa
3235 --------------------------------------------------------------------------*/
3236v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3237
3238/*--------------------------------------------------------------------------
3239 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3240 This is a synchronuous call
3241 \param hHal - The handle returned by macOpen.
3242 \return eHAL_STATUS_SUCCESS - SME update config successful.
3243 Other status means SME is failed to update
3244 \sa
3245 --------------------------------------------------------------------------*/
3246eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3247 tANI_U8 numChannels);
3248
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003249#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003250/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003251 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003252 This is a synchronuous call
3253 \param hHal - The handle returned by macOpen.
3254 \return eHAL_STATUS_SUCCESS - SME update config successful.
3255 Other status means SME is failed to update
3256 \sa
3257 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003258eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003259 tANI_U8 *pChannelList,
3260 tANI_U8 numChannels);
3261#endif
3262
Srinivas Girigowdade697412013-02-14 16:31:48 -08003263/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003264 \brief sme_getRoamScanChannelList() - get roam scan channel list
3265 This is a synchronuous call
3266 \param hHal - The handle returned by macOpen.
3267 \return eHAL_STATUS_SUCCESS - SME update config successful.
3268 Other status means SME is failed to update
3269 \sa
3270 --------------------------------------------------------------------------*/
3271eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3272 tANI_U8 *pNumChannels);
3273
3274/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003275 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003276 This is a synchronuous call
3277 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003278 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003279 FALSE (0) - if feature is disabled (compile or runtime)
3280 \sa
3281 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003282tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003283
3284/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003285 \brief sme_getWESMode() - getWES Mode
3286 This is a synchronous call
3287 \param hHal - The handle returned by macOpen.
3288 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3289 \sa
3290 --------------------------------------------------------------------------*/
3291v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3292
3293/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003294 \brief sme_GetRoamScanControl() - get scan control
3295 This is a synchronous call
3296 \param hHal - The handle returned by macOpen.
3297 \return v_BOOL_t - Enabled(1)/Disabled(0)
3298 \sa
3299 --------------------------------------------------------------------------*/
3300v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3301
3302/* ---------------------------------------------------------------------------
3303 \fn sme_UpdateEmptyScanRefreshPeriod
3304 \brief Update nnEmptyScanRefreshPeriod
3305 This function is called through dynamic setConfig callback function
3306 to configure nnEmptyScanRefreshPeriod
3307 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3308 \param hHal - HAL handle for device
3309 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3310 \- return Success or failure
3311 -------------------------------------------------------------------------*/
3312
3313/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003314 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3315 This is a synchronuous call
3316 \param hHal - The handle returned by macOpen.
3317 \return TRUE (1) - if the feature is enabled
3318 FALSE (0) - if feature is disabled (compile or runtime)
3319 \sa
3320 --------------------------------------------------------------------------*/
3321tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3322
3323/*--------------------------------------------------------------------------
3324 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3325 This is a synchronuous call
3326 \param hHal - The handle returned by macOpen.
3327 \return TRUE (1) - if the feature is enabled
3328 FALSE (0) - if feature is disabled (compile or runtime)
3329 \sa
3330 --------------------------------------------------------------------------*/
3331tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3332
Srinivas Girigowdade697412013-02-14 16:31:48 -08003333#endif
3334
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003335#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3336/*--------------------------------------------------------------------------
3337 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3338 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3339 gRoamScanOffloadEnabled.
3340 This is a synchronous call
3341 \param hHal - The handle returned by macOpen.
3342 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3343 Other status means SME is failed to update.
3344 \sa
3345 --------------------------------------------------------------------------*/
3346
3347eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3348#endif
3349
c_manjeecfd1efb2015-09-25 19:32:34 +05303350eHalStatus sme_FwMemDumpReq(tHalHandle hHal, tAniFwrDumpReq *recv_req);
3351
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003352
Srinivas Girigowdade697412013-02-14 16:31:48 -08003353/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003354 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303355 \brief Check if a feature is enabled by FW
3356
3357 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003358 A value from enum placeHolderInCapBitmap
3359
3360 \- return 1/0 (TRUE/FALSE)
3361 -------------------------------------------------------------------------*/
3362tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303363
3364/* ---------------------------------------------------------------------------
3365 \fn sme_IsFeatureSupportedByDriver
3366 \brief Check if a feature is enabled by driver
3367
3368 \param featEnumValue - Enumeration value of the feature to be checked.
3369 A value from enum placeHolderInCapBitmap
3370
3371 \- return 1/0 (TRUE/FALSE)
3372 -------------------------------------------------------------------------*/
3373tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3374
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003375#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303376
3377/* ---------------------------------------------------------------------------
3378 \fn sme_SendTdlsLinkEstablishParams
3379 \brief API to send TDLS Link Establishment Parameters.
3380
3381 \param peerMac - peer's Mac Adress.
3382 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3383 \- return VOS_STATUS_SUCCES
3384 -------------------------------------------------------------------------*/
3385
3386VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303387 tANI_U8 sessionId,
3388#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3389 const tSirMacAddr peerMac,
3390#else
3391 tSirMacAddr peerMac,
3392#endif
3393 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303394
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003395/* ---------------------------------------------------------------------------
3396 \fn sme_SendTdlsMgmtFrame
3397 \brief API to send TDLS management frames.
3398
3399 \param peerMac - peer's Mac Adress.
3400 \param frame_type - Type of TDLS mgmt frame to be sent.
3401 \param dialog - dialog token used in the frame.
3402 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303403 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003404 \param buf - additional IEs to be included
3405 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003406 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003407 \- return VOS_STATUS_SUCCES
3408 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303409VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3410#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3411 const tSirMacAddr peerMac,
3412#else
3413 tSirMacAddr peerMac,
3414#endif
3415 tANI_U8 frame_type, tANI_U8 dialog,
3416 tANI_U16 status, tANI_U32 peerCapability,
3417 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003418/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003419 \fn sme_ChangeTdlsPeerSta
3420 \brief API to Update TDLS peer sta parameters.
3421
3422 \param peerMac - peer's Mac Adress.
3423 \param staParams - Peer Station Parameters.
3424 \- return VOS_STATUS_SUCCES
3425 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303426VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3427#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3428 const tSirMacAddr peerMac,
3429#else
3430 tSirMacAddr peerMac,
3431#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003432 tCsrStaParams *pstaParams);
3433/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003434 \fn sme_AddTdlsPeerSta
3435 \brief API to Add TDLS peer sta entry.
3436
3437 \param peerMac - peer's Mac Adress.
3438 \- return VOS_STATUS_SUCCES
3439 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303440VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3441#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3442 const tSirMacAddr peerMac
3443#else
3444 tSirMacAddr peerMac
3445#endif
3446 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003447/* ---------------------------------------------------------------------------
3448 \fn sme_DeleteTdlsPeerSta
3449 \brief API to Delete TDLS peer sta entry.
3450
3451 \param peerMac - peer's Mac Adress.
3452 \- return VOS_STATUS_SUCCES
3453 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303454VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3455#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3456 const tSirMacAddr peerMac
3457#else
3458 tSirMacAddr peerMac
3459#endif
3460 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003461/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003462 \fn sme_SetTdlsPowerSaveProhibited
3463 \API to set/reset the isTdlsPowerSaveProhibited.
3464
3465 \- return void
3466 -------------------------------------------------------------------------*/
3467void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003468#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303469/* ---------------------------------------------------------------------------
3470 \fn sme_IsPmcBmps
3471 \brief API to Check if PMC state is BMPS.
3472
3473 \- return v_BOOL_t
3474 -------------------------------------------------------------------------*/
3475v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3476
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003477eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003478
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303479/* ---------------------------------------------------------------------------
3480 \fn sme_UpdateDFSRoamMode
3481 \brief Update DFS roam scan mode
3482 This function is called to configure allowDFSChannelRoam
3483 dynamically
3484 \param hHal - HAL handle for device
3485 \param allowDFSChannelRoam - DFS roaming scan mode
3486 mode 0 disable roam scan on DFS channels
3487 mode 1 enables roam scan (passive/active) on DFS channels
3488 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3489 successfully.
3490 Other status means SME failed to update DFS roaming scan config.
3491 \sa
3492 -------------------------------------------------------------------------*/
3493eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3494
3495/* ---------------------------------------------------------------------------
3496 \fn sme_UpdateDFSScanMode
3497 \brief Update DFS scan mode
3498 This function is called to configure fEnableDFSChnlScan.
3499 \param hHal - HAL handle for device
3500 \param dfsScanMode - DFS scan mode
3501 mode 0 disable scan on DFS channels
3502 mode 1 enables passive scan on DFS channels
3503 mode 2 enables active scan on DFS channels for static list
3504 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3505 successfully.
3506 Other status means SME failed to update DFS scan config.
3507 \sa
3508 -------------------------------------------------------------------------*/
3509eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3510
3511/*--------------------------------------------------------------------------
3512 \brief sme_GetDFSScanMode() - get DFS scan mode
3513 \param hHal - The handle returned by macOpen.
3514 \return DFS scan mode
3515 mode 0 disable scan on DFS channels
3516 mode 1 enables passive scan on DFS channels
3517 mode 2 enables active scan on DFS channels for static list
3518 \sa
3519 --------------------------------------------------------------------------*/
3520v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3521
3522/* ---------------------------------------------------------------------------
3523 \fn sme_HandleDFSChanScan
3524 \brief Gets Valid channel list and updates scan control list according to
3525 dfsScanMode
3526 \param hHal - HAL handle for device
3527 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3528 Otherwise eHAL_STATUS_SUCCESS -
3529 \sa
3530 -------------------------------------------------------------------------*/
3531eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3532
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003533/*
3534 * SME API to enable/disable WLAN driver initiated SSR
3535 */
3536void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3537
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303538/* ---------------------------------------------------------------------------
3539
3540 \fn sme_SetPhyMode
3541
3542 \brief Changes the PhyMode.
3543
3544 \param hHal - The handle returned by macOpen.
3545
3546 \param phyMode new phyMode which is to set
3547
3548 \return eHalStatus SUCCESS.
3549
3550 -------------------------------------------------------------------------------*/
3551eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3552
3553/* ---------------------------------------------------------------------------
3554
3555 \fn sme_GetPhyMode
3556
3557 \brief gets current PhyMode.
3558
3559 \param hHal - The handle returned by macOpen.
3560
3561 \return eHalStatus PhyMode
3562
3563 -------------------------------------------------------------------------------*/
3564eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3565
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003566/*
3567 * SME API to determine the channel bonding mode
3568 */
3569VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3570
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003571#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3572/*--------------------------------------------------------------------------
3573 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3574 from CSR.
3575 This is a synchronous call
3576 \param hHal - The handle returned by macOpen
3577 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3578 BSSID, channel etc.)
3579 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3580 Other status means SME is failed to send the request.
3581 \sa
3582 --------------------------------------------------------------------------*/
3583
3584eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3585#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003586/*--------------------------------------------------------------------------
3587 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3588 is any connected session .
3589 This is a synchronous call
3590 \param hHal - The handle returned by macOpen
3591 \return VOS_STATUS - SME passed the request to CSR successfully.
3592 Other status means SME is failed to send the request.
3593 \sa
3594 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003595VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003596
Agarwal Ashish57e84372014-12-05 18:26:53 +05303597/*--------------------------------------------------------------------------
3598 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3599 is any connected session .
3600 This is a synchronous call
3601 \param hHal - The handle returned by macOpen
3602 \return VOS_STATUS - SME passed the request to CSR successfully.
3603 Other status means SME is failed to send the request.
3604 \sa
3605 --------------------------------------------------------------------------*/
3606VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3607
Leo Chang9056f462013-08-01 19:21:11 -07003608#ifdef FEATURE_WLAN_LPHB
3609/* ---------------------------------------------------------------------------
3610 \fn sme_LPHBConfigReq
3611 \API to make configuration LPHB within FW.
3612 \param hHal - The handle returned by macOpen
3613 \param lphdReq - LPHB request argument by client
3614 \param pCallbackfn - LPHB timeout notification callback function pointer
3615 \- return Configuration message posting status, SUCCESS or Fail
3616 -------------------------------------------------------------------------*/
3617eHalStatus sme_LPHBConfigReq(
3618 tHalHandle hHal,
3619 tSirLPHBReq *lphdReq,
3620 void (*pCallbackfn)(void *pAdapter, void *indParam));
3621#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003622
3623/* ---------------------------------------------------------------------------
3624 \fn sme_AddPeriodicTxPtrn
3625 \brief API to Periodic TX Pattern Offload feature
3626 \param hHal - The handle returned by macOpen
3627 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3628 \return eHalStatus
3629 ---------------------------------------------------------------------------*/
3630eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3631 *addPeriodicTxPtrnParams);
3632
3633/* ---------------------------------------------------------------------------
3634 \fn sme_DelPeriodicTxPtrn
3635 \brief API to Periodic TX Pattern Offload feature
3636 \param hHal - The handle returned by macOpen
3637 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3638 \return eHalStatus
3639 ---------------------------------------------------------------------------*/
3640eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3641 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003642/*--------------------------------------------------------------------------
3643 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3644 scan parameter.
3645 This is a synchronous call
3646 \param hHal - The handle returned by macOpen
3647 \return None.
3648 \sa
3649 --------------------------------------------------------------------------*/
3650void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3651 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303652
Abhishek Singh00b71972016-01-07 10:51:04 +05303653#ifdef WLAN_FEATURE_RMC
3654/* ---------------------------------------------------------------------------
3655 \fn sme_EnableRMC
3656 \brief Used to enable RMC
3657 setting will not persist over reboots
3658 \param hHal
3659 \param sessionId
3660 \- return eHalStatus
3661 -------------------------------------------------------------------------*/
3662eHalStatus sme_EnableRMC(tHalHandle hHal, tANI_U32 sessionId);
3663
3664/* ---------------------------------------------------------------------------
3665 \fn sme_DisableRMC
3666 \brief Used to disable RMC
3667 setting will not persist over reboots
3668 \param hHal
3669 \param sessionId
3670 \- return eHalStatus
3671 -------------------------------------------------------------------------*/
3672eHalStatus sme_DisableRMC(tHalHandle hHal, tANI_U32 sessionId);
3673#endif /* WLAN_FEATURE_RMC */
3674
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003675/* ---------------------------------------------------------------------------
3676 \fn sme_SendRateUpdateInd
3677 \brief API to Update rate
3678 \param hHal - The handle returned by macOpen
3679 \param rateUpdateParams - Pointer to rate update params
3680 \return eHalStatus
3681 ---------------------------------------------------------------------------*/
3682eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3683
Abhishek Singh00b71972016-01-07 10:51:04 +05303684#ifdef WLAN_FEATURE_RMC
3685/* ---------------------------------------------------------------------------
3686 \fn sme_GetIBSSPeerInfo
3687 \brief Used to disable RMC
3688 setting will not persist over reboots
3689 \param hHal
3690 \param ibssPeerInfoReq multicast Group IP address
3691 \- return eHalStatus
3692 -------------------------------------------------------------------------*/
3693eHalStatus sme_RequestIBSSPeerInfo(tHalHandle hHal, void *pUserData,
3694 pIbssPeerInfoCb peerInfoCbk,
3695 tANI_BOOLEAN allPeerInfoReqd,
3696 tANI_U8 staIdx);
3697#endif /* WLAN_FEATURE_RMC */
3698
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303699/*
3700 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3701 * triggers
3702 * return status
3703*/
3704eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3705 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303706 tSmeFastRoamTrigger fastRoamTrig,
3707 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303708
3709eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303710#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3711 const tANI_U8 *pBSSId,
3712#else
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303713 tANI_U8 *pBSSId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303714#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303715 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003716
3717void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303718
3719#ifdef FEATURE_WLAN_BATCH_SCAN
3720/* ---------------------------------------------------------------------------
3721 \fn sme_SetBatchScanReq
3722 \brief API to set batch scan request in FW
3723 \param hHal - The handle returned by macOpen.
3724 \param pRequest - Pointer to the batch request.
3725 \param sessionId - session ID
3726 \param callbackRoutine - HDD callback which needs to be invoked after
3727 getting set batch scan response from FW
3728 \param callbackContext - pAdapter context
3729 \return eHalStatus
3730 ---------------------------------------------------------------------------*/
3731eHalStatus
3732sme_SetBatchScanReq
3733(
3734 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3735 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3736 void *callbackContext
3737);
3738
3739/* ---------------------------------------------------------------------------
3740 \fn sme_TriggerBatchScanResultInd
3741 \brief API to trigger batch scan result indications from from FW
3742 \param hHal - The handle returned by macOpen.
3743 \param pRequest - Pointer to get batch request.
3744 \param sessionId - session ID
3745 \param callbackRoutine - HDD callback which needs to be invoked after
3746 getting get batch scan response from FW
3747 \param callbackContext - pAdapter context
3748 \return eHalStatus
3749 ---------------------------------------------------------------------------*/
3750eHalStatus
3751sme_TriggerBatchScanResultInd
3752(
3753 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3754 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3755 void *callbackContext
3756);
3757
3758/* ---------------------------------------------------------------------------
3759 \fn sme_StopBatchScanInd
3760 \brief API to stop batch scan request in FW
3761 \param hHal - The handle returned by macOpen.
3762 \param pRequest - Pointer to stop batch indication
3763 \return eHalStatus
3764 ---------------------------------------------------------------------------*/
3765eHalStatus
3766sme_StopBatchScanInd
3767(
3768 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3769);
3770
3771#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003772
3773#ifdef FEATURE_WLAN_CH_AVOID
3774/* ---------------------------------------------------------------------------
3775 \fn sme_AddChAvoidCallback
3776 \brief Used to plug in callback function
3777 Which notify channel may not be used with SAP or P2PGO mode.
3778 Notification come from FW.
3779 \param hHal
3780 \param pCallbackfn : callback function pointer should be plugged in
3781 \- return eHalStatus
3782 -------------------------------------------------------------------------*/
3783eHalStatus sme_AddChAvoidCallback
3784(
3785 tHalHandle hHal,
3786 void (*pCallbackfn)(void *pAdapter, void *indParam)
3787);
3788#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003789eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303790
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303791/* ---------------------------------------------------------------------------
3792 \fn sme_requestTypetoString
3793 \brief API to convert requestType enum values
3794 to string.
3795 ---------------------------------------------------------------------------*/
3796const char * sme_requestTypetoString(const v_U8_t requestType);
3797/* ---------------------------------------------------------------------------
3798 \fn sme_PmcStatetoString
3799 \brief API to convert PmcState enum values
3800 to string.
3801 ---------------------------------------------------------------------------*/
3802const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303803
3804eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3805
Agarwal Ashish5e414792014-06-08 15:25:23 +05303806tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303807
3808// tdlsoffchan
3809VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3810 tANI_U8 sessionId,
3811 tSirMacAddr peerMac,
3812 tANI_S32 tdlsOffCh,
3813 tANI_S32 tdlsOffChBwOffset,
3814 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303815eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3816 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303817void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303818
3819void sme_resetCoexEevent(tHalHandle hHal);
3820
Peng Xu117eab42014-09-25 13:33:27 +05303821tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3822tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303823#ifdef WLAN_FEATURE_AP_HT40_24G
3824void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3825 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303826eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3827 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303828#endif
Peng Xu117eab42014-09-25 13:33:27 +05303829
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303830eHalStatus sme_set_rssi_threshold_breached_cb(tHalHandle hal,
3831 void (*cb)(void *, struct rssi_breach_event *));
3832
Agarwal Ashish738843c2014-09-25 12:27:56 +05303833void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3834
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303835/* HDD Callback function */
3836typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3837
3838eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3839 u8 *pCmd,
3840 int length,
3841 pEncryptMsgRSPCb encCB);
3842
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303843/* ---------------------------------------------------------------------------
3844 \fn sme_RegisterBtCoexTDLSCallback
3845 \brief Used to plug in callback function
3846 Which notify btcoex on or off.
3847 Notification come from FW.
3848 \param hHal
3849 \param pCallbackfn : callback function pointer should be plugged in
3850 \- return eHalStatus
3851 -------------------------------------------------------------------------*/
3852eHalStatus sme_RegisterBtCoexTDLSCallback
3853(
3854 tHalHandle hHal,
3855 void (*pCallbackfn)(void *pAdapter, int)
3856);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303857
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303858/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303859 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303860
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303861 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303862
3863 \param hHal - The handle returned by macOpen.
3864
3865 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3866 eANI_BOOLEAN_FALSE otherwise
3867---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303868tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303869
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303870/* ---------------------------------------------------------------------------
3871
3872 \fn sme_IsTdlsOffChannelValid
3873 \brief To check if the channel is valid for currently established domain
3874 This is a synchronous API.
3875
3876 \param hHal - The handle returned by macOpen.
3877 \param channel - channel to verify
3878
3879 \return TRUE/FALSE, TRUE if channel is valid
3880
3881 -------------------------------------------------------------------------------*/
3882tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3883
Mukul Sharma4be88422015-03-09 20:29:07 +05303884/* --------------------------------------------------------------------------
3885
3886 \fn sme_IsCoexScoIndicationSet
3887 \brief To check if the BTC module in fwr has sent the SCO
3888 indication to host or not
3889
3890 \param hHal - The handle returned by macOpen.
3891 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3892
3893 --------------------------------------------------------------------------*/
3894tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3895
Abhishek Singh01c73d12015-03-12 15:13:44 +05303896eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3897 tANI_U32 iniNumBuffAdvert,
3898 tANI_U32 set_value);
3899
Mukul Sharma45063942015-04-01 20:07:59 +05303900void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303901
3902/* ---------------------------------------------------------------------------
3903 \fn sme_SetTdls2040BSSCoexistence
3904 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3905
3906 \param isEnabled - Enable or Disable.
3907 \- return VOS_STATUS_SUCCES
3908 -------------------------------------------------------------------------*/
3909eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3910
Abhishek Singh41988ba2015-05-25 19:42:29 +05303911/* ---------------------------------------------------------------------------
3912 \fn sme_SetRtsCtsHtVht
3913 \brief API to to enable/disable RTS/CTS for different modes.
3914
3915 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3916 \- return VOS_STATUS_SUCCES if INdication is posted to
3917 WDA else return eHAL_STATUS_FAILURE
3918 -------------------------------------------------------------------------*/
3919eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3920
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303921tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
Agrawal Ashish842eea82016-02-04 17:56:16 +05303922 tANI_U8 fcc_constraint,
3923 v_U32_t scan_pending);
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303924
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303925eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303926eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
Abhishek Singh837adf22015-10-01 17:37:37 +05303927 tANI_U32 indicator, tANI_U32 reason_code,
3928 tANI_BOOLEAN dump_vos_trace);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303929
Mahesh A Saptasagarbeca12c2015-09-07 16:21:06 +05303930eHalStatus sme_enableDisableChanAvoidIndEvent(tHalHandle hHal,
3931 tANI_U8 set_value);
3932
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303933/* ---------------------------------------------------------------------------
3934 \fn sme_set_wificonfig_params
3935 \brief API to set WifiConfiguration Parameters.
3936
3937 \param wifi_config_param - Wificonfig parameter 1.Averaging factor 2. Guard time
3938 \- return VOS_STATUS_SUCCES if INdication is posted to
3939 WDA else return eHAL_STATUS_FAILURE
3940 -------------------------------------------------------------------------*/
3941
3942eHalStatus sme_set_wificonfig_params(tHalHandle hHal, tSetWifiConfigParams *req);
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +05303943eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
3944 tANI_U32 *regInfo1, tANI_U32 *regInfo2);
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05303945eHalStatus sme_GetCurrentAntennaIndex(tHalHandle hHal,
3946 tCsrAntennaIndexCallback callback,
3947 void *pContext, tANI_U8 sessionId);
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303948
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05303949eHalStatus sme_setBcnMissPenaltyCount(tHalHandle hHal,
3950 tModifyRoamParamsReqParams *params);
Abhishek Singhbfb3c9e2016-07-22 11:25:43 +05303951eHalStatus sme_remove_bssid_from_scan_list(tHalHandle hal,
3952 tSirMacAddr bssid);
Agrawal Ashish0552be02016-03-02 18:03:43 +05303953void sme_set_mgmt_frm_via_wq5(tHalHandle hHal,
3954 tANI_BOOLEAN sendMgmtPktViaWQ5);
mukul sharma6b53e202016-11-23 19:29:18 +05303955eHalStatus sme_update_cfg_int_param(tHalHandle hHal, tANI_U32 cfg_id);
Kapil Gupta3d923fb2016-12-20 18:59:27 +05303956
3957#ifdef WLAN_FEATURE_APFIND
3958VOS_STATUS sme_apfind_set_cmd(struct sme_ap_find_request_req *input);
3959#endif /* WLAN_FEATURE_APFIND */
3960
Agrawal Ashish17ef5082016-10-17 18:33:21 +05303961#ifdef SAP_AUTH_OFFLOAD
3962/**
3963 * sme_set_sap_auth_offload() enable/disable SAP Auth Offload
3964 * @hHal: hal layer handler
3965 * @sap_auth_offload_info: the information of SAP Auth Offload
3966 *
3967 * This function provide enable/disable SAP authenticaiton offload
3968 * feature on target firmware
3969 *
3970 * Return: eHalStatus.
3971 */
3972eHalStatus sme_set_sap_auth_offload(tHalHandle hHal,
3973 struct tSirSapOffloadInfo *sap_auth_offload_info);
3974
3975#endif /* SAP_AUTH_OFFLOAD */
Anurag Chouhan83026002016-12-13 22:46:21 +05303976#ifdef DHCP_SERVER_OFFLOAD
3977eHalStatus sme_set_dhcp_srv_offload(tHalHandle hal,
Anurag Chouhan0b29de02016-12-16 13:18:40 +05303978 sir_dhcp_srv_offload_info_t *dhcp_srv_info);
Anurag Chouhan83026002016-12-13 22:46:21 +05303979#endif /* DHCP_SERVER_OFFLOAD */
3980
Anurag Chouhan0b29de02016-12-16 13:18:40 +05303981#ifdef MDNS_OFFLOAD
3982eHalStatus sme_set_mdns_offload(tHalHandle hal,
3983 sir_mdns_offload_info_t *mdns_info);
3984
3985eHalStatus sme_set_mdns_fqdn(tHalHandle hal,
3986 sir_mdns_fqdn_info_t *mdns_fqdn);
3987
3988eHalStatus sme_set_mdns_resp(tHalHandle hal,
3989 sir_mdns_resp_info_t *mdns_resp);
3990#endif /* MDNS_OFFLOAD */
Ravi Kumar bokka7d032762016-12-12 23:33:01 +05303991
3992eHalStatus sme_update_hb_threshold(tHalHandle hHal, tANI_U32 cfgId,
3993 tANI_U8 hbThresh, eCsrBand eBand);
Manjeet Singh3ed79242017-01-11 19:04:32 +05303994
3995eHalStatus sme_capture_tsf_req(tHalHandle hHal,
3996 tSirCapTsfParams capTsfParams);
3997
3998eHalStatus sme_get_tsf_req(tHalHandle hHal,
3999 tSirCapTsfParams capTsfParams);
4000
4001eHalStatus sme_set_tsfcb(tHalHandle hHal,
4002 tsf_rsp_cb rsp_cb, struct stsf *pTsf,
4003 void *pcallbackcontext);
4004
Anurag Chouhan6ee81542017-02-09 18:09:27 +05304005/* ARP DEBUG STATS */
4006eHalStatus sme_set_nud_debug_stats(tHalHandle hHal,
4007 psetArpStatsParams pSetStatsParam);
4008eHalStatus sme_get_nud_debug_stats(tHalHandle hHal,
4009 pgetArpStatsParams pGetStatsParam);
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05304010eHalStatus sme_del_sta_ba_session_req(tHalHandle hHal,
4011 tDelBaParams sta_del_params);
Abhishek Singh02605092017-10-25 14:06:12 +05304012/**
4013 * sme_roam_csa_ie_request() - request CSA IE transmission from PE
4014 * @hal: handle returned by mac_open
4015 * @bssid: SAP bssid
4016 * @new_chan: target channel information
4017 * @phy_mode: SAP phymode
4018 *
4019 * Return: VOS_STATUS
4020 */
4021VOS_STATUS sme_roam_csa_ie_request(tHalHandle hal, tCsrBssid bssid,
4022 uint8_t new_chan, uint32_t phy_mode);
4023
Jeff Johnson295189b2012-06-20 16:38:30 -07004024#endif //#if !defined( __SME_API_H )