blob: 0acded19fea1dffa1f8c410da8d2b42b4e522237 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Rajeev Kumar Sirasanagandla2bb30b82019-01-07 22:30:16 +05302 * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
Kiet Lam0fb93dd2014-02-19 00:32:59 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Kiet Lam0fb93dd2014-02-19 00:32:59 -080026 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Jeff Johnson295189b2012-06-20 16:38:30 -070031#if !defined( __SME_API_H )
32#define __SME_API_H
33
34
35/**=========================================================================
36
37 \file smeApi.h
38
39 \brief prototype for SME APIs
40
Jeff Johnson295189b2012-06-20 16:38:30 -070041
42 ========================================================================*/
43
44/* $Header$ */
45
46/*--------------------------------------------------------------------------
47 Include Files
48 ------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +053049#include <linux/version.h>
Jeff Johnson295189b2012-06-20 16:38:30 -070050#include "ccmApi.h"
51#include "csrApi.h"
52#include "pmcApi.h"
53#include "vos_mq.h"
54#include "vos_lock.h"
55#include "halTypes.h"
56#include "sirApi.h"
57#include "btcApi.h"
58#include "vos_nvitem.h"
59#include "p2p_Api.h"
Abhishek Singh00b71972016-01-07 10:51:04 +053060#ifdef WLAN_FEATURE_RMC
Sushant Kaushik83392fa2015-05-05 17:44:40 +053061#include "smeInternal.h"
Abhishek Singh00b71972016-01-07 10:51:04 +053062#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070063
Jeff Johnsone7245742012-09-05 17:12:55 -070064#ifdef FEATURE_OEM_DATA_SUPPORT
65#include "oemDataApi.h"
66#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070067
68#if defined WLAN_FEATURE_VOWIFI
69#include "smeRrmInternal.h"
70#endif
Srinivas Dasari030bad32015-02-18 23:23:54 +053071#include "nan_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070072
73/*--------------------------------------------------------------------------
74 Preprocessor definitions and constants
75 ------------------------------------------------------------------------*/
76
77#define SME_SUMMARY_STATS 1
78#define SME_GLOBAL_CLASSA_STATS 2
79#define SME_GLOBAL_CLASSB_STATS 4
80#define SME_GLOBAL_CLASSC_STATS 8
81#define SME_GLOBAL_CLASSD_STATS 16
82#define SME_PER_STA_STATS 32
Sushant Kaushik33200572015-08-05 16:46:20 +053083#define SME_PER_PKT_STATS 64
Jeff Johnson295189b2012-06-20 16:38:30 -070084
85#define SME_INVALID_COUNTRY_CODE "XX"
86
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070087//Macro to disable split scan
88#define SME_DISABLE_SPLIT_SCAN 255
Padma, Santhosh Kumar859d3712014-11-13 18:00:41 +053089
90//Macro to indicate invalid no of tspecs
91#define INVALID_TSPEC 100
92
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +053093#define SME_SET_CHANNEL_REG_POWER(reg_info_1, val) do { \
94 reg_info_1 &= 0xff00ffff; \
95 reg_info_1 |= ((val & 0xff) << 16); \
96} while(0)
97
98#define SME_SET_CHANNEL_MAX_TX_POWER(reg_info_2, val) do { \
99 reg_info_2 &= 0xffff00ff; \
100 reg_info_2 |= ((val & 0xff) << 8); \
101} while(0)
102
Selvaraj, Sridharc045b8b2016-04-06 12:22:35 +0530103/**
104 * ALLOWED_ACTION_FRAMES_BITMAP
105 *
106 * Bitmask is based on the below.The frames with 0's
107 * set to their corresponding bit can be dropped in FW.
108 *
109 * -----------------------------+-----+-------+
110 * Type | Bit | Allow |
111 * -----------------------------+-----+-------+
112 * SIR_MAC_ACTION_SPECTRUM_MGMT 0 1
113 * SIR_MAC_ACTION_QOS_MGMT 1 1
114 * SIR_MAC_ACTION_DLP 2 0
115 * SIR_MAC_ACTION_BLKACK 3 1
116 * SIR_MAC_ACTION_PUBLIC_USAGE 4 1
117 * SIR_MAC_ACTION_RRM 5 1
118 * SIR_MAC_ACTION_FAST_BSS_TRNST 6 0
119 * SIR_MAC_ACTION_HT 7 0
120 * SIR_MAC_ACTION_SA_QUERY 8 1
121 * SIR_MAC_ACTION_PROT_DUAL_PUB 9 0
122 * SIR_MAC_ACTION_WNM 10 1
123 * SIR_MAC_ACTION_UNPROT_WNM 11 0
124 * SIR_MAC_ACTION_TDLS 12 0
125 * SIR_MAC_ACITON_MESH 13 0
126 * SIR_MAC_ACTION_MHF 14 0
127 * SIR_MAC_SELF_PROTECTED 15 0
128 * SIR_MAC_ACTION_WME 17 1
129 * SIR_MAC_ACTION_FST 18 0
130 * SIR_MAC_ACTION_VHT 21 1
131 * ----------------------------+------+-------+
132 */
133#define ALLOWED_ACTION_FRAMES_BITMAP \
134 ((1 << SIR_MAC_ACTION_SPECTRUM_MGMT) | \
135 (1 << SIR_MAC_ACTION_QOS_MGMT) | \
136 (1 << SIR_MAC_ACTION_BLKACK) | \
137 (1 << SIR_MAC_ACTION_PUBLIC_USAGE) | \
138 (1 << SIR_MAC_ACTION_RRM) | \
139 (1 << SIR_MAC_ACTION_SA_QUERY) | \
140 (1 << SIR_MAC_ACTION_WNM) | \
141 (1 << SIR_MAC_ACTION_WME) | \
142 (1 << SIR_MAC_ACTION_VHT))
Jeff Johnson295189b2012-06-20 16:38:30 -0700143/*--------------------------------------------------------------------------
144 Type declarations
145 ------------------------------------------------------------------------*/
146typedef struct _smeConfigParams
147{
148 tCsrConfigParam csrConfig;
149#if defined WLAN_FEATURE_VOWIFI
150 tRrmConfigParam rrmConfig;
151#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700152#if defined FEATURE_WLAN_LFR
153 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800154 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700155#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800156#if defined FEATURE_WLAN_ESE
157 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700158#endif
159#if defined WLAN_FEATURE_P2P_INTERNAL
160 tP2PConfigParam p2pConfig;
161#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800162#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700163 tANI_U8 isFastTransitionEnabled;
164 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700165 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700166#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530167 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700168 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800169 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530170 tANI_U32 fDeferIMPSTime;
Chandrasekaran, Manishekar5cb0acd2014-12-23 20:06:52 +0530171 tANI_U8 fBtcEnableIndTimerVal;
Jeff Johnson295189b2012-06-20 16:38:30 -0700172} tSmeConfigParams, *tpSmeConfigParams;
173
Sunil Duttc69bccb2014-05-26 21:30:20 +0530174#ifdef WLAN_FEATURE_LINK_LAYER_STATS
175
176/* ---------------------------------------------------------------------------
177 \fn sme_LLStatsSetReq
178 \brief API to set link layer stats request to FW
179 \param hHal - The handle returned by macOpen.
180
181 \Param pStatsReq - a pointer to a caller allocated object of
182 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
183 stats set.
184
185 \return eHalStatus
186 ---------------------------------------------------------------------------*/
187eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
188
189/* ---------------------------------------------------------------------------
190 \fn sme_LLStatsGetReq
191 \brief API to get link layer stats request to FW
192 \param hHal - The handle returned by macOpen.
193
194 \Param pStatsReq - a pointer to a caller allocated object of
195 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
196 stats get.
197
198 \return eHalStatus
199 ---------------------------------------------------------------------------*/
200eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
201
202/* ---------------------------------------------------------------------------
203 \fn sme_LLStatsClearReq
204 \brief API to clear link layer stats request to FW
205 \param hHal - The handle returned by macOpen.
206
207 \Param pStatsReq - a pointer to a caller allocated object of
208 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
209 stats clear.
210
211 \return eHalStatus
212 ---------------------------------------------------------------------------*/
213eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
214
215/* ---------------------------------------------------------------------------
216 \fn sme_SetLinkLayerStatsIndCB
217 \brief API to trigger Link Layer stats result indications from from FW
218 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530219 \param callbackRoutine - HDD callback which needs to be invoked after
220 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530221 \return eHalStatus
222 ---------------------------------------------------------------------------*/
223eHalStatus
224sme_SetLinkLayerStatsIndCB
225(
Dino Mycled3d50022014-07-07 12:58:25 +0530226 tHalHandle hHal,
227 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
228 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530229);
230
231
232#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
233
Sourav Mohapatra2416e0e2018-03-05 18:44:21 +0530234void sme_set_vowifi_mode(tpAniSirGlobal pMac, bool enable);
Ashish Kumar Dhanotiyaf59c7762018-04-10 17:54:25 +0530235void sme_set_qpower(tpAniSirGlobal pMac, uint8_t enable);
236
Dino Mycle2c198072014-06-10 10:15:52 +0530237#ifdef WLAN_FEATURE_EXTSCAN
238/* ---------------------------------------------------------------------------
239 \fn sme_GetValidChannelsByBand
240 \brief SME API to fetch all valid channel filtered by band
241 \param hHal
242 \param wifiBand: RF band information
243 \param aValidChannels: Array to store channel info
244 \param len: number of channels
245 \- return eHalStatus
246 -------------------------------------------------------------------------*/
247eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
248 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
249
250/* ---------------------------------------------------------------------------
251 \fn sme_EXTScanGetCapabilities
252 \brief SME API to fetch Extented Scan capabilities
253 \param hHal
254 \param pReq: Extented Scan capabilities structure
255 \- return eHalStatus
256 -------------------------------------------------------------------------*/
257eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
258 tSirGetEXTScanCapabilitiesReqParams *pReq);
259
260/* ---------------------------------------------------------------------------
261 \fn sme_EXTScanStart
262 \brief SME API to issue Extented Scan start
263 \param hHal
264 \param pStartCmd: Extented Scan start structure
265 \- return eHalStatus
266 -------------------------------------------------------------------------*/
267eHalStatus sme_EXTScanStart (tHalHandle hHal,
268 tSirEXTScanStartReqParams *pStartCmd);
269
270/* ---------------------------------------------------------------------------
271 \fn sme_EXTScanStop
272 \brief SME API to issue Extented Scan stop
273 \param hHal
274 \param pStopReq: Extented Scan stop structure
275 \- return eHalStatus
276 -------------------------------------------------------------------------*/
277eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
278
279/* ---------------------------------------------------------------------------
280 \fn sme_SetBssHotlist
281 \brief SME API to set BSSID hotlist
282 \param hHal
283 \param pSetHotListReq: Extented Scan set hotlist structure
284 \- return eHalStatus
285 -------------------------------------------------------------------------*/
286eHalStatus sme_SetBssHotlist (tHalHandle hHal,
287 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
288
289/* ---------------------------------------------------------------------------
290 \fn sme_ResetBssHotlist
291 \brief SME API to reset BSSID hotlist
292 \param hHal
293 \param pSetHotListReq: Extented Scan set hotlist structure
294 \- return eHalStatus
295 -------------------------------------------------------------------------*/
296eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
297 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
298
299/* ---------------------------------------------------------------------------
Dino Mycle2c198072014-06-10 10:15:52 +0530300 \fn sme_getCachedResults
301 \brief SME API to get cached results
302 \param hHal
303 \param pCachedResultsReq: Extented Scan get cached results structure
304 \- return eHalStatus
305 -------------------------------------------------------------------------*/
306eHalStatus sme_getCachedResults (tHalHandle hHal,
307 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
308
309/* ---------------------------------------------------------------------------
310 \fn sme_EXTScanRegisterCallback
311 \brief SME API to register Extented Scan notification callback
312 \param pEXTScanIndCb
313 \- return void
314 -------------------------------------------------------------------------*/
315eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
316 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
317 void *);
318
319#endif /* WLAN_FEATURE_EXTSCAN */
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530320
321#ifdef FEATURE_OEM_DATA_SUPPORT
322eHalStatus sme_OemDataRegisterCallback (tHalHandle hHal,
Padma, Santhosh Kumaree7c3d22016-01-25 10:36:08 +0530323 void (*pOemDataIndCb)(void *, const tANI_U16, void *, tANI_U32),
324 void *callbackContext);
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +0530325#endif
326
Rajeev Kumar Sirasanagandla2bb30b82019-01-07 22:30:16 +0530327/**
328 * sme_SpoofMacAddrReq() - SME API to send Spoof Mac Addr req to HAL
329 * @hHal: Hal handle
330 * @macaddr: Spoof mac address to be sent
331 * @spoof_mac_oui: If spoof request is from VENDOR_SUBCMD_MAC_OUI
332 *
333 * Return: eHalStatus
334 */
335eHalStatus
336sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr, bool spoof_mac_oui);
Dino Mycle2c198072014-06-10 10:15:52 +0530337
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530338typedef enum
339{
340 eSME_ROAM_TRIGGER_NONE = 0,
341 eSME_ROAM_TRIGGER_SCAN = 1,
342 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
343 eSME_ROAM_TRIGGER_MAX
344} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700345
Kapil Gupta3d923fb2016-12-20 18:59:27 +0530346#ifdef WLAN_FEATURE_APFIND
347struct sme_ap_find_request_req
348{
349 u_int16_t request_data_len;
350 const u_int8_t* request_data;
351};
352#endif /* WLAN_FEATURE_APFIND */
353
354
Jeff Johnson295189b2012-06-20 16:38:30 -0700355/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530356 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700357 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700358/*--------------------------------------------------------------------------
359
360 \brief sme_Open() - Initialze all SME modules and put them at idle state
361
362 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
363 successfully return, all modules are at idle state ready to start.
364
365 smeOpen must be called before any other SME APIs can be involved.
366 smeOpen must be called after macOpen.
367
368 \param hHal - The handle returned by macOpen.
369
370 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
371
372 Other status means SME is failed to be initialized
373 \sa
374
375 --------------------------------------------------------------------------*/
376eHalStatus sme_Open(tHalHandle hHal);
377
378/*--------------------------------------------------------------------------
379
380 \brief sme_Close() - Release all SME modules and their resources.
381
382 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
383 return, all modules are at closed state.
384
385 No SME APIs can be involved after sme_Close except sme_Open.
386 sme_Close must be called before macClose.
387
388 \param hHal - The handle returned by macOpen.
389
390 \return eHAL_STATUS_SUCCESS - SME is successfully close.
391
392 Other status means SME is failed to be closed but caller still cannot
393 call any other SME functions except smeOpen.
394 \sa
395
396 --------------------------------------------------------------------------*/
397eHalStatus sme_Close(tHalHandle hHal);
398
399/*--------------------------------------------------------------------------
Hema Aparna Medicharlaa6cf65e2015-06-01 16:23:28 +0530400
401 \brief sme_PreClose() - Stop SME resources prior to final sme_Stop.
402
403 The function stops resources in SME, PMC, CCM, CSR, etc. as needed
404 to handle fast closure during SSR/unload-load cases.
405
406 \param hHal - The handle returned by macOpen.
407 \return v_VOID_t
408
409 \sa
410
411 --------------------------------------------------------------------------*/
412v_VOID_t sme_PreClose(tHalHandle hHal);
413
414/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700415
416 \brief sme_Start() - Put all SME modules at ready state.
417
418 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
419 successfully return, all modules are ready to run.
420
421 \param hHal - The handle returned by macOpen.
422
423 \return eHAL_STATUS_SUCCESS - SME is ready.
424
425 Other status means SME is failed to start.
426 \sa
427
428 --------------------------------------------------------------------------*/
429eHalStatus sme_Start(tHalHandle hHal);
430
431/*--------------------------------------------------------------------------
432
433 \brief sme_Stop() - Stop all SME modules and put them at idle state
434
435 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
436 return, all modules are at idle state ready to start.
437
438
439 \param hHal - The handle returned by macOpen.
440
Kiet Lama72a2322013-11-15 11:18:11 +0530441 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700442
443 \return eHAL_STATUS_SUCCESS - SME is stopped.
444
445 Other status means SME is failed to stop but caller should still consider
446 SME is stopped.
447 \sa
448
449 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530450eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700451
452
453/*--------------------------------------------------------------------------
454
455 \brief sme_OpenSession() - Open a session for scan/roam operation.
456
457 This is a synchronous API.
458
459
460 \param hHal - The handle returned by macOpen.
461 \param callback - A pointer to the function caller specifies for roam/connect status indication
462 \param pContext - The context passed with callback
463 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
464 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
465
466 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
467
468 Other status means SME is failed to open the session.
469 eHAL_STATUS_RESOURCES - no more session available.
470 \sa
471
472 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700473eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
474 void *pContext, tANI_U8 *pSelfMacAddr,
475 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700476
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700477/*--------------------------------------------------------------------------
478
479 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
480 \param hHal - The handle returned by macOpen.
481 \param currDeviceMode - Current operating device mode.
482 --------------------------------------------------------------------------*/
483
484void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700485
486/*--------------------------------------------------------------------------
487
488 \brief sme_CloseSession() - Open a session for scan/roam operation.
489
490 This is a synchronous API.
491
Jeff Johnson295189b2012-06-20 16:38:30 -0700492 \param hHal - The handle returned by macOpen.
493
494 \param sessionId - A previous opened session's ID.
mukul sharmabab477d2015-06-11 17:14:55 +0530495
496 \param bPurgeSmeCmdList - Whether sme cmd list purging is required or not.
497 TRUE -Purging require FALSE - Purging not require
498
Jeff Johnson295189b2012-06-20 16:38:30 -0700499 \return eHAL_STATUS_SUCCESS - session is closed.
500
501 Other status means SME is failed to open the session.
502 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
503 \sa
mukul sharmabab477d2015-06-11 17:14:55 +0530504
505
Jeff Johnson295189b2012-06-20 16:38:30 -0700506 --------------------------------------------------------------------------*/
507eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
Agrawal Ashish5a3522c2016-03-02 15:08:28 +0530508 tANI_BOOLEAN fSync,
mukul sharmabab477d2015-06-11 17:14:55 +0530509 tANI_U8 bPurgeSmeCmdList,
510 csrRoamSessionCloseCallback callback,
511 void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -0700512
513/*--------------------------------------------------------------------------
514
515 \brief sme_UpdateConfig() - Change configurations for all SME moduels
516
517 The function updates some configuration for modules in SME, CCM, CSR, etc
518 during SMEs close -> open sequence.
519
520 Modules inside SME apply the new configuration at the next transaction.
521
522
523 \param hHal - The handle returned by macOpen.
524 \Param pSmeConfigParams - a pointer to a caller allocated object of
525 typedef struct _smeConfigParams.
526
527 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
528
529 Other status means SME is failed to update the config parameters.
530 \sa
531
532 --------------------------------------------------------------------------*/
533eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
534
535#ifdef FEATURE_WLAN_SCAN_PNO
536/*--------------------------------------------------------------------------
537
538 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
539
540 It is used at driver start up to inform RIVA of the default channel
541 configuration.
542
543 This is a synchronuous call
544
545 \param hHal - The handle returned by macOpen.
546
547 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
548
549 Other status means SME is failed to update the channel config.
550 \sa
551
552 --------------------------------------------------------------------------*/
553eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
554
555#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700556/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530557
558 \brief sme_UpdateChannelList() - Update channel List in FW.
559
560
561 \param hHal - The handle returned by macOpen.
562
563 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
564
565 Other status means SME is failed to update the channel config.
566 \sa
567
568 --------------------------------------------------------------------------*/
569eHalStatus sme_UpdateChannelList(tHalHandle hHal);
570
571/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700572
573 \brief sme_set11dinfo() - Set the 11d information about valid channels
574 and there power using information from nvRAM
575 This function is called only for AP.
576
577 This is a synchronuous call
578
579 \param hHal - The handle returned by macOpen.
580 \Param pSmeConfigParams - a pointer to a caller allocated object of
581 typedef struct _smeConfigParams.
582
583 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
584
585 Other status means SME is failed to update the config parameters.
586 \sa
587--------------------------------------------------------------------------*/
588
589eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
590
591/*--------------------------------------------------------------------------
592
593 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
594
595 This is a synchronuous call
596
597 \param hHal - The handle returned by HostapdAdapter.
598 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
599
600 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
601
602 Other status means, failed to get the current regulatory domain.
603 \sa
604--------------------------------------------------------------------------*/
605
606eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
607
608eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
609
Jeff Johnson295189b2012-06-20 16:38:30 -0700610
611/* ---------------------------------------------------------------------------
612 \fn sme_ChangeConfigParams
613 \brief The SME API exposed for HDD to provide config params to SME during
614 SMEs stop -> start sequence.
615
616 If HDD changed the domain that will cause a reset. This function will
617 provide the new set of 11d information for the new domain. Currrently this
618 API provides info regarding 11d only at reset but we can extend this for
619 other params (PMC, QoS) which needs to be initialized again at reset.
620
621 This is a synchronuous call
622
623 \param hHal - The handle returned by macOpen.
624
625 \Param
626 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
627 currently provides 11d related information like Country code,
628 Regulatory domain, valid channel list, Tx power per channel, a
629 list with active/passive scan allowed per valid channel.
630
631 \return eHalStatus
632 ---------------------------------------------------------------------------*/
633eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
634 tCsrUpdateConfigParam *pUpdateConfigParam);
635
636/*--------------------------------------------------------------------------
637
638 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
639 is ready tio run.
640
641 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
642 to running state.
643
644
645 \param hHal - The handle returned by macOpen.
646
647 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
648
649 Other status means SME failed to send the message to PE.
650 \sa
651
652 --------------------------------------------------------------------------*/
653eHalStatus sme_HDDReadyInd(tHalHandle hHal);
654
655
656/*--------------------------------------------------------------------------
657
658 \brief sme_ProcessMsg() - The main message processor for SME.
659
660 The function is called by a message dispatcher when to process a message
661 targeted for SME.
662
663
664 \param hHal - The handle returned by macOpen.
665 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
666
667 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
668
669 Other status means SME failed to process the message.
670 \sa
671
672 --------------------------------------------------------------------------*/
673eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
674
675v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
676
677/* ---------------------------------------------------------------------------
678 \fn sme_ScanRequest
679 \brief a wrapper function to Request a 11d or full scan from CSR.
680 \param pScanRequestID - pointer to an object to get back the request ID
681 \param callback - a callback function that scan calls upon finish, will not
682 be called if csrScanRequest returns error
683 \param pContext - a pointer passed in for the callback
684 \return eHalStatus
685 ---------------------------------------------------------------------------*/
686eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
687 tANI_U32 *pScanRequestID,
688 csrScanCompleteCallback callback, void *pContext);
689
690
691/* ---------------------------------------------------------------------------
692 \fn sme_ScanSetBGScanparams
693 \brief a wrapper function to request CSR to set BG scan params in PE
694 \param pScanReq - BG scan request structure
695 \return eHalStatus
696 ---------------------------------------------------------------------------*/
697eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
698
699
700/* ---------------------------------------------------------------------------
701 \fn sme_ScanGetResult
702 \brief a wrapper function to request scan results from CSR.
703 \param pFilter - If pFilter is NULL, all cached results are returned
704 \param phResult - an object for the result.
705 \return eHalStatus
706 ---------------------------------------------------------------------------*/
707eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
708 tScanResultHandle *phResult);
709
710
711/* ---------------------------------------------------------------------------
712 \fn sme_ScanFlushResult
713 \brief a wrapper function to request CSR to clear scan results.
714 \return eHalStatus
715 ---------------------------------------------------------------------------*/
716eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530717
718/*
719 * ---------------------------------------------------------------------------
720 * \fn sme_FilterScanResults
721 * \brief a wrapper function to request CSR to filter the scan results based
722 * on valid chennel list.
723 * \return eHalStatus
724 *---------------------------------------------------------------------------
725 */
726eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
727
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530728/*
729 * ---------------------------------------------------------------------------
730 * \fn sme_FilterScanDFSResults
731 * \brief a wrapper function to request CSR to filter BSSIDs on DFS channels
732 * from the scan results.
733 * \return eHalStatus
734 *---------------------------------------------------------------------------
735 */
736eHalStatus sme_FilterScanDFSResults(tHalHandle hHal);
737
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700738eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700739
740/* ---------------------------------------------------------------------------
741 \fn sme_ScanResultGetFirst
742 \brief a wrapper function to request CSR to returns the first element of
743 scan result.
744 \param hScanResult - returned from csrScanGetResult
745 \return tCsrScanResultInfo * - NULL if no result
746 ---------------------------------------------------------------------------*/
747tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
748 tScanResultHandle hScanResult);
749
750/* ---------------------------------------------------------------------------
751 \fn sme_ScanResultGetNext
752 \brief a wrapper function to request CSR to returns the next element of
753 scan result. It can be called without calling csrScanResultGetFirst
754 first
755 \param hScanResult - returned from csrScanGetResult
756 \return Null if no result or reach the end
757 ---------------------------------------------------------------------------*/
758tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
759 tScanResultHandle hScanResult);
760
761/* ---------------------------------------------------------------------------
762 \fn sme_ScanResultPurge
763 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
764 in the list and free memory for each item
765 \param hScanResult - returned from csrScanGetResult. hScanResult is
766 considered gone by
767 calling this function and even before this function reutrns.
768 \return eHalStatus
769 ---------------------------------------------------------------------------*/
770eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
771
Sourav Mohapatra5817dc42017-12-18 17:45:16 +0530772VOS_STATUS sme_update_channel_list(tpAniSirGlobal pMac);
773
774
Jeff Johnson295189b2012-06-20 16:38:30 -0700775/* ---------------------------------------------------------------------------
776 \fn sme_ScanGetPMKIDCandidateList
777 \brief a wrapper function to return the PMKID candidate list
778 \param pPmkidList - caller allocated buffer point to an array of
779 tPmkidCandidateInfo
780 \param pNumItems - pointer to a variable that has the number of
781 tPmkidCandidateInfo allocated when retruning, this is
782 either the number needed or number of items put into
783 pPmkidList
784 \return eHalStatus - when fail, it usually means the buffer allocated is not
785 big enough and pNumItems
786 has the number of tPmkidCandidateInfo.
787 \Note: pNumItems is a number of tPmkidCandidateInfo,
788 not sizeof(tPmkidCandidateInfo) * something
789 ---------------------------------------------------------------------------*/
790eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
791 tPmkidCandidateInfo *pPmkidList,
792 tANI_U32 *pNumItems );
793
794
795/*----------------------------------------------------------------------------
796 \fn sme_RoamRegisterLinkQualityIndCallback
797
798 \brief
799 a wrapper function to allow HDD to register a callback handler with CSR for
800 link quality indications.
801
802 Only one callback may be registered at any time.
803 In order to deregister the callback, a NULL cback may be provided.
804
805 Registration happens in the task context of the caller.
806
807 \param callback - Call back being registered
808 \param pContext - user data
809
810 DEPENDENCIES: After CSR open
811
812 \return eHalStatus
813-----------------------------------------------------------------------------*/
814eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
815 csrRoamLinkQualityIndCallback callback,
816 void *pContext);
817
818
819/* ---------------------------------------------------------------------------
820 \fn sme_RoamConnect
821 \brief a wrapper function to request CSR to inititiate an association
822 \param sessionId - the sessionId returned by sme_OpenSession.
823 \param pProfile - can be NULL to join to any open ones
824 \param pRoamId - to get back the request ID
825 \return eHalStatus
826 ---------------------------------------------------------------------------*/
827eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
828 tANI_U32 *pRoamId);
829
830/* ---------------------------------------------------------------------------
831 \fn sme_RoamReassoc
832 \brief a wrapper function to request CSR to inititiate a re-association
833 \param pProfile - can be NULL to join the currently connected AP. In that
834 case modProfileFields should carry the modified field(s) which could trigger
835 reassoc
836 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
837 that might need modification dynamically once STA is up & running and this
838 could trigger a reassoc
839 \param pRoamId - to get back the request ID
840 \return eHalStatus
841 -------------------------------------------------------------------------------*/
842eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
843 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700844 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700845
846/* ---------------------------------------------------------------------------
847 \fn sme_RoamConnectToLastProfile
848 \brief a wrapper function to request CSR to disconnect and reconnect with
849 the same profile
850 \return eHalStatus. It returns fail if currently connected
851 ---------------------------------------------------------------------------*/
852eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
853
854/* ---------------------------------------------------------------------------
855 \fn sme_RoamDisconnect
856 \brief a wrapper function to request CSR to disconnect from a network
857 \param reason -- To indicate the reason for disconnecting. Currently, only
858 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
859 \return eHalStatus
860 ---------------------------------------------------------------------------*/
861eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
862
Jeff Johnson295189b2012-06-20 16:38:30 -0700863/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530864 \fn.sme_abortConnection
865 \brief a wrapper function to request CSR to stop from connecting a network
866 \retun void.
867---------------------------------------------------------------------------*/
868
869void sme_abortConnection(tHalHandle hHal, tANI_U8 sessionId);
870
871/* ---------------------------------------------------------------------------
Abhishek Singhe0bc0992016-05-20 17:58:18 +0530872 \fn.sme_dhcp_done_ind
873 \brief a wrapper function to set dhcp done ind in sme session
874 \retun void.
875---------------------------------------------------------------------------*/
876void sme_dhcp_done_ind(tHalHandle hal, uint8_t session_id);
877
878/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700879 \fn sme_RoamStopBss
880 \brief a wrapper function to request CSR to stop bss
881 \param sessionId - sessionId of SoftAP
882 \return eHalStatus
883 ---------------------------------------------------------------------------*/
884eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
885
886/* ---------------------------------------------------------------------------
887 \fn sme_RoamGetAssociatedStas
888 \brief To probe the list of associated stations from various modules of CORE stack.
889 \This is an asynchronous API.
890 \param sessionId - sessionId of SoftAP
891 \param modId - Module from whom list of associtated stations is to be probed.
892 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
893 \param pUsrContext - Opaque HDD context
894 \param pfnSapEventCallback - Sap event callback in HDD
895 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
896 \return eHalStatus
897 -------------------------------------------------------------------------------*/
898eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
899 VOS_MODULE_ID modId, void *pUsrContext,
900 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
901
902/* ---------------------------------------------------------------------------
903 \fn sme_RoamDisconnectSta
904 \brief To disassociate a station. This is an asynchronous API.
905 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
906 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
907 -------------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +0530908eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId,
909#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
910 const tANI_U8 *pPeerMacAddr
911#else
912 tANI_U8 *pPeerMacAddr
913#endif
914 );
Jeff Johnson295189b2012-06-20 16:38:30 -0700915
916/* ---------------------------------------------------------------------------
917 \fn sme_RoamDeauthSta
918 \brief To disassociate a station. This is an asynchronous API.
919 \param hHal - Global structure
920 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530921 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700922 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
923 -------------------------------------------------------------------------------*/
924eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530925 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700926
927/* ---------------------------------------------------------------------------
928 \fn sme_RoamTKIPCounterMeasures
929 \brief To start or stop TKIP counter measures. This is an asynchronous API.
930 \param sessionId - sessionId of SoftAP
931 \param bEnable - Flag to start/stop TKIP countermeasures
932 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
933 -------------------------------------------------------------------------------*/
934eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
935
936/* ---------------------------------------------------------------------------
937 \fn sme_RoamGetWpsSessionOverlap
938 \brief To get the WPS PBC session overlap information.
939 \This is an asynchronous API.
940 \param sessionId - sessionId of SoftAP
941 \param pUsrContext - Opaque HDD context
942 \param pfnSapEventCallback - Sap event callback in HDD
943 \return eHalStatus
944 -------------------------------------------------------------------------------*/
945eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
946 void *pUsrContext, void *pfnSapEventCallback,
947 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700948
949/* ---------------------------------------------------------------------------
950 \fn sme_RoamGetConnectState
951 \brief a wrapper function to request CSR to return the current connect state
952 of Roaming
953 \return eHalStatus
954 ---------------------------------------------------------------------------*/
955eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
956
957/* ---------------------------------------------------------------------------
958 \fn sme_RoamGetConnectProfile
959 \brief a wrapper function to request CSR to return the current connect
960 profile. Caller must call csrRoamFreeConnectProfile after it is done
961 and before reuse for another csrRoamGetConnectProfile call.
962 \param pProfile - pointer to a caller allocated structure
963 tCsrRoamConnectedProfile
964 \return eHalStatus. Failure if not connected
965 ---------------------------------------------------------------------------*/
966eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
967 tCsrRoamConnectedProfile *pProfile);
968
969/* ---------------------------------------------------------------------------
970 \fn sme_RoamFreeConnectProfile
971 \brief a wrapper function to request CSR to free and reinitialize the
972 profile returned previously by csrRoamGetConnectProfile.
973 \param pProfile - pointer to a caller allocated structure
974 tCsrRoamConnectedProfile
975 \return eHalStatus.
976 ---------------------------------------------------------------------------*/
977eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
978 tCsrRoamConnectedProfile *pProfile);
979
980/* ---------------------------------------------------------------------------
981 \fn sme_RoamSetPMKIDCache
982 \brief a wrapper function to request CSR to return the PMKID candidate list
983 \param pPMKIDCache - caller allocated buffer point to an array of
984 tPmkidCacheInfo
985 \param numItems - a variable that has the number of tPmkidCacheInfo
986 allocated when retruning, this is either the number needed
987 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530988 \param update_entire_cache - if TRUE, then it overwrites the entire cache
989 with pPMKIDCache, else it updates entry by
990 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700991 \return eHalStatus - when fail, it usually means the buffer allocated is not
992 big enough and pNumItems has the number of
993 tPmkidCacheInfo.
994 \Note: pNumItems is a number of tPmkidCacheInfo,
995 not sizeof(tPmkidCacheInfo) * something
996 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530997eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
998 tPmkidCacheInfo *pPMKIDCache,
999 tANI_U32 numItems,
1000 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -07001001
1002/* ---------------------------------------------------------------------------
1003 \fn sme_RoamGetSecurityReqIE
1004 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
1005 passes to PE to JOIN request or START_BSS request
1006 This is a synchronuous call.
1007 \param sessionId - returned by sme_OpenSession.
1008 \param pLen - caller allocated memory that has the length of pBuf as input.
1009 Upon returned, *pLen has the needed or IE length in pBuf.
1010 \param pBuf - Caller allocated memory that contain the IE field, if any,
1011 upon return
1012 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1013 \return eHalStatus - when fail, it usually means the buffer allocated is not
1014 big enough
1015 ---------------------------------------------------------------------------*/
1016eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1017 tANI_U8 *pBuf, eCsrSecurityType secType);
1018
1019/* ---------------------------------------------------------------------------
1020 \fn sme_RoamGetSecurityRspIE
1021 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
1022 the beacon or probe rsp if connected
1023 \param sessionId - returned by sme_OpenSession.
1024 \param pLen - caller allocated memory that has the length of pBuf as input.
1025 Upon returned, *pLen has the needed or IE length in pBuf.
1026 \param pBuf - Caller allocated memory that contain the IE field, if any,
1027 upon return
1028 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
1029 \return eHalStatus - when fail, it usually means the buffer allocated is not
1030 big enough
1031 ---------------------------------------------------------------------------*/
1032eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
1033 tANI_U8 *pBuf, eCsrSecurityType secType);
1034
1035
1036/* ---------------------------------------------------------------------------
1037 \fn sme_RoamGetNumPMKIDCache
1038 \brief a wrapper function to request CSR to return number of PMKID cache
1039 entries
1040 \return tANI_U32 - the number of PMKID cache entries
1041 ---------------------------------------------------------------------------*/
1042tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
1043
1044/* ---------------------------------------------------------------------------
1045 \fn sme_RoamGetPMKIDCache
1046 \brief a wrapper function to request CSR to return PMKID cache from CSR
1047 \param pNum - caller allocated memory that has the space of the number of
1048 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
1049 needed or actually number in tPmkidCacheInfo.
1050 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
1051 any, upon return
1052 \return eHalStatus - when fail, it usually means the buffer allocated is not
1053 big enough
1054 ---------------------------------------------------------------------------*/
1055eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
1056 tPmkidCacheInfo *pPmkidCache);
1057
1058/* ---------------------------------------------------------------------------
1059 \fn sme_GetConfigParam
1060 \brief a wrapper function that HDD calls to get the global settings
1061 currently maintained by CSR.
1062 \param pParam - caller allocated memory
1063 \return eHalStatus
1064 ---------------------------------------------------------------------------*/
1065eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
1066
1067/* ---------------------------------------------------------------------------
1068 \fn sme_GetStatistics
1069 \brief a wrapper function that client calls to register a callback to get
1070 different PHY level statistics from CSR.
1071
1072 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
1073 \param statsMask - The different category/categories of stats requester is looking for
1074 The order in which you set the bits in the statsMask for requesting
1075 different type of stats is:
1076
1077 eCsrSummaryStats = bit 0
1078 eCsrGlobalClassAStats = bit 1
1079 eCsrGlobalClassBStats = bit 2
1080 eCsrGlobalClassCStats = bit 3
1081 eCsrGlobalClassDStats = bit 4
1082 eCsrPerStaStats = bit 5
1083
1084 \param callback - SME sends back the requested stats using the callback
1085 \param periodicity - If requester needs periodic update, 0 means it's an one
1086 time request
1087 \param cache - If requester is happy with cached stats
1088 \param staId - The station ID for which the stats is requested for
1089 \param pContext - user context to be passed back along with the callback
1090 \return eHalStatus
1091 ---------------------------------------------------------------------------*/
1092eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
1093 tANI_U32 statsMask,
1094 tCsrStatsCallback callback,
1095 tANI_U32 periodicity, tANI_BOOLEAN cache,
1096 tANI_U8 staId, void *pContext);
1097
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +05301098/* ---------------------------------------------------------------------------
1099 \fn smeGetTLSTAState
1100 \helper function to get teh TL STA State whenever the function is called.
1101
1102 \param staId - The staID to be passed to the TL
1103 to get the relevant TL STA State
1104 \return the state as tANI_U16
1105 ---------------------------------------------------------------------------*/
1106tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
1107
Jeff Johnson295189b2012-06-20 16:38:30 -07001108eHalStatus sme_GetRssi(tHalHandle hHal,
1109 tCsrRssiCallback callback,
1110 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301111
1112/* ---------------------------------------------------------------------------
1113 \fn sme_GetSnr
1114 \brief a wrapper function that client calls to register a callback to get
1115 SNR from FW
1116
1117 \param callback - SME sends back the requested stats using the callback
1118 \param staId - The station ID for which the stats is requested for
1119 \param bssid - The bssid of the connected session
1120 \param pContext - user context to be passed back along with the callback
1121 ---------------------------------------------------------------------------*/
1122eHalStatus sme_GetSnr(tHalHandle hHal,
1123 tCsrSnrCallback callback,
1124 tANI_U8 staId, tCsrBssid bssId,
1125 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001126#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001127eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1128 tCsrRssiCallback callback,
1129 tANI_U8 staId,
1130 tCsrBssid bssId,
1131 void *pContext,
1132 void* pVosContext);
1133#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001134
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001135#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001136/* ---------------------------------------------------------------------------
1137 \fn sme_GetTsmStats
1138 \brief a wrapper function that client calls to register a callback to get TSM Stats
1139
1140 \param callback - SME sends back the requested stats using the callback
1141 \param staId - The station ID for which the stats is requested for
1142 \param pContext - user context to be passed back along with the callback
1143 \param pVosContext - vos context
1144 \return eHalStatus
1145 ---------------------------------------------------------------------------*/
1146eHalStatus sme_GetTsmStats(tHalHandle hHal,
1147 tCsrTsmStatsCallback callback,
1148 tANI_U8 staId, tCsrBssid bssId,
1149 void *pContext, void* pVosContext, tANI_U8 tid);
1150
1151/* ---------------------------------------------------------------------------
1152 \fn sme_SetCCKMIe
1153 \brief function to store the CCKM IE passed from supplicant and use it while packing
1154 reassociation request
1155 \param hHal - HAL handle for device
1156 \param pCckmIe - pointer to CCKM IE data
1157 \param pCckmIeLen - length of the CCKM IE
1158 \- return Success or failure
1159 -------------------------------------------------------------------------*/
1160eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1161
1162
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001163/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001164 \fn sme_SetEseBeaconRequest
1165 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001166 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001167 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001168 \- return Success or failure
1169 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001170eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1171 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001172
1173
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001174#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001175/* ---------------------------------------------------------------------------
1176 \fn sme_CfgSetInt
1177 \brief a wrapper function that HDD calls to set parameters in CFG.
1178 \param cfgId - Configuration Parameter ID (type) for STA.
1179 \param ccmValue - The information related to Configuration Parameter ID
1180 which needs to be saved in CFG
1181 \param callback - To be registered by CSR with CCM. Once the CFG done with
1182 saving the information in the database, it notifies CCM &
1183 then the callback will be invoked to notify.
1184 \param toBeSaved - To save the request for future reference
1185 \return eHalStatus
1186 ---------------------------------------------------------------------------*/
1187eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1188 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1189
1190/* ---------------------------------------------------------------------------
1191 \fn sme_CfgSetStr
1192 \brief a wrapper function that HDD calls to set parameters in CFG.
1193 \param cfgId - Configuration Parameter ID (type) for STA.
1194 \param pStr - Pointer to the byte array which carries the information needs
1195 to be saved in CFG
1196 \param length - Length of the data to be saved
1197 \param callback - To be registered by CSR with CCM. Once the CFG done with
1198 saving the information in the database, it notifies CCM &
1199 then the callback will be invoked to notify.
1200 \param toBeSaved - To save the request for future reference
1201 \return eHalStatus
1202 ---------------------------------------------------------------------------*/
1203eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1204 tANI_U32 length, tCcmCfgSetCallback callback,
1205 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301206/* ---------------------------------------------------------------------------
1207 \fn sme_GetModifyProfileFields
1208 \brief HDD or SME - QOS calls this function to get the current values of
1209 connected profile fields, changing which can cause reassoc.
1210 This function must be called after CFG is downloaded and STA is in connected
1211 state. Also, make sure to call this function to get the current profile
1212 fields before calling the reassoc. So that pModifyProfileFields will have
1213 all the latest values plus the one(s) has been updated as part of reassoc
1214 request.
1215 \param pModifyProfileFields - pointer to the connected profile fields
1216 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001217
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301218 \return eHalStatus
1219 -------------------------------------------------------------------------------*/
1220eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1221 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301222/* ---------------------------------------------------------------------------
1223 \fn sme_HT40StopOBSSScan
1224 \brief HDD or SME - Command to stop the OBSS scan
1225 THis is implemented only for debugging purpose.
1226 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1227 \param sessionId - sessionId
1228 changing which can cause reassoc
1229
1230 \return eHalStatus
1231 -------------------------------------------------------------------------------*/
1232eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001233
1234/*--------------------------------------------------------------------------
1235 \fn sme_SetConfigPowerSave
1236 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1237 For BMPS related configuration, this function also updates the CFG
1238 and sends a message to FW to pick up the new values. Note: Calling
1239 this function only updates the configuration and does not enable
1240 the specified power save mode.
1241 \param hHal - The handle returned by macOpen.
1242 \param psMode - Power Saving mode being modified
1243 \param pConfigParams - a pointer to a caller allocated object of type
1244 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1245 \return eHalStatus
1246 --------------------------------------------------------------------------*/
1247eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1248 void *pConfigParams);
1249
1250/*--------------------------------------------------------------------------
1251 \fn sme_GetConfigPowerSave
1252 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1253 \param hHal - The handle returned by macOpen.
1254 \param psMode - Power Saving mode
1255 \param pConfigParams - a pointer to a caller allocated object of type
1256 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1257 \return eHalStatus
1258 --------------------------------------------------------------------------*/
1259eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1260 void *pConfigParams);
1261
1262/* ---------------------------------------------------------------------------
1263 \fn sme_SignalPowerEvent
1264 \brief Signals to PMC that a power event has occurred. Used for putting
1265 the chip into deep sleep mode.
1266 \param hHal - The handle returned by macOpen.
1267 \param event - the event that has occurred
1268 \return eHalStatus
1269 ---------------------------------------------------------------------------*/
1270extern eHalStatus sme_SignalPowerEvent (
1271 tHalHandle hHal,
1272 tPmcPowerEvent event);
1273
1274/* ---------------------------------------------------------------------------
1275 \fn sme_EnablePowerSave
1276 \brief Enables one of the power saving modes. This API does not cause a
1277 device state change. This is purely a configuration API.
1278 \param hHal - The handle returned by macOpen.
1279 \param psMode - The power saving mode to enable.
1280 \return eHalStatus
1281 ---------------------------------------------------------------------------*/
1282extern eHalStatus sme_EnablePowerSave (
1283 tHalHandle hHal,
1284 tPmcPowerSavingMode psMode);
1285
1286/* ---------------------------------------------------------------------------
1287 \fn sme_DisablePowerSave
1288 \brief Disables one of the power saving modes.Disabling does not imply
1289 that device will be brought out of the current PS mode. This is
1290 purely a configuration API.
1291 \param hHal - The handle returned by macOpen.
1292 \param psMode - The power saving mode to disable.
1293 \return eHalStatus
1294 ---------------------------------------------------------------------------*/
1295extern eHalStatus sme_DisablePowerSave (
1296 tHalHandle hHal,
1297 tPmcPowerSavingMode psMode);
1298
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301299 /* ---------------------------------------------------------------------------
1300 \fn sme_SetHostPowerSave
1301 \brief The BMPS logic is controlled by the User level Apps
1302 \param hHal - The handle returned by macOpen.
1303 \param psMode - The power saving mode to enable.
1304 \return eHalStatus
1305 ---------------------------------------------------------------------------*/
1306extern eHalStatus sme_SetHostPowerSave (
1307 tHalHandle hHal,
1308 v_BOOL_t psMode);
1309
Jeff Johnson295189b2012-06-20 16:38:30 -07001310/* ---------------------------------------------------------------------------
1311 \fn sme_StartAutoBmpsTimer
1312 \brief Starts a timer that periodically polls all the registered
1313 module for entry into Bmps mode. This timer is started only if BMPS is
1314 enabled and whenever the device is in full power.
1315 \param hHal - The handle returned by macOpen.
1316 \return eHalStatus
1317 ---------------------------------------------------------------------------*/
1318extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1319
1320/* ---------------------------------------------------------------------------
1321 \fn sme_StopAutoBmpsTimer
1322 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1323 Stopping the timer does not cause a device state change. Only the timer
1324 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1325 \param hHal - The handle returned by macOpen.
1326 \return eHalStatus
1327 ---------------------------------------------------------------------------*/
1328extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1329
1330/* ---------------------------------------------------------------------------
1331 \fn sme_QueryPowerState
1332 \brief Returns the current power state of the device.
1333 \param hHal - The handle returned by macOpen.
1334 \param pPowerState - pointer to location to return power state
1335 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1336 \return eHalStatus
1337 ---------------------------------------------------------------------------*/
1338extern eHalStatus sme_QueryPowerState (
1339 tHalHandle hHal,
1340 tPmcPowerState *pPowerState,
1341 tPmcSwitchState *pSwWlanSwitchState);
1342
1343/* ---------------------------------------------------------------------------
1344 \fn sme_IsPowerSaveEnabled
1345 \brief Checks if the device is able to enter a particular power save mode
1346 This does not imply that the device is in a particular PS mode
1347 \param hHal - The handle returned by macOpen.
1348 \param psMode - the power saving mode
1349 \return eHalStatus
1350 ---------------------------------------------------------------------------*/
1351extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1352 tHalHandle hHal,
1353 tPmcPowerSavingMode psMode);
1354
1355/* ---------------------------------------------------------------------------
1356 \fn sme_RequestFullPower
1357 \brief Request that the device be brought to full power state.
1358 Note 1: If "fullPowerReason" specificied in this API is set to
1359 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1360 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1361 HDD is requesting full power, we need to undo any previous HDD requests for
1362 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1363 specified anything other than above, the buffered requests for BMPS and WoWL
1364 will not be cleared.
1365 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1366 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1367 request".
1368 Note 3: When the device finally enters Full Power PMC will start a timer
1369 if any of the following holds true:
1370 - Auto BMPS mode is enabled
1371 - Uapsd request is pending
1372 - HDD's request for BMPS is pending
1373 - HDD's request for WoWL is pending
1374 On timer expiry PMC will attempt to put the device in BMPS mode if following
1375 (in addition to those listed above) holds true:
1376 - Polling of all modules through the Power Save Check routine passes
1377 - STA is associated to an access point
1378 \param hHal - The handle returned by macOpen.
1379 \param - callbackRoutine Callback routine invoked in case of success/failure
1380 \param - callbackContext - Cookie to be passed back during callback
1381 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1382 distinguish between BAP and HDD requests
1383 \return eHalStatus - status
1384 eHAL_STATUS_SUCCESS - device brought to full power state
1385 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1386 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1387 ---------------------------------------------------------------------------*/
1388extern eHalStatus sme_RequestFullPower (
1389 tHalHandle hHal,
1390 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1391 void *callbackContext,
1392 tRequestFullPowerReason fullPowerReason);
1393
1394/* ---------------------------------------------------------------------------
1395 \fn sme_RequestBmps
1396 \brief Request that the device be put in BMPS state. Request will be
1397 accepted only if BMPS mode is enabled and power save check routine
1398 passes. Only HDD should invoke this API.
1399 \param hHal - The handle returned by macOpen.
1400 \param - callbackRoutine Callback routine invoked in case of success/failure
1401 \param - callbackContext - Cookie to be passed back during callback
1402 \return eHalStatus
1403 eHAL_STATUS_SUCCESS - device is in BMPS state
1404 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1405 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1406 ---------------------------------------------------------------------------*/
1407extern eHalStatus sme_RequestBmps (
1408 tHalHandle hHal,
1409 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1410 void *callbackContext);
1411
1412/* ---------------------------------------------------------------------------
1413 \fn sme_SetDHCPTillPowerActiveFlag
1414 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1415 entry by PMC
1416 \param hHal - The handle returned by macOpen.
1417 ---------------------------------------------------------------------------*/
1418void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1419
1420
1421/* ---------------------------------------------------------------------------
1422 \fn sme_StartUapsd
1423 \brief Request that the device be put in UAPSD state. If the device is in
1424 Full Power it will be put in BMPS mode first and then into UAPSD
1425 mode.
1426 \param hHal - The handle returned by macOpen.
1427 \param - callbackRoutine Callback routine invoked in case of success/failure
1428 \param - callbackContext - Cookie to be passed back during callback
1429 eHAL_STATUS_SUCCESS - device is in UAPSD state
1430 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1431 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1432 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1433 \return eHalStatus
1434 ---------------------------------------------------------------------------*/
1435extern eHalStatus sme_StartUapsd (
1436 tHalHandle hHal,
1437 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1438 void *callbackContext);
1439
1440/* ---------------------------------------------------------------------------
1441 \fn sme_StopUapsd
1442 \brief Request that the device be put out of UAPSD state. Device will be
1443 put in in BMPS state after stop UAPSD completes. Buffered requests for
1444 UAPSD will be cleared after this.
1445 \param hHal - The handle returned by macOpen.
1446 \return eHalStatus
1447 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1448 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1449 ---------------------------------------------------------------------------*/
1450extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1451
1452/* ---------------------------------------------------------------------------
1453 \fn sme_RequestStandby
1454 \brief Request that the device be put in standby. It is HDD's responsibility
1455 to bring the chip to full power and do a discconnect before calling
1456 this API. Request for standby will be rejected if STA is associated
1457 to an AP.
1458 \param hHal - The handle returned by macOpen.
1459 \param - callbackRoutine Callback routine invoked in case of success/failure
1460 \param - callbackContext - Cookie to be passed back during callback
1461 \return eHalStatus
1462 eHAL_STATUS_SUCCESS - device is in Standby mode
1463 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1464 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1465 ---------------------------------------------------------------------------*/
1466extern eHalStatus sme_RequestStandby (
1467 tHalHandle hHal,
1468 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1469 void *callbackContext);
1470
1471/* ---------------------------------------------------------------------------
1472 \fn sme_RegisterPowerSaveCheck
1473 \brief Register a power save check routine that is called whenever
1474 the device is about to enter one of the power save modes.
1475 \param hHal - The handle returned by macOpen.
1476 \param checkRoutine - Power save check routine to be registered
1477 \param callbackContext - Cookie to be passed back during callback
1478 \return eHalStatus
1479 eHAL_STATUS_SUCCESS - successfully registered
1480 eHAL_STATUS_FAILURE - not successfully registered
1481 ---------------------------------------------------------------------------*/
1482extern eHalStatus sme_RegisterPowerSaveCheck (
1483 tHalHandle hHal,
1484 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1485
1486/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301487 \fn sme_Register11dScanDoneCallback
1488 \brief Register a routine of type csrScanCompleteCallback which is
1489 called whenever an 11d scan is done
1490 \param hHal - The handle returned by macOpen.
1491 \param callback - 11d scan complete routine to be registered
1492 \return eHalStatus
1493 ---------------------------------------------------------------------------*/
1494extern eHalStatus sme_Register11dScanDoneCallback (
1495 tHalHandle hHal,
1496 csrScanCompleteCallback);
1497
1498/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001499 \fn sme_DeregisterPowerSaveCheck
1500 \brief Deregister a power save check routine
1501 \param hHal - The handle returned by macOpen.
1502 \param checkRoutine - Power save check routine to be deregistered
1503 \return eHalStatus
1504 eHAL_STATUS_SUCCESS - successfully deregistered
1505 eHAL_STATUS_FAILURE - not successfully deregistered
1506 ---------------------------------------------------------------------------*/
1507extern eHalStatus sme_DeregisterPowerSaveCheck (
1508 tHalHandle hHal,
1509 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1510
1511/* ---------------------------------------------------------------------------
1512 \fn sme_RegisterDeviceStateUpdateInd
1513 \brief Register a callback routine that is called whenever
1514 the device enters a new device state (Full Power, BMPS, UAPSD)
1515 \param hHal - The handle returned by macOpen.
1516 \param callbackRoutine - Callback routine to be registered
1517 \param callbackContext - Cookie to be passed back during callback
1518 \return eHalStatus
1519 eHAL_STATUS_SUCCESS - successfully registered
1520 eHAL_STATUS_FAILURE - not successfully registered
1521 ---------------------------------------------------------------------------*/
1522extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1523 tHalHandle hHal,
1524 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1525 void *callbackContext);
1526
1527/* ---------------------------------------------------------------------------
1528 \fn sme_DeregisterDeviceStateUpdateInd
1529 \brief Deregister a routine that was registered for device state changes
1530 \param hHal - The handle returned by macOpen.
1531 \param callbackRoutine - Callback routine to be deregistered
1532 \return eHalStatus
1533 eHAL_STATUS_SUCCESS - successfully deregistered
1534 eHAL_STATUS_FAILURE - not successfully deregistered
1535 ---------------------------------------------------------------------------*/
1536extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1537 tHalHandle hHal,
1538 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1539
1540/* ---------------------------------------------------------------------------
1541 \fn sme_WowlAddBcastPattern
1542 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1543 do a pattern match on these patterns when Wowl is enabled during BMPS
1544 mode.
1545 \param hHal - The handle returned by macOpen.
1546 \param pattern - Pattern to be added
1547 \return eHalStatus
1548 eHAL_STATUS_FAILURE Cannot add pattern
1549 eHAL_STATUS_SUCCESS Request accepted.
1550 ---------------------------------------------------------------------------*/
1551extern eHalStatus sme_WowlAddBcastPattern (
1552 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001553 tpSirWowlAddBcastPtrn pattern,
1554 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001555
1556/* ---------------------------------------------------------------------------
1557 \fn sme_WowlDelBcastPattern
1558 \brief Delete a pattern that was added for Pattern Byte Matching.
1559 \param hHal - The handle returned by macOpen.
1560 \param pattern - Pattern to be deleted
1561 \return eHalStatus
1562 eHAL_STATUS_FAILURE Cannot delete pattern
1563 eHAL_STATUS_SUCCESS Request accepted.
1564 ---------------------------------------------------------------------------*/
1565extern eHalStatus sme_WowlDelBcastPattern (
1566 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001567 tpSirWowlDelBcastPtrn pattern,
1568 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001569
1570/* ---------------------------------------------------------------------------
1571 \fn sme_EnterWowl
1572 \brief This is the API to request entry into WOWL mode.
1573 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1574 SME will will cache the information that WOWL has been requested and
1575 attempt to put the device in BMPS first. On entry into BMPS, SME will
1576 enter the WOWL mode.
1577 Note 1: After WoWL request is accepted, If module other than HDD requests
1578 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1579 and attempt to put the chip into BMPS+WOWL based on a timer.
1580 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1581 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1582 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1583 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1584 are required. Currently there is no requirement or use case to support UAPSD
1585 and WOWL at the same time.
1586 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1587 Note 5. Request for WoWL is rejected if BMPS is disabled.
1588
1589 \param hHal - The handle returned by macOpen.
1590 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1591 Used for success/failure notification by SME
1592 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1593 at the time of callback.
1594 \param wakeReasonIndCB - Callback routine provided by HDD.
1595 Used for Wake Reason Indication by SME
1596 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1597 at the time of callback.
1598 \return eHalStatus
1599 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1600 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1601 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1602 mode is entered.
1603 ---------------------------------------------------------------------------*/
1604extern eHalStatus sme_EnterWowl (
1605 tHalHandle hHal,
1606 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1607 void *enterWowlCallbackContext,
1608#ifdef WLAN_WAKEUP_EVENTS
1609 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1610 void *wakeReasonIndCBContext,
1611#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001612 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001613
1614/* ---------------------------------------------------------------------------
1615 \fn sme_ExitWowl
1616 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1617 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1618 mode. Any Buffered request for WoWL will be cleared after this API.
1619 \param hHal - The handle returned by macOpen.
1620 \return eHalStatus
1621 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1622 only if the previous "Enter WOWL" transaction has
1623 not even completed.
1624 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1625 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301626extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001627
1628/* ---------------------------------------------------------------------------
1629
1630 \fn sme_RoamSetKey
1631
1632 \brief To set encryption key. This function should be called only when connected
1633 This is an asynchronous API.
1634
1635 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1636
1637 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1638
1639 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1640
1641 FAILURE or RESOURCES The API finished and failed.
1642
1643 -------------------------------------------------------------------------------*/
1644eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1645
1646/* ---------------------------------------------------------------------------
1647
1648 \fn sme_RoamRemoveKey
1649
1650 \brief To set encryption key. This is an asynchronous API.
1651
1652 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1653
1654 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1655
1656 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1657
1658 FAILURE or RESOURCES The API finished and failed.
1659
1660 -------------------------------------------------------------------------------*/
1661eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1662
1663
1664/* ---------------------------------------------------------------------------
1665
1666 \fn sme_GetCountryCode
1667
1668 \brief To return the current country code. If no country code is applied, default country code is
1669 used to fill the buffer.
1670 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1671 This is a synchronous API.
1672
1673 \param pBuf - pointer to a caller allocated buffer for returned country code.
1674
1675 \param pbLen For input, this parameter indicates how big is the buffer.
1676 Upon return, this parameter has the number of bytes for country. If pBuf
1677 doesn't have enough space, this function returns
1678 fail status and this parameter contains the number that is needed.
1679
1680 \return eHalStatus SUCCESS.
1681
1682 FAILURE or RESOURCES The API finished and failed.
1683
1684 -------------------------------------------------------------------------------*/
1685eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1686
1687/* ---------------------------------------------------------------------------
1688
1689 \fn sme_SetCountryCode
1690
1691 \brief To change the current/default country code.
1692 If 11d supported is turned off, an error is return.
1693 This is a synchronous API.
1694
1695 \param pCountry - pointer to a caller allocated buffer for the country code.
1696
1697 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1698 whether a reset is required.
1699
1700 \return eHalStatus SUCCESS.
1701
1702 FAILURE or RESOURCES The API finished and failed.
1703
1704 -------------------------------------------------------------------------------*/
1705eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1706
1707/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301708
1709 \fn sme_InitChannels
1710
1711 \brief Used to initialize CSR channel lists while driver loading
1712
1713 \param hHal - global pMac structure
1714
1715 \return eHalStatus SUCCESS.
1716
1717 FAILURE or RESOURCES The API finished and failed.
1718
1719 -------------------------------------------------------------------------------*/
1720eHalStatus sme_InitChannels(tHalHandle hHal);
1721
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301722
Mihir Shete04206452014-11-20 17:50:58 +05301723#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301724/* ---------------------------------------------------------------------------
1725 \fn sme_InitChannelsForCC
1726
1727 \brief Used to issue regulatory hint to user
1728
1729 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301730 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301731
1732 \return eHalStatus SUCCESS.
1733
1734 FAILURE or RESOURCES The API finished and failed.
1735
1736 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301737eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301738#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301739
Mihir Shetee1093ba2014-01-21 20:13:32 +05301740/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001741 \fn sme_ResetCountryCodeInformation
1742 \brief this function is to reset the country code current being used back to EEPROM default
1743 this includes channel list and power setting. This is a synchronous API.
1744 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1745 a restart is needed to apply the change
1746 \return eHalStatus
1747 -------------------------------------------------------------------------------*/
1748eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1749
1750/* ---------------------------------------------------------------------------
1751 \fn sme_GetSupportedCountryCode
1752 \brief this function is to get a list of the country code current being supported
1753 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1754 this has the country code list. 3 bytes for each country code. This may be NULL if
1755 caller wants to know the needed byte count.
1756 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1757 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1758 \return eHalStatus
1759 -------------------------------------------------------------------------------*/
1760eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1761
1762/* ---------------------------------------------------------------------------
1763 \fn sme_GetCurrentRegulatoryDomain
1764 \brief this function is to get the current regulatory domain. This is a synchronous API.
1765 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1766 SME. The function fails if 11d support is turned off.
1767 \param pDomain - Caller allocated buffer to return the current domain.
1768 \return eHalStatus SUCCESS.
1769
1770 FAILURE or RESOURCES The API finished and failed.
1771 -------------------------------------------------------------------------------*/
1772eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1773
1774/* ---------------------------------------------------------------------------
1775 \fn sme_SetRegulatoryDomain
1776 \brief this function is to set the current regulatory domain.
1777 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1778 SME. This is a synchronous API.
1779 \param domainId - indicate the domain (defined in the driver) needs to set to.
1780 See v_REGDOMAIN_t for definition
1781 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1782 a restart is needed to apply the change
1783 \return eHalStatus
1784 -------------------------------------------------------------------------------*/
1785eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1786
1787/* ---------------------------------------------------------------------------
1788
1789 \fn sme_GetRegulatoryDomainForCountry
1790
1791 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1792
1793 \param pCountry - pointer to a caller allocated buffer for input country code.
1794
1795 \param pDomainId Upon successful return, it is the domain that country belongs to.
1796 If it is NULL, returning success means that the country code is known.
1797
1798 \return eHalStatus SUCCESS.
1799
1800 FAILURE or RESOURCES The API finished and failed.
1801
1802 -------------------------------------------------------------------------------*/
1803eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1804
1805
1806
1807/* ---------------------------------------------------------------------------
1808
1809 \fn sme_GetSupportedRegulatoryDomains
1810
1811 \brief To return a list of supported regulatory domains. This is a synchronous API.
1812
1813 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1814
1815 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1816 Upon return, this parameter has the number for supported domains. If pDomains
1817 doesn't have enough space for all the supported domains, this function returns
1818 fail status and this parameter contains the number that is needed.
1819
1820 \return eHalStatus SUCCESS.
1821
1822 FAILURE or RESOURCES The API finished and failed.
1823
1824 -------------------------------------------------------------------------------*/
1825eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1826
1827//some support functions
1828tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1829tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1830tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1831//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1832eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1833
1834typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1835/* ---------------------------------------------------------------------------
1836
1837 \fn sme_ChangeCountryCode
1838
1839 \brief Change Country code from upperlayer during WLAN driver operation.
1840 This is a synchronous API.
1841
1842 \param hHal - The handle returned by macOpen.
1843
1844 \param pCountry New Country Code String
1845
Abhishek Singha306a442013-11-07 18:39:01 +05301846 \param sendRegHint If we want to send reg hint to nl80211
1847
Jeff Johnson295189b2012-06-20 16:38:30 -07001848 \return eHalStatus SUCCESS.
1849
1850 FAILURE or RESOURCES The API finished and failed.
1851
1852 -------------------------------------------------------------------------------*/
1853eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1854 tSmeChangeCountryCallback callback,
1855 tANI_U8 *pCountry,
1856 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301857 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301858 tAniBool countryFromUserSpace,
1859 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001860
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301861/* ---------------------------------------------------------------------------
1862
Amar Singhal0d15bd52013-10-12 23:13:13 -07001863 \fn sme_GenericChangeCountryCode
1864
1865 \brief Generic API to change country code
1866
1867 \param hHal - The handle returned by macOpen.
1868
1869 \param pCountry New Country Code String
1870
1871 \param reg_domain Regulatory domain for the new country code
1872
1873 \return eHalStatus SUCCESS.
1874
1875 FAILURE or RESOURCES The API finished and failed.
1876
1877 -------------------------------------------------------------------------------*/
1878eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1879 tANI_U8 *pCountry,
1880 v_REGDOMAIN_t reg_domain);
1881
Abhishek Singh00b71972016-01-07 10:51:04 +05301882#ifdef WLAN_FEATURE_RMC
1883/* ---------------------------------------------------------------------------
1884
1885 \fn sme_TXFailMonitorStartStopInd
1886
1887 \brief Indicate FW about TX Fail Monitor Indication`
1888
1889 \param hHal - The handle returned by macOpen.
1890
1891 \param tx_fail_count number of failures after which the firmware sends
1892 an indication to host
1893
1894 \param txFailIndCallback function to be called after receiving TX Fail
1895 indication
1896 \return eHalStatus SUCCESS.
1897
1898 FAILURE or RESOURCES The API finished and failed.
1899
1900 -------------------------------------------------------------------------------*/
1901eHalStatus sme_TXFailMonitorStartStopInd(tHalHandle hHal,
1902 tANI_U8 tx_fail_count,
1903 void * txFailIndCallback);
1904#endif /* WLAN_FEATURE_RMC */
1905
Kapil Gupta04ab1992016-06-26 13:36:51 +05301906#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1907VOS_STATUS sme_set_per_roam_rxconfig (tHalHandle hHal, v_U8_t sessionId,
1908 v_U16_t minRate, v_U16_t maxRate, v_U8_t minPercentage,
1909 v_U16_t minPktRequired, v_U64_t waitPeriodForNextPERScan);
1910
1911VOS_STATUS sme_unset_per_roam_rxconfig (tHalHandle hHal);
1912
1913void sme_PERRoamScanStartStop(void *hHal, tANI_U8 start);
1914#endif
1915
Amar Singhal0d15bd52013-10-12 23:13:13 -07001916/* ---------------------------------------------------------------------------
1917
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301918 \fn sme_DHCPStartInd
1919
1920 \brief Indicate FW about DHCP start event.
1921
1922 \param hHal - The handle returned by macOpen.
1923
1924 \param device_mode the mode of the device
1925
c_hpothu0b0cab72014-02-13 21:52:40 +05301926 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301927
1928 \return eHalStatus SUCCESS.
1929
1930 FAILURE or RESOURCES The API finished and failed.
1931
1932 -------------------------------------------------------------------------------*/
1933
1934eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1935 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301936 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301937
1938/* ---------------------------------------------------------------------------
1939
1940 \fn sme_DHCPStopInd
1941
1942 \brief Indicate FW about DHCP stop event.
1943
1944 \param hHal - The handle returned by macOpen.
1945
1946 \param device_mode the mode of the device
1947
c_hpothu0b0cab72014-02-13 21:52:40 +05301948 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301949
1950 \return eHalStatus SUCCESS.
1951
1952 FAILURE or RESOURCES The API finished and failed.
1953
1954 -------------------------------------------------------------------------------*/
1955eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1956 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301957 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301958
Jeff Johnson295189b2012-06-20 16:38:30 -07001959
1960/* ---------------------------------------------------------------------------
1961 \fn sme_BtcSignalBtEvent
1962 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1963 BT event type and the current operating mode of Libra (full power,
1964 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1965 would be employed.
1966 \param hHal - The handle returned by macOpen.
1967 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1968 Caller owns the memory and is responsible for freeing it.
1969 \return VOS_STATUS
1970 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1971 if driver has not yet been initialized or if BTC
1972 Events Layer has been disabled.
1973 VOS_STATUS_SUCCESS BT Event passed to HAL
1974 ---------------------------------------------------------------------------*/
1975VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1976
1977/* ---------------------------------------------------------------------------
1978 \fn sme_BtcSetConfig
1979 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1980 This function should be invoked only after CFG download has completed.
1981 Calling it after sme_HDDReadyInd is recommended.
1982 \param hHal - The handle returned by macOpen.
1983 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1984 tSmeBtcConfig. Caller owns the memory and is responsible
1985 for freeing it.
1986 \return VOS_STATUS
1987 VOS_STATUS_E_FAILURE Config not passed to HAL.
1988 VOS_STATUS_SUCCESS Config passed to HAL
1989 ---------------------------------------------------------------------------*/
1990VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1991
1992/* ---------------------------------------------------------------------------
1993 \fn sme_BtcGetConfig
1994 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1995 \param hHal - The handle returned by macOpen.
1996 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1997 Caller owns the memory and is responsible for freeing it.
1998 \return VOS_STATUS
1999 VOS_STATUS_E_FAILURE - failure
2000 VOS_STATUS_SUCCESS success
2001 ---------------------------------------------------------------------------*/
2002VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
2003
2004/* ---------------------------------------------------------------------------
2005 \fn sme_SetCfgPrivacy
2006 \brief API to set configure privacy parameters
2007 \param hHal - The handle returned by macOpen.
2008 \param pProfile - Pointer CSR Roam profile.
2009 \param fPrivacy - This parameter indicates status of privacy
2010
2011 \return void
2012 ---------------------------------------------------------------------------*/
2013void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
2014
2015#if defined WLAN_FEATURE_VOWIFI
2016/* ---------------------------------------------------------------------------
2017 \fn sme_NeighborReportRequest
2018 \brief API to request neighbor report.
2019 \param hHal - The handle returned by macOpen.
2020 \param pRrmNeighborReq - Pointer to a caller allocated object of type
2021 tRrmNeighborReq. Caller owns the memory and is responsible
2022 for freeing it.
2023 \return VOS_STATUS
2024 VOS_STATUS_E_FAILURE - failure
2025 VOS_STATUS_SUCCESS success
2026 ---------------------------------------------------------------------------*/
2027VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
2028 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
2029#endif
2030
2031//The following are debug APIs to support direct read/write register/memory
2032//They are placed in SME because HW cannot be access when in LOW_POWER state
2033//AND not connected. The knowledge and synchronization is done in SME
2034
2035//sme_DbgReadRegister
2036//Caller needs to validate the input values
2037VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
2038
2039//sme_DbgWriteRegister
2040//Caller needs to validate the input values
2041VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
2042
2043//sme_DbgReadMemory
2044//Caller needs to validate the input values
2045//pBuf caller allocated buffer has the length of nLen
2046VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2047
2048//sme_DbgWriteMemory
2049//Caller needs to validate the input values
2050VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
2051
Jeff Johnson295189b2012-06-20 16:38:30 -07002052VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
2053 tSirVersionType *pVersion);
2054VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
2055 tSirVersionType *pVersion);
2056VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
2057 tANI_U8 *pVersion,
2058 tANI_U32 versionBufferSize);
2059VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
2060 tANI_U8 *pVersion,
2061 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07002062eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
2063 csrRoamCompleteCallback callback,
2064 void *pContext);
2065
2066#ifdef FEATURE_WLAN_WAPI
2067/* ---------------------------------------------------------------------------
2068 \fn sme_RoamSetBKIDCache
2069 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
2070 candidate list.
2071 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2072 it is opened (by calling halOpen).
2073 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
2074 \param numItems - a variable that has the number of tBkidCacheInfo allocated
2075 when retruning, this is the number of items put into pBKIDCache
2076 \return eHalStatus - when fail, it usually means the buffer allocated is not
2077 big enough and pNumItems has the number of tBkidCacheInfo.
2078 ---------------------------------------------------------------------------*/
2079eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
2080 tANI_U32 numItems );
2081
2082/* ---------------------------------------------------------------------------
2083 \fn sme_RoamGetBKIDCache
2084 \brief The SME API exposed to HDD to allow HDD to request SME to return its
2085 BKID cache.
2086 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2087 it is opened (by calling halOpen).
2088 \param pNum - caller allocated memory that has the space of the number of
2089 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
2090 in SME cache.
2091 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
2092 upon return
2093 \return eHalStatus - when fail, it usually means the buffer allocated is not
2094 big enough.
2095 ---------------------------------------------------------------------------*/
2096eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
2097 tBkidCacheInfo *pBkidCache);
2098
2099/* ---------------------------------------------------------------------------
2100 \fn sme_RoamGetNumBKIDCache
2101 \brief The SME API exposed to HDD to allow HDD to request SME to return the
2102 number of BKID cache entries.
2103 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
2104 it is opened (by calling halOpen).
2105 \return tANI_U32 - the number of BKID cache entries.
2106 ---------------------------------------------------------------------------*/
2107tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
2108
2109/* ---------------------------------------------------------------------------
2110 \fn sme_ScanGetBKIDCandidateList
2111 \brief a wrapper function to return the BKID candidate list
2112 \param pBkidList - caller allocated buffer point to an array of
2113 tBkidCandidateInfo
2114 \param pNumItems - pointer to a variable that has the number of
2115 tBkidCandidateInfo allocated when retruning, this is
2116 either the number needed or number of items put into
2117 pPmkidList
2118 \return eHalStatus - when fail, it usually means the buffer allocated is not
2119 big enough and pNumItems
2120 has the number of tBkidCandidateInfo.
2121 \Note: pNumItems is a number of tBkidCandidateInfo,
2122 not sizeof(tBkidCandidateInfo) * something
2123 ---------------------------------------------------------------------------*/
2124eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
2125 tBkidCandidateInfo *pBkidList,
2126 tANI_U32 *pNumItems );
2127#endif /* FEATURE_WLAN_WAPI */
2128
Jeff Johnsone7245742012-09-05 17:12:55 -07002129#ifdef FEATURE_OEM_DATA_SUPPORT
2130/********************************************************************************************
2131 Oem data related modifications
2132*********************************************************************************************/
2133/* ---------------------------------------------------------------------------
2134 \fn sme_OemDataReq
2135 \param sessionId - session id of session to be used for oem data req.
2136 \param pOemDataReqID - pointer to an object to get back the request ID
2137 \param callback - a callback function that is called upon finish
2138 \param pContext - a pointer passed in for the callback
2139 \return eHalStatus
2140 ---------------------------------------------------------------------------*/
2141eHalStatus sme_OemDataReq(tHalHandle hHal,
2142 tANI_U8 sessionId,
2143 tOemDataReqConfig *,
2144 tANI_U32 *pOemDataReqID,
2145 oemData_OemDataReqCompleteCallback callback,
2146 void *pContext);
2147
2148/* ---------------------------------------------------------------------------
2149 \fn sme_getOemDataRsp
2150 \param pOemDataRsp - A pointer to the response object
2151 \param pOemDataReqID - pointer to an object to get back the request ID
2152 \return eHalStatus
2153 ---------------------------------------------------------------------------*/
2154eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2155 tOemDataRsp **pOemDataRsp);
2156
Padma, Santhosh Kumar2ccac212015-10-20 17:27:27 +05302157/* ---------------------------------------------------------------------------
2158 \fn sme_OemDataReqNew
2159 \brief a wrapper function for OEM DATA REQ NEW
2160 \param pOemDataReqNewConfig - Data to be passed to FW
2161 ---------------------------------------------------------------------------*/
2162void sme_OemDataReqNew(tHalHandle hHal,
2163 tOemDataReqNewConfig *pOemDataReqNewConfig);
2164
Jeff Johnsone7245742012-09-05 17:12:55 -07002165#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002166
2167
Jeff Johnson295189b2012-06-20 16:38:30 -07002168
2169/* ---------------------------------------------------------------------------
2170
2171 \fn sme_RoamUpdateAPWPSIE
2172
2173 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2174 This is an asynchronous API.
2175
2176 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2177
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002178 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002179
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002180 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002181
2182 -------------------------------------------------------------------------------*/
2183
2184eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2185/* ---------------------------------------------------------------------------
2186
2187 \fn sme_RoamUpdateAPWPARSNIEs
2188
2189 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2190 This is an asynchronous API.
2191
2192 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2193
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002194 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002195
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002196 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002197
2198 -------------------------------------------------------------------------------*/
2199eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2200
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002201/* ---------------------------------------------------------------------------
2202
2203 sme_ChangeMCCBeaconInterval
2204
2205 \brief To update P2P-GO's beacon Interval.
2206
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002207 \return eHalStatus SUCCESS
2208 FAILURE or RESOURCES
2209 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002210 -------------------------------------------------------------------------------*/
2211eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2212
2213
Jeff Johnson295189b2012-06-20 16:38:30 -07002214
2215/* ---------------------------------------------------------------------------
2216 \fn sme_sendBTAmpEvent
2217 \brief API to send the btAMPstate to FW
2218 \param hHal - The handle returned by macOpen.
2219 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002220 \return eHalStatus SUCCESS
2221 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002222
2223--------------------------------------------------------------------------- */
2224
2225eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2226
2227
2228
2229/* ---------------------------------------------------------------------------
2230 \fn sme_SetHostOffload
2231 \brief API to set the host offload feature.
2232 \param hHal - The handle returned by macOpen.
2233 \param pRequest - Pointer to the offload request.
2234 \return eHalStatus
2235 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002236eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2237 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002238
2239/* ---------------------------------------------------------------------------
2240 \fn sme_SetKeepAlive
2241 \brief API to set the Keep Alive feature.
2242 \param hHal - The handle returned by macOpen.
2243 \param pRequest - Pointer to the Keep Alive request.
2244 \return eHalStatus
2245 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002246eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2247 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002248
Jeff Johnson295189b2012-06-20 16:38:30 -07002249/* ----------------------------------------------------------------------------
2250 \fn sme_GetOperationChannel
2251 \brief API to get current channel on which STA is parked
2252 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002253 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002254 \returns eHAL_STATUS_SUCCESS
2255 eHAL_STATUS_FAILURE
2256-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002257eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002258
Abhishek Singh7d624e12015-11-30 14:29:27 +05302259eHalStatus sme_register_mgmt_frame_ind_callback(tHalHandle hHal,
2260 sir_mgmt_frame_ind_callback callback);
2261
Jeff Johnson295189b2012-06-20 16:38:30 -07002262/* ---------------------------------------------------------------------------
2263
2264 \fn sme_RegisterMgtFrame
2265
2266 \brief To register managment frame of specified type and subtype.
2267 \param frameType - type of the frame that needs to be passed to HDD.
2268 \param matchData - data which needs to be matched before passing frame
2269 to HDD.
2270 \param matchDataLen - Length of matched data.
2271 \return eHalStatus
2272 -------------------------------------------------------------------------------*/
2273eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2274 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2275
2276/* ---------------------------------------------------------------------------
2277
2278 \fn sme_DeregisterMgtFrame
2279
2280 \brief To De-register managment frame of specified type and subtype.
2281 \param frameType - type of the frame that needs to be passed to HDD.
2282 \param matchData - data which needs to be matched before passing frame
2283 to HDD.
2284 \param matchDataLen - Length of matched data.
2285 \return eHalStatus
2286 -------------------------------------------------------------------------------*/
2287eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2288 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Siddharth Bhal64246172015-02-27 01:04:37 +05302289/* ---------------------------------------------------------------------------
2290 \fn sme_GetFramesLog
2291 \brief a wrapper function that client calls to register a callback to get
2292 mgmt frames logged
Siddharth Bhal64246172015-02-27 01:04:37 +05302293 \param flag - flag tells to clear OR send the frame log buffer
Siddharth Bhal64246172015-02-27 01:04:37 +05302294 \return eHalStatus
2295 ---------------------------------------------------------------------------*/
Abhishek Singh611295e2015-07-09 11:11:54 +05302296eHalStatus sme_GetFramesLog(tHalHandle hHal, tANI_U8 flag);
Jeff Johnson295189b2012-06-20 16:38:30 -07002297/* ---------------------------------------------------------------------------
2298
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302299 \fn sme_InitMgmtFrameLogging
2300
2301 \brief
2302 SME will pass this request to lower mac to initialize Frame Logging.
2303
2304 \param
2305
2306 hHal - The handle returned by macOpen.
2307
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302308 wlanFWLoggingInitParam - Params to initialize frame logging
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302309
2310 \return eHalStatus
2311--------------------------------------------------------------------------- */
2312eHalStatus sme_InitMgmtFrameLogging( tHalHandle hHal,
Siddharth Bhald1be97f2015-05-27 22:39:59 +05302313 tpSirFWLoggingInitParam wlanFWLoggingInitParam);
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302314
Pragaspathi Thilagarajd1b02df2018-06-26 17:08:05 +05302315/**
2316 * sme_unpack_rsn_ie: wrapper to unpack RSN IE and update def RSN params
2317 * if optional fields are not present.
2318 * @hal: handle returned by mac_open
2319 * @buf: rsn ie buffer pointer
2320 * @buf_len: rsn ie buffer length
2321 * @rsn_ie: outframe rsn ie structure
2322 * @append_ie: flag to indicate if the rsn_ie need to be appended from buf
2323 *
2324 * Return: parse status
2325 */
2326uint32_t sme_unpack_rsn_ie(tHalHandle hal, uint8_t *buf,
2327 uint8_t buf_len, tDot11fIERSN *rsn_ie);
Gupta, Kapil7c34b322015-09-30 13:12:35 +05302328
2329/* ---------------------------------------------------------------------------
2330
2331 \fn sme_StopRssiMonitoring
2332
2333 \brief
2334 SME will pass this request to lower mac to stop monitoring rssi range on
2335 a bssid.
2336
2337 \param
2338
2339 hHal - The handle returned by macOpen.
2340
2341 tSirRssiMonitorReq req- depict the monitor req params.
2342
2343 \return eHalStatus
2344
2345--------------------------------------------------------------------------- */
2346eHalStatus sme_StopRssiMonitoring(tHalHandle hHal,
2347 tSirRssiMonitorReq *req);
2348
2349/* ---------------------------------------------------------------------------
2350
2351 \fn sme_StartRssiMonitoring
2352
2353 \brief
2354 SME will pass this request to lower mac to start monitoring rssi range on
2355 a bssid.
2356
2357 \param
2358
2359 hHal - The handle returned by macOpen.
2360
2361 tSirRssiMonitorReq req- depict the monitor req params.
2362
2363 \return eHalStatus
2364
2365--------------------------------------------------------------------------- */
2366eHalStatus sme_StartRssiMonitoring(tHalHandle hHal,
2367 tSirRssiMonitorReq *req);
2368
2369
Siddharth Bhalb7c421c2015-02-27 00:26:09 +05302370/* ---------------------------------------------------------------------------
2371
Jeff Johnson295189b2012-06-20 16:38:30 -07002372 \fn sme_ConfigureRxpFilter
2373
2374 \brief
2375 SME will pass this request to lower mac to set/reset the filter on RXP for
2376 multicast & broadcast traffic.
2377
2378 \param
2379
2380 hHal - The handle returned by macOpen.
2381
2382 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2383 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2384 on this param. In future we can use this as a mask to set various types of
2385 filters as suggested below:
2386 FILTER_ALL_MULTICAST:
2387 FILTER_ALL_BROADCAST:
2388 FILTER_ALL_MULTICAST_BROADCAST:
2389
2390
2391 \return eHalStatus
2392
2393
2394--------------------------------------------------------------------------- */
2395eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2396 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2397
2398/* ---------------------------------------------------------------------------
2399
2400 \fn sme_ConfigureAppsCpuWakeupState
2401
2402 \brief
2403 SME will pass this request to lower mac to dynamically adjusts the listen
2404 interval based on the WLAN/MSM activity. This feature is named as
2405 Telescopic Beacon wakeup feature.
2406
2407 \param
2408
2409 hHal - The handle returned by macOpen.
2410
2411 isAppsAwake- Depicts the state of the Apps CPU
2412
2413
2414 \return eHalStatus
2415
2416
2417--------------------------------------------------------------------------- */
2418eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2419
Jeff Johnson295189b2012-06-20 16:38:30 -07002420/* ---------------------------------------------------------------------------
2421
2422 \fn sme_ConfigureSuspendInd
2423
2424 \brief
2425 SME will pass this request to lower mac to Indicate that the wlan needs to
2426 be suspended
2427
2428 \param
2429
2430 hHal - The handle returned by macOpen.
2431
2432 wlanSuspendParam- Depicts the wlan suspend params
2433
2434
2435 \return eHalStatus
2436
2437
2438--------------------------------------------------------------------------- */
2439eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2440 tpSirWlanSuspendParam wlanSuspendParam);
2441
2442/* ---------------------------------------------------------------------------
2443
2444 \fn sme_ConfigureResumeReq
2445
2446 \brief
2447 SME will pass this request to lower mac to Indicate that the wlan needs to
2448 be Resumed
2449
2450 \param
2451
2452 hHal - The handle returned by macOpen.
2453
2454 wlanResumeParam- Depicts the wlan resume params
2455
2456
2457 \return eHalStatus
2458
2459
2460--------------------------------------------------------------------------- */
2461eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2462 tpSirWlanResumeParam wlanResumeParam);
2463
Jeff Johnson295189b2012-06-20 16:38:30 -07002464
2465/* ---------------------------------------------------------------------------
2466
2467 \fn sme_GetInfraSessionId
2468
2469 \brief To get the session ID for infra session, if connected
2470 This is a synchronous API.
2471
2472 \param hHal - The handle returned by macOpen.
2473
2474 \return sessionid, -1 if infra session is not connected
2475
2476 -------------------------------------------------------------------------------*/
2477tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2478
2479/* ---------------------------------------------------------------------------
2480
2481 \fn sme_GetInfraOperationChannel
2482
2483 \brief To get the operating channel for infra session, if connected
2484 This is a synchronous API.
2485
2486 \param hHal - The handle returned by macOpen.
2487 \param sessionId - the sessionId returned by sme_OpenSession.
2488
2489 \return operating channel, 0 if infra session is not connected
2490
2491 -------------------------------------------------------------------------------*/
2492tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2493/* ---------------------------------------------------------------------------
2494
2495 \fn sme_GetConcurrentOperationChannel
2496
2497 \brief To get the operating channel for other concurrent sessions, if connected
2498 This is a synchronous API.
2499
2500 \param hHal - The handle returned by macOpen.
2501 \param currentPersona - persona that is trying to come up.
2502
2503 \return operating channel, 0 if infra session is not connected
2504
2505 -------------------------------------------------------------------------------*/
2506tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2507
2508/* ---------------------------------------------------------------------------
2509 \fn sme_AbortMacScan
2510 \brief API to cancel MAC scan.
2511 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302512 \param sessionId - sessionId for interface
c_hpothua3d45d52015-01-05 14:11:17 +05302513 \return tSirAbortScanStatus return status abort scan
2514
Jeff Johnson295189b2012-06-20 16:38:30 -07002515 ---------------------------------------------------------------------------*/
c_hpothua3d45d52015-01-05 14:11:17 +05302516tSirAbortScanStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2517 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002518
2519/* ---------------------------------------------------------------------------
2520 \fn sme_GetCfgValidChannels
2521 \brief API to get valid channel list
2522 \param hHal - The handle returned by macOpen.
2523 \param aValidChannels - Pointer to the valid channel list
2524 \param len - valid channel list length
2525 \return eHalStatus
2526 ---------------------------------------------------------------------------*/
2527eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2528
2529#ifdef FEATURE_WLAN_SCAN_PNO
2530
2531/* ---------------------------------------------------------------------------
2532 \fn sme_SetPreferredNetworkList
2533 \brief API to set the Preferred Network List Offload feature.
2534 \param hHal - The handle returned by macOpen.
2535 \param pRequest - Pointer to the offload request.
2536 \return eHalStatus
2537 ---------------------------------------------------------------------------*/
2538eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2539
2540/* ---------------------------------------------------------------------------
2541 \fn sme_SetRSSIFilter
2542 \brief API to set RSSI Filter feature.
2543 \param hHal - The handle returned by macOpen.
2544 \param pRequest - Pointer to the offload request.
2545 \return eHalStatus
2546 ---------------------------------------------------------------------------*/
2547eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2548
2549/******************************************************************************
2550*
2551* Name: sme_PreferredNetworkFoundInd
2552*
2553* Description:
2554* Invoke Preferred Network Found Indication
2555*
2556* Parameters:
2557* hHal - HAL handle for device
2558* pMsg - found network description
2559*
2560* Returns: eHalStatus
2561*
2562******************************************************************************/
2563eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2564#endif // FEATURE_WLAN_SCAN_PNO
2565
2566/* ---------------------------------------------------------------------------
2567 \fn sme_SetPowerParams
2568 \brief API to set Power Parameters
2569 \param hHal - The handle returned by macOpen.
2570 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002571 \param forced - if true, not to be dropped silently in host, it must reach
2572 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2573 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002574 \return eHalStatus
2575 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002576eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002577
2578/* ---------------------------------------------------------------------------
2579 \fn sme_SetTxPerTracking
2580 \brief Set Tx PER tracking configuration parameters
2581 \param hHal - The handle returned by macOpen.
2582 \param pTxPerTrackingParam - Tx PER configuration parameters
2583 \return eHalStatus
2584 ---------------------------------------------------------------------------*/
2585eHalStatus sme_SetTxPerTracking (
2586 tHalHandle hHal,
2587 void (*pCallbackfn) (void *pCallbackContext),
2588 void *pCallbackContext,
2589 tpSirTxPerTrackingParam pTxPerTrackingParam);
2590
2591#ifdef WLAN_FEATURE_PACKET_FILTERING
2592/* ---------------------------------------------------------------------------
2593 \fn sme_ReceiveFilterSetFilter
2594 \brief API to set 8023 Multicast Address List
2595 \param hHal - The handle returned by macOpen.
2596 \param pMulticastAddrs - Pointer to the Multicast Address List
2597 \return eHalStatus
2598 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002599eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002600
2601/* ---------------------------------------------------------------------------
2602 \fn sme_ReceiveFilterSetFilter
2603 \brief API to set Receive Packet Filter
2604 \param hHal - The handle returned by macOpen.
2605 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2606 \return eHalStatus
2607 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002608eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2609 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002610
2611/* ---------------------------------------------------------------------------
2612 \fn sme_GetFilterMatchCount
2613 \brief API to get D0 PC Filter Match Count
2614 \param hHal - The handle returned by macOpen
2615 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2616 \param callbackContext - Cookie to be passed back during callback
2617 \return eHalStatus
2618 ---------------------------------------------------------------------------*/
2619eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2620 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002621 void *callbackContext,
2622 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002623
2624/* ---------------------------------------------------------------------------
2625 \fn sme_ReceiveFilterClearFilter
2626 \brief API to clear Receive Packet Filter
2627 \param hHal - The handle returned by macOpen.
2628 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2629 \return eHalStatus
2630 ---------------------------------------------------------------------------*/
2631eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002632 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2633 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002634#endif // WLAN_FEATURE_PACKET_FILTERING
2635/* ---------------------------------------------------------------------------
2636
2637 \fn sme_IsChannelValid
2638 \brief To check if the channel is valid for currently established domain
2639 This is a synchronous API.
2640
2641 \param hHal - The handle returned by macOpen.
2642 \param channel - channel to verify
2643
2644 \return TRUE/FALSE, TRUE if channel is valid
2645
2646 -------------------------------------------------------------------------------*/
2647tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2648
2649/* ---------------------------------------------------------------------------
2650 \fn sme_SetFreqBand
2651 \brief Used to set frequency band.
2652 \param hHal
2653 \eBand band value to be configured
2654 \- return eHalStatus
2655 -------------------------------------------------------------------------*/
2656eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2657
2658/* ---------------------------------------------------------------------------
2659 \fn sme_GetFreqBand
2660 \brief Used to get the current band settings.
2661 \param hHal
2662 \pBand pointer to hold the current band value
2663 \- return eHalStatus
2664 -------------------------------------------------------------------------*/
2665eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2666
2667/* ---------------------------------------------------------------------------
2668
2669 \fn sme_SetTxPerTracking
2670 \brief Set Tx PER tracking configuration parameters
2671 \param hHal - The handle returned by macOpen.
2672 \param pTxPerTrackingParam - Tx PER configuration parameters
2673 \return eHalStatus
2674 ---------------------------------------------------------------------------*/
2675eHalStatus sme_SetTxPerTracking (
2676 tHalHandle hHal,
2677 void (*pCallbackfn) (void *pCallbackContext),
2678 void *pCallbackContext,
2679 tpSirTxPerTrackingParam pTxPerTrackingParam);
2680
2681#ifdef WLAN_FEATURE_GTK_OFFLOAD
2682/* ---------------------------------------------------------------------------
2683 \fn sme_SetGTKOffload
2684 \brief API to set GTK offload feature.
2685 \param hHal - The handle returned by macOpen.
2686 \param pRequest - Pointer to the GTK offload request.
2687 \return eHalStatus
2688 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002689eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002690
2691/* ---------------------------------------------------------------------------
2692 \fn sme_GetGTKOffload
2693 \brief API to get GTK offload information.
2694 \param hHal - The handle returned by macOpen.
2695 \param pRequest - Pointer to the GTK offload response.
2696 \return eHalStatus
2697 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002698eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2699 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002700#endif // WLAN_FEATURE_GTK_OFFLOAD
2701
2702#ifdef WLAN_WAKEUP_EVENTS
2703eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2704#endif // WLAN_WAKEUP_EVENTS
2705
2706/* ---------------------------------------------------------------------------
2707 \fn sme_SetTxPerTracking
2708 \brief Set Tx PER tracking configuration parameters
2709 \param hHal - The handle returned by macOpen.
2710 \param pTxPerTrackingParam - Tx PER configuration parameters
2711 \return eHalStatus
2712 ---------------------------------------------------------------------------*/
2713eHalStatus sme_SetTxPerTracking (
2714 tHalHandle hHal,
2715 void (*pCallbackfn) (void *pCallbackContext),
2716 void *pCallbackContext,
2717 tpSirTxPerTrackingParam pTxPerTrackingParam);
2718
2719
2720//return frequency for a particular channel
2721tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2722
2723tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2724
2725#if defined WLAN_FEATURE_P2P_INTERNAL
2726
2727eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2728
2729/* ---------------------------------------------------------------------------
2730 \fn sme_p2pFlushDeviceList
2731 \brief Remove cached P2P result from scan results
2732 \param hHal - The handle returned by macOpen.
2733 \param HDDSessionId - HDD's sessionId. Currently unused.
2734 \return eHalStatus
2735 ---------------------------------------------------------------------------*/
2736eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2737
2738eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2739 tCsrScanResultFilter *pFilter);
2740
2741#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2742
2743/* ---------------------------------------------------------------------------
2744 \fn sme_SetMaxTxPower
2745 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2746 setting will not persist over reboots
2747 \param hHal
2748 \param pBssid BSSID to set the power cap for
2749 \param pBssid pSelfMacAddress self MAC Address
2750 \param pBssid power to set in dB
2751 \- return eHalStatus
2752 -------------------------------------------------------------------------*/
2753eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2754 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2755
Padma, Santhosh Kumar98b5d252016-10-17 17:30:41 +05302756/**
2757 * sme_SetMaxTxPowerPerBand() - Set the Maximum Transmit Power
2758 * specific to band dynamically
2759 * @band: Band for which power needs to be applied
2760 * @dB: power to set in dB
2761 * @hal: HAL handle
2762 *
2763 * Set the maximum transmit power dynamically per band
2764 *
2765 * Return: eHalStatus
2766 */
2767eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t dB,
2768 tHalHandle hal);
Arif Hussaina5ebce02013-08-09 15:09:58 -07002769
2770/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002771
schang86c22c42013-03-13 18:41:24 -07002772 \fn sme_SetTxPower
2773
2774 \brief Set Transmit Power dynamically. Note: this setting will
2775 not persist over reboots.
2776
2777 \param hHal
2778 \param sessionId Target Session ID
2779 \param mW power to set in mW
2780 \- return eHalStatus
2781
2782 -------------------------------------------------------------------------------*/
2783eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2784
2785/* ---------------------------------------------------------------------------
2786
Jeff Johnson295189b2012-06-20 16:38:30 -07002787 \fn sme_HideSSID
2788
2789 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2790 not persist over reboots.
2791
2792 \param hHal
2793 \param sessionId
2794 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2795 \- return eHalStatus
2796
2797 -------------------------------------------------------------------------------*/
2798eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002799
2800/* ---------------------------------------------------------------------------
2801
2802 \fn sme_SetTmLevel
2803 \brief Set Thermal Mitigation Level to RIVA
2804 \param hHal - The handle returned by macOpen.
2805 \param newTMLevel - new Thermal Mitigation Level
2806 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002807 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002808 ---------------------------------------------------------------------------*/
2809eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2810
Rajeev Kumar Sirasanagandla4c068d42019-02-22 21:39:36 +05302811/**
2812 * sme_featureCapsExchange() - SME API to get firmware feature caps
2813 * @params: Pointer to hold HDD callback to be invoked for response
2814 * and associated user data.
2815 *
2816 * This function is used to exchange capabilities between Host and FW.
2817 *
2818 * Return: VOS_STATUS
2819 */
2820VOS_STATUS
2821sme_featureCapsExchange(struct sir_feature_caps_params *params);
Jeff Johnson295189b2012-06-20 16:38:30 -07002822
Jeff Johnsond13512a2012-07-17 11:42:19 -07002823/*---------------------------------------------------------------------------
2824
Yathish9f22e662012-12-10 14:21:35 -08002825 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2826 between in Host.
2827
2828 \param hHal - HAL handle for device
2829
2830 \return NONE
2831
2832---------------------------------------------------------------------------*/
2833void sme_disableFeatureCapablity(tANI_U8 feature_index);
2834
2835/*---------------------------------------------------------------------------
2836
Jeff Johnsond13512a2012-07-17 11:42:19 -07002837 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2838 country code
2839 Host and FW.
2840
2841 \param hHal - HAL handle for device
2842 \param pCountry - pointer to country code
2843
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002844 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002845
2846 ---------------------------------------------------------------------------*/
2847eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2848
2849/*---------------------------------------------------------------------------
2850
2851 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2852 country code.
2853
2854 \param hHal - HAL handle for device
2855 \param pCountry - pointer to country code
2856
2857 \return Success or failure
2858
2859 ---------------------------------------------------------------------------*/
2860eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2861
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002862/* ---------------------------------------------------------------------------
2863 \fn sme_transportDebug
2864 \brief Dynamically monitoring Transport channels
2865 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002866 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002867 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002868 \param toggleStallDetect Enable stall detect feature
2869 This feature will take effect to data performance
2870 Not integrate till fully verification
2871 \- return NONE
2872 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002873void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002874
Kiran4a17ebe2013-01-31 10:43:43 -08002875/* ---------------------------------------------------------------------------
2876 \fn sme_ResetPowerValuesFor5G
2877 \brief Reset the power values for 5G band with NV power values.
2878 \param hHal - HAL handle for device
2879 \- return NONE
2880 -------------------------------------------------------------------------*/
2881void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2882
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002883#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002884/* ---------------------------------------------------------------------------
2885 \fn sme_UpdateRoamPrefer5GHz
2886 \brief enable/disable Roam prefer 5G runtime option
2887 This function is called through dynamic setConfig callback function
2888 to configure the Roam prefer 5G runtime option
2889 \param hHal - HAL handle for device
2890 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2891 \- return Success or failure
2892 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002893eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002894
2895/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002896 \fn sme_setRoamIntraBand
2897 \brief enable/disable Intra band roaming
2898 This function is called through dynamic setConfig callback function
2899 to configure the intra band roaming
2900 \param hHal - HAL handle for device
2901 \param nRoamIntraBand Enable/Disable Intra band roaming
2902 \- return Success or failure
2903 -------------------------------------------------------------------------*/
2904eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2905
2906/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002907 \fn sme_UpdateRoamScanNProbes
2908 \brief function to update roam scan N probes
2909 This function is called through dynamic setConfig callback function
2910 to update roam scan N probes
2911 \param hHal - HAL handle for device
2912 \param nProbes number of probe requests to be sent out
2913 \- return Success or failure
2914 -------------------------------------------------------------------------*/
2915eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2916
2917/* ---------------------------------------------------------------------------
2918 \fn sme_UpdateRoamScanHomeAwayTime
2919 \brief function to update roam scan Home away time
2920 This function is called through dynamic setConfig callback function
2921 to update roam scan home away time
2922 \param hHal - HAL handle for device
2923 \param nRoamScanAwayTime Scan home away time
2924 \- return Success or failure
2925 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002926eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2927 const v_U16_t nRoamScanHomeAwayTime,
2928 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002929
2930/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002931 \fn sme_getRoamIntraBand
2932 \brief get Intra band roaming
2933 \param hHal - HAL handle for device
2934 \- return Success or failure
2935 -------------------------------------------------------------------------*/
2936v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2937
2938/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002939 \fn sme_getRoamScanNProbes
2940 \brief get N Probes
2941 \param hHal - HAL handle for device
2942 \- return Success or failure
2943 -------------------------------------------------------------------------*/
2944v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2945
2946/* ---------------------------------------------------------------------------
2947 \fn sme_getRoamScanHomeAwayTime
2948 \brief get Roam scan home away time
2949 \param hHal - HAL handle for device
2950 \- return Success or failure
2951 -------------------------------------------------------------------------*/
2952v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2953
2954/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002955 \fn sme_UpdateImmediateRoamRssiDiff
2956 \brief Update nImmediateRoamRssiDiff
2957 This function is called through dynamic setConfig callback function
2958 to configure nImmediateRoamRssiDiff
2959 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2960 \param hHal - HAL handle for device
2961 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2962 candidate and current AP.
2963 \- return Success or failure
2964 -------------------------------------------------------------------------*/
2965
2966eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002967
Srinivas Girigowdade697412013-02-14 16:31:48 -08002968/* ---------------------------------------------------------------------------
2969 \fn sme_UpdateRoamRssiDiff
2970 \brief Update RoamRssiDiff
2971 This function is called through dynamic setConfig callback function
2972 to configure RoamRssiDiff
2973 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2974 \param hHal - HAL handle for device
2975 \param RoamRssiDiff - minimum rssi difference between potential
2976 candidate and current AP.
2977 \- return Success or failure
2978 -------------------------------------------------------------------------*/
2979
2980eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2981
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002982/*--------------------------------------------------------------------------
2983 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2984 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2985 isFastTransitionEnabled.
2986 This is a synchronuous call
2987 \param hHal - The handle returned by macOpen.
2988 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2989 Other status means SME is failed to update isFastTransitionEnabled.
2990 \sa
2991 --------------------------------------------------------------------------*/
2992
2993eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2994 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002995
2996/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002997 \fn sme_UpdateWESMode
2998 \brief Update WESMode
2999 This function is called through dynamic setConfig callback function
3000 to configure isWESModeEnabled
3001 \param hHal - HAL handle for device
3002 \param isWESModeEnabled - Enable/Disable WES Mode
3003 \- return Success or failure
3004 -------------------------------------------------------------------------*/
3005eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
3006
3007/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003008 \fn sme_SetRoamScanControl
3009 \brief Set roam scan control
3010 This function is called to set roam scan control
3011 if roam scan control is set to 0, roaming scan cache is cleared
3012 any value other than 0 is treated as invalid value
3013 \param hHal - HAL handle for device
3014 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3015 Other status means SME failure to update
3016 -------------------------------------------------------------------------*/
3017eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003018#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003019
3020#ifdef FEATURE_WLAN_LFR
3021/*--------------------------------------------------------------------------
3022 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08003023 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003024 isFastRoamIniFeatureEnabled.
3025 This is a synchronuous call
3026 \param hHal - The handle returned by macOpen.
3027 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
3028 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
3029 \sa
3030 --------------------------------------------------------------------------*/
3031
Srinivas Girigowdade697412013-02-14 16:31:48 -08003032eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003033 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003034
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003035/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05303036 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
3037 When Supplicant issue enabled / disable fwr based roaming on the basis
3038 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
3039
3040 This is a synchronous call
3041 \param hHal - The handle returned by macOpen.
3042 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
3043 Other status means SME is failed to (enabled/disabled) offload scan.
3044 \sa
3045 --------------------------------------------------------------------------*/
3046
3047eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
3048 const v_BOOL_t isFastRoamEnabled);
3049
3050/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08003051 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
3052 Enable/disable LFR MAWC support at runtime
3053 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3054 isMAWCIniFeatureEnabled.
3055 This is a synchronous call
3056 \param hHal - The handle returned by macOpen.
3057 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
3058 Other status means SME is failed to update MAWCEnabled.
3059 \sa
3060 --------------------------------------------------------------------------*/
3061eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
3062 const v_BOOL_t MAWCEnabled);
3063
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07003064
3065#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3066/*--------------------------------------------------------------------------
3067 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
3068 This is a synchronuous call
3069 \param hHal - The handle returned by macOpen.
3070 \return eHAL_STATUS_SUCCESS
3071 Other status means SME is failed
3072 \sa
3073 --------------------------------------------------------------------------*/
3074
3075eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
3076 v_BOOL_t bFastRoamInConIniFeatureEnabled);
3077#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003078#endif /* FEATURE_WLAN_LFR */
3079
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003080#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003081/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003082 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003083 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003084 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003085 This is a synchronuous call
3086 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003087 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
3088 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003089 \sa
3090 --------------------------------------------------------------------------*/
3091
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003092eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
3093 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003094
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003095#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08003096
3097/*--------------------------------------------------------------------------
3098 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
3099 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3100 fEnableFwRssiMonitoring.
3101 This is a synchronuous call
3102 \param hHal - The handle returned by macOpen.
3103 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
3104 Other status means SME is failed to update
3105 \sa
3106 --------------------------------------------------------------------------*/
3107
3108eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
3109 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08003110
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003111#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08003112/*--------------------------------------------------------------------------
3113 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
3114 This is a synchronuous call
3115 \param hHal - The handle returned by macOpen.
3116 \return eHAL_STATUS_SUCCESS - SME update config successful.
3117 Other status means SME is failed to update
3118 \sa
3119 --------------------------------------------------------------------------*/
3120eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
3121 v_U8_t neighborLookupRssiThreshold);
3122
3123/*--------------------------------------------------------------------------
3124 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
3125 This is a synchronuous call
3126 \param hHal - The handle returned by macOpen.
3127 \return eHAL_STATUS_SUCCESS - SME update config successful.
3128 Other status means SME is failed to update
3129 \sa
3130 --------------------------------------------------------------------------*/
3131eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
3132 v_U8_t neighborReassocRssiThreshold);
3133
3134/*--------------------------------------------------------------------------
3135 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
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 --------------------------------------------------------------------------*/
3142v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
3143
3144/*--------------------------------------------------------------------------
3145 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
3146 This is a synchronuous call
3147 \param hHal - The handle returned by macOpen.
3148 \return eHAL_STATUS_SUCCESS - SME update config successful.
3149 Other status means SME is failed to update
3150 \sa
3151 --------------------------------------------------------------------------*/
3152eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
3153 v_U16_t neighborScanResultsRefreshPeriod);
3154
3155/*--------------------------------------------------------------------------
3156 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results 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_getNeighborScanRefreshPeriod(tHalHandle hHal);
3164
3165/*--------------------------------------------------------------------------
3166 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
3167 This is a synchronuous call
3168 \param hHal - The handle returned by macOpen.
3169 \return eHAL_STATUS_SUCCESS - SME update config successful.
3170 Other status means SME is failed to update
3171 \sa
3172 --------------------------------------------------------------------------*/
3173v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
3174
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003175/* ---------------------------------------------------------------------------
3176 \fn sme_UpdateEmptyScanRefreshPeriod
3177 \brief Update nEmptyScanRefreshPeriod
3178 This function is called through dynamic setConfig callback function
3179 to configure nEmptyScanRefreshPeriod
3180 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3181 \param hHal - HAL handle for device
3182 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3183 \- return Success or failure
3184 -------------------------------------------------------------------------*/
3185eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
3186
3187/* ---------------------------------------------------------------------------
3188 \fn sme_setNeighborScanMinChanTime
3189 \brief Update nNeighborScanMinChanTime
3190 This function is called through dynamic setConfig callback function
3191 to configure gNeighborScanChannelMinTime
3192 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
3193 \param hHal - HAL handle for device
3194 \param nNeighborScanMinChanTime - Channel minimum dwell time
3195 \- return Success or failure
3196 -------------------------------------------------------------------------*/
3197eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
3198
3199/* ---------------------------------------------------------------------------
3200 \fn sme_setNeighborScanMaxChanTime
3201 \brief Update nNeighborScanMaxChanTime
3202 This function is called through dynamic setConfig callback function
3203 to configure gNeighborScanChannelMaxTime
3204 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
3205 \param hHal - HAL handle for device
3206 \param nNeighborScanMinChanTime - Channel maximum dwell time
3207 \- return Success or failure
3208 -------------------------------------------------------------------------*/
3209eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
3210
3211/* ---------------------------------------------------------------------------
3212 \fn sme_getNeighborScanMinChanTime
3213 \brief get neighbor scan min channel time
3214 \param hHal - The handle returned by macOpen.
3215 \return v_U16_t - channel min time value
3216 -------------------------------------------------------------------------*/
3217v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
3218
3219/* ---------------------------------------------------------------------------
3220 \fn sme_getNeighborScanMaxChanTime
3221 \brief get neighbor scan max channel time
3222 \param hHal - The handle returned by macOpen.
3223 \return v_U16_t - channel max time value
3224 -------------------------------------------------------------------------*/
3225v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
3226
3227/* ---------------------------------------------------------------------------
3228 \fn sme_setNeighborScanPeriod
3229 \brief Update nNeighborScanPeriod
3230 This function is called through dynamic setConfig callback function
3231 to configure nNeighborScanPeriod
3232 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
3233 \param hHal - HAL handle for device
3234 \param nNeighborScanPeriod - neighbor scan period
3235 \- return Success or failure
3236 -------------------------------------------------------------------------*/
3237eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
3238
3239/* ---------------------------------------------------------------------------
3240 \fn sme_getNeighborScanPeriod
3241 \brief get neighbor scan period
3242 \param hHal - The handle returned by macOpen.
3243 \return v_U16_t - neighbor scan period
3244 -------------------------------------------------------------------------*/
3245v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3246
3247#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003248
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003249#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003250/*--------------------------------------------------------------------------
3251 \brief sme_getRoamRssiDiff() - get Roam rssi diff
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 --------------------------------------------------------------------------*/
3258v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3259
3260/*--------------------------------------------------------------------------
3261 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3262 This is a synchronuous call
3263 \param hHal - The handle returned by macOpen.
3264 \return eHAL_STATUS_SUCCESS - SME update config successful.
3265 Other status means SME is failed to update
3266 \sa
3267 --------------------------------------------------------------------------*/
3268eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3269 tANI_U8 numChannels);
3270
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003271#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003272/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003273 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003274 This is a synchronuous call
3275 \param hHal - The handle returned by macOpen.
3276 \return eHAL_STATUS_SUCCESS - SME update config successful.
3277 Other status means SME is failed to update
3278 \sa
3279 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003280eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003281 tANI_U8 *pChannelList,
3282 tANI_U8 numChannels);
3283#endif
3284
Srinivas Girigowdade697412013-02-14 16:31:48 -08003285/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003286 \brief sme_getRoamScanChannelList() - get roam scan channel list
3287 This is a synchronuous call
3288 \param hHal - The handle returned by macOpen.
3289 \return eHAL_STATUS_SUCCESS - SME update config successful.
3290 Other status means SME is failed to update
3291 \sa
3292 --------------------------------------------------------------------------*/
3293eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3294 tANI_U8 *pNumChannels);
3295
3296/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003297 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003298 This is a synchronuous call
3299 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003300 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003301 FALSE (0) - if feature is disabled (compile or runtime)
3302 \sa
3303 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003304tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003305
3306/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003307 \brief sme_getWESMode() - getWES Mode
3308 This is a synchronous call
3309 \param hHal - The handle returned by macOpen.
3310 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3311 \sa
3312 --------------------------------------------------------------------------*/
3313v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3314
3315/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003316 \brief sme_GetRoamScanControl() - get scan control
3317 This is a synchronous call
3318 \param hHal - The handle returned by macOpen.
3319 \return v_BOOL_t - Enabled(1)/Disabled(0)
3320 \sa
3321 --------------------------------------------------------------------------*/
3322v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3323
3324/* ---------------------------------------------------------------------------
3325 \fn sme_UpdateEmptyScanRefreshPeriod
3326 \brief Update nnEmptyScanRefreshPeriod
3327 This function is called through dynamic setConfig callback function
3328 to configure nnEmptyScanRefreshPeriod
3329 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3330 \param hHal - HAL handle for device
3331 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3332 \- return Success or failure
3333 -------------------------------------------------------------------------*/
3334
3335/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003336 \brief sme_getIsLfrFeatureEnabled() - get LFR 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_getIsLfrFeatureEnabled(tHalHandle hHal);
3344
3345/*--------------------------------------------------------------------------
3346 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3347 This is a synchronuous call
3348 \param hHal - The handle returned by macOpen.
3349 \return TRUE (1) - if the feature is enabled
3350 FALSE (0) - if feature is disabled (compile or runtime)
3351 \sa
3352 --------------------------------------------------------------------------*/
3353tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3354
Srinivas Girigowdade697412013-02-14 16:31:48 -08003355#endif
3356
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003357#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3358/*--------------------------------------------------------------------------
3359 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3360 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3361 gRoamScanOffloadEnabled.
3362 This is a synchronous call
3363 \param hHal - The handle returned by macOpen.
3364 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3365 Other status means SME is failed to update.
3366 \sa
3367 --------------------------------------------------------------------------*/
3368
3369eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3370#endif
3371
c_manjeecfd1efb2015-09-25 19:32:34 +05303372eHalStatus sme_FwMemDumpReq(tHalHandle hHal, tAniFwrDumpReq *recv_req);
3373
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003374
Srinivas Girigowdade697412013-02-14 16:31:48 -08003375/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003376 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303377 \brief Check if a feature is enabled by FW
3378
3379 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003380 A value from enum placeHolderInCapBitmap
3381
3382 \- return 1/0 (TRUE/FALSE)
3383 -------------------------------------------------------------------------*/
3384tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303385
3386/* ---------------------------------------------------------------------------
3387 \fn sme_IsFeatureSupportedByDriver
3388 \brief Check if a feature is enabled by driver
3389
3390 \param featEnumValue - Enumeration value of the feature to be checked.
3391 A value from enum placeHolderInCapBitmap
3392
3393 \- return 1/0 (TRUE/FALSE)
3394 -------------------------------------------------------------------------*/
3395tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3396
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003397#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303398
3399/* ---------------------------------------------------------------------------
3400 \fn sme_SendTdlsLinkEstablishParams
3401 \brief API to send TDLS Link Establishment Parameters.
3402
3403 \param peerMac - peer's Mac Adress.
3404 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3405 \- return VOS_STATUS_SUCCES
3406 -------------------------------------------------------------------------*/
3407
3408VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
Anand N Sunkadc205d952015-07-30 15:36:03 +05303409 tANI_U8 sessionId,
3410#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3411 const tSirMacAddr peerMac,
3412#else
3413 tSirMacAddr peerMac,
3414#endif
3415 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303416
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003417/* ---------------------------------------------------------------------------
3418 \fn sme_SendTdlsMgmtFrame
3419 \brief API to send TDLS management frames.
3420
3421 \param peerMac - peer's Mac Adress.
3422 \param frame_type - Type of TDLS mgmt frame to be sent.
3423 \param dialog - dialog token used in the frame.
3424 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303425 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003426 \param buf - additional IEs to be included
3427 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003428 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003429 \- return VOS_STATUS_SUCCES
3430 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303431VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
3432#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3433 const tSirMacAddr peerMac,
3434#else
3435 tSirMacAddr peerMac,
3436#endif
3437 tANI_U8 frame_type, tANI_U8 dialog,
3438 tANI_U16 status, tANI_U32 peerCapability,
3439 tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003440/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003441 \fn sme_ChangeTdlsPeerSta
3442 \brief API to Update TDLS peer sta parameters.
3443
3444 \param peerMac - peer's Mac Adress.
3445 \param staParams - Peer Station Parameters.
3446 \- return VOS_STATUS_SUCCES
3447 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303448VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3449#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3450 const tSirMacAddr peerMac,
3451#else
3452 tSirMacAddr peerMac,
3453#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003454 tCsrStaParams *pstaParams);
3455/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003456 \fn sme_AddTdlsPeerSta
3457 \brief API to Add TDLS peer sta entry.
3458
3459 \param peerMac - peer's Mac Adress.
3460 \- return VOS_STATUS_SUCCES
3461 -------------------------------------------------------------------------*/
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303462VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3463#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3464 const tSirMacAddr peerMac
3465#else
3466 tSirMacAddr peerMac
3467#endif
3468 );
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003469/* ---------------------------------------------------------------------------
3470 \fn sme_DeleteTdlsPeerSta
3471 \brief API to Delete TDLS peer sta entry.
3472
3473 \param peerMac - peer's Mac Adress.
3474 \- return VOS_STATUS_SUCCES
3475 -------------------------------------------------------------------------*/
Anand N Sunkadc205d952015-07-30 15:36:03 +05303476VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId,
3477#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
3478 const tSirMacAddr peerMac
3479#else
3480 tSirMacAddr peerMac
3481#endif
3482 );
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003483/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003484 \fn sme_SetTdlsPowerSaveProhibited
3485 \API to set/reset the isTdlsPowerSaveProhibited.
3486
3487 \- return void
3488 -------------------------------------------------------------------------*/
3489void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003490#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303491/* ---------------------------------------------------------------------------
3492 \fn sme_IsPmcBmps
3493 \brief API to Check if PMC state is BMPS.
3494
3495 \- return v_BOOL_t
3496 -------------------------------------------------------------------------*/
3497v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3498
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003499eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003500
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +05303501/* ---------------------------------------------------------------------------
3502 \fn sme_UpdateDFSRoamMode
3503 \brief Update DFS roam scan mode
3504 This function is called to configure allowDFSChannelRoam
3505 dynamically
3506 \param hHal - HAL handle for device
3507 \param allowDFSChannelRoam - DFS roaming scan mode
3508 mode 0 disable roam scan on DFS channels
3509 mode 1 enables roam scan (passive/active) on DFS channels
3510 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3511 successfully.
3512 Other status means SME failed to update DFS roaming scan config.
3513 \sa
3514 -------------------------------------------------------------------------*/
3515eHalStatus sme_UpdateDFSRoamMode(tHalHandle hHal, tANI_U8 allowDFSChannelRoam);
3516
3517/* ---------------------------------------------------------------------------
3518 \fn sme_UpdateDFSScanMode
3519 \brief Update DFS scan mode
3520 This function is called to configure fEnableDFSChnlScan.
3521 \param hHal - HAL handle for device
3522 \param dfsScanMode - DFS scan mode
3523 mode 0 disable scan on DFS channels
3524 mode 1 enables passive scan on DFS channels
3525 mode 2 enables active scan on DFS channels for static list
3526 \return eHAL_STATUS_SUCCESS - SME update DFS roaming scan config
3527 successfully.
3528 Other status means SME failed to update DFS scan config.
3529 \sa
3530 -------------------------------------------------------------------------*/
3531eHalStatus sme_UpdateDFSScanMode(tHalHandle hHal, tANI_U8 dfsScanMode);
3532
3533/*--------------------------------------------------------------------------
3534 \brief sme_GetDFSScanMode() - get DFS scan mode
3535 \param hHal - The handle returned by macOpen.
3536 \return DFS scan mode
3537 mode 0 disable scan on DFS channels
3538 mode 1 enables passive scan on DFS channels
3539 mode 2 enables active scan on DFS channels for static list
3540 \sa
3541 --------------------------------------------------------------------------*/
3542v_U8_t sme_GetDFSScanMode(tHalHandle hHal);
3543
3544/* ---------------------------------------------------------------------------
3545 \fn sme_HandleDFSChanScan
3546 \brief Gets Valid channel list and updates scan control list according to
3547 dfsScanMode
3548 \param hHal - HAL handle for device
3549 \return eHAL_STATUS_FAILURE when failed to get valid channel list
3550 Otherwise eHAL_STATUS_SUCCESS -
3551 \sa
3552 -------------------------------------------------------------------------*/
3553eHalStatus sme_HandleDFSChanScan(tHalHandle hHal);
3554
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003555/*
3556 * SME API to enable/disable WLAN driver initiated SSR
3557 */
3558void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3559
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303560/* ---------------------------------------------------------------------------
3561
3562 \fn sme_SetPhyMode
3563
3564 \brief Changes the PhyMode.
3565
3566 \param hHal - The handle returned by macOpen.
3567
3568 \param phyMode new phyMode which is to set
3569
3570 \return eHalStatus SUCCESS.
3571
3572 -------------------------------------------------------------------------------*/
3573eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3574
3575/* ---------------------------------------------------------------------------
3576
3577 \fn sme_GetPhyMode
3578
3579 \brief gets current PhyMode.
3580
3581 \param hHal - The handle returned by macOpen.
3582
3583 \return eHalStatus PhyMode
3584
3585 -------------------------------------------------------------------------------*/
3586eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3587
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003588/*
3589 * SME API to determine the channel bonding mode
3590 */
Abhishek Singh02b823e2017-10-30 17:53:20 +05303591VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode,
3592 tANI_U8 channel, enum eSirMacHTChannelWidth max_bw);
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003593
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003594#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3595/*--------------------------------------------------------------------------
3596 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3597 from CSR.
3598 This is a synchronous call
3599 \param hHal - The handle returned by macOpen
3600 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3601 BSSID, channel etc.)
3602 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3603 Other status means SME is failed to send the request.
3604 \sa
3605 --------------------------------------------------------------------------*/
3606
3607eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3608#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003609/*--------------------------------------------------------------------------
3610 \brief sme_isSta_p2p_clientConnected() - 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 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003618VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003619
Agarwal Ashish57e84372014-12-05 18:26:53 +05303620/*--------------------------------------------------------------------------
3621 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3622 is any connected session .
3623 This is a synchronous call
3624 \param hHal - The handle returned by macOpen
3625 \return VOS_STATUS - SME passed the request to CSR successfully.
3626 Other status means SME is failed to send the request.
3627 \sa
3628 --------------------------------------------------------------------------*/
3629VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3630
Leo Chang9056f462013-08-01 19:21:11 -07003631#ifdef FEATURE_WLAN_LPHB
3632/* ---------------------------------------------------------------------------
3633 \fn sme_LPHBConfigReq
3634 \API to make configuration LPHB within FW.
3635 \param hHal - The handle returned by macOpen
3636 \param lphdReq - LPHB request argument by client
3637 \param pCallbackfn - LPHB timeout notification callback function pointer
3638 \- return Configuration message posting status, SUCCESS or Fail
3639 -------------------------------------------------------------------------*/
3640eHalStatus sme_LPHBConfigReq(
3641 tHalHandle hHal,
3642 tSirLPHBReq *lphdReq,
3643 void (*pCallbackfn)(void *pAdapter, void *indParam));
3644#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003645
3646/* ---------------------------------------------------------------------------
3647 \fn sme_AddPeriodicTxPtrn
3648 \brief API to Periodic TX Pattern Offload feature
3649 \param hHal - The handle returned by macOpen
3650 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3651 \return eHalStatus
3652 ---------------------------------------------------------------------------*/
3653eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3654 *addPeriodicTxPtrnParams);
3655
3656/* ---------------------------------------------------------------------------
3657 \fn sme_DelPeriodicTxPtrn
3658 \brief API to Periodic TX Pattern Offload feature
3659 \param hHal - The handle returned by macOpen
3660 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3661 \return eHalStatus
3662 ---------------------------------------------------------------------------*/
3663eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3664 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003665/*--------------------------------------------------------------------------
3666 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3667 scan parameter.
3668 This is a synchronous call
3669 \param hHal - The handle returned by macOpen
3670 \return None.
3671 \sa
3672 --------------------------------------------------------------------------*/
3673void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3674 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303675
Abhishek Singh00b71972016-01-07 10:51:04 +05303676#ifdef WLAN_FEATURE_RMC
3677/* ---------------------------------------------------------------------------
3678 \fn sme_EnableRMC
3679 \brief Used to enable RMC
3680 setting will not persist over reboots
3681 \param hHal
3682 \param sessionId
3683 \- return eHalStatus
3684 -------------------------------------------------------------------------*/
3685eHalStatus sme_EnableRMC(tHalHandle hHal, tANI_U32 sessionId);
3686
3687/* ---------------------------------------------------------------------------
3688 \fn sme_DisableRMC
3689 \brief Used to disable RMC
3690 setting will not persist over reboots
3691 \param hHal
3692 \param sessionId
3693 \- return eHalStatus
3694 -------------------------------------------------------------------------*/
3695eHalStatus sme_DisableRMC(tHalHandle hHal, tANI_U32 sessionId);
3696#endif /* WLAN_FEATURE_RMC */
3697
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003698/* ---------------------------------------------------------------------------
3699 \fn sme_SendRateUpdateInd
3700 \brief API to Update rate
3701 \param hHal - The handle returned by macOpen
3702 \param rateUpdateParams - Pointer to rate update params
3703 \return eHalStatus
3704 ---------------------------------------------------------------------------*/
3705eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3706
Abhishek Singh00b71972016-01-07 10:51:04 +05303707#ifdef WLAN_FEATURE_RMC
3708/* ---------------------------------------------------------------------------
3709 \fn sme_GetIBSSPeerInfo
3710 \brief Used to disable RMC
3711 setting will not persist over reboots
3712 \param hHal
3713 \param ibssPeerInfoReq multicast Group IP address
3714 \- return eHalStatus
3715 -------------------------------------------------------------------------*/
3716eHalStatus sme_RequestIBSSPeerInfo(tHalHandle hHal, void *pUserData,
3717 pIbssPeerInfoCb peerInfoCbk,
3718 tANI_BOOLEAN allPeerInfoReqd,
3719 tANI_U8 staIdx);
3720#endif /* WLAN_FEATURE_RMC */
3721
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303722/*
3723 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3724 * triggers
3725 * return status
3726*/
3727eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3728 tANI_U8 *bssid,
Mukul Sharma9e4e0f92015-02-13 18:45:20 +05303729 tSmeFastRoamTrigger fastRoamTrig,
3730 tANI_U8 channel);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303731
3732eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303733#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
Abhinav Kumar8c122592019-08-07 15:43:20 +05303734 tPmkidCacheInfo *pmksa,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303735#else
Abhinav Kumar8c122592019-08-07 15:43:20 +05303736 tPmkidCacheInfo *pmksa,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05303737#endif
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303738 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003739
3740void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303741
3742#ifdef FEATURE_WLAN_BATCH_SCAN
3743/* ---------------------------------------------------------------------------
3744 \fn sme_SetBatchScanReq
3745 \brief API to set batch scan request in FW
3746 \param hHal - The handle returned by macOpen.
3747 \param pRequest - Pointer to the batch request.
3748 \param sessionId - session ID
3749 \param callbackRoutine - HDD callback which needs to be invoked after
3750 getting set batch scan response from FW
3751 \param callbackContext - pAdapter context
3752 \return eHalStatus
3753 ---------------------------------------------------------------------------*/
3754eHalStatus
3755sme_SetBatchScanReq
3756(
3757 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3758 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3759 void *callbackContext
3760);
3761
3762/* ---------------------------------------------------------------------------
3763 \fn sme_TriggerBatchScanResultInd
3764 \brief API to trigger batch scan result indications from from FW
3765 \param hHal - The handle returned by macOpen.
3766 \param pRequest - Pointer to get batch request.
3767 \param sessionId - session ID
3768 \param callbackRoutine - HDD callback which needs to be invoked after
3769 getting get batch scan response from FW
3770 \param callbackContext - pAdapter context
3771 \return eHalStatus
3772 ---------------------------------------------------------------------------*/
3773eHalStatus
3774sme_TriggerBatchScanResultInd
3775(
3776 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3777 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3778 void *callbackContext
3779);
3780
3781/* ---------------------------------------------------------------------------
3782 \fn sme_StopBatchScanInd
3783 \brief API to stop batch scan request in FW
3784 \param hHal - The handle returned by macOpen.
3785 \param pRequest - Pointer to stop batch indication
3786 \return eHalStatus
3787 ---------------------------------------------------------------------------*/
3788eHalStatus
3789sme_StopBatchScanInd
3790(
3791 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3792);
3793
3794#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003795
3796#ifdef FEATURE_WLAN_CH_AVOID
3797/* ---------------------------------------------------------------------------
3798 \fn sme_AddChAvoidCallback
3799 \brief Used to plug in callback function
3800 Which notify channel may not be used with SAP or P2PGO mode.
3801 Notification come from FW.
3802 \param hHal
3803 \param pCallbackfn : callback function pointer should be plugged in
3804 \- return eHalStatus
3805 -------------------------------------------------------------------------*/
3806eHalStatus sme_AddChAvoidCallback
3807(
3808 tHalHandle hHal,
3809 void (*pCallbackfn)(void *pAdapter, void *indParam)
3810);
3811#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003812eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sachin Ahuja3d47fcd2015-08-28 16:02:06 +05303813
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303814/* ---------------------------------------------------------------------------
3815 \fn sme_requestTypetoString
3816 \brief API to convert requestType enum values
3817 to string.
3818 ---------------------------------------------------------------------------*/
3819const char * sme_requestTypetoString(const v_U8_t requestType);
3820/* ---------------------------------------------------------------------------
3821 \fn sme_PmcStatetoString
3822 \brief API to convert PmcState enum values
3823 to string.
3824 ---------------------------------------------------------------------------*/
3825const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303826
3827eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3828
Agarwal Ashish5e414792014-06-08 15:25:23 +05303829tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303830
3831// tdlsoffchan
3832VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3833 tANI_U8 sessionId,
3834 tSirMacAddr peerMac,
3835 tANI_S32 tdlsOffCh,
3836 tANI_S32 tdlsOffChBwOffset,
3837 tANI_U8 tdlsSwMode);
Abhishek Singh08aa7762014-12-16 13:59:03 +05303838eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats,
3839 void *pContext, tSirFWStatsCallback callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303840void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303841
3842void sme_resetCoexEevent(tHalHandle hHal);
3843
Peng Xu117eab42014-09-25 13:33:27 +05303844tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3845tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303846#ifdef WLAN_FEATURE_AP_HT40_24G
3847void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3848 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303849eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3850 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303851#endif
Peng Xu117eab42014-09-25 13:33:27 +05303852
Gupta, Kapil7c34b322015-09-30 13:12:35 +05303853eHalStatus sme_set_rssi_threshold_breached_cb(tHalHandle hal,
3854 void (*cb)(void *, struct rssi_breach_event *));
3855
Agarwal Ashish738843c2014-09-25 12:27:56 +05303856void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3857
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303858/* HDD Callback function */
3859typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3860
3861eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3862 u8 *pCmd,
3863 int length,
3864 pEncryptMsgRSPCb encCB);
3865
Pradeep Reddy POTTETIf0569d72014-12-13 16:54:03 +05303866/* ---------------------------------------------------------------------------
3867 \fn sme_RegisterBtCoexTDLSCallback
3868 \brief Used to plug in callback function
3869 Which notify btcoex on or off.
3870 Notification come from FW.
3871 \param hHal
3872 \param pCallbackfn : callback function pointer should be plugged in
3873 \- return eHalStatus
3874 -------------------------------------------------------------------------*/
3875eHalStatus sme_RegisterBtCoexTDLSCallback
3876(
3877 tHalHandle hHal,
3878 void (*pCallbackfn)(void *pAdapter, int)
3879);
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303880
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303881/* ---------------------------------------------------------------------------
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303882 \fn smeNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303883
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303884 \brief This function is a wrapper to call csrNeighborMiddleOfRoaming
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303885
3886 \param hHal - The handle returned by macOpen.
3887
3888 \return eANI_BOOLEAN_TRUE if reassoc in progress,
3889 eANI_BOOLEAN_FALSE otherwise
3890---------------------------------------------------------------------------*/
Padma, Santhosh Kumar3b9657d2015-02-04 19:37:32 +05303891tANI_BOOLEAN smeNeighborMiddleOfRoaming(tHalHandle hHal);
Padma, Santhosh Kumar98f271d2014-12-31 17:23:31 +05303892
Pradeep Reddy POTTETIe8bd41a2015-01-29 14:52:43 +05303893/* ---------------------------------------------------------------------------
3894
3895 \fn sme_IsTdlsOffChannelValid
3896 \brief To check if the channel is valid for currently established domain
3897 This is a synchronous API.
3898
3899 \param hHal - The handle returned by macOpen.
3900 \param channel - channel to verify
3901
3902 \return TRUE/FALSE, TRUE if channel is valid
3903
3904 -------------------------------------------------------------------------------*/
3905tANI_BOOLEAN sme_IsTdlsOffChannelValid(tHalHandle hHal, tANI_U8 channel);
3906
Mukul Sharma4be88422015-03-09 20:29:07 +05303907/* --------------------------------------------------------------------------
3908
3909 \fn sme_IsCoexScoIndicationSet
3910 \brief To check if the BTC module in fwr has sent the SCO
3911 indication to host or not
3912
3913 \param hHal - The handle returned by macOpen.
3914 \return TRUE - Sco call in progress FALSE- No SCO call in progress
3915
3916 --------------------------------------------------------------------------*/
3917tANI_BOOLEAN sme_IsCoexScoIndicationSet(tHalHandle hHal);
3918
Abhishek Singh01c73d12015-03-12 15:13:44 +05303919eHalStatus sme_SetMiracastVendorConfig(tHalHandle hHal,
3920 tANI_U32 iniNumBuffAdvert,
3921 tANI_U32 set_value);
3922
Mukul Sharma45063942015-04-01 20:07:59 +05303923void sme_SetDefDot11Mode(tHalHandle hHal);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05303924
3925/* ---------------------------------------------------------------------------
3926 \fn sme_SetTdls2040BSSCoexistence
3927 \brief API to enable or disable 20_40 BSS Coexistence IE in TDLS frames.
3928
3929 \param isEnabled - Enable or Disable.
3930 \- return VOS_STATUS_SUCCES
3931 -------------------------------------------------------------------------*/
3932eHalStatus sme_SetTdls2040BSSCoexistence(tHalHandle hHal, tANI_S32 isEnabled);
3933
Abhishek Singh41988ba2015-05-25 19:42:29 +05303934/* ---------------------------------------------------------------------------
3935 \fn sme_SetRtsCtsHtVht
3936 \brief API to to enable/disable RTS/CTS for different modes.
3937
3938 \param set_value - Bit mask value to enable RTS/CTS for different modes.
3939 \- return VOS_STATUS_SUCCES if INdication is posted to
3940 WDA else return eHAL_STATUS_FAILURE
3941 -------------------------------------------------------------------------*/
3942eHalStatus sme_SetRtsCtsHtVht(tHalHandle hHal, tANI_U32 set_value);
3943
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303944tANI_BOOLEAN sme_handleSetFccChannel(tHalHandle hHal,
Agrawal Ashish842eea82016-02-04 17:56:16 +05303945 tANI_U8 fcc_constraint,
3946 v_U32_t scan_pending);
Agarwal Ashish8bd53ae2015-06-12 18:03:45 +05303947
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05303948eHalStatus sme_DeleteAllTDLSPeers(tHalHandle hHal, uint8_t sessionId);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303949eHalStatus sme_fatal_event_logs_req(tHalHandle hHal, tANI_U32 is_fatal,
Abhishek Singh837adf22015-10-01 17:37:37 +05303950 tANI_U32 indicator, tANI_U32 reason_code,
3951 tANI_BOOLEAN dump_vos_trace);
Sachin Ahuja715aafc2015-07-21 23:35:10 +05303952
Mahesh A Saptasagarbeca12c2015-09-07 16:21:06 +05303953eHalStatus sme_enableDisableChanAvoidIndEvent(tHalHandle hHal,
3954 tANI_U8 set_value);
3955
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303956/* ---------------------------------------------------------------------------
3957 \fn sme_set_wificonfig_params
3958 \brief API to set WifiConfiguration Parameters.
3959
3960 \param wifi_config_param - Wificonfig parameter 1.Averaging factor 2. Guard time
3961 \- return VOS_STATUS_SUCCES if INdication is posted to
3962 WDA else return eHAL_STATUS_FAILURE
3963 -------------------------------------------------------------------------*/
3964
3965eHalStatus sme_set_wificonfig_params(tHalHandle hHal, tSetWifiConfigParams *req);
Padma, Santhosh Kumar2762e9d2015-10-20 15:02:57 +05303966eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
3967 tANI_U32 *regInfo1, tANI_U32 *regInfo2);
Mahesh A Saptasagarcfc65ae2015-12-22 15:06:10 +05303968eHalStatus sme_GetCurrentAntennaIndex(tHalHandle hHal,
3969 tCsrAntennaIndexCallback callback,
3970 void *pContext, tANI_U8 sessionId);
Arun Khandavalli7eeb1592015-10-19 21:36:57 +05303971
Mahesh A Saptasagar7d432952016-02-09 14:01:03 +05303972eHalStatus sme_setBcnMissPenaltyCount(tHalHandle hHal,
3973 tModifyRoamParamsReqParams *params);
Abhishek Singhbfb3c9e2016-07-22 11:25:43 +05303974eHalStatus sme_remove_bssid_from_scan_list(tHalHandle hal,
3975 tSirMacAddr bssid);
Agrawal Ashish0552be02016-03-02 18:03:43 +05303976void sme_set_mgmt_frm_via_wq5(tHalHandle hHal,
3977 tANI_BOOLEAN sendMgmtPktViaWQ5);
mukul sharma6b53e202016-11-23 19:29:18 +05303978eHalStatus sme_update_cfg_int_param(tHalHandle hHal, tANI_U32 cfg_id);
Kapil Gupta3d923fb2016-12-20 18:59:27 +05303979
3980#ifdef WLAN_FEATURE_APFIND
3981VOS_STATUS sme_apfind_set_cmd(struct sme_ap_find_request_req *input);
3982#endif /* WLAN_FEATURE_APFIND */
3983
Agrawal Ashish17ef5082016-10-17 18:33:21 +05303984#ifdef SAP_AUTH_OFFLOAD
3985/**
3986 * sme_set_sap_auth_offload() enable/disable SAP Auth Offload
3987 * @hHal: hal layer handler
3988 * @sap_auth_offload_info: the information of SAP Auth Offload
3989 *
3990 * This function provide enable/disable SAP authenticaiton offload
3991 * feature on target firmware
3992 *
3993 * Return: eHalStatus.
3994 */
3995eHalStatus sme_set_sap_auth_offload(tHalHandle hHal,
3996 struct tSirSapOffloadInfo *sap_auth_offload_info);
3997
3998#endif /* SAP_AUTH_OFFLOAD */
Anurag Chouhan83026002016-12-13 22:46:21 +05303999#ifdef DHCP_SERVER_OFFLOAD
4000eHalStatus sme_set_dhcp_srv_offload(tHalHandle hal,
Anurag Chouhan0b29de02016-12-16 13:18:40 +05304001 sir_dhcp_srv_offload_info_t *dhcp_srv_info);
Anurag Chouhan83026002016-12-13 22:46:21 +05304002#endif /* DHCP_SERVER_OFFLOAD */
4003
Anurag Chouhan0b29de02016-12-16 13:18:40 +05304004#ifdef MDNS_OFFLOAD
4005eHalStatus sme_set_mdns_offload(tHalHandle hal,
4006 sir_mdns_offload_info_t *mdns_info);
4007
4008eHalStatus sme_set_mdns_fqdn(tHalHandle hal,
4009 sir_mdns_fqdn_info_t *mdns_fqdn);
4010
4011eHalStatus sme_set_mdns_resp(tHalHandle hal,
4012 sir_mdns_resp_info_t *mdns_resp);
4013#endif /* MDNS_OFFLOAD */
Ravi Kumar bokka7d032762016-12-12 23:33:01 +05304014
4015eHalStatus sme_update_hb_threshold(tHalHandle hHal, tANI_U32 cfgId,
4016 tANI_U8 hbThresh, eCsrBand eBand);
Manjeet Singh3ed79242017-01-11 19:04:32 +05304017
4018eHalStatus sme_capture_tsf_req(tHalHandle hHal,
4019 tSirCapTsfParams capTsfParams);
4020
4021eHalStatus sme_get_tsf_req(tHalHandle hHal,
4022 tSirCapTsfParams capTsfParams);
4023
4024eHalStatus sme_set_tsfcb(tHalHandle hHal,
4025 tsf_rsp_cb rsp_cb, struct stsf *pTsf,
4026 void *pcallbackcontext);
4027
Anurag Chouhan6ee81542017-02-09 18:09:27 +05304028/* ARP DEBUG STATS */
4029eHalStatus sme_set_nud_debug_stats(tHalHandle hHal,
4030 psetArpStatsParams pSetStatsParam);
4031eHalStatus sme_get_nud_debug_stats(tHalHandle hHal,
4032 pgetArpStatsParams pGetStatsParam);
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05304033eHalStatus sme_del_sta_ba_session_req(tHalHandle hHal,
4034 tDelBaParams sta_del_params);
Abhishek Singh02605092017-10-25 14:06:12 +05304035/**
4036 * sme_roam_csa_ie_request() - request CSA IE transmission from PE
4037 * @hal: handle returned by mac_open
4038 * @bssid: SAP bssid
4039 * @new_chan: target channel information
4040 * @phy_mode: SAP phymode
Abhishek Singh02b823e2017-10-30 17:53:20 +05304041 * @sme_session_id: sme session id
Abhishek Singh02605092017-10-25 14:06:12 +05304042 *
4043 * Return: VOS_STATUS
4044 */
4045VOS_STATUS sme_roam_csa_ie_request(tHalHandle hal, tCsrBssid bssid,
Abhishek Singh02b823e2017-10-30 17:53:20 +05304046 uint8_t new_chan, uint32_t phy_mode,
4047 uint8_t sme_session_id);
Abhishek Singh02605092017-10-25 14:06:12 +05304048
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304049/**
4050 * sme_roam_channel_change_req() - Channel change to new target channel
4051 * @hal: handle returned by mac_open
4052 * @bssid: SAP bssid
4053 * @new_chan: target channel information
4054 * @profile: roam profile
Abhishek Singh02b823e2017-10-30 17:53:20 +05304055 * @sme_session_id: sme session id
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304056 *
4057 * API to Indicate Channel change to new target channel
4058 *
4059 * Return: VOS_STATUS
4060 */
4061VOS_STATUS sme_roam_channel_change_req(tHalHandle hal, tCsrBssid bssid,
Abhishek Singh02b823e2017-10-30 17:53:20 +05304062 uint8_t new_chan, tCsrRoamProfile *profile,
4063 uint8_t sme_session_id);
Abhishek Singh78c691f2017-11-30 13:48:44 +05304064/**
4065 * sme_get_connect_strt_time() - get the connection start time
4066 * @hal: hal context
4067 * @session_id: session id
4068 *
4069 * Return: void.
4070 */
4071v_TIME_t sme_get_connect_strt_time(tHalHandle hal,
4072 uint8_t session_id);
4073
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304074
Abhishek Singhe8ebb922017-11-01 13:30:26 +05304075/**
4076 * sme_get_cb_phy_mode_from_cb_ini_mode() - convert ini CB value to Phy CB val
4077 * @cb_ini_value: ini value of cb mode
4078 *
4079 * Return: phy CB val
4080 */
4081static inline ePhyChanBondState
4082sme_get_cb_phy_mode_from_cb_ini_mode(uint32_t cb_ini_value)
4083{
4084 return csrConvertCBIniValueToPhyCBState(cb_ini_value);
4085}
Abhishek Singh550aa8c2017-10-30 17:34:53 +05304086
Yeshwanth Sriram Guntukab973f1c2018-03-29 19:35:49 +05304087/**
4088 * sme_request_imps() - Send IMPS request
4089 * @hal: hal context
4090 *
4091 * Return: void
4092 */
4093void sme_request_imps(tHalHandle hal);
4094
Vignesh Viswanathan0ac8e562018-06-14 17:24:10 +05304095
4096/**
4097 * sme_is_sta_key_exchange_in_progress() - checks whether the STA/P2P client
4098 * session has key exchange in progress
4099 *
4100 * @hal: global hal handle
4101 * @session_id: session id
4102 *
4103 * Return: true - if key exchange in progress
4104 * false - if not in progress
4105 */
4106bool sme_is_sta_key_exchange_in_progress(tHalHandle hal, uint8_t session_id);
Abhinav Kumarc00a7842018-06-13 16:07:31 +05304107/**
4108 * sme_process_msg_callback() - process callback message from LIM
4109 * @hal: global hal handle
4110 * @msg: vos message
4111 *
4112 * This function process the callback messages from LIM.
4113 *
4114 * Return: VOS_STATUS enumeration.
4115 */
4116VOS_STATUS sme_process_msg_callback(tHalHandle hal, vos_msg_t *msg);
4117
Abhinav Kumar8eed0362019-08-05 14:26:07 +05304118/**
4119 * sme_send_mgmt_tx() - Sends mgmt frame from CSR to LIM
4120 * @hal: The handle returned by mac_open
4121 * @session_id: session id
4122 * @buf: pointer to frame
4123 * @len: frame length
4124 *
4125 * Return: eHalStatus
4126 */
4127eHalStatus sme_send_mgmt_tx(tHalHandle hal, uint8_t session_id,
4128 const uint8_t *buf, uint32_t len);
4129
Abhinav Kumard9664da2019-08-05 17:11:25 +05304130#ifdef WLAN_FEATURE_SAE
4131/**
4132 * sme_handle_sae_msg() - Sends SAE message received from supplicant
4133 * @hal: The handle returned by mac_open
4134 * @session_id: session id
4135 * @sae_status: status of SAE authentication
4136 *
4137 * Return: HAL_STATUS
4138 */
4139eHalStatus sme_handle_sae_msg(tHalHandle hal, uint8_t session_id,
4140 uint8_t sae_status);
4141#else
4142static inline eHalStatus sme_handle_sae_msg(tHalHandle hal, uint8_t session_id,
4143 uint8_t sae_status)
4144{
4145 return eHAL_STATUS_SUCCESS;
4146}
4147#endif
4148
Jeff Johnson295189b2012-06-20 16:38:30 -07004149#endif //#if !defined( __SME_API_H )