blob: 6e1a426b8da0f274d220ef777a6b5da1c47284ff [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Sourav Mohapatra5817dc42017-12-18 17:45:16 +05302 * Copyright (c) 2012-2018 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
Sourav Mohapatra2416e0e2018-03-05 18:44:21 +0530234void sme_set_vowifi_mode(tpAniSirGlobal pMac, bool enable);
Ashish Kumar Dhanotiyaf59c7762018-04-10 17:54:25 +0530235void sme_set_qpower(tpAniSirGlobal pMac, uint8_t enable);
236
Dino Mycle2c198072014-06-10 10:15:52 +0530237#ifdef WLAN_FEATURE_EXTSCAN
238/* ---------------------------------------------------------------------------
239 \fn sme_GetValidChannelsByBand
240 \brief SME API to fetch all valid channel filtered by band
241 \param hHal
242 \param wifiBand: RF band information
243 \param aValidChannels: Array to store channel info
244 \param len: number of channels
245 \- return eHalStatus
246 -------------------------------------------------------------------------*/
247eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
248 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
249
250/* ---------------------------------------------------------------------------
251 \fn sme_EXTScanGetCapabilities
252 \brief SME API to fetch Extented Scan capabilities
253 \param hHal
254 \param pReq: Extented Scan capabilities structure
255 \- return eHalStatus
256 -------------------------------------------------------------------------*/
257eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
258 tSirGetEXTScanCapabilitiesReqParams *pReq);
259
260/* ---------------------------------------------------------------------------
261 \fn sme_EXTScanStart
262 \brief SME API to issue Extented Scan start
263 \param hHal
264 \param pStartCmd: Extented Scan start structure
265 \- return eHalStatus
266 -------------------------------------------------------------------------*/
267eHalStatus sme_EXTScanStart (tHalHandle hHal,
268 tSirEXTScanStartReqParams *pStartCmd);
269
270/* ---------------------------------------------------------------------------
271 \fn sme_EXTScanStop
272 \brief SME API to issue Extented Scan stop
273 \param hHal
274 \param pStopReq: Extented Scan stop structure
275 \- return eHalStatus
276 -------------------------------------------------------------------------*/
277eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
278
279/* ---------------------------------------------------------------------------
280 \fn sme_SetBssHotlist
281 \brief SME API to set BSSID hotlist
282 \param hHal
283 \param pSetHotListReq: Extented Scan set hotlist structure
284 \- return eHalStatus
285 -------------------------------------------------------------------------*/
286eHalStatus sme_SetBssHotlist (tHalHandle hHal,
287 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
288
289/* ---------------------------------------------------------------------------
290 \fn sme_ResetBssHotlist
291 \brief SME API to reset BSSID hotlist
292 \param hHal
293 \param pSetHotListReq: Extented Scan set hotlist structure
294 \- return eHalStatus
295 -------------------------------------------------------------------------*/
296eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
297 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
298
299/* ---------------------------------------------------------------------------
Dino Mycle2c198072014-06-10 10:15:52 +0530300 \fn sme_getCachedResults
301 \brief SME API to get cached results
302 \param hHal
303 \param pCachedResultsReq: Extented Scan get cached results structure
304 \- return eHalStatus
305 -------------------------------------------------------------------------*/
306eHalStatus sme_getCachedResults (tHalHandle hHal,
307 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
308
309/* ---------------------------------------------------------------------------
310 \fn sme_EXTScanRegisterCallback
311 \brief SME API to register Extented Scan notification callback
312 \param pEXTScanIndCb
313 \- return void
314 -------------------------------------------------------------------------*/
315eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
316 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
317 void *);
318
319#endif /* WLAN_FEATURE_EXTSCAN */
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530320
321#ifdef FEATURE_OEM_DATA_SUPPORT
322eHalStatus sme_OemDataRegisterCallback (tHalHandle hHal,
Padma, Santhosh Kumaree7c3d22016-01-25 10:36:08 +0530323 void (*pOemDataIndCb)(void *, const tANI_U16, void *, tANI_U32),
324 void *callbackContext);
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530325#endif
326
Siddharth Bhald8a95e82015-02-12 20:14:52 +0530327/* ---------------------------------------------------------------------------
328 \fn sme_SpoofMacAddrReq
329 \brief SME API to send Spoof Mac Addr req to HAL
330 \param macaddr: mac address to be sent
331 \- return eHalStatus
332 -------------------------------------------------------------------------*/
333eHalStatus sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530334
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530335typedef enum
336{
337 eSME_ROAM_TRIGGER_NONE = 0,
338 eSME_ROAM_TRIGGER_SCAN = 1,
339 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
340 eSME_ROAM_TRIGGER_MAX
341} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700342
Kapil Gupta3d923fb2016-12-20 18:59:27 +0530343#ifdef WLAN_FEATURE_APFIND
344struct sme_ap_find_request_req
345{
346 u_int16_t request_data_len;
347 const u_int8_t* request_data;
348};
349#endif /* WLAN_FEATURE_APFIND */
350
351
Jeff Johnson295189b2012-06-20 16:38:30 -0700352/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530353 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700354 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700355/*--------------------------------------------------------------------------
356
357 \brief sme_Open() - Initialze all SME modules and put them at idle state
358
359 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
360 successfully return, all modules are at idle state ready to start.
361
362 smeOpen must be called before any other SME APIs can be involved.
363 smeOpen must be called after macOpen.
364
365 \param hHal - The handle returned by macOpen.
366
367 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
368
369 Other status means SME is failed to be initialized
370 \sa
371
372 --------------------------------------------------------------------------*/
373eHalStatus sme_Open(tHalHandle hHal);
374
375/*--------------------------------------------------------------------------
376
377 \brief sme_Close() - Release all SME modules and their resources.
378
379 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
380 return, all modules are at closed state.
381
382 No SME APIs can be involved after sme_Close except sme_Open.
383 sme_Close must be called before macClose.
384
385 \param hHal - The handle returned by macOpen.
386
387 \return eHAL_STATUS_SUCCESS - SME is successfully close.
388
389 Other status means SME is failed to be closed but caller still cannot
390 call any other SME functions except smeOpen.
391 \sa
392
393 --------------------------------------------------------------------------*/
394eHalStatus sme_Close(tHalHandle hHal);
395
396/*--------------------------------------------------------------------------
Hema Aparna Medicharlaa6cf65e2015-06-01 16:23:28 +0530397
398 \brief sme_PreClose() - Stop SME resources prior to final sme_Stop.
399
400 The function stops resources in SME, PMC, CCM, CSR, etc. as needed
401 to handle fast closure during SSR/unload-load cases.
402
403 \param hHal - The handle returned by macOpen.
404 \return v_VOID_t
405
406 \sa
407
408 --------------------------------------------------------------------------*/
409v_VOID_t sme_PreClose(tHalHandle hHal);
410
411/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700412
413 \brief sme_Start() - Put all SME modules at ready state.
414
415 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
416 successfully return, all modules are ready to run.
417
418 \param hHal - The handle returned by macOpen.
419
420 \return eHAL_STATUS_SUCCESS - SME is ready.
421
422 Other status means SME is failed to start.
423 \sa
424
425 --------------------------------------------------------------------------*/
426eHalStatus sme_Start(tHalHandle hHal);
427
428/*--------------------------------------------------------------------------
429
430 \brief sme_Stop() - Stop all SME modules and put them at idle state
431
432 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
433 return, all modules are at idle state ready to start.
434
435
436 \param hHal - The handle returned by macOpen.
437
Kiet Lama72a2322013-11-15 11:18:11 +0530438 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700439
440 \return eHAL_STATUS_SUCCESS - SME is stopped.
441
442 Other status means SME is failed to stop but caller should still consider
443 SME is stopped.
444 \sa
445
446 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530447eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700448
449
450/*--------------------------------------------------------------------------
451
452 \brief sme_OpenSession() - Open a session for scan/roam operation.
453
454 This is a synchronous API.
455
456
457 \param hHal - The handle returned by macOpen.
458 \param callback - A pointer to the function caller specifies for roam/connect status indication
459 \param pContext - The context passed with callback
460 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
461 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
462
463 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
464
465 Other status means SME is failed to open the session.
466 eHAL_STATUS_RESOURCES - no more session available.
467 \sa
468
469 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700470eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
471 void *pContext, tANI_U8 *pSelfMacAddr,
472 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700473
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700474/*--------------------------------------------------------------------------
475
476 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
477 \param hHal - The handle returned by macOpen.
478 \param currDeviceMode - Current operating device mode.
479 --------------------------------------------------------------------------*/
480
481void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700482
483/*--------------------------------------------------------------------------
484
485 \brief sme_CloseSession() - Open a session for scan/roam operation.
486
487 This is a synchronous API.
488
Jeff Johnson295189b2012-06-20 16:38:30 -0700489 \param hHal - The handle returned by macOpen.
490
491 \param sessionId - A previous opened session's ID.
mukul sharmabab477d2015-06-11 17:14:55 +0530492
493 \param bPurgeSmeCmdList - Whether sme cmd list purging is required or not.
494 TRUE -Purging require FALSE - Purging not require
495
Jeff Johnson295189b2012-06-20 16:38:30 -0700496 \return eHAL_STATUS_SUCCESS - session is closed.
497
498 Other status means SME is failed to open the session.
499 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
500 \sa
mukul sharmabab477d2015-06-11 17:14:55 +0530501
502
Jeff Johnson295189b2012-06-20 16:38:30 -0700503 --------------------------------------------------------------------------*/
504eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
Agrawal Ashish5a3522c2016-03-02 15:08:28 +0530505 tANI_BOOLEAN fSync,
mukul sharmabab477d2015-06-11 17:14:55 +0530506 tANI_U8 bPurgeSmeCmdList,
507 csrRoamSessionCloseCallback callback,
508 void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -0700509
510/*--------------------------------------------------------------------------
511
512 \brief sme_UpdateConfig() - Change configurations for all SME moduels
513
514 The function updates some configuration for modules in SME, CCM, CSR, etc
515 during SMEs close -> open sequence.
516
517 Modules inside SME apply the new configuration at the next transaction.
518
519
520 \param hHal - The handle returned by macOpen.
521 \Param pSmeConfigParams - a pointer to a caller allocated object of
522 typedef struct _smeConfigParams.
523
524 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
525
526 Other status means SME is failed to update the config parameters.
527 \sa
528
529 --------------------------------------------------------------------------*/
530eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
531
532#ifdef FEATURE_WLAN_SCAN_PNO
533/*--------------------------------------------------------------------------
534
535 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
536
537 It is used at driver start up to inform RIVA of the default channel
538 configuration.
539
540 This is a synchronuous call
541
542 \param hHal - The handle returned by macOpen.
543
544 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
545
546 Other status means SME is failed to update the channel config.
547 \sa
548
549 --------------------------------------------------------------------------*/
550eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
551
552#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700553/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530554
555 \brief sme_UpdateChannelList() - Update channel List in FW.
556
557
558 \param hHal - The handle returned by macOpen.
559
560 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
561
562 Other status means SME is failed to update the channel config.
563 \sa
564
565 --------------------------------------------------------------------------*/
566eHalStatus sme_UpdateChannelList(tHalHandle hHal);
567
568/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700569
570 \brief sme_set11dinfo() - Set the 11d information about valid channels
571 and there power using information from nvRAM
572 This function is called only for AP.
573
574 This is a synchronuous call
575
576 \param hHal - The handle returned by macOpen.
577 \Param pSmeConfigParams - a pointer to a caller allocated object of
578 typedef struct _smeConfigParams.
579
580 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
581
582 Other status means SME is failed to update the config parameters.
583 \sa
584--------------------------------------------------------------------------*/
585
586eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
587
588/*--------------------------------------------------------------------------
589
590 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
591
592 This is a synchronuous call
593
594 \param hHal - The handle returned by HostapdAdapter.
595 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
596
597 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
598
599 Other status means, failed to get the current regulatory domain.
600 \sa
601--------------------------------------------------------------------------*/
602
603eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
604
605eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
606
Jeff Johnson295189b2012-06-20 16:38:30 -0700607
608/* ---------------------------------------------------------------------------
609 \fn sme_ChangeConfigParams
610 \brief The SME API exposed for HDD to provide config params to SME during
611 SMEs stop -> start sequence.
612
613 If HDD changed the domain that will cause a reset. This function will
614 provide the new set of 11d information for the new domain. Currrently this
615 API provides info regarding 11d only at reset but we can extend this for
616 other params (PMC, QoS) which needs to be initialized again at reset.
617
618 This is a synchronuous call
619
620 \param hHal - The handle returned by macOpen.
621
622 \Param
623 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
624 currently provides 11d related information like Country code,
625 Regulatory domain, valid channel list, Tx power per channel, a
626 list with active/passive scan allowed per valid channel.
627
628 \return eHalStatus
629 ---------------------------------------------------------------------------*/
630eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
631 tCsrUpdateConfigParam *pUpdateConfigParam);
632
633/*--------------------------------------------------------------------------
634
635 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
636 is ready tio run.
637
638 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
639 to running state.
640
641
642 \param hHal - The handle returned by macOpen.
643
644 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
645
646 Other status means SME failed to send the message to PE.
647 \sa
648
649 --------------------------------------------------------------------------*/
650eHalStatus sme_HDDReadyInd(tHalHandle hHal);
651
652
653/*--------------------------------------------------------------------------
654
655 \brief sme_ProcessMsg() - The main message processor for SME.
656
657 The function is called by a message dispatcher when to process a message
658 targeted for SME.
659
660
661 \param hHal - The handle returned by macOpen.
662 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
663
664 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
665
666 Other status means SME failed to process the message.
667 \sa
668
669 --------------------------------------------------------------------------*/
670eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
671
672v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
673
674/* ---------------------------------------------------------------------------
675 \fn sme_ScanRequest
676 \brief a wrapper function to Request a 11d or full scan from CSR.
677 \param pScanRequestID - pointer to an object to get back the request ID
678 \param callback - a callback function that scan calls upon finish, will not
679 be called if csrScanRequest returns error
680 \param pContext - a pointer passed in for the callback
681 \return eHalStatus
682 ---------------------------------------------------------------------------*/
683eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
684 tANI_U32 *pScanRequestID,
685 csrScanCompleteCallback callback, void *pContext);
686
687
688/* ---------------------------------------------------------------------------
689 \fn sme_ScanSetBGScanparams
690 \brief a wrapper function to request CSR to set BG scan params in PE
691 \param pScanReq - BG scan request structure
692 \return eHalStatus
693 ---------------------------------------------------------------------------*/
694eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
695
696
697/* ---------------------------------------------------------------------------
698 \fn sme_ScanGetResult
699 \brief a wrapper function to request scan results from CSR.
700 \param pFilter - If pFilter is NULL, all cached results are returned
701 \param phResult - an object for the result.
702 \return eHalStatus
703 ---------------------------------------------------------------------------*/
704eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
705 tScanResultHandle *phResult);
706
707
708/* ---------------------------------------------------------------------------
709 \fn sme_ScanFlushResult
710 \brief a wrapper function to request CSR to clear scan results.
711 \return eHalStatus
712 ---------------------------------------------------------------------------*/
713eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530714
715/*
716 * ---------------------------------------------------------------------------
717 * \fn sme_FilterScanResults
718 * \brief a wrapper function to request CSR to filter the scan results based
719 * on valid chennel list.
720 * \return eHalStatus
721 *---------------------------------------------------------------------------
722 */
723eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
724
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530725/*
726 * ---------------------------------------------------------------------------
727 * \fn sme_FilterScanDFSResults
728 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
729 * from the scan results.
730 * \return eHalStatus
731 *---------------------------------------------------------------------------
732 */
733eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
734
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700735eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700736
737/* ---------------------------------------------------------------------------
738 \fn sme_ScanResultGetFirst
739 \brief a wrapper function to request CSR to returns the first element of
740 scan result.
741 \param hScanResult - returned from csrScanGetResult
742 \return tCsrScanResultInfo * - NULL if no result
743 ---------------------------------------------------------------------------*/
744tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
745 tScanResultHandle hScanResult);
746
747/* ---------------------------------------------------------------------------
748 \fn sme_ScanResultGetNext
749 \brief a wrapper function to request CSR to returns the next element of
750 scan result. It can be called without calling csrScanResultGetFirst
751 first
752 \param hScanResult - returned from csrScanGetResult
753 \return Null if no result or reach the end
754 ---------------------------------------------------------------------------*/
755tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
756 tScanResultHandle hScanResult);
757
758/* ---------------------------------------------------------------------------
759 \fn sme_ScanResultPurge
760 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
761 in the list and free memory for each item
762 \param hScanResult - returned from csrScanGetResult. hScanResult is
763 considered gone by
764 calling this function and even before this function reutrns.
765 \return eHalStatus
766 ---------------------------------------------------------------------------*/
767eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
768
Sourav Mohapatra5817dc42017-12-18 17:45:16 +0530769VOS_STATUS sme_update_channel_list(tpAniSirGlobal pMac);
770
771
Jeff Johnson295189b2012-06-20 16:38:30 -0700772/* ---------------------------------------------------------------------------
773 \fn sme_ScanGetPMKIDCandidateList
774 \brief a wrapper function to return the PMKID candidate list
775 \param pPmkidList - caller allocated buffer point to an array of
776 tPmkidCandidateInfo
777 \param pNumItems - pointer to a variable that has the number of
778 tPmkidCandidateInfo allocated when retruning, this is
779 either the number needed or number of items put into
780 pPmkidList
781 \return eHalStatus - when fail, it usually means the buffer allocated is not
782 big enough and pNumItems
783 has the number of tPmkidCandidateInfo.
784 \Note: pNumItems is a number of tPmkidCandidateInfo,
785 not sizeof(tPmkidCandidateInfo) * something
786 ---------------------------------------------------------------------------*/
787eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
788 tPmkidCandidateInfo *pPmkidList,
789 tANI_U32 *pNumItems );
790
791
792/*----------------------------------------------------------------------------
793 \fn sme_RoamRegisterLinkQualityIndCallback
794
795 \brief
796 a wrapper function to allow HDD to register a callback handler with CSR for
797 link quality indications.
798
799 Only one callback may be registered at any time.
800 In order to deregister the callback, a NULL cback may be provided.
801
802 Registration happens in the task context of the caller.
803
804 \param callback - Call back being registered
805 \param pContext - user data
806
807 DEPENDENCIES: After CSR open
808
809 \return eHalStatus
810-----------------------------------------------------------------------------*/
811eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
812 csrRoamLinkQualityIndCallback callback,
813 void *pContext);
814
815
816/* ---------------------------------------------------------------------------
817 \fn sme_RoamConnect
818 \brief a wrapper function to request CSR to inititiate an association
819 \param sessionId - the sessionId returned by sme_OpenSession.
820 \param pProfile - can be NULL to join to any open ones
821 \param pRoamId - to get back the request ID
822 \return eHalStatus
823 ---------------------------------------------------------------------------*/
824eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
825 tANI_U32 *pRoamId);
826
827/* ---------------------------------------------------------------------------
828 \fn sme_RoamReassoc
829 \brief a wrapper function to request CSR to inititiate a re-association
830 \param pProfile - can be NULL to join the currently connected AP. In that
831 case modProfileFields should carry the modified field(s) which could trigger
832 reassoc
833 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
834 that might need modification dynamically once STA is up & running and this
835 could trigger a reassoc
836 \param pRoamId - to get back the request ID
837 \return eHalStatus
838 -------------------------------------------------------------------------------*/
839eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
840 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700841 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700842
843/* ---------------------------------------------------------------------------
844 \fn sme_RoamConnectToLastProfile
845 \brief a wrapper function to request CSR to disconnect and reconnect with
846 the same profile
847 \return eHalStatus. It returns fail if currently connected
848 ---------------------------------------------------------------------------*/
849eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
850
851/* ---------------------------------------------------------------------------
852 \fn sme_RoamDisconnect
853 \brief a wrapper function to request CSR to disconnect from a network
854 \param reason -- To indicate the reason for disconnecting. Currently, only
855 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
856 \return eHalStatus
857 ---------------------------------------------------------------------------*/
858eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
859
Jeff Johnson295189b2012-06-20 16:38:30 -0700860/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530861 \fn.sme_abortConnection
862 \brief a wrapper function to request CSR to stop from connecting a network
863 \retun void.
864---------------------------------------------------------------------------*/
865
866void sme_abortConnection(tHalHandle hHal, tANI_U8 sessionId);
867
868/* ---------------------------------------------------------------------------
Abhishek Singhe0bc0992016-05-20 17:58:18 +0530869 \fn.sme_dhcp_done_ind
870 \brief a wrapper function to set dhcp done ind in sme session
871 \retun void.
872---------------------------------------------------------------------------*/
873void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id);
874
875/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700876 \fn sme_RoamStopBss
877 \brief a wrapper function to request CSR to stop bss
878 \param sessionId - sessionId of SoftAP
879 \return eHalStatus
880 ---------------------------------------------------------------------------*/
881eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
882
883/* ---------------------------------------------------------------------------
884 \fn sme_RoamGetAssociatedStas
885 \brief To probe the list of associated stations from various modules of CORE stack.
886 \This is an asynchronous API.
887 \param sessionId - sessionId of SoftAP
888 \param modId - Module from whom list of associtated stations is to be probed.
889 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
890 \param pUsrContext - Opaque HDD context
891 \param pfnSapEventCallback - Sap event callback in HDD
892 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
893 \return eHalStatus
894 -------------------------------------------------------------------------------*/
895eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
896 VOS_MODULE_ID modId, void *pUsrContext,
897 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
898
899/* ---------------------------------------------------------------------------
900 \fn sme_RoamDisconnectSta
901 \brief To disassociate a station. This is an asynchronous API.
902 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
903 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
904 -------------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +0530905eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId,
906#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
907 const tANI_U8 *pPeerMacAddr
908#else
909 tANI_U8 *pPeerMacAddr
910#endif
911 );
Jeff Johnson295189b2012-06-20 16:38:30 -0700912
913/* ---------------------------------------------------------------------------
914 \fn sme_RoamDeauthSta
915 \brief To disassociate a station. This is an asynchronous API.
916 \param hHal - Global structure
917 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530918 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700919 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
920 -------------------------------------------------------------------------------*/
921eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530922 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700923
924/* ---------------------------------------------------------------------------
925 \fn sme_RoamTKIPCounterMeasures
926 \brief To start or stop TKIP counter measures. This is an asynchronous API.
927 \param sessionId - sessionId of SoftAP
928 \param bEnable - Flag to start/stop TKIP countermeasures
929 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
930 -------------------------------------------------------------------------------*/
931eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
932
933/* ---------------------------------------------------------------------------
934 \fn sme_RoamGetWpsSessionOverlap
935 \brief To get the WPS PBC session overlap information.
936 \This is an asynchronous API.
937 \param sessionId - sessionId of SoftAP
938 \param pUsrContext - Opaque HDD context
939 \param pfnSapEventCallback - Sap event callback in HDD
940 \return eHalStatus
941 -------------------------------------------------------------------------------*/
942eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
943 void *pUsrContext, void *pfnSapEventCallback,
944 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700945
946/* ---------------------------------------------------------------------------
947 \fn sme_RoamGetConnectState
948 \brief a wrapper function to request CSR to return the current connect state
949 of Roaming
950 \return eHalStatus
951 ---------------------------------------------------------------------------*/
952eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
953
954/* ---------------------------------------------------------------------------
955 \fn sme_RoamGetConnectProfile
956 \brief a wrapper function to request CSR to return the current connect
957 profile. Caller must call csrRoamFreeConnectProfile after it is done
958 and before reuse for another csrRoamGetConnectProfile call.
959 \param pProfile - pointer to a caller allocated structure
960 tCsrRoamConnectedProfile
961 \return eHalStatus. Failure if not connected
962 ---------------------------------------------------------------------------*/
963eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
964 tCsrRoamConnectedProfile *pProfile);
965
966/* ---------------------------------------------------------------------------
967 \fn sme_RoamFreeConnectProfile
968 \brief a wrapper function to request CSR to free and reinitialize the
969 profile returned previously by csrRoamGetConnectProfile.
970 \param pProfile - pointer to a caller allocated structure
971 tCsrRoamConnectedProfile
972 \return eHalStatus.
973 ---------------------------------------------------------------------------*/
974eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
975 tCsrRoamConnectedProfile *pProfile);
976
977/* ---------------------------------------------------------------------------
978 \fn sme_RoamSetPMKIDCache
979 \brief a wrapper function to request CSR to return the PMKID candidate list
980 \param pPMKIDCache - caller allocated buffer point to an array of
981 tPmkidCacheInfo
982 \param numItems - a variable that has the number of tPmkidCacheInfo
983 allocated when retruning, this is either the number needed
984 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530985 \param update_entire_cache - if TRUE, then it overwrites the entire cache
986 with pPMKIDCache, else it updates entry by
987 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700988 \return eHalStatus - when fail, it usually means the buffer allocated is not
989 big enough and pNumItems has the number of
990 tPmkidCacheInfo.
991 \Note: pNumItems is a number of tPmkidCacheInfo,
992 not sizeof(tPmkidCacheInfo) * something
993 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530994eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
995 tPmkidCacheInfo *pPMKIDCache,
996 tANI_U32 numItems,
997 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700998
999/* ---------------------------------------------------------------------------
1000 \fn sme_RoamGetSecurityReqIE
1001 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
1002 passes to PE to JOIN request or START_BSS request
1003 This is a synchronuous call.
1004 \param sessionId - returned by sme_OpenSession.
1005 \param pLen - caller allocated memory that has the length of pBuf as input.
1006 Upon returned, *pLen has the needed or IE length in pBuf.
1007 \param pBuf - Caller allocated memory that contain the IE field, if any,
1008 upon return
1009 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1010 \return eHalStatus - when fail, it usually means the buffer allocated is not
1011 big enough
1012 ---------------------------------------------------------------------------*/
1013eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1014 tANI_U8 *pBuf, eCsrSecurityType secType);
1015
1016/* ---------------------------------------------------------------------------
1017 \fn sme_RoamGetSecurityRspIE
1018 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
1019 the beacon or probe rsp if connected
1020 \param sessionId - returned by sme_OpenSession.
1021 \param pLen - caller allocated memory that has the length of pBuf as input.
1022 Upon returned, *pLen has the needed or IE length in pBuf.
1023 \param pBuf - Caller allocated memory that contain the IE field, if any,
1024 upon return
1025 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1026 \return eHalStatus - when fail, it usually means the buffer allocated is not
1027 big enough
1028 ---------------------------------------------------------------------------*/
1029eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1030 tANI_U8 *pBuf, eCsrSecurityType secType);
1031
1032
1033/* ---------------------------------------------------------------------------
1034 \fn sme_RoamGetNumPMKIDCache
1035 \brief a wrapper function to request CSR to return number of PMKID cache
1036 entries
1037 \return tANI_U32 - the number of PMKID cache entries
1038 ---------------------------------------------------------------------------*/
1039tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
1040
1041/* ---------------------------------------------------------------------------
1042 \fn sme_RoamGetPMKIDCache
1043 \brief a wrapper function to request CSR to return PMKID cache from CSR
1044 \param pNum - caller allocated memory that has the space of the number of
1045 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
1046 needed or actually number in tPmkidCacheInfo.
1047 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
1048 any, upon return
1049 \return eHalStatus - when fail, it usually means the buffer allocated is not
1050 big enough
1051 ---------------------------------------------------------------------------*/
1052eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
1053 tPmkidCacheInfo *pPmkidCache);
1054
1055/* ---------------------------------------------------------------------------
1056 \fn sme_GetConfigParam
1057 \brief a wrapper function that HDD calls to get the global settings
1058 currently maintained by CSR.
1059 \param pParam - caller allocated memory
1060 \return eHalStatus
1061 ---------------------------------------------------------------------------*/
1062eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
1063
1064/* ---------------------------------------------------------------------------
1065 \fn sme_GetStatistics
1066 \brief a wrapper function that client calls to register a callback to get
1067 different PHY level statistics from CSR.
1068
1069 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1070 \param statsMask - The different category/categories of stats requester is looking for
1071 The order in which you set the bits in the statsMask for requesting
1072 different type of stats is:
1073
1074 eCsrSummaryStats = bit 0
1075 eCsrGlobalClassAStats = bit 1
1076 eCsrGlobalClassBStats = bit 2
1077 eCsrGlobalClassCStats = bit 3
1078 eCsrGlobalClassDStats = bit 4
1079 eCsrPerStaStats = bit 5
1080
1081 \param callback - SME sends back the requested stats using the callback
1082 \param periodicity - If requester needs periodic update, 0 means it's an one
1083 time request
1084 \param cache - If requester is happy with cached stats
1085 \param staId - The station ID for which the stats is requested for
1086 \param pContext - user context to be passed back along with the callback
1087 \return eHalStatus
1088 ---------------------------------------------------------------------------*/
1089eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1090 tANI_U32 statsMask,
1091 tCsrStatsCallback callback,
1092 tANI_U32 periodicity, tANI_BOOLEAN cache,
1093 tANI_U8 staId, void *pContext);
1094
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301095/* ---------------------------------------------------------------------------
1096 \fn smeGetTLSTAState
1097 \helper function to get teh TL STA State whenever the function is called.
1098
1099 \param staId - The staID to be passed to the TL
1100 to get the relevant TL STA State
1101 \return the state as tANI_U16
1102 ---------------------------------------------------------------------------*/
1103tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1104
Jeff Johnson295189b2012-06-20 16:38:30 -07001105eHalStatus sme_GetRssi(tHalHandle hHal,
1106 tCsrRssiCallback callback,
1107 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301108
1109/* ---------------------------------------------------------------------------
1110 \fn sme_GetSnr
1111 \brief a wrapper function that client calls to register a callback to get
1112 SNR from FW
1113
1114 \param callback - SME sends back the requested stats using the callback
1115 \param staId - The station ID for which the stats is requested for
1116 \param bssid - The bssid of the connected session
1117 \param pContext - user context to be passed back along with the callback
1118 ---------------------------------------------------------------------------*/
1119eHalStatus sme_GetSnr(tHalHandle hHal,
1120 tCsrSnrCallback callback,
1121 tANI_U8 staId, tCsrBssid bssId,
1122 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001123#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001124eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1125 tCsrRssiCallback callback,
1126 tANI_U8 staId,
1127 tCsrBssid bssId,
1128 void *pContext,
1129 void* pVosContext);
1130#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001131
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001132#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001133/* ---------------------------------------------------------------------------
1134 \fn sme_GetTsmStats
1135 \brief a wrapper function that client calls to register a callback to get TSM Stats
1136
1137 \param callback - SME sends back the requested stats using the callback
1138 \param staId - The station ID for which the stats is requested for
1139 \param pContext - user context to be passed back along with the callback
1140 \param pVosContext - vos context
1141 \return eHalStatus
1142 ---------------------------------------------------------------------------*/
1143eHalStatus sme_GetTsmStats(tHalHandle hHal,
1144 tCsrTsmStatsCallback callback,
1145 tANI_U8 staId, tCsrBssid bssId,
1146 void *pContext, void* pVosContext, tANI_U8 tid);
1147
1148/* ---------------------------------------------------------------------------
1149 \fn sme_SetCCKMIe
1150 \brief function to store the CCKM IE passed from supplicant and use it while packing
1151 reassociation request
1152 \param hHal - HAL handle for device
1153 \param pCckmIe - pointer to CCKM IE data
1154 \param pCckmIeLen - length of the CCKM IE
1155 \- return Success or failure
1156 -------------------------------------------------------------------------*/
1157eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1158
1159
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001160/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001161 \fn sme_SetEseBeaconRequest
1162 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001163 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001164 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001165 \- return Success or failure
1166 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001167eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1168 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001169
1170
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001171#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001172/* ---------------------------------------------------------------------------
1173 \fn sme_CfgSetInt
1174 \brief a wrapper function that HDD calls to set parameters in CFG.
1175 \param cfgId - Configuration Parameter ID (type) for STA.
1176 \param ccmValue - The information related to Configuration Parameter ID
1177 which needs to be saved in CFG
1178 \param callback - To be registered by CSR with CCM. Once the CFG done with
1179 saving the information in the database, it notifies CCM &
1180 then the callback will be invoked to notify.
1181 \param toBeSaved - To save the request for future reference
1182 \return eHalStatus
1183 ---------------------------------------------------------------------------*/
1184eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1185 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1186
1187/* ---------------------------------------------------------------------------
1188 \fn sme_CfgSetStr
1189 \brief a wrapper function that HDD calls to set parameters in CFG.
1190 \param cfgId - Configuration Parameter ID (type) for STA.
1191 \param pStr - Pointer to the byte array which carries the information needs
1192 to be saved in CFG
1193 \param length - Length of the data to be saved
1194 \param callback - To be registered by CSR with CCM. Once the CFG done with
1195 saving the information in the database, it notifies CCM &
1196 then the callback will be invoked to notify.
1197 \param toBeSaved - To save the request for future reference
1198 \return eHalStatus
1199 ---------------------------------------------------------------------------*/
1200eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1201 tANI_U32 length, tCcmCfgSetCallback callback,
1202 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301203/* ---------------------------------------------------------------------------
1204 \fn sme_GetModifyProfileFields
1205 \brief HDD or SME - QOS calls this function to get the current values of
1206 connected profile fields, changing which can cause reassoc.
1207 This function must be called after CFG is downloaded and STA is in connected
1208 state. Also, make sure to call this function to get the current profile
1209 fields before calling the reassoc. So that pModifyProfileFields will have
1210 all the latest values plus the one(s) has been updated as part of reassoc
1211 request.
1212 \param pModifyProfileFields - pointer to the connected profile fields
1213 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001214
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301215 \return eHalStatus
1216 -------------------------------------------------------------------------------*/
1217eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1218 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301219/* ---------------------------------------------------------------------------
1220 \fn sme_HT40StopOBSSScan
1221 \brief HDD or SME - Command to stop the OBSS scan
1222 THis is implemented only for debugging purpose.
1223 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1224 \param sessionId - sessionId
1225 changing which can cause reassoc
1226
1227 \return eHalStatus
1228 -------------------------------------------------------------------------------*/
1229eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001230
1231/*--------------------------------------------------------------------------
1232 \fn sme_SetConfigPowerSave
1233 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1234 For BMPS related configuration, this function also updates the CFG
1235 and sends a message to FW to pick up the new values. Note: Calling
1236 this function only updates the configuration and does not enable
1237 the specified power save mode.
1238 \param hHal - The handle returned by macOpen.
1239 \param psMode - Power Saving mode being modified
1240 \param pConfigParams - a pointer to a caller allocated object of type
1241 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1242 \return eHalStatus
1243 --------------------------------------------------------------------------*/
1244eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1245 void *pConfigParams);
1246
1247/*--------------------------------------------------------------------------
1248 \fn sme_GetConfigPowerSave
1249 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1250 \param hHal - The handle returned by macOpen.
1251 \param psMode - Power Saving mode
1252 \param pConfigParams - a pointer to a caller allocated object of type
1253 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1254 \return eHalStatus
1255 --------------------------------------------------------------------------*/
1256eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1257 void *pConfigParams);
1258
1259/* ---------------------------------------------------------------------------
1260 \fn sme_SignalPowerEvent
1261 \brief Signals to PMC that a power event has occurred. Used for putting
1262 the chip into deep sleep mode.
1263 \param hHal - The handle returned by macOpen.
1264 \param event - the event that has occurred
1265 \return eHalStatus
1266 ---------------------------------------------------------------------------*/
1267extern eHalStatus sme_SignalPowerEvent (
1268 tHalHandle hHal,
1269 tPmcPowerEvent event);
1270
1271/* ---------------------------------------------------------------------------
1272 \fn sme_EnablePowerSave
1273 \brief Enables one of the power saving modes. This API does not cause a
1274 device state change. This is purely a configuration API.
1275 \param hHal - The handle returned by macOpen.
1276 \param psMode - The power saving mode to enable.
1277 \return eHalStatus
1278 ---------------------------------------------------------------------------*/
1279extern eHalStatus sme_EnablePowerSave (
1280 tHalHandle hHal,
1281 tPmcPowerSavingMode psMode);
1282
1283/* ---------------------------------------------------------------------------
1284 \fn sme_DisablePowerSave
1285 \brief Disables one of the power saving modes.Disabling does not imply
1286 that device will be brought out of the current PS mode. This is
1287 purely a configuration API.
1288 \param hHal - The handle returned by macOpen.
1289 \param psMode - The power saving mode to disable.
1290 \return eHalStatus
1291 ---------------------------------------------------------------------------*/
1292extern eHalStatus sme_DisablePowerSave (
1293 tHalHandle hHal,
1294 tPmcPowerSavingMode psMode);
1295
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301296 /* ---------------------------------------------------------------------------
1297 \fn sme_SetHostPowerSave
1298 \brief The BMPS logic is controlled by the User level Apps
1299 \param hHal - The handle returned by macOpen.
1300 \param psMode - The power saving mode to enable.
1301 \return eHalStatus
1302 ---------------------------------------------------------------------------*/
1303extern eHalStatus sme_SetHostPowerSave (
1304 tHalHandle hHal,
1305 v_BOOL_t psMode);
1306
Jeff Johnson295189b2012-06-20 16:38:30 -07001307/* ---------------------------------------------------------------------------
1308 \fn sme_StartAutoBmpsTimer
1309 \brief Starts a timer that periodically polls all the registered
1310 module for entry into Bmps mode. This timer is started only if BMPS is
1311 enabled and whenever the device is in full power.
1312 \param hHal - The handle returned by macOpen.
1313 \return eHalStatus
1314 ---------------------------------------------------------------------------*/
1315extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1316
1317/* ---------------------------------------------------------------------------
1318 \fn sme_StopAutoBmpsTimer
1319 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1320 Stopping the timer does not cause a device state change. Only the timer
1321 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1322 \param hHal - The handle returned by macOpen.
1323 \return eHalStatus
1324 ---------------------------------------------------------------------------*/
1325extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1326
1327/* ---------------------------------------------------------------------------
1328 \fn sme_QueryPowerState
1329 \brief Returns the current power state of the device.
1330 \param hHal - The handle returned by macOpen.
1331 \param pPowerState - pointer to location to return power state
1332 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1333 \return eHalStatus
1334 ---------------------------------------------------------------------------*/
1335extern eHalStatus sme_QueryPowerState (
1336 tHalHandle hHal,
1337 tPmcPowerState *pPowerState,
1338 tPmcSwitchState *pSwWlanSwitchState);
1339
1340/* ---------------------------------------------------------------------------
1341 \fn sme_IsPowerSaveEnabled
1342 \brief Checks if the device is able to enter a particular power save mode
1343 This does not imply that the device is in a particular PS mode
1344 \param hHal - The handle returned by macOpen.
1345 \param psMode - the power saving mode
1346 \return eHalStatus
1347 ---------------------------------------------------------------------------*/
1348extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1349 tHalHandle hHal,
1350 tPmcPowerSavingMode psMode);
1351
1352/* ---------------------------------------------------------------------------
1353 \fn sme_RequestFullPower
1354 \brief Request that the device be brought to full power state.
1355 Note 1: If "fullPowerReason" specificied in this API is set to
1356 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1357 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1358 HDD is requesting full power, we need to undo any previous HDD requests for
1359 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1360 specified anything other than above, the buffered requests for BMPS and WoWL
1361 will not be cleared.
1362 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1363 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1364 request".
1365 Note 3: When the device finally enters Full Power PMC will start a timer
1366 if any of the following holds true:
1367 - Auto BMPS mode is enabled
1368 - Uapsd request is pending
1369 - HDD's request for BMPS is pending
1370 - HDD's request for WoWL is pending
1371 On timer expiry PMC will attempt to put the device in BMPS mode if following
1372 (in addition to those listed above) holds true:
1373 - Polling of all modules through the Power Save Check routine passes
1374 - STA is associated to an access point
1375 \param hHal - The handle returned by macOpen.
1376 \param - callbackRoutine Callback routine invoked in case of success/failure
1377 \param - callbackContext - Cookie to be passed back during callback
1378 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1379 distinguish between BAP and HDD requests
1380 \return eHalStatus - status
1381 eHAL_STATUS_SUCCESS - device brought to full power state
1382 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1383 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1384 ---------------------------------------------------------------------------*/
1385extern eHalStatus sme_RequestFullPower (
1386 tHalHandle hHal,
1387 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1388 void *callbackContext,
1389 tRequestFullPowerReason fullPowerReason);
1390
1391/* ---------------------------------------------------------------------------
1392 \fn sme_RequestBmps
1393 \brief Request that the device be put in BMPS state. Request will be
1394 accepted only if BMPS mode is enabled and power save check routine
1395 passes. Only HDD should invoke this API.
1396 \param hHal - The handle returned by macOpen.
1397 \param - callbackRoutine Callback routine invoked in case of success/failure
1398 \param - callbackContext - Cookie to be passed back during callback
1399 \return eHalStatus
1400 eHAL_STATUS_SUCCESS - device is in BMPS state
1401 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1402 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1403 ---------------------------------------------------------------------------*/
1404extern eHalStatus sme_RequestBmps (
1405 tHalHandle hHal,
1406 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1407 void *callbackContext);
1408
1409/* ---------------------------------------------------------------------------
1410 \fn sme_SetDHCPTillPowerActiveFlag
1411 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1412 entry by PMC
1413 \param hHal - The handle returned by macOpen.
1414 ---------------------------------------------------------------------------*/
1415void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1416
1417
1418/* ---------------------------------------------------------------------------
1419 \fn sme_StartUapsd
1420 \brief Request that the device be put in UAPSD state. If the device is in
1421 Full Power it will be put in BMPS mode first and then into UAPSD
1422 mode.
1423 \param hHal - The handle returned by macOpen.
1424 \param - callbackRoutine Callback routine invoked in case of success/failure
1425 \param - callbackContext - Cookie to be passed back during callback
1426 eHAL_STATUS_SUCCESS - device is in UAPSD state
1427 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1428 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1429 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1430 \return eHalStatus
1431 ---------------------------------------------------------------------------*/
1432extern eHalStatus sme_StartUapsd (
1433 tHalHandle hHal,
1434 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1435 void *callbackContext);
1436
1437/* ---------------------------------------------------------------------------
1438 \fn sme_StopUapsd
1439 \brief Request that the device be put out of UAPSD state. Device will be
1440 put in in BMPS state after stop UAPSD completes. Buffered requests for
1441 UAPSD will be cleared after this.
1442 \param hHal - The handle returned by macOpen.
1443 \return eHalStatus
1444 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1445 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1446 ---------------------------------------------------------------------------*/
1447extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1448
1449/* ---------------------------------------------------------------------------
1450 \fn sme_RequestStandby
1451 \brief Request that the device be put in standby. It is HDD's responsibility
1452 to bring the chip to full power and do a discconnect before calling
1453 this API. Request for standby will be rejected if STA is associated
1454 to an AP.
1455 \param hHal - The handle returned by macOpen.
1456 \param - callbackRoutine Callback routine invoked in case of success/failure
1457 \param - callbackContext - Cookie to be passed back during callback
1458 \return eHalStatus
1459 eHAL_STATUS_SUCCESS - device is in Standby mode
1460 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1461 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1462 ---------------------------------------------------------------------------*/
1463extern eHalStatus sme_RequestStandby (
1464 tHalHandle hHal,
1465 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1466 void *callbackContext);
1467
1468/* ---------------------------------------------------------------------------
1469 \fn sme_RegisterPowerSaveCheck
1470 \brief Register a power save check routine that is called whenever
1471 the device is about to enter one of the power save modes.
1472 \param hHal - The handle returned by macOpen.
1473 \param checkRoutine - Power save check routine to be registered
1474 \param callbackContext - Cookie to be passed back during callback
1475 \return eHalStatus
1476 eHAL_STATUS_SUCCESS - successfully registered
1477 eHAL_STATUS_FAILURE - not successfully registered
1478 ---------------------------------------------------------------------------*/
1479extern eHalStatus sme_RegisterPowerSaveCheck (
1480 tHalHandle hHal,
1481 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1482
1483/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301484 \fn sme_Register11dScanDoneCallback
1485 \brief Register a routine of type csrScanCompleteCallback which is
1486 called whenever an 11d scan is done
1487 \param hHal - The handle returned by macOpen.
1488 \param callback - 11d scan complete routine to be registered
1489 \return eHalStatus
1490 ---------------------------------------------------------------------------*/
1491extern eHalStatus sme_Register11dScanDoneCallback (
1492 tHalHandle hHal,
1493 csrScanCompleteCallback);
1494
1495/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001496 \fn sme_DeregisterPowerSaveCheck
1497 \brief Deregister a power save check routine
1498 \param hHal - The handle returned by macOpen.
1499 \param checkRoutine - Power save check routine to be deregistered
1500 \return eHalStatus
1501 eHAL_STATUS_SUCCESS - successfully deregistered
1502 eHAL_STATUS_FAILURE - not successfully deregistered
1503 ---------------------------------------------------------------------------*/
1504extern eHalStatus sme_DeregisterPowerSaveCheck (
1505 tHalHandle hHal,
1506 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1507
1508/* ---------------------------------------------------------------------------
1509 \fn sme_RegisterDeviceStateUpdateInd
1510 \brief Register a callback routine that is called whenever
1511 the device enters a new device state (Full Power, BMPS, UAPSD)
1512 \param hHal - The handle returned by macOpen.
1513 \param callbackRoutine - Callback routine to be registered
1514 \param callbackContext - Cookie to be passed back during callback
1515 \return eHalStatus
1516 eHAL_STATUS_SUCCESS - successfully registered
1517 eHAL_STATUS_FAILURE - not successfully registered
1518 ---------------------------------------------------------------------------*/
1519extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1520 tHalHandle hHal,
1521 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1522 void *callbackContext);
1523
1524/* ---------------------------------------------------------------------------
1525 \fn sme_DeregisterDeviceStateUpdateInd
1526 \brief Deregister a routine that was registered for device state changes
1527 \param hHal - The handle returned by macOpen.
1528 \param callbackRoutine - Callback routine to be deregistered
1529 \return eHalStatus
1530 eHAL_STATUS_SUCCESS - successfully deregistered
1531 eHAL_STATUS_FAILURE - not successfully deregistered
1532 ---------------------------------------------------------------------------*/
1533extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1534 tHalHandle hHal,
1535 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1536
1537/* ---------------------------------------------------------------------------
1538 \fn sme_WowlAddBcastPattern
1539 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1540 do a pattern match on these patterns when Wowl is enabled during BMPS
1541 mode.
1542 \param hHal - The handle returned by macOpen.
1543 \param pattern - Pattern to be added
1544 \return eHalStatus
1545 eHAL_STATUS_FAILURE Cannot add pattern
1546 eHAL_STATUS_SUCCESS Request accepted.
1547 ---------------------------------------------------------------------------*/
1548extern eHalStatus sme_WowlAddBcastPattern (
1549 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001550 tpSirWowlAddBcastPtrn pattern,
1551 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001552
1553/* ---------------------------------------------------------------------------
1554 \fn sme_WowlDelBcastPattern
1555 \brief Delete a pattern that was added for Pattern Byte Matching.
1556 \param hHal - The handle returned by macOpen.
1557 \param pattern - Pattern to be deleted
1558 \return eHalStatus
1559 eHAL_STATUS_FAILURE Cannot delete pattern
1560 eHAL_STATUS_SUCCESS Request accepted.
1561 ---------------------------------------------------------------------------*/
1562extern eHalStatus sme_WowlDelBcastPattern (
1563 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001564 tpSirWowlDelBcastPtrn pattern,
1565 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001566
1567/* ---------------------------------------------------------------------------
1568 \fn sme_EnterWowl
1569 \brief This is the API to request entry into WOWL mode.
1570 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1571 SME will will cache the information that WOWL has been requested and
1572 attempt to put the device in BMPS first. On entry into BMPS, SME will
1573 enter the WOWL mode.
1574 Note 1: After WoWL request is accepted, If module other than HDD requests
1575 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1576 and attempt to put the chip into BMPS+WOWL based on a timer.
1577 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1578 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1579 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1580 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1581 are required. Currently there is no requirement or use case to support UAPSD
1582 and WOWL at the same time.
1583 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1584 Note 5. Request for WoWL is rejected if BMPS is disabled.
1585
1586 \param hHal - The handle returned by macOpen.
1587 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1588 Used for success/failure notification by SME
1589 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1590 at the time of callback.
1591 \param wakeReasonIndCB - Callback routine provided by HDD.
1592 Used for Wake Reason Indication by SME
1593 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1594 at the time of callback.
1595 \return eHalStatus
1596 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1597 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1598 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1599 mode is entered.
1600 ---------------------------------------------------------------------------*/
1601extern eHalStatus sme_EnterWowl (
1602 tHalHandle hHal,
1603 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1604 void *enterWowlCallbackContext,
1605#ifdef WLAN_WAKEUP_EVENTS
1606 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1607 void *wakeReasonIndCBContext,
1608#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001609 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001610
1611/* ---------------------------------------------------------------------------
1612 \fn sme_ExitWowl
1613 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1614 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1615 mode. Any Buffered request for WoWL will be cleared after this API.
1616 \param hHal - The handle returned by macOpen.
1617 \return eHalStatus
1618 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1619 only if the previous "Enter WOWL" transaction has
1620 not even completed.
1621 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1622 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301623extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001624
1625/* ---------------------------------------------------------------------------
1626
1627 \fn sme_RoamSetKey
1628
1629 \brief To set encryption key. This function should be called only when connected
1630 This is an asynchronous API.
1631
1632 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1633
1634 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1635
1636 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1637
1638 FAILURE or RESOURCES The API finished and failed.
1639
1640 -------------------------------------------------------------------------------*/
1641eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1642
1643/* ---------------------------------------------------------------------------
1644
1645 \fn sme_RoamRemoveKey
1646
1647 \brief To set encryption key. This is an asynchronous API.
1648
1649 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1650
1651 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1652
1653 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1654
1655 FAILURE or RESOURCES The API finished and failed.
1656
1657 -------------------------------------------------------------------------------*/
1658eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1659
1660
1661/* ---------------------------------------------------------------------------
1662
1663 \fn sme_GetCountryCode
1664
1665 \brief To return the current country code. If no country code is applied, default country code is
1666 used to fill the buffer.
1667 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1668 This is a synchronous API.
1669
1670 \param pBuf - pointer to a caller allocated buffer for returned country code.
1671
1672 \param pbLen For input, this parameter indicates how big is the buffer.
1673 Upon return, this parameter has the number of bytes for country. If pBuf
1674 doesn't have enough space, this function returns
1675 fail status and this parameter contains the number that is needed.
1676
1677 \return eHalStatus SUCCESS.
1678
1679 FAILURE or RESOURCES The API finished and failed.
1680
1681 -------------------------------------------------------------------------------*/
1682eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1683
1684/* ---------------------------------------------------------------------------
1685
1686 \fn sme_SetCountryCode
1687
1688 \brief To change the current/default country code.
1689 If 11d supported is turned off, an error is return.
1690 This is a synchronous API.
1691
1692 \param pCountry - pointer to a caller allocated buffer for the country code.
1693
1694 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1695 whether a reset is required.
1696
1697 \return eHalStatus SUCCESS.
1698
1699 FAILURE or RESOURCES The API finished and failed.
1700
1701 -------------------------------------------------------------------------------*/
1702eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1703
1704/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301705
1706 \fn sme_InitChannels
1707
1708 \brief Used to initialize CSR channel lists while driver loading
1709
1710 \param hHal - global pMac structure
1711
1712 \return eHalStatus SUCCESS.
1713
1714 FAILURE or RESOURCES The API finished and failed.
1715
1716 -------------------------------------------------------------------------------*/
1717eHalStatus sme_InitChannels(tHalHandle hHal);
1718
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301719
Mihir Shete04206452014-11-20 17:50:58 +05301720#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301721/* ---------------------------------------------------------------------------
1722 \fn sme_InitChannelsForCC
1723
1724 \brief Used to issue regulatory hint to user
1725
1726 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301727 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301728
1729 \return eHalStatus SUCCESS.
1730
1731 FAILURE or RESOURCES The API finished and failed.
1732
1733 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301734eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301735#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301736
Mihir Shetee1093ba2014-01-21 20:13:32 +05301737/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001738 \fn sme_ResetCountryCodeInformation
1739 \brief this function is to reset the country code current being used back to EEPROM default
1740 this includes channel list and power setting. This is a synchronous API.
1741 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1742 a restart is needed to apply the change
1743 \return eHalStatus
1744 -------------------------------------------------------------------------------*/
1745eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1746
1747/* ---------------------------------------------------------------------------
1748 \fn sme_GetSupportedCountryCode
1749 \brief this function is to get a list of the country code current being supported
1750 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1751 this has the country code list. 3 bytes for each country code. This may be NULL if
1752 caller wants to know the needed byte count.
1753 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1754 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1755 \return eHalStatus
1756 -------------------------------------------------------------------------------*/
1757eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1758
1759/* ---------------------------------------------------------------------------
1760 \fn sme_GetCurrentRegulatoryDomain
1761 \brief this function is to get the current regulatory domain. This is a synchronous API.
1762 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1763 SME. The function fails if 11d support is turned off.
1764 \param pDomain - Caller allocated buffer to return the current domain.
1765 \return eHalStatus SUCCESS.
1766
1767 FAILURE or RESOURCES The API finished and failed.
1768 -------------------------------------------------------------------------------*/
1769eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1770
1771/* ---------------------------------------------------------------------------
1772 \fn sme_SetRegulatoryDomain
1773 \brief this function is to set the current regulatory domain.
1774 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1775 SME. This is a synchronous API.
1776 \param domainId - indicate the domain (defined in the driver) needs to set to.
1777 See v_REGDOMAIN_t for definition
1778 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1779 a restart is needed to apply the change
1780 \return eHalStatus
1781 -------------------------------------------------------------------------------*/
1782eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1783
1784/* ---------------------------------------------------------------------------
1785
1786 \fn sme_GetRegulatoryDomainForCountry
1787
1788 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1789
1790 \param pCountry - pointer to a caller allocated buffer for input country code.
1791
1792 \param pDomainId Upon successful return, it is the domain that country belongs to.
1793 If it is NULL, returning success means that the country code is known.
1794
1795 \return eHalStatus SUCCESS.
1796
1797 FAILURE or RESOURCES The API finished and failed.
1798
1799 -------------------------------------------------------------------------------*/
1800eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1801
1802
1803
1804/* ---------------------------------------------------------------------------
1805
1806 \fn sme_GetSupportedRegulatoryDomains
1807
1808 \brief To return a list of supported regulatory domains. This is a synchronous API.
1809
1810 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1811
1812 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1813 Upon return, this parameter has the number for supported domains. If pDomains
1814 doesn't have enough space for all the supported domains, this function returns
1815 fail status and this parameter contains the number that is needed.
1816
1817 \return eHalStatus SUCCESS.
1818
1819 FAILURE or RESOURCES The API finished and failed.
1820
1821 -------------------------------------------------------------------------------*/
1822eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1823
1824//some support functions
1825tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1826tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1827tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1828//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1829eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1830
1831typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1832/* ---------------------------------------------------------------------------
1833
1834 \fn sme_ChangeCountryCode
1835
1836 \brief Change Country code from upperlayer during WLAN driver operation.
1837 This is a synchronous API.
1838
1839 \param hHal - The handle returned by macOpen.
1840
1841 \param pCountry New Country Code String
1842
Abhishek Singha306a442013-11-07 18:39:01 +05301843 \param sendRegHint If we want to send reg hint to nl80211
1844
Jeff Johnson295189b2012-06-20 16:38:30 -07001845 \return eHalStatus SUCCESS.
1846
1847 FAILURE or RESOURCES The API finished and failed.
1848
1849 -------------------------------------------------------------------------------*/
1850eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1851 tSmeChangeCountryCallback callback,
1852 tANI_U8 *pCountry,
1853 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301854 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301855 tAniBool countryFromUserSpace,
1856 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001857
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301858/* ---------------------------------------------------------------------------
1859
Amar Singhal0d15bd52013-10-12 23:13:13 -07001860 \fn sme_GenericChangeCountryCode
1861
1862 \brief Generic API to change country code
1863
1864 \param hHal - The handle returned by macOpen.
1865
1866 \param pCountry New Country Code String
1867
1868 \param reg_domain Regulatory domain for the new country code
1869
1870 \return eHalStatus SUCCESS.
1871
1872 FAILURE or RESOURCES The API finished and failed.
1873
1874 -------------------------------------------------------------------------------*/
1875eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1876 tANI_U8 *pCountry,
1877 v_REGDOMAIN_t reg_domain);
1878
Abhishek Singh00b71972016-01-07 10:51:04 +05301879#ifdef WLAN_FEATURE_RMC
1880/* ---------------------------------------------------------------------------
1881
1882 \fn sme_TXFailMonitorStartStopInd
1883
1884 \brief Indicate FW about TX Fail Monitor Indication`
1885
1886 \param hHal - The handle returned by macOpen.
1887
1888 \param tx_fail_count number of failures after which the firmware sends
1889 an indication to host
1890
1891 \param txFailIndCallback function to be called after receiving TX Fail
1892 indication
1893 \return eHalStatus SUCCESS.
1894
1895 FAILURE or RESOURCES The API finished and failed.
1896
1897 -------------------------------------------------------------------------------*/
1898eHalStatus sme_TXFailMonitorStartStopInd(tHalHandle hHal,
1899 tANI_U8 tx_fail_count,
1900 void * txFailIndCallback);
1901#endif /* WLAN_FEATURE_RMC */
1902
Kapil Gupta04ab1992016-06-26 13:36:51 +05301903#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1904VOS_STATUS sme_set_per_roam_rxconfig (tHalHandle hHal, v_U8_t sessionId,
1905 v_U16_t minRate, v_U16_t maxRate, v_U8_t minPercentage,
1906 v_U16_t minPktRequired, v_U64_t waitPeriodForNextPERScan);
1907
1908VOS_STATUS sme_unset_per_roam_rxconfig (tHalHandle hHal);
1909
1910void sme_PERRoamScanStartStop(void *hHal, tANI_U8 start);
1911#endif
1912
Amar Singhal0d15bd52013-10-12 23:13:13 -07001913/* ---------------------------------------------------------------------------
1914
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301915 \fn sme_DHCPStartInd
1916
1917 \brief Indicate FW about DHCP start event.
1918
1919 \param hHal - The handle returned by macOpen.
1920
1921 \param device_mode the mode of the device
1922
c_hpothu0b0cab72014-02-13 21:52:40 +05301923 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301924
1925 \return eHalStatus SUCCESS.
1926
1927 FAILURE or RESOURCES The API finished and failed.
1928
1929 -------------------------------------------------------------------------------*/
1930
1931eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1932 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301933 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301934
1935/* ---------------------------------------------------------------------------
1936
1937 \fn sme_DHCPStopInd
1938
1939 \brief Indicate FW about DHCP stop event.
1940
1941 \param hHal - The handle returned by macOpen.
1942
1943 \param device_mode the mode of the device
1944
c_hpothu0b0cab72014-02-13 21:52:40 +05301945 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301946
1947 \return eHalStatus SUCCESS.
1948
1949 FAILURE or RESOURCES The API finished and failed.
1950
1951 -------------------------------------------------------------------------------*/
1952eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1953 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301954 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301955
Jeff Johnson295189b2012-06-20 16:38:30 -07001956
1957/* ---------------------------------------------------------------------------
1958 \fn sme_BtcSignalBtEvent
1959 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1960 BT event type and the current operating mode of Libra (full power,
1961 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1962 would be employed.
1963 \param hHal - The handle returned by macOpen.
1964 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1965 Caller owns the memory and is responsible for freeing it.
1966 \return VOS_STATUS
1967 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1968 if driver has not yet been initialized or if BTC
1969 Events Layer has been disabled.
1970 VOS_STATUS_SUCCESS BT Event passed to HAL
1971 ---------------------------------------------------------------------------*/
1972VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1973
1974/* ---------------------------------------------------------------------------
1975 \fn sme_BtcSetConfig
1976 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1977 This function should be invoked only after CFG download has completed.
1978 Calling it after sme_HDDReadyInd is recommended.
1979 \param hHal - The handle returned by macOpen.
1980 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1981 tSmeBtcConfig. Caller owns the memory and is responsible
1982 for freeing it.
1983 \return VOS_STATUS
1984 VOS_STATUS_E_FAILURE Config not passed to HAL.
1985 VOS_STATUS_SUCCESS Config passed to HAL
1986 ---------------------------------------------------------------------------*/
1987VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1988
1989/* ---------------------------------------------------------------------------
1990 \fn sme_BtcGetConfig
1991 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1992 \param hHal - The handle returned by macOpen.
1993 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1994 Caller owns the memory and is responsible for freeing it.
1995 \return VOS_STATUS
1996 VOS_STATUS_E_FAILURE - failure
1997 VOS_STATUS_SUCCESS success
1998 ---------------------------------------------------------------------------*/
1999VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
2000
2001/* ---------------------------------------------------------------------------
2002 \fn sme_SetCfgPrivacy
2003 \brief API to set configure privacy parameters
2004 \param hHal - The handle returned by macOpen.
2005 \param pProfile - Pointer CSR Roam profile.
2006 \param fPrivacy - This parameter indicates status of privacy
2007
2008 \return void
2009 ---------------------------------------------------------------------------*/
2010void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
2011
2012#if defined WLAN_FEATURE_VOWIFI
2013/* ---------------------------------------------------------------------------
2014 \fn sme_NeighborReportRequest
2015 \brief API to request neighbor report.
2016 \param hHal - The handle returned by macOpen.
2017 \param pRrmNeighborReq - Pointer to a caller allocated object of type
2018 tRrmNeighborReq. Caller owns the memory and is responsible
2019 for freeing it.
2020 \return VOS_STATUS
2021 VOS_STATUS_E_FAILURE - failure
2022 VOS_STATUS_SUCCESS success
2023 ---------------------------------------------------------------------------*/
2024VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
2025 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
2026#endif
2027
2028//The following are debug APIs to support direct read/write register/memory
2029//They are placed in SME because HW cannot be access when in LOW_POWER state
2030//AND not connected. The knowledge and synchronization is done in SME
2031
2032//sme_DbgReadRegister
2033//Caller needs to validate the input values
2034VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
2035
2036//sme_DbgWriteRegister
2037//Caller needs to validate the input values
2038VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
2039
2040//sme_DbgReadMemory
2041//Caller needs to validate the input values
2042//pBuf caller allocated buffer has the length of nLen
2043VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2044
2045//sme_DbgWriteMemory
2046//Caller needs to validate the input values
2047VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2048
Jeff Johnson295189b2012-06-20 16:38:30 -07002049VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
2050 tSirVersionType *pVersion);
2051VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
2052 tSirVersionType *pVersion);
2053VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
2054 tANI_U8 *pVersion,
2055 tANI_U32 versionBufferSize);
2056VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
2057 tANI_U8 *pVersion,
2058 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07002059eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
2060 csrRoamCompleteCallback callback,
2061 void *pContext);
2062
2063#ifdef FEATURE_WLAN_WAPI
2064/* ---------------------------------------------------------------------------
2065 \fn sme_RoamSetBKIDCache
2066 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
2067 candidate list.
2068 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2069 it is opened (by calling halOpen).
2070 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
2071 \param numItems - a variable that has the number of tBkidCacheInfo allocated
2072 when retruning, this is the number of items put into pBKIDCache
2073 \return eHalStatus - when fail, it usually means the buffer allocated is not
2074 big enough and pNumItems has the number of tBkidCacheInfo.
2075 ---------------------------------------------------------------------------*/
2076eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
2077 tANI_U32 numItems );
2078
2079/* ---------------------------------------------------------------------------
2080 \fn sme_RoamGetBKIDCache
2081 \brief The SME API exposed to HDD to allow HDD to request SME to return its
2082 BKID cache.
2083 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2084 it is opened (by calling halOpen).
2085 \param pNum - caller allocated memory that has the space of the number of
2086 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
2087 in SME cache.
2088 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
2089 upon return
2090 \return eHalStatus - when fail, it usually means the buffer allocated is not
2091 big enough.
2092 ---------------------------------------------------------------------------*/
2093eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
2094 tBkidCacheInfo *pBkidCache);
2095
2096/* ---------------------------------------------------------------------------
2097 \fn sme_RoamGetNumBKIDCache
2098 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2099 number of BKID cache entries.
2100 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2101 it is opened (by calling halOpen).
2102 \return tANI_U32 - the number of BKID cache entries.
2103 ---------------------------------------------------------------------------*/
2104tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2105
2106/* ---------------------------------------------------------------------------
2107 \fn sme_ScanGetBKIDCandidateList
2108 \brief a wrapper function to return the BKID candidate list
2109 \param pBkidList - caller allocated buffer point to an array of
2110 tBkidCandidateInfo
2111 \param pNumItems - pointer to a variable that has the number of
2112 tBkidCandidateInfo allocated when retruning, this is
2113 either the number needed or number of items put into
2114 pPmkidList
2115 \return eHalStatus - when fail, it usually means the buffer allocated is not
2116 big enough and pNumItems
2117 has the number of tBkidCandidateInfo.
2118 \Note: pNumItems is a number of tBkidCandidateInfo,
2119 not sizeof(tBkidCandidateInfo) * something
2120 ---------------------------------------------------------------------------*/
2121eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2122 tBkidCandidateInfo *pBkidList,
2123 tANI_U32 *pNumItems );
2124#endif /* FEATURE_WLAN_WAPI */
2125
Jeff Johnsone7245742012-09-05 17:12:55 -07002126#ifdef FEATURE_OEM_DATA_SUPPORT
2127/********************************************************************************************
2128 Oem data related modifications
2129*********************************************************************************************/
2130/* ---------------------------------------------------------------------------
2131 \fn sme_OemDataReq
2132 \param sessionId - session id of session to be used for oem data req.
2133 \param pOemDataReqID - pointer to an object to get back the request ID
2134 \param callback - a callback function that is called upon finish
2135 \param pContext - a pointer passed in for the callback
2136 \return eHalStatus
2137 ---------------------------------------------------------------------------*/
2138eHalStatus sme_OemDataReq(tHalHandle hHal,
2139 tANI_U8 sessionId,
2140 tOemDataReqConfig *,
2141 tANI_U32 *pOemDataReqID,
2142 oemData_OemDataReqCompleteCallback callback,
2143 void *pContext);
2144
2145/* ---------------------------------------------------------------------------
2146 \fn sme_getOemDataRsp
2147 \param pOemDataRsp - A pointer to the response object
2148 \param pOemDataReqID - pointer to an object to get back the request ID
2149 \return eHalStatus
2150 ---------------------------------------------------------------------------*/
2151eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2152 tOemDataRsp **pOemDataRsp);
2153
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +05302154/* ---------------------------------------------------------------------------
2155 \fn sme_OemDataReqNew
2156 \brief a wrapper function for OEM DATA REQ NEW
2157 \param pOemDataReqNewConfig - Data to be passed to FW
2158 ---------------------------------------------------------------------------*/
2159void sme_OemDataReqNew(tHalHandle hHal,
2160 tOemDataReqNewConfig *pOemDataReqNewConfig);
2161
Jeff Johnsone7245742012-09-05 17:12:55 -07002162#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002163
2164
Jeff Johnson295189b2012-06-20 16:38:30 -07002165
2166/* ---------------------------------------------------------------------------
2167
2168 \fn sme_RoamUpdateAPWPSIE
2169
2170 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2171 This is an asynchronous API.
2172
2173 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2174
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002175 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002176
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002177 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002178
2179 -------------------------------------------------------------------------------*/
2180
2181eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2182/* ---------------------------------------------------------------------------
2183
2184 \fn sme_RoamUpdateAPWPARSNIEs
2185
2186 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2187 This is an asynchronous API.
2188
2189 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2190
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002191 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002192
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002193 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002194
2195 -------------------------------------------------------------------------------*/
2196eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2197
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002198/* ---------------------------------------------------------------------------
2199
2200 sme_ChangeMCCBeaconInterval
2201
2202 \brief To update P2P-GO's beacon Interval.
2203
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002204 \return eHalStatus SUCCESS
2205 FAILURE or RESOURCES
2206 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002207 -------------------------------------------------------------------------------*/
2208eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2209
2210
Jeff Johnson295189b2012-06-20 16:38:30 -07002211
2212/* ---------------------------------------------------------------------------
2213 \fn sme_sendBTAmpEvent
2214 \brief API to send the btAMPstate to FW
2215 \param hHal - The handle returned by macOpen.
2216 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002217 \return eHalStatus SUCCESS
2218 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002219
2220--------------------------------------------------------------------------- */
2221
2222eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2223
2224
2225
2226/* ---------------------------------------------------------------------------
2227 \fn sme_SetHostOffload
2228 \brief API to set the host offload feature.
2229 \param hHal - The handle returned by macOpen.
2230 \param pRequest - Pointer to the offload request.
2231 \return eHalStatus
2232 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002233eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2234 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002235
2236/* ---------------------------------------------------------------------------
2237 \fn sme_SetKeepAlive
2238 \brief API to set the Keep Alive feature.
2239 \param hHal - The handle returned by macOpen.
2240 \param pRequest - Pointer to the Keep Alive request.
2241 \return eHalStatus
2242 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002243eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2244 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002245
Jeff Johnson295189b2012-06-20 16:38:30 -07002246/* ----------------------------------------------------------------------------
2247 \fn sme_GetOperationChannel
2248 \brief API to get current channel on which STA is parked
2249 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002250 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002251 \returns eHAL_STATUS_SUCCESS
2252 eHAL_STATUS_FAILURE
2253-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002254eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002255
Abhishek Singh7d624e12015-11-30 14:29:27 +05302256eHalStatus sme_register_mgmt_frame_ind_callback(tHalHandle hHal,
2257 sir_mgmt_frame_ind_callback callback);
2258
Jeff Johnson295189b2012-06-20 16:38:30 -07002259/* ---------------------------------------------------------------------------
2260
2261 \fn sme_RegisterMgtFrame
2262
2263 \brief To register managment frame of specified type and subtype.
2264 \param frameType - type of the frame that needs to be passed to HDD.
2265 \param matchData - data which needs to be matched before passing frame
2266 to HDD.
2267 \param matchDataLen - Length of matched data.
2268 \return eHalStatus
2269 -------------------------------------------------------------------------------*/
2270eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2271 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2272
2273/* ---------------------------------------------------------------------------
2274
2275 \fn sme_DeregisterMgtFrame
2276
2277 \brief To De-register managment frame of specified type and subtype.
2278 \param frameType - type of the frame that needs to be passed to HDD.
2279 \param matchData - data which needs to be matched before passing frame
2280 to HDD.
2281 \param matchDataLen - Length of matched data.
2282 \return eHalStatus
2283 -------------------------------------------------------------------------------*/
2284eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2285 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302286/* ---------------------------------------------------------------------------
2287 \fn sme_GetFramesLog
2288 \brief a wrapper function that client calls to register a callback to get
2289 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302290 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302291 \return eHalStatus
2292 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302293eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002294/* ---------------------------------------------------------------------------
2295
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302296 \fn sme_InitMgmtFrameLogging
2297
2298 \brief
2299 SME will pass this request to lower mac to initialize Frame Logging.
2300
2301 \param
2302
2303 hHal - The handle returned by macOpen.
2304
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302305 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302306
2307 \return eHalStatus
2308--------------------------------------------------------------------------- */
2309eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302310 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302311
Gupta, Kapil7c34b322015-09-30 13:12:35 +05302312
2313/* ---------------------------------------------------------------------------
2314
2315 \fn sme_StopRssiMonitoring
2316
2317 \brief
2318 SME will pass this request to lower mac to stop monitoring rssi range on
2319 a bssid.
2320
2321 \param
2322
2323 hHal - The handle returned by macOpen.
2324
2325 tSirRssiMonitorReq req- depict the monitor req params.
2326
2327 \return eHalStatus
2328
2329--------------------------------------------------------------------------- */
2330eHalStatus sme_StopRssiMonitoring(tHalHandle hHal,
2331 tSirRssiMonitorReq *req);
2332
2333/* ---------------------------------------------------------------------------
2334
2335 \fn sme_StartRssiMonitoring
2336
2337 \brief
2338 SME will pass this request to lower mac to start monitoring rssi range on
2339 a bssid.
2340
2341 \param
2342
2343 hHal - The handle returned by macOpen.
2344
2345 tSirRssiMonitorReq req- depict the monitor req params.
2346
2347 \return eHalStatus
2348
2349--------------------------------------------------------------------------- */
2350eHalStatus sme_StartRssiMonitoring(tHalHandle hHal,
2351 tSirRssiMonitorReq *req);
2352
2353
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302354/* ---------------------------------------------------------------------------
2355
Jeff Johnson295189b2012-06-20 16:38:30 -07002356 \fn sme_ConfigureRxpFilter
2357
2358 \brief
2359 SME will pass this request to lower mac to set/reset the filter on RXP for
2360 multicast & broadcast traffic.
2361
2362 \param
2363
2364 hHal - The handle returned by macOpen.
2365
2366 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2367 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2368 on this param. In future we can use this as a mask to set various types of
2369 filters as suggested below:
2370 FILTER_ALL_MULTICAST:
2371 FILTER_ALL_BROADCAST:
2372 FILTER_ALL_MULTICAST_BROADCAST:
2373
2374
2375 \return eHalStatus
2376
2377
2378--------------------------------------------------------------------------- */
2379eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2380 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2381
2382/* ---------------------------------------------------------------------------
2383
2384 \fn sme_ConfigureAppsCpuWakeupState
2385
2386 \brief
2387 SME will pass this request to lower mac to dynamically adjusts the listen
2388 interval based on the WLAN/MSM activity. This feature is named as
2389 Telescopic Beacon wakeup feature.
2390
2391 \param
2392
2393 hHal - The handle returned by macOpen.
2394
2395 isAppsAwake- Depicts the state of the Apps CPU
2396
2397
2398 \return eHalStatus
2399
2400
2401--------------------------------------------------------------------------- */
2402eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2403
Jeff Johnson295189b2012-06-20 16:38:30 -07002404/* ---------------------------------------------------------------------------
2405
2406 \fn sme_ConfigureSuspendInd
2407
2408 \brief
2409 SME will pass this request to lower mac to Indicate that the wlan needs to
2410 be suspended
2411
2412 \param
2413
2414 hHal - The handle returned by macOpen.
2415
2416 wlanSuspendParam- Depicts the wlan suspend params
2417
2418
2419 \return eHalStatus
2420
2421
2422--------------------------------------------------------------------------- */
2423eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2424 tpSirWlanSuspendParam wlanSuspendParam);
2425
2426/* ---------------------------------------------------------------------------
2427
2428 \fn sme_ConfigureResumeReq
2429
2430 \brief
2431 SME will pass this request to lower mac to Indicate that the wlan needs to
2432 be Resumed
2433
2434 \param
2435
2436 hHal - The handle returned by macOpen.
2437
2438 wlanResumeParam- Depicts the wlan resume params
2439
2440
2441 \return eHalStatus
2442
2443
2444--------------------------------------------------------------------------- */
2445eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2446 tpSirWlanResumeParam wlanResumeParam);
2447
Jeff Johnson295189b2012-06-20 16:38:30 -07002448
2449/* ---------------------------------------------------------------------------
2450
2451 \fn sme_GetInfraSessionId
2452
2453 \brief To get the session ID for infra session, if connected
2454 This is a synchronous API.
2455
2456 \param hHal - The handle returned by macOpen.
2457
2458 \return sessionid, -1 if infra session is not connected
2459
2460 -------------------------------------------------------------------------------*/
2461tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2462
2463/* ---------------------------------------------------------------------------
2464
2465 \fn sme_GetInfraOperationChannel
2466
2467 \brief To get the operating channel for infra session, if connected
2468 This is a synchronous API.
2469
2470 \param hHal - The handle returned by macOpen.
2471 \param sessionId - the sessionId returned by sme_OpenSession.
2472
2473 \return operating channel, 0 if infra session is not connected
2474
2475 -------------------------------------------------------------------------------*/
2476tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2477/* ---------------------------------------------------------------------------
2478
2479 \fn sme_GetConcurrentOperationChannel
2480
2481 \brief To get the operating channel for other concurrent sessions, if connected
2482 This is a synchronous API.
2483
2484 \param hHal - The handle returned by macOpen.
2485 \param currentPersona - persona that is trying to come up.
2486
2487 \return operating channel, 0 if infra session is not connected
2488
2489 -------------------------------------------------------------------------------*/
2490tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2491
2492/* ---------------------------------------------------------------------------
2493 \fn sme_AbortMacScan
2494 \brief API to cancel MAC scan.
2495 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302496 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302497 \return tSirAbortScanStatus return status abort scan
2498
Jeff Johnson295189b2012-06-20 16:38:30 -07002499 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302500tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2501 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002502
2503/* ---------------------------------------------------------------------------
2504 \fn sme_GetCfgValidChannels
2505 \brief API to get valid channel list
2506 \param hHal - The handle returned by macOpen.
2507 \param aValidChannels - Pointer to the valid channel list
2508 \param len - valid channel list length
2509 \return eHalStatus
2510 ---------------------------------------------------------------------------*/
2511eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2512
2513#ifdef FEATURE_WLAN_SCAN_PNO
2514
2515/* ---------------------------------------------------------------------------
2516 \fn sme_SetPreferredNetworkList
2517 \brief API to set the Preferred Network List Offload feature.
2518 \param hHal - The handle returned by macOpen.
2519 \param pRequest - Pointer to the offload request.
2520 \return eHalStatus
2521 ---------------------------------------------------------------------------*/
2522eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2523
2524/* ---------------------------------------------------------------------------
2525 \fn sme_SetRSSIFilter
2526 \brief API to set RSSI Filter feature.
2527 \param hHal - The handle returned by macOpen.
2528 \param pRequest - Pointer to the offload request.
2529 \return eHalStatus
2530 ---------------------------------------------------------------------------*/
2531eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2532
2533/******************************************************************************
2534*
2535* Name: sme_PreferredNetworkFoundInd
2536*
2537* Description:
2538* Invoke Preferred Network Found Indication
2539*
2540* Parameters:
2541* hHal - HAL handle for device
2542* pMsg - found network description
2543*
2544* Returns: eHalStatus
2545*
2546******************************************************************************/
2547eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2548#endif // FEATURE_WLAN_SCAN_PNO
2549
2550/* ---------------------------------------------------------------------------
2551 \fn sme_SetPowerParams
2552 \brief API to set Power Parameters
2553 \param hHal - The handle returned by macOpen.
2554 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002555 \param forced - if true, not to be dropped silently in host, it must reach
2556 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2557 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002558 \return eHalStatus
2559 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002560eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002561
2562/* ---------------------------------------------------------------------------
2563 \fn sme_SetTxPerTracking
2564 \brief Set Tx PER tracking configuration parameters
2565 \param hHal - The handle returned by macOpen.
2566 \param pTxPerTrackingParam - Tx PER configuration parameters
2567 \return eHalStatus
2568 ---------------------------------------------------------------------------*/
2569eHalStatus sme_SetTxPerTracking (
2570 tHalHandle hHal,
2571 void (*pCallbackfn) (void *pCallbackContext),
2572 void *pCallbackContext,
2573 tpSirTxPerTrackingParam pTxPerTrackingParam);
2574
2575#ifdef WLAN_FEATURE_PACKET_FILTERING
2576/* ---------------------------------------------------------------------------
2577 \fn sme_ReceiveFilterSetFilter
2578 \brief API to set 8023 Multicast Address List
2579 \param hHal - The handle returned by macOpen.
2580 \param pMulticastAddrs - Pointer to the Multicast Address List
2581 \return eHalStatus
2582 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002583eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002584
2585/* ---------------------------------------------------------------------------
2586 \fn sme_ReceiveFilterSetFilter
2587 \brief API to set Receive Packet Filter
2588 \param hHal - The handle returned by macOpen.
2589 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2590 \return eHalStatus
2591 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002592eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2593 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002594
2595/* ---------------------------------------------------------------------------
2596 \fn sme_GetFilterMatchCount
2597 \brief API to get D0 PC Filter Match Count
2598 \param hHal - The handle returned by macOpen
2599 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2600 \param callbackContext - Cookie to be passed back during callback
2601 \return eHalStatus
2602 ---------------------------------------------------------------------------*/
2603eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2604 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002605 void *callbackContext,
2606 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002607
2608/* ---------------------------------------------------------------------------
2609 \fn sme_ReceiveFilterClearFilter
2610 \brief API to clear Receive Packet Filter
2611 \param hHal - The handle returned by macOpen.
2612 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2613 \return eHalStatus
2614 ---------------------------------------------------------------------------*/
2615eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002616 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2617 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002618#endif // WLAN_FEATURE_PACKET_FILTERING
2619/* ---------------------------------------------------------------------------
2620
2621 \fn sme_IsChannelValid
2622 \brief To check if the channel is valid for currently established domain
2623 This is a synchronous API.
2624
2625 \param hHal - The handle returned by macOpen.
2626 \param channel - channel to verify
2627
2628 \return TRUE/FALSE, TRUE if channel is valid
2629
2630 -------------------------------------------------------------------------------*/
2631tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2632
2633/* ---------------------------------------------------------------------------
2634 \fn sme_SetFreqBand
2635 \brief Used to set frequency band.
2636 \param hHal
2637 \eBand band value to be configured
2638 \- return eHalStatus
2639 -------------------------------------------------------------------------*/
2640eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2641
2642/* ---------------------------------------------------------------------------
2643 \fn sme_GetFreqBand
2644 \brief Used to get the current band settings.
2645 \param hHal
2646 \pBand pointer to hold the current band value
2647 \- return eHalStatus
2648 -------------------------------------------------------------------------*/
2649eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2650
2651/* ---------------------------------------------------------------------------
2652
2653 \fn sme_SetTxPerTracking
2654 \brief Set Tx PER tracking configuration parameters
2655 \param hHal - The handle returned by macOpen.
2656 \param pTxPerTrackingParam - Tx PER configuration parameters
2657 \return eHalStatus
2658 ---------------------------------------------------------------------------*/
2659eHalStatus sme_SetTxPerTracking (
2660 tHalHandle hHal,
2661 void (*pCallbackfn) (void *pCallbackContext),
2662 void *pCallbackContext,
2663 tpSirTxPerTrackingParam pTxPerTrackingParam);
2664
2665#ifdef WLAN_FEATURE_GTK_OFFLOAD
2666/* ---------------------------------------------------------------------------
2667 \fn sme_SetGTKOffload
2668 \brief API to set GTK offload feature.
2669 \param hHal - The handle returned by macOpen.
2670 \param pRequest - Pointer to the GTK offload request.
2671 \return eHalStatus
2672 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002673eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002674
2675/* ---------------------------------------------------------------------------
2676 \fn sme_GetGTKOffload
2677 \brief API to get GTK offload information.
2678 \param hHal - The handle returned by macOpen.
2679 \param pRequest - Pointer to the GTK offload response.
2680 \return eHalStatus
2681 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002682eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2683 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002684#endif // WLAN_FEATURE_GTK_OFFLOAD
2685
2686#ifdef WLAN_WAKEUP_EVENTS
2687eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2688#endif // WLAN_WAKEUP_EVENTS
2689
2690/* ---------------------------------------------------------------------------
2691 \fn sme_SetTxPerTracking
2692 \brief Set Tx PER tracking configuration parameters
2693 \param hHal - The handle returned by macOpen.
2694 \param pTxPerTrackingParam - Tx PER configuration parameters
2695 \return eHalStatus
2696 ---------------------------------------------------------------------------*/
2697eHalStatus sme_SetTxPerTracking (
2698 tHalHandle hHal,
2699 void (*pCallbackfn) (void *pCallbackContext),
2700 void *pCallbackContext,
2701 tpSirTxPerTrackingParam pTxPerTrackingParam);
2702
2703
2704//return frequency for a particular channel
2705tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2706
2707tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2708
2709#if defined WLAN_FEATURE_P2P_INTERNAL
2710
2711eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2712
2713/* ---------------------------------------------------------------------------
2714 \fn sme_p2pFlushDeviceList
2715 \brief Remove cached P2P result from scan results
2716 \param hHal - The handle returned by macOpen.
2717 \param HDDSessionId - HDD's sessionId. Currently unused.
2718 \return eHalStatus
2719 ---------------------------------------------------------------------------*/
2720eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2721
2722eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2723 tCsrScanResultFilter *pFilter);
2724
2725#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2726
2727/* ---------------------------------------------------------------------------
2728 \fn sme_SetMaxTxPower
2729 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2730 setting will not persist over reboots
2731 \param hHal
2732 \param pBssid BSSID to set the power cap for
2733 \param pBssid pSelfMacAddress self MAC Address
2734 \param pBssid power to set in dB
2735 \- return eHalStatus
2736 -------------------------------------------------------------------------*/
2737eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2738 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2739
Padma, Santhosh Kumar98b5d252016-10-17 17:30:41 +05302740/**
2741 * sme_SetMaxTxPowerPerBand() - Set the Maximum Transmit Power
2742 * specific to band dynamically
2743 * @band: Band for which power needs to be applied
2744 * @dB: power to set in dB
2745 * @hal: HAL handle
2746 *
2747 * Set the maximum transmit power dynamically per band
2748 *
2749 * Return: eHalStatus
2750 */
2751eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t dB,
2752 tHalHandle hal);
Arif Hussaina5ebce02013-08-09 15:09:58 -07002753
2754/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002755
schang86c22c42013-03-13 18:41:24 -07002756 \fn sme_SetTxPower
2757
2758 \brief Set Transmit Power dynamically. Note: this setting will
2759 not persist over reboots.
2760
2761 \param hHal
2762 \param sessionId Target Session ID
2763 \param mW power to set in mW
2764 \- return eHalStatus
2765
2766 -------------------------------------------------------------------------------*/
2767eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2768
2769/* ---------------------------------------------------------------------------
2770
Jeff Johnson295189b2012-06-20 16:38:30 -07002771 \fn sme_HideSSID
2772
2773 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2774 not persist over reboots.
2775
2776 \param hHal
2777 \param sessionId
2778 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2779 \- return eHalStatus
2780
2781 -------------------------------------------------------------------------------*/
2782eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002783
2784/* ---------------------------------------------------------------------------
2785
2786 \fn sme_SetTmLevel
2787 \brief Set Thermal Mitigation Level to RIVA
2788 \param hHal - The handle returned by macOpen.
2789 \param newTMLevel - new Thermal Mitigation Level
2790 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002791 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002792 ---------------------------------------------------------------------------*/
2793eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2794
2795/*---------------------------------------------------------------------------
2796
2797 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2798 Host and FW.
2799
2800 \param hHal - HAL handle for device
2801
2802 \return NONE
2803
2804---------------------------------------------------------------------------*/
2805void sme_featureCapsExchange(tHalHandle hHal);
2806
Jeff Johnsond13512a2012-07-17 11:42:19 -07002807/*---------------------------------------------------------------------------
2808
Yathish9f22e662012-12-10 14:21:35 -08002809 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2810 between in Host.
2811
2812 \param hHal - HAL handle for device
2813
2814 \return NONE
2815
2816---------------------------------------------------------------------------*/
2817void sme_disableFeatureCapablity(tANI_U8 feature_index);
2818
2819/*---------------------------------------------------------------------------
2820
Jeff Johnsond13512a2012-07-17 11:42:19 -07002821 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2822 country code
2823 Host and FW.
2824
2825 \param hHal - HAL handle for device
2826 \param pCountry - pointer to country code
2827
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002828 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002829
2830 ---------------------------------------------------------------------------*/
2831eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2832
2833/*---------------------------------------------------------------------------
2834
2835 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2836 country code.
2837
2838 \param hHal - HAL handle for device
2839 \param pCountry - pointer to country code
2840
2841 \return Success or failure
2842
2843 ---------------------------------------------------------------------------*/
2844eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2845
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002846/* ---------------------------------------------------------------------------
2847 \fn sme_transportDebug
2848 \brief Dynamically monitoring Transport channels
2849 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002850 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002851 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002852 \param toggleStallDetect Enable stall detect feature
2853 This feature will take effect to data performance
2854 Not integrate till fully verification
2855 \- return NONE
2856 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002857void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002858
Kiran4a17ebe2013-01-31 10:43:43 -08002859/* ---------------------------------------------------------------------------
2860 \fn sme_ResetPowerValuesFor5G
2861 \brief Reset the power values for 5G band with NV power values.
2862 \param hHal - HAL handle for device
2863 \- return NONE
2864 -------------------------------------------------------------------------*/
2865void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2866
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002867#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002868/* ---------------------------------------------------------------------------
2869 \fn sme_UpdateRoamPrefer5GHz
2870 \brief enable/disable Roam prefer 5G runtime option
2871 This function is called through dynamic setConfig callback function
2872 to configure the Roam prefer 5G runtime option
2873 \param hHal - HAL handle for device
2874 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2875 \- return Success or failure
2876 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002877eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002878
2879/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002880 \fn sme_setRoamIntraBand
2881 \brief enable/disable Intra band roaming
2882 This function is called through dynamic setConfig callback function
2883 to configure the intra band roaming
2884 \param hHal - HAL handle for device
2885 \param nRoamIntraBand Enable/Disable Intra band roaming
2886 \- return Success or failure
2887 -------------------------------------------------------------------------*/
2888eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2889
2890/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002891 \fn sme_UpdateRoamScanNProbes
2892 \brief function to update roam scan N probes
2893 This function is called through dynamic setConfig callback function
2894 to update roam scan N probes
2895 \param hHal - HAL handle for device
2896 \param nProbes number of probe requests to be sent out
2897 \- return Success or failure
2898 -------------------------------------------------------------------------*/
2899eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2900
2901/* ---------------------------------------------------------------------------
2902 \fn sme_UpdateRoamScanHomeAwayTime
2903 \brief function to update roam scan Home away time
2904 This function is called through dynamic setConfig callback function
2905 to update roam scan home away time
2906 \param hHal - HAL handle for device
2907 \param nRoamScanAwayTime Scan home away time
2908 \- return Success or failure
2909 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002910eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2911 const v_U16_t nRoamScanHomeAwayTime,
2912 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002913
2914/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002915 \fn sme_getRoamIntraBand
2916 \brief get Intra band roaming
2917 \param hHal - HAL handle for device
2918 \- return Success or failure
2919 -------------------------------------------------------------------------*/
2920v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2921
2922/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002923 \fn sme_getRoamScanNProbes
2924 \brief get N Probes
2925 \param hHal - HAL handle for device
2926 \- return Success or failure
2927 -------------------------------------------------------------------------*/
2928v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2929
2930/* ---------------------------------------------------------------------------
2931 \fn sme_getRoamScanHomeAwayTime
2932 \brief get Roam scan home away time
2933 \param hHal - HAL handle for device
2934 \- return Success or failure
2935 -------------------------------------------------------------------------*/
2936v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2937
2938/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002939 \fn sme_UpdateImmediateRoamRssiDiff
2940 \brief Update nImmediateRoamRssiDiff
2941 This function is called through dynamic setConfig callback function
2942 to configure nImmediateRoamRssiDiff
2943 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2944 \param hHal - HAL handle for device
2945 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2946 candidate and current AP.
2947 \- return Success or failure
2948 -------------------------------------------------------------------------*/
2949
2950eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002951
Srinivas Girigowdade697412013-02-14 16:31:48 -08002952/* ---------------------------------------------------------------------------
2953 \fn sme_UpdateRoamRssiDiff
2954 \brief Update RoamRssiDiff
2955 This function is called through dynamic setConfig callback function
2956 to configure RoamRssiDiff
2957 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2958 \param hHal - HAL handle for device
2959 \param RoamRssiDiff - minimum rssi difference between potential
2960 candidate and current AP.
2961 \- return Success or failure
2962 -------------------------------------------------------------------------*/
2963
2964eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2965
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002966/*--------------------------------------------------------------------------
2967 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2968 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2969 isFastTransitionEnabled.
2970 This is a synchronuous call
2971 \param hHal - The handle returned by macOpen.
2972 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2973 Other status means SME is failed to update isFastTransitionEnabled.
2974 \sa
2975 --------------------------------------------------------------------------*/
2976
2977eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2978 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002979
2980/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002981 \fn sme_UpdateWESMode
2982 \brief Update WESMode
2983 This function is called through dynamic setConfig callback function
2984 to configure isWESModeEnabled
2985 \param hHal - HAL handle for device
2986 \param isWESModeEnabled - Enable/Disable WES Mode
2987 \- return Success or failure
2988 -------------------------------------------------------------------------*/
2989eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2990
2991/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002992 \fn sme_SetRoamScanControl
2993 \brief Set roam scan control
2994 This function is called to set roam scan control
2995 if roam scan control is set to 0, roaming scan cache is cleared
2996 any value other than 0 is treated as invalid value
2997 \param hHal - HAL handle for device
2998 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2999 Other status means SME failure to update
3000 -------------------------------------------------------------------------*/
3001eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003002#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003003
3004#ifdef FEATURE_WLAN_LFR
3005/*--------------------------------------------------------------------------
3006 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08003007 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003008 isFastRoamIniFeatureEnabled.
3009 This is a synchronuous call
3010 \param hHal - The handle returned by macOpen.
3011 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
3012 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
3013 \sa
3014 --------------------------------------------------------------------------*/
3015
Srinivas Girigowdade697412013-02-14 16:31:48 -08003016eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003017 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003018
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003019/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05303020 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
3021 When Supplicant issue enabled / disable fwr based roaming on the basis
3022 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
3023
3024 This is a synchronous call
3025 \param hHal - The handle returned by macOpen.
3026 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
3027 Other status means SME is failed to (enabled/disabled) offload scan.
3028 \sa
3029 --------------------------------------------------------------------------*/
3030
3031eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
3032 const v_BOOL_t isFastRoamEnabled);
3033
3034/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003035 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
3036 Enable/disable LFR MAWC support at runtime
3037 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3038 isMAWCIniFeatureEnabled.
3039 This is a synchronous call
3040 \param hHal - The handle returned by macOpen.
3041 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
3042 Other status means SME is failed to update MAWCEnabled.
3043 \sa
3044 --------------------------------------------------------------------------*/
3045eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
3046 const v_BOOL_t MAWCEnabled);
3047
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003048
3049#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3050/*--------------------------------------------------------------------------
3051 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
3052 This is a synchronuous call
3053 \param hHal - The handle returned by macOpen.
3054 \return eHAL_STATUS_SUCCESS
3055 Other status means SME is failed
3056 \sa
3057 --------------------------------------------------------------------------*/
3058
3059eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
3060 v_BOOL_t bFastRoamInConIniFeatureEnabled);
3061#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003062#endif /* FEATURE_WLAN_LFR */
3063
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003064#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003065/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003066 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003067 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003068 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003069 This is a synchronuous call
3070 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003071 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
3072 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003073 \sa
3074 --------------------------------------------------------------------------*/
3075
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003076eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
3077 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003078
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003079#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003080
3081/*--------------------------------------------------------------------------
3082 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
3083 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3084 fEnableFwRssiMonitoring.
3085 This is a synchronuous call
3086 \param hHal - The handle returned by macOpen.
3087 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
3088 Other status means SME is failed to update
3089 \sa
3090 --------------------------------------------------------------------------*/
3091
3092eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
3093 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08003094
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003095#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08003096/*--------------------------------------------------------------------------
3097 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
3098 This is a synchronuous call
3099 \param hHal - The handle returned by macOpen.
3100 \return eHAL_STATUS_SUCCESS - SME update config successful.
3101 Other status means SME is failed to update
3102 \sa
3103 --------------------------------------------------------------------------*/
3104eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
3105 v_U8_t neighborLookupRssiThreshold);
3106
3107/*--------------------------------------------------------------------------
3108 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
3109 This is a synchronuous call
3110 \param hHal - The handle returned by macOpen.
3111 \return eHAL_STATUS_SUCCESS - SME update config successful.
3112 Other status means SME is failed to update
3113 \sa
3114 --------------------------------------------------------------------------*/
3115eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
3116 v_U8_t neighborReassocRssiThreshold);
3117
3118/*--------------------------------------------------------------------------
3119 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
3120 This is a synchronuous call
3121 \param hHal - The handle returned by macOpen.
3122 \return eHAL_STATUS_SUCCESS - SME update config successful.
3123 Other status means SME is failed to update
3124 \sa
3125 --------------------------------------------------------------------------*/
3126v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
3127
3128/*--------------------------------------------------------------------------
3129 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
3130 This is a synchronuous call
3131 \param hHal - The handle returned by macOpen.
3132 \return eHAL_STATUS_SUCCESS - SME update config successful.
3133 Other status means SME is failed to update
3134 \sa
3135 --------------------------------------------------------------------------*/
3136eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
3137 v_U16_t neighborScanResultsRefreshPeriod);
3138
3139/*--------------------------------------------------------------------------
3140 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
3141 This is a synchronuous call
3142 \param hHal - The handle returned by macOpen.
3143 \return eHAL_STATUS_SUCCESS - SME update config successful.
3144 Other status means SME is failed to update
3145 \sa
3146 --------------------------------------------------------------------------*/
3147v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
3148
3149/*--------------------------------------------------------------------------
3150 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3151 This is a synchronuous call
3152 \param hHal - The handle returned by macOpen.
3153 \return eHAL_STATUS_SUCCESS - SME update config successful.
3154 Other status means SME is failed to update
3155 \sa
3156 --------------------------------------------------------------------------*/
3157v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3158
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003159/* ---------------------------------------------------------------------------
3160 \fn sme_UpdateEmptyScanRefreshPeriod
3161 \brief Update nEmptyScanRefreshPeriod
3162 This function is called through dynamic setConfig callback function
3163 to configure nEmptyScanRefreshPeriod
3164 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3165 \param hHal - HAL handle for device
3166 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3167 \- return Success or failure
3168 -------------------------------------------------------------------------*/
3169eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3170
3171/* ---------------------------------------------------------------------------
3172 \fn sme_setNeighborScanMinChanTime
3173 \brief Update nNeighborScanMinChanTime
3174 This function is called through dynamic setConfig callback function
3175 to configure gNeighborScanChannelMinTime
3176 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3177 \param hHal - HAL handle for device
3178 \param nNeighborScanMinChanTime - Channel minimum dwell time
3179 \- return Success or failure
3180 -------------------------------------------------------------------------*/
3181eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3182
3183/* ---------------------------------------------------------------------------
3184 \fn sme_setNeighborScanMaxChanTime
3185 \brief Update nNeighborScanMaxChanTime
3186 This function is called through dynamic setConfig callback function
3187 to configure gNeighborScanChannelMaxTime
3188 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3189 \param hHal - HAL handle for device
3190 \param nNeighborScanMinChanTime - Channel maximum dwell time
3191 \- return Success or failure
3192 -------------------------------------------------------------------------*/
3193eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3194
3195/* ---------------------------------------------------------------------------
3196 \fn sme_getNeighborScanMinChanTime
3197 \brief get neighbor scan min channel time
3198 \param hHal - The handle returned by macOpen.
3199 \return v_U16_t - channel min time value
3200 -------------------------------------------------------------------------*/
3201v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3202
3203/* ---------------------------------------------------------------------------
3204 \fn sme_getNeighborScanMaxChanTime
3205 \brief get neighbor scan max channel time
3206 \param hHal - The handle returned by macOpen.
3207 \return v_U16_t - channel max time value
3208 -------------------------------------------------------------------------*/
3209v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3210
3211/* ---------------------------------------------------------------------------
3212 \fn sme_setNeighborScanPeriod
3213 \brief Update nNeighborScanPeriod
3214 This function is called through dynamic setConfig callback function
3215 to configure nNeighborScanPeriod
3216 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3217 \param hHal - HAL handle for device
3218 \param nNeighborScanPeriod - neighbor scan period
3219 \- return Success or failure
3220 -------------------------------------------------------------------------*/
3221eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3222
3223/* ---------------------------------------------------------------------------
3224 \fn sme_getNeighborScanPeriod
3225 \brief get neighbor scan period
3226 \param hHal - The handle returned by macOpen.
3227 \return v_U16_t - neighbor scan period
3228 -------------------------------------------------------------------------*/
3229v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3230
3231#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003232
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003233#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003234/*--------------------------------------------------------------------------
3235 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3236 This is a synchronuous call
3237 \param hHal - The handle returned by macOpen.
3238 \return eHAL_STATUS_SUCCESS - SME update config successful.
3239 Other status means SME is failed to update
3240 \sa
3241 --------------------------------------------------------------------------*/
3242v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3243
3244/*--------------------------------------------------------------------------
3245 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3246 This is a synchronuous call
3247 \param hHal - The handle returned by macOpen.
3248 \return eHAL_STATUS_SUCCESS - SME update config successful.
3249 Other status means SME is failed to update
3250 \sa
3251 --------------------------------------------------------------------------*/
3252eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3253 tANI_U8 numChannels);
3254
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003255#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003256/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003257 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003258 This is a synchronuous call
3259 \param hHal - The handle returned by macOpen.
3260 \return eHAL_STATUS_SUCCESS - SME update config successful.
3261 Other status means SME is failed to update
3262 \sa
3263 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003264eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003265 tANI_U8 *pChannelList,
3266 tANI_U8 numChannels);
3267#endif
3268
Srinivas Girigowdade697412013-02-14 16:31:48 -08003269/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003270 \brief sme_getRoamScanChannelList() - get roam scan channel list
3271 This is a synchronuous call
3272 \param hHal - The handle returned by macOpen.
3273 \return eHAL_STATUS_SUCCESS - SME update config successful.
3274 Other status means SME is failed to update
3275 \sa
3276 --------------------------------------------------------------------------*/
3277eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3278 tANI_U8 *pNumChannels);
3279
3280/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003281 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003282 This is a synchronuous call
3283 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003284 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003285 FALSE (0) - if feature is disabled (compile or runtime)
3286 \sa
3287 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003288tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003289
3290/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003291 \brief sme_getWESMode() - getWES Mode
3292 This is a synchronous call
3293 \param hHal - The handle returned by macOpen.
3294 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3295 \sa
3296 --------------------------------------------------------------------------*/
3297v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3298
3299/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003300 \brief sme_GetRoamScanControl() - get scan control
3301 This is a synchronous call
3302 \param hHal - The handle returned by macOpen.
3303 \return v_BOOL_t - Enabled(1)/Disabled(0)
3304 \sa
3305 --------------------------------------------------------------------------*/
3306v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3307
3308/* ---------------------------------------------------------------------------
3309 \fn sme_UpdateEmptyScanRefreshPeriod
3310 \brief Update nnEmptyScanRefreshPeriod
3311 This function is called through dynamic setConfig callback function
3312 to configure nnEmptyScanRefreshPeriod
3313 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3314 \param hHal - HAL handle for device
3315 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3316 \- return Success or failure
3317 -------------------------------------------------------------------------*/
3318
3319/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003320 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3321 This is a synchronuous call
3322 \param hHal - The handle returned by macOpen.
3323 \return TRUE (1) - if the feature is enabled
3324 FALSE (0) - if feature is disabled (compile or runtime)
3325 \sa
3326 --------------------------------------------------------------------------*/
3327tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3328
3329/*--------------------------------------------------------------------------
3330 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3331 This is a synchronuous call
3332 \param hHal - The handle returned by macOpen.
3333 \return TRUE (1) - if the feature is enabled
3334 FALSE (0) - if feature is disabled (compile or runtime)
3335 \sa
3336 --------------------------------------------------------------------------*/
3337tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3338
Srinivas Girigowdade697412013-02-14 16:31:48 -08003339#endif
3340
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003341#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3342/*--------------------------------------------------------------------------
3343 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3344 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3345 gRoamScanOffloadEnabled.
3346 This is a synchronous call
3347 \param hHal - The handle returned by macOpen.
3348 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3349 Other status means SME is failed to update.
3350 \sa
3351 --------------------------------------------------------------------------*/
3352
3353eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3354#endif
3355
c_manjeecfd1efb2015-09-25 19:32:34 +05303356eHalStatus sme_FwMemDumpReq(tHalHandle hHal, tAniFwrDumpReq *recv_req);
3357
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003358
Srinivas Girigowdade697412013-02-14 16:31:48 -08003359/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003360 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303361 \brief Check if a feature is enabled by FW
3362
3363 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003364 A value from enum placeHolderInCapBitmap
3365
3366 \- return 1/0 (TRUE/FALSE)
3367 -------------------------------------------------------------------------*/
3368tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303369
3370/* ---------------------------------------------------------------------------
3371 \fn sme_IsFeatureSupportedByDriver
3372 \brief Check if a feature is enabled by driver
3373
3374 \param featEnumValue - Enumeration value of the feature to be checked.
3375 A value from enum placeHolderInCapBitmap
3376
3377 \- return 1/0 (TRUE/FALSE)
3378 -------------------------------------------------------------------------*/
3379tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3380
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003381#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303382
3383/* ---------------------------------------------------------------------------
3384 \fn sme_SendTdlsLinkEstablishParams
3385 \brief API to send TDLS Link Establishment Parameters.
3386
3387 \param peerMac - peer's Mac Adress.
3388 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3389 \- return VOS_STATUS_SUCCES
3390 -------------------------------------------------------------------------*/
3391
3392VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303393 tANI_U8 sessionId,
3394#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3395 const tSirMacAddr peerMac,
3396#else
3397 tSirMacAddr peerMac,
3398#endif
3399 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303400
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003401/* ---------------------------------------------------------------------------
3402 \fn sme_SendTdlsMgmtFrame
3403 \brief API to send TDLS management frames.
3404
3405 \param peerMac - peer's Mac Adress.
3406 \param frame_type - Type of TDLS mgmt frame to be sent.
3407 \param dialog - dialog token used in the frame.
3408 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303409 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003410 \param buf - additional IEs to be included
3411 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003412 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003413 \- return VOS_STATUS_SUCCES
3414 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303415VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3416#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3417 const tSirMacAddr peerMac,
3418#else
3419 tSirMacAddr peerMac,
3420#endif
3421 tANI_U8 frame_type, tANI_U8 dialog,
3422 tANI_U16 status, tANI_U32 peerCapability,
3423 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003424/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003425 \fn sme_ChangeTdlsPeerSta
3426 \brief API to Update TDLS peer sta parameters.
3427
3428 \param peerMac - peer's Mac Adress.
3429 \param staParams - Peer Station Parameters.
3430 \- return VOS_STATUS_SUCCES
3431 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303432VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3433#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3434 const tSirMacAddr peerMac,
3435#else
3436 tSirMacAddr peerMac,
3437#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003438 tCsrStaParams *pstaParams);
3439/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003440 \fn sme_AddTdlsPeerSta
3441 \brief API to Add TDLS peer sta entry.
3442
3443 \param peerMac - peer's Mac Adress.
3444 \- return VOS_STATUS_SUCCES
3445 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303446VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3447#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3448 const tSirMacAddr peerMac
3449#else
3450 tSirMacAddr peerMac
3451#endif
3452 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003453/* ---------------------------------------------------------------------------
3454 \fn sme_DeleteTdlsPeerSta
3455 \brief API to Delete TDLS peer sta entry.
3456
3457 \param peerMac - peer's Mac Adress.
3458 \- return VOS_STATUS_SUCCES
3459 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303460VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3461#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3462 const tSirMacAddr peerMac
3463#else
3464 tSirMacAddr peerMac
3465#endif
3466 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003467/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003468 \fn sme_SetTdlsPowerSaveProhibited
3469 \API to set/reset the isTdlsPowerSaveProhibited.
3470
3471 \- return void
3472 -------------------------------------------------------------------------*/
3473void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003474#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303475/* ---------------------------------------------------------------------------
3476 \fn sme_IsPmcBmps
3477 \brief API to Check if PMC state is BMPS.
3478
3479 \- return v_BOOL_t
3480 -------------------------------------------------------------------------*/
3481v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3482
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003483eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003484
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303485/* ---------------------------------------------------------------------------
3486 \fn sme_UpdateDFSRoamMode
3487 \brief Update DFS roam scan mode
3488 This function is called to configure allowDFSChannelRoam
3489 dynamically
3490 \param hHal - HAL handle for device
3491 \param allowDFSChannelRoam - DFS roaming scan mode
3492 mode 0 disable roam scan on DFS channels
3493 mode 1 enables roam scan (passive/active) on DFS channels
3494 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3495 successfully.
3496 Other status means SME failed to update DFS roaming scan config.
3497 \sa
3498 -------------------------------------------------------------------------*/
3499eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3500
3501/* ---------------------------------------------------------------------------
3502 \fn sme_UpdateDFSScanMode
3503 \brief Update DFS scan mode
3504 This function is called to configure fEnableDFSChnlScan.
3505 \param hHal - HAL handle for device
3506 \param dfsScanMode - DFS scan mode
3507 mode 0 disable scan on DFS channels
3508 mode 1 enables passive scan on DFS channels
3509 mode 2 enables active scan on DFS channels for static list
3510 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3511 successfully.
3512 Other status means SME failed to update DFS scan config.
3513 \sa
3514 -------------------------------------------------------------------------*/
3515eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3516
3517/*--------------------------------------------------------------------------
3518 \brief sme_GetDFSScanMode() - get DFS scan mode
3519 \param hHal - The handle returned by macOpen.
3520 \return DFS scan mode
3521 mode 0 disable scan on DFS channels
3522 mode 1 enables passive scan on DFS channels
3523 mode 2 enables active scan on DFS channels for static list
3524 \sa
3525 --------------------------------------------------------------------------*/
3526v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3527
3528/* ---------------------------------------------------------------------------
3529 \fn sme_HandleDFSChanScan
3530 \brief Gets Valid channel list and updates scan control list according to
3531 dfsScanMode
3532 \param hHal - HAL handle for device
3533 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3534 Otherwise eHAL_STATUS_SUCCESS -
3535 \sa
3536 -------------------------------------------------------------------------*/
3537eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3538
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003539/*
3540 * SME API to enable/disable WLAN driver initiated SSR
3541 */
3542void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3543
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303544/* ---------------------------------------------------------------------------
3545
3546 \fn sme_SetPhyMode
3547
3548 \brief Changes the PhyMode.
3549
3550 \param hHal - The handle returned by macOpen.
3551
3552 \param phyMode new phyMode which is to set
3553
3554 \return eHalStatus SUCCESS.
3555
3556 -------------------------------------------------------------------------------*/
3557eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3558
3559/* ---------------------------------------------------------------------------
3560
3561 \fn sme_GetPhyMode
3562
3563 \brief gets current PhyMode.
3564
3565 \param hHal - The handle returned by macOpen.
3566
3567 \return eHalStatus PhyMode
3568
3569 -------------------------------------------------------------------------------*/
3570eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3571
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003572/*
3573 * SME API to determine the channel bonding mode
3574 */
Abhishek Singh02b823e2017-10-30 17:53:20 +05303575VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
3576 tANI_U8 channel, enum eSirMacHTChannelWidth max_bw);
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003577
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003578#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3579/*--------------------------------------------------------------------------
3580 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3581 from CSR.
3582 This is a synchronous call
3583 \param hHal - The handle returned by macOpen
3584 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3585 BSSID, channel etc.)
3586 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3587 Other status means SME is failed to send the request.
3588 \sa
3589 --------------------------------------------------------------------------*/
3590
3591eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3592#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003593/*--------------------------------------------------------------------------
3594 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3595 is any connected session .
3596 This is a synchronous call
3597 \param hHal - The handle returned by macOpen
3598 \return VOS_STATUS - SME passed the request to CSR successfully.
3599 Other status means SME is failed to send the request.
3600 \sa
3601 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003602VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003603
Agarwal Ashish57e84372014-12-05 18:26:53 +05303604/*--------------------------------------------------------------------------
3605 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3606 is any connected session .
3607 This is a synchronous call
3608 \param hHal - The handle returned by macOpen
3609 \return VOS_STATUS - SME passed the request to CSR successfully.
3610 Other status means SME is failed to send the request.
3611 \sa
3612 --------------------------------------------------------------------------*/
3613VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3614
Leo Chang9056f462013-08-01 19:21:11 -07003615#ifdef FEATURE_WLAN_LPHB
3616/* ---------------------------------------------------------------------------
3617 \fn sme_LPHBConfigReq
3618 \API to make configuration LPHB within FW.
3619 \param hHal - The handle returned by macOpen
3620 \param lphdReq - LPHB request argument by client
3621 \param pCallbackfn - LPHB timeout notification callback function pointer
3622 \- return Configuration message posting status, SUCCESS or Fail
3623 -------------------------------------------------------------------------*/
3624eHalStatus sme_LPHBConfigReq(
3625 tHalHandle hHal,
3626 tSirLPHBReq *lphdReq,
3627 void (*pCallbackfn)(void *pAdapter, void *indParam));
3628#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003629
3630/* ---------------------------------------------------------------------------
3631 \fn sme_AddPeriodicTxPtrn
3632 \brief API to Periodic TX Pattern Offload feature
3633 \param hHal - The handle returned by macOpen
3634 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3635 \return eHalStatus
3636 ---------------------------------------------------------------------------*/
3637eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3638 *addPeriodicTxPtrnParams);
3639
3640/* ---------------------------------------------------------------------------
3641 \fn sme_DelPeriodicTxPtrn
3642 \brief API to Periodic TX Pattern Offload feature
3643 \param hHal - The handle returned by macOpen
3644 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3645 \return eHalStatus
3646 ---------------------------------------------------------------------------*/
3647eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3648 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003649/*--------------------------------------------------------------------------
3650 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3651 scan parameter.
3652 This is a synchronous call
3653 \param hHal - The handle returned by macOpen
3654 \return None.
3655 \sa
3656 --------------------------------------------------------------------------*/
3657void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3658 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303659
Abhishek Singh00b71972016-01-07 10:51:04 +05303660#ifdef WLAN_FEATURE_RMC
3661/* ---------------------------------------------------------------------------
3662 \fn sme_EnableRMC
3663 \brief Used to enable RMC
3664 setting will not persist over reboots
3665 \param hHal
3666 \param sessionId
3667 \- return eHalStatus
3668 -------------------------------------------------------------------------*/
3669eHalStatus sme_EnableRMC(tHalHandle hHal, tANI_U32 sessionId);
3670
3671/* ---------------------------------------------------------------------------
3672 \fn sme_DisableRMC
3673 \brief Used to disable RMC
3674 setting will not persist over reboots
3675 \param hHal
3676 \param sessionId
3677 \- return eHalStatus
3678 -------------------------------------------------------------------------*/
3679eHalStatus sme_DisableRMC(tHalHandle hHal, tANI_U32 sessionId);
3680#endif /* WLAN_FEATURE_RMC */
3681
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003682/* ---------------------------------------------------------------------------
3683 \fn sme_SendRateUpdateInd
3684 \brief API to Update rate
3685 \param hHal - The handle returned by macOpen
3686 \param rateUpdateParams - Pointer to rate update params
3687 \return eHalStatus
3688 ---------------------------------------------------------------------------*/
3689eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3690
Abhishek Singh00b71972016-01-07 10:51:04 +05303691#ifdef WLAN_FEATURE_RMC
3692/* ---------------------------------------------------------------------------
3693 \fn sme_GetIBSSPeerInfo
3694 \brief Used to disable RMC
3695 setting will not persist over reboots
3696 \param hHal
3697 \param ibssPeerInfoReq multicast Group IP address
3698 \- return eHalStatus
3699 -------------------------------------------------------------------------*/
3700eHalStatus sme_RequestIBSSPeerInfo(tHalHandle hHal, void *pUserData,
3701 pIbssPeerInfoCb peerInfoCbk,
3702 tANI_BOOLEAN allPeerInfoReqd,
3703 tANI_U8 staIdx);
3704#endif /* WLAN_FEATURE_RMC */
3705
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303706/*
3707 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3708 * triggers
3709 * return status
3710*/
3711eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3712 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303713 tSmeFastRoamTrigger fastRoamTrig,
3714 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303715
3716eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303717#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3718 const tANI_U8 *pBSSId,
3719#else
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303720 tANI_U8 *pBSSId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303721#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303722 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003723
3724void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303725
3726#ifdef FEATURE_WLAN_BATCH_SCAN
3727/* ---------------------------------------------------------------------------
3728 \fn sme_SetBatchScanReq
3729 \brief API to set batch scan request in FW
3730 \param hHal - The handle returned by macOpen.
3731 \param pRequest - Pointer to the batch request.
3732 \param sessionId - session ID
3733 \param callbackRoutine - HDD callback which needs to be invoked after
3734 getting set batch scan response from FW
3735 \param callbackContext - pAdapter context
3736 \return eHalStatus
3737 ---------------------------------------------------------------------------*/
3738eHalStatus
3739sme_SetBatchScanReq
3740(
3741 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3742 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3743 void *callbackContext
3744);
3745
3746/* ---------------------------------------------------------------------------
3747 \fn sme_TriggerBatchScanResultInd
3748 \brief API to trigger batch scan result indications from from FW
3749 \param hHal - The handle returned by macOpen.
3750 \param pRequest - Pointer to get batch request.
3751 \param sessionId - session ID
3752 \param callbackRoutine - HDD callback which needs to be invoked after
3753 getting get batch scan response from FW
3754 \param callbackContext - pAdapter context
3755 \return eHalStatus
3756 ---------------------------------------------------------------------------*/
3757eHalStatus
3758sme_TriggerBatchScanResultInd
3759(
3760 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3761 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3762 void *callbackContext
3763);
3764
3765/* ---------------------------------------------------------------------------
3766 \fn sme_StopBatchScanInd
3767 \brief API to stop batch scan request in FW
3768 \param hHal - The handle returned by macOpen.
3769 \param pRequest - Pointer to stop batch indication
3770 \return eHalStatus
3771 ---------------------------------------------------------------------------*/
3772eHalStatus
3773sme_StopBatchScanInd
3774(
3775 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3776);
3777
3778#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003779
3780#ifdef FEATURE_WLAN_CH_AVOID
3781/* ---------------------------------------------------------------------------
3782 \fn sme_AddChAvoidCallback
3783 \brief Used to plug in callback function
3784 Which notify channel may not be used with SAP or P2PGO mode.
3785 Notification come from FW.
3786 \param hHal
3787 \param pCallbackfn : callback function pointer should be plugged in
3788 \- return eHalStatus
3789 -------------------------------------------------------------------------*/
3790eHalStatus sme_AddChAvoidCallback
3791(
3792 tHalHandle hHal,
3793 void (*pCallbackfn)(void *pAdapter, void *indParam)
3794);
3795#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003796eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303797
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303798/* ---------------------------------------------------------------------------
3799 \fn sme_requestTypetoString
3800 \brief API to convert requestType enum values
3801 to string.
3802 ---------------------------------------------------------------------------*/
3803const char * sme_requestTypetoString(const v_U8_t requestType);
3804/* ---------------------------------------------------------------------------
3805 \fn sme_PmcStatetoString
3806 \brief API to convert PmcState enum values
3807 to string.
3808 ---------------------------------------------------------------------------*/
3809const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303810
3811eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3812
Agarwal Ashish5e414792014-06-08 15:25:23 +05303813tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303814
3815// tdlsoffchan
3816VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3817 tANI_U8 sessionId,
3818 tSirMacAddr peerMac,
3819 tANI_S32 tdlsOffCh,
3820 tANI_S32 tdlsOffChBwOffset,
3821 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303822eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3823 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303824void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303825
3826void sme_resetCoexEevent(tHalHandle hHal);
3827
Peng Xu117eab42014-09-25 13:33:27 +05303828tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3829tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303830#ifdef WLAN_FEATURE_AP_HT40_24G
3831void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3832 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303833eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3834 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303835#endif
Peng Xu117eab42014-09-25 13:33:27 +05303836
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303837eHalStatus sme_set_rssi_threshold_breached_cb(tHalHandle hal,
3838 void (*cb)(void *, struct rssi_breach_event *));
3839
Agarwal Ashish738843c2014-09-25 12:27:56 +05303840void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3841
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303842/* HDD Callback function */
3843typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3844
3845eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3846 u8 *pCmd,
3847 int length,
3848 pEncryptMsgRSPCb encCB);
3849
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303850/* ---------------------------------------------------------------------------
3851 \fn sme_RegisterBtCoexTDLSCallback
3852 \brief Used to plug in callback function
3853 Which notify btcoex on or off.
3854 Notification come from FW.
3855 \param hHal
3856 \param pCallbackfn : callback function pointer should be plugged in
3857 \- return eHalStatus
3858 -------------------------------------------------------------------------*/
3859eHalStatus sme_RegisterBtCoexTDLSCallback
3860(
3861 tHalHandle hHal,
3862 void (*pCallbackfn)(void *pAdapter, int)
3863);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303864
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303865/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303866 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303867
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303868 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303869
3870 \param hHal - The handle returned by macOpen.
3871
3872 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3873 eANI_BOOLEAN_FALSE otherwise
3874---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303875tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303876
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303877/* ---------------------------------------------------------------------------
3878
3879 \fn sme_IsTdlsOffChannelValid
3880 \brief To check if the channel is valid for currently established domain
3881 This is a synchronous API.
3882
3883 \param hHal - The handle returned by macOpen.
3884 \param channel - channel to verify
3885
3886 \return TRUE/FALSE, TRUE if channel is valid
3887
3888 -------------------------------------------------------------------------------*/
3889tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3890
Mukul Sharma4be88422015-03-09 20:29:07 +05303891/* --------------------------------------------------------------------------
3892
3893 \fn sme_IsCoexScoIndicationSet
3894 \brief To check if the BTC module in fwr has sent the SCO
3895 indication to host or not
3896
3897 \param hHal - The handle returned by macOpen.
3898 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3899
3900 --------------------------------------------------------------------------*/
3901tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3902
Abhishek Singh01c73d12015-03-12 15:13:44 +05303903eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3904 tANI_U32 iniNumBuffAdvert,
3905 tANI_U32 set_value);
3906
Mukul Sharma45063942015-04-01 20:07:59 +05303907void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303908
3909/* ---------------------------------------------------------------------------
3910 \fn sme_SetTdls2040BSSCoexistence
3911 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3912
3913 \param isEnabled - Enable or Disable.
3914 \- return VOS_STATUS_SUCCES
3915 -------------------------------------------------------------------------*/
3916eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3917
Abhishek Singh41988ba2015-05-25 19:42:29 +05303918/* ---------------------------------------------------------------------------
3919 \fn sme_SetRtsCtsHtVht
3920 \brief API to to enable/disable RTS/CTS for different modes.
3921
3922 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3923 \- return VOS_STATUS_SUCCES if INdication is posted to
3924 WDA else return eHAL_STATUS_FAILURE
3925 -------------------------------------------------------------------------*/
3926eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3927
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303928tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
Agrawal Ashish842eea82016-02-04 17:56:16 +05303929 tANI_U8 fcc_constraint,
3930 v_U32_t scan_pending);
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303931
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303932eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303933eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
Abhishek Singh837adf22015-10-01 17:37:37 +05303934 tANI_U32 indicator, tANI_U32 reason_code,
3935 tANI_BOOLEAN dump_vos_trace);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303936
Mahesh A Saptasagarbeca12c2015-09-07 16:21:06 +05303937eHalStatus sme_enableDisableChanAvoidIndEvent(tHalHandle hHal,
3938 tANI_U8 set_value);
3939
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303940/* ---------------------------------------------------------------------------
3941 \fn sme_set_wificonfig_params
3942 \brief API to set WifiConfiguration Parameters.
3943
3944 \param wifi_config_param - Wificonfig parameter 1.Averaging factor 2. Guard time
3945 \- return VOS_STATUS_SUCCES if INdication is posted to
3946 WDA else return eHAL_STATUS_FAILURE
3947 -------------------------------------------------------------------------*/
3948
3949eHalStatus sme_set_wificonfig_params(tHalHandle hHal, tSetWifiConfigParams *req);
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +05303950eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
3951 tANI_U32 *regInfo1, tANI_U32 *regInfo2);
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05303952eHalStatus sme_GetCurrentAntennaIndex(tHalHandle hHal,
3953 tCsrAntennaIndexCallback callback,
3954 void *pContext, tANI_U8 sessionId);
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303955
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05303956eHalStatus sme_setBcnMissPenaltyCount(tHalHandle hHal,
3957 tModifyRoamParamsReqParams *params);
Abhishek Singhbfb3c9e2016-07-22 11:25:43 +05303958eHalStatus sme_remove_bssid_from_scan_list(tHalHandle hal,
3959 tSirMacAddr bssid);
Agrawal Ashish0552be02016-03-02 18:03:43 +05303960void sme_set_mgmt_frm_via_wq5(tHalHandle hHal,
3961 tANI_BOOLEAN sendMgmtPktViaWQ5);
mukul sharma6b53e202016-11-23 19:29:18 +05303962eHalStatus sme_update_cfg_int_param(tHalHandle hHal, tANI_U32 cfg_id);
Kapil Gupta3d923fb2016-12-20 18:59:27 +05303963
3964#ifdef WLAN_FEATURE_APFIND
3965VOS_STATUS sme_apfind_set_cmd(struct sme_ap_find_request_req *input);
3966#endif /* WLAN_FEATURE_APFIND */
3967
Agrawal Ashish17ef5082016-10-17 18:33:21 +05303968#ifdef SAP_AUTH_OFFLOAD
3969/**
3970 * sme_set_sap_auth_offload() enable/disable SAP Auth Offload
3971 * @hHal: hal layer handler
3972 * @sap_auth_offload_info: the information of SAP Auth Offload
3973 *
3974 * This function provide enable/disable SAP authenticaiton offload
3975 * feature on target firmware
3976 *
3977 * Return: eHalStatus.
3978 */
3979eHalStatus sme_set_sap_auth_offload(tHalHandle hHal,
3980 struct tSirSapOffloadInfo *sap_auth_offload_info);
3981
3982#endif /* SAP_AUTH_OFFLOAD */
Anurag Chouhan83026002016-12-13 22:46:21 +05303983#ifdef DHCP_SERVER_OFFLOAD
3984eHalStatus sme_set_dhcp_srv_offload(tHalHandle hal,
Anurag Chouhan0b29de02016-12-16 13:18:40 +05303985 sir_dhcp_srv_offload_info_t *dhcp_srv_info);
Anurag Chouhan83026002016-12-13 22:46:21 +05303986#endif /* DHCP_SERVER_OFFLOAD */
3987
Anurag Chouhan0b29de02016-12-16 13:18:40 +05303988#ifdef MDNS_OFFLOAD
3989eHalStatus sme_set_mdns_offload(tHalHandle hal,
3990 sir_mdns_offload_info_t *mdns_info);
3991
3992eHalStatus sme_set_mdns_fqdn(tHalHandle hal,
3993 sir_mdns_fqdn_info_t *mdns_fqdn);
3994
3995eHalStatus sme_set_mdns_resp(tHalHandle hal,
3996 sir_mdns_resp_info_t *mdns_resp);
3997#endif /* MDNS_OFFLOAD */
Ravi Kumar bokka7d032762016-12-12 23:33:01 +05303998
3999eHalStatus sme_update_hb_threshold(tHalHandle hHal, tANI_U32 cfgId,
4000 tANI_U8 hbThresh, eCsrBand eBand);
Manjeet Singh3ed79242017-01-11 19:04:32 +05304001
4002eHalStatus sme_capture_tsf_req(tHalHandle hHal,
4003 tSirCapTsfParams capTsfParams);
4004
4005eHalStatus sme_get_tsf_req(tHalHandle hHal,
4006 tSirCapTsfParams capTsfParams);
4007
4008eHalStatus sme_set_tsfcb(tHalHandle hHal,
4009 tsf_rsp_cb rsp_cb, struct stsf *pTsf,
4010 void *pcallbackcontext);
4011
Anurag Chouhan6ee81542017-02-09 18:09:27 +05304012/* ARP DEBUG STATS */
4013eHalStatus sme_set_nud_debug_stats(tHalHandle hHal,
4014 psetArpStatsParams pSetStatsParam);
4015eHalStatus sme_get_nud_debug_stats(tHalHandle hHal,
4016 pgetArpStatsParams pGetStatsParam);
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05304017eHalStatus sme_del_sta_ba_session_req(tHalHandle hHal,
4018 tDelBaParams sta_del_params);
Abhishek Singh02605092017-10-25 14:06:12 +05304019/**
4020 * sme_roam_csa_ie_request() - request CSA IE transmission from PE
4021 * @hal: handle returned by mac_open
4022 * @bssid: SAP bssid
4023 * @new_chan: target channel information
4024 * @phy_mode: SAP phymode
Abhishek Singh02b823e2017-10-30 17:53:20 +05304025 * @sme_session_id: sme session id
Abhishek Singh02605092017-10-25 14:06:12 +05304026 *
4027 * Return: VOS_STATUS
4028 */
4029VOS_STATUS sme_roam_csa_ie_request(tHalHandle hal, tCsrBssid bssid,
Abhishek Singh02b823e2017-10-30 17:53:20 +05304030 uint8_t new_chan, uint32_t phy_mode,
4031 uint8_t sme_session_id);
Abhishek Singh02605092017-10-25 14:06:12 +05304032
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304033/**
4034 * sme_roam_channel_change_req() - Channel change to new target channel
4035 * @hal: handle returned by mac_open
4036 * @bssid: SAP bssid
4037 * @new_chan: target channel information
4038 * @profile: roam profile
Abhishek Singh02b823e2017-10-30 17:53:20 +05304039 * @sme_session_id: sme session id
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304040 *
4041 * API to Indicate Channel change to new target channel
4042 *
4043 * Return: VOS_STATUS
4044 */
4045VOS_STATUS sme_roam_channel_change_req(tHalHandle hal, tCsrBssid bssid,
Abhishek Singh02b823e2017-10-30 17:53:20 +05304046 uint8_t new_chan, tCsrRoamProfile *profile,
4047 uint8_t sme_session_id);
Abhishek Singh78c691f2017-11-30 13:48:44 +05304048/**
4049 * sme_get_connect_strt_time() - get the connection start time
4050 * @hal: hal context
4051 * @session_id: session id
4052 *
4053 * Return: void.
4054 */
4055v_TIME_t sme_get_connect_strt_time(tHalHandle hal,
4056 uint8_t session_id);
4057
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304058
Abhishek Singhe8ebb922017-11-01 13:30:26 +05304059/**
4060 * sme_get_cb_phy_mode_from_cb_ini_mode() - convert ini CB value to Phy CB val
4061 * @cb_ini_value: ini value of cb mode
4062 *
4063 * Return: phy CB val
4064 */
4065static inline ePhyChanBondState
4066sme_get_cb_phy_mode_from_cb_ini_mode(uint32_t cb_ini_value)
4067{
4068 return csrConvertCBIniValueToPhyCBState(cb_ini_value);
4069}
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304070
Yeshwanth Sriram Guntukab973f1c2018-03-29 19:35:49 +05304071/**
4072 * sme_request_imps() - Send IMPS request
4073 * @hal: hal context
4074 *
4075 * Return: void
4076 */
4077void sme_request_imps(tHalHandle hal);
4078
Jeff Johnson295189b2012-06-20 16:38:30 -07004079#endif //#if !defined( __SME_API_H )