blob: 48e19fdd68acb3031d330524065e9321141e6e65 [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
Kapil Gupta04ab1992016-06-26 13:36:51 +05301909#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1910VOS_STATUS sme_set_per_roam_rxconfig (tHalHandle hHal, v_U8_t sessionId,
1911 v_U16_t minRate, v_U16_t maxRate, v_U8_t minPercentage,
1912 v_U16_t minPktRequired, v_U64_t waitPeriodForNextPERScan);
1913
1914VOS_STATUS sme_unset_per_roam_rxconfig (tHalHandle hHal);
1915
1916void sme_PERRoamScanStartStop(void *hHal, tANI_U8 start);
1917#endif
1918
Amar Singhal0d15bd52013-10-12 23:13:13 -07001919/* ---------------------------------------------------------------------------
1920
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301921 \fn sme_DHCPStartInd
1922
1923 \brief Indicate FW about DHCP start event.
1924
1925 \param hHal - The handle returned by macOpen.
1926
1927 \param device_mode the mode of the device
1928
c_hpothu0b0cab72014-02-13 21:52:40 +05301929 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301930
1931 \return eHalStatus SUCCESS.
1932
1933 FAILURE or RESOURCES The API finished and failed.
1934
1935 -------------------------------------------------------------------------------*/
1936
1937eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1938 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301939 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301940
1941/* ---------------------------------------------------------------------------
1942
1943 \fn sme_DHCPStopInd
1944
1945 \brief Indicate FW about DHCP stop event.
1946
1947 \param hHal - The handle returned by macOpen.
1948
1949 \param device_mode the mode of the device
1950
c_hpothu0b0cab72014-02-13 21:52:40 +05301951 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301952
1953 \return eHalStatus SUCCESS.
1954
1955 FAILURE or RESOURCES The API finished and failed.
1956
1957 -------------------------------------------------------------------------------*/
1958eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1959 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301960 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301961
Jeff Johnson295189b2012-06-20 16:38:30 -07001962
1963/* ---------------------------------------------------------------------------
1964 \fn sme_BtcSignalBtEvent
1965 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1966 BT event type and the current operating mode of Libra (full power,
1967 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1968 would be employed.
1969 \param hHal - The handle returned by macOpen.
1970 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1971 Caller owns the memory and is responsible for freeing it.
1972 \return VOS_STATUS
1973 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1974 if driver has not yet been initialized or if BTC
1975 Events Layer has been disabled.
1976 VOS_STATUS_SUCCESS BT Event passed to HAL
1977 ---------------------------------------------------------------------------*/
1978VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1979
1980/* ---------------------------------------------------------------------------
1981 \fn sme_BtcSetConfig
1982 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1983 This function should be invoked only after CFG download has completed.
1984 Calling it after sme_HDDReadyInd is recommended.
1985 \param hHal - The handle returned by macOpen.
1986 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1987 tSmeBtcConfig. Caller owns the memory and is responsible
1988 for freeing it.
1989 \return VOS_STATUS
1990 VOS_STATUS_E_FAILURE Config not passed to HAL.
1991 VOS_STATUS_SUCCESS Config passed to HAL
1992 ---------------------------------------------------------------------------*/
1993VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1994
1995/* ---------------------------------------------------------------------------
1996 \fn sme_BtcGetConfig
1997 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1998 \param hHal - The handle returned by macOpen.
1999 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
2000 Caller owns the memory and is responsible for freeing it.
2001 \return VOS_STATUS
2002 VOS_STATUS_E_FAILURE - failure
2003 VOS_STATUS_SUCCESS success
2004 ---------------------------------------------------------------------------*/
2005VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
2006
2007/* ---------------------------------------------------------------------------
2008 \fn sme_SetCfgPrivacy
2009 \brief API to set configure privacy parameters
2010 \param hHal - The handle returned by macOpen.
2011 \param pProfile - Pointer CSR Roam profile.
2012 \param fPrivacy - This parameter indicates status of privacy
2013
2014 \return void
2015 ---------------------------------------------------------------------------*/
2016void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
2017
2018#if defined WLAN_FEATURE_VOWIFI
2019/* ---------------------------------------------------------------------------
2020 \fn sme_NeighborReportRequest
2021 \brief API to request neighbor report.
2022 \param hHal - The handle returned by macOpen.
2023 \param pRrmNeighborReq - Pointer to a caller allocated object of type
2024 tRrmNeighborReq. Caller owns the memory and is responsible
2025 for freeing it.
2026 \return VOS_STATUS
2027 VOS_STATUS_E_FAILURE - failure
2028 VOS_STATUS_SUCCESS success
2029 ---------------------------------------------------------------------------*/
2030VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
2031 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
2032#endif
2033
2034//The following are debug APIs to support direct read/write register/memory
2035//They are placed in SME because HW cannot be access when in LOW_POWER state
2036//AND not connected. The knowledge and synchronization is done in SME
2037
2038//sme_DbgReadRegister
2039//Caller needs to validate the input values
2040VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
2041
2042//sme_DbgWriteRegister
2043//Caller needs to validate the input values
2044VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
2045
2046//sme_DbgReadMemory
2047//Caller needs to validate the input values
2048//pBuf caller allocated buffer has the length of nLen
2049VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2050
2051//sme_DbgWriteMemory
2052//Caller needs to validate the input values
2053VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2054
Jeff Johnson295189b2012-06-20 16:38:30 -07002055VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
2056 tSirVersionType *pVersion);
2057VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
2058 tSirVersionType *pVersion);
2059VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
2060 tANI_U8 *pVersion,
2061 tANI_U32 versionBufferSize);
2062VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
2063 tANI_U8 *pVersion,
2064 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07002065eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
2066 csrRoamCompleteCallback callback,
2067 void *pContext);
2068
2069#ifdef FEATURE_WLAN_WAPI
2070/* ---------------------------------------------------------------------------
2071 \fn sme_RoamSetBKIDCache
2072 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
2073 candidate list.
2074 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2075 it is opened (by calling halOpen).
2076 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
2077 \param numItems - a variable that has the number of tBkidCacheInfo allocated
2078 when retruning, this is the number of items put into pBKIDCache
2079 \return eHalStatus - when fail, it usually means the buffer allocated is not
2080 big enough and pNumItems has the number of tBkidCacheInfo.
2081 ---------------------------------------------------------------------------*/
2082eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
2083 tANI_U32 numItems );
2084
2085/* ---------------------------------------------------------------------------
2086 \fn sme_RoamGetBKIDCache
2087 \brief The SME API exposed to HDD to allow HDD to request SME to return its
2088 BKID cache.
2089 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2090 it is opened (by calling halOpen).
2091 \param pNum - caller allocated memory that has the space of the number of
2092 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
2093 in SME cache.
2094 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
2095 upon return
2096 \return eHalStatus - when fail, it usually means the buffer allocated is not
2097 big enough.
2098 ---------------------------------------------------------------------------*/
2099eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
2100 tBkidCacheInfo *pBkidCache);
2101
2102/* ---------------------------------------------------------------------------
2103 \fn sme_RoamGetNumBKIDCache
2104 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2105 number of BKID cache entries.
2106 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2107 it is opened (by calling halOpen).
2108 \return tANI_U32 - the number of BKID cache entries.
2109 ---------------------------------------------------------------------------*/
2110tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2111
2112/* ---------------------------------------------------------------------------
2113 \fn sme_ScanGetBKIDCandidateList
2114 \brief a wrapper function to return the BKID candidate list
2115 \param pBkidList - caller allocated buffer point to an array of
2116 tBkidCandidateInfo
2117 \param pNumItems - pointer to a variable that has the number of
2118 tBkidCandidateInfo allocated when retruning, this is
2119 either the number needed or number of items put into
2120 pPmkidList
2121 \return eHalStatus - when fail, it usually means the buffer allocated is not
2122 big enough and pNumItems
2123 has the number of tBkidCandidateInfo.
2124 \Note: pNumItems is a number of tBkidCandidateInfo,
2125 not sizeof(tBkidCandidateInfo) * something
2126 ---------------------------------------------------------------------------*/
2127eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2128 tBkidCandidateInfo *pBkidList,
2129 tANI_U32 *pNumItems );
2130#endif /* FEATURE_WLAN_WAPI */
2131
Jeff Johnsone7245742012-09-05 17:12:55 -07002132#ifdef FEATURE_OEM_DATA_SUPPORT
2133/********************************************************************************************
2134 Oem data related modifications
2135*********************************************************************************************/
2136/* ---------------------------------------------------------------------------
2137 \fn sme_OemDataReq
2138 \param sessionId - session id of session to be used for oem data req.
2139 \param pOemDataReqID - pointer to an object to get back the request ID
2140 \param callback - a callback function that is called upon finish
2141 \param pContext - a pointer passed in for the callback
2142 \return eHalStatus
2143 ---------------------------------------------------------------------------*/
2144eHalStatus sme_OemDataReq(tHalHandle hHal,
2145 tANI_U8 sessionId,
2146 tOemDataReqConfig *,
2147 tANI_U32 *pOemDataReqID,
2148 oemData_OemDataReqCompleteCallback callback,
2149 void *pContext);
2150
2151/* ---------------------------------------------------------------------------
2152 \fn sme_getOemDataRsp
2153 \param pOemDataRsp - A pointer to the response object
2154 \param pOemDataReqID - pointer to an object to get back the request ID
2155 \return eHalStatus
2156 ---------------------------------------------------------------------------*/
2157eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2158 tOemDataRsp **pOemDataRsp);
2159
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +05302160/* ---------------------------------------------------------------------------
2161 \fn sme_OemDataReqNew
2162 \brief a wrapper function for OEM DATA REQ NEW
2163 \param pOemDataReqNewConfig - Data to be passed to FW
2164 ---------------------------------------------------------------------------*/
2165void sme_OemDataReqNew(tHalHandle hHal,
2166 tOemDataReqNewConfig *pOemDataReqNewConfig);
2167
Jeff Johnsone7245742012-09-05 17:12:55 -07002168#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002169
2170
Jeff Johnson295189b2012-06-20 16:38:30 -07002171
2172/* ---------------------------------------------------------------------------
2173
2174 \fn sme_RoamUpdateAPWPSIE
2175
2176 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2177 This is an asynchronous API.
2178
2179 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2180
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002181 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002182
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002183 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002184
2185 -------------------------------------------------------------------------------*/
2186
2187eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2188/* ---------------------------------------------------------------------------
2189
2190 \fn sme_RoamUpdateAPWPARSNIEs
2191
2192 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2193 This is an asynchronous API.
2194
2195 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2196
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002197 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002198
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002199 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002200
2201 -------------------------------------------------------------------------------*/
2202eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2203
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002204/* ---------------------------------------------------------------------------
2205
2206 sme_ChangeMCCBeaconInterval
2207
2208 \brief To update P2P-GO's beacon Interval.
2209
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002210 \return eHalStatus SUCCESS
2211 FAILURE or RESOURCES
2212 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002213 -------------------------------------------------------------------------------*/
2214eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2215
2216
Jeff Johnson295189b2012-06-20 16:38:30 -07002217
2218/* ---------------------------------------------------------------------------
2219 \fn sme_sendBTAmpEvent
2220 \brief API to send the btAMPstate to FW
2221 \param hHal - The handle returned by macOpen.
2222 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002223 \return eHalStatus SUCCESS
2224 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002225
2226--------------------------------------------------------------------------- */
2227
2228eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2229
2230
2231
2232/* ---------------------------------------------------------------------------
2233 \fn sme_SetHostOffload
2234 \brief API to set the host offload feature.
2235 \param hHal - The handle returned by macOpen.
2236 \param pRequest - Pointer to the offload request.
2237 \return eHalStatus
2238 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002239eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2240 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002241
2242/* ---------------------------------------------------------------------------
2243 \fn sme_SetKeepAlive
2244 \brief API to set the Keep Alive feature.
2245 \param hHal - The handle returned by macOpen.
2246 \param pRequest - Pointer to the Keep Alive request.
2247 \return eHalStatus
2248 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002249eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2250 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002251
Jeff Johnson295189b2012-06-20 16:38:30 -07002252/* ----------------------------------------------------------------------------
2253 \fn sme_GetOperationChannel
2254 \brief API to get current channel on which STA is parked
2255 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002256 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002257 \returns eHAL_STATUS_SUCCESS
2258 eHAL_STATUS_FAILURE
2259-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002260eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002261
Abhishek Singh7d624e12015-11-30 14:29:27 +05302262eHalStatus sme_register_mgmt_frame_ind_callback(tHalHandle hHal,
2263 sir_mgmt_frame_ind_callback callback);
2264
Jeff Johnson295189b2012-06-20 16:38:30 -07002265/* ---------------------------------------------------------------------------
2266
2267 \fn sme_RegisterMgtFrame
2268
2269 \brief To register managment frame of specified type and subtype.
2270 \param frameType - type of the frame that needs to be passed to HDD.
2271 \param matchData - data which needs to be matched before passing frame
2272 to HDD.
2273 \param matchDataLen - Length of matched data.
2274 \return eHalStatus
2275 -------------------------------------------------------------------------------*/
2276eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2277 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2278
2279/* ---------------------------------------------------------------------------
2280
2281 \fn sme_DeregisterMgtFrame
2282
2283 \brief To De-register managment frame of specified type and subtype.
2284 \param frameType - type of the frame that needs to be passed to HDD.
2285 \param matchData - data which needs to be matched before passing frame
2286 to HDD.
2287 \param matchDataLen - Length of matched data.
2288 \return eHalStatus
2289 -------------------------------------------------------------------------------*/
2290eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2291 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302292/* ---------------------------------------------------------------------------
2293 \fn sme_GetFramesLog
2294 \brief a wrapper function that client calls to register a callback to get
2295 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302296 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302297 \return eHalStatus
2298 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302299eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002300/* ---------------------------------------------------------------------------
2301
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302302 \fn sme_InitMgmtFrameLogging
2303
2304 \brief
2305 SME will pass this request to lower mac to initialize Frame Logging.
2306
2307 \param
2308
2309 hHal - The handle returned by macOpen.
2310
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302311 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302312
2313 \return eHalStatus
2314--------------------------------------------------------------------------- */
2315eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302316 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302317
Gupta, Kapil7c34b322015-09-30 13:12:35 +05302318
2319/* ---------------------------------------------------------------------------
2320
2321 \fn sme_StopRssiMonitoring
2322
2323 \brief
2324 SME will pass this request to lower mac to stop monitoring rssi range on
2325 a bssid.
2326
2327 \param
2328
2329 hHal - The handle returned by macOpen.
2330
2331 tSirRssiMonitorReq req- depict the monitor req params.
2332
2333 \return eHalStatus
2334
2335--------------------------------------------------------------------------- */
2336eHalStatus sme_StopRssiMonitoring(tHalHandle hHal,
2337 tSirRssiMonitorReq *req);
2338
2339/* ---------------------------------------------------------------------------
2340
2341 \fn sme_StartRssiMonitoring
2342
2343 \brief
2344 SME will pass this request to lower mac to start monitoring rssi range on
2345 a bssid.
2346
2347 \param
2348
2349 hHal - The handle returned by macOpen.
2350
2351 tSirRssiMonitorReq req- depict the monitor req params.
2352
2353 \return eHalStatus
2354
2355--------------------------------------------------------------------------- */
2356eHalStatus sme_StartRssiMonitoring(tHalHandle hHal,
2357 tSirRssiMonitorReq *req);
2358
2359
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302360/* ---------------------------------------------------------------------------
2361
Jeff Johnson295189b2012-06-20 16:38:30 -07002362 \fn sme_ConfigureRxpFilter
2363
2364 \brief
2365 SME will pass this request to lower mac to set/reset the filter on RXP for
2366 multicast & broadcast traffic.
2367
2368 \param
2369
2370 hHal - The handle returned by macOpen.
2371
2372 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2373 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2374 on this param. In future we can use this as a mask to set various types of
2375 filters as suggested below:
2376 FILTER_ALL_MULTICAST:
2377 FILTER_ALL_BROADCAST:
2378 FILTER_ALL_MULTICAST_BROADCAST:
2379
2380
2381 \return eHalStatus
2382
2383
2384--------------------------------------------------------------------------- */
2385eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2386 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2387
2388/* ---------------------------------------------------------------------------
2389
2390 \fn sme_ConfigureAppsCpuWakeupState
2391
2392 \brief
2393 SME will pass this request to lower mac to dynamically adjusts the listen
2394 interval based on the WLAN/MSM activity. This feature is named as
2395 Telescopic Beacon wakeup feature.
2396
2397 \param
2398
2399 hHal - The handle returned by macOpen.
2400
2401 isAppsAwake- Depicts the state of the Apps CPU
2402
2403
2404 \return eHalStatus
2405
2406
2407--------------------------------------------------------------------------- */
2408eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2409
Jeff Johnson295189b2012-06-20 16:38:30 -07002410/* ---------------------------------------------------------------------------
2411
2412 \fn sme_ConfigureSuspendInd
2413
2414 \brief
2415 SME will pass this request to lower mac to Indicate that the wlan needs to
2416 be suspended
2417
2418 \param
2419
2420 hHal - The handle returned by macOpen.
2421
2422 wlanSuspendParam- Depicts the wlan suspend params
2423
2424
2425 \return eHalStatus
2426
2427
2428--------------------------------------------------------------------------- */
2429eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2430 tpSirWlanSuspendParam wlanSuspendParam);
2431
2432/* ---------------------------------------------------------------------------
2433
2434 \fn sme_ConfigureResumeReq
2435
2436 \brief
2437 SME will pass this request to lower mac to Indicate that the wlan needs to
2438 be Resumed
2439
2440 \param
2441
2442 hHal - The handle returned by macOpen.
2443
2444 wlanResumeParam- Depicts the wlan resume params
2445
2446
2447 \return eHalStatus
2448
2449
2450--------------------------------------------------------------------------- */
2451eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2452 tpSirWlanResumeParam wlanResumeParam);
2453
Jeff Johnson295189b2012-06-20 16:38:30 -07002454
2455/* ---------------------------------------------------------------------------
2456
2457 \fn sme_GetInfraSessionId
2458
2459 \brief To get the session ID for infra session, if connected
2460 This is a synchronous API.
2461
2462 \param hHal - The handle returned by macOpen.
2463
2464 \return sessionid, -1 if infra session is not connected
2465
2466 -------------------------------------------------------------------------------*/
2467tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2468
2469/* ---------------------------------------------------------------------------
2470
2471 \fn sme_GetInfraOperationChannel
2472
2473 \brief To get the operating channel for infra session, if connected
2474 This is a synchronous API.
2475
2476 \param hHal - The handle returned by macOpen.
2477 \param sessionId - the sessionId returned by sme_OpenSession.
2478
2479 \return operating channel, 0 if infra session is not connected
2480
2481 -------------------------------------------------------------------------------*/
2482tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2483/* ---------------------------------------------------------------------------
2484
2485 \fn sme_GetConcurrentOperationChannel
2486
2487 \brief To get the operating channel for other concurrent sessions, if connected
2488 This is a synchronous API.
2489
2490 \param hHal - The handle returned by macOpen.
2491 \param currentPersona - persona that is trying to come up.
2492
2493 \return operating channel, 0 if infra session is not connected
2494
2495 -------------------------------------------------------------------------------*/
2496tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2497
2498/* ---------------------------------------------------------------------------
2499 \fn sme_AbortMacScan
2500 \brief API to cancel MAC scan.
2501 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302502 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302503 \return tSirAbortScanStatus return status abort scan
2504
Jeff Johnson295189b2012-06-20 16:38:30 -07002505 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302506tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2507 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002508
2509/* ---------------------------------------------------------------------------
2510 \fn sme_GetCfgValidChannels
2511 \brief API to get valid channel list
2512 \param hHal - The handle returned by macOpen.
2513 \param aValidChannels - Pointer to the valid channel list
2514 \param len - valid channel list length
2515 \return eHalStatus
2516 ---------------------------------------------------------------------------*/
2517eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2518
2519#ifdef FEATURE_WLAN_SCAN_PNO
2520
2521/* ---------------------------------------------------------------------------
2522 \fn sme_SetPreferredNetworkList
2523 \brief API to set the Preferred Network List Offload feature.
2524 \param hHal - The handle returned by macOpen.
2525 \param pRequest - Pointer to the offload request.
2526 \return eHalStatus
2527 ---------------------------------------------------------------------------*/
2528eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2529
2530/* ---------------------------------------------------------------------------
2531 \fn sme_SetRSSIFilter
2532 \brief API to set RSSI Filter feature.
2533 \param hHal - The handle returned by macOpen.
2534 \param pRequest - Pointer to the offload request.
2535 \return eHalStatus
2536 ---------------------------------------------------------------------------*/
2537eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2538
2539/******************************************************************************
2540*
2541* Name: sme_PreferredNetworkFoundInd
2542*
2543* Description:
2544* Invoke Preferred Network Found Indication
2545*
2546* Parameters:
2547* hHal - HAL handle for device
2548* pMsg - found network description
2549*
2550* Returns: eHalStatus
2551*
2552******************************************************************************/
2553eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2554#endif // FEATURE_WLAN_SCAN_PNO
2555
2556/* ---------------------------------------------------------------------------
2557 \fn sme_SetPowerParams
2558 \brief API to set Power Parameters
2559 \param hHal - The handle returned by macOpen.
2560 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002561 \param forced - if true, not to be dropped silently in host, it must reach
2562 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2563 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002564 \return eHalStatus
2565 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002566eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002567
2568/* ---------------------------------------------------------------------------
2569 \fn sme_SetTxPerTracking
2570 \brief Set Tx PER tracking configuration parameters
2571 \param hHal - The handle returned by macOpen.
2572 \param pTxPerTrackingParam - Tx PER configuration parameters
2573 \return eHalStatus
2574 ---------------------------------------------------------------------------*/
2575eHalStatus sme_SetTxPerTracking (
2576 tHalHandle hHal,
2577 void (*pCallbackfn) (void *pCallbackContext),
2578 void *pCallbackContext,
2579 tpSirTxPerTrackingParam pTxPerTrackingParam);
2580
2581#ifdef WLAN_FEATURE_PACKET_FILTERING
2582/* ---------------------------------------------------------------------------
2583 \fn sme_ReceiveFilterSetFilter
2584 \brief API to set 8023 Multicast Address List
2585 \param hHal - The handle returned by macOpen.
2586 \param pMulticastAddrs - Pointer to the Multicast Address List
2587 \return eHalStatus
2588 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002589eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002590
2591/* ---------------------------------------------------------------------------
2592 \fn sme_ReceiveFilterSetFilter
2593 \brief API to set Receive Packet Filter
2594 \param hHal - The handle returned by macOpen.
2595 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2596 \return eHalStatus
2597 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002598eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2599 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002600
2601/* ---------------------------------------------------------------------------
2602 \fn sme_GetFilterMatchCount
2603 \brief API to get D0 PC Filter Match Count
2604 \param hHal - The handle returned by macOpen
2605 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2606 \param callbackContext - Cookie to be passed back during callback
2607 \return eHalStatus
2608 ---------------------------------------------------------------------------*/
2609eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2610 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002611 void *callbackContext,
2612 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002613
2614/* ---------------------------------------------------------------------------
2615 \fn sme_ReceiveFilterClearFilter
2616 \brief API to clear Receive Packet Filter
2617 \param hHal - The handle returned by macOpen.
2618 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2619 \return eHalStatus
2620 ---------------------------------------------------------------------------*/
2621eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002622 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2623 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002624#endif // WLAN_FEATURE_PACKET_FILTERING
2625/* ---------------------------------------------------------------------------
2626
2627 \fn sme_IsChannelValid
2628 \brief To check if the channel is valid for currently established domain
2629 This is a synchronous API.
2630
2631 \param hHal - The handle returned by macOpen.
2632 \param channel - channel to verify
2633
2634 \return TRUE/FALSE, TRUE if channel is valid
2635
2636 -------------------------------------------------------------------------------*/
2637tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2638
2639/* ---------------------------------------------------------------------------
2640 \fn sme_SetFreqBand
2641 \brief Used to set frequency band.
2642 \param hHal
2643 \eBand band value to be configured
2644 \- return eHalStatus
2645 -------------------------------------------------------------------------*/
2646eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2647
2648/* ---------------------------------------------------------------------------
2649 \fn sme_GetFreqBand
2650 \brief Used to get the current band settings.
2651 \param hHal
2652 \pBand pointer to hold the current band value
2653 \- return eHalStatus
2654 -------------------------------------------------------------------------*/
2655eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2656
2657/* ---------------------------------------------------------------------------
2658
2659 \fn sme_SetTxPerTracking
2660 \brief Set Tx PER tracking configuration parameters
2661 \param hHal - The handle returned by macOpen.
2662 \param pTxPerTrackingParam - Tx PER configuration parameters
2663 \return eHalStatus
2664 ---------------------------------------------------------------------------*/
2665eHalStatus sme_SetTxPerTracking (
2666 tHalHandle hHal,
2667 void (*pCallbackfn) (void *pCallbackContext),
2668 void *pCallbackContext,
2669 tpSirTxPerTrackingParam pTxPerTrackingParam);
2670
2671#ifdef WLAN_FEATURE_GTK_OFFLOAD
2672/* ---------------------------------------------------------------------------
2673 \fn sme_SetGTKOffload
2674 \brief API to set GTK offload feature.
2675 \param hHal - The handle returned by macOpen.
2676 \param pRequest - Pointer to the GTK offload request.
2677 \return eHalStatus
2678 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002679eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002680
2681/* ---------------------------------------------------------------------------
2682 \fn sme_GetGTKOffload
2683 \brief API to get GTK offload information.
2684 \param hHal - The handle returned by macOpen.
2685 \param pRequest - Pointer to the GTK offload response.
2686 \return eHalStatus
2687 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002688eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2689 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002690#endif // WLAN_FEATURE_GTK_OFFLOAD
2691
2692#ifdef WLAN_WAKEUP_EVENTS
2693eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2694#endif // WLAN_WAKEUP_EVENTS
2695
2696/* ---------------------------------------------------------------------------
2697 \fn sme_SetTxPerTracking
2698 \brief Set Tx PER tracking configuration parameters
2699 \param hHal - The handle returned by macOpen.
2700 \param pTxPerTrackingParam - Tx PER configuration parameters
2701 \return eHalStatus
2702 ---------------------------------------------------------------------------*/
2703eHalStatus sme_SetTxPerTracking (
2704 tHalHandle hHal,
2705 void (*pCallbackfn) (void *pCallbackContext),
2706 void *pCallbackContext,
2707 tpSirTxPerTrackingParam pTxPerTrackingParam);
2708
2709
2710//return frequency for a particular channel
2711tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2712
2713tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2714
2715#if defined WLAN_FEATURE_P2P_INTERNAL
2716
2717eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2718
2719/* ---------------------------------------------------------------------------
2720 \fn sme_p2pFlushDeviceList
2721 \brief Remove cached P2P result from scan results
2722 \param hHal - The handle returned by macOpen.
2723 \param HDDSessionId - HDD's sessionId. Currently unused.
2724 \return eHalStatus
2725 ---------------------------------------------------------------------------*/
2726eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2727
2728eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2729 tCsrScanResultFilter *pFilter);
2730
2731#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2732
2733/* ---------------------------------------------------------------------------
2734 \fn sme_SetMaxTxPower
2735 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2736 setting will not persist over reboots
2737 \param hHal
2738 \param pBssid BSSID to set the power cap for
2739 \param pBssid pSelfMacAddress self MAC Address
2740 \param pBssid power to set in dB
2741 \- return eHalStatus
2742 -------------------------------------------------------------------------*/
2743eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2744 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2745
Padma, Santhosh Kumar98b5d252016-10-17 17:30:41 +05302746/**
2747 * sme_SetMaxTxPowerPerBand() - Set the Maximum Transmit Power
2748 * specific to band dynamically
2749 * @band: Band for which power needs to be applied
2750 * @dB: power to set in dB
2751 * @hal: HAL handle
2752 *
2753 * Set the maximum transmit power dynamically per band
2754 *
2755 * Return: eHalStatus
2756 */
2757eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t dB,
2758 tHalHandle hal);
Arif Hussaina5ebce02013-08-09 15:09:58 -07002759
2760/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002761
schang86c22c42013-03-13 18:41:24 -07002762 \fn sme_SetTxPower
2763
2764 \brief Set Transmit Power dynamically. Note: this setting will
2765 not persist over reboots.
2766
2767 \param hHal
2768 \param sessionId Target Session ID
2769 \param mW power to set in mW
2770 \- return eHalStatus
2771
2772 -------------------------------------------------------------------------------*/
2773eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2774
2775/* ---------------------------------------------------------------------------
2776
Jeff Johnson295189b2012-06-20 16:38:30 -07002777 \fn sme_HideSSID
2778
2779 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2780 not persist over reboots.
2781
2782 \param hHal
2783 \param sessionId
2784 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2785 \- return eHalStatus
2786
2787 -------------------------------------------------------------------------------*/
2788eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002789
2790/* ---------------------------------------------------------------------------
2791
2792 \fn sme_SetTmLevel
2793 \brief Set Thermal Mitigation Level to RIVA
2794 \param hHal - The handle returned by macOpen.
2795 \param newTMLevel - new Thermal Mitigation Level
2796 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002797 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002798 ---------------------------------------------------------------------------*/
2799eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2800
2801/*---------------------------------------------------------------------------
2802
2803 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2804 Host and FW.
2805
2806 \param hHal - HAL handle for device
2807
2808 \return NONE
2809
2810---------------------------------------------------------------------------*/
2811void sme_featureCapsExchange(tHalHandle hHal);
2812
Jeff Johnsond13512a2012-07-17 11:42:19 -07002813/*---------------------------------------------------------------------------
2814
Yathish9f22e662012-12-10 14:21:35 -08002815 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2816 between in Host.
2817
2818 \param hHal - HAL handle for device
2819
2820 \return NONE
2821
2822---------------------------------------------------------------------------*/
2823void sme_disableFeatureCapablity(tANI_U8 feature_index);
2824
2825/*---------------------------------------------------------------------------
2826
Jeff Johnsond13512a2012-07-17 11:42:19 -07002827 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2828 country code
2829 Host and FW.
2830
2831 \param hHal - HAL handle for device
2832 \param pCountry - pointer to country code
2833
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002834 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002835
2836 ---------------------------------------------------------------------------*/
2837eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2838
2839/*---------------------------------------------------------------------------
2840
2841 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2842 country code.
2843
2844 \param hHal - HAL handle for device
2845 \param pCountry - pointer to country code
2846
2847 \return Success or failure
2848
2849 ---------------------------------------------------------------------------*/
2850eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2851
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002852/* ---------------------------------------------------------------------------
2853 \fn sme_transportDebug
2854 \brief Dynamically monitoring Transport channels
2855 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002856 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002857 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002858 \param toggleStallDetect Enable stall detect feature
2859 This feature will take effect to data performance
2860 Not integrate till fully verification
2861 \- return NONE
2862 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002863void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002864
Kiran4a17ebe2013-01-31 10:43:43 -08002865/* ---------------------------------------------------------------------------
2866 \fn sme_ResetPowerValuesFor5G
2867 \brief Reset the power values for 5G band with NV power values.
2868 \param hHal - HAL handle for device
2869 \- return NONE
2870 -------------------------------------------------------------------------*/
2871void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2872
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002873#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002874/* ---------------------------------------------------------------------------
2875 \fn sme_UpdateRoamPrefer5GHz
2876 \brief enable/disable Roam prefer 5G runtime option
2877 This function is called through dynamic setConfig callback function
2878 to configure the Roam prefer 5G runtime option
2879 \param hHal - HAL handle for device
2880 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2881 \- return Success or failure
2882 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002883eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002884
2885/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002886 \fn sme_setRoamIntraBand
2887 \brief enable/disable Intra band roaming
2888 This function is called through dynamic setConfig callback function
2889 to configure the intra band roaming
2890 \param hHal - HAL handle for device
2891 \param nRoamIntraBand Enable/Disable Intra band roaming
2892 \- return Success or failure
2893 -------------------------------------------------------------------------*/
2894eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2895
2896/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002897 \fn sme_UpdateRoamScanNProbes
2898 \brief function to update roam scan N probes
2899 This function is called through dynamic setConfig callback function
2900 to update roam scan N probes
2901 \param hHal - HAL handle for device
2902 \param nProbes number of probe requests to be sent out
2903 \- return Success or failure
2904 -------------------------------------------------------------------------*/
2905eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2906
2907/* ---------------------------------------------------------------------------
2908 \fn sme_UpdateRoamScanHomeAwayTime
2909 \brief function to update roam scan Home away time
2910 This function is called through dynamic setConfig callback function
2911 to update roam scan home away time
2912 \param hHal - HAL handle for device
2913 \param nRoamScanAwayTime Scan home away time
2914 \- return Success or failure
2915 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002916eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2917 const v_U16_t nRoamScanHomeAwayTime,
2918 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002919
2920/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002921 \fn sme_getRoamIntraBand
2922 \brief get Intra band roaming
2923 \param hHal - HAL handle for device
2924 \- return Success or failure
2925 -------------------------------------------------------------------------*/
2926v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2927
2928/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002929 \fn sme_getRoamScanNProbes
2930 \brief get N Probes
2931 \param hHal - HAL handle for device
2932 \- return Success or failure
2933 -------------------------------------------------------------------------*/
2934v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2935
2936/* ---------------------------------------------------------------------------
2937 \fn sme_getRoamScanHomeAwayTime
2938 \brief get Roam scan home away time
2939 \param hHal - HAL handle for device
2940 \- return Success or failure
2941 -------------------------------------------------------------------------*/
2942v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2943
2944/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002945 \fn sme_UpdateImmediateRoamRssiDiff
2946 \brief Update nImmediateRoamRssiDiff
2947 This function is called through dynamic setConfig callback function
2948 to configure nImmediateRoamRssiDiff
2949 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2950 \param hHal - HAL handle for device
2951 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2952 candidate and current AP.
2953 \- return Success or failure
2954 -------------------------------------------------------------------------*/
2955
2956eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002957
Srinivas Girigowdade697412013-02-14 16:31:48 -08002958/* ---------------------------------------------------------------------------
2959 \fn sme_UpdateRoamRssiDiff
2960 \brief Update RoamRssiDiff
2961 This function is called through dynamic setConfig callback function
2962 to configure RoamRssiDiff
2963 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2964 \param hHal - HAL handle for device
2965 \param RoamRssiDiff - minimum rssi difference between potential
2966 candidate and current AP.
2967 \- return Success or failure
2968 -------------------------------------------------------------------------*/
2969
2970eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2971
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002972/*--------------------------------------------------------------------------
2973 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2974 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2975 isFastTransitionEnabled.
2976 This is a synchronuous call
2977 \param hHal - The handle returned by macOpen.
2978 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2979 Other status means SME is failed to update isFastTransitionEnabled.
2980 \sa
2981 --------------------------------------------------------------------------*/
2982
2983eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2984 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002985
2986/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002987 \fn sme_UpdateWESMode
2988 \brief Update WESMode
2989 This function is called through dynamic setConfig callback function
2990 to configure isWESModeEnabled
2991 \param hHal - HAL handle for device
2992 \param isWESModeEnabled - Enable/Disable WES Mode
2993 \- return Success or failure
2994 -------------------------------------------------------------------------*/
2995eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2996
2997/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002998 \fn sme_SetRoamScanControl
2999 \brief Set roam scan control
3000 This function is called to set roam scan control
3001 if roam scan control is set to 0, roaming scan cache is cleared
3002 any value other than 0 is treated as invalid value
3003 \param hHal - HAL handle for device
3004 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3005 Other status means SME failure to update
3006 -------------------------------------------------------------------------*/
3007eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003008#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003009
3010#ifdef FEATURE_WLAN_LFR
3011/*--------------------------------------------------------------------------
3012 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08003013 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003014 isFastRoamIniFeatureEnabled.
3015 This is a synchronuous call
3016 \param hHal - The handle returned by macOpen.
3017 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
3018 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
3019 \sa
3020 --------------------------------------------------------------------------*/
3021
Srinivas Girigowdade697412013-02-14 16:31:48 -08003022eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003023 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003024
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003025/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05303026 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
3027 When Supplicant issue enabled / disable fwr based roaming on the basis
3028 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
3029
3030 This is a synchronous call
3031 \param hHal - The handle returned by macOpen.
3032 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
3033 Other status means SME is failed to (enabled/disabled) offload scan.
3034 \sa
3035 --------------------------------------------------------------------------*/
3036
3037eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
3038 const v_BOOL_t isFastRoamEnabled);
3039
3040/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003041 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
3042 Enable/disable LFR MAWC support at runtime
3043 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3044 isMAWCIniFeatureEnabled.
3045 This is a synchronous call
3046 \param hHal - The handle returned by macOpen.
3047 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
3048 Other status means SME is failed to update MAWCEnabled.
3049 \sa
3050 --------------------------------------------------------------------------*/
3051eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
3052 const v_BOOL_t MAWCEnabled);
3053
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003054
3055#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3056/*--------------------------------------------------------------------------
3057 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
3058 This is a synchronuous call
3059 \param hHal - The handle returned by macOpen.
3060 \return eHAL_STATUS_SUCCESS
3061 Other status means SME is failed
3062 \sa
3063 --------------------------------------------------------------------------*/
3064
3065eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
3066 v_BOOL_t bFastRoamInConIniFeatureEnabled);
3067#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003068#endif /* FEATURE_WLAN_LFR */
3069
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003070#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003071/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003072 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003073 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003074 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003075 This is a synchronuous call
3076 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003077 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
3078 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003079 \sa
3080 --------------------------------------------------------------------------*/
3081
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003082eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
3083 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003084
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003085#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003086
3087/*--------------------------------------------------------------------------
3088 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
3089 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3090 fEnableFwRssiMonitoring.
3091 This is a synchronuous call
3092 \param hHal - The handle returned by macOpen.
3093 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
3094 Other status means SME is failed to update
3095 \sa
3096 --------------------------------------------------------------------------*/
3097
3098eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
3099 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08003100
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003101#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08003102/*--------------------------------------------------------------------------
3103 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
3104 This is a synchronuous call
3105 \param hHal - The handle returned by macOpen.
3106 \return eHAL_STATUS_SUCCESS - SME update config successful.
3107 Other status means SME is failed to update
3108 \sa
3109 --------------------------------------------------------------------------*/
3110eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
3111 v_U8_t neighborLookupRssiThreshold);
3112
3113/*--------------------------------------------------------------------------
3114 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
3115 This is a synchronuous call
3116 \param hHal - The handle returned by macOpen.
3117 \return eHAL_STATUS_SUCCESS - SME update config successful.
3118 Other status means SME is failed to update
3119 \sa
3120 --------------------------------------------------------------------------*/
3121eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
3122 v_U8_t neighborReassocRssiThreshold);
3123
3124/*--------------------------------------------------------------------------
3125 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
3126 This is a synchronuous call
3127 \param hHal - The handle returned by macOpen.
3128 \return eHAL_STATUS_SUCCESS - SME update config successful.
3129 Other status means SME is failed to update
3130 \sa
3131 --------------------------------------------------------------------------*/
3132v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
3133
3134/*--------------------------------------------------------------------------
3135 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
3136 This is a synchronuous call
3137 \param hHal - The handle returned by macOpen.
3138 \return eHAL_STATUS_SUCCESS - SME update config successful.
3139 Other status means SME is failed to update
3140 \sa
3141 --------------------------------------------------------------------------*/
3142eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
3143 v_U16_t neighborScanResultsRefreshPeriod);
3144
3145/*--------------------------------------------------------------------------
3146 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
3147 This is a synchronuous call
3148 \param hHal - The handle returned by macOpen.
3149 \return eHAL_STATUS_SUCCESS - SME update config successful.
3150 Other status means SME is failed to update
3151 \sa
3152 --------------------------------------------------------------------------*/
3153v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
3154
3155/*--------------------------------------------------------------------------
3156 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3157 This is a synchronuous call
3158 \param hHal - The handle returned by macOpen.
3159 \return eHAL_STATUS_SUCCESS - SME update config successful.
3160 Other status means SME is failed to update
3161 \sa
3162 --------------------------------------------------------------------------*/
3163v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3164
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003165/* ---------------------------------------------------------------------------
3166 \fn sme_UpdateEmptyScanRefreshPeriod
3167 \brief Update nEmptyScanRefreshPeriod
3168 This function is called through dynamic setConfig callback function
3169 to configure nEmptyScanRefreshPeriod
3170 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3171 \param hHal - HAL handle for device
3172 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3173 \- return Success or failure
3174 -------------------------------------------------------------------------*/
3175eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3176
3177/* ---------------------------------------------------------------------------
3178 \fn sme_setNeighborScanMinChanTime
3179 \brief Update nNeighborScanMinChanTime
3180 This function is called through dynamic setConfig callback function
3181 to configure gNeighborScanChannelMinTime
3182 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3183 \param hHal - HAL handle for device
3184 \param nNeighborScanMinChanTime - Channel minimum dwell time
3185 \- return Success or failure
3186 -------------------------------------------------------------------------*/
3187eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3188
3189/* ---------------------------------------------------------------------------
3190 \fn sme_setNeighborScanMaxChanTime
3191 \brief Update nNeighborScanMaxChanTime
3192 This function is called through dynamic setConfig callback function
3193 to configure gNeighborScanChannelMaxTime
3194 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3195 \param hHal - HAL handle for device
3196 \param nNeighborScanMinChanTime - Channel maximum dwell time
3197 \- return Success or failure
3198 -------------------------------------------------------------------------*/
3199eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3200
3201/* ---------------------------------------------------------------------------
3202 \fn sme_getNeighborScanMinChanTime
3203 \brief get neighbor scan min channel time
3204 \param hHal - The handle returned by macOpen.
3205 \return v_U16_t - channel min time value
3206 -------------------------------------------------------------------------*/
3207v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3208
3209/* ---------------------------------------------------------------------------
3210 \fn sme_getNeighborScanMaxChanTime
3211 \brief get neighbor scan max channel time
3212 \param hHal - The handle returned by macOpen.
3213 \return v_U16_t - channel max time value
3214 -------------------------------------------------------------------------*/
3215v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3216
3217/* ---------------------------------------------------------------------------
3218 \fn sme_setNeighborScanPeriod
3219 \brief Update nNeighborScanPeriod
3220 This function is called through dynamic setConfig callback function
3221 to configure nNeighborScanPeriod
3222 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3223 \param hHal - HAL handle for device
3224 \param nNeighborScanPeriod - neighbor scan period
3225 \- return Success or failure
3226 -------------------------------------------------------------------------*/
3227eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3228
3229/* ---------------------------------------------------------------------------
3230 \fn sme_getNeighborScanPeriod
3231 \brief get neighbor scan period
3232 \param hHal - The handle returned by macOpen.
3233 \return v_U16_t - neighbor scan period
3234 -------------------------------------------------------------------------*/
3235v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3236
3237#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003238
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003239#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003240/*--------------------------------------------------------------------------
3241 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3242 This is a synchronuous call
3243 \param hHal - The handle returned by macOpen.
3244 \return eHAL_STATUS_SUCCESS - SME update config successful.
3245 Other status means SME is failed to update
3246 \sa
3247 --------------------------------------------------------------------------*/
3248v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3249
3250/*--------------------------------------------------------------------------
3251 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3252 This is a synchronuous call
3253 \param hHal - The handle returned by macOpen.
3254 \return eHAL_STATUS_SUCCESS - SME update config successful.
3255 Other status means SME is failed to update
3256 \sa
3257 --------------------------------------------------------------------------*/
3258eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3259 tANI_U8 numChannels);
3260
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003261#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003262/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003263 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003264 This is a synchronuous call
3265 \param hHal - The handle returned by macOpen.
3266 \return eHAL_STATUS_SUCCESS - SME update config successful.
3267 Other status means SME is failed to update
3268 \sa
3269 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003270eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003271 tANI_U8 *pChannelList,
3272 tANI_U8 numChannels);
3273#endif
3274
Srinivas Girigowdade697412013-02-14 16:31:48 -08003275/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003276 \brief sme_getRoamScanChannelList() - get roam scan channel list
3277 This is a synchronuous call
3278 \param hHal - The handle returned by macOpen.
3279 \return eHAL_STATUS_SUCCESS - SME update config successful.
3280 Other status means SME is failed to update
3281 \sa
3282 --------------------------------------------------------------------------*/
3283eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3284 tANI_U8 *pNumChannels);
3285
3286/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003287 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003288 This is a synchronuous call
3289 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003290 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003291 FALSE (0) - if feature is disabled (compile or runtime)
3292 \sa
3293 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003294tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003295
3296/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003297 \brief sme_getWESMode() - getWES Mode
3298 This is a synchronous call
3299 \param hHal - The handle returned by macOpen.
3300 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3301 \sa
3302 --------------------------------------------------------------------------*/
3303v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3304
3305/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003306 \brief sme_GetRoamScanControl() - get scan control
3307 This is a synchronous call
3308 \param hHal - The handle returned by macOpen.
3309 \return v_BOOL_t - Enabled(1)/Disabled(0)
3310 \sa
3311 --------------------------------------------------------------------------*/
3312v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3313
3314/* ---------------------------------------------------------------------------
3315 \fn sme_UpdateEmptyScanRefreshPeriod
3316 \brief Update nnEmptyScanRefreshPeriod
3317 This function is called through dynamic setConfig callback function
3318 to configure nnEmptyScanRefreshPeriod
3319 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3320 \param hHal - HAL handle for device
3321 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3322 \- return Success or failure
3323 -------------------------------------------------------------------------*/
3324
3325/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003326 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3327 This is a synchronuous call
3328 \param hHal - The handle returned by macOpen.
3329 \return TRUE (1) - if the feature is enabled
3330 FALSE (0) - if feature is disabled (compile or runtime)
3331 \sa
3332 --------------------------------------------------------------------------*/
3333tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3334
3335/*--------------------------------------------------------------------------
3336 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3337 This is a synchronuous call
3338 \param hHal - The handle returned by macOpen.
3339 \return TRUE (1) - if the feature is enabled
3340 FALSE (0) - if feature is disabled (compile or runtime)
3341 \sa
3342 --------------------------------------------------------------------------*/
3343tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3344
Srinivas Girigowdade697412013-02-14 16:31:48 -08003345#endif
3346
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003347#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3348/*--------------------------------------------------------------------------
3349 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3350 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3351 gRoamScanOffloadEnabled.
3352 This is a synchronous call
3353 \param hHal - The handle returned by macOpen.
3354 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3355 Other status means SME is failed to update.
3356 \sa
3357 --------------------------------------------------------------------------*/
3358
3359eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3360#endif
3361
c_manjeecfd1efb2015-09-25 19:32:34 +05303362eHalStatus sme_FwMemDumpReq(tHalHandle hHal, tAniFwrDumpReq *recv_req);
3363
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003364
Srinivas Girigowdade697412013-02-14 16:31:48 -08003365/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003366 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303367 \brief Check if a feature is enabled by FW
3368
3369 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003370 A value from enum placeHolderInCapBitmap
3371
3372 \- return 1/0 (TRUE/FALSE)
3373 -------------------------------------------------------------------------*/
3374tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303375
3376/* ---------------------------------------------------------------------------
3377 \fn sme_IsFeatureSupportedByDriver
3378 \brief Check if a feature is enabled by driver
3379
3380 \param featEnumValue - Enumeration value of the feature to be checked.
3381 A value from enum placeHolderInCapBitmap
3382
3383 \- return 1/0 (TRUE/FALSE)
3384 -------------------------------------------------------------------------*/
3385tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3386
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003387#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303388
3389/* ---------------------------------------------------------------------------
3390 \fn sme_SendTdlsLinkEstablishParams
3391 \brief API to send TDLS Link Establishment Parameters.
3392
3393 \param peerMac - peer's Mac Adress.
3394 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3395 \- return VOS_STATUS_SUCCES
3396 -------------------------------------------------------------------------*/
3397
3398VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303399 tANI_U8 sessionId,
3400#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3401 const tSirMacAddr peerMac,
3402#else
3403 tSirMacAddr peerMac,
3404#endif
3405 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303406
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003407/* ---------------------------------------------------------------------------
3408 \fn sme_SendTdlsMgmtFrame
3409 \brief API to send TDLS management frames.
3410
3411 \param peerMac - peer's Mac Adress.
3412 \param frame_type - Type of TDLS mgmt frame to be sent.
3413 \param dialog - dialog token used in the frame.
3414 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303415 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003416 \param buf - additional IEs to be included
3417 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003418 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003419 \- return VOS_STATUS_SUCCES
3420 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303421VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3422#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3423 const tSirMacAddr peerMac,
3424#else
3425 tSirMacAddr peerMac,
3426#endif
3427 tANI_U8 frame_type, tANI_U8 dialog,
3428 tANI_U16 status, tANI_U32 peerCapability,
3429 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003430/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003431 \fn sme_ChangeTdlsPeerSta
3432 \brief API to Update TDLS peer sta parameters.
3433
3434 \param peerMac - peer's Mac Adress.
3435 \param staParams - Peer Station Parameters.
3436 \- return VOS_STATUS_SUCCES
3437 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303438VOS_STATUS sme_ChangeTdlsPeerSta(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
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003444 tCsrStaParams *pstaParams);
3445/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003446 \fn sme_AddTdlsPeerSta
3447 \brief API to Add TDLS peer sta entry.
3448
3449 \param peerMac - peer's Mac Adress.
3450 \- return VOS_STATUS_SUCCES
3451 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303452VOS_STATUS sme_AddTdlsPeerSta(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 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003459/* ---------------------------------------------------------------------------
3460 \fn sme_DeleteTdlsPeerSta
3461 \brief API to Delete TDLS peer sta entry.
3462
3463 \param peerMac - peer's Mac Adress.
3464 \- return VOS_STATUS_SUCCES
3465 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303466VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3467#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3468 const tSirMacAddr peerMac
3469#else
3470 tSirMacAddr peerMac
3471#endif
3472 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003473/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003474 \fn sme_SetTdlsPowerSaveProhibited
3475 \API to set/reset the isTdlsPowerSaveProhibited.
3476
3477 \- return void
3478 -------------------------------------------------------------------------*/
3479void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003480#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303481/* ---------------------------------------------------------------------------
3482 \fn sme_IsPmcBmps
3483 \brief API to Check if PMC state is BMPS.
3484
3485 \- return v_BOOL_t
3486 -------------------------------------------------------------------------*/
3487v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3488
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003489eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003490
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303491/* ---------------------------------------------------------------------------
3492 \fn sme_UpdateDFSRoamMode
3493 \brief Update DFS roam scan mode
3494 This function is called to configure allowDFSChannelRoam
3495 dynamically
3496 \param hHal - HAL handle for device
3497 \param allowDFSChannelRoam - DFS roaming scan mode
3498 mode 0 disable roam scan on DFS channels
3499 mode 1 enables roam scan (passive/active) on DFS channels
3500 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3501 successfully.
3502 Other status means SME failed to update DFS roaming scan config.
3503 \sa
3504 -------------------------------------------------------------------------*/
3505eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3506
3507/* ---------------------------------------------------------------------------
3508 \fn sme_UpdateDFSScanMode
3509 \brief Update DFS scan mode
3510 This function is called to configure fEnableDFSChnlScan.
3511 \param hHal - HAL handle for device
3512 \param dfsScanMode - 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 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3517 successfully.
3518 Other status means SME failed to update DFS scan config.
3519 \sa
3520 -------------------------------------------------------------------------*/
3521eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3522
3523/*--------------------------------------------------------------------------
3524 \brief sme_GetDFSScanMode() - get DFS scan mode
3525 \param hHal - The handle returned by macOpen.
3526 \return DFS scan mode
3527 mode 0 disable scan on DFS channels
3528 mode 1 enables passive scan on DFS channels
3529 mode 2 enables active scan on DFS channels for static list
3530 \sa
3531 --------------------------------------------------------------------------*/
3532v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3533
3534/* ---------------------------------------------------------------------------
3535 \fn sme_HandleDFSChanScan
3536 \brief Gets Valid channel list and updates scan control list according to
3537 dfsScanMode
3538 \param hHal - HAL handle for device
3539 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3540 Otherwise eHAL_STATUS_SUCCESS -
3541 \sa
3542 -------------------------------------------------------------------------*/
3543eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3544
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003545/*
3546 * SME API to enable/disable WLAN driver initiated SSR
3547 */
3548void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3549
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303550/* ---------------------------------------------------------------------------
3551
3552 \fn sme_SetPhyMode
3553
3554 \brief Changes the PhyMode.
3555
3556 \param hHal - The handle returned by macOpen.
3557
3558 \param phyMode new phyMode which is to set
3559
3560 \return eHalStatus SUCCESS.
3561
3562 -------------------------------------------------------------------------------*/
3563eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3564
3565/* ---------------------------------------------------------------------------
3566
3567 \fn sme_GetPhyMode
3568
3569 \brief gets current PhyMode.
3570
3571 \param hHal - The handle returned by macOpen.
3572
3573 \return eHalStatus PhyMode
3574
3575 -------------------------------------------------------------------------------*/
3576eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3577
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003578/*
3579 * SME API to determine the channel bonding mode
3580 */
3581VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3582
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003583#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3584/*--------------------------------------------------------------------------
3585 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3586 from CSR.
3587 This is a synchronous call
3588 \param hHal - The handle returned by macOpen
3589 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3590 BSSID, channel etc.)
3591 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3592 Other status means SME is failed to send the request.
3593 \sa
3594 --------------------------------------------------------------------------*/
3595
3596eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3597#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003598/*--------------------------------------------------------------------------
3599 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3600 is any connected session .
3601 This is a synchronous call
3602 \param hHal - The handle returned by macOpen
3603 \return VOS_STATUS - SME passed the request to CSR successfully.
3604 Other status means SME is failed to send the request.
3605 \sa
3606 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003607VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003608
Agarwal Ashish57e84372014-12-05 18:26:53 +05303609/*--------------------------------------------------------------------------
3610 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3611 is any connected session .
3612 This is a synchronous call
3613 \param hHal - The handle returned by macOpen
3614 \return VOS_STATUS - SME passed the request to CSR successfully.
3615 Other status means SME is failed to send the request.
3616 \sa
3617 --------------------------------------------------------------------------*/
3618VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3619
Leo Chang9056f462013-08-01 19:21:11 -07003620#ifdef FEATURE_WLAN_LPHB
3621/* ---------------------------------------------------------------------------
3622 \fn sme_LPHBConfigReq
3623 \API to make configuration LPHB within FW.
3624 \param hHal - The handle returned by macOpen
3625 \param lphdReq - LPHB request argument by client
3626 \param pCallbackfn - LPHB timeout notification callback function pointer
3627 \- return Configuration message posting status, SUCCESS or Fail
3628 -------------------------------------------------------------------------*/
3629eHalStatus sme_LPHBConfigReq(
3630 tHalHandle hHal,
3631 tSirLPHBReq *lphdReq,
3632 void (*pCallbackfn)(void *pAdapter, void *indParam));
3633#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003634
3635/* ---------------------------------------------------------------------------
3636 \fn sme_AddPeriodicTxPtrn
3637 \brief API to Periodic TX Pattern Offload feature
3638 \param hHal - The handle returned by macOpen
3639 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3640 \return eHalStatus
3641 ---------------------------------------------------------------------------*/
3642eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3643 *addPeriodicTxPtrnParams);
3644
3645/* ---------------------------------------------------------------------------
3646 \fn sme_DelPeriodicTxPtrn
3647 \brief API to Periodic TX Pattern Offload feature
3648 \param hHal - The handle returned by macOpen
3649 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3650 \return eHalStatus
3651 ---------------------------------------------------------------------------*/
3652eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3653 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003654/*--------------------------------------------------------------------------
3655 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3656 scan parameter.
3657 This is a synchronous call
3658 \param hHal - The handle returned by macOpen
3659 \return None.
3660 \sa
3661 --------------------------------------------------------------------------*/
3662void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3663 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303664
Abhishek Singh00b71972016-01-07 10:51:04 +05303665#ifdef WLAN_FEATURE_RMC
3666/* ---------------------------------------------------------------------------
3667 \fn sme_EnableRMC
3668 \brief Used to enable RMC
3669 setting will not persist over reboots
3670 \param hHal
3671 \param sessionId
3672 \- return eHalStatus
3673 -------------------------------------------------------------------------*/
3674eHalStatus sme_EnableRMC(tHalHandle hHal, tANI_U32 sessionId);
3675
3676/* ---------------------------------------------------------------------------
3677 \fn sme_DisableRMC
3678 \brief Used to disable RMC
3679 setting will not persist over reboots
3680 \param hHal
3681 \param sessionId
3682 \- return eHalStatus
3683 -------------------------------------------------------------------------*/
3684eHalStatus sme_DisableRMC(tHalHandle hHal, tANI_U32 sessionId);
3685#endif /* WLAN_FEATURE_RMC */
3686
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003687/* ---------------------------------------------------------------------------
3688 \fn sme_SendRateUpdateInd
3689 \brief API to Update rate
3690 \param hHal - The handle returned by macOpen
3691 \param rateUpdateParams - Pointer to rate update params
3692 \return eHalStatus
3693 ---------------------------------------------------------------------------*/
3694eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3695
Abhishek Singh00b71972016-01-07 10:51:04 +05303696#ifdef WLAN_FEATURE_RMC
3697/* ---------------------------------------------------------------------------
3698 \fn sme_GetIBSSPeerInfo
3699 \brief Used to disable RMC
3700 setting will not persist over reboots
3701 \param hHal
3702 \param ibssPeerInfoReq multicast Group IP address
3703 \- return eHalStatus
3704 -------------------------------------------------------------------------*/
3705eHalStatus sme_RequestIBSSPeerInfo(tHalHandle hHal, void *pUserData,
3706 pIbssPeerInfoCb peerInfoCbk,
3707 tANI_BOOLEAN allPeerInfoReqd,
3708 tANI_U8 staIdx);
3709#endif /* WLAN_FEATURE_RMC */
3710
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303711/*
3712 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3713 * triggers
3714 * return status
3715*/
3716eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3717 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303718 tSmeFastRoamTrigger fastRoamTrig,
3719 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303720
3721eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303722#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3723 const tANI_U8 *pBSSId,
3724#else
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303725 tANI_U8 *pBSSId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303726#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303727 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003728
3729void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303730
3731#ifdef FEATURE_WLAN_BATCH_SCAN
3732/* ---------------------------------------------------------------------------
3733 \fn sme_SetBatchScanReq
3734 \brief API to set batch scan request in FW
3735 \param hHal - The handle returned by macOpen.
3736 \param pRequest - Pointer to the batch request.
3737 \param sessionId - session ID
3738 \param callbackRoutine - HDD callback which needs to be invoked after
3739 getting set batch scan response from FW
3740 \param callbackContext - pAdapter context
3741 \return eHalStatus
3742 ---------------------------------------------------------------------------*/
3743eHalStatus
3744sme_SetBatchScanReq
3745(
3746 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3747 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3748 void *callbackContext
3749);
3750
3751/* ---------------------------------------------------------------------------
3752 \fn sme_TriggerBatchScanResultInd
3753 \brief API to trigger batch scan result indications from from FW
3754 \param hHal - The handle returned by macOpen.
3755 \param pRequest - Pointer to get batch request.
3756 \param sessionId - session ID
3757 \param callbackRoutine - HDD callback which needs to be invoked after
3758 getting get batch scan response from FW
3759 \param callbackContext - pAdapter context
3760 \return eHalStatus
3761 ---------------------------------------------------------------------------*/
3762eHalStatus
3763sme_TriggerBatchScanResultInd
3764(
3765 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3766 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3767 void *callbackContext
3768);
3769
3770/* ---------------------------------------------------------------------------
3771 \fn sme_StopBatchScanInd
3772 \brief API to stop batch scan request in FW
3773 \param hHal - The handle returned by macOpen.
3774 \param pRequest - Pointer to stop batch indication
3775 \return eHalStatus
3776 ---------------------------------------------------------------------------*/
3777eHalStatus
3778sme_StopBatchScanInd
3779(
3780 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3781);
3782
3783#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003784
3785#ifdef FEATURE_WLAN_CH_AVOID
3786/* ---------------------------------------------------------------------------
3787 \fn sme_AddChAvoidCallback
3788 \brief Used to plug in callback function
3789 Which notify channel may not be used with SAP or P2PGO mode.
3790 Notification come from FW.
3791 \param hHal
3792 \param pCallbackfn : callback function pointer should be plugged in
3793 \- return eHalStatus
3794 -------------------------------------------------------------------------*/
3795eHalStatus sme_AddChAvoidCallback
3796(
3797 tHalHandle hHal,
3798 void (*pCallbackfn)(void *pAdapter, void *indParam)
3799);
3800#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003801eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303802
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303803/* ---------------------------------------------------------------------------
3804 \fn sme_requestTypetoString
3805 \brief API to convert requestType enum values
3806 to string.
3807 ---------------------------------------------------------------------------*/
3808const char * sme_requestTypetoString(const v_U8_t requestType);
3809/* ---------------------------------------------------------------------------
3810 \fn sme_PmcStatetoString
3811 \brief API to convert PmcState enum values
3812 to string.
3813 ---------------------------------------------------------------------------*/
3814const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303815
3816eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3817
Agarwal Ashish5e414792014-06-08 15:25:23 +05303818tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303819
3820// tdlsoffchan
3821VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3822 tANI_U8 sessionId,
3823 tSirMacAddr peerMac,
3824 tANI_S32 tdlsOffCh,
3825 tANI_S32 tdlsOffChBwOffset,
3826 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303827eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3828 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303829void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303830
3831void sme_resetCoexEevent(tHalHandle hHal);
3832
Peng Xu117eab42014-09-25 13:33:27 +05303833tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3834tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303835#ifdef WLAN_FEATURE_AP_HT40_24G
3836void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3837 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303838eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3839 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303840#endif
Peng Xu117eab42014-09-25 13:33:27 +05303841
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303842eHalStatus sme_set_rssi_threshold_breached_cb(tHalHandle hal,
3843 void (*cb)(void *, struct rssi_breach_event *));
3844
Agarwal Ashish738843c2014-09-25 12:27:56 +05303845void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3846
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303847/* HDD Callback function */
3848typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3849
3850eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3851 u8 *pCmd,
3852 int length,
3853 pEncryptMsgRSPCb encCB);
3854
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303855/* ---------------------------------------------------------------------------
3856 \fn sme_RegisterBtCoexTDLSCallback
3857 \brief Used to plug in callback function
3858 Which notify btcoex on or off.
3859 Notification come from FW.
3860 \param hHal
3861 \param pCallbackfn : callback function pointer should be plugged in
3862 \- return eHalStatus
3863 -------------------------------------------------------------------------*/
3864eHalStatus sme_RegisterBtCoexTDLSCallback
3865(
3866 tHalHandle hHal,
3867 void (*pCallbackfn)(void *pAdapter, int)
3868);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303869
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303870/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303871 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303872
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303873 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303874
3875 \param hHal - The handle returned by macOpen.
3876
3877 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3878 eANI_BOOLEAN_FALSE otherwise
3879---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303880tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303881
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303882/* ---------------------------------------------------------------------------
3883
3884 \fn sme_IsTdlsOffChannelValid
3885 \brief To check if the channel is valid for currently established domain
3886 This is a synchronous API.
3887
3888 \param hHal - The handle returned by macOpen.
3889 \param channel - channel to verify
3890
3891 \return TRUE/FALSE, TRUE if channel is valid
3892
3893 -------------------------------------------------------------------------------*/
3894tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3895
Mukul Sharma4be88422015-03-09 20:29:07 +05303896/* --------------------------------------------------------------------------
3897
3898 \fn sme_IsCoexScoIndicationSet
3899 \brief To check if the BTC module in fwr has sent the SCO
3900 indication to host or not
3901
3902 \param hHal - The handle returned by macOpen.
3903 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3904
3905 --------------------------------------------------------------------------*/
3906tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3907
Abhishek Singh01c73d12015-03-12 15:13:44 +05303908eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3909 tANI_U32 iniNumBuffAdvert,
3910 tANI_U32 set_value);
3911
Mukul Sharma45063942015-04-01 20:07:59 +05303912void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303913
3914/* ---------------------------------------------------------------------------
3915 \fn sme_SetTdls2040BSSCoexistence
3916 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3917
3918 \param isEnabled - Enable or Disable.
3919 \- return VOS_STATUS_SUCCES
3920 -------------------------------------------------------------------------*/
3921eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3922
Abhishek Singh41988ba2015-05-25 19:42:29 +05303923/* ---------------------------------------------------------------------------
3924 \fn sme_SetRtsCtsHtVht
3925 \brief API to to enable/disable RTS/CTS for different modes.
3926
3927 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3928 \- return VOS_STATUS_SUCCES if INdication is posted to
3929 WDA else return eHAL_STATUS_FAILURE
3930 -------------------------------------------------------------------------*/
3931eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3932
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303933tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
Agrawal Ashish842eea82016-02-04 17:56:16 +05303934 tANI_U8 fcc_constraint,
3935 v_U32_t scan_pending);
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303936
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303937eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303938eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
Abhishek Singh837adf22015-10-01 17:37:37 +05303939 tANI_U32 indicator, tANI_U32 reason_code,
3940 tANI_BOOLEAN dump_vos_trace);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303941
Mahesh A Saptasagarbeca12c2015-09-07 16:21:06 +05303942eHalStatus sme_enableDisableChanAvoidIndEvent(tHalHandle hHal,
3943 tANI_U8 set_value);
3944
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303945/* ---------------------------------------------------------------------------
3946 \fn sme_set_wificonfig_params
3947 \brief API to set WifiConfiguration Parameters.
3948
3949 \param wifi_config_param - Wificonfig parameter 1.Averaging factor 2. Guard time
3950 \- return VOS_STATUS_SUCCES if INdication is posted to
3951 WDA else return eHAL_STATUS_FAILURE
3952 -------------------------------------------------------------------------*/
3953
3954eHalStatus sme_set_wificonfig_params(tHalHandle hHal, tSetWifiConfigParams *req);
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +05303955eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
3956 tANI_U32 *regInfo1, tANI_U32 *regInfo2);
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05303957eHalStatus sme_GetCurrentAntennaIndex(tHalHandle hHal,
3958 tCsrAntennaIndexCallback callback,
3959 void *pContext, tANI_U8 sessionId);
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303960
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05303961eHalStatus sme_setBcnMissPenaltyCount(tHalHandle hHal,
3962 tModifyRoamParamsReqParams *params);
Abhishek Singhbfb3c9e2016-07-22 11:25:43 +05303963eHalStatus sme_remove_bssid_from_scan_list(tHalHandle hal,
3964 tSirMacAddr bssid);
Agrawal Ashish0552be02016-03-02 18:03:43 +05303965void sme_set_mgmt_frm_via_wq5(tHalHandle hHal,
3966 tANI_BOOLEAN sendMgmtPktViaWQ5);
mukul sharma6b53e202016-11-23 19:29:18 +05303967eHalStatus sme_update_cfg_int_param(tHalHandle hHal, tANI_U32 cfg_id);
Agrawal Ashish17ef5082016-10-17 18:33:21 +05303968#ifdef SAP_AUTH_OFFLOAD
3969/**
3970 * sme_set_sap_auth_offload() enable/disable SAP Auth Offload
3971 * @hHal: hal layer handler
3972 * @sap_auth_offload_info: the information of SAP Auth Offload
3973 *
3974 * This function provide enable/disable SAP authenticaiton offload
3975 * feature on target firmware
3976 *
3977 * Return: eHalStatus.
3978 */
3979eHalStatus sme_set_sap_auth_offload(tHalHandle hHal,
3980 struct tSirSapOffloadInfo *sap_auth_offload_info);
3981
3982#endif /* SAP_AUTH_OFFLOAD */
Anurag Chouhan83026002016-12-13 22:46:21 +05303983#ifdef DHCP_SERVER_OFFLOAD
3984eHalStatus sme_set_dhcp_srv_offload(tHalHandle hal,
3985 sir_dhcp_srv_offload_info_t *dhcp_srv_info);
3986#endif /* DHCP_SERVER_OFFLOAD */
3987
Jeff Johnson295189b2012-06-20 16:38:30 -07003988#endif //#if !defined( __SME_API_H )