blob: 6674053d1ac9411a6b48a5eb3b32b526aa233141 [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
Dino Mycle2c198072014-06-10 10:15:52 +0530234#ifdef WLAN_FEATURE_EXTSCAN
235/* ---------------------------------------------------------------------------
236 \fn sme_GetValidChannelsByBand
237 \brief SME API to fetch all valid channel filtered by band
238 \param hHal
239 \param wifiBand: RF band information
240 \param aValidChannels: Array to store channel info
241 \param len: number of channels
242 \- return eHalStatus
243 -------------------------------------------------------------------------*/
244eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
245 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
246
247/* ---------------------------------------------------------------------------
248 \fn sme_EXTScanGetCapabilities
249 \brief SME API to fetch Extented Scan capabilities
250 \param hHal
251 \param pReq: Extented Scan capabilities structure
252 \- return eHalStatus
253 -------------------------------------------------------------------------*/
254eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
255 tSirGetEXTScanCapabilitiesReqParams *pReq);
256
257/* ---------------------------------------------------------------------------
258 \fn sme_EXTScanStart
259 \brief SME API to issue Extented Scan start
260 \param hHal
261 \param pStartCmd: Extented Scan start structure
262 \- return eHalStatus
263 -------------------------------------------------------------------------*/
264eHalStatus sme_EXTScanStart (tHalHandle hHal,
265 tSirEXTScanStartReqParams *pStartCmd);
266
267/* ---------------------------------------------------------------------------
268 \fn sme_EXTScanStop
269 \brief SME API to issue Extented Scan stop
270 \param hHal
271 \param pStopReq: Extented Scan stop structure
272 \- return eHalStatus
273 -------------------------------------------------------------------------*/
274eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
275
276/* ---------------------------------------------------------------------------
277 \fn sme_SetBssHotlist
278 \brief SME API to set BSSID hotlist
279 \param hHal
280 \param pSetHotListReq: Extented Scan set hotlist structure
281 \- return eHalStatus
282 -------------------------------------------------------------------------*/
283eHalStatus sme_SetBssHotlist (tHalHandle hHal,
284 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
285
286/* ---------------------------------------------------------------------------
287 \fn sme_ResetBssHotlist
288 \brief SME API to reset BSSID hotlist
289 \param hHal
290 \param pSetHotListReq: Extented Scan set hotlist structure
291 \- return eHalStatus
292 -------------------------------------------------------------------------*/
293eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
294 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
295
296/* ---------------------------------------------------------------------------
Dino Mycle2c198072014-06-10 10:15:52 +0530297 \fn sme_getCachedResults
298 \brief SME API to get cached results
299 \param hHal
300 \param pCachedResultsReq: Extented Scan get cached results structure
301 \- return eHalStatus
302 -------------------------------------------------------------------------*/
303eHalStatus sme_getCachedResults (tHalHandle hHal,
304 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
305
306/* ---------------------------------------------------------------------------
307 \fn sme_EXTScanRegisterCallback
308 \brief SME API to register Extented Scan notification callback
309 \param pEXTScanIndCb
310 \- return void
311 -------------------------------------------------------------------------*/
312eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
313 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
314 void *);
315
316#endif /* WLAN_FEATURE_EXTSCAN */
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530317
318#ifdef FEATURE_OEM_DATA_SUPPORT
319eHalStatus sme_OemDataRegisterCallback (tHalHandle hHal,
Padma, Santhosh Kumaree7c3d22016-01-25 10:36:08 +0530320 void (*pOemDataIndCb)(void *, const tANI_U16, void *, tANI_U32),
321 void *callbackContext);
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530322#endif
323
Siddharth Bhald8a95e82015-02-12 20:14:52 +0530324/* ---------------------------------------------------------------------------
325 \fn sme_SpoofMacAddrReq
326 \brief SME API to send Spoof Mac Addr req to HAL
327 \param macaddr: mac address to be sent
328 \- return eHalStatus
329 -------------------------------------------------------------------------*/
330eHalStatus sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530331
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530332typedef enum
333{
334 eSME_ROAM_TRIGGER_NONE = 0,
335 eSME_ROAM_TRIGGER_SCAN = 1,
336 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
337 eSME_ROAM_TRIGGER_MAX
338} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700339
Kapil Gupta3d923fb2016-12-20 18:59:27 +0530340#ifdef WLAN_FEATURE_APFIND
341struct sme_ap_find_request_req
342{
343 u_int16_t request_data_len;
344 const u_int8_t* request_data;
345};
346#endif /* WLAN_FEATURE_APFIND */
347
348
Jeff Johnson295189b2012-06-20 16:38:30 -0700349/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530350 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700351 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700352/*--------------------------------------------------------------------------
353
354 \brief sme_Open() - Initialze all SME modules and put them at idle state
355
356 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
357 successfully return, all modules are at idle state ready to start.
358
359 smeOpen must be called before any other SME APIs can be involved.
360 smeOpen must be called after macOpen.
361
362 \param hHal - The handle returned by macOpen.
363
364 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
365
366 Other status means SME is failed to be initialized
367 \sa
368
369 --------------------------------------------------------------------------*/
370eHalStatus sme_Open(tHalHandle hHal);
371
372/*--------------------------------------------------------------------------
373
374 \brief sme_Close() - Release all SME modules and their resources.
375
376 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
377 return, all modules are at closed state.
378
379 No SME APIs can be involved after sme_Close except sme_Open.
380 sme_Close must be called before macClose.
381
382 \param hHal - The handle returned by macOpen.
383
384 \return eHAL_STATUS_SUCCESS - SME is successfully close.
385
386 Other status means SME is failed to be closed but caller still cannot
387 call any other SME functions except smeOpen.
388 \sa
389
390 --------------------------------------------------------------------------*/
391eHalStatus sme_Close(tHalHandle hHal);
392
393/*--------------------------------------------------------------------------
Hema Aparna Medicharlaa6cf65e2015-06-01 16:23:28 +0530394
395 \brief sme_PreClose() - Stop SME resources prior to final sme_Stop.
396
397 The function stops resources in SME, PMC, CCM, CSR, etc. as needed
398 to handle fast closure during SSR/unload-load cases.
399
400 \param hHal - The handle returned by macOpen.
401 \return v_VOID_t
402
403 \sa
404
405 --------------------------------------------------------------------------*/
406v_VOID_t sme_PreClose(tHalHandle hHal);
407
408/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700409
410 \brief sme_Start() - Put all SME modules at ready state.
411
412 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
413 successfully return, all modules are ready to run.
414
415 \param hHal - The handle returned by macOpen.
416
417 \return eHAL_STATUS_SUCCESS - SME is ready.
418
419 Other status means SME is failed to start.
420 \sa
421
422 --------------------------------------------------------------------------*/
423eHalStatus sme_Start(tHalHandle hHal);
424
425/*--------------------------------------------------------------------------
426
427 \brief sme_Stop() - Stop all SME modules and put them at idle state
428
429 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
430 return, all modules are at idle state ready to start.
431
432
433 \param hHal - The handle returned by macOpen.
434
Kiet Lama72a2322013-11-15 11:18:11 +0530435 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700436
437 \return eHAL_STATUS_SUCCESS - SME is stopped.
438
439 Other status means SME is failed to stop but caller should still consider
440 SME is stopped.
441 \sa
442
443 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530444eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700445
446
447/*--------------------------------------------------------------------------
448
449 \brief sme_OpenSession() - Open a session for scan/roam operation.
450
451 This is a synchronous API.
452
453
454 \param hHal - The handle returned by macOpen.
455 \param callback - A pointer to the function caller specifies for roam/connect status indication
456 \param pContext - The context passed with callback
457 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
458 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
459
460 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
461
462 Other status means SME is failed to open the session.
463 eHAL_STATUS_RESOURCES - no more session available.
464 \sa
465
466 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700467eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
468 void *pContext, tANI_U8 *pSelfMacAddr,
469 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700470
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700471/*--------------------------------------------------------------------------
472
473 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
474 \param hHal - The handle returned by macOpen.
475 \param currDeviceMode - Current operating device mode.
476 --------------------------------------------------------------------------*/
477
478void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700479
480/*--------------------------------------------------------------------------
481
482 \brief sme_CloseSession() - Open a session for scan/roam operation.
483
484 This is a synchronous API.
485
Jeff Johnson295189b2012-06-20 16:38:30 -0700486 \param hHal - The handle returned by macOpen.
487
488 \param sessionId - A previous opened session's ID.
mukul sharmabab477d2015-06-11 17:14:55 +0530489
490 \param bPurgeSmeCmdList - Whether sme cmd list purging is required or not.
491 TRUE -Purging require FALSE - Purging not require
492
Jeff Johnson295189b2012-06-20 16:38:30 -0700493 \return eHAL_STATUS_SUCCESS - session is closed.
494
495 Other status means SME is failed to open the session.
496 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
497 \sa
mukul sharmabab477d2015-06-11 17:14:55 +0530498
499
Jeff Johnson295189b2012-06-20 16:38:30 -0700500 --------------------------------------------------------------------------*/
501eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
Agrawal Ashish5a3522c2016-03-02 15:08:28 +0530502 tANI_BOOLEAN fSync,
mukul sharmabab477d2015-06-11 17:14:55 +0530503 tANI_U8 bPurgeSmeCmdList,
504 csrRoamSessionCloseCallback callback,
505 void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -0700506
507/*--------------------------------------------------------------------------
508
509 \brief sme_UpdateConfig() - Change configurations for all SME moduels
510
511 The function updates some configuration for modules in SME, CCM, CSR, etc
512 during SMEs close -> open sequence.
513
514 Modules inside SME apply the new configuration at the next transaction.
515
516
517 \param hHal - The handle returned by macOpen.
518 \Param pSmeConfigParams - a pointer to a caller allocated object of
519 typedef struct _smeConfigParams.
520
521 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
522
523 Other status means SME is failed to update the config parameters.
524 \sa
525
526 --------------------------------------------------------------------------*/
527eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
528
529#ifdef FEATURE_WLAN_SCAN_PNO
530/*--------------------------------------------------------------------------
531
532 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
533
534 It is used at driver start up to inform RIVA of the default channel
535 configuration.
536
537 This is a synchronuous call
538
539 \param hHal - The handle returned by macOpen.
540
541 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
542
543 Other status means SME is failed to update the channel config.
544 \sa
545
546 --------------------------------------------------------------------------*/
547eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
548
549#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700550/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530551
552 \brief sme_UpdateChannelList() - Update channel List in FW.
553
554
555 \param hHal - The handle returned by macOpen.
556
557 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
558
559 Other status means SME is failed to update the channel config.
560 \sa
561
562 --------------------------------------------------------------------------*/
563eHalStatus sme_UpdateChannelList(tHalHandle hHal);
564
565/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700566
567 \brief sme_set11dinfo() - Set the 11d information about valid channels
568 and there power using information from nvRAM
569 This function is called only for AP.
570
571 This is a synchronuous call
572
573 \param hHal - The handle returned by macOpen.
574 \Param pSmeConfigParams - a pointer to a caller allocated object of
575 typedef struct _smeConfigParams.
576
577 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
578
579 Other status means SME is failed to update the config parameters.
580 \sa
581--------------------------------------------------------------------------*/
582
583eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
584
585/*--------------------------------------------------------------------------
586
587 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
588
589 This is a synchronuous call
590
591 \param hHal - The handle returned by HostapdAdapter.
592 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
593
594 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
595
596 Other status means, failed to get the current regulatory domain.
597 \sa
598--------------------------------------------------------------------------*/
599
600eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
601
602eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
603
Jeff Johnson295189b2012-06-20 16:38:30 -0700604
605/* ---------------------------------------------------------------------------
606 \fn sme_ChangeConfigParams
607 \brief The SME API exposed for HDD to provide config params to SME during
608 SMEs stop -> start sequence.
609
610 If HDD changed the domain that will cause a reset. This function will
611 provide the new set of 11d information for the new domain. Currrently this
612 API provides info regarding 11d only at reset but we can extend this for
613 other params (PMC, QoS) which needs to be initialized again at reset.
614
615 This is a synchronuous call
616
617 \param hHal - The handle returned by macOpen.
618
619 \Param
620 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
621 currently provides 11d related information like Country code,
622 Regulatory domain, valid channel list, Tx power per channel, a
623 list with active/passive scan allowed per valid channel.
624
625 \return eHalStatus
626 ---------------------------------------------------------------------------*/
627eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
628 tCsrUpdateConfigParam *pUpdateConfigParam);
629
630/*--------------------------------------------------------------------------
631
632 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
633 is ready tio run.
634
635 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
636 to running state.
637
638
639 \param hHal - The handle returned by macOpen.
640
641 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
642
643 Other status means SME failed to send the message to PE.
644 \sa
645
646 --------------------------------------------------------------------------*/
647eHalStatus sme_HDDReadyInd(tHalHandle hHal);
648
649
650/*--------------------------------------------------------------------------
651
652 \brief sme_ProcessMsg() - The main message processor for SME.
653
654 The function is called by a message dispatcher when to process a message
655 targeted for SME.
656
657
658 \param hHal - The handle returned by macOpen.
659 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
660
661 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
662
663 Other status means SME failed to process the message.
664 \sa
665
666 --------------------------------------------------------------------------*/
667eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
668
669v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
670
671/* ---------------------------------------------------------------------------
672 \fn sme_ScanRequest
673 \brief a wrapper function to Request a 11d or full scan from CSR.
674 \param pScanRequestID - pointer to an object to get back the request ID
675 \param callback - a callback function that scan calls upon finish, will not
676 be called if csrScanRequest returns error
677 \param pContext - a pointer passed in for the callback
678 \return eHalStatus
679 ---------------------------------------------------------------------------*/
680eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
681 tANI_U32 *pScanRequestID,
682 csrScanCompleteCallback callback, void *pContext);
683
684
685/* ---------------------------------------------------------------------------
686 \fn sme_ScanSetBGScanparams
687 \brief a wrapper function to request CSR to set BG scan params in PE
688 \param pScanReq - BG scan request structure
689 \return eHalStatus
690 ---------------------------------------------------------------------------*/
691eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
692
693
694/* ---------------------------------------------------------------------------
695 \fn sme_ScanGetResult
696 \brief a wrapper function to request scan results from CSR.
697 \param pFilter - If pFilter is NULL, all cached results are returned
698 \param phResult - an object for the result.
699 \return eHalStatus
700 ---------------------------------------------------------------------------*/
701eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
702 tScanResultHandle *phResult);
703
704
705/* ---------------------------------------------------------------------------
706 \fn sme_ScanFlushResult
707 \brief a wrapper function to request CSR to clear scan results.
708 \return eHalStatus
709 ---------------------------------------------------------------------------*/
710eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530711
712/*
713 * ---------------------------------------------------------------------------
714 * \fn sme_FilterScanResults
715 * \brief a wrapper function to request CSR to filter the scan results based
716 * on valid chennel list.
717 * \return eHalStatus
718 *---------------------------------------------------------------------------
719 */
720eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
721
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530722/*
723 * ---------------------------------------------------------------------------
724 * \fn sme_FilterScanDFSResults
725 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
726 * from the scan results.
727 * \return eHalStatus
728 *---------------------------------------------------------------------------
729 */
730eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
731
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700732eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700733
734/* ---------------------------------------------------------------------------
735 \fn sme_ScanResultGetFirst
736 \brief a wrapper function to request CSR to returns the first element of
737 scan result.
738 \param hScanResult - returned from csrScanGetResult
739 \return tCsrScanResultInfo * - NULL if no result
740 ---------------------------------------------------------------------------*/
741tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
742 tScanResultHandle hScanResult);
743
744/* ---------------------------------------------------------------------------
745 \fn sme_ScanResultGetNext
746 \brief a wrapper function to request CSR to returns the next element of
747 scan result. It can be called without calling csrScanResultGetFirst
748 first
749 \param hScanResult - returned from csrScanGetResult
750 \return Null if no result or reach the end
751 ---------------------------------------------------------------------------*/
752tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
753 tScanResultHandle hScanResult);
754
755/* ---------------------------------------------------------------------------
756 \fn sme_ScanResultPurge
757 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
758 in the list and free memory for each item
759 \param hScanResult - returned from csrScanGetResult. hScanResult is
760 considered gone by
761 calling this function and even before this function reutrns.
762 \return eHalStatus
763 ---------------------------------------------------------------------------*/
764eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
765
Sourav Mohapatra5817dc42017-12-18 17:45:16 +0530766VOS_STATUS sme_update_channel_list(tpAniSirGlobal pMac);
767
768
Jeff Johnson295189b2012-06-20 16:38:30 -0700769/* ---------------------------------------------------------------------------
770 \fn sme_ScanGetPMKIDCandidateList
771 \brief a wrapper function to return the PMKID candidate list
772 \param pPmkidList - caller allocated buffer point to an array of
773 tPmkidCandidateInfo
774 \param pNumItems - pointer to a variable that has the number of
775 tPmkidCandidateInfo allocated when retruning, this is
776 either the number needed or number of items put into
777 pPmkidList
778 \return eHalStatus - when fail, it usually means the buffer allocated is not
779 big enough and pNumItems
780 has the number of tPmkidCandidateInfo.
781 \Note: pNumItems is a number of tPmkidCandidateInfo,
782 not sizeof(tPmkidCandidateInfo) * something
783 ---------------------------------------------------------------------------*/
784eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
785 tPmkidCandidateInfo *pPmkidList,
786 tANI_U32 *pNumItems );
787
788
789/*----------------------------------------------------------------------------
790 \fn sme_RoamRegisterLinkQualityIndCallback
791
792 \brief
793 a wrapper function to allow HDD to register a callback handler with CSR for
794 link quality indications.
795
796 Only one callback may be registered at any time.
797 In order to deregister the callback, a NULL cback may be provided.
798
799 Registration happens in the task context of the caller.
800
801 \param callback - Call back being registered
802 \param pContext - user data
803
804 DEPENDENCIES: After CSR open
805
806 \return eHalStatus
807-----------------------------------------------------------------------------*/
808eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
809 csrRoamLinkQualityIndCallback callback,
810 void *pContext);
811
812
813/* ---------------------------------------------------------------------------
814 \fn sme_RoamConnect
815 \brief a wrapper function to request CSR to inititiate an association
816 \param sessionId - the sessionId returned by sme_OpenSession.
817 \param pProfile - can be NULL to join to any open ones
818 \param pRoamId - to get back the request ID
819 \return eHalStatus
820 ---------------------------------------------------------------------------*/
821eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
822 tANI_U32 *pRoamId);
823
824/* ---------------------------------------------------------------------------
825 \fn sme_RoamReassoc
826 \brief a wrapper function to request CSR to inititiate a re-association
827 \param pProfile - can be NULL to join the currently connected AP. In that
828 case modProfileFields should carry the modified field(s) which could trigger
829 reassoc
830 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
831 that might need modification dynamically once STA is up & running and this
832 could trigger a reassoc
833 \param pRoamId - to get back the request ID
834 \return eHalStatus
835 -------------------------------------------------------------------------------*/
836eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
837 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700838 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700839
840/* ---------------------------------------------------------------------------
841 \fn sme_RoamConnectToLastProfile
842 \brief a wrapper function to request CSR to disconnect and reconnect with
843 the same profile
844 \return eHalStatus. It returns fail if currently connected
845 ---------------------------------------------------------------------------*/
846eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
847
848/* ---------------------------------------------------------------------------
849 \fn sme_RoamDisconnect
850 \brief a wrapper function to request CSR to disconnect from a network
851 \param reason -- To indicate the reason for disconnecting. Currently, only
852 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
853 \return eHalStatus
854 ---------------------------------------------------------------------------*/
855eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
856
Jeff Johnson295189b2012-06-20 16:38:30 -0700857/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530858 \fn.sme_abortConnection
859 \brief a wrapper function to request CSR to stop from connecting a network
860 \retun void.
861---------------------------------------------------------------------------*/
862
863void sme_abortConnection(tHalHandle hHal, tANI_U8 sessionId);
864
865/* ---------------------------------------------------------------------------
Abhishek Singhe0bc0992016-05-20 17:58:18 +0530866 \fn.sme_dhcp_done_ind
867 \brief a wrapper function to set dhcp done ind in sme session
868 \retun void.
869---------------------------------------------------------------------------*/
870void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id);
871
872/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700873 \fn sme_RoamStopBss
874 \brief a wrapper function to request CSR to stop bss
875 \param sessionId - sessionId of SoftAP
876 \return eHalStatus
877 ---------------------------------------------------------------------------*/
878eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
879
880/* ---------------------------------------------------------------------------
881 \fn sme_RoamGetAssociatedStas
882 \brief To probe the list of associated stations from various modules of CORE stack.
883 \This is an asynchronous API.
884 \param sessionId - sessionId of SoftAP
885 \param modId - Module from whom list of associtated stations is to be probed.
886 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
887 \param pUsrContext - Opaque HDD context
888 \param pfnSapEventCallback - Sap event callback in HDD
889 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
890 \return eHalStatus
891 -------------------------------------------------------------------------------*/
892eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
893 VOS_MODULE_ID modId, void *pUsrContext,
894 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
895
896/* ---------------------------------------------------------------------------
897 \fn sme_RoamDisconnectSta
898 \brief To disassociate a station. This is an asynchronous API.
899 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
900 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
901 -------------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +0530902eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId,
903#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
904 const tANI_U8 *pPeerMacAddr
905#else
906 tANI_U8 *pPeerMacAddr
907#endif
908 );
Jeff Johnson295189b2012-06-20 16:38:30 -0700909
910/* ---------------------------------------------------------------------------
911 \fn sme_RoamDeauthSta
912 \brief To disassociate a station. This is an asynchronous API.
913 \param hHal - Global structure
914 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530915 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700916 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
917 -------------------------------------------------------------------------------*/
918eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530919 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700920
921/* ---------------------------------------------------------------------------
922 \fn sme_RoamTKIPCounterMeasures
923 \brief To start or stop TKIP counter measures. This is an asynchronous API.
924 \param sessionId - sessionId of SoftAP
925 \param bEnable - Flag to start/stop TKIP countermeasures
926 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
927 -------------------------------------------------------------------------------*/
928eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
929
930/* ---------------------------------------------------------------------------
931 \fn sme_RoamGetWpsSessionOverlap
932 \brief To get the WPS PBC session overlap information.
933 \This is an asynchronous API.
934 \param sessionId - sessionId of SoftAP
935 \param pUsrContext - Opaque HDD context
936 \param pfnSapEventCallback - Sap event callback in HDD
937 \return eHalStatus
938 -------------------------------------------------------------------------------*/
939eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
940 void *pUsrContext, void *pfnSapEventCallback,
941 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700942
943/* ---------------------------------------------------------------------------
944 \fn sme_RoamGetConnectState
945 \brief a wrapper function to request CSR to return the current connect state
946 of Roaming
947 \return eHalStatus
948 ---------------------------------------------------------------------------*/
949eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
950
951/* ---------------------------------------------------------------------------
952 \fn sme_RoamGetConnectProfile
953 \brief a wrapper function to request CSR to return the current connect
954 profile. Caller must call csrRoamFreeConnectProfile after it is done
955 and before reuse for another csrRoamGetConnectProfile call.
956 \param pProfile - pointer to a caller allocated structure
957 tCsrRoamConnectedProfile
958 \return eHalStatus. Failure if not connected
959 ---------------------------------------------------------------------------*/
960eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
961 tCsrRoamConnectedProfile *pProfile);
962
963/* ---------------------------------------------------------------------------
964 \fn sme_RoamFreeConnectProfile
965 \brief a wrapper function to request CSR to free and reinitialize the
966 profile returned previously by csrRoamGetConnectProfile.
967 \param pProfile - pointer to a caller allocated structure
968 tCsrRoamConnectedProfile
969 \return eHalStatus.
970 ---------------------------------------------------------------------------*/
971eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
972 tCsrRoamConnectedProfile *pProfile);
973
974/* ---------------------------------------------------------------------------
975 \fn sme_RoamSetPMKIDCache
976 \brief a wrapper function to request CSR to return the PMKID candidate list
977 \param pPMKIDCache - caller allocated buffer point to an array of
978 tPmkidCacheInfo
979 \param numItems - a variable that has the number of tPmkidCacheInfo
980 allocated when retruning, this is either the number needed
981 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530982 \param update_entire_cache - if TRUE, then it overwrites the entire cache
983 with pPMKIDCache, else it updates entry by
984 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700985 \return eHalStatus - when fail, it usually means the buffer allocated is not
986 big enough and pNumItems has the number of
987 tPmkidCacheInfo.
988 \Note: pNumItems is a number of tPmkidCacheInfo,
989 not sizeof(tPmkidCacheInfo) * something
990 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530991eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
992 tPmkidCacheInfo *pPMKIDCache,
993 tANI_U32 numItems,
994 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700995
996/* ---------------------------------------------------------------------------
997 \fn sme_RoamGetSecurityReqIE
998 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
999 passes to PE to JOIN request or START_BSS request
1000 This is a synchronuous call.
1001 \param sessionId - returned by sme_OpenSession.
1002 \param pLen - caller allocated memory that has the length of pBuf as input.
1003 Upon returned, *pLen has the needed or IE length in pBuf.
1004 \param pBuf - Caller allocated memory that contain the IE field, if any,
1005 upon return
1006 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1007 \return eHalStatus - when fail, it usually means the buffer allocated is not
1008 big enough
1009 ---------------------------------------------------------------------------*/
1010eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1011 tANI_U8 *pBuf, eCsrSecurityType secType);
1012
1013/* ---------------------------------------------------------------------------
1014 \fn sme_RoamGetSecurityRspIE
1015 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
1016 the beacon or probe rsp if connected
1017 \param sessionId - returned by sme_OpenSession.
1018 \param pLen - caller allocated memory that has the length of pBuf as input.
1019 Upon returned, *pLen has the needed or IE length in pBuf.
1020 \param pBuf - Caller allocated memory that contain the IE field, if any,
1021 upon return
1022 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1023 \return eHalStatus - when fail, it usually means the buffer allocated is not
1024 big enough
1025 ---------------------------------------------------------------------------*/
1026eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1027 tANI_U8 *pBuf, eCsrSecurityType secType);
1028
1029
1030/* ---------------------------------------------------------------------------
1031 \fn sme_RoamGetNumPMKIDCache
1032 \brief a wrapper function to request CSR to return number of PMKID cache
1033 entries
1034 \return tANI_U32 - the number of PMKID cache entries
1035 ---------------------------------------------------------------------------*/
1036tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
1037
1038/* ---------------------------------------------------------------------------
1039 \fn sme_RoamGetPMKIDCache
1040 \brief a wrapper function to request CSR to return PMKID cache from CSR
1041 \param pNum - caller allocated memory that has the space of the number of
1042 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
1043 needed or actually number in tPmkidCacheInfo.
1044 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
1045 any, upon return
1046 \return eHalStatus - when fail, it usually means the buffer allocated is not
1047 big enough
1048 ---------------------------------------------------------------------------*/
1049eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
1050 tPmkidCacheInfo *pPmkidCache);
1051
1052/* ---------------------------------------------------------------------------
1053 \fn sme_GetConfigParam
1054 \brief a wrapper function that HDD calls to get the global settings
1055 currently maintained by CSR.
1056 \param pParam - caller allocated memory
1057 \return eHalStatus
1058 ---------------------------------------------------------------------------*/
1059eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
1060
1061/* ---------------------------------------------------------------------------
1062 \fn sme_GetStatistics
1063 \brief a wrapper function that client calls to register a callback to get
1064 different PHY level statistics from CSR.
1065
1066 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1067 \param statsMask - The different category/categories of stats requester is looking for
1068 The order in which you set the bits in the statsMask for requesting
1069 different type of stats is:
1070
1071 eCsrSummaryStats = bit 0
1072 eCsrGlobalClassAStats = bit 1
1073 eCsrGlobalClassBStats = bit 2
1074 eCsrGlobalClassCStats = bit 3
1075 eCsrGlobalClassDStats = bit 4
1076 eCsrPerStaStats = bit 5
1077
1078 \param callback - SME sends back the requested stats using the callback
1079 \param periodicity - If requester needs periodic update, 0 means it's an one
1080 time request
1081 \param cache - If requester is happy with cached stats
1082 \param staId - The station ID for which the stats is requested for
1083 \param pContext - user context to be passed back along with the callback
1084 \return eHalStatus
1085 ---------------------------------------------------------------------------*/
1086eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1087 tANI_U32 statsMask,
1088 tCsrStatsCallback callback,
1089 tANI_U32 periodicity, tANI_BOOLEAN cache,
1090 tANI_U8 staId, void *pContext);
1091
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301092/* ---------------------------------------------------------------------------
1093 \fn smeGetTLSTAState
1094 \helper function to get teh TL STA State whenever the function is called.
1095
1096 \param staId - The staID to be passed to the TL
1097 to get the relevant TL STA State
1098 \return the state as tANI_U16
1099 ---------------------------------------------------------------------------*/
1100tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1101
Jeff Johnson295189b2012-06-20 16:38:30 -07001102eHalStatus sme_GetRssi(tHalHandle hHal,
1103 tCsrRssiCallback callback,
1104 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301105
1106/* ---------------------------------------------------------------------------
1107 \fn sme_GetSnr
1108 \brief a wrapper function that client calls to register a callback to get
1109 SNR from FW
1110
1111 \param callback - SME sends back the requested stats using the callback
1112 \param staId - The station ID for which the stats is requested for
1113 \param bssid - The bssid of the connected session
1114 \param pContext - user context to be passed back along with the callback
1115 ---------------------------------------------------------------------------*/
1116eHalStatus sme_GetSnr(tHalHandle hHal,
1117 tCsrSnrCallback callback,
1118 tANI_U8 staId, tCsrBssid bssId,
1119 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001120#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001121eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1122 tCsrRssiCallback callback,
1123 tANI_U8 staId,
1124 tCsrBssid bssId,
1125 void *pContext,
1126 void* pVosContext);
1127#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001128
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001129#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001130/* ---------------------------------------------------------------------------
1131 \fn sme_GetTsmStats
1132 \brief a wrapper function that client calls to register a callback to get TSM Stats
1133
1134 \param callback - SME sends back the requested stats using the callback
1135 \param staId - The station ID for which the stats is requested for
1136 \param pContext - user context to be passed back along with the callback
1137 \param pVosContext - vos context
1138 \return eHalStatus
1139 ---------------------------------------------------------------------------*/
1140eHalStatus sme_GetTsmStats(tHalHandle hHal,
1141 tCsrTsmStatsCallback callback,
1142 tANI_U8 staId, tCsrBssid bssId,
1143 void *pContext, void* pVosContext, tANI_U8 tid);
1144
1145/* ---------------------------------------------------------------------------
1146 \fn sme_SetCCKMIe
1147 \brief function to store the CCKM IE passed from supplicant and use it while packing
1148 reassociation request
1149 \param hHal - HAL handle for device
1150 \param pCckmIe - pointer to CCKM IE data
1151 \param pCckmIeLen - length of the CCKM IE
1152 \- return Success or failure
1153 -------------------------------------------------------------------------*/
1154eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1155
1156
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001157/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001158 \fn sme_SetEseBeaconRequest
1159 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001160 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001161 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001162 \- return Success or failure
1163 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001164eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1165 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001166
1167
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001168#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001169/* ---------------------------------------------------------------------------
1170 \fn sme_CfgSetInt
1171 \brief a wrapper function that HDD calls to set parameters in CFG.
1172 \param cfgId - Configuration Parameter ID (type) for STA.
1173 \param ccmValue - The information related to Configuration Parameter ID
1174 which needs to be saved in CFG
1175 \param callback - To be registered by CSR with CCM. Once the CFG done with
1176 saving the information in the database, it notifies CCM &
1177 then the callback will be invoked to notify.
1178 \param toBeSaved - To save the request for future reference
1179 \return eHalStatus
1180 ---------------------------------------------------------------------------*/
1181eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1182 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1183
1184/* ---------------------------------------------------------------------------
1185 \fn sme_CfgSetStr
1186 \brief a wrapper function that HDD calls to set parameters in CFG.
1187 \param cfgId - Configuration Parameter ID (type) for STA.
1188 \param pStr - Pointer to the byte array which carries the information needs
1189 to be saved in CFG
1190 \param length - Length of the data to be saved
1191 \param callback - To be registered by CSR with CCM. Once the CFG done with
1192 saving the information in the database, it notifies CCM &
1193 then the callback will be invoked to notify.
1194 \param toBeSaved - To save the request for future reference
1195 \return eHalStatus
1196 ---------------------------------------------------------------------------*/
1197eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1198 tANI_U32 length, tCcmCfgSetCallback callback,
1199 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301200/* ---------------------------------------------------------------------------
1201 \fn sme_GetModifyProfileFields
1202 \brief HDD or SME - QOS calls this function to get the current values of
1203 connected profile fields, changing which can cause reassoc.
1204 This function must be called after CFG is downloaded and STA is in connected
1205 state. Also, make sure to call this function to get the current profile
1206 fields before calling the reassoc. So that pModifyProfileFields will have
1207 all the latest values plus the one(s) has been updated as part of reassoc
1208 request.
1209 \param pModifyProfileFields - pointer to the connected profile fields
1210 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001211
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301212 \return eHalStatus
1213 -------------------------------------------------------------------------------*/
1214eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1215 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301216/* ---------------------------------------------------------------------------
1217 \fn sme_HT40StopOBSSScan
1218 \brief HDD or SME - Command to stop the OBSS scan
1219 THis is implemented only for debugging purpose.
1220 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1221 \param sessionId - sessionId
1222 changing which can cause reassoc
1223
1224 \return eHalStatus
1225 -------------------------------------------------------------------------------*/
1226eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001227
1228/*--------------------------------------------------------------------------
1229 \fn sme_SetConfigPowerSave
1230 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1231 For BMPS related configuration, this function also updates the CFG
1232 and sends a message to FW to pick up the new values. Note: Calling
1233 this function only updates the configuration and does not enable
1234 the specified power save mode.
1235 \param hHal - The handle returned by macOpen.
1236 \param psMode - Power Saving mode being modified
1237 \param pConfigParams - a pointer to a caller allocated object of type
1238 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1239 \return eHalStatus
1240 --------------------------------------------------------------------------*/
1241eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1242 void *pConfigParams);
1243
1244/*--------------------------------------------------------------------------
1245 \fn sme_GetConfigPowerSave
1246 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1247 \param hHal - The handle returned by macOpen.
1248 \param psMode - Power Saving mode
1249 \param pConfigParams - a pointer to a caller allocated object of type
1250 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1251 \return eHalStatus
1252 --------------------------------------------------------------------------*/
1253eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1254 void *pConfigParams);
1255
1256/* ---------------------------------------------------------------------------
1257 \fn sme_SignalPowerEvent
1258 \brief Signals to PMC that a power event has occurred. Used for putting
1259 the chip into deep sleep mode.
1260 \param hHal - The handle returned by macOpen.
1261 \param event - the event that has occurred
1262 \return eHalStatus
1263 ---------------------------------------------------------------------------*/
1264extern eHalStatus sme_SignalPowerEvent (
1265 tHalHandle hHal,
1266 tPmcPowerEvent event);
1267
1268/* ---------------------------------------------------------------------------
1269 \fn sme_EnablePowerSave
1270 \brief Enables one of the power saving modes. This API does not cause a
1271 device state change. This is purely a configuration API.
1272 \param hHal - The handle returned by macOpen.
1273 \param psMode - The power saving mode to enable.
1274 \return eHalStatus
1275 ---------------------------------------------------------------------------*/
1276extern eHalStatus sme_EnablePowerSave (
1277 tHalHandle hHal,
1278 tPmcPowerSavingMode psMode);
1279
1280/* ---------------------------------------------------------------------------
1281 \fn sme_DisablePowerSave
1282 \brief Disables one of the power saving modes.Disabling does not imply
1283 that device will be brought out of the current PS mode. This is
1284 purely a configuration API.
1285 \param hHal - The handle returned by macOpen.
1286 \param psMode - The power saving mode to disable.
1287 \return eHalStatus
1288 ---------------------------------------------------------------------------*/
1289extern eHalStatus sme_DisablePowerSave (
1290 tHalHandle hHal,
1291 tPmcPowerSavingMode psMode);
1292
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301293 /* ---------------------------------------------------------------------------
1294 \fn sme_SetHostPowerSave
1295 \brief The BMPS logic is controlled by the User level Apps
1296 \param hHal - The handle returned by macOpen.
1297 \param psMode - The power saving mode to enable.
1298 \return eHalStatus
1299 ---------------------------------------------------------------------------*/
1300extern eHalStatus sme_SetHostPowerSave (
1301 tHalHandle hHal,
1302 v_BOOL_t psMode);
1303
Jeff Johnson295189b2012-06-20 16:38:30 -07001304/* ---------------------------------------------------------------------------
1305 \fn sme_StartAutoBmpsTimer
1306 \brief Starts a timer that periodically polls all the registered
1307 module for entry into Bmps mode. This timer is started only if BMPS is
1308 enabled and whenever the device is in full power.
1309 \param hHal - The handle returned by macOpen.
1310 \return eHalStatus
1311 ---------------------------------------------------------------------------*/
1312extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1313
1314/* ---------------------------------------------------------------------------
1315 \fn sme_StopAutoBmpsTimer
1316 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1317 Stopping the timer does not cause a device state change. Only the timer
1318 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1319 \param hHal - The handle returned by macOpen.
1320 \return eHalStatus
1321 ---------------------------------------------------------------------------*/
1322extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1323
1324/* ---------------------------------------------------------------------------
1325 \fn sme_QueryPowerState
1326 \brief Returns the current power state of the device.
1327 \param hHal - The handle returned by macOpen.
1328 \param pPowerState - pointer to location to return power state
1329 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1330 \return eHalStatus
1331 ---------------------------------------------------------------------------*/
1332extern eHalStatus sme_QueryPowerState (
1333 tHalHandle hHal,
1334 tPmcPowerState *pPowerState,
1335 tPmcSwitchState *pSwWlanSwitchState);
1336
1337/* ---------------------------------------------------------------------------
1338 \fn sme_IsPowerSaveEnabled
1339 \brief Checks if the device is able to enter a particular power save mode
1340 This does not imply that the device is in a particular PS mode
1341 \param hHal - The handle returned by macOpen.
1342 \param psMode - the power saving mode
1343 \return eHalStatus
1344 ---------------------------------------------------------------------------*/
1345extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1346 tHalHandle hHal,
1347 tPmcPowerSavingMode psMode);
1348
1349/* ---------------------------------------------------------------------------
1350 \fn sme_RequestFullPower
1351 \brief Request that the device be brought to full power state.
1352 Note 1: If "fullPowerReason" specificied in this API is set to
1353 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1354 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1355 HDD is requesting full power, we need to undo any previous HDD requests for
1356 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1357 specified anything other than above, the buffered requests for BMPS and WoWL
1358 will not be cleared.
1359 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1360 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1361 request".
1362 Note 3: When the device finally enters Full Power PMC will start a timer
1363 if any of the following holds true:
1364 - Auto BMPS mode is enabled
1365 - Uapsd request is pending
1366 - HDD's request for BMPS is pending
1367 - HDD's request for WoWL is pending
1368 On timer expiry PMC will attempt to put the device in BMPS mode if following
1369 (in addition to those listed above) holds true:
1370 - Polling of all modules through the Power Save Check routine passes
1371 - STA is associated to an access point
1372 \param hHal - The handle returned by macOpen.
1373 \param - callbackRoutine Callback routine invoked in case of success/failure
1374 \param - callbackContext - Cookie to be passed back during callback
1375 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1376 distinguish between BAP and HDD requests
1377 \return eHalStatus - status
1378 eHAL_STATUS_SUCCESS - device brought to full power state
1379 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1380 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1381 ---------------------------------------------------------------------------*/
1382extern eHalStatus sme_RequestFullPower (
1383 tHalHandle hHal,
1384 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1385 void *callbackContext,
1386 tRequestFullPowerReason fullPowerReason);
1387
1388/* ---------------------------------------------------------------------------
1389 \fn sme_RequestBmps
1390 \brief Request that the device be put in BMPS state. Request will be
1391 accepted only if BMPS mode is enabled and power save check routine
1392 passes. Only HDD should invoke this API.
1393 \param hHal - The handle returned by macOpen.
1394 \param - callbackRoutine Callback routine invoked in case of success/failure
1395 \param - callbackContext - Cookie to be passed back during callback
1396 \return eHalStatus
1397 eHAL_STATUS_SUCCESS - device is in BMPS state
1398 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1399 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1400 ---------------------------------------------------------------------------*/
1401extern eHalStatus sme_RequestBmps (
1402 tHalHandle hHal,
1403 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1404 void *callbackContext);
1405
1406/* ---------------------------------------------------------------------------
1407 \fn sme_SetDHCPTillPowerActiveFlag
1408 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1409 entry by PMC
1410 \param hHal - The handle returned by macOpen.
1411 ---------------------------------------------------------------------------*/
1412void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1413
1414
1415/* ---------------------------------------------------------------------------
1416 \fn sme_StartUapsd
1417 \brief Request that the device be put in UAPSD state. If the device is in
1418 Full Power it will be put in BMPS mode first and then into UAPSD
1419 mode.
1420 \param hHal - The handle returned by macOpen.
1421 \param - callbackRoutine Callback routine invoked in case of success/failure
1422 \param - callbackContext - Cookie to be passed back during callback
1423 eHAL_STATUS_SUCCESS - device is in UAPSD state
1424 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1425 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1426 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1427 \return eHalStatus
1428 ---------------------------------------------------------------------------*/
1429extern eHalStatus sme_StartUapsd (
1430 tHalHandle hHal,
1431 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1432 void *callbackContext);
1433
1434/* ---------------------------------------------------------------------------
1435 \fn sme_StopUapsd
1436 \brief Request that the device be put out of UAPSD state. Device will be
1437 put in in BMPS state after stop UAPSD completes. Buffered requests for
1438 UAPSD will be cleared after this.
1439 \param hHal - The handle returned by macOpen.
1440 \return eHalStatus
1441 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1442 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1443 ---------------------------------------------------------------------------*/
1444extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1445
1446/* ---------------------------------------------------------------------------
1447 \fn sme_RequestStandby
1448 \brief Request that the device be put in standby. It is HDD's responsibility
1449 to bring the chip to full power and do a discconnect before calling
1450 this API. Request for standby will be rejected if STA is associated
1451 to an AP.
1452 \param hHal - The handle returned by macOpen.
1453 \param - callbackRoutine Callback routine invoked in case of success/failure
1454 \param - callbackContext - Cookie to be passed back during callback
1455 \return eHalStatus
1456 eHAL_STATUS_SUCCESS - device is in Standby mode
1457 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1458 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1459 ---------------------------------------------------------------------------*/
1460extern eHalStatus sme_RequestStandby (
1461 tHalHandle hHal,
1462 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1463 void *callbackContext);
1464
1465/* ---------------------------------------------------------------------------
1466 \fn sme_RegisterPowerSaveCheck
1467 \brief Register a power save check routine that is called whenever
1468 the device is about to enter one of the power save modes.
1469 \param hHal - The handle returned by macOpen.
1470 \param checkRoutine - Power save check routine to be registered
1471 \param callbackContext - Cookie to be passed back during callback
1472 \return eHalStatus
1473 eHAL_STATUS_SUCCESS - successfully registered
1474 eHAL_STATUS_FAILURE - not successfully registered
1475 ---------------------------------------------------------------------------*/
1476extern eHalStatus sme_RegisterPowerSaveCheck (
1477 tHalHandle hHal,
1478 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1479
1480/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301481 \fn sme_Register11dScanDoneCallback
1482 \brief Register a routine of type csrScanCompleteCallback which is
1483 called whenever an 11d scan is done
1484 \param hHal - The handle returned by macOpen.
1485 \param callback - 11d scan complete routine to be registered
1486 \return eHalStatus
1487 ---------------------------------------------------------------------------*/
1488extern eHalStatus sme_Register11dScanDoneCallback (
1489 tHalHandle hHal,
1490 csrScanCompleteCallback);
1491
1492/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001493 \fn sme_DeregisterPowerSaveCheck
1494 \brief Deregister a power save check routine
1495 \param hHal - The handle returned by macOpen.
1496 \param checkRoutine - Power save check routine to be deregistered
1497 \return eHalStatus
1498 eHAL_STATUS_SUCCESS - successfully deregistered
1499 eHAL_STATUS_FAILURE - not successfully deregistered
1500 ---------------------------------------------------------------------------*/
1501extern eHalStatus sme_DeregisterPowerSaveCheck (
1502 tHalHandle hHal,
1503 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1504
1505/* ---------------------------------------------------------------------------
1506 \fn sme_RegisterDeviceStateUpdateInd
1507 \brief Register a callback routine that is called whenever
1508 the device enters a new device state (Full Power, BMPS, UAPSD)
1509 \param hHal - The handle returned by macOpen.
1510 \param callbackRoutine - Callback routine to be registered
1511 \param callbackContext - Cookie to be passed back during callback
1512 \return eHalStatus
1513 eHAL_STATUS_SUCCESS - successfully registered
1514 eHAL_STATUS_FAILURE - not successfully registered
1515 ---------------------------------------------------------------------------*/
1516extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1517 tHalHandle hHal,
1518 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1519 void *callbackContext);
1520
1521/* ---------------------------------------------------------------------------
1522 \fn sme_DeregisterDeviceStateUpdateInd
1523 \brief Deregister a routine that was registered for device state changes
1524 \param hHal - The handle returned by macOpen.
1525 \param callbackRoutine - Callback routine to be deregistered
1526 \return eHalStatus
1527 eHAL_STATUS_SUCCESS - successfully deregistered
1528 eHAL_STATUS_FAILURE - not successfully deregistered
1529 ---------------------------------------------------------------------------*/
1530extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1531 tHalHandle hHal,
1532 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1533
1534/* ---------------------------------------------------------------------------
1535 \fn sme_WowlAddBcastPattern
1536 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1537 do a pattern match on these patterns when Wowl is enabled during BMPS
1538 mode.
1539 \param hHal - The handle returned by macOpen.
1540 \param pattern - Pattern to be added
1541 \return eHalStatus
1542 eHAL_STATUS_FAILURE Cannot add pattern
1543 eHAL_STATUS_SUCCESS Request accepted.
1544 ---------------------------------------------------------------------------*/
1545extern eHalStatus sme_WowlAddBcastPattern (
1546 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001547 tpSirWowlAddBcastPtrn pattern,
1548 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001549
1550/* ---------------------------------------------------------------------------
1551 \fn sme_WowlDelBcastPattern
1552 \brief Delete a pattern that was added for Pattern Byte Matching.
1553 \param hHal - The handle returned by macOpen.
1554 \param pattern - Pattern to be deleted
1555 \return eHalStatus
1556 eHAL_STATUS_FAILURE Cannot delete pattern
1557 eHAL_STATUS_SUCCESS Request accepted.
1558 ---------------------------------------------------------------------------*/
1559extern eHalStatus sme_WowlDelBcastPattern (
1560 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001561 tpSirWowlDelBcastPtrn pattern,
1562 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001563
1564/* ---------------------------------------------------------------------------
1565 \fn sme_EnterWowl
1566 \brief This is the API to request entry into WOWL mode.
1567 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1568 SME will will cache the information that WOWL has been requested and
1569 attempt to put the device in BMPS first. On entry into BMPS, SME will
1570 enter the WOWL mode.
1571 Note 1: After WoWL request is accepted, If module other than HDD requests
1572 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1573 and attempt to put the chip into BMPS+WOWL based on a timer.
1574 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1575 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1576 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1577 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1578 are required. Currently there is no requirement or use case to support UAPSD
1579 and WOWL at the same time.
1580 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1581 Note 5. Request for WoWL is rejected if BMPS is disabled.
1582
1583 \param hHal - The handle returned by macOpen.
1584 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1585 Used for success/failure notification by SME
1586 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1587 at the time of callback.
1588 \param wakeReasonIndCB - Callback routine provided by HDD.
1589 Used for Wake Reason Indication by SME
1590 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1591 at the time of callback.
1592 \return eHalStatus
1593 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1594 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1595 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1596 mode is entered.
1597 ---------------------------------------------------------------------------*/
1598extern eHalStatus sme_EnterWowl (
1599 tHalHandle hHal,
1600 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1601 void *enterWowlCallbackContext,
1602#ifdef WLAN_WAKEUP_EVENTS
1603 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1604 void *wakeReasonIndCBContext,
1605#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001606 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001607
1608/* ---------------------------------------------------------------------------
1609 \fn sme_ExitWowl
1610 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1611 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1612 mode. Any Buffered request for WoWL will be cleared after this API.
1613 \param hHal - The handle returned by macOpen.
1614 \return eHalStatus
1615 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1616 only if the previous "Enter WOWL" transaction has
1617 not even completed.
1618 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1619 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301620extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001621
1622/* ---------------------------------------------------------------------------
1623
1624 \fn sme_RoamSetKey
1625
1626 \brief To set encryption key. This function should be called only when connected
1627 This is an asynchronous API.
1628
1629 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1630
1631 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1632
1633 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1634
1635 FAILURE or RESOURCES The API finished and failed.
1636
1637 -------------------------------------------------------------------------------*/
1638eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1639
1640/* ---------------------------------------------------------------------------
1641
1642 \fn sme_RoamRemoveKey
1643
1644 \brief To set encryption key. This is an asynchronous API.
1645
1646 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1647
1648 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1649
1650 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1651
1652 FAILURE or RESOURCES The API finished and failed.
1653
1654 -------------------------------------------------------------------------------*/
1655eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1656
1657
1658/* ---------------------------------------------------------------------------
1659
1660 \fn sme_GetCountryCode
1661
1662 \brief To return the current country code. If no country code is applied, default country code is
1663 used to fill the buffer.
1664 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1665 This is a synchronous API.
1666
1667 \param pBuf - pointer to a caller allocated buffer for returned country code.
1668
1669 \param pbLen For input, this parameter indicates how big is the buffer.
1670 Upon return, this parameter has the number of bytes for country. If pBuf
1671 doesn't have enough space, this function returns
1672 fail status and this parameter contains the number that is needed.
1673
1674 \return eHalStatus SUCCESS.
1675
1676 FAILURE or RESOURCES The API finished and failed.
1677
1678 -------------------------------------------------------------------------------*/
1679eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1680
1681/* ---------------------------------------------------------------------------
1682
1683 \fn sme_SetCountryCode
1684
1685 \brief To change the current/default country code.
1686 If 11d supported is turned off, an error is return.
1687 This is a synchronous API.
1688
1689 \param pCountry - pointer to a caller allocated buffer for the country code.
1690
1691 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1692 whether a reset is required.
1693
1694 \return eHalStatus SUCCESS.
1695
1696 FAILURE or RESOURCES The API finished and failed.
1697
1698 -------------------------------------------------------------------------------*/
1699eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1700
1701/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301702
1703 \fn sme_InitChannels
1704
1705 \brief Used to initialize CSR channel lists while driver loading
1706
1707 \param hHal - global pMac structure
1708
1709 \return eHalStatus SUCCESS.
1710
1711 FAILURE or RESOURCES The API finished and failed.
1712
1713 -------------------------------------------------------------------------------*/
1714eHalStatus sme_InitChannels(tHalHandle hHal);
1715
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301716
Mihir Shete04206452014-11-20 17:50:58 +05301717#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301718/* ---------------------------------------------------------------------------
1719 \fn sme_InitChannelsForCC
1720
1721 \brief Used to issue regulatory hint to user
1722
1723 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301724 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301725
1726 \return eHalStatus SUCCESS.
1727
1728 FAILURE or RESOURCES The API finished and failed.
1729
1730 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301731eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301732#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301733
Mihir Shetee1093ba2014-01-21 20:13:32 +05301734/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001735 \fn sme_ResetCountryCodeInformation
1736 \brief this function is to reset the country code current being used back to EEPROM default
1737 this includes channel list and power setting. This is a synchronous API.
1738 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1739 a restart is needed to apply the change
1740 \return eHalStatus
1741 -------------------------------------------------------------------------------*/
1742eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1743
1744/* ---------------------------------------------------------------------------
1745 \fn sme_GetSupportedCountryCode
1746 \brief this function is to get a list of the country code current being supported
1747 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1748 this has the country code list. 3 bytes for each country code. This may be NULL if
1749 caller wants to know the needed byte count.
1750 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1751 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1752 \return eHalStatus
1753 -------------------------------------------------------------------------------*/
1754eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1755
1756/* ---------------------------------------------------------------------------
1757 \fn sme_GetCurrentRegulatoryDomain
1758 \brief this function is to get the current regulatory domain. This is a synchronous API.
1759 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1760 SME. The function fails if 11d support is turned off.
1761 \param pDomain - Caller allocated buffer to return the current domain.
1762 \return eHalStatus SUCCESS.
1763
1764 FAILURE or RESOURCES The API finished and failed.
1765 -------------------------------------------------------------------------------*/
1766eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1767
1768/* ---------------------------------------------------------------------------
1769 \fn sme_SetRegulatoryDomain
1770 \brief this function is to set the current regulatory domain.
1771 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1772 SME. This is a synchronous API.
1773 \param domainId - indicate the domain (defined in the driver) needs to set to.
1774 See v_REGDOMAIN_t for definition
1775 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1776 a restart is needed to apply the change
1777 \return eHalStatus
1778 -------------------------------------------------------------------------------*/
1779eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1780
1781/* ---------------------------------------------------------------------------
1782
1783 \fn sme_GetRegulatoryDomainForCountry
1784
1785 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1786
1787 \param pCountry - pointer to a caller allocated buffer for input country code.
1788
1789 \param pDomainId Upon successful return, it is the domain that country belongs to.
1790 If it is NULL, returning success means that the country code is known.
1791
1792 \return eHalStatus SUCCESS.
1793
1794 FAILURE or RESOURCES The API finished and failed.
1795
1796 -------------------------------------------------------------------------------*/
1797eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1798
1799
1800
1801/* ---------------------------------------------------------------------------
1802
1803 \fn sme_GetSupportedRegulatoryDomains
1804
1805 \brief To return a list of supported regulatory domains. This is a synchronous API.
1806
1807 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1808
1809 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1810 Upon return, this parameter has the number for supported domains. If pDomains
1811 doesn't have enough space for all the supported domains, this function returns
1812 fail status and this parameter contains the number that is needed.
1813
1814 \return eHalStatus SUCCESS.
1815
1816 FAILURE or RESOURCES The API finished and failed.
1817
1818 -------------------------------------------------------------------------------*/
1819eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1820
1821//some support functions
1822tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1823tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1824tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1825//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1826eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1827
1828typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1829/* ---------------------------------------------------------------------------
1830
1831 \fn sme_ChangeCountryCode
1832
1833 \brief Change Country code from upperlayer during WLAN driver operation.
1834 This is a synchronous API.
1835
1836 \param hHal - The handle returned by macOpen.
1837
1838 \param pCountry New Country Code String
1839
Abhishek Singha306a442013-11-07 18:39:01 +05301840 \param sendRegHint If we want to send reg hint to nl80211
1841
Jeff Johnson295189b2012-06-20 16:38:30 -07001842 \return eHalStatus SUCCESS.
1843
1844 FAILURE or RESOURCES The API finished and failed.
1845
1846 -------------------------------------------------------------------------------*/
1847eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1848 tSmeChangeCountryCallback callback,
1849 tANI_U8 *pCountry,
1850 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301851 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301852 tAniBool countryFromUserSpace,
1853 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001854
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301855/* ---------------------------------------------------------------------------
1856
Amar Singhal0d15bd52013-10-12 23:13:13 -07001857 \fn sme_GenericChangeCountryCode
1858
1859 \brief Generic API to change country code
1860
1861 \param hHal - The handle returned by macOpen.
1862
1863 \param pCountry New Country Code String
1864
1865 \param reg_domain Regulatory domain for the new country code
1866
1867 \return eHalStatus SUCCESS.
1868
1869 FAILURE or RESOURCES The API finished and failed.
1870
1871 -------------------------------------------------------------------------------*/
1872eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1873 tANI_U8 *pCountry,
1874 v_REGDOMAIN_t reg_domain);
1875
Abhishek Singh00b71972016-01-07 10:51:04 +05301876#ifdef WLAN_FEATURE_RMC
1877/* ---------------------------------------------------------------------------
1878
1879 \fn sme_TXFailMonitorStartStopInd
1880
1881 \brief Indicate FW about TX Fail Monitor Indication`
1882
1883 \param hHal - The handle returned by macOpen.
1884
1885 \param tx_fail_count number of failures after which the firmware sends
1886 an indication to host
1887
1888 \param txFailIndCallback function to be called after receiving TX Fail
1889 indication
1890 \return eHalStatus SUCCESS.
1891
1892 FAILURE or RESOURCES The API finished and failed.
1893
1894 -------------------------------------------------------------------------------*/
1895eHalStatus sme_TXFailMonitorStartStopInd(tHalHandle hHal,
1896 tANI_U8 tx_fail_count,
1897 void * txFailIndCallback);
1898#endif /* WLAN_FEATURE_RMC */
1899
Kapil Gupta04ab1992016-06-26 13:36:51 +05301900#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1901VOS_STATUS sme_set_per_roam_rxconfig (tHalHandle hHal, v_U8_t sessionId,
1902 v_U16_t minRate, v_U16_t maxRate, v_U8_t minPercentage,
1903 v_U16_t minPktRequired, v_U64_t waitPeriodForNextPERScan);
1904
1905VOS_STATUS sme_unset_per_roam_rxconfig (tHalHandle hHal);
1906
1907void sme_PERRoamScanStartStop(void *hHal, tANI_U8 start);
1908#endif
1909
Amar Singhal0d15bd52013-10-12 23:13:13 -07001910/* ---------------------------------------------------------------------------
1911
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301912 \fn sme_DHCPStartInd
1913
1914 \brief Indicate FW about DHCP start event.
1915
1916 \param hHal - The handle returned by macOpen.
1917
1918 \param device_mode the mode of the device
1919
c_hpothu0b0cab72014-02-13 21:52:40 +05301920 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301921
1922 \return eHalStatus SUCCESS.
1923
1924 FAILURE or RESOURCES The API finished and failed.
1925
1926 -------------------------------------------------------------------------------*/
1927
1928eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1929 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301930 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301931
1932/* ---------------------------------------------------------------------------
1933
1934 \fn sme_DHCPStopInd
1935
1936 \brief Indicate FW about DHCP stop event.
1937
1938 \param hHal - The handle returned by macOpen.
1939
1940 \param device_mode the mode of the device
1941
c_hpothu0b0cab72014-02-13 21:52:40 +05301942 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301943
1944 \return eHalStatus SUCCESS.
1945
1946 FAILURE or RESOURCES The API finished and failed.
1947
1948 -------------------------------------------------------------------------------*/
1949eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1950 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301951 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301952
Jeff Johnson295189b2012-06-20 16:38:30 -07001953
1954/* ---------------------------------------------------------------------------
1955 \fn sme_BtcSignalBtEvent
1956 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1957 BT event type and the current operating mode of Libra (full power,
1958 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1959 would be employed.
1960 \param hHal - The handle returned by macOpen.
1961 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1962 Caller owns the memory and is responsible for freeing it.
1963 \return VOS_STATUS
1964 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1965 if driver has not yet been initialized or if BTC
1966 Events Layer has been disabled.
1967 VOS_STATUS_SUCCESS BT Event passed to HAL
1968 ---------------------------------------------------------------------------*/
1969VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1970
1971/* ---------------------------------------------------------------------------
1972 \fn sme_BtcSetConfig
1973 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1974 This function should be invoked only after CFG download has completed.
1975 Calling it after sme_HDDReadyInd is recommended.
1976 \param hHal - The handle returned by macOpen.
1977 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1978 tSmeBtcConfig. Caller owns the memory and is responsible
1979 for freeing it.
1980 \return VOS_STATUS
1981 VOS_STATUS_E_FAILURE Config not passed to HAL.
1982 VOS_STATUS_SUCCESS Config passed to HAL
1983 ---------------------------------------------------------------------------*/
1984VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1985
1986/* ---------------------------------------------------------------------------
1987 \fn sme_BtcGetConfig
1988 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1989 \param hHal - The handle returned by macOpen.
1990 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1991 Caller owns the memory and is responsible for freeing it.
1992 \return VOS_STATUS
1993 VOS_STATUS_E_FAILURE - failure
1994 VOS_STATUS_SUCCESS success
1995 ---------------------------------------------------------------------------*/
1996VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1997
1998/* ---------------------------------------------------------------------------
1999 \fn sme_SetCfgPrivacy
2000 \brief API to set configure privacy parameters
2001 \param hHal - The handle returned by macOpen.
2002 \param pProfile - Pointer CSR Roam profile.
2003 \param fPrivacy - This parameter indicates status of privacy
2004
2005 \return void
2006 ---------------------------------------------------------------------------*/
2007void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
2008
2009#if defined WLAN_FEATURE_VOWIFI
2010/* ---------------------------------------------------------------------------
2011 \fn sme_NeighborReportRequest
2012 \brief API to request neighbor report.
2013 \param hHal - The handle returned by macOpen.
2014 \param pRrmNeighborReq - Pointer to a caller allocated object of type
2015 tRrmNeighborReq. Caller owns the memory and is responsible
2016 for freeing it.
2017 \return VOS_STATUS
2018 VOS_STATUS_E_FAILURE - failure
2019 VOS_STATUS_SUCCESS success
2020 ---------------------------------------------------------------------------*/
2021VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
2022 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
2023#endif
2024
2025//The following are debug APIs to support direct read/write register/memory
2026//They are placed in SME because HW cannot be access when in LOW_POWER state
2027//AND not connected. The knowledge and synchronization is done in SME
2028
2029//sme_DbgReadRegister
2030//Caller needs to validate the input values
2031VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
2032
2033//sme_DbgWriteRegister
2034//Caller needs to validate the input values
2035VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
2036
2037//sme_DbgReadMemory
2038//Caller needs to validate the input values
2039//pBuf caller allocated buffer has the length of nLen
2040VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2041
2042//sme_DbgWriteMemory
2043//Caller needs to validate the input values
2044VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2045
Jeff Johnson295189b2012-06-20 16:38:30 -07002046VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
2047 tSirVersionType *pVersion);
2048VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
2049 tSirVersionType *pVersion);
2050VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
2051 tANI_U8 *pVersion,
2052 tANI_U32 versionBufferSize);
2053VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
2054 tANI_U8 *pVersion,
2055 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07002056eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
2057 csrRoamCompleteCallback callback,
2058 void *pContext);
2059
2060#ifdef FEATURE_WLAN_WAPI
2061/* ---------------------------------------------------------------------------
2062 \fn sme_RoamSetBKIDCache
2063 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
2064 candidate list.
2065 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2066 it is opened (by calling halOpen).
2067 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
2068 \param numItems - a variable that has the number of tBkidCacheInfo allocated
2069 when retruning, this is the number of items put into pBKIDCache
2070 \return eHalStatus - when fail, it usually means the buffer allocated is not
2071 big enough and pNumItems has the number of tBkidCacheInfo.
2072 ---------------------------------------------------------------------------*/
2073eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
2074 tANI_U32 numItems );
2075
2076/* ---------------------------------------------------------------------------
2077 \fn sme_RoamGetBKIDCache
2078 \brief The SME API exposed to HDD to allow HDD to request SME to return its
2079 BKID cache.
2080 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2081 it is opened (by calling halOpen).
2082 \param pNum - caller allocated memory that has the space of the number of
2083 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
2084 in SME cache.
2085 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
2086 upon return
2087 \return eHalStatus - when fail, it usually means the buffer allocated is not
2088 big enough.
2089 ---------------------------------------------------------------------------*/
2090eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
2091 tBkidCacheInfo *pBkidCache);
2092
2093/* ---------------------------------------------------------------------------
2094 \fn sme_RoamGetNumBKIDCache
2095 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2096 number of BKID cache entries.
2097 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2098 it is opened (by calling halOpen).
2099 \return tANI_U32 - the number of BKID cache entries.
2100 ---------------------------------------------------------------------------*/
2101tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2102
2103/* ---------------------------------------------------------------------------
2104 \fn sme_ScanGetBKIDCandidateList
2105 \brief a wrapper function to return the BKID candidate list
2106 \param pBkidList - caller allocated buffer point to an array of
2107 tBkidCandidateInfo
2108 \param pNumItems - pointer to a variable that has the number of
2109 tBkidCandidateInfo allocated when retruning, this is
2110 either the number needed or number of items put into
2111 pPmkidList
2112 \return eHalStatus - when fail, it usually means the buffer allocated is not
2113 big enough and pNumItems
2114 has the number of tBkidCandidateInfo.
2115 \Note: pNumItems is a number of tBkidCandidateInfo,
2116 not sizeof(tBkidCandidateInfo) * something
2117 ---------------------------------------------------------------------------*/
2118eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2119 tBkidCandidateInfo *pBkidList,
2120 tANI_U32 *pNumItems );
2121#endif /* FEATURE_WLAN_WAPI */
2122
Jeff Johnsone7245742012-09-05 17:12:55 -07002123#ifdef FEATURE_OEM_DATA_SUPPORT
2124/********************************************************************************************
2125 Oem data related modifications
2126*********************************************************************************************/
2127/* ---------------------------------------------------------------------------
2128 \fn sme_OemDataReq
2129 \param sessionId - session id of session to be used for oem data req.
2130 \param pOemDataReqID - pointer to an object to get back the request ID
2131 \param callback - a callback function that is called upon finish
2132 \param pContext - a pointer passed in for the callback
2133 \return eHalStatus
2134 ---------------------------------------------------------------------------*/
2135eHalStatus sme_OemDataReq(tHalHandle hHal,
2136 tANI_U8 sessionId,
2137 tOemDataReqConfig *,
2138 tANI_U32 *pOemDataReqID,
2139 oemData_OemDataReqCompleteCallback callback,
2140 void *pContext);
2141
2142/* ---------------------------------------------------------------------------
2143 \fn sme_getOemDataRsp
2144 \param pOemDataRsp - A pointer to the response object
2145 \param pOemDataReqID - pointer to an object to get back the request ID
2146 \return eHalStatus
2147 ---------------------------------------------------------------------------*/
2148eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2149 tOemDataRsp **pOemDataRsp);
2150
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +05302151/* ---------------------------------------------------------------------------
2152 \fn sme_OemDataReqNew
2153 \brief a wrapper function for OEM DATA REQ NEW
2154 \param pOemDataReqNewConfig - Data to be passed to FW
2155 ---------------------------------------------------------------------------*/
2156void sme_OemDataReqNew(tHalHandle hHal,
2157 tOemDataReqNewConfig *pOemDataReqNewConfig);
2158
Jeff Johnsone7245742012-09-05 17:12:55 -07002159#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002160
2161
Jeff Johnson295189b2012-06-20 16:38:30 -07002162
2163/* ---------------------------------------------------------------------------
2164
2165 \fn sme_RoamUpdateAPWPSIE
2166
2167 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2168 This is an asynchronous API.
2169
2170 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2171
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002172 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002173
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002174 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002175
2176 -------------------------------------------------------------------------------*/
2177
2178eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2179/* ---------------------------------------------------------------------------
2180
2181 \fn sme_RoamUpdateAPWPARSNIEs
2182
2183 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2184 This is an asynchronous API.
2185
2186 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2187
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002188 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002189
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002190 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002191
2192 -------------------------------------------------------------------------------*/
2193eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2194
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002195/* ---------------------------------------------------------------------------
2196
2197 sme_ChangeMCCBeaconInterval
2198
2199 \brief To update P2P-GO's beacon Interval.
2200
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002201 \return eHalStatus SUCCESS
2202 FAILURE or RESOURCES
2203 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002204 -------------------------------------------------------------------------------*/
2205eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2206
2207
Jeff Johnson295189b2012-06-20 16:38:30 -07002208
2209/* ---------------------------------------------------------------------------
2210 \fn sme_sendBTAmpEvent
2211 \brief API to send the btAMPstate to FW
2212 \param hHal - The handle returned by macOpen.
2213 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002214 \return eHalStatus SUCCESS
2215 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002216
2217--------------------------------------------------------------------------- */
2218
2219eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2220
2221
2222
2223/* ---------------------------------------------------------------------------
2224 \fn sme_SetHostOffload
2225 \brief API to set the host offload feature.
2226 \param hHal - The handle returned by macOpen.
2227 \param pRequest - Pointer to the offload request.
2228 \return eHalStatus
2229 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002230eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2231 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002232
2233/* ---------------------------------------------------------------------------
2234 \fn sme_SetKeepAlive
2235 \brief API to set the Keep Alive feature.
2236 \param hHal - The handle returned by macOpen.
2237 \param pRequest - Pointer to the Keep Alive request.
2238 \return eHalStatus
2239 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002240eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2241 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002242
Jeff Johnson295189b2012-06-20 16:38:30 -07002243/* ----------------------------------------------------------------------------
2244 \fn sme_GetOperationChannel
2245 \brief API to get current channel on which STA is parked
2246 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002247 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002248 \returns eHAL_STATUS_SUCCESS
2249 eHAL_STATUS_FAILURE
2250-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002251eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002252
Abhishek Singh7d624e12015-11-30 14:29:27 +05302253eHalStatus sme_register_mgmt_frame_ind_callback(tHalHandle hHal,
2254 sir_mgmt_frame_ind_callback callback);
2255
Jeff Johnson295189b2012-06-20 16:38:30 -07002256/* ---------------------------------------------------------------------------
2257
2258 \fn sme_RegisterMgtFrame
2259
2260 \brief To register managment frame of specified type and subtype.
2261 \param frameType - type of the frame that needs to be passed to HDD.
2262 \param matchData - data which needs to be matched before passing frame
2263 to HDD.
2264 \param matchDataLen - Length of matched data.
2265 \return eHalStatus
2266 -------------------------------------------------------------------------------*/
2267eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2268 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2269
2270/* ---------------------------------------------------------------------------
2271
2272 \fn sme_DeregisterMgtFrame
2273
2274 \brief To De-register managment frame of specified type and subtype.
2275 \param frameType - type of the frame that needs to be passed to HDD.
2276 \param matchData - data which needs to be matched before passing frame
2277 to HDD.
2278 \param matchDataLen - Length of matched data.
2279 \return eHalStatus
2280 -------------------------------------------------------------------------------*/
2281eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2282 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302283/* ---------------------------------------------------------------------------
2284 \fn sme_GetFramesLog
2285 \brief a wrapper function that client calls to register a callback to get
2286 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302287 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302288 \return eHalStatus
2289 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302290eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002291/* ---------------------------------------------------------------------------
2292
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302293 \fn sme_InitMgmtFrameLogging
2294
2295 \brief
2296 SME will pass this request to lower mac to initialize Frame Logging.
2297
2298 \param
2299
2300 hHal - The handle returned by macOpen.
2301
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302302 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302303
2304 \return eHalStatus
2305--------------------------------------------------------------------------- */
2306eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302307 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302308
Gupta, Kapil7c34b322015-09-30 13:12:35 +05302309
2310/* ---------------------------------------------------------------------------
2311
2312 \fn sme_StopRssiMonitoring
2313
2314 \brief
2315 SME will pass this request to lower mac to stop monitoring rssi range on
2316 a bssid.
2317
2318 \param
2319
2320 hHal - The handle returned by macOpen.
2321
2322 tSirRssiMonitorReq req- depict the monitor req params.
2323
2324 \return eHalStatus
2325
2326--------------------------------------------------------------------------- */
2327eHalStatus sme_StopRssiMonitoring(tHalHandle hHal,
2328 tSirRssiMonitorReq *req);
2329
2330/* ---------------------------------------------------------------------------
2331
2332 \fn sme_StartRssiMonitoring
2333
2334 \brief
2335 SME will pass this request to lower mac to start monitoring rssi range on
2336 a bssid.
2337
2338 \param
2339
2340 hHal - The handle returned by macOpen.
2341
2342 tSirRssiMonitorReq req- depict the monitor req params.
2343
2344 \return eHalStatus
2345
2346--------------------------------------------------------------------------- */
2347eHalStatus sme_StartRssiMonitoring(tHalHandle hHal,
2348 tSirRssiMonitorReq *req);
2349
2350
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302351/* ---------------------------------------------------------------------------
2352
Jeff Johnson295189b2012-06-20 16:38:30 -07002353 \fn sme_ConfigureRxpFilter
2354
2355 \brief
2356 SME will pass this request to lower mac to set/reset the filter on RXP for
2357 multicast & broadcast traffic.
2358
2359 \param
2360
2361 hHal - The handle returned by macOpen.
2362
2363 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2364 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2365 on this param. In future we can use this as a mask to set various types of
2366 filters as suggested below:
2367 FILTER_ALL_MULTICAST:
2368 FILTER_ALL_BROADCAST:
2369 FILTER_ALL_MULTICAST_BROADCAST:
2370
2371
2372 \return eHalStatus
2373
2374
2375--------------------------------------------------------------------------- */
2376eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2377 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2378
2379/* ---------------------------------------------------------------------------
2380
2381 \fn sme_ConfigureAppsCpuWakeupState
2382
2383 \brief
2384 SME will pass this request to lower mac to dynamically adjusts the listen
2385 interval based on the WLAN/MSM activity. This feature is named as
2386 Telescopic Beacon wakeup feature.
2387
2388 \param
2389
2390 hHal - The handle returned by macOpen.
2391
2392 isAppsAwake- Depicts the state of the Apps CPU
2393
2394
2395 \return eHalStatus
2396
2397
2398--------------------------------------------------------------------------- */
2399eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2400
Jeff Johnson295189b2012-06-20 16:38:30 -07002401/* ---------------------------------------------------------------------------
2402
2403 \fn sme_ConfigureSuspendInd
2404
2405 \brief
2406 SME will pass this request to lower mac to Indicate that the wlan needs to
2407 be suspended
2408
2409 \param
2410
2411 hHal - The handle returned by macOpen.
2412
2413 wlanSuspendParam- Depicts the wlan suspend params
2414
2415
2416 \return eHalStatus
2417
2418
2419--------------------------------------------------------------------------- */
2420eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2421 tpSirWlanSuspendParam wlanSuspendParam);
2422
2423/* ---------------------------------------------------------------------------
2424
2425 \fn sme_ConfigureResumeReq
2426
2427 \brief
2428 SME will pass this request to lower mac to Indicate that the wlan needs to
2429 be Resumed
2430
2431 \param
2432
2433 hHal - The handle returned by macOpen.
2434
2435 wlanResumeParam- Depicts the wlan resume params
2436
2437
2438 \return eHalStatus
2439
2440
2441--------------------------------------------------------------------------- */
2442eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2443 tpSirWlanResumeParam wlanResumeParam);
2444
Jeff Johnson295189b2012-06-20 16:38:30 -07002445
2446/* ---------------------------------------------------------------------------
2447
2448 \fn sme_GetInfraSessionId
2449
2450 \brief To get the session ID for infra session, if connected
2451 This is a synchronous API.
2452
2453 \param hHal - The handle returned by macOpen.
2454
2455 \return sessionid, -1 if infra session is not connected
2456
2457 -------------------------------------------------------------------------------*/
2458tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2459
2460/* ---------------------------------------------------------------------------
2461
2462 \fn sme_GetInfraOperationChannel
2463
2464 \brief To get the operating channel for infra session, if connected
2465 This is a synchronous API.
2466
2467 \param hHal - The handle returned by macOpen.
2468 \param sessionId - the sessionId returned by sme_OpenSession.
2469
2470 \return operating channel, 0 if infra session is not connected
2471
2472 -------------------------------------------------------------------------------*/
2473tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2474/* ---------------------------------------------------------------------------
2475
2476 \fn sme_GetConcurrentOperationChannel
2477
2478 \brief To get the operating channel for other concurrent sessions, if connected
2479 This is a synchronous API.
2480
2481 \param hHal - The handle returned by macOpen.
2482 \param currentPersona - persona that is trying to come up.
2483
2484 \return operating channel, 0 if infra session is not connected
2485
2486 -------------------------------------------------------------------------------*/
2487tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2488
2489/* ---------------------------------------------------------------------------
2490 \fn sme_AbortMacScan
2491 \brief API to cancel MAC scan.
2492 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302493 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302494 \return tSirAbortScanStatus return status abort scan
2495
Jeff Johnson295189b2012-06-20 16:38:30 -07002496 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302497tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2498 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002499
2500/* ---------------------------------------------------------------------------
2501 \fn sme_GetCfgValidChannels
2502 \brief API to get valid channel list
2503 \param hHal - The handle returned by macOpen.
2504 \param aValidChannels - Pointer to the valid channel list
2505 \param len - valid channel list length
2506 \return eHalStatus
2507 ---------------------------------------------------------------------------*/
2508eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2509
2510#ifdef FEATURE_WLAN_SCAN_PNO
2511
2512/* ---------------------------------------------------------------------------
2513 \fn sme_SetPreferredNetworkList
2514 \brief API to set the Preferred Network List Offload feature.
2515 \param hHal - The handle returned by macOpen.
2516 \param pRequest - Pointer to the offload request.
2517 \return eHalStatus
2518 ---------------------------------------------------------------------------*/
2519eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2520
2521/* ---------------------------------------------------------------------------
2522 \fn sme_SetRSSIFilter
2523 \brief API to set RSSI Filter feature.
2524 \param hHal - The handle returned by macOpen.
2525 \param pRequest - Pointer to the offload request.
2526 \return eHalStatus
2527 ---------------------------------------------------------------------------*/
2528eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2529
2530/******************************************************************************
2531*
2532* Name: sme_PreferredNetworkFoundInd
2533*
2534* Description:
2535* Invoke Preferred Network Found Indication
2536*
2537* Parameters:
2538* hHal - HAL handle for device
2539* pMsg - found network description
2540*
2541* Returns: eHalStatus
2542*
2543******************************************************************************/
2544eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2545#endif // FEATURE_WLAN_SCAN_PNO
2546
2547/* ---------------------------------------------------------------------------
2548 \fn sme_SetPowerParams
2549 \brief API to set Power Parameters
2550 \param hHal - The handle returned by macOpen.
2551 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002552 \param forced - if true, not to be dropped silently in host, it must reach
2553 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2554 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002555 \return eHalStatus
2556 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002557eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002558
2559/* ---------------------------------------------------------------------------
2560 \fn sme_SetTxPerTracking
2561 \brief Set Tx PER tracking configuration parameters
2562 \param hHal - The handle returned by macOpen.
2563 \param pTxPerTrackingParam - Tx PER configuration parameters
2564 \return eHalStatus
2565 ---------------------------------------------------------------------------*/
2566eHalStatus sme_SetTxPerTracking (
2567 tHalHandle hHal,
2568 void (*pCallbackfn) (void *pCallbackContext),
2569 void *pCallbackContext,
2570 tpSirTxPerTrackingParam pTxPerTrackingParam);
2571
2572#ifdef WLAN_FEATURE_PACKET_FILTERING
2573/* ---------------------------------------------------------------------------
2574 \fn sme_ReceiveFilterSetFilter
2575 \brief API to set 8023 Multicast Address List
2576 \param hHal - The handle returned by macOpen.
2577 \param pMulticastAddrs - Pointer to the Multicast Address List
2578 \return eHalStatus
2579 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002580eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002581
2582/* ---------------------------------------------------------------------------
2583 \fn sme_ReceiveFilterSetFilter
2584 \brief API to set Receive Packet Filter
2585 \param hHal - The handle returned by macOpen.
2586 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2587 \return eHalStatus
2588 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002589eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2590 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002591
2592/* ---------------------------------------------------------------------------
2593 \fn sme_GetFilterMatchCount
2594 \brief API to get D0 PC Filter Match Count
2595 \param hHal - The handle returned by macOpen
2596 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2597 \param callbackContext - Cookie to be passed back during callback
2598 \return eHalStatus
2599 ---------------------------------------------------------------------------*/
2600eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2601 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002602 void *callbackContext,
2603 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002604
2605/* ---------------------------------------------------------------------------
2606 \fn sme_ReceiveFilterClearFilter
2607 \brief API to clear Receive Packet Filter
2608 \param hHal - The handle returned by macOpen.
2609 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2610 \return eHalStatus
2611 ---------------------------------------------------------------------------*/
2612eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002613 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2614 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002615#endif // WLAN_FEATURE_PACKET_FILTERING
2616/* ---------------------------------------------------------------------------
2617
2618 \fn sme_IsChannelValid
2619 \brief To check if the channel is valid for currently established domain
2620 This is a synchronous API.
2621
2622 \param hHal - The handle returned by macOpen.
2623 \param channel - channel to verify
2624
2625 \return TRUE/FALSE, TRUE if channel is valid
2626
2627 -------------------------------------------------------------------------------*/
2628tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2629
2630/* ---------------------------------------------------------------------------
2631 \fn sme_SetFreqBand
2632 \brief Used to set frequency band.
2633 \param hHal
2634 \eBand band value to be configured
2635 \- return eHalStatus
2636 -------------------------------------------------------------------------*/
2637eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2638
2639/* ---------------------------------------------------------------------------
2640 \fn sme_GetFreqBand
2641 \brief Used to get the current band settings.
2642 \param hHal
2643 \pBand pointer to hold the current band value
2644 \- return eHalStatus
2645 -------------------------------------------------------------------------*/
2646eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2647
2648/* ---------------------------------------------------------------------------
2649
2650 \fn sme_SetTxPerTracking
2651 \brief Set Tx PER tracking configuration parameters
2652 \param hHal - The handle returned by macOpen.
2653 \param pTxPerTrackingParam - Tx PER configuration parameters
2654 \return eHalStatus
2655 ---------------------------------------------------------------------------*/
2656eHalStatus sme_SetTxPerTracking (
2657 tHalHandle hHal,
2658 void (*pCallbackfn) (void *pCallbackContext),
2659 void *pCallbackContext,
2660 tpSirTxPerTrackingParam pTxPerTrackingParam);
2661
2662#ifdef WLAN_FEATURE_GTK_OFFLOAD
2663/* ---------------------------------------------------------------------------
2664 \fn sme_SetGTKOffload
2665 \brief API to set GTK offload feature.
2666 \param hHal - The handle returned by macOpen.
2667 \param pRequest - Pointer to the GTK offload request.
2668 \return eHalStatus
2669 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002670eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002671
2672/* ---------------------------------------------------------------------------
2673 \fn sme_GetGTKOffload
2674 \brief API to get GTK offload information.
2675 \param hHal - The handle returned by macOpen.
2676 \param pRequest - Pointer to the GTK offload response.
2677 \return eHalStatus
2678 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002679eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2680 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002681#endif // WLAN_FEATURE_GTK_OFFLOAD
2682
2683#ifdef WLAN_WAKEUP_EVENTS
2684eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2685#endif // WLAN_WAKEUP_EVENTS
2686
2687/* ---------------------------------------------------------------------------
2688 \fn sme_SetTxPerTracking
2689 \brief Set Tx PER tracking configuration parameters
2690 \param hHal - The handle returned by macOpen.
2691 \param pTxPerTrackingParam - Tx PER configuration parameters
2692 \return eHalStatus
2693 ---------------------------------------------------------------------------*/
2694eHalStatus sme_SetTxPerTracking (
2695 tHalHandle hHal,
2696 void (*pCallbackfn) (void *pCallbackContext),
2697 void *pCallbackContext,
2698 tpSirTxPerTrackingParam pTxPerTrackingParam);
2699
2700
2701//return frequency for a particular channel
2702tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2703
2704tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2705
2706#if defined WLAN_FEATURE_P2P_INTERNAL
2707
2708eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2709
2710/* ---------------------------------------------------------------------------
2711 \fn sme_p2pFlushDeviceList
2712 \brief Remove cached P2P result from scan results
2713 \param hHal - The handle returned by macOpen.
2714 \param HDDSessionId - HDD's sessionId. Currently unused.
2715 \return eHalStatus
2716 ---------------------------------------------------------------------------*/
2717eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2718
2719eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2720 tCsrScanResultFilter *pFilter);
2721
2722#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2723
2724/* ---------------------------------------------------------------------------
2725 \fn sme_SetMaxTxPower
2726 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2727 setting will not persist over reboots
2728 \param hHal
2729 \param pBssid BSSID to set the power cap for
2730 \param pBssid pSelfMacAddress self MAC Address
2731 \param pBssid power to set in dB
2732 \- return eHalStatus
2733 -------------------------------------------------------------------------*/
2734eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2735 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2736
Padma, Santhosh Kumar98b5d252016-10-17 17:30:41 +05302737/**
2738 * sme_SetMaxTxPowerPerBand() - Set the Maximum Transmit Power
2739 * specific to band dynamically
2740 * @band: Band for which power needs to be applied
2741 * @dB: power to set in dB
2742 * @hal: HAL handle
2743 *
2744 * Set the maximum transmit power dynamically per band
2745 *
2746 * Return: eHalStatus
2747 */
2748eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t dB,
2749 tHalHandle hal);
Arif Hussaina5ebce02013-08-09 15:09:58 -07002750
2751/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002752
schang86c22c42013-03-13 18:41:24 -07002753 \fn sme_SetTxPower
2754
2755 \brief Set Transmit Power dynamically. Note: this setting will
2756 not persist over reboots.
2757
2758 \param hHal
2759 \param sessionId Target Session ID
2760 \param mW power to set in mW
2761 \- return eHalStatus
2762
2763 -------------------------------------------------------------------------------*/
2764eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2765
2766/* ---------------------------------------------------------------------------
2767
Jeff Johnson295189b2012-06-20 16:38:30 -07002768 \fn sme_HideSSID
2769
2770 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2771 not persist over reboots.
2772
2773 \param hHal
2774 \param sessionId
2775 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2776 \- return eHalStatus
2777
2778 -------------------------------------------------------------------------------*/
2779eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002780
2781/* ---------------------------------------------------------------------------
2782
2783 \fn sme_SetTmLevel
2784 \brief Set Thermal Mitigation Level to RIVA
2785 \param hHal - The handle returned by macOpen.
2786 \param newTMLevel - new Thermal Mitigation Level
2787 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002788 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002789 ---------------------------------------------------------------------------*/
2790eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2791
2792/*---------------------------------------------------------------------------
2793
2794 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2795 Host and FW.
2796
2797 \param hHal - HAL handle for device
2798
2799 \return NONE
2800
2801---------------------------------------------------------------------------*/
2802void sme_featureCapsExchange(tHalHandle hHal);
2803
Jeff Johnsond13512a2012-07-17 11:42:19 -07002804/*---------------------------------------------------------------------------
2805
Yathish9f22e662012-12-10 14:21:35 -08002806 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2807 between in Host.
2808
2809 \param hHal - HAL handle for device
2810
2811 \return NONE
2812
2813---------------------------------------------------------------------------*/
2814void sme_disableFeatureCapablity(tANI_U8 feature_index);
2815
2816/*---------------------------------------------------------------------------
2817
Jeff Johnsond13512a2012-07-17 11:42:19 -07002818 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2819 country code
2820 Host and FW.
2821
2822 \param hHal - HAL handle for device
2823 \param pCountry - pointer to country code
2824
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002825 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002826
2827 ---------------------------------------------------------------------------*/
2828eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2829
2830/*---------------------------------------------------------------------------
2831
2832 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2833 country code.
2834
2835 \param hHal - HAL handle for device
2836 \param pCountry - pointer to country code
2837
2838 \return Success or failure
2839
2840 ---------------------------------------------------------------------------*/
2841eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2842
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002843/* ---------------------------------------------------------------------------
2844 \fn sme_transportDebug
2845 \brief Dynamically monitoring Transport channels
2846 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002847 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002848 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002849 \param toggleStallDetect Enable stall detect feature
2850 This feature will take effect to data performance
2851 Not integrate till fully verification
2852 \- return NONE
2853 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002854void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002855
Kiran4a17ebe2013-01-31 10:43:43 -08002856/* ---------------------------------------------------------------------------
2857 \fn sme_ResetPowerValuesFor5G
2858 \brief Reset the power values for 5G band with NV power values.
2859 \param hHal - HAL handle for device
2860 \- return NONE
2861 -------------------------------------------------------------------------*/
2862void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2863
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002864#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002865/* ---------------------------------------------------------------------------
2866 \fn sme_UpdateRoamPrefer5GHz
2867 \brief enable/disable Roam prefer 5G runtime option
2868 This function is called through dynamic setConfig callback function
2869 to configure the Roam prefer 5G runtime option
2870 \param hHal - HAL handle for device
2871 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2872 \- return Success or failure
2873 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002874eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002875
2876/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002877 \fn sme_setRoamIntraBand
2878 \brief enable/disable Intra band roaming
2879 This function is called through dynamic setConfig callback function
2880 to configure the intra band roaming
2881 \param hHal - HAL handle for device
2882 \param nRoamIntraBand Enable/Disable Intra band roaming
2883 \- return Success or failure
2884 -------------------------------------------------------------------------*/
2885eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2886
2887/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002888 \fn sme_UpdateRoamScanNProbes
2889 \brief function to update roam scan N probes
2890 This function is called through dynamic setConfig callback function
2891 to update roam scan N probes
2892 \param hHal - HAL handle for device
2893 \param nProbes number of probe requests to be sent out
2894 \- return Success or failure
2895 -------------------------------------------------------------------------*/
2896eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2897
2898/* ---------------------------------------------------------------------------
2899 \fn sme_UpdateRoamScanHomeAwayTime
2900 \brief function to update roam scan Home away time
2901 This function is called through dynamic setConfig callback function
2902 to update roam scan home away time
2903 \param hHal - HAL handle for device
2904 \param nRoamScanAwayTime Scan home away time
2905 \- return Success or failure
2906 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002907eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2908 const v_U16_t nRoamScanHomeAwayTime,
2909 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002910
2911/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002912 \fn sme_getRoamIntraBand
2913 \brief get Intra band roaming
2914 \param hHal - HAL handle for device
2915 \- return Success or failure
2916 -------------------------------------------------------------------------*/
2917v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2918
2919/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002920 \fn sme_getRoamScanNProbes
2921 \brief get N Probes
2922 \param hHal - HAL handle for device
2923 \- return Success or failure
2924 -------------------------------------------------------------------------*/
2925v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2926
2927/* ---------------------------------------------------------------------------
2928 \fn sme_getRoamScanHomeAwayTime
2929 \brief get Roam scan home away time
2930 \param hHal - HAL handle for device
2931 \- return Success or failure
2932 -------------------------------------------------------------------------*/
2933v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2934
2935/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002936 \fn sme_UpdateImmediateRoamRssiDiff
2937 \brief Update nImmediateRoamRssiDiff
2938 This function is called through dynamic setConfig callback function
2939 to configure nImmediateRoamRssiDiff
2940 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2941 \param hHal - HAL handle for device
2942 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2943 candidate and current AP.
2944 \- return Success or failure
2945 -------------------------------------------------------------------------*/
2946
2947eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002948
Srinivas Girigowdade697412013-02-14 16:31:48 -08002949/* ---------------------------------------------------------------------------
2950 \fn sme_UpdateRoamRssiDiff
2951 \brief Update RoamRssiDiff
2952 This function is called through dynamic setConfig callback function
2953 to configure RoamRssiDiff
2954 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2955 \param hHal - HAL handle for device
2956 \param RoamRssiDiff - minimum rssi difference between potential
2957 candidate and current AP.
2958 \- return Success or failure
2959 -------------------------------------------------------------------------*/
2960
2961eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2962
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002963/*--------------------------------------------------------------------------
2964 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2965 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2966 isFastTransitionEnabled.
2967 This is a synchronuous call
2968 \param hHal - The handle returned by macOpen.
2969 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2970 Other status means SME is failed to update isFastTransitionEnabled.
2971 \sa
2972 --------------------------------------------------------------------------*/
2973
2974eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2975 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002976
2977/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002978 \fn sme_UpdateWESMode
2979 \brief Update WESMode
2980 This function is called through dynamic setConfig callback function
2981 to configure isWESModeEnabled
2982 \param hHal - HAL handle for device
2983 \param isWESModeEnabled - Enable/Disable WES Mode
2984 \- return Success or failure
2985 -------------------------------------------------------------------------*/
2986eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2987
2988/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002989 \fn sme_SetRoamScanControl
2990 \brief Set roam scan control
2991 This function is called to set roam scan control
2992 if roam scan control is set to 0, roaming scan cache is cleared
2993 any value other than 0 is treated as invalid value
2994 \param hHal - HAL handle for device
2995 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2996 Other status means SME failure to update
2997 -------------------------------------------------------------------------*/
2998eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002999#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003000
3001#ifdef FEATURE_WLAN_LFR
3002/*--------------------------------------------------------------------------
3003 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08003004 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003005 isFastRoamIniFeatureEnabled.
3006 This is a synchronuous call
3007 \param hHal - The handle returned by macOpen.
3008 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
3009 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
3010 \sa
3011 --------------------------------------------------------------------------*/
3012
Srinivas Girigowdade697412013-02-14 16:31:48 -08003013eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003014 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003015
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003016/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05303017 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
3018 When Supplicant issue enabled / disable fwr based roaming on the basis
3019 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
3020
3021 This is a synchronous call
3022 \param hHal - The handle returned by macOpen.
3023 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
3024 Other status means SME is failed to (enabled/disabled) offload scan.
3025 \sa
3026 --------------------------------------------------------------------------*/
3027
3028eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
3029 const v_BOOL_t isFastRoamEnabled);
3030
3031/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003032 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
3033 Enable/disable LFR MAWC support at runtime
3034 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3035 isMAWCIniFeatureEnabled.
3036 This is a synchronous call
3037 \param hHal - The handle returned by macOpen.
3038 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
3039 Other status means SME is failed to update MAWCEnabled.
3040 \sa
3041 --------------------------------------------------------------------------*/
3042eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
3043 const v_BOOL_t MAWCEnabled);
3044
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003045
3046#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3047/*--------------------------------------------------------------------------
3048 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
3049 This is a synchronuous call
3050 \param hHal - The handle returned by macOpen.
3051 \return eHAL_STATUS_SUCCESS
3052 Other status means SME is failed
3053 \sa
3054 --------------------------------------------------------------------------*/
3055
3056eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
3057 v_BOOL_t bFastRoamInConIniFeatureEnabled);
3058#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003059#endif /* FEATURE_WLAN_LFR */
3060
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003061#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003062/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003063 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003064 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003065 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003066 This is a synchronuous call
3067 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003068 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
3069 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003070 \sa
3071 --------------------------------------------------------------------------*/
3072
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003073eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
3074 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003075
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003076#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003077
3078/*--------------------------------------------------------------------------
3079 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
3080 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3081 fEnableFwRssiMonitoring.
3082 This is a synchronuous call
3083 \param hHal - The handle returned by macOpen.
3084 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
3085 Other status means SME is failed to update
3086 \sa
3087 --------------------------------------------------------------------------*/
3088
3089eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
3090 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08003091
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003092#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08003093/*--------------------------------------------------------------------------
3094 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
3095 This is a synchronuous call
3096 \param hHal - The handle returned by macOpen.
3097 \return eHAL_STATUS_SUCCESS - SME update config successful.
3098 Other status means SME is failed to update
3099 \sa
3100 --------------------------------------------------------------------------*/
3101eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
3102 v_U8_t neighborLookupRssiThreshold);
3103
3104/*--------------------------------------------------------------------------
3105 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
3106 This is a synchronuous call
3107 \param hHal - The handle returned by macOpen.
3108 \return eHAL_STATUS_SUCCESS - SME update config successful.
3109 Other status means SME is failed to update
3110 \sa
3111 --------------------------------------------------------------------------*/
3112eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
3113 v_U8_t neighborReassocRssiThreshold);
3114
3115/*--------------------------------------------------------------------------
3116 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
3117 This is a synchronuous call
3118 \param hHal - The handle returned by macOpen.
3119 \return eHAL_STATUS_SUCCESS - SME update config successful.
3120 Other status means SME is failed to update
3121 \sa
3122 --------------------------------------------------------------------------*/
3123v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
3124
3125/*--------------------------------------------------------------------------
3126 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
3127 This is a synchronuous call
3128 \param hHal - The handle returned by macOpen.
3129 \return eHAL_STATUS_SUCCESS - SME update config successful.
3130 Other status means SME is failed to update
3131 \sa
3132 --------------------------------------------------------------------------*/
3133eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
3134 v_U16_t neighborScanResultsRefreshPeriod);
3135
3136/*--------------------------------------------------------------------------
3137 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
3138 This is a synchronuous call
3139 \param hHal - The handle returned by macOpen.
3140 \return eHAL_STATUS_SUCCESS - SME update config successful.
3141 Other status means SME is failed to update
3142 \sa
3143 --------------------------------------------------------------------------*/
3144v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
3145
3146/*--------------------------------------------------------------------------
3147 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3148 This is a synchronuous call
3149 \param hHal - The handle returned by macOpen.
3150 \return eHAL_STATUS_SUCCESS - SME update config successful.
3151 Other status means SME is failed to update
3152 \sa
3153 --------------------------------------------------------------------------*/
3154v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3155
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003156/* ---------------------------------------------------------------------------
3157 \fn sme_UpdateEmptyScanRefreshPeriod
3158 \brief Update nEmptyScanRefreshPeriod
3159 This function is called through dynamic setConfig callback function
3160 to configure nEmptyScanRefreshPeriod
3161 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3162 \param hHal - HAL handle for device
3163 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3164 \- return Success or failure
3165 -------------------------------------------------------------------------*/
3166eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3167
3168/* ---------------------------------------------------------------------------
3169 \fn sme_setNeighborScanMinChanTime
3170 \brief Update nNeighborScanMinChanTime
3171 This function is called through dynamic setConfig callback function
3172 to configure gNeighborScanChannelMinTime
3173 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3174 \param hHal - HAL handle for device
3175 \param nNeighborScanMinChanTime - Channel minimum dwell time
3176 \- return Success or failure
3177 -------------------------------------------------------------------------*/
3178eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3179
3180/* ---------------------------------------------------------------------------
3181 \fn sme_setNeighborScanMaxChanTime
3182 \brief Update nNeighborScanMaxChanTime
3183 This function is called through dynamic setConfig callback function
3184 to configure gNeighborScanChannelMaxTime
3185 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3186 \param hHal - HAL handle for device
3187 \param nNeighborScanMinChanTime - Channel maximum dwell time
3188 \- return Success or failure
3189 -------------------------------------------------------------------------*/
3190eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3191
3192/* ---------------------------------------------------------------------------
3193 \fn sme_getNeighborScanMinChanTime
3194 \brief get neighbor scan min channel time
3195 \param hHal - The handle returned by macOpen.
3196 \return v_U16_t - channel min time value
3197 -------------------------------------------------------------------------*/
3198v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3199
3200/* ---------------------------------------------------------------------------
3201 \fn sme_getNeighborScanMaxChanTime
3202 \brief get neighbor scan max channel time
3203 \param hHal - The handle returned by macOpen.
3204 \return v_U16_t - channel max time value
3205 -------------------------------------------------------------------------*/
3206v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3207
3208/* ---------------------------------------------------------------------------
3209 \fn sme_setNeighborScanPeriod
3210 \brief Update nNeighborScanPeriod
3211 This function is called through dynamic setConfig callback function
3212 to configure nNeighborScanPeriod
3213 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3214 \param hHal - HAL handle for device
3215 \param nNeighborScanPeriod - neighbor scan period
3216 \- return Success or failure
3217 -------------------------------------------------------------------------*/
3218eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3219
3220/* ---------------------------------------------------------------------------
3221 \fn sme_getNeighborScanPeriod
3222 \brief get neighbor scan period
3223 \param hHal - The handle returned by macOpen.
3224 \return v_U16_t - neighbor scan period
3225 -------------------------------------------------------------------------*/
3226v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3227
3228#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003229
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003230#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003231/*--------------------------------------------------------------------------
3232 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3233 This is a synchronuous call
3234 \param hHal - The handle returned by macOpen.
3235 \return eHAL_STATUS_SUCCESS - SME update config successful.
3236 Other status means SME is failed to update
3237 \sa
3238 --------------------------------------------------------------------------*/
3239v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3240
3241/*--------------------------------------------------------------------------
3242 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3243 This is a synchronuous call
3244 \param hHal - The handle returned by macOpen.
3245 \return eHAL_STATUS_SUCCESS - SME update config successful.
3246 Other status means SME is failed to update
3247 \sa
3248 --------------------------------------------------------------------------*/
3249eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3250 tANI_U8 numChannels);
3251
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003252#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003253/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003254 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003255 This is a synchronuous call
3256 \param hHal - The handle returned by macOpen.
3257 \return eHAL_STATUS_SUCCESS - SME update config successful.
3258 Other status means SME is failed to update
3259 \sa
3260 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003261eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003262 tANI_U8 *pChannelList,
3263 tANI_U8 numChannels);
3264#endif
3265
Srinivas Girigowdade697412013-02-14 16:31:48 -08003266/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003267 \brief sme_getRoamScanChannelList() - get roam scan channel list
3268 This is a synchronuous call
3269 \param hHal - The handle returned by macOpen.
3270 \return eHAL_STATUS_SUCCESS - SME update config successful.
3271 Other status means SME is failed to update
3272 \sa
3273 --------------------------------------------------------------------------*/
3274eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3275 tANI_U8 *pNumChannels);
3276
3277/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003278 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003279 This is a synchronuous call
3280 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003281 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003282 FALSE (0) - if feature is disabled (compile or runtime)
3283 \sa
3284 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003285tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003286
3287/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003288 \brief sme_getWESMode() - getWES Mode
3289 This is a synchronous call
3290 \param hHal - The handle returned by macOpen.
3291 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3292 \sa
3293 --------------------------------------------------------------------------*/
3294v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3295
3296/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003297 \brief sme_GetRoamScanControl() - get scan control
3298 This is a synchronous call
3299 \param hHal - The handle returned by macOpen.
3300 \return v_BOOL_t - Enabled(1)/Disabled(0)
3301 \sa
3302 --------------------------------------------------------------------------*/
3303v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3304
3305/* ---------------------------------------------------------------------------
3306 \fn sme_UpdateEmptyScanRefreshPeriod
3307 \brief Update nnEmptyScanRefreshPeriod
3308 This function is called through dynamic setConfig callback function
3309 to configure nnEmptyScanRefreshPeriod
3310 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3311 \param hHal - HAL handle for device
3312 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3313 \- return Success or failure
3314 -------------------------------------------------------------------------*/
3315
3316/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003317 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3318 This is a synchronuous call
3319 \param hHal - The handle returned by macOpen.
3320 \return TRUE (1) - if the feature is enabled
3321 FALSE (0) - if feature is disabled (compile or runtime)
3322 \sa
3323 --------------------------------------------------------------------------*/
3324tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3325
3326/*--------------------------------------------------------------------------
3327 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3328 This is a synchronuous call
3329 \param hHal - The handle returned by macOpen.
3330 \return TRUE (1) - if the feature is enabled
3331 FALSE (0) - if feature is disabled (compile or runtime)
3332 \sa
3333 --------------------------------------------------------------------------*/
3334tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3335
Srinivas Girigowdade697412013-02-14 16:31:48 -08003336#endif
3337
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003338#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3339/*--------------------------------------------------------------------------
3340 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3341 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3342 gRoamScanOffloadEnabled.
3343 This is a synchronous call
3344 \param hHal - The handle returned by macOpen.
3345 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3346 Other status means SME is failed to update.
3347 \sa
3348 --------------------------------------------------------------------------*/
3349
3350eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3351#endif
3352
c_manjeecfd1efb2015-09-25 19:32:34 +05303353eHalStatus sme_FwMemDumpReq(tHalHandle hHal, tAniFwrDumpReq *recv_req);
3354
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003355
Srinivas Girigowdade697412013-02-14 16:31:48 -08003356/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003357 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303358 \brief Check if a feature is enabled by FW
3359
3360 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003361 A value from enum placeHolderInCapBitmap
3362
3363 \- return 1/0 (TRUE/FALSE)
3364 -------------------------------------------------------------------------*/
3365tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303366
3367/* ---------------------------------------------------------------------------
3368 \fn sme_IsFeatureSupportedByDriver
3369 \brief Check if a feature is enabled by driver
3370
3371 \param featEnumValue - Enumeration value of the feature to be checked.
3372 A value from enum placeHolderInCapBitmap
3373
3374 \- return 1/0 (TRUE/FALSE)
3375 -------------------------------------------------------------------------*/
3376tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3377
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003378#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303379
3380/* ---------------------------------------------------------------------------
3381 \fn sme_SendTdlsLinkEstablishParams
3382 \brief API to send TDLS Link Establishment Parameters.
3383
3384 \param peerMac - peer's Mac Adress.
3385 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3386 \- return VOS_STATUS_SUCCES
3387 -------------------------------------------------------------------------*/
3388
3389VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303390 tANI_U8 sessionId,
3391#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3392 const tSirMacAddr peerMac,
3393#else
3394 tSirMacAddr peerMac,
3395#endif
3396 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303397
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003398/* ---------------------------------------------------------------------------
3399 \fn sme_SendTdlsMgmtFrame
3400 \brief API to send TDLS management frames.
3401
3402 \param peerMac - peer's Mac Adress.
3403 \param frame_type - Type of TDLS mgmt frame to be sent.
3404 \param dialog - dialog token used in the frame.
3405 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303406 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003407 \param buf - additional IEs to be included
3408 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003409 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003410 \- return VOS_STATUS_SUCCES
3411 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303412VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3413#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3414 const tSirMacAddr peerMac,
3415#else
3416 tSirMacAddr peerMac,
3417#endif
3418 tANI_U8 frame_type, tANI_U8 dialog,
3419 tANI_U16 status, tANI_U32 peerCapability,
3420 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003421/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003422 \fn sme_ChangeTdlsPeerSta
3423 \brief API to Update TDLS peer sta parameters.
3424
3425 \param peerMac - peer's Mac Adress.
3426 \param staParams - Peer Station Parameters.
3427 \- return VOS_STATUS_SUCCES
3428 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303429VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3430#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3431 const tSirMacAddr peerMac,
3432#else
3433 tSirMacAddr peerMac,
3434#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003435 tCsrStaParams *pstaParams);
3436/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003437 \fn sme_AddTdlsPeerSta
3438 \brief API to Add TDLS peer sta entry.
3439
3440 \param peerMac - peer's Mac Adress.
3441 \- return VOS_STATUS_SUCCES
3442 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303443VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3444#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3445 const tSirMacAddr peerMac
3446#else
3447 tSirMacAddr peerMac
3448#endif
3449 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003450/* ---------------------------------------------------------------------------
3451 \fn sme_DeleteTdlsPeerSta
3452 \brief API to Delete TDLS peer sta entry.
3453
3454 \param peerMac - peer's Mac Adress.
3455 \- return VOS_STATUS_SUCCES
3456 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303457VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3458#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3459 const tSirMacAddr peerMac
3460#else
3461 tSirMacAddr peerMac
3462#endif
3463 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003464/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003465 \fn sme_SetTdlsPowerSaveProhibited
3466 \API to set/reset the isTdlsPowerSaveProhibited.
3467
3468 \- return void
3469 -------------------------------------------------------------------------*/
3470void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003471#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303472/* ---------------------------------------------------------------------------
3473 \fn sme_IsPmcBmps
3474 \brief API to Check if PMC state is BMPS.
3475
3476 \- return v_BOOL_t
3477 -------------------------------------------------------------------------*/
3478v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3479
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003480eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003481
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303482/* ---------------------------------------------------------------------------
3483 \fn sme_UpdateDFSRoamMode
3484 \brief Update DFS roam scan mode
3485 This function is called to configure allowDFSChannelRoam
3486 dynamically
3487 \param hHal - HAL handle for device
3488 \param allowDFSChannelRoam - DFS roaming scan mode
3489 mode 0 disable roam scan on DFS channels
3490 mode 1 enables roam scan (passive/active) on DFS channels
3491 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3492 successfully.
3493 Other status means SME failed to update DFS roaming scan config.
3494 \sa
3495 -------------------------------------------------------------------------*/
3496eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3497
3498/* ---------------------------------------------------------------------------
3499 \fn sme_UpdateDFSScanMode
3500 \brief Update DFS scan mode
3501 This function is called to configure fEnableDFSChnlScan.
3502 \param hHal - HAL handle for device
3503 \param dfsScanMode - DFS scan mode
3504 mode 0 disable scan on DFS channels
3505 mode 1 enables passive scan on DFS channels
3506 mode 2 enables active scan on DFS channels for static list
3507 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3508 successfully.
3509 Other status means SME failed to update DFS scan config.
3510 \sa
3511 -------------------------------------------------------------------------*/
3512eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3513
3514/*--------------------------------------------------------------------------
3515 \brief sme_GetDFSScanMode() - get DFS scan mode
3516 \param hHal - The handle returned by macOpen.
3517 \return DFS scan mode
3518 mode 0 disable scan on DFS channels
3519 mode 1 enables passive scan on DFS channels
3520 mode 2 enables active scan on DFS channels for static list
3521 \sa
3522 --------------------------------------------------------------------------*/
3523v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3524
3525/* ---------------------------------------------------------------------------
3526 \fn sme_HandleDFSChanScan
3527 \brief Gets Valid channel list and updates scan control list according to
3528 dfsScanMode
3529 \param hHal - HAL handle for device
3530 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3531 Otherwise eHAL_STATUS_SUCCESS -
3532 \sa
3533 -------------------------------------------------------------------------*/
3534eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3535
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003536/*
3537 * SME API to enable/disable WLAN driver initiated SSR
3538 */
3539void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3540
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303541/* ---------------------------------------------------------------------------
3542
3543 \fn sme_SetPhyMode
3544
3545 \brief Changes the PhyMode.
3546
3547 \param hHal - The handle returned by macOpen.
3548
3549 \param phyMode new phyMode which is to set
3550
3551 \return eHalStatus SUCCESS.
3552
3553 -------------------------------------------------------------------------------*/
3554eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3555
3556/* ---------------------------------------------------------------------------
3557
3558 \fn sme_GetPhyMode
3559
3560 \brief gets current PhyMode.
3561
3562 \param hHal - The handle returned by macOpen.
3563
3564 \return eHalStatus PhyMode
3565
3566 -------------------------------------------------------------------------------*/
3567eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3568
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003569/*
3570 * SME API to determine the channel bonding mode
3571 */
Abhishek Singh02b823e2017-10-30 17:53:20 +05303572VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
3573 tANI_U8 channel, enum eSirMacHTChannelWidth max_bw);
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003574
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003575#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3576/*--------------------------------------------------------------------------
3577 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3578 from CSR.
3579 This is a synchronous call
3580 \param hHal - The handle returned by macOpen
3581 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3582 BSSID, channel etc.)
3583 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3584 Other status means SME is failed to send the request.
3585 \sa
3586 --------------------------------------------------------------------------*/
3587
3588eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3589#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003590/*--------------------------------------------------------------------------
3591 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3592 is any connected session .
3593 This is a synchronous call
3594 \param hHal - The handle returned by macOpen
3595 \return VOS_STATUS - SME passed the request to CSR successfully.
3596 Other status means SME is failed to send the request.
3597 \sa
3598 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003599VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003600
Agarwal Ashish57e84372014-12-05 18:26:53 +05303601/*--------------------------------------------------------------------------
3602 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3603 is any connected session .
3604 This is a synchronous call
3605 \param hHal - The handle returned by macOpen
3606 \return VOS_STATUS - SME passed the request to CSR successfully.
3607 Other status means SME is failed to send the request.
3608 \sa
3609 --------------------------------------------------------------------------*/
3610VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3611
Leo Chang9056f462013-08-01 19:21:11 -07003612#ifdef FEATURE_WLAN_LPHB
3613/* ---------------------------------------------------------------------------
3614 \fn sme_LPHBConfigReq
3615 \API to make configuration LPHB within FW.
3616 \param hHal - The handle returned by macOpen
3617 \param lphdReq - LPHB request argument by client
3618 \param pCallbackfn - LPHB timeout notification callback function pointer
3619 \- return Configuration message posting status, SUCCESS or Fail
3620 -------------------------------------------------------------------------*/
3621eHalStatus sme_LPHBConfigReq(
3622 tHalHandle hHal,
3623 tSirLPHBReq *lphdReq,
3624 void (*pCallbackfn)(void *pAdapter, void *indParam));
3625#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003626
3627/* ---------------------------------------------------------------------------
3628 \fn sme_AddPeriodicTxPtrn
3629 \brief API to Periodic TX Pattern Offload feature
3630 \param hHal - The handle returned by macOpen
3631 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3632 \return eHalStatus
3633 ---------------------------------------------------------------------------*/
3634eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3635 *addPeriodicTxPtrnParams);
3636
3637/* ---------------------------------------------------------------------------
3638 \fn sme_DelPeriodicTxPtrn
3639 \brief API to Periodic TX Pattern Offload feature
3640 \param hHal - The handle returned by macOpen
3641 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3642 \return eHalStatus
3643 ---------------------------------------------------------------------------*/
3644eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3645 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003646/*--------------------------------------------------------------------------
3647 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3648 scan parameter.
3649 This is a synchronous call
3650 \param hHal - The handle returned by macOpen
3651 \return None.
3652 \sa
3653 --------------------------------------------------------------------------*/
3654void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3655 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303656
Abhishek Singh00b71972016-01-07 10:51:04 +05303657#ifdef WLAN_FEATURE_RMC
3658/* ---------------------------------------------------------------------------
3659 \fn sme_EnableRMC
3660 \brief Used to enable RMC
3661 setting will not persist over reboots
3662 \param hHal
3663 \param sessionId
3664 \- return eHalStatus
3665 -------------------------------------------------------------------------*/
3666eHalStatus sme_EnableRMC(tHalHandle hHal, tANI_U32 sessionId);
3667
3668/* ---------------------------------------------------------------------------
3669 \fn sme_DisableRMC
3670 \brief Used to disable RMC
3671 setting will not persist over reboots
3672 \param hHal
3673 \param sessionId
3674 \- return eHalStatus
3675 -------------------------------------------------------------------------*/
3676eHalStatus sme_DisableRMC(tHalHandle hHal, tANI_U32 sessionId);
3677#endif /* WLAN_FEATURE_RMC */
3678
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003679/* ---------------------------------------------------------------------------
3680 \fn sme_SendRateUpdateInd
3681 \brief API to Update rate
3682 \param hHal - The handle returned by macOpen
3683 \param rateUpdateParams - Pointer to rate update params
3684 \return eHalStatus
3685 ---------------------------------------------------------------------------*/
3686eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3687
Abhishek Singh00b71972016-01-07 10:51:04 +05303688#ifdef WLAN_FEATURE_RMC
3689/* ---------------------------------------------------------------------------
3690 \fn sme_GetIBSSPeerInfo
3691 \brief Used to disable RMC
3692 setting will not persist over reboots
3693 \param hHal
3694 \param ibssPeerInfoReq multicast Group IP address
3695 \- return eHalStatus
3696 -------------------------------------------------------------------------*/
3697eHalStatus sme_RequestIBSSPeerInfo(tHalHandle hHal, void *pUserData,
3698 pIbssPeerInfoCb peerInfoCbk,
3699 tANI_BOOLEAN allPeerInfoReqd,
3700 tANI_U8 staIdx);
3701#endif /* WLAN_FEATURE_RMC */
3702
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303703/*
3704 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3705 * triggers
3706 * return status
3707*/
3708eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3709 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303710 tSmeFastRoamTrigger fastRoamTrig,
3711 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303712
3713eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303714#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3715 const tANI_U8 *pBSSId,
3716#else
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303717 tANI_U8 *pBSSId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303718#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303719 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003720
3721void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303722
3723#ifdef FEATURE_WLAN_BATCH_SCAN
3724/* ---------------------------------------------------------------------------
3725 \fn sme_SetBatchScanReq
3726 \brief API to set batch scan request in FW
3727 \param hHal - The handle returned by macOpen.
3728 \param pRequest - Pointer to the batch request.
3729 \param sessionId - session ID
3730 \param callbackRoutine - HDD callback which needs to be invoked after
3731 getting set batch scan response from FW
3732 \param callbackContext - pAdapter context
3733 \return eHalStatus
3734 ---------------------------------------------------------------------------*/
3735eHalStatus
3736sme_SetBatchScanReq
3737(
3738 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3739 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3740 void *callbackContext
3741);
3742
3743/* ---------------------------------------------------------------------------
3744 \fn sme_TriggerBatchScanResultInd
3745 \brief API to trigger batch scan result indications from from FW
3746 \param hHal - The handle returned by macOpen.
3747 \param pRequest - Pointer to get batch request.
3748 \param sessionId - session ID
3749 \param callbackRoutine - HDD callback which needs to be invoked after
3750 getting get batch scan response from FW
3751 \param callbackContext - pAdapter context
3752 \return eHalStatus
3753 ---------------------------------------------------------------------------*/
3754eHalStatus
3755sme_TriggerBatchScanResultInd
3756(
3757 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3758 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3759 void *callbackContext
3760);
3761
3762/* ---------------------------------------------------------------------------
3763 \fn sme_StopBatchScanInd
3764 \brief API to stop batch scan request in FW
3765 \param hHal - The handle returned by macOpen.
3766 \param pRequest - Pointer to stop batch indication
3767 \return eHalStatus
3768 ---------------------------------------------------------------------------*/
3769eHalStatus
3770sme_StopBatchScanInd
3771(
3772 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3773);
3774
3775#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003776
3777#ifdef FEATURE_WLAN_CH_AVOID
3778/* ---------------------------------------------------------------------------
3779 \fn sme_AddChAvoidCallback
3780 \brief Used to plug in callback function
3781 Which notify channel may not be used with SAP or P2PGO mode.
3782 Notification come from FW.
3783 \param hHal
3784 \param pCallbackfn : callback function pointer should be plugged in
3785 \- return eHalStatus
3786 -------------------------------------------------------------------------*/
3787eHalStatus sme_AddChAvoidCallback
3788(
3789 tHalHandle hHal,
3790 void (*pCallbackfn)(void *pAdapter, void *indParam)
3791);
3792#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003793eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303794
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303795/* ---------------------------------------------------------------------------
3796 \fn sme_requestTypetoString
3797 \brief API to convert requestType enum values
3798 to string.
3799 ---------------------------------------------------------------------------*/
3800const char * sme_requestTypetoString(const v_U8_t requestType);
3801/* ---------------------------------------------------------------------------
3802 \fn sme_PmcStatetoString
3803 \brief API to convert PmcState enum values
3804 to string.
3805 ---------------------------------------------------------------------------*/
3806const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303807
3808eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3809
Agarwal Ashish5e414792014-06-08 15:25:23 +05303810tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303811
3812// tdlsoffchan
3813VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3814 tANI_U8 sessionId,
3815 tSirMacAddr peerMac,
3816 tANI_S32 tdlsOffCh,
3817 tANI_S32 tdlsOffChBwOffset,
3818 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303819eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3820 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303821void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303822
3823void sme_resetCoexEevent(tHalHandle hHal);
3824
Peng Xu117eab42014-09-25 13:33:27 +05303825tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3826tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303827#ifdef WLAN_FEATURE_AP_HT40_24G
3828void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3829 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303830eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3831 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303832#endif
Peng Xu117eab42014-09-25 13:33:27 +05303833
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303834eHalStatus sme_set_rssi_threshold_breached_cb(tHalHandle hal,
3835 void (*cb)(void *, struct rssi_breach_event *));
3836
Agarwal Ashish738843c2014-09-25 12:27:56 +05303837void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3838
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303839/* HDD Callback function */
3840typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3841
3842eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3843 u8 *pCmd,
3844 int length,
3845 pEncryptMsgRSPCb encCB);
3846
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303847/* ---------------------------------------------------------------------------
3848 \fn sme_RegisterBtCoexTDLSCallback
3849 \brief Used to plug in callback function
3850 Which notify btcoex on or off.
3851 Notification come from FW.
3852 \param hHal
3853 \param pCallbackfn : callback function pointer should be plugged in
3854 \- return eHalStatus
3855 -------------------------------------------------------------------------*/
3856eHalStatus sme_RegisterBtCoexTDLSCallback
3857(
3858 tHalHandle hHal,
3859 void (*pCallbackfn)(void *pAdapter, int)
3860);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303861
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303862/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303863 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303864
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303865 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303866
3867 \param hHal - The handle returned by macOpen.
3868
3869 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3870 eANI_BOOLEAN_FALSE otherwise
3871---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303872tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303873
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303874/* ---------------------------------------------------------------------------
3875
3876 \fn sme_IsTdlsOffChannelValid
3877 \brief To check if the channel is valid for currently established domain
3878 This is a synchronous API.
3879
3880 \param hHal - The handle returned by macOpen.
3881 \param channel - channel to verify
3882
3883 \return TRUE/FALSE, TRUE if channel is valid
3884
3885 -------------------------------------------------------------------------------*/
3886tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3887
Mukul Sharma4be88422015-03-09 20:29:07 +05303888/* --------------------------------------------------------------------------
3889
3890 \fn sme_IsCoexScoIndicationSet
3891 \brief To check if the BTC module in fwr has sent the SCO
3892 indication to host or not
3893
3894 \param hHal - The handle returned by macOpen.
3895 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3896
3897 --------------------------------------------------------------------------*/
3898tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3899
Abhishek Singh01c73d12015-03-12 15:13:44 +05303900eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3901 tANI_U32 iniNumBuffAdvert,
3902 tANI_U32 set_value);
3903
Mukul Sharma45063942015-04-01 20:07:59 +05303904void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303905
3906/* ---------------------------------------------------------------------------
3907 \fn sme_SetTdls2040BSSCoexistence
3908 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3909
3910 \param isEnabled - Enable or Disable.
3911 \- return VOS_STATUS_SUCCES
3912 -------------------------------------------------------------------------*/
3913eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3914
Abhishek Singh41988ba2015-05-25 19:42:29 +05303915/* ---------------------------------------------------------------------------
3916 \fn sme_SetRtsCtsHtVht
3917 \brief API to to enable/disable RTS/CTS for different modes.
3918
3919 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3920 \- return VOS_STATUS_SUCCES if INdication is posted to
3921 WDA else return eHAL_STATUS_FAILURE
3922 -------------------------------------------------------------------------*/
3923eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3924
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303925tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
Agrawal Ashish842eea82016-02-04 17:56:16 +05303926 tANI_U8 fcc_constraint,
3927 v_U32_t scan_pending);
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303928
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303929eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303930eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
Abhishek Singh837adf22015-10-01 17:37:37 +05303931 tANI_U32 indicator, tANI_U32 reason_code,
3932 tANI_BOOLEAN dump_vos_trace);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303933
Mahesh A Saptasagarbeca12c2015-09-07 16:21:06 +05303934eHalStatus sme_enableDisableChanAvoidIndEvent(tHalHandle hHal,
3935 tANI_U8 set_value);
3936
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303937/* ---------------------------------------------------------------------------
3938 \fn sme_set_wificonfig_params
3939 \brief API to set WifiConfiguration Parameters.
3940
3941 \param wifi_config_param - Wificonfig parameter 1.Averaging factor 2. Guard time
3942 \- return VOS_STATUS_SUCCES if INdication is posted to
3943 WDA else return eHAL_STATUS_FAILURE
3944 -------------------------------------------------------------------------*/
3945
3946eHalStatus sme_set_wificonfig_params(tHalHandle hHal, tSetWifiConfigParams *req);
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +05303947eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
3948 tANI_U32 *regInfo1, tANI_U32 *regInfo2);
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05303949eHalStatus sme_GetCurrentAntennaIndex(tHalHandle hHal,
3950 tCsrAntennaIndexCallback callback,
3951 void *pContext, tANI_U8 sessionId);
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303952
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05303953eHalStatus sme_setBcnMissPenaltyCount(tHalHandle hHal,
3954 tModifyRoamParamsReqParams *params);
Abhishek Singhbfb3c9e2016-07-22 11:25:43 +05303955eHalStatus sme_remove_bssid_from_scan_list(tHalHandle hal,
3956 tSirMacAddr bssid);
Agrawal Ashish0552be02016-03-02 18:03:43 +05303957void sme_set_mgmt_frm_via_wq5(tHalHandle hHal,
3958 tANI_BOOLEAN sendMgmtPktViaWQ5);
mukul sharma6b53e202016-11-23 19:29:18 +05303959eHalStatus sme_update_cfg_int_param(tHalHandle hHal, tANI_U32 cfg_id);
Kapil Gupta3d923fb2016-12-20 18:59:27 +05303960
3961#ifdef WLAN_FEATURE_APFIND
3962VOS_STATUS sme_apfind_set_cmd(struct sme_ap_find_request_req *input);
3963#endif /* WLAN_FEATURE_APFIND */
3964
Agrawal Ashish17ef5082016-10-17 18:33:21 +05303965#ifdef SAP_AUTH_OFFLOAD
3966/**
3967 * sme_set_sap_auth_offload() enable/disable SAP Auth Offload
3968 * @hHal: hal layer handler
3969 * @sap_auth_offload_info: the information of SAP Auth Offload
3970 *
3971 * This function provide enable/disable SAP authenticaiton offload
3972 * feature on target firmware
3973 *
3974 * Return: eHalStatus.
3975 */
3976eHalStatus sme_set_sap_auth_offload(tHalHandle hHal,
3977 struct tSirSapOffloadInfo *sap_auth_offload_info);
3978
3979#endif /* SAP_AUTH_OFFLOAD */
Anurag Chouhan83026002016-12-13 22:46:21 +05303980#ifdef DHCP_SERVER_OFFLOAD
3981eHalStatus sme_set_dhcp_srv_offload(tHalHandle hal,
Anurag Chouhan0b29de02016-12-16 13:18:40 +05303982 sir_dhcp_srv_offload_info_t *dhcp_srv_info);
Anurag Chouhan83026002016-12-13 22:46:21 +05303983#endif /* DHCP_SERVER_OFFLOAD */
3984
Anurag Chouhan0b29de02016-12-16 13:18:40 +05303985#ifdef MDNS_OFFLOAD
3986eHalStatus sme_set_mdns_offload(tHalHandle hal,
3987 sir_mdns_offload_info_t *mdns_info);
3988
3989eHalStatus sme_set_mdns_fqdn(tHalHandle hal,
3990 sir_mdns_fqdn_info_t *mdns_fqdn);
3991
3992eHalStatus sme_set_mdns_resp(tHalHandle hal,
3993 sir_mdns_resp_info_t *mdns_resp);
3994#endif /* MDNS_OFFLOAD */
Ravi Kumar bokka7d032762016-12-12 23:33:01 +05303995
3996eHalStatus sme_update_hb_threshold(tHalHandle hHal, tANI_U32 cfgId,
3997 tANI_U8 hbThresh, eCsrBand eBand);
Manjeet Singh3ed79242017-01-11 19:04:32 +05303998
3999eHalStatus sme_capture_tsf_req(tHalHandle hHal,
4000 tSirCapTsfParams capTsfParams);
4001
4002eHalStatus sme_get_tsf_req(tHalHandle hHal,
4003 tSirCapTsfParams capTsfParams);
4004
4005eHalStatus sme_set_tsfcb(tHalHandle hHal,
4006 tsf_rsp_cb rsp_cb, struct stsf *pTsf,
4007 void *pcallbackcontext);
4008
Anurag Chouhan6ee81542017-02-09 18:09:27 +05304009/* ARP DEBUG STATS */
4010eHalStatus sme_set_nud_debug_stats(tHalHandle hHal,
4011 psetArpStatsParams pSetStatsParam);
4012eHalStatus sme_get_nud_debug_stats(tHalHandle hHal,
4013 pgetArpStatsParams pGetStatsParam);
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05304014eHalStatus sme_del_sta_ba_session_req(tHalHandle hHal,
4015 tDelBaParams sta_del_params);
Abhishek Singh02605092017-10-25 14:06:12 +05304016/**
4017 * sme_roam_csa_ie_request() - request CSA IE transmission from PE
4018 * @hal: handle returned by mac_open
4019 * @bssid: SAP bssid
4020 * @new_chan: target channel information
4021 * @phy_mode: SAP phymode
Abhishek Singh02b823e2017-10-30 17:53:20 +05304022 * @sme_session_id: sme session id
Abhishek Singh02605092017-10-25 14:06:12 +05304023 *
4024 * Return: VOS_STATUS
4025 */
4026VOS_STATUS sme_roam_csa_ie_request(tHalHandle hal, tCsrBssid bssid,
Abhishek Singh02b823e2017-10-30 17:53:20 +05304027 uint8_t new_chan, uint32_t phy_mode,
4028 uint8_t sme_session_id);
Abhishek Singh02605092017-10-25 14:06:12 +05304029
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304030/**
4031 * sme_roam_channel_change_req() - Channel change to new target channel
4032 * @hal: handle returned by mac_open
4033 * @bssid: SAP bssid
4034 * @new_chan: target channel information
4035 * @profile: roam profile
Abhishek Singh02b823e2017-10-30 17:53:20 +05304036 * @sme_session_id: sme session id
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304037 *
4038 * API to Indicate Channel change to new target channel
4039 *
4040 * Return: VOS_STATUS
4041 */
4042VOS_STATUS sme_roam_channel_change_req(tHalHandle hal, tCsrBssid bssid,
Abhishek Singh02b823e2017-10-30 17:53:20 +05304043 uint8_t new_chan, tCsrRoamProfile *profile,
4044 uint8_t sme_session_id);
Abhishek Singh78c691f2017-11-30 13:48:44 +05304045/**
4046 * sme_get_connect_strt_time() - get the connection start time
4047 * @hal: hal context
4048 * @session_id: session id
4049 *
4050 * Return: void.
4051 */
4052v_TIME_t sme_get_connect_strt_time(tHalHandle hal,
4053 uint8_t session_id);
4054
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304055
Abhishek Singhe8ebb922017-11-01 13:30:26 +05304056/**
4057 * sme_get_cb_phy_mode_from_cb_ini_mode() - convert ini CB value to Phy CB val
4058 * @cb_ini_value: ini value of cb mode
4059 *
4060 * Return: phy CB val
4061 */
4062static inline ePhyChanBondState
4063sme_get_cb_phy_mode_from_cb_ini_mode(uint32_t cb_ini_value)
4064{
4065 return csrConvertCBIniValueToPhyCBState(cb_ini_value);
4066}
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304067
Jeff Johnson295189b2012-06-20 16:38:30 -07004068#endif //#if !defined( __SME_API_H )