blob: 264c37b08b8d55bdd460d66d9e0f90167d3d45b1 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Padma, Santhosh Kumaree7c3d22016-01-25 10:36:08 +05302 * Copyright (c) 2012-2016 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
Padma, Santhosh Kumar9acee012015-08-21 19:58:01 +0530296/**
297 * sme_set_ssid_hotlist() - Set the SSID hotlist
298 * @hal: SME handle
299 * @request: set ssid hotlist request
300 *
301 * Return: eHalStatus
302 */
303eHalStatus sme_set_ssid_hotlist(tHalHandle hal,
304 tSirEXTScanSetSsidHotListReqParams *request);
305
306/* ---------------------------------------------------------------------------
307 \fn sme_ResetBssHotlist
308 \brief SME API to reset BSSID hotlist
309 \param hHal
310 \param pSetHotListReq: Extented Scan set hotlist structure
311 \- return eHalStatus
312 -------------------------------------------------------------------------*/
313eHalStatus sme_reset_ssid_hotlist (tHalHandle hHal,
314 tSirEXTScanResetSsidHotlistReqParams *pResetReq);
315
316
Dino Mycle2c198072014-06-10 10:15:52 +0530317/* ---------------------------------------------------------------------------
Dino Mycle2c198072014-06-10 10:15:52 +0530318 \fn sme_getCachedResults
319 \brief SME API to get cached results
320 \param hHal
321 \param pCachedResultsReq: Extented Scan get cached results structure
322 \- return eHalStatus
323 -------------------------------------------------------------------------*/
324eHalStatus sme_getCachedResults (tHalHandle hHal,
325 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
326
327/* ---------------------------------------------------------------------------
328 \fn sme_EXTScanRegisterCallback
329 \brief SME API to register Extented Scan notification callback
330 \param pEXTScanIndCb
331 \- return void
332 -------------------------------------------------------------------------*/
333eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
334 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
335 void *);
336
337#endif /* WLAN_FEATURE_EXTSCAN */
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530338
339#ifdef FEATURE_OEM_DATA_SUPPORT
340eHalStatus sme_OemDataRegisterCallback (tHalHandle hHal,
Padma, Santhosh Kumaree7c3d22016-01-25 10:36:08 +0530341 void (*pOemDataIndCb)(void *, const tANI_U16, void *, tANI_U32),
342 void *callbackContext);
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530343#endif
344
Siddharth Bhald8a95e82015-02-12 20:14:52 +0530345/* ---------------------------------------------------------------------------
346 \fn sme_SpoofMacAddrReq
347 \brief SME API to send Spoof Mac Addr req to HAL
348 \param macaddr: mac address to be sent
349 \- return eHalStatus
350 -------------------------------------------------------------------------*/
351eHalStatus sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530352
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530353typedef enum
354{
355 eSME_ROAM_TRIGGER_NONE = 0,
356 eSME_ROAM_TRIGGER_SCAN = 1,
357 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
358 eSME_ROAM_TRIGGER_MAX
359} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700360
361/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530362 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700363 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700364/*--------------------------------------------------------------------------
365
366 \brief sme_Open() - Initialze all SME modules and put them at idle state
367
368 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
369 successfully return, all modules are at idle state ready to start.
370
371 smeOpen must be called before any other SME APIs can be involved.
372 smeOpen must be called after macOpen.
373
374 \param hHal - The handle returned by macOpen.
375
376 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
377
378 Other status means SME is failed to be initialized
379 \sa
380
381 --------------------------------------------------------------------------*/
382eHalStatus sme_Open(tHalHandle hHal);
383
384/*--------------------------------------------------------------------------
385
386 \brief sme_Close() - Release all SME modules and their resources.
387
388 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
389 return, all modules are at closed state.
390
391 No SME APIs can be involved after sme_Close except sme_Open.
392 sme_Close must be called before macClose.
393
394 \param hHal - The handle returned by macOpen.
395
396 \return eHAL_STATUS_SUCCESS - SME is successfully close.
397
398 Other status means SME is failed to be closed but caller still cannot
399 call any other SME functions except smeOpen.
400 \sa
401
402 --------------------------------------------------------------------------*/
403eHalStatus sme_Close(tHalHandle hHal);
404
405/*--------------------------------------------------------------------------
Hema Aparna Medicharlaa6cf65e2015-06-01 16:23:28 +0530406
407 \brief sme_PreClose() - Stop SME resources prior to final sme_Stop.
408
409 The function stops resources in SME, PMC, CCM, CSR, etc. as needed
410 to handle fast closure during SSR/unload-load cases.
411
412 \param hHal - The handle returned by macOpen.
413 \return v_VOID_t
414
415 \sa
416
417 --------------------------------------------------------------------------*/
418v_VOID_t sme_PreClose(tHalHandle hHal);
419
420/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700421
422 \brief sme_Start() - Put all SME modules at ready state.
423
424 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
425 successfully return, all modules are ready to run.
426
427 \param hHal - The handle returned by macOpen.
428
429 \return eHAL_STATUS_SUCCESS - SME is ready.
430
431 Other status means SME is failed to start.
432 \sa
433
434 --------------------------------------------------------------------------*/
435eHalStatus sme_Start(tHalHandle hHal);
436
437/*--------------------------------------------------------------------------
438
439 \brief sme_Stop() - Stop all SME modules and put them at idle state
440
441 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
442 return, all modules are at idle state ready to start.
443
444
445 \param hHal - The handle returned by macOpen.
446
Kiet Lama72a2322013-11-15 11:18:11 +0530447 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700448
449 \return eHAL_STATUS_SUCCESS - SME is stopped.
450
451 Other status means SME is failed to stop but caller should still consider
452 SME is stopped.
453 \sa
454
455 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530456eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700457
458
459/*--------------------------------------------------------------------------
460
461 \brief sme_OpenSession() - Open a session for scan/roam operation.
462
463 This is a synchronous API.
464
465
466 \param hHal - The handle returned by macOpen.
467 \param callback - A pointer to the function caller specifies for roam/connect status indication
468 \param pContext - The context passed with callback
469 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
470 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
471
472 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
473
474 Other status means SME is failed to open the session.
475 eHAL_STATUS_RESOURCES - no more session available.
476 \sa
477
478 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700479eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
480 void *pContext, tANI_U8 *pSelfMacAddr,
481 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700482
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700483/*--------------------------------------------------------------------------
484
485 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
486 \param hHal - The handle returned by macOpen.
487 \param currDeviceMode - Current operating device mode.
488 --------------------------------------------------------------------------*/
489
490void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700491
492/*--------------------------------------------------------------------------
493
494 \brief sme_CloseSession() - Open a session for scan/roam operation.
495
496 This is a synchronous API.
497
Jeff Johnson295189b2012-06-20 16:38:30 -0700498 \param hHal - The handle returned by macOpen.
499
500 \param sessionId - A previous opened session's ID.
mukul sharmabab477d2015-06-11 17:14:55 +0530501
502 \param bPurgeSmeCmdList - Whether sme cmd list purging is required or not.
503 TRUE -Purging require FALSE - Purging not require
504
Jeff Johnson295189b2012-06-20 16:38:30 -0700505 \return eHAL_STATUS_SUCCESS - session is closed.
506
507 Other status means SME is failed to open the session.
508 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
509 \sa
mukul sharmabab477d2015-06-11 17:14:55 +0530510
511
Jeff Johnson295189b2012-06-20 16:38:30 -0700512 --------------------------------------------------------------------------*/
513eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
Agrawal Ashish5a3522c2016-03-02 15:08:28 +0530514 tANI_BOOLEAN fSync,
mukul sharmabab477d2015-06-11 17:14:55 +0530515 tANI_U8 bPurgeSmeCmdList,
516 csrRoamSessionCloseCallback callback,
517 void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -0700518
519/*--------------------------------------------------------------------------
520
521 \brief sme_UpdateConfig() - Change configurations for all SME moduels
522
523 The function updates some configuration for modules in SME, CCM, CSR, etc
524 during SMEs close -> open sequence.
525
526 Modules inside SME apply the new configuration at the next transaction.
527
528
529 \param hHal - The handle returned by macOpen.
530 \Param pSmeConfigParams - a pointer to a caller allocated object of
531 typedef struct _smeConfigParams.
532
533 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
534
535 Other status means SME is failed to update the config parameters.
536 \sa
537
538 --------------------------------------------------------------------------*/
539eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
540
541#ifdef FEATURE_WLAN_SCAN_PNO
542/*--------------------------------------------------------------------------
543
544 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
545
546 It is used at driver start up to inform RIVA of the default channel
547 configuration.
548
549 This is a synchronuous call
550
551 \param hHal - The handle returned by macOpen.
552
553 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
554
555 Other status means SME is failed to update the channel config.
556 \sa
557
558 --------------------------------------------------------------------------*/
559eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
560
561#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700562/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530563
564 \brief sme_UpdateChannelList() - Update channel List in FW.
565
566
567 \param hHal - The handle returned by macOpen.
568
569 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
570
571 Other status means SME is failed to update the channel config.
572 \sa
573
574 --------------------------------------------------------------------------*/
575eHalStatus sme_UpdateChannelList(tHalHandle hHal);
576
577/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700578
579 \brief sme_set11dinfo() - Set the 11d information about valid channels
580 and there power using information from nvRAM
581 This function is called only for AP.
582
583 This is a synchronuous call
584
585 \param hHal - The handle returned by macOpen.
586 \Param pSmeConfigParams - a pointer to a caller allocated object of
587 typedef struct _smeConfigParams.
588
589 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
590
591 Other status means SME is failed to update the config parameters.
592 \sa
593--------------------------------------------------------------------------*/
594
595eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
596
597/*--------------------------------------------------------------------------
598
599 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
600
601 This is a synchronuous call
602
603 \param hHal - The handle returned by HostapdAdapter.
604 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
605
606 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
607
608 Other status means, failed to get the current regulatory domain.
609 \sa
610--------------------------------------------------------------------------*/
611
612eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
613
614eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
615
Jeff Johnson295189b2012-06-20 16:38:30 -0700616
617/* ---------------------------------------------------------------------------
618 \fn sme_ChangeConfigParams
619 \brief The SME API exposed for HDD to provide config params to SME during
620 SMEs stop -> start sequence.
621
622 If HDD changed the domain that will cause a reset. This function will
623 provide the new set of 11d information for the new domain. Currrently this
624 API provides info regarding 11d only at reset but we can extend this for
625 other params (PMC, QoS) which needs to be initialized again at reset.
626
627 This is a synchronuous call
628
629 \param hHal - The handle returned by macOpen.
630
631 \Param
632 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
633 currently provides 11d related information like Country code,
634 Regulatory domain, valid channel list, Tx power per channel, a
635 list with active/passive scan allowed per valid channel.
636
637 \return eHalStatus
638 ---------------------------------------------------------------------------*/
639eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
640 tCsrUpdateConfigParam *pUpdateConfigParam);
641
642/*--------------------------------------------------------------------------
643
644 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
645 is ready tio run.
646
647 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
648 to running state.
649
650
651 \param hHal - The handle returned by macOpen.
652
653 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
654
655 Other status means SME failed to send the message to PE.
656 \sa
657
658 --------------------------------------------------------------------------*/
659eHalStatus sme_HDDReadyInd(tHalHandle hHal);
660
661
662/*--------------------------------------------------------------------------
663
664 \brief sme_ProcessMsg() - The main message processor for SME.
665
666 The function is called by a message dispatcher when to process a message
667 targeted for SME.
668
669
670 \param hHal - The handle returned by macOpen.
671 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
672
673 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
674
675 Other status means SME failed to process the message.
676 \sa
677
678 --------------------------------------------------------------------------*/
679eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
680
681v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
682
683/* ---------------------------------------------------------------------------
684 \fn sme_ScanRequest
685 \brief a wrapper function to Request a 11d or full scan from CSR.
686 \param pScanRequestID - pointer to an object to get back the request ID
687 \param callback - a callback function that scan calls upon finish, will not
688 be called if csrScanRequest returns error
689 \param pContext - a pointer passed in for the callback
690 \return eHalStatus
691 ---------------------------------------------------------------------------*/
692eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
693 tANI_U32 *pScanRequestID,
694 csrScanCompleteCallback callback, void *pContext);
695
696
697/* ---------------------------------------------------------------------------
698 \fn sme_ScanSetBGScanparams
699 \brief a wrapper function to request CSR to set BG scan params in PE
700 \param pScanReq - BG scan request structure
701 \return eHalStatus
702 ---------------------------------------------------------------------------*/
703eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
704
705
706/* ---------------------------------------------------------------------------
707 \fn sme_ScanGetResult
708 \brief a wrapper function to request scan results from CSR.
709 \param pFilter - If pFilter is NULL, all cached results are returned
710 \param phResult - an object for the result.
711 \return eHalStatus
712 ---------------------------------------------------------------------------*/
713eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
714 tScanResultHandle *phResult);
715
716
717/* ---------------------------------------------------------------------------
718 \fn sme_ScanFlushResult
719 \brief a wrapper function to request CSR to clear scan results.
720 \return eHalStatus
721 ---------------------------------------------------------------------------*/
722eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530723
724/*
725 * ---------------------------------------------------------------------------
726 * \fn sme_FilterScanResults
727 * \brief a wrapper function to request CSR to filter the scan results based
728 * on valid chennel list.
729 * \return eHalStatus
730 *---------------------------------------------------------------------------
731 */
732eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
733
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530734/*
735 * ---------------------------------------------------------------------------
736 * \fn sme_FilterScanDFSResults
737 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
738 * from the scan results.
739 * \return eHalStatus
740 *---------------------------------------------------------------------------
741 */
742eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
743
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700744eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700745
746/* ---------------------------------------------------------------------------
747 \fn sme_ScanResultGetFirst
748 \brief a wrapper function to request CSR to returns the first element of
749 scan result.
750 \param hScanResult - returned from csrScanGetResult
751 \return tCsrScanResultInfo * - NULL if no result
752 ---------------------------------------------------------------------------*/
753tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
754 tScanResultHandle hScanResult);
755
756/* ---------------------------------------------------------------------------
757 \fn sme_ScanResultGetNext
758 \brief a wrapper function to request CSR to returns the next element of
759 scan result. It can be called without calling csrScanResultGetFirst
760 first
761 \param hScanResult - returned from csrScanGetResult
762 \return Null if no result or reach the end
763 ---------------------------------------------------------------------------*/
764tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
765 tScanResultHandle hScanResult);
766
767/* ---------------------------------------------------------------------------
768 \fn sme_ScanResultPurge
769 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
770 in the list and free memory for each item
771 \param hScanResult - returned from csrScanGetResult. hScanResult is
772 considered gone by
773 calling this function and even before this function reutrns.
774 \return eHalStatus
775 ---------------------------------------------------------------------------*/
776eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
777
778/* ---------------------------------------------------------------------------
779 \fn sme_ScanGetPMKIDCandidateList
780 \brief a wrapper function to return the PMKID candidate list
781 \param pPmkidList - caller allocated buffer point to an array of
782 tPmkidCandidateInfo
783 \param pNumItems - pointer to a variable that has the number of
784 tPmkidCandidateInfo allocated when retruning, this is
785 either the number needed or number of items put into
786 pPmkidList
787 \return eHalStatus - when fail, it usually means the buffer allocated is not
788 big enough and pNumItems
789 has the number of tPmkidCandidateInfo.
790 \Note: pNumItems is a number of tPmkidCandidateInfo,
791 not sizeof(tPmkidCandidateInfo) * something
792 ---------------------------------------------------------------------------*/
793eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
794 tPmkidCandidateInfo *pPmkidList,
795 tANI_U32 *pNumItems );
796
797
798/*----------------------------------------------------------------------------
799 \fn sme_RoamRegisterLinkQualityIndCallback
800
801 \brief
802 a wrapper function to allow HDD to register a callback handler with CSR for
803 link quality indications.
804
805 Only one callback may be registered at any time.
806 In order to deregister the callback, a NULL cback may be provided.
807
808 Registration happens in the task context of the caller.
809
810 \param callback - Call back being registered
811 \param pContext - user data
812
813 DEPENDENCIES: After CSR open
814
815 \return eHalStatus
816-----------------------------------------------------------------------------*/
817eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
818 csrRoamLinkQualityIndCallback callback,
819 void *pContext);
820
821
822/* ---------------------------------------------------------------------------
823 \fn sme_RoamConnect
824 \brief a wrapper function to request CSR to inititiate an association
825 \param sessionId - the sessionId returned by sme_OpenSession.
826 \param pProfile - can be NULL to join to any open ones
827 \param pRoamId - to get back the request ID
828 \return eHalStatus
829 ---------------------------------------------------------------------------*/
830eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
831 tANI_U32 *pRoamId);
832
833/* ---------------------------------------------------------------------------
834 \fn sme_RoamReassoc
835 \brief a wrapper function to request CSR to inititiate a re-association
836 \param pProfile - can be NULL to join the currently connected AP. In that
837 case modProfileFields should carry the modified field(s) which could trigger
838 reassoc
839 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
840 that might need modification dynamically once STA is up & running and this
841 could trigger a reassoc
842 \param pRoamId - to get back the request ID
843 \return eHalStatus
844 -------------------------------------------------------------------------------*/
845eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
846 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700847 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700848
849/* ---------------------------------------------------------------------------
850 \fn sme_RoamConnectToLastProfile
851 \brief a wrapper function to request CSR to disconnect and reconnect with
852 the same profile
853 \return eHalStatus. It returns fail if currently connected
854 ---------------------------------------------------------------------------*/
855eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
856
857/* ---------------------------------------------------------------------------
858 \fn sme_RoamDisconnect
859 \brief a wrapper function to request CSR to disconnect from a network
860 \param reason -- To indicate the reason for disconnecting. Currently, only
861 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
862 \return eHalStatus
863 ---------------------------------------------------------------------------*/
864eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
865
Jeff Johnson295189b2012-06-20 16:38:30 -0700866/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530867 \fn.sme_abortConnection
868 \brief a wrapper function to request CSR to stop from connecting a network
869 \retun void.
870---------------------------------------------------------------------------*/
871
872void sme_abortConnection(tHalHandle hHal, tANI_U8 sessionId);
873
874/* ---------------------------------------------------------------------------
Abhishek Singhe0bc0992016-05-20 17:58:18 +0530875 \fn.sme_dhcp_done_ind
876 \brief a wrapper function to set dhcp done ind in sme session
877 \retun void.
878---------------------------------------------------------------------------*/
879void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id);
880
881/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700882 \fn sme_RoamStopBss
883 \brief a wrapper function to request CSR to stop bss
884 \param sessionId - sessionId of SoftAP
885 \return eHalStatus
886 ---------------------------------------------------------------------------*/
887eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
888
889/* ---------------------------------------------------------------------------
890 \fn sme_RoamGetAssociatedStas
891 \brief To probe the list of associated stations from various modules of CORE stack.
892 \This is an asynchronous API.
893 \param sessionId - sessionId of SoftAP
894 \param modId - Module from whom list of associtated stations is to be probed.
895 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
896 \param pUsrContext - Opaque HDD context
897 \param pfnSapEventCallback - Sap event callback in HDD
898 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
899 \return eHalStatus
900 -------------------------------------------------------------------------------*/
901eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
902 VOS_MODULE_ID modId, void *pUsrContext,
903 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
904
905/* ---------------------------------------------------------------------------
906 \fn sme_RoamDisconnectSta
907 \brief To disassociate a station. This is an asynchronous API.
908 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
909 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
910 -------------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +0530911eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId,
912#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
913 const tANI_U8 *pPeerMacAddr
914#else
915 tANI_U8 *pPeerMacAddr
916#endif
917 );
Jeff Johnson295189b2012-06-20 16:38:30 -0700918
919/* ---------------------------------------------------------------------------
920 \fn sme_RoamDeauthSta
921 \brief To disassociate a station. This is an asynchronous API.
922 \param hHal - Global structure
923 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530924 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700925 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
926 -------------------------------------------------------------------------------*/
927eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530928 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700929
930/* ---------------------------------------------------------------------------
931 \fn sme_RoamTKIPCounterMeasures
932 \brief To start or stop TKIP counter measures. This is an asynchronous API.
933 \param sessionId - sessionId of SoftAP
934 \param bEnable - Flag to start/stop TKIP countermeasures
935 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
936 -------------------------------------------------------------------------------*/
937eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
938
939/* ---------------------------------------------------------------------------
940 \fn sme_RoamGetWpsSessionOverlap
941 \brief To get the WPS PBC session overlap information.
942 \This is an asynchronous API.
943 \param sessionId - sessionId of SoftAP
944 \param pUsrContext - Opaque HDD context
945 \param pfnSapEventCallback - Sap event callback in HDD
946 \return eHalStatus
947 -------------------------------------------------------------------------------*/
948eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
949 void *pUsrContext, void *pfnSapEventCallback,
950 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700951
952/* ---------------------------------------------------------------------------
953 \fn sme_RoamGetConnectState
954 \brief a wrapper function to request CSR to return the current connect state
955 of Roaming
956 \return eHalStatus
957 ---------------------------------------------------------------------------*/
958eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
959
960/* ---------------------------------------------------------------------------
961 \fn sme_RoamGetConnectProfile
962 \brief a wrapper function to request CSR to return the current connect
963 profile. Caller must call csrRoamFreeConnectProfile after it is done
964 and before reuse for another csrRoamGetConnectProfile call.
965 \param pProfile - pointer to a caller allocated structure
966 tCsrRoamConnectedProfile
967 \return eHalStatus. Failure if not connected
968 ---------------------------------------------------------------------------*/
969eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
970 tCsrRoamConnectedProfile *pProfile);
971
972/* ---------------------------------------------------------------------------
973 \fn sme_RoamFreeConnectProfile
974 \brief a wrapper function to request CSR to free and reinitialize the
975 profile returned previously by csrRoamGetConnectProfile.
976 \param pProfile - pointer to a caller allocated structure
977 tCsrRoamConnectedProfile
978 \return eHalStatus.
979 ---------------------------------------------------------------------------*/
980eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
981 tCsrRoamConnectedProfile *pProfile);
982
983/* ---------------------------------------------------------------------------
984 \fn sme_RoamSetPMKIDCache
985 \brief a wrapper function to request CSR to return the PMKID candidate list
986 \param pPMKIDCache - caller allocated buffer point to an array of
987 tPmkidCacheInfo
988 \param numItems - a variable that has the number of tPmkidCacheInfo
989 allocated when retruning, this is either the number needed
990 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530991 \param update_entire_cache - if TRUE, then it overwrites the entire cache
992 with pPMKIDCache, else it updates entry by
993 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700994 \return eHalStatus - when fail, it usually means the buffer allocated is not
995 big enough and pNumItems has the number of
996 tPmkidCacheInfo.
997 \Note: pNumItems is a number of tPmkidCacheInfo,
998 not sizeof(tPmkidCacheInfo) * something
999 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05301000eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
1001 tPmkidCacheInfo *pPMKIDCache,
1002 tANI_U32 numItems,
1003 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -07001004
1005/* ---------------------------------------------------------------------------
1006 \fn sme_RoamGetSecurityReqIE
1007 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
1008 passes to PE to JOIN request or START_BSS request
1009 This is a synchronuous call.
1010 \param sessionId - returned by sme_OpenSession.
1011 \param pLen - caller allocated memory that has the length of pBuf as input.
1012 Upon returned, *pLen has the needed or IE length in pBuf.
1013 \param pBuf - Caller allocated memory that contain the IE field, if any,
1014 upon return
1015 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1016 \return eHalStatus - when fail, it usually means the buffer allocated is not
1017 big enough
1018 ---------------------------------------------------------------------------*/
1019eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1020 tANI_U8 *pBuf, eCsrSecurityType secType);
1021
1022/* ---------------------------------------------------------------------------
1023 \fn sme_RoamGetSecurityRspIE
1024 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
1025 the beacon or probe rsp if connected
1026 \param sessionId - returned by sme_OpenSession.
1027 \param pLen - caller allocated memory that has the length of pBuf as input.
1028 Upon returned, *pLen has the needed or IE length in pBuf.
1029 \param pBuf - Caller allocated memory that contain the IE field, if any,
1030 upon return
1031 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1032 \return eHalStatus - when fail, it usually means the buffer allocated is not
1033 big enough
1034 ---------------------------------------------------------------------------*/
1035eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1036 tANI_U8 *pBuf, eCsrSecurityType secType);
1037
1038
1039/* ---------------------------------------------------------------------------
1040 \fn sme_RoamGetNumPMKIDCache
1041 \brief a wrapper function to request CSR to return number of PMKID cache
1042 entries
1043 \return tANI_U32 - the number of PMKID cache entries
1044 ---------------------------------------------------------------------------*/
1045tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
1046
1047/* ---------------------------------------------------------------------------
1048 \fn sme_RoamGetPMKIDCache
1049 \brief a wrapper function to request CSR to return PMKID cache from CSR
1050 \param pNum - caller allocated memory that has the space of the number of
1051 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
1052 needed or actually number in tPmkidCacheInfo.
1053 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
1054 any, upon return
1055 \return eHalStatus - when fail, it usually means the buffer allocated is not
1056 big enough
1057 ---------------------------------------------------------------------------*/
1058eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
1059 tPmkidCacheInfo *pPmkidCache);
1060
1061/* ---------------------------------------------------------------------------
1062 \fn sme_GetConfigParam
1063 \brief a wrapper function that HDD calls to get the global settings
1064 currently maintained by CSR.
1065 \param pParam - caller allocated memory
1066 \return eHalStatus
1067 ---------------------------------------------------------------------------*/
1068eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
1069
1070/* ---------------------------------------------------------------------------
1071 \fn sme_GetStatistics
1072 \brief a wrapper function that client calls to register a callback to get
1073 different PHY level statistics from CSR.
1074
1075 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1076 \param statsMask - The different category/categories of stats requester is looking for
1077 The order in which you set the bits in the statsMask for requesting
1078 different type of stats is:
1079
1080 eCsrSummaryStats = bit 0
1081 eCsrGlobalClassAStats = bit 1
1082 eCsrGlobalClassBStats = bit 2
1083 eCsrGlobalClassCStats = bit 3
1084 eCsrGlobalClassDStats = bit 4
1085 eCsrPerStaStats = bit 5
1086
1087 \param callback - SME sends back the requested stats using the callback
1088 \param periodicity - If requester needs periodic update, 0 means it's an one
1089 time request
1090 \param cache - If requester is happy with cached stats
1091 \param staId - The station ID for which the stats is requested for
1092 \param pContext - user context to be passed back along with the callback
1093 \return eHalStatus
1094 ---------------------------------------------------------------------------*/
1095eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1096 tANI_U32 statsMask,
1097 tCsrStatsCallback callback,
1098 tANI_U32 periodicity, tANI_BOOLEAN cache,
1099 tANI_U8 staId, void *pContext);
1100
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301101/* ---------------------------------------------------------------------------
1102 \fn smeGetTLSTAState
1103 \helper function to get teh TL STA State whenever the function is called.
1104
1105 \param staId - The staID to be passed to the TL
1106 to get the relevant TL STA State
1107 \return the state as tANI_U16
1108 ---------------------------------------------------------------------------*/
1109tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1110
Jeff Johnson295189b2012-06-20 16:38:30 -07001111eHalStatus sme_GetRssi(tHalHandle hHal,
1112 tCsrRssiCallback callback,
1113 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301114
1115/* ---------------------------------------------------------------------------
1116 \fn sme_GetSnr
1117 \brief a wrapper function that client calls to register a callback to get
1118 SNR from FW
1119
1120 \param callback - SME sends back the requested stats using the callback
1121 \param staId - The station ID for which the stats is requested for
1122 \param bssid - The bssid of the connected session
1123 \param pContext - user context to be passed back along with the callback
1124 ---------------------------------------------------------------------------*/
1125eHalStatus sme_GetSnr(tHalHandle hHal,
1126 tCsrSnrCallback callback,
1127 tANI_U8 staId, tCsrBssid bssId,
1128 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001129#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001130eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1131 tCsrRssiCallback callback,
1132 tANI_U8 staId,
1133 tCsrBssid bssId,
1134 void *pContext,
1135 void* pVosContext);
1136#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001137
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001138#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001139/* ---------------------------------------------------------------------------
1140 \fn sme_GetTsmStats
1141 \brief a wrapper function that client calls to register a callback to get TSM Stats
1142
1143 \param callback - SME sends back the requested stats using the callback
1144 \param staId - The station ID for which the stats is requested for
1145 \param pContext - user context to be passed back along with the callback
1146 \param pVosContext - vos context
1147 \return eHalStatus
1148 ---------------------------------------------------------------------------*/
1149eHalStatus sme_GetTsmStats(tHalHandle hHal,
1150 tCsrTsmStatsCallback callback,
1151 tANI_U8 staId, tCsrBssid bssId,
1152 void *pContext, void* pVosContext, tANI_U8 tid);
1153
1154/* ---------------------------------------------------------------------------
1155 \fn sme_SetCCKMIe
1156 \brief function to store the CCKM IE passed from supplicant and use it while packing
1157 reassociation request
1158 \param hHal - HAL handle for device
1159 \param pCckmIe - pointer to CCKM IE data
1160 \param pCckmIeLen - length of the CCKM IE
1161 \- return Success or failure
1162 -------------------------------------------------------------------------*/
1163eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1164
1165
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001166/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001167 \fn sme_SetEseBeaconRequest
1168 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001169 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001170 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001171 \- return Success or failure
1172 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001173eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1174 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001175
1176
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001177#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001178/* ---------------------------------------------------------------------------
1179 \fn sme_CfgSetInt
1180 \brief a wrapper function that HDD calls to set parameters in CFG.
1181 \param cfgId - Configuration Parameter ID (type) for STA.
1182 \param ccmValue - The information related to Configuration Parameter ID
1183 which needs to be saved in CFG
1184 \param callback - To be registered by CSR with CCM. Once the CFG done with
1185 saving the information in the database, it notifies CCM &
1186 then the callback will be invoked to notify.
1187 \param toBeSaved - To save the request for future reference
1188 \return eHalStatus
1189 ---------------------------------------------------------------------------*/
1190eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1191 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1192
1193/* ---------------------------------------------------------------------------
1194 \fn sme_CfgSetStr
1195 \brief a wrapper function that HDD calls to set parameters in CFG.
1196 \param cfgId - Configuration Parameter ID (type) for STA.
1197 \param pStr - Pointer to the byte array which carries the information needs
1198 to be saved in CFG
1199 \param length - Length of the data to be saved
1200 \param callback - To be registered by CSR with CCM. Once the CFG done with
1201 saving the information in the database, it notifies CCM &
1202 then the callback will be invoked to notify.
1203 \param toBeSaved - To save the request for future reference
1204 \return eHalStatus
1205 ---------------------------------------------------------------------------*/
1206eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1207 tANI_U32 length, tCcmCfgSetCallback callback,
1208 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301209/* ---------------------------------------------------------------------------
1210 \fn sme_GetModifyProfileFields
1211 \brief HDD or SME - QOS calls this function to get the current values of
1212 connected profile fields, changing which can cause reassoc.
1213 This function must be called after CFG is downloaded and STA is in connected
1214 state. Also, make sure to call this function to get the current profile
1215 fields before calling the reassoc. So that pModifyProfileFields will have
1216 all the latest values plus the one(s) has been updated as part of reassoc
1217 request.
1218 \param pModifyProfileFields - pointer to the connected profile fields
1219 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001220
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301221 \return eHalStatus
1222 -------------------------------------------------------------------------------*/
1223eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1224 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301225/* ---------------------------------------------------------------------------
1226 \fn sme_HT40StopOBSSScan
1227 \brief HDD or SME - Command to stop the OBSS scan
1228 THis is implemented only for debugging purpose.
1229 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1230 \param sessionId - sessionId
1231 changing which can cause reassoc
1232
1233 \return eHalStatus
1234 -------------------------------------------------------------------------------*/
1235eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001236
1237/*--------------------------------------------------------------------------
1238 \fn sme_SetConfigPowerSave
1239 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1240 For BMPS related configuration, this function also updates the CFG
1241 and sends a message to FW to pick up the new values. Note: Calling
1242 this function only updates the configuration and does not enable
1243 the specified power save mode.
1244 \param hHal - The handle returned by macOpen.
1245 \param psMode - Power Saving mode being modified
1246 \param pConfigParams - a pointer to a caller allocated object of type
1247 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1248 \return eHalStatus
1249 --------------------------------------------------------------------------*/
1250eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1251 void *pConfigParams);
1252
1253/*--------------------------------------------------------------------------
1254 \fn sme_GetConfigPowerSave
1255 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1256 \param hHal - The handle returned by macOpen.
1257 \param psMode - Power Saving mode
1258 \param pConfigParams - a pointer to a caller allocated object of type
1259 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1260 \return eHalStatus
1261 --------------------------------------------------------------------------*/
1262eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1263 void *pConfigParams);
1264
1265/* ---------------------------------------------------------------------------
1266 \fn sme_SignalPowerEvent
1267 \brief Signals to PMC that a power event has occurred. Used for putting
1268 the chip into deep sleep mode.
1269 \param hHal - The handle returned by macOpen.
1270 \param event - the event that has occurred
1271 \return eHalStatus
1272 ---------------------------------------------------------------------------*/
1273extern eHalStatus sme_SignalPowerEvent (
1274 tHalHandle hHal,
1275 tPmcPowerEvent event);
1276
1277/* ---------------------------------------------------------------------------
1278 \fn sme_EnablePowerSave
1279 \brief Enables one of the power saving modes. This API does not cause a
1280 device state change. This is purely a configuration API.
1281 \param hHal - The handle returned by macOpen.
1282 \param psMode - The power saving mode to enable.
1283 \return eHalStatus
1284 ---------------------------------------------------------------------------*/
1285extern eHalStatus sme_EnablePowerSave (
1286 tHalHandle hHal,
1287 tPmcPowerSavingMode psMode);
1288
1289/* ---------------------------------------------------------------------------
1290 \fn sme_DisablePowerSave
1291 \brief Disables one of the power saving modes.Disabling does not imply
1292 that device will be brought out of the current PS mode. This is
1293 purely a configuration API.
1294 \param hHal - The handle returned by macOpen.
1295 \param psMode - The power saving mode to disable.
1296 \return eHalStatus
1297 ---------------------------------------------------------------------------*/
1298extern eHalStatus sme_DisablePowerSave (
1299 tHalHandle hHal,
1300 tPmcPowerSavingMode psMode);
1301
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301302 /* ---------------------------------------------------------------------------
1303 \fn sme_SetHostPowerSave
1304 \brief The BMPS logic is controlled by the User level Apps
1305 \param hHal - The handle returned by macOpen.
1306 \param psMode - The power saving mode to enable.
1307 \return eHalStatus
1308 ---------------------------------------------------------------------------*/
1309extern eHalStatus sme_SetHostPowerSave (
1310 tHalHandle hHal,
1311 v_BOOL_t psMode);
1312
Jeff Johnson295189b2012-06-20 16:38:30 -07001313/* ---------------------------------------------------------------------------
1314 \fn sme_StartAutoBmpsTimer
1315 \brief Starts a timer that periodically polls all the registered
1316 module for entry into Bmps mode. This timer is started only if BMPS is
1317 enabled and whenever the device is in full power.
1318 \param hHal - The handle returned by macOpen.
1319 \return eHalStatus
1320 ---------------------------------------------------------------------------*/
1321extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1322
1323/* ---------------------------------------------------------------------------
1324 \fn sme_StopAutoBmpsTimer
1325 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1326 Stopping the timer does not cause a device state change. Only the timer
1327 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1328 \param hHal - The handle returned by macOpen.
1329 \return eHalStatus
1330 ---------------------------------------------------------------------------*/
1331extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1332
1333/* ---------------------------------------------------------------------------
1334 \fn sme_QueryPowerState
1335 \brief Returns the current power state of the device.
1336 \param hHal - The handle returned by macOpen.
1337 \param pPowerState - pointer to location to return power state
1338 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1339 \return eHalStatus
1340 ---------------------------------------------------------------------------*/
1341extern eHalStatus sme_QueryPowerState (
1342 tHalHandle hHal,
1343 tPmcPowerState *pPowerState,
1344 tPmcSwitchState *pSwWlanSwitchState);
1345
1346/* ---------------------------------------------------------------------------
1347 \fn sme_IsPowerSaveEnabled
1348 \brief Checks if the device is able to enter a particular power save mode
1349 This does not imply that the device is in a particular PS mode
1350 \param hHal - The handle returned by macOpen.
1351 \param psMode - the power saving mode
1352 \return eHalStatus
1353 ---------------------------------------------------------------------------*/
1354extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1355 tHalHandle hHal,
1356 tPmcPowerSavingMode psMode);
1357
1358/* ---------------------------------------------------------------------------
1359 \fn sme_RequestFullPower
1360 \brief Request that the device be brought to full power state.
1361 Note 1: If "fullPowerReason" specificied in this API is set to
1362 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1363 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1364 HDD is requesting full power, we need to undo any previous HDD requests for
1365 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1366 specified anything other than above, the buffered requests for BMPS and WoWL
1367 will not be cleared.
1368 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1369 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1370 request".
1371 Note 3: When the device finally enters Full Power PMC will start a timer
1372 if any of the following holds true:
1373 - Auto BMPS mode is enabled
1374 - Uapsd request is pending
1375 - HDD's request for BMPS is pending
1376 - HDD's request for WoWL is pending
1377 On timer expiry PMC will attempt to put the device in BMPS mode if following
1378 (in addition to those listed above) holds true:
1379 - Polling of all modules through the Power Save Check routine passes
1380 - STA is associated to an access point
1381 \param hHal - The handle returned by macOpen.
1382 \param - callbackRoutine Callback routine invoked in case of success/failure
1383 \param - callbackContext - Cookie to be passed back during callback
1384 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1385 distinguish between BAP and HDD requests
1386 \return eHalStatus - status
1387 eHAL_STATUS_SUCCESS - device brought to full power state
1388 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1389 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1390 ---------------------------------------------------------------------------*/
1391extern eHalStatus sme_RequestFullPower (
1392 tHalHandle hHal,
1393 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1394 void *callbackContext,
1395 tRequestFullPowerReason fullPowerReason);
1396
1397/* ---------------------------------------------------------------------------
1398 \fn sme_RequestBmps
1399 \brief Request that the device be put in BMPS state. Request will be
1400 accepted only if BMPS mode is enabled and power save check routine
1401 passes. Only HDD should invoke this API.
1402 \param hHal - The handle returned by macOpen.
1403 \param - callbackRoutine Callback routine invoked in case of success/failure
1404 \param - callbackContext - Cookie to be passed back during callback
1405 \return eHalStatus
1406 eHAL_STATUS_SUCCESS - device is in BMPS state
1407 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1408 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1409 ---------------------------------------------------------------------------*/
1410extern eHalStatus sme_RequestBmps (
1411 tHalHandle hHal,
1412 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1413 void *callbackContext);
1414
1415/* ---------------------------------------------------------------------------
1416 \fn sme_SetDHCPTillPowerActiveFlag
1417 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1418 entry by PMC
1419 \param hHal - The handle returned by macOpen.
1420 ---------------------------------------------------------------------------*/
1421void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1422
1423
1424/* ---------------------------------------------------------------------------
1425 \fn sme_StartUapsd
1426 \brief Request that the device be put in UAPSD state. If the device is in
1427 Full Power it will be put in BMPS mode first and then into UAPSD
1428 mode.
1429 \param hHal - The handle returned by macOpen.
1430 \param - callbackRoutine Callback routine invoked in case of success/failure
1431 \param - callbackContext - Cookie to be passed back during callback
1432 eHAL_STATUS_SUCCESS - device is in UAPSD state
1433 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1434 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1435 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1436 \return eHalStatus
1437 ---------------------------------------------------------------------------*/
1438extern eHalStatus sme_StartUapsd (
1439 tHalHandle hHal,
1440 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1441 void *callbackContext);
1442
1443/* ---------------------------------------------------------------------------
1444 \fn sme_StopUapsd
1445 \brief Request that the device be put out of UAPSD state. Device will be
1446 put in in BMPS state after stop UAPSD completes. Buffered requests for
1447 UAPSD will be cleared after this.
1448 \param hHal - The handle returned by macOpen.
1449 \return eHalStatus
1450 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1451 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1452 ---------------------------------------------------------------------------*/
1453extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1454
1455/* ---------------------------------------------------------------------------
1456 \fn sme_RequestStandby
1457 \brief Request that the device be put in standby. It is HDD's responsibility
1458 to bring the chip to full power and do a discconnect before calling
1459 this API. Request for standby will be rejected if STA is associated
1460 to an AP.
1461 \param hHal - The handle returned by macOpen.
1462 \param - callbackRoutine Callback routine invoked in case of success/failure
1463 \param - callbackContext - Cookie to be passed back during callback
1464 \return eHalStatus
1465 eHAL_STATUS_SUCCESS - device is in Standby mode
1466 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1467 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1468 ---------------------------------------------------------------------------*/
1469extern eHalStatus sme_RequestStandby (
1470 tHalHandle hHal,
1471 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1472 void *callbackContext);
1473
1474/* ---------------------------------------------------------------------------
1475 \fn sme_RegisterPowerSaveCheck
1476 \brief Register a power save check routine that is called whenever
1477 the device is about to enter one of the power save modes.
1478 \param hHal - The handle returned by macOpen.
1479 \param checkRoutine - Power save check routine to be registered
1480 \param callbackContext - Cookie to be passed back during callback
1481 \return eHalStatus
1482 eHAL_STATUS_SUCCESS - successfully registered
1483 eHAL_STATUS_FAILURE - not successfully registered
1484 ---------------------------------------------------------------------------*/
1485extern eHalStatus sme_RegisterPowerSaveCheck (
1486 tHalHandle hHal,
1487 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1488
1489/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301490 \fn sme_Register11dScanDoneCallback
1491 \brief Register a routine of type csrScanCompleteCallback which is
1492 called whenever an 11d scan is done
1493 \param hHal - The handle returned by macOpen.
1494 \param callback - 11d scan complete routine to be registered
1495 \return eHalStatus
1496 ---------------------------------------------------------------------------*/
1497extern eHalStatus sme_Register11dScanDoneCallback (
1498 tHalHandle hHal,
1499 csrScanCompleteCallback);
1500
1501/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001502 \fn sme_DeregisterPowerSaveCheck
1503 \brief Deregister a power save check routine
1504 \param hHal - The handle returned by macOpen.
1505 \param checkRoutine - Power save check routine to be deregistered
1506 \return eHalStatus
1507 eHAL_STATUS_SUCCESS - successfully deregistered
1508 eHAL_STATUS_FAILURE - not successfully deregistered
1509 ---------------------------------------------------------------------------*/
1510extern eHalStatus sme_DeregisterPowerSaveCheck (
1511 tHalHandle hHal,
1512 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1513
1514/* ---------------------------------------------------------------------------
1515 \fn sme_RegisterDeviceStateUpdateInd
1516 \brief Register a callback routine that is called whenever
1517 the device enters a new device state (Full Power, BMPS, UAPSD)
1518 \param hHal - The handle returned by macOpen.
1519 \param callbackRoutine - Callback routine to be registered
1520 \param callbackContext - Cookie to be passed back during callback
1521 \return eHalStatus
1522 eHAL_STATUS_SUCCESS - successfully registered
1523 eHAL_STATUS_FAILURE - not successfully registered
1524 ---------------------------------------------------------------------------*/
1525extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1526 tHalHandle hHal,
1527 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1528 void *callbackContext);
1529
1530/* ---------------------------------------------------------------------------
1531 \fn sme_DeregisterDeviceStateUpdateInd
1532 \brief Deregister a routine that was registered for device state changes
1533 \param hHal - The handle returned by macOpen.
1534 \param callbackRoutine - Callback routine to be deregistered
1535 \return eHalStatus
1536 eHAL_STATUS_SUCCESS - successfully deregistered
1537 eHAL_STATUS_FAILURE - not successfully deregistered
1538 ---------------------------------------------------------------------------*/
1539extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1540 tHalHandle hHal,
1541 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1542
1543/* ---------------------------------------------------------------------------
1544 \fn sme_WowlAddBcastPattern
1545 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1546 do a pattern match on these patterns when Wowl is enabled during BMPS
1547 mode.
1548 \param hHal - The handle returned by macOpen.
1549 \param pattern - Pattern to be added
1550 \return eHalStatus
1551 eHAL_STATUS_FAILURE Cannot add pattern
1552 eHAL_STATUS_SUCCESS Request accepted.
1553 ---------------------------------------------------------------------------*/
1554extern eHalStatus sme_WowlAddBcastPattern (
1555 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001556 tpSirWowlAddBcastPtrn pattern,
1557 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001558
1559/* ---------------------------------------------------------------------------
1560 \fn sme_WowlDelBcastPattern
1561 \brief Delete a pattern that was added for Pattern Byte Matching.
1562 \param hHal - The handle returned by macOpen.
1563 \param pattern - Pattern to be deleted
1564 \return eHalStatus
1565 eHAL_STATUS_FAILURE Cannot delete pattern
1566 eHAL_STATUS_SUCCESS Request accepted.
1567 ---------------------------------------------------------------------------*/
1568extern eHalStatus sme_WowlDelBcastPattern (
1569 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001570 tpSirWowlDelBcastPtrn pattern,
1571 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001572
1573/* ---------------------------------------------------------------------------
1574 \fn sme_EnterWowl
1575 \brief This is the API to request entry into WOWL mode.
1576 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1577 SME will will cache the information that WOWL has been requested and
1578 attempt to put the device in BMPS first. On entry into BMPS, SME will
1579 enter the WOWL mode.
1580 Note 1: After WoWL request is accepted, If module other than HDD requests
1581 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1582 and attempt to put the chip into BMPS+WOWL based on a timer.
1583 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1584 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1585 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1586 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1587 are required. Currently there is no requirement or use case to support UAPSD
1588 and WOWL at the same time.
1589 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1590 Note 5. Request for WoWL is rejected if BMPS is disabled.
1591
1592 \param hHal - The handle returned by macOpen.
1593 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1594 Used for success/failure notification by SME
1595 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1596 at the time of callback.
1597 \param wakeReasonIndCB - Callback routine provided by HDD.
1598 Used for Wake Reason Indication by SME
1599 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1600 at the time of callback.
1601 \return eHalStatus
1602 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1603 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1604 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1605 mode is entered.
1606 ---------------------------------------------------------------------------*/
1607extern eHalStatus sme_EnterWowl (
1608 tHalHandle hHal,
1609 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1610 void *enterWowlCallbackContext,
1611#ifdef WLAN_WAKEUP_EVENTS
1612 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1613 void *wakeReasonIndCBContext,
1614#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001615 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001616
1617/* ---------------------------------------------------------------------------
1618 \fn sme_ExitWowl
1619 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1620 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1621 mode. Any Buffered request for WoWL will be cleared after this API.
1622 \param hHal - The handle returned by macOpen.
1623 \return eHalStatus
1624 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1625 only if the previous "Enter WOWL" transaction has
1626 not even completed.
1627 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1628 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301629extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001630
1631/* ---------------------------------------------------------------------------
1632
1633 \fn sme_RoamSetKey
1634
1635 \brief To set encryption key. This function should be called only when connected
1636 This is an asynchronous API.
1637
1638 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1639
1640 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1641
1642 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1643
1644 FAILURE or RESOURCES The API finished and failed.
1645
1646 -------------------------------------------------------------------------------*/
1647eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1648
1649/* ---------------------------------------------------------------------------
1650
1651 \fn sme_RoamRemoveKey
1652
1653 \brief To set encryption key. This is an asynchronous API.
1654
1655 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1656
1657 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1658
1659 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1660
1661 FAILURE or RESOURCES The API finished and failed.
1662
1663 -------------------------------------------------------------------------------*/
1664eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1665
1666
1667/* ---------------------------------------------------------------------------
1668
1669 \fn sme_GetCountryCode
1670
1671 \brief To return the current country code. If no country code is applied, default country code is
1672 used to fill the buffer.
1673 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1674 This is a synchronous API.
1675
1676 \param pBuf - pointer to a caller allocated buffer for returned country code.
1677
1678 \param pbLen For input, this parameter indicates how big is the buffer.
1679 Upon return, this parameter has the number of bytes for country. If pBuf
1680 doesn't have enough space, this function returns
1681 fail status and this parameter contains the number that is needed.
1682
1683 \return eHalStatus SUCCESS.
1684
1685 FAILURE or RESOURCES The API finished and failed.
1686
1687 -------------------------------------------------------------------------------*/
1688eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1689
1690/* ---------------------------------------------------------------------------
1691
1692 \fn sme_SetCountryCode
1693
1694 \brief To change the current/default country code.
1695 If 11d supported is turned off, an error is return.
1696 This is a synchronous API.
1697
1698 \param pCountry - pointer to a caller allocated buffer for the country code.
1699
1700 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1701 whether a reset is required.
1702
1703 \return eHalStatus SUCCESS.
1704
1705 FAILURE or RESOURCES The API finished and failed.
1706
1707 -------------------------------------------------------------------------------*/
1708eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1709
1710/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301711
1712 \fn sme_InitChannels
1713
1714 \brief Used to initialize CSR channel lists while driver loading
1715
1716 \param hHal - global pMac structure
1717
1718 \return eHalStatus SUCCESS.
1719
1720 FAILURE or RESOURCES The API finished and failed.
1721
1722 -------------------------------------------------------------------------------*/
1723eHalStatus sme_InitChannels(tHalHandle hHal);
1724
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301725
Mihir Shete04206452014-11-20 17:50:58 +05301726#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301727/* ---------------------------------------------------------------------------
1728 \fn sme_InitChannelsForCC
1729
1730 \brief Used to issue regulatory hint to user
1731
1732 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301733 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301734
1735 \return eHalStatus SUCCESS.
1736
1737 FAILURE or RESOURCES The API finished and failed.
1738
1739 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301740eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301741#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301742
Mihir Shetee1093ba2014-01-21 20:13:32 +05301743/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001744 \fn sme_ResetCountryCodeInformation
1745 \brief this function is to reset the country code current being used back to EEPROM default
1746 this includes channel list and power setting. This is a synchronous API.
1747 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1748 a restart is needed to apply the change
1749 \return eHalStatus
1750 -------------------------------------------------------------------------------*/
1751eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1752
1753/* ---------------------------------------------------------------------------
1754 \fn sme_GetSupportedCountryCode
1755 \brief this function is to get a list of the country code current being supported
1756 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1757 this has the country code list. 3 bytes for each country code. This may be NULL if
1758 caller wants to know the needed byte count.
1759 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1760 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1761 \return eHalStatus
1762 -------------------------------------------------------------------------------*/
1763eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1764
1765/* ---------------------------------------------------------------------------
1766 \fn sme_GetCurrentRegulatoryDomain
1767 \brief this function is to get the current regulatory domain. This is a synchronous API.
1768 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1769 SME. The function fails if 11d support is turned off.
1770 \param pDomain - Caller allocated buffer to return the current domain.
1771 \return eHalStatus SUCCESS.
1772
1773 FAILURE or RESOURCES The API finished and failed.
1774 -------------------------------------------------------------------------------*/
1775eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1776
1777/* ---------------------------------------------------------------------------
1778 \fn sme_SetRegulatoryDomain
1779 \brief this function is to set the current regulatory domain.
1780 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1781 SME. This is a synchronous API.
1782 \param domainId - indicate the domain (defined in the driver) needs to set to.
1783 See v_REGDOMAIN_t for definition
1784 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1785 a restart is needed to apply the change
1786 \return eHalStatus
1787 -------------------------------------------------------------------------------*/
1788eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1789
1790/* ---------------------------------------------------------------------------
1791
1792 \fn sme_GetRegulatoryDomainForCountry
1793
1794 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1795
1796 \param pCountry - pointer to a caller allocated buffer for input country code.
1797
1798 \param pDomainId Upon successful return, it is the domain that country belongs to.
1799 If it is NULL, returning success means that the country code is known.
1800
1801 \return eHalStatus SUCCESS.
1802
1803 FAILURE or RESOURCES The API finished and failed.
1804
1805 -------------------------------------------------------------------------------*/
1806eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1807
1808
1809
1810/* ---------------------------------------------------------------------------
1811
1812 \fn sme_GetSupportedRegulatoryDomains
1813
1814 \brief To return a list of supported regulatory domains. This is a synchronous API.
1815
1816 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1817
1818 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1819 Upon return, this parameter has the number for supported domains. If pDomains
1820 doesn't have enough space for all the supported domains, this function returns
1821 fail status and this parameter contains the number that is needed.
1822
1823 \return eHalStatus SUCCESS.
1824
1825 FAILURE or RESOURCES The API finished and failed.
1826
1827 -------------------------------------------------------------------------------*/
1828eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1829
1830//some support functions
1831tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1832tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1833tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1834//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1835eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1836
1837typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1838/* ---------------------------------------------------------------------------
1839
1840 \fn sme_ChangeCountryCode
1841
1842 \brief Change Country code from upperlayer during WLAN driver operation.
1843 This is a synchronous API.
1844
1845 \param hHal - The handle returned by macOpen.
1846
1847 \param pCountry New Country Code String
1848
Abhishek Singha306a442013-11-07 18:39:01 +05301849 \param sendRegHint If we want to send reg hint to nl80211
1850
Jeff Johnson295189b2012-06-20 16:38:30 -07001851 \return eHalStatus SUCCESS.
1852
1853 FAILURE or RESOURCES The API finished and failed.
1854
1855 -------------------------------------------------------------------------------*/
1856eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1857 tSmeChangeCountryCallback callback,
1858 tANI_U8 *pCountry,
1859 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301860 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301861 tAniBool countryFromUserSpace,
1862 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001863
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301864/* ---------------------------------------------------------------------------
1865
Amar Singhal0d15bd52013-10-12 23:13:13 -07001866 \fn sme_GenericChangeCountryCode
1867
1868 \brief Generic API to change country code
1869
1870 \param hHal - The handle returned by macOpen.
1871
1872 \param pCountry New Country Code String
1873
1874 \param reg_domain Regulatory domain for the new country code
1875
1876 \return eHalStatus SUCCESS.
1877
1878 FAILURE or RESOURCES The API finished and failed.
1879
1880 -------------------------------------------------------------------------------*/
1881eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1882 tANI_U8 *pCountry,
1883 v_REGDOMAIN_t reg_domain);
1884
Abhishek Singh00b71972016-01-07 10:51:04 +05301885#ifdef WLAN_FEATURE_RMC
1886/* ---------------------------------------------------------------------------
1887
1888 \fn sme_TXFailMonitorStartStopInd
1889
1890 \brief Indicate FW about TX Fail Monitor Indication`
1891
1892 \param hHal - The handle returned by macOpen.
1893
1894 \param tx_fail_count number of failures after which the firmware sends
1895 an indication to host
1896
1897 \param txFailIndCallback function to be called after receiving TX Fail
1898 indication
1899 \return eHalStatus SUCCESS.
1900
1901 FAILURE or RESOURCES The API finished and failed.
1902
1903 -------------------------------------------------------------------------------*/
1904eHalStatus sme_TXFailMonitorStartStopInd(tHalHandle hHal,
1905 tANI_U8 tx_fail_count,
1906 void * txFailIndCallback);
1907#endif /* WLAN_FEATURE_RMC */
1908
Amar Singhal0d15bd52013-10-12 23:13:13 -07001909/* ---------------------------------------------------------------------------
1910
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301911 \fn sme_DHCPStartInd
1912
1913 \brief Indicate FW about DHCP start event.
1914
1915 \param hHal - The handle returned by macOpen.
1916
1917 \param device_mode the mode of the device
1918
c_hpothu0b0cab72014-02-13 21:52:40 +05301919 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301920
1921 \return eHalStatus SUCCESS.
1922
1923 FAILURE or RESOURCES The API finished and failed.
1924
1925 -------------------------------------------------------------------------------*/
1926
1927eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1928 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301929 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301930
1931/* ---------------------------------------------------------------------------
1932
1933 \fn sme_DHCPStopInd
1934
1935 \brief Indicate FW about DHCP stop event.
1936
1937 \param hHal - The handle returned by macOpen.
1938
1939 \param device_mode the mode of the device
1940
c_hpothu0b0cab72014-02-13 21:52:40 +05301941 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301942
1943 \return eHalStatus SUCCESS.
1944
1945 FAILURE or RESOURCES The API finished and failed.
1946
1947 -------------------------------------------------------------------------------*/
1948eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1949 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301950 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301951
Jeff Johnson295189b2012-06-20 16:38:30 -07001952
1953/* ---------------------------------------------------------------------------
1954 \fn sme_BtcSignalBtEvent
1955 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1956 BT event type and the current operating mode of Libra (full power,
1957 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1958 would be employed.
1959 \param hHal - The handle returned by macOpen.
1960 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1961 Caller owns the memory and is responsible for freeing it.
1962 \return VOS_STATUS
1963 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1964 if driver has not yet been initialized or if BTC
1965 Events Layer has been disabled.
1966 VOS_STATUS_SUCCESS BT Event passed to HAL
1967 ---------------------------------------------------------------------------*/
1968VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1969
1970/* ---------------------------------------------------------------------------
1971 \fn sme_BtcSetConfig
1972 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1973 This function should be invoked only after CFG download has completed.
1974 Calling it after sme_HDDReadyInd is recommended.
1975 \param hHal - The handle returned by macOpen.
1976 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1977 tSmeBtcConfig. Caller owns the memory and is responsible
1978 for freeing it.
1979 \return VOS_STATUS
1980 VOS_STATUS_E_FAILURE Config not passed to HAL.
1981 VOS_STATUS_SUCCESS Config passed to HAL
1982 ---------------------------------------------------------------------------*/
1983VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1984
1985/* ---------------------------------------------------------------------------
1986 \fn sme_BtcGetConfig
1987 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1988 \param hHal - The handle returned by macOpen.
1989 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1990 Caller owns the memory and is responsible for freeing it.
1991 \return VOS_STATUS
1992 VOS_STATUS_E_FAILURE - failure
1993 VOS_STATUS_SUCCESS success
1994 ---------------------------------------------------------------------------*/
1995VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1996
1997/* ---------------------------------------------------------------------------
1998 \fn sme_SetCfgPrivacy
1999 \brief API to set configure privacy parameters
2000 \param hHal - The handle returned by macOpen.
2001 \param pProfile - Pointer CSR Roam profile.
2002 \param fPrivacy - This parameter indicates status of privacy
2003
2004 \return void
2005 ---------------------------------------------------------------------------*/
2006void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
2007
2008#if defined WLAN_FEATURE_VOWIFI
2009/* ---------------------------------------------------------------------------
2010 \fn sme_NeighborReportRequest
2011 \brief API to request neighbor report.
2012 \param hHal - The handle returned by macOpen.
2013 \param pRrmNeighborReq - Pointer to a caller allocated object of type
2014 tRrmNeighborReq. Caller owns the memory and is responsible
2015 for freeing it.
2016 \return VOS_STATUS
2017 VOS_STATUS_E_FAILURE - failure
2018 VOS_STATUS_SUCCESS success
2019 ---------------------------------------------------------------------------*/
2020VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
2021 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
2022#endif
2023
2024//The following are debug APIs to support direct read/write register/memory
2025//They are placed in SME because HW cannot be access when in LOW_POWER state
2026//AND not connected. The knowledge and synchronization is done in SME
2027
2028//sme_DbgReadRegister
2029//Caller needs to validate the input values
2030VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
2031
2032//sme_DbgWriteRegister
2033//Caller needs to validate the input values
2034VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
2035
2036//sme_DbgReadMemory
2037//Caller needs to validate the input values
2038//pBuf caller allocated buffer has the length of nLen
2039VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2040
2041//sme_DbgWriteMemory
2042//Caller needs to validate the input values
2043VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2044
Jeff Johnson295189b2012-06-20 16:38:30 -07002045VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
2046 tSirVersionType *pVersion);
2047VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
2048 tSirVersionType *pVersion);
2049VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
2050 tANI_U8 *pVersion,
2051 tANI_U32 versionBufferSize);
2052VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
2053 tANI_U8 *pVersion,
2054 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07002055eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
2056 csrRoamCompleteCallback callback,
2057 void *pContext);
2058
2059#ifdef FEATURE_WLAN_WAPI
2060/* ---------------------------------------------------------------------------
2061 \fn sme_RoamSetBKIDCache
2062 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
2063 candidate list.
2064 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2065 it is opened (by calling halOpen).
2066 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
2067 \param numItems - a variable that has the number of tBkidCacheInfo allocated
2068 when retruning, this is the number of items put into pBKIDCache
2069 \return eHalStatus - when fail, it usually means the buffer allocated is not
2070 big enough and pNumItems has the number of tBkidCacheInfo.
2071 ---------------------------------------------------------------------------*/
2072eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
2073 tANI_U32 numItems );
2074
2075/* ---------------------------------------------------------------------------
2076 \fn sme_RoamGetBKIDCache
2077 \brief The SME API exposed to HDD to allow HDD to request SME to return its
2078 BKID cache.
2079 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2080 it is opened (by calling halOpen).
2081 \param pNum - caller allocated memory that has the space of the number of
2082 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
2083 in SME cache.
2084 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
2085 upon return
2086 \return eHalStatus - when fail, it usually means the buffer allocated is not
2087 big enough.
2088 ---------------------------------------------------------------------------*/
2089eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
2090 tBkidCacheInfo *pBkidCache);
2091
2092/* ---------------------------------------------------------------------------
2093 \fn sme_RoamGetNumBKIDCache
2094 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2095 number of BKID cache entries.
2096 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2097 it is opened (by calling halOpen).
2098 \return tANI_U32 - the number of BKID cache entries.
2099 ---------------------------------------------------------------------------*/
2100tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2101
2102/* ---------------------------------------------------------------------------
2103 \fn sme_ScanGetBKIDCandidateList
2104 \brief a wrapper function to return the BKID candidate list
2105 \param pBkidList - caller allocated buffer point to an array of
2106 tBkidCandidateInfo
2107 \param pNumItems - pointer to a variable that has the number of
2108 tBkidCandidateInfo allocated when retruning, this is
2109 either the number needed or number of items put into
2110 pPmkidList
2111 \return eHalStatus - when fail, it usually means the buffer allocated is not
2112 big enough and pNumItems
2113 has the number of tBkidCandidateInfo.
2114 \Note: pNumItems is a number of tBkidCandidateInfo,
2115 not sizeof(tBkidCandidateInfo) * something
2116 ---------------------------------------------------------------------------*/
2117eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2118 tBkidCandidateInfo *pBkidList,
2119 tANI_U32 *pNumItems );
2120#endif /* FEATURE_WLAN_WAPI */
2121
Jeff Johnsone7245742012-09-05 17:12:55 -07002122#ifdef FEATURE_OEM_DATA_SUPPORT
2123/********************************************************************************************
2124 Oem data related modifications
2125*********************************************************************************************/
2126/* ---------------------------------------------------------------------------
2127 \fn sme_OemDataReq
2128 \param sessionId - session id of session to be used for oem data req.
2129 \param pOemDataReqID - pointer to an object to get back the request ID
2130 \param callback - a callback function that is called upon finish
2131 \param pContext - a pointer passed in for the callback
2132 \return eHalStatus
2133 ---------------------------------------------------------------------------*/
2134eHalStatus sme_OemDataReq(tHalHandle hHal,
2135 tANI_U8 sessionId,
2136 tOemDataReqConfig *,
2137 tANI_U32 *pOemDataReqID,
2138 oemData_OemDataReqCompleteCallback callback,
2139 void *pContext);
2140
2141/* ---------------------------------------------------------------------------
2142 \fn sme_getOemDataRsp
2143 \param pOemDataRsp - A pointer to the response object
2144 \param pOemDataReqID - pointer to an object to get back the request ID
2145 \return eHalStatus
2146 ---------------------------------------------------------------------------*/
2147eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2148 tOemDataRsp **pOemDataRsp);
2149
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +05302150/* ---------------------------------------------------------------------------
2151 \fn sme_OemDataReqNew
2152 \brief a wrapper function for OEM DATA REQ NEW
2153 \param pOemDataReqNewConfig - Data to be passed to FW
2154 ---------------------------------------------------------------------------*/
2155void sme_OemDataReqNew(tHalHandle hHal,
2156 tOemDataReqNewConfig *pOemDataReqNewConfig);
2157
Jeff Johnsone7245742012-09-05 17:12:55 -07002158#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002159
2160
Jeff Johnson295189b2012-06-20 16:38:30 -07002161
2162/* ---------------------------------------------------------------------------
2163
2164 \fn sme_RoamUpdateAPWPSIE
2165
2166 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2167 This is an asynchronous API.
2168
2169 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2170
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002171 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002172
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002173 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002174
2175 -------------------------------------------------------------------------------*/
2176
2177eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2178/* ---------------------------------------------------------------------------
2179
2180 \fn sme_RoamUpdateAPWPARSNIEs
2181
2182 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2183 This is an asynchronous API.
2184
2185 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2186
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002187 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002188
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002189 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002190
2191 -------------------------------------------------------------------------------*/
2192eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2193
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002194/* ---------------------------------------------------------------------------
2195
2196 sme_ChangeMCCBeaconInterval
2197
2198 \brief To update P2P-GO's beacon Interval.
2199
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002200 \return eHalStatus SUCCESS
2201 FAILURE or RESOURCES
2202 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002203 -------------------------------------------------------------------------------*/
2204eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2205
2206
Jeff Johnson295189b2012-06-20 16:38:30 -07002207
2208/* ---------------------------------------------------------------------------
2209 \fn sme_sendBTAmpEvent
2210 \brief API to send the btAMPstate to FW
2211 \param hHal - The handle returned by macOpen.
2212 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002213 \return eHalStatus SUCCESS
2214 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002215
2216--------------------------------------------------------------------------- */
2217
2218eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2219
2220
2221
2222/* ---------------------------------------------------------------------------
2223 \fn sme_SetHostOffload
2224 \brief API to set the host offload feature.
2225 \param hHal - The handle returned by macOpen.
2226 \param pRequest - Pointer to the offload request.
2227 \return eHalStatus
2228 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002229eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2230 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002231
2232/* ---------------------------------------------------------------------------
2233 \fn sme_SetKeepAlive
2234 \brief API to set the Keep Alive feature.
2235 \param hHal - The handle returned by macOpen.
2236 \param pRequest - Pointer to the Keep Alive request.
2237 \return eHalStatus
2238 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002239eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2240 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002241
Jeff Johnson295189b2012-06-20 16:38:30 -07002242/* ----------------------------------------------------------------------------
2243 \fn sme_GetOperationChannel
2244 \brief API to get current channel on which STA is parked
2245 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002246 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002247 \returns eHAL_STATUS_SUCCESS
2248 eHAL_STATUS_FAILURE
2249-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002250eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002251
Abhishek Singh7d624e12015-11-30 14:29:27 +05302252eHalStatus sme_register_mgmt_frame_ind_callback(tHalHandle hHal,
2253 sir_mgmt_frame_ind_callback callback);
2254
Jeff Johnson295189b2012-06-20 16:38:30 -07002255/* ---------------------------------------------------------------------------
2256
2257 \fn sme_RegisterMgtFrame
2258
2259 \brief To register managment frame of specified type and subtype.
2260 \param frameType - type of the frame that needs to be passed to HDD.
2261 \param matchData - data which needs to be matched before passing frame
2262 to HDD.
2263 \param matchDataLen - Length of matched data.
2264 \return eHalStatus
2265 -------------------------------------------------------------------------------*/
2266eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2267 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2268
2269/* ---------------------------------------------------------------------------
2270
2271 \fn sme_DeregisterMgtFrame
2272
2273 \brief To De-register managment frame of specified type and subtype.
2274 \param frameType - type of the frame that needs to be passed to HDD.
2275 \param matchData - data which needs to be matched before passing frame
2276 to HDD.
2277 \param matchDataLen - Length of matched data.
2278 \return eHalStatus
2279 -------------------------------------------------------------------------------*/
2280eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2281 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302282/* ---------------------------------------------------------------------------
2283 \fn sme_GetFramesLog
2284 \brief a wrapper function that client calls to register a callback to get
2285 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302286 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302287 \return eHalStatus
2288 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302289eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002290/* ---------------------------------------------------------------------------
2291
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302292 \fn sme_InitMgmtFrameLogging
2293
2294 \brief
2295 SME will pass this request to lower mac to initialize Frame Logging.
2296
2297 \param
2298
2299 hHal - The handle returned by macOpen.
2300
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302301 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302302
2303 \return eHalStatus
2304--------------------------------------------------------------------------- */
2305eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302306 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302307
Gupta, Kapil7c34b322015-09-30 13:12:35 +05302308
2309/* ---------------------------------------------------------------------------
2310
2311 \fn sme_StopRssiMonitoring
2312
2313 \brief
2314 SME will pass this request to lower mac to stop monitoring rssi range on
2315 a bssid.
2316
2317 \param
2318
2319 hHal - The handle returned by macOpen.
2320
2321 tSirRssiMonitorReq req- depict the monitor req params.
2322
2323 \return eHalStatus
2324
2325--------------------------------------------------------------------------- */
2326eHalStatus sme_StopRssiMonitoring(tHalHandle hHal,
2327 tSirRssiMonitorReq *req);
2328
2329/* ---------------------------------------------------------------------------
2330
2331 \fn sme_StartRssiMonitoring
2332
2333 \brief
2334 SME will pass this request to lower mac to start monitoring rssi range on
2335 a bssid.
2336
2337 \param
2338
2339 hHal - The handle returned by macOpen.
2340
2341 tSirRssiMonitorReq req- depict the monitor req params.
2342
2343 \return eHalStatus
2344
2345--------------------------------------------------------------------------- */
2346eHalStatus sme_StartRssiMonitoring(tHalHandle hHal,
2347 tSirRssiMonitorReq *req);
2348
2349
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302350/* ---------------------------------------------------------------------------
2351
Jeff Johnson295189b2012-06-20 16:38:30 -07002352 \fn sme_ConfigureRxpFilter
2353
2354 \brief
2355 SME will pass this request to lower mac to set/reset the filter on RXP for
2356 multicast & broadcast traffic.
2357
2358 \param
2359
2360 hHal - The handle returned by macOpen.
2361
2362 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2363 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2364 on this param. In future we can use this as a mask to set various types of
2365 filters as suggested below:
2366 FILTER_ALL_MULTICAST:
2367 FILTER_ALL_BROADCAST:
2368 FILTER_ALL_MULTICAST_BROADCAST:
2369
2370
2371 \return eHalStatus
2372
2373
2374--------------------------------------------------------------------------- */
2375eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2376 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2377
2378/* ---------------------------------------------------------------------------
2379
2380 \fn sme_ConfigureAppsCpuWakeupState
2381
2382 \brief
2383 SME will pass this request to lower mac to dynamically adjusts the listen
2384 interval based on the WLAN/MSM activity. This feature is named as
2385 Telescopic Beacon wakeup feature.
2386
2387 \param
2388
2389 hHal - The handle returned by macOpen.
2390
2391 isAppsAwake- Depicts the state of the Apps CPU
2392
2393
2394 \return eHalStatus
2395
2396
2397--------------------------------------------------------------------------- */
2398eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2399
Jeff Johnson295189b2012-06-20 16:38:30 -07002400/* ---------------------------------------------------------------------------
2401
2402 \fn sme_ConfigureSuspendInd
2403
2404 \brief
2405 SME will pass this request to lower mac to Indicate that the wlan needs to
2406 be suspended
2407
2408 \param
2409
2410 hHal - The handle returned by macOpen.
2411
2412 wlanSuspendParam- Depicts the wlan suspend params
2413
2414
2415 \return eHalStatus
2416
2417
2418--------------------------------------------------------------------------- */
2419eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2420 tpSirWlanSuspendParam wlanSuspendParam);
2421
2422/* ---------------------------------------------------------------------------
2423
2424 \fn sme_ConfigureResumeReq
2425
2426 \brief
2427 SME will pass this request to lower mac to Indicate that the wlan needs to
2428 be Resumed
2429
2430 \param
2431
2432 hHal - The handle returned by macOpen.
2433
2434 wlanResumeParam- Depicts the wlan resume params
2435
2436
2437 \return eHalStatus
2438
2439
2440--------------------------------------------------------------------------- */
2441eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2442 tpSirWlanResumeParam wlanResumeParam);
2443
Jeff Johnson295189b2012-06-20 16:38:30 -07002444
2445/* ---------------------------------------------------------------------------
2446
2447 \fn sme_GetInfraSessionId
2448
2449 \brief To get the session ID for infra session, if connected
2450 This is a synchronous API.
2451
2452 \param hHal - The handle returned by macOpen.
2453
2454 \return sessionid, -1 if infra session is not connected
2455
2456 -------------------------------------------------------------------------------*/
2457tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2458
2459/* ---------------------------------------------------------------------------
2460
2461 \fn sme_GetInfraOperationChannel
2462
2463 \brief To get the operating channel for infra session, if connected
2464 This is a synchronous API.
2465
2466 \param hHal - The handle returned by macOpen.
2467 \param sessionId - the sessionId returned by sme_OpenSession.
2468
2469 \return operating channel, 0 if infra session is not connected
2470
2471 -------------------------------------------------------------------------------*/
2472tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2473/* ---------------------------------------------------------------------------
2474
2475 \fn sme_GetConcurrentOperationChannel
2476
2477 \brief To get the operating channel for other concurrent sessions, if connected
2478 This is a synchronous API.
2479
2480 \param hHal - The handle returned by macOpen.
2481 \param currentPersona - persona that is trying to come up.
2482
2483 \return operating channel, 0 if infra session is not connected
2484
2485 -------------------------------------------------------------------------------*/
2486tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2487
2488/* ---------------------------------------------------------------------------
2489 \fn sme_AbortMacScan
2490 \brief API to cancel MAC scan.
2491 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302492 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302493 \return tSirAbortScanStatus return status abort scan
2494
Jeff Johnson295189b2012-06-20 16:38:30 -07002495 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302496tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2497 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002498
2499/* ---------------------------------------------------------------------------
2500 \fn sme_GetCfgValidChannels
2501 \brief API to get valid channel list
2502 \param hHal - The handle returned by macOpen.
2503 \param aValidChannels - Pointer to the valid channel list
2504 \param len - valid channel list length
2505 \return eHalStatus
2506 ---------------------------------------------------------------------------*/
2507eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2508
2509#ifdef FEATURE_WLAN_SCAN_PNO
2510
2511/* ---------------------------------------------------------------------------
2512 \fn sme_SetPreferredNetworkList
2513 \brief API to set the Preferred Network List Offload feature.
2514 \param hHal - The handle returned by macOpen.
2515 \param pRequest - Pointer to the offload request.
2516 \return eHalStatus
2517 ---------------------------------------------------------------------------*/
2518eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2519
2520/* ---------------------------------------------------------------------------
2521 \fn sme_SetRSSIFilter
2522 \brief API to set RSSI Filter feature.
2523 \param hHal - The handle returned by macOpen.
2524 \param pRequest - Pointer to the offload request.
2525 \return eHalStatus
2526 ---------------------------------------------------------------------------*/
2527eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2528
2529/******************************************************************************
2530*
2531* Name: sme_PreferredNetworkFoundInd
2532*
2533* Description:
2534* Invoke Preferred Network Found Indication
2535*
2536* Parameters:
2537* hHal - HAL handle for device
2538* pMsg - found network description
2539*
2540* Returns: eHalStatus
2541*
2542******************************************************************************/
2543eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2544#endif // FEATURE_WLAN_SCAN_PNO
2545
2546/* ---------------------------------------------------------------------------
2547 \fn sme_SetPowerParams
2548 \brief API to set Power Parameters
2549 \param hHal - The handle returned by macOpen.
2550 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002551 \param forced - if true, not to be dropped silently in host, it must reach
2552 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2553 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002554 \return eHalStatus
2555 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002556eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002557
2558/* ---------------------------------------------------------------------------
2559 \fn sme_SetTxPerTracking
2560 \brief Set Tx PER tracking configuration parameters
2561 \param hHal - The handle returned by macOpen.
2562 \param pTxPerTrackingParam - Tx PER configuration parameters
2563 \return eHalStatus
2564 ---------------------------------------------------------------------------*/
2565eHalStatus sme_SetTxPerTracking (
2566 tHalHandle hHal,
2567 void (*pCallbackfn) (void *pCallbackContext),
2568 void *pCallbackContext,
2569 tpSirTxPerTrackingParam pTxPerTrackingParam);
2570
2571#ifdef WLAN_FEATURE_PACKET_FILTERING
2572/* ---------------------------------------------------------------------------
2573 \fn sme_ReceiveFilterSetFilter
2574 \brief API to set 8023 Multicast Address List
2575 \param hHal - The handle returned by macOpen.
2576 \param pMulticastAddrs - Pointer to the Multicast Address List
2577 \return eHalStatus
2578 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002579eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002580
2581/* ---------------------------------------------------------------------------
2582 \fn sme_ReceiveFilterSetFilter
2583 \brief API to set Receive Packet Filter
2584 \param hHal - The handle returned by macOpen.
2585 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2586 \return eHalStatus
2587 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002588eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2589 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002590
2591/* ---------------------------------------------------------------------------
2592 \fn sme_GetFilterMatchCount
2593 \brief API to get D0 PC Filter Match Count
2594 \param hHal - The handle returned by macOpen
2595 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2596 \param callbackContext - Cookie to be passed back during callback
2597 \return eHalStatus
2598 ---------------------------------------------------------------------------*/
2599eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2600 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002601 void *callbackContext,
2602 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002603
2604/* ---------------------------------------------------------------------------
2605 \fn sme_ReceiveFilterClearFilter
2606 \brief API to clear Receive Packet Filter
2607 \param hHal - The handle returned by macOpen.
2608 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2609 \return eHalStatus
2610 ---------------------------------------------------------------------------*/
2611eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002612 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2613 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002614#endif // WLAN_FEATURE_PACKET_FILTERING
2615/* ---------------------------------------------------------------------------
2616
2617 \fn sme_IsChannelValid
2618 \brief To check if the channel is valid for currently established domain
2619 This is a synchronous API.
2620
2621 \param hHal - The handle returned by macOpen.
2622 \param channel - channel to verify
2623
2624 \return TRUE/FALSE, TRUE if channel is valid
2625
2626 -------------------------------------------------------------------------------*/
2627tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2628
2629/* ---------------------------------------------------------------------------
2630 \fn sme_SetFreqBand
2631 \brief Used to set frequency band.
2632 \param hHal
2633 \eBand band value to be configured
2634 \- return eHalStatus
2635 -------------------------------------------------------------------------*/
2636eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2637
2638/* ---------------------------------------------------------------------------
2639 \fn sme_GetFreqBand
2640 \brief Used to get the current band settings.
2641 \param hHal
2642 \pBand pointer to hold the current band value
2643 \- return eHalStatus
2644 -------------------------------------------------------------------------*/
2645eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2646
2647/* ---------------------------------------------------------------------------
2648
2649 \fn sme_SetTxPerTracking
2650 \brief Set Tx PER tracking configuration parameters
2651 \param hHal - The handle returned by macOpen.
2652 \param pTxPerTrackingParam - Tx PER configuration parameters
2653 \return eHalStatus
2654 ---------------------------------------------------------------------------*/
2655eHalStatus sme_SetTxPerTracking (
2656 tHalHandle hHal,
2657 void (*pCallbackfn) (void *pCallbackContext),
2658 void *pCallbackContext,
2659 tpSirTxPerTrackingParam pTxPerTrackingParam);
2660
2661#ifdef WLAN_FEATURE_GTK_OFFLOAD
2662/* ---------------------------------------------------------------------------
2663 \fn sme_SetGTKOffload
2664 \brief API to set GTK offload feature.
2665 \param hHal - The handle returned by macOpen.
2666 \param pRequest - Pointer to the GTK offload request.
2667 \return eHalStatus
2668 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002669eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002670
2671/* ---------------------------------------------------------------------------
2672 \fn sme_GetGTKOffload
2673 \brief API to get GTK offload information.
2674 \param hHal - The handle returned by macOpen.
2675 \param pRequest - Pointer to the GTK offload response.
2676 \return eHalStatus
2677 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002678eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2679 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002680#endif // WLAN_FEATURE_GTK_OFFLOAD
2681
2682#ifdef WLAN_WAKEUP_EVENTS
2683eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2684#endif // WLAN_WAKEUP_EVENTS
2685
2686/* ---------------------------------------------------------------------------
2687 \fn sme_SetTxPerTracking
2688 \brief Set Tx PER tracking configuration parameters
2689 \param hHal - The handle returned by macOpen.
2690 \param pTxPerTrackingParam - Tx PER configuration parameters
2691 \return eHalStatus
2692 ---------------------------------------------------------------------------*/
2693eHalStatus sme_SetTxPerTracking (
2694 tHalHandle hHal,
2695 void (*pCallbackfn) (void *pCallbackContext),
2696 void *pCallbackContext,
2697 tpSirTxPerTrackingParam pTxPerTrackingParam);
2698
2699
2700//return frequency for a particular channel
2701tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2702
2703tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2704
2705#if defined WLAN_FEATURE_P2P_INTERNAL
2706
2707eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2708
2709/* ---------------------------------------------------------------------------
2710 \fn sme_p2pFlushDeviceList
2711 \brief Remove cached P2P result from scan results
2712 \param hHal - The handle returned by macOpen.
2713 \param HDDSessionId - HDD's sessionId. Currently unused.
2714 \return eHalStatus
2715 ---------------------------------------------------------------------------*/
2716eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2717
2718eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2719 tCsrScanResultFilter *pFilter);
2720
2721#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2722
2723/* ---------------------------------------------------------------------------
2724 \fn sme_SetMaxTxPower
2725 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2726 setting will not persist over reboots
2727 \param hHal
2728 \param pBssid BSSID to set the power cap for
2729 \param pBssid pSelfMacAddress self MAC Address
2730 \param pBssid power to set in dB
2731 \- return eHalStatus
2732 -------------------------------------------------------------------------*/
2733eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2734 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2735
Jeff Johnson295189b2012-06-20 16:38:30 -07002736/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002737 \fn sme_SetMaxTxPowerPerBand
2738 \brief Used to set the Maximum Transmit Power for
2739 specific band dynamically. Note: this setting will not persist over reboots
2740 \param band
2741 \param power to set in dB
2742 \- return eHalStatus
2743 -------------------------------------------------------------------------*/
2744eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2745
2746/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002747
schang86c22c42013-03-13 18:41:24 -07002748 \fn sme_SetTxPower
2749
2750 \brief Set Transmit Power dynamically. Note: this setting will
2751 not persist over reboots.
2752
2753 \param hHal
2754 \param sessionId Target Session ID
2755 \param mW power to set in mW
2756 \- return eHalStatus
2757
2758 -------------------------------------------------------------------------------*/
2759eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2760
2761/* ---------------------------------------------------------------------------
2762
Jeff Johnson295189b2012-06-20 16:38:30 -07002763 \fn sme_HideSSID
2764
2765 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2766 not persist over reboots.
2767
2768 \param hHal
2769 \param sessionId
2770 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2771 \- return eHalStatus
2772
2773 -------------------------------------------------------------------------------*/
2774eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002775
2776/* ---------------------------------------------------------------------------
2777
2778 \fn sme_SetTmLevel
2779 \brief Set Thermal Mitigation Level to RIVA
2780 \param hHal - The handle returned by macOpen.
2781 \param newTMLevel - new Thermal Mitigation Level
2782 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002783 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002784 ---------------------------------------------------------------------------*/
2785eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2786
2787/*---------------------------------------------------------------------------
2788
2789 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2790 Host and FW.
2791
2792 \param hHal - HAL handle for device
2793
2794 \return NONE
2795
2796---------------------------------------------------------------------------*/
2797void sme_featureCapsExchange(tHalHandle hHal);
2798
Jeff Johnsond13512a2012-07-17 11:42:19 -07002799/*---------------------------------------------------------------------------
2800
Yathish9f22e662012-12-10 14:21:35 -08002801 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2802 between in Host.
2803
2804 \param hHal - HAL handle for device
2805
2806 \return NONE
2807
2808---------------------------------------------------------------------------*/
2809void sme_disableFeatureCapablity(tANI_U8 feature_index);
2810
2811/*---------------------------------------------------------------------------
2812
Jeff Johnsond13512a2012-07-17 11:42:19 -07002813 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2814 country code
2815 Host and FW.
2816
2817 \param hHal - HAL handle for device
2818 \param pCountry - pointer to country code
2819
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002820 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002821
2822 ---------------------------------------------------------------------------*/
2823eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2824
2825/*---------------------------------------------------------------------------
2826
2827 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2828 country code.
2829
2830 \param hHal - HAL handle for device
2831 \param pCountry - pointer to country code
2832
2833 \return Success or failure
2834
2835 ---------------------------------------------------------------------------*/
2836eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2837
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002838/* ---------------------------------------------------------------------------
2839 \fn sme_transportDebug
2840 \brief Dynamically monitoring Transport channels
2841 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002842 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002843 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002844 \param toggleStallDetect Enable stall detect feature
2845 This feature will take effect to data performance
2846 Not integrate till fully verification
2847 \- return NONE
2848 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002849void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002850
Kiran4a17ebe2013-01-31 10:43:43 -08002851/* ---------------------------------------------------------------------------
2852 \fn sme_ResetPowerValuesFor5G
2853 \brief Reset the power values for 5G band with NV power values.
2854 \param hHal - HAL handle for device
2855 \- return NONE
2856 -------------------------------------------------------------------------*/
2857void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2858
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002859#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002860/* ---------------------------------------------------------------------------
2861 \fn sme_UpdateRoamPrefer5GHz
2862 \brief enable/disable Roam prefer 5G runtime option
2863 This function is called through dynamic setConfig callback function
2864 to configure the Roam prefer 5G runtime option
2865 \param hHal - HAL handle for device
2866 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2867 \- return Success or failure
2868 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002869eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002870
2871/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002872 \fn sme_setRoamIntraBand
2873 \brief enable/disable Intra band roaming
2874 This function is called through dynamic setConfig callback function
2875 to configure the intra band roaming
2876 \param hHal - HAL handle for device
2877 \param nRoamIntraBand Enable/Disable Intra band roaming
2878 \- return Success or failure
2879 -------------------------------------------------------------------------*/
2880eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2881
2882/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002883 \fn sme_UpdateRoamScanNProbes
2884 \brief function to update roam scan N probes
2885 This function is called through dynamic setConfig callback function
2886 to update roam scan N probes
2887 \param hHal - HAL handle for device
2888 \param nProbes number of probe requests to be sent out
2889 \- return Success or failure
2890 -------------------------------------------------------------------------*/
2891eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2892
2893/* ---------------------------------------------------------------------------
2894 \fn sme_UpdateRoamScanHomeAwayTime
2895 \brief function to update roam scan Home away time
2896 This function is called through dynamic setConfig callback function
2897 to update roam scan home away time
2898 \param hHal - HAL handle for device
2899 \param nRoamScanAwayTime Scan home away time
2900 \- return Success or failure
2901 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002902eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2903 const v_U16_t nRoamScanHomeAwayTime,
2904 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002905
2906/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002907 \fn sme_getRoamIntraBand
2908 \brief get Intra band roaming
2909 \param hHal - HAL handle for device
2910 \- return Success or failure
2911 -------------------------------------------------------------------------*/
2912v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2913
2914/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002915 \fn sme_getRoamScanNProbes
2916 \brief get N Probes
2917 \param hHal - HAL handle for device
2918 \- return Success or failure
2919 -------------------------------------------------------------------------*/
2920v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2921
2922/* ---------------------------------------------------------------------------
2923 \fn sme_getRoamScanHomeAwayTime
2924 \brief get Roam scan home away time
2925 \param hHal - HAL handle for device
2926 \- return Success or failure
2927 -------------------------------------------------------------------------*/
2928v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2929
2930/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002931 \fn sme_UpdateImmediateRoamRssiDiff
2932 \brief Update nImmediateRoamRssiDiff
2933 This function is called through dynamic setConfig callback function
2934 to configure nImmediateRoamRssiDiff
2935 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2936 \param hHal - HAL handle for device
2937 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2938 candidate and current AP.
2939 \- return Success or failure
2940 -------------------------------------------------------------------------*/
2941
2942eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002943
Srinivas Girigowdade697412013-02-14 16:31:48 -08002944/* ---------------------------------------------------------------------------
2945 \fn sme_UpdateRoamRssiDiff
2946 \brief Update RoamRssiDiff
2947 This function is called through dynamic setConfig callback function
2948 to configure RoamRssiDiff
2949 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2950 \param hHal - HAL handle for device
2951 \param RoamRssiDiff - minimum rssi difference between potential
2952 candidate and current AP.
2953 \- return Success or failure
2954 -------------------------------------------------------------------------*/
2955
2956eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2957
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002958/*--------------------------------------------------------------------------
2959 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2960 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2961 isFastTransitionEnabled.
2962 This is a synchronuous call
2963 \param hHal - The handle returned by macOpen.
2964 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2965 Other status means SME is failed to update isFastTransitionEnabled.
2966 \sa
2967 --------------------------------------------------------------------------*/
2968
2969eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2970 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002971
2972/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002973 \fn sme_UpdateWESMode
2974 \brief Update WESMode
2975 This function is called through dynamic setConfig callback function
2976 to configure isWESModeEnabled
2977 \param hHal - HAL handle for device
2978 \param isWESModeEnabled - Enable/Disable WES Mode
2979 \- return Success or failure
2980 -------------------------------------------------------------------------*/
2981eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2982
2983/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002984 \fn sme_SetRoamScanControl
2985 \brief Set roam scan control
2986 This function is called to set roam scan control
2987 if roam scan control is set to 0, roaming scan cache is cleared
2988 any value other than 0 is treated as invalid value
2989 \param hHal - HAL handle for device
2990 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2991 Other status means SME failure to update
2992 -------------------------------------------------------------------------*/
2993eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002994#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002995
2996#ifdef FEATURE_WLAN_LFR
2997/*--------------------------------------------------------------------------
2998 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002999 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003000 isFastRoamIniFeatureEnabled.
3001 This is a synchronuous call
3002 \param hHal - The handle returned by macOpen.
3003 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
3004 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
3005 \sa
3006 --------------------------------------------------------------------------*/
3007
Srinivas Girigowdade697412013-02-14 16:31:48 -08003008eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003009 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003010
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003011/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05303012 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
3013 When Supplicant issue enabled / disable fwr based roaming on the basis
3014 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
3015
3016 This is a synchronous call
3017 \param hHal - The handle returned by macOpen.
3018 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
3019 Other status means SME is failed to (enabled/disabled) offload scan.
3020 \sa
3021 --------------------------------------------------------------------------*/
3022
3023eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
3024 const v_BOOL_t isFastRoamEnabled);
3025
3026/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003027 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
3028 Enable/disable LFR MAWC support at runtime
3029 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3030 isMAWCIniFeatureEnabled.
3031 This is a synchronous call
3032 \param hHal - The handle returned by macOpen.
3033 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
3034 Other status means SME is failed to update MAWCEnabled.
3035 \sa
3036 --------------------------------------------------------------------------*/
3037eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
3038 const v_BOOL_t MAWCEnabled);
3039
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003040
3041#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3042/*--------------------------------------------------------------------------
3043 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
3044 This is a synchronuous call
3045 \param hHal - The handle returned by macOpen.
3046 \return eHAL_STATUS_SUCCESS
3047 Other status means SME is failed
3048 \sa
3049 --------------------------------------------------------------------------*/
3050
3051eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
3052 v_BOOL_t bFastRoamInConIniFeatureEnabled);
3053#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003054#endif /* FEATURE_WLAN_LFR */
3055
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003056#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003057/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003058 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003059 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003060 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003061 This is a synchronuous call
3062 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003063 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
3064 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003065 \sa
3066 --------------------------------------------------------------------------*/
3067
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003068eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
3069 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003070
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003071#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003072
3073/*--------------------------------------------------------------------------
3074 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
3075 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3076 fEnableFwRssiMonitoring.
3077 This is a synchronuous call
3078 \param hHal - The handle returned by macOpen.
3079 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
3080 Other status means SME is failed to update
3081 \sa
3082 --------------------------------------------------------------------------*/
3083
3084eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
3085 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08003086
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003087#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08003088/*--------------------------------------------------------------------------
3089 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
3090 This is a synchronuous call
3091 \param hHal - The handle returned by macOpen.
3092 \return eHAL_STATUS_SUCCESS - SME update config successful.
3093 Other status means SME is failed to update
3094 \sa
3095 --------------------------------------------------------------------------*/
3096eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
3097 v_U8_t neighborLookupRssiThreshold);
3098
3099/*--------------------------------------------------------------------------
3100 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
3101 This is a synchronuous call
3102 \param hHal - The handle returned by macOpen.
3103 \return eHAL_STATUS_SUCCESS - SME update config successful.
3104 Other status means SME is failed to update
3105 \sa
3106 --------------------------------------------------------------------------*/
3107eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
3108 v_U8_t neighborReassocRssiThreshold);
3109
3110/*--------------------------------------------------------------------------
3111 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
3112 This is a synchronuous call
3113 \param hHal - The handle returned by macOpen.
3114 \return eHAL_STATUS_SUCCESS - SME update config successful.
3115 Other status means SME is failed to update
3116 \sa
3117 --------------------------------------------------------------------------*/
3118v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
3119
3120/*--------------------------------------------------------------------------
3121 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
3122 This is a synchronuous call
3123 \param hHal - The handle returned by macOpen.
3124 \return eHAL_STATUS_SUCCESS - SME update config successful.
3125 Other status means SME is failed to update
3126 \sa
3127 --------------------------------------------------------------------------*/
3128eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
3129 v_U16_t neighborScanResultsRefreshPeriod);
3130
3131/*--------------------------------------------------------------------------
3132 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
3133 This is a synchronuous call
3134 \param hHal - The handle returned by macOpen.
3135 \return eHAL_STATUS_SUCCESS - SME update config successful.
3136 Other status means SME is failed to update
3137 \sa
3138 --------------------------------------------------------------------------*/
3139v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
3140
3141/*--------------------------------------------------------------------------
3142 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3143 This is a synchronuous call
3144 \param hHal - The handle returned by macOpen.
3145 \return eHAL_STATUS_SUCCESS - SME update config successful.
3146 Other status means SME is failed to update
3147 \sa
3148 --------------------------------------------------------------------------*/
3149v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3150
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003151/* ---------------------------------------------------------------------------
3152 \fn sme_UpdateEmptyScanRefreshPeriod
3153 \brief Update nEmptyScanRefreshPeriod
3154 This function is called through dynamic setConfig callback function
3155 to configure nEmptyScanRefreshPeriod
3156 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3157 \param hHal - HAL handle for device
3158 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3159 \- return Success or failure
3160 -------------------------------------------------------------------------*/
3161eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3162
3163/* ---------------------------------------------------------------------------
3164 \fn sme_setNeighborScanMinChanTime
3165 \brief Update nNeighborScanMinChanTime
3166 This function is called through dynamic setConfig callback function
3167 to configure gNeighborScanChannelMinTime
3168 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3169 \param hHal - HAL handle for device
3170 \param nNeighborScanMinChanTime - Channel minimum dwell time
3171 \- return Success or failure
3172 -------------------------------------------------------------------------*/
3173eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3174
3175/* ---------------------------------------------------------------------------
3176 \fn sme_setNeighborScanMaxChanTime
3177 \brief Update nNeighborScanMaxChanTime
3178 This function is called through dynamic setConfig callback function
3179 to configure gNeighborScanChannelMaxTime
3180 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3181 \param hHal - HAL handle for device
3182 \param nNeighborScanMinChanTime - Channel maximum dwell time
3183 \- return Success or failure
3184 -------------------------------------------------------------------------*/
3185eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3186
3187/* ---------------------------------------------------------------------------
3188 \fn sme_getNeighborScanMinChanTime
3189 \brief get neighbor scan min channel time
3190 \param hHal - The handle returned by macOpen.
3191 \return v_U16_t - channel min time value
3192 -------------------------------------------------------------------------*/
3193v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3194
3195/* ---------------------------------------------------------------------------
3196 \fn sme_getNeighborScanMaxChanTime
3197 \brief get neighbor scan max channel time
3198 \param hHal - The handle returned by macOpen.
3199 \return v_U16_t - channel max time value
3200 -------------------------------------------------------------------------*/
3201v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3202
3203/* ---------------------------------------------------------------------------
3204 \fn sme_setNeighborScanPeriod
3205 \brief Update nNeighborScanPeriod
3206 This function is called through dynamic setConfig callback function
3207 to configure nNeighborScanPeriod
3208 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3209 \param hHal - HAL handle for device
3210 \param nNeighborScanPeriod - neighbor scan period
3211 \- return Success or failure
3212 -------------------------------------------------------------------------*/
3213eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3214
3215/* ---------------------------------------------------------------------------
3216 \fn sme_getNeighborScanPeriod
3217 \brief get neighbor scan period
3218 \param hHal - The handle returned by macOpen.
3219 \return v_U16_t - neighbor scan period
3220 -------------------------------------------------------------------------*/
3221v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3222
3223#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003224
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003225#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003226/*--------------------------------------------------------------------------
3227 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3228 This is a synchronuous call
3229 \param hHal - The handle returned by macOpen.
3230 \return eHAL_STATUS_SUCCESS - SME update config successful.
3231 Other status means SME is failed to update
3232 \sa
3233 --------------------------------------------------------------------------*/
3234v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3235
3236/*--------------------------------------------------------------------------
3237 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3238 This is a synchronuous call
3239 \param hHal - The handle returned by macOpen.
3240 \return eHAL_STATUS_SUCCESS - SME update config successful.
3241 Other status means SME is failed to update
3242 \sa
3243 --------------------------------------------------------------------------*/
3244eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3245 tANI_U8 numChannels);
3246
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003247#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003248/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003249 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003250 This is a synchronuous call
3251 \param hHal - The handle returned by macOpen.
3252 \return eHAL_STATUS_SUCCESS - SME update config successful.
3253 Other status means SME is failed to update
3254 \sa
3255 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003256eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003257 tANI_U8 *pChannelList,
3258 tANI_U8 numChannels);
3259#endif
3260
Srinivas Girigowdade697412013-02-14 16:31:48 -08003261/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003262 \brief sme_getRoamScanChannelList() - get roam scan channel list
3263 This is a synchronuous call
3264 \param hHal - The handle returned by macOpen.
3265 \return eHAL_STATUS_SUCCESS - SME update config successful.
3266 Other status means SME is failed to update
3267 \sa
3268 --------------------------------------------------------------------------*/
3269eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3270 tANI_U8 *pNumChannels);
3271
3272/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003273 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003274 This is a synchronuous call
3275 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003276 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003277 FALSE (0) - if feature is disabled (compile or runtime)
3278 \sa
3279 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003280tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003281
3282/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003283 \brief sme_getWESMode() - getWES Mode
3284 This is a synchronous call
3285 \param hHal - The handle returned by macOpen.
3286 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3287 \sa
3288 --------------------------------------------------------------------------*/
3289v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3290
3291/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003292 \brief sme_GetRoamScanControl() - get scan control
3293 This is a synchronous call
3294 \param hHal - The handle returned by macOpen.
3295 \return v_BOOL_t - Enabled(1)/Disabled(0)
3296 \sa
3297 --------------------------------------------------------------------------*/
3298v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3299
3300/* ---------------------------------------------------------------------------
3301 \fn sme_UpdateEmptyScanRefreshPeriod
3302 \brief Update nnEmptyScanRefreshPeriod
3303 This function is called through dynamic setConfig callback function
3304 to configure nnEmptyScanRefreshPeriod
3305 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3306 \param hHal - HAL handle for device
3307 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3308 \- return Success or failure
3309 -------------------------------------------------------------------------*/
3310
3311/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003312 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3313 This is a synchronuous call
3314 \param hHal - The handle returned by macOpen.
3315 \return TRUE (1) - if the feature is enabled
3316 FALSE (0) - if feature is disabled (compile or runtime)
3317 \sa
3318 --------------------------------------------------------------------------*/
3319tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3320
3321/*--------------------------------------------------------------------------
3322 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3323 This is a synchronuous call
3324 \param hHal - The handle returned by macOpen.
3325 \return TRUE (1) - if the feature is enabled
3326 FALSE (0) - if feature is disabled (compile or runtime)
3327 \sa
3328 --------------------------------------------------------------------------*/
3329tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3330
Srinivas Girigowdade697412013-02-14 16:31:48 -08003331#endif
3332
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003333#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3334/*--------------------------------------------------------------------------
3335 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3336 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3337 gRoamScanOffloadEnabled.
3338 This is a synchronous call
3339 \param hHal - The handle returned by macOpen.
3340 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3341 Other status means SME is failed to update.
3342 \sa
3343 --------------------------------------------------------------------------*/
3344
3345eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3346#endif
3347
c_manjeecfd1efb2015-09-25 19:32:34 +05303348eHalStatus sme_FwMemDumpReq(tHalHandle hHal, tAniFwrDumpReq *recv_req);
3349
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003350
Srinivas Girigowdade697412013-02-14 16:31:48 -08003351/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003352 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303353 \brief Check if a feature is enabled by FW
3354
3355 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003356 A value from enum placeHolderInCapBitmap
3357
3358 \- return 1/0 (TRUE/FALSE)
3359 -------------------------------------------------------------------------*/
3360tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303361
3362/* ---------------------------------------------------------------------------
3363 \fn sme_IsFeatureSupportedByDriver
3364 \brief Check if a feature is enabled by driver
3365
3366 \param featEnumValue - Enumeration value of the feature to be checked.
3367 A value from enum placeHolderInCapBitmap
3368
3369 \- return 1/0 (TRUE/FALSE)
3370 -------------------------------------------------------------------------*/
3371tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3372
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003373#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303374
3375/* ---------------------------------------------------------------------------
3376 \fn sme_SendTdlsLinkEstablishParams
3377 \brief API to send TDLS Link Establishment Parameters.
3378
3379 \param peerMac - peer's Mac Adress.
3380 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3381 \- return VOS_STATUS_SUCCES
3382 -------------------------------------------------------------------------*/
3383
3384VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303385 tANI_U8 sessionId,
3386#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3387 const tSirMacAddr peerMac,
3388#else
3389 tSirMacAddr peerMac,
3390#endif
3391 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303392
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003393/* ---------------------------------------------------------------------------
3394 \fn sme_SendTdlsMgmtFrame
3395 \brief API to send TDLS management frames.
3396
3397 \param peerMac - peer's Mac Adress.
3398 \param frame_type - Type of TDLS mgmt frame to be sent.
3399 \param dialog - dialog token used in the frame.
3400 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303401 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003402 \param buf - additional IEs to be included
3403 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003404 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003405 \- return VOS_STATUS_SUCCES
3406 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303407VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3408#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3409 const tSirMacAddr peerMac,
3410#else
3411 tSirMacAddr peerMac,
3412#endif
3413 tANI_U8 frame_type, tANI_U8 dialog,
3414 tANI_U16 status, tANI_U32 peerCapability,
3415 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003416/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003417 \fn sme_ChangeTdlsPeerSta
3418 \brief API to Update TDLS peer sta parameters.
3419
3420 \param peerMac - peer's Mac Adress.
3421 \param staParams - Peer Station Parameters.
3422 \- return VOS_STATUS_SUCCES
3423 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303424VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3425#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3426 const tSirMacAddr peerMac,
3427#else
3428 tSirMacAddr peerMac,
3429#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003430 tCsrStaParams *pstaParams);
3431/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003432 \fn sme_AddTdlsPeerSta
3433 \brief API to Add TDLS peer sta entry.
3434
3435 \param peerMac - peer's Mac Adress.
3436 \- return VOS_STATUS_SUCCES
3437 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303438VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3439#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3440 const tSirMacAddr peerMac
3441#else
3442 tSirMacAddr peerMac
3443#endif
3444 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003445/* ---------------------------------------------------------------------------
3446 \fn sme_DeleteTdlsPeerSta
3447 \brief API to Delete TDLS peer sta entry.
3448
3449 \param peerMac - peer's Mac Adress.
3450 \- return VOS_STATUS_SUCCES
3451 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303452VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3453#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3454 const tSirMacAddr peerMac
3455#else
3456 tSirMacAddr peerMac
3457#endif
3458 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003459/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003460 \fn sme_SetTdlsPowerSaveProhibited
3461 \API to set/reset the isTdlsPowerSaveProhibited.
3462
3463 \- return void
3464 -------------------------------------------------------------------------*/
3465void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003466#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303467/* ---------------------------------------------------------------------------
3468 \fn sme_IsPmcBmps
3469 \brief API to Check if PMC state is BMPS.
3470
3471 \- return v_BOOL_t
3472 -------------------------------------------------------------------------*/
3473v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3474
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003475eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003476
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303477/* ---------------------------------------------------------------------------
3478 \fn sme_UpdateDFSRoamMode
3479 \brief Update DFS roam scan mode
3480 This function is called to configure allowDFSChannelRoam
3481 dynamically
3482 \param hHal - HAL handle for device
3483 \param allowDFSChannelRoam - DFS roaming scan mode
3484 mode 0 disable roam scan on DFS channels
3485 mode 1 enables roam scan (passive/active) on DFS channels
3486 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3487 successfully.
3488 Other status means SME failed to update DFS roaming scan config.
3489 \sa
3490 -------------------------------------------------------------------------*/
3491eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3492
3493/* ---------------------------------------------------------------------------
3494 \fn sme_UpdateDFSScanMode
3495 \brief Update DFS scan mode
3496 This function is called to configure fEnableDFSChnlScan.
3497 \param hHal - HAL handle for device
3498 \param dfsScanMode - DFS scan mode
3499 mode 0 disable scan on DFS channels
3500 mode 1 enables passive scan on DFS channels
3501 mode 2 enables active scan on DFS channels for static list
3502 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3503 successfully.
3504 Other status means SME failed to update DFS scan config.
3505 \sa
3506 -------------------------------------------------------------------------*/
3507eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3508
3509/*--------------------------------------------------------------------------
3510 \brief sme_GetDFSScanMode() - get DFS scan mode
3511 \param hHal - The handle returned by macOpen.
3512 \return DFS scan mode
3513 mode 0 disable scan on DFS channels
3514 mode 1 enables passive scan on DFS channels
3515 mode 2 enables active scan on DFS channels for static list
3516 \sa
3517 --------------------------------------------------------------------------*/
3518v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3519
3520/* ---------------------------------------------------------------------------
3521 \fn sme_HandleDFSChanScan
3522 \brief Gets Valid channel list and updates scan control list according to
3523 dfsScanMode
3524 \param hHal - HAL handle for device
3525 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3526 Otherwise eHAL_STATUS_SUCCESS -
3527 \sa
3528 -------------------------------------------------------------------------*/
3529eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3530
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003531/*
3532 * SME API to enable/disable WLAN driver initiated SSR
3533 */
3534void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3535
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303536/* ---------------------------------------------------------------------------
3537
3538 \fn sme_SetPhyMode
3539
3540 \brief Changes the PhyMode.
3541
3542 \param hHal - The handle returned by macOpen.
3543
3544 \param phyMode new phyMode which is to set
3545
3546 \return eHalStatus SUCCESS.
3547
3548 -------------------------------------------------------------------------------*/
3549eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3550
3551/* ---------------------------------------------------------------------------
3552
3553 \fn sme_GetPhyMode
3554
3555 \brief gets current PhyMode.
3556
3557 \param hHal - The handle returned by macOpen.
3558
3559 \return eHalStatus PhyMode
3560
3561 -------------------------------------------------------------------------------*/
3562eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3563
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003564/*
3565 * SME API to determine the channel bonding mode
3566 */
3567VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3568
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003569#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3570/*--------------------------------------------------------------------------
3571 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3572 from CSR.
3573 This is a synchronous call
3574 \param hHal - The handle returned by macOpen
3575 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3576 BSSID, channel etc.)
3577 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3578 Other status means SME is failed to send the request.
3579 \sa
3580 --------------------------------------------------------------------------*/
3581
3582eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3583#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003584/*--------------------------------------------------------------------------
3585 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3586 is any connected session .
3587 This is a synchronous call
3588 \param hHal - The handle returned by macOpen
3589 \return VOS_STATUS - SME passed the request to CSR successfully.
3590 Other status means SME is failed to send the request.
3591 \sa
3592 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003593VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003594
Agarwal Ashish57e84372014-12-05 18:26:53 +05303595/*--------------------------------------------------------------------------
3596 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3597 is any connected session .
3598 This is a synchronous call
3599 \param hHal - The handle returned by macOpen
3600 \return VOS_STATUS - SME passed the request to CSR successfully.
3601 Other status means SME is failed to send the request.
3602 \sa
3603 --------------------------------------------------------------------------*/
3604VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3605
Leo Chang9056f462013-08-01 19:21:11 -07003606#ifdef FEATURE_WLAN_LPHB
3607/* ---------------------------------------------------------------------------
3608 \fn sme_LPHBConfigReq
3609 \API to make configuration LPHB within FW.
3610 \param hHal - The handle returned by macOpen
3611 \param lphdReq - LPHB request argument by client
3612 \param pCallbackfn - LPHB timeout notification callback function pointer
3613 \- return Configuration message posting status, SUCCESS or Fail
3614 -------------------------------------------------------------------------*/
3615eHalStatus sme_LPHBConfigReq(
3616 tHalHandle hHal,
3617 tSirLPHBReq *lphdReq,
3618 void (*pCallbackfn)(void *pAdapter, void *indParam));
3619#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003620
3621/* ---------------------------------------------------------------------------
3622 \fn sme_AddPeriodicTxPtrn
3623 \brief API to Periodic TX Pattern Offload feature
3624 \param hHal - The handle returned by macOpen
3625 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3626 \return eHalStatus
3627 ---------------------------------------------------------------------------*/
3628eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3629 *addPeriodicTxPtrnParams);
3630
3631/* ---------------------------------------------------------------------------
3632 \fn sme_DelPeriodicTxPtrn
3633 \brief API to Periodic TX Pattern Offload feature
3634 \param hHal - The handle returned by macOpen
3635 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3636 \return eHalStatus
3637 ---------------------------------------------------------------------------*/
3638eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3639 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003640/*--------------------------------------------------------------------------
3641 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3642 scan parameter.
3643 This is a synchronous call
3644 \param hHal - The handle returned by macOpen
3645 \return None.
3646 \sa
3647 --------------------------------------------------------------------------*/
3648void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3649 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303650
Abhishek Singh00b71972016-01-07 10:51:04 +05303651#ifdef WLAN_FEATURE_RMC
3652/* ---------------------------------------------------------------------------
3653 \fn sme_EnableRMC
3654 \brief Used to enable RMC
3655 setting will not persist over reboots
3656 \param hHal
3657 \param sessionId
3658 \- return eHalStatus
3659 -------------------------------------------------------------------------*/
3660eHalStatus sme_EnableRMC(tHalHandle hHal, tANI_U32 sessionId);
3661
3662/* ---------------------------------------------------------------------------
3663 \fn sme_DisableRMC
3664 \brief Used to disable RMC
3665 setting will not persist over reboots
3666 \param hHal
3667 \param sessionId
3668 \- return eHalStatus
3669 -------------------------------------------------------------------------*/
3670eHalStatus sme_DisableRMC(tHalHandle hHal, tANI_U32 sessionId);
3671#endif /* WLAN_FEATURE_RMC */
3672
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003673/* ---------------------------------------------------------------------------
3674 \fn sme_SendRateUpdateInd
3675 \brief API to Update rate
3676 \param hHal - The handle returned by macOpen
3677 \param rateUpdateParams - Pointer to rate update params
3678 \return eHalStatus
3679 ---------------------------------------------------------------------------*/
3680eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3681
Abhishek Singh00b71972016-01-07 10:51:04 +05303682#ifdef WLAN_FEATURE_RMC
3683/* ---------------------------------------------------------------------------
3684 \fn sme_GetIBSSPeerInfo
3685 \brief Used to disable RMC
3686 setting will not persist over reboots
3687 \param hHal
3688 \param ibssPeerInfoReq multicast Group IP address
3689 \- return eHalStatus
3690 -------------------------------------------------------------------------*/
3691eHalStatus sme_RequestIBSSPeerInfo(tHalHandle hHal, void *pUserData,
3692 pIbssPeerInfoCb peerInfoCbk,
3693 tANI_BOOLEAN allPeerInfoReqd,
3694 tANI_U8 staIdx);
3695#endif /* WLAN_FEATURE_RMC */
3696
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303697/*
3698 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3699 * triggers
3700 * return status
3701*/
3702eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3703 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303704 tSmeFastRoamTrigger fastRoamTrig,
3705 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303706
3707eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303708#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3709 const tANI_U8 *pBSSId,
3710#else
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303711 tANI_U8 *pBSSId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303712#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303713 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003714
3715void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303716
3717#ifdef FEATURE_WLAN_BATCH_SCAN
3718/* ---------------------------------------------------------------------------
3719 \fn sme_SetBatchScanReq
3720 \brief API to set batch scan request in FW
3721 \param hHal - The handle returned by macOpen.
3722 \param pRequest - Pointer to the batch request.
3723 \param sessionId - session ID
3724 \param callbackRoutine - HDD callback which needs to be invoked after
3725 getting set batch scan response from FW
3726 \param callbackContext - pAdapter context
3727 \return eHalStatus
3728 ---------------------------------------------------------------------------*/
3729eHalStatus
3730sme_SetBatchScanReq
3731(
3732 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3733 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3734 void *callbackContext
3735);
3736
3737/* ---------------------------------------------------------------------------
3738 \fn sme_TriggerBatchScanResultInd
3739 \brief API to trigger batch scan result indications from from FW
3740 \param hHal - The handle returned by macOpen.
3741 \param pRequest - Pointer to get batch request.
3742 \param sessionId - session ID
3743 \param callbackRoutine - HDD callback which needs to be invoked after
3744 getting get batch scan response from FW
3745 \param callbackContext - pAdapter context
3746 \return eHalStatus
3747 ---------------------------------------------------------------------------*/
3748eHalStatus
3749sme_TriggerBatchScanResultInd
3750(
3751 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3752 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3753 void *callbackContext
3754);
3755
3756/* ---------------------------------------------------------------------------
3757 \fn sme_StopBatchScanInd
3758 \brief API to stop batch scan request in FW
3759 \param hHal - The handle returned by macOpen.
3760 \param pRequest - Pointer to stop batch indication
3761 \return eHalStatus
3762 ---------------------------------------------------------------------------*/
3763eHalStatus
3764sme_StopBatchScanInd
3765(
3766 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3767);
3768
3769#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003770
3771#ifdef FEATURE_WLAN_CH_AVOID
3772/* ---------------------------------------------------------------------------
3773 \fn sme_AddChAvoidCallback
3774 \brief Used to plug in callback function
3775 Which notify channel may not be used with SAP or P2PGO mode.
3776 Notification come from FW.
3777 \param hHal
3778 \param pCallbackfn : callback function pointer should be plugged in
3779 \- return eHalStatus
3780 -------------------------------------------------------------------------*/
3781eHalStatus sme_AddChAvoidCallback
3782(
3783 tHalHandle hHal,
3784 void (*pCallbackfn)(void *pAdapter, void *indParam)
3785);
3786#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003787eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303788
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303789/* ---------------------------------------------------------------------------
3790 \fn sme_requestTypetoString
3791 \brief API to convert requestType enum values
3792 to string.
3793 ---------------------------------------------------------------------------*/
3794const char * sme_requestTypetoString(const v_U8_t requestType);
3795/* ---------------------------------------------------------------------------
3796 \fn sme_PmcStatetoString
3797 \brief API to convert PmcState enum values
3798 to string.
3799 ---------------------------------------------------------------------------*/
3800const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303801
3802eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3803
Agarwal Ashish5e414792014-06-08 15:25:23 +05303804tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303805
3806// tdlsoffchan
3807VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3808 tANI_U8 sessionId,
3809 tSirMacAddr peerMac,
3810 tANI_S32 tdlsOffCh,
3811 tANI_S32 tdlsOffChBwOffset,
3812 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303813eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3814 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303815void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303816
3817void sme_resetCoexEevent(tHalHandle hHal);
3818
Peng Xu117eab42014-09-25 13:33:27 +05303819tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3820tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303821#ifdef WLAN_FEATURE_AP_HT40_24G
3822void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3823 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303824eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3825 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303826#endif
Peng Xu117eab42014-09-25 13:33:27 +05303827
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303828eHalStatus sme_set_rssi_threshold_breached_cb(tHalHandle hal,
3829 void (*cb)(void *, struct rssi_breach_event *));
3830
Agarwal Ashish738843c2014-09-25 12:27:56 +05303831void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3832
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303833/* HDD Callback function */
3834typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3835
3836eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3837 u8 *pCmd,
3838 int length,
3839 pEncryptMsgRSPCb encCB);
3840
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303841/* ---------------------------------------------------------------------------
3842 \fn sme_RegisterBtCoexTDLSCallback
3843 \brief Used to plug in callback function
3844 Which notify btcoex on or off.
3845 Notification come from FW.
3846 \param hHal
3847 \param pCallbackfn : callback function pointer should be plugged in
3848 \- return eHalStatus
3849 -------------------------------------------------------------------------*/
3850eHalStatus sme_RegisterBtCoexTDLSCallback
3851(
3852 tHalHandle hHal,
3853 void (*pCallbackfn)(void *pAdapter, int)
3854);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303855
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303856/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303857 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303858
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303859 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303860
3861 \param hHal - The handle returned by macOpen.
3862
3863 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3864 eANI_BOOLEAN_FALSE otherwise
3865---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303866tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303867
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303868/* ---------------------------------------------------------------------------
3869
3870 \fn sme_IsTdlsOffChannelValid
3871 \brief To check if the channel is valid for currently established domain
3872 This is a synchronous API.
3873
3874 \param hHal - The handle returned by macOpen.
3875 \param channel - channel to verify
3876
3877 \return TRUE/FALSE, TRUE if channel is valid
3878
3879 -------------------------------------------------------------------------------*/
3880tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3881
Mukul Sharma4be88422015-03-09 20:29:07 +05303882/* --------------------------------------------------------------------------
3883
3884 \fn sme_IsCoexScoIndicationSet
3885 \brief To check if the BTC module in fwr has sent the SCO
3886 indication to host or not
3887
3888 \param hHal - The handle returned by macOpen.
3889 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3890
3891 --------------------------------------------------------------------------*/
3892tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3893
Abhishek Singh01c73d12015-03-12 15:13:44 +05303894eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3895 tANI_U32 iniNumBuffAdvert,
3896 tANI_U32 set_value);
3897
Mukul Sharma45063942015-04-01 20:07:59 +05303898void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303899
3900/* ---------------------------------------------------------------------------
3901 \fn sme_SetTdls2040BSSCoexistence
3902 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3903
3904 \param isEnabled - Enable or Disable.
3905 \- return VOS_STATUS_SUCCES
3906 -------------------------------------------------------------------------*/
3907eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3908
Abhishek Singh41988ba2015-05-25 19:42:29 +05303909/* ---------------------------------------------------------------------------
3910 \fn sme_SetRtsCtsHtVht
3911 \brief API to to enable/disable RTS/CTS for different modes.
3912
3913 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3914 \- return VOS_STATUS_SUCCES if INdication is posted to
3915 WDA else return eHAL_STATUS_FAILURE
3916 -------------------------------------------------------------------------*/
3917eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3918
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303919tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
3920 tANI_U8 fcc_constraint);
3921
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303922eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303923eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
Abhishek Singh837adf22015-10-01 17:37:37 +05303924 tANI_U32 indicator, tANI_U32 reason_code,
3925 tANI_BOOLEAN dump_vos_trace);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303926
Mahesh A Saptasagarbeca12c2015-09-07 16:21:06 +05303927eHalStatus sme_enableDisableChanAvoidIndEvent(tHalHandle hHal,
3928 tANI_U8 set_value);
3929
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303930/* ---------------------------------------------------------------------------
3931 \fn sme_set_wificonfig_params
3932 \brief API to set WifiConfiguration Parameters.
3933
3934 \param wifi_config_param - Wificonfig parameter 1.Averaging factor 2. Guard time
3935 \- return VOS_STATUS_SUCCES if INdication is posted to
3936 WDA else return eHAL_STATUS_FAILURE
3937 -------------------------------------------------------------------------*/
3938
3939eHalStatus sme_set_wificonfig_params(tHalHandle hHal, tSetWifiConfigParams *req);
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +05303940eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
3941 tANI_U32 *regInfo1, tANI_U32 *regInfo2);
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05303942eHalStatus sme_GetCurrentAntennaIndex(tHalHandle hHal,
3943 tCsrAntennaIndexCallback callback,
3944 void *pContext, tANI_U8 sessionId);
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303945
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05303946eHalStatus sme_setBcnMissPenaltyCount(tHalHandle hHal,
3947 tModifyRoamParamsReqParams *params);
Agrawal Ashish0552be02016-03-02 18:03:43 +05303948void sme_set_mgmt_frm_via_wq5(tHalHandle hHal,
3949 tANI_BOOLEAN sendMgmtPktViaWQ5);
Jeff Johnson295189b2012-06-20 16:38:30 -07003950#endif //#if !defined( __SME_API_H )