blob: ebea6688ebc200cf02de8f81af105cbd65001de5 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam0fb93dd2014-02-19 00:32:59 -08002 * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
3 *
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
41 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
42
43 Qualcomm Confidential and Proprietary.
44
45 ========================================================================*/
46
47/* $Header$ */
48
49/*--------------------------------------------------------------------------
50 Include Files
51 ------------------------------------------------------------------------*/
52#include "ccmApi.h"
53#include "csrApi.h"
54#include "pmcApi.h"
55#include "vos_mq.h"
56#include "vos_lock.h"
57#include "halTypes.h"
58#include "sirApi.h"
59#include "btcApi.h"
60#include "vos_nvitem.h"
61#include "p2p_Api.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070062
Jeff Johnsone7245742012-09-05 17:12:55 -070063#ifdef FEATURE_OEM_DATA_SUPPORT
64#include "oemDataApi.h"
65#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070066
67#if defined WLAN_FEATURE_VOWIFI
68#include "smeRrmInternal.h"
69#endif
70
71/*--------------------------------------------------------------------------
72 Preprocessor definitions and constants
73 ------------------------------------------------------------------------*/
74
75#define SME_SUMMARY_STATS 1
76#define SME_GLOBAL_CLASSA_STATS 2
77#define SME_GLOBAL_CLASSB_STATS 4
78#define SME_GLOBAL_CLASSC_STATS 8
79#define SME_GLOBAL_CLASSD_STATS 16
80#define SME_PER_STA_STATS 32
81
82#define SME_INVALID_COUNTRY_CODE "XX"
83
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -070084//Macro to disable split scan
85#define SME_DISABLE_SPLIT_SCAN 255
Padma, Santhosh Kumar859d3712014-11-13 18:00:41 +053086
87//Macro to indicate invalid no of tspecs
88#define INVALID_TSPEC 100
89
Jeff Johnson295189b2012-06-20 16:38:30 -070090/*--------------------------------------------------------------------------
91 Type declarations
92 ------------------------------------------------------------------------*/
93typedef struct _smeConfigParams
94{
95 tCsrConfigParam csrConfig;
96#if defined WLAN_FEATURE_VOWIFI
97 tRrmConfigParam rrmConfig;
98#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -070099#if defined FEATURE_WLAN_LFR
100 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -0800101 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700102#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800103#if defined FEATURE_WLAN_ESE
104 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700105#endif
106#if defined WLAN_FEATURE_P2P_INTERNAL
107 tP2PConfigParam p2pConfig;
108#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800109#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -0700110 tANI_U8 isFastTransitionEnabled;
111 tANI_U8 RoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -0700112 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700113#endif
Gopichand Nakkala86e42662013-06-11 17:44:11 +0530114 tANI_BOOLEAN fScanOffload;
krunal soni5afa96c2013-09-06 22:19:02 -0700115 tANI_U8 isAmsduSupportInAMPDU;
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -0800116 tANI_U32 fEnableDebugLog;
Rashmi Ramanna68b309c2014-05-20 11:52:22 +0530117 tANI_U32 fDeferIMPSTime;
Jeff Johnson295189b2012-06-20 16:38:30 -0700118} tSmeConfigParams, *tpSmeConfigParams;
119
Sunil Duttc69bccb2014-05-26 21:30:20 +0530120#ifdef WLAN_FEATURE_LINK_LAYER_STATS
121
122/* ---------------------------------------------------------------------------
123 \fn sme_LLStatsSetReq
124 \brief API to set link layer stats request to FW
125 \param hHal - The handle returned by macOpen.
126
127 \Param pStatsReq - a pointer to a caller allocated object of
128 typedef struct tSirLLStatsSetReq, signifying the parameters to link layer
129 stats set.
130
131 \return eHalStatus
132 ---------------------------------------------------------------------------*/
133eHalStatus sme_LLStatsSetReq(tHalHandle hHal, tSirLLStatsSetReq *pStatsReq);
134
135/* ---------------------------------------------------------------------------
136 \fn sme_LLStatsGetReq
137 \brief API to get link layer stats request to FW
138 \param hHal - The handle returned by macOpen.
139
140 \Param pStatsReq - a pointer to a caller allocated object of
141 typedef struct tSirLLStatsGetReq, signifying the parameters to link layer
142 stats get.
143
144 \return eHalStatus
145 ---------------------------------------------------------------------------*/
146eHalStatus sme_LLStatsGetReq(tHalHandle hHal, tSirLLStatsGetReq *pStatsReq);
147
148/* ---------------------------------------------------------------------------
149 \fn sme_LLStatsClearReq
150 \brief API to clear link layer stats request to FW
151 \param hHal - The handle returned by macOpen.
152
153 \Param pStatsReq - a pointer to a caller allocated object of
154 typedef struct tSirLLStatsClearReq, signifying the parameters to link layer
155 stats clear.
156
157 \return eHalStatus
158 ---------------------------------------------------------------------------*/
159eHalStatus sme_LLStatsClearReq(tHalHandle hHal, tSirLLStatsClearReq *pStatsReq);
160
161/* ---------------------------------------------------------------------------
162 \fn sme_SetLinkLayerStatsIndCB
163 \brief API to trigger Link Layer stats result indications from from FW
164 \param hHal - The handle returned by macOpen.
Sunil Duttc69bccb2014-05-26 21:30:20 +0530165 \param callbackRoutine - HDD callback which needs to be invoked after
166 getting get Link Layer Statistics results from FW
Sunil Duttc69bccb2014-05-26 21:30:20 +0530167 \return eHalStatus
168 ---------------------------------------------------------------------------*/
169eHalStatus
170sme_SetLinkLayerStatsIndCB
171(
Dino Mycled3d50022014-07-07 12:58:25 +0530172 tHalHandle hHal,
173 void (*callbackRoutine) (void *callbackCtx, int indType, void *pRsp,
174 tANI_U8 *macAddr)
Sunil Duttc69bccb2014-05-26 21:30:20 +0530175);
176
177
178#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
179
Dino Mycle2c198072014-06-10 10:15:52 +0530180#ifdef WLAN_FEATURE_EXTSCAN
181/* ---------------------------------------------------------------------------
182 \fn sme_GetValidChannelsByBand
183 \brief SME API to fetch all valid channel filtered by band
184 \param hHal
185 \param wifiBand: RF band information
186 \param aValidChannels: Array to store channel info
187 \param len: number of channels
188 \- return eHalStatus
189 -------------------------------------------------------------------------*/
190eHalStatus sme_GetValidChannelsByBand (tHalHandle hHal, tANI_U8 wifiBand,
191 tANI_U32 *aValidChannels, tANI_U8 *pNumChannels);
192
193/* ---------------------------------------------------------------------------
194 \fn sme_EXTScanGetCapabilities
195 \brief SME API to fetch Extented Scan capabilities
196 \param hHal
197 \param pReq: Extented Scan capabilities structure
198 \- return eHalStatus
199 -------------------------------------------------------------------------*/
200eHalStatus sme_EXTScanGetCapabilities (tHalHandle hHal,
201 tSirGetEXTScanCapabilitiesReqParams *pReq);
202
203/* ---------------------------------------------------------------------------
204 \fn sme_EXTScanStart
205 \brief SME API to issue Extented Scan start
206 \param hHal
207 \param pStartCmd: Extented Scan start structure
208 \- return eHalStatus
209 -------------------------------------------------------------------------*/
210eHalStatus sme_EXTScanStart (tHalHandle hHal,
211 tSirEXTScanStartReqParams *pStartCmd);
212
213/* ---------------------------------------------------------------------------
214 \fn sme_EXTScanStop
215 \brief SME API to issue Extented Scan stop
216 \param hHal
217 \param pStopReq: Extented Scan stop structure
218 \- return eHalStatus
219 -------------------------------------------------------------------------*/
220eHalStatus sme_EXTScanStop(tHalHandle hHal, tSirEXTScanStopReqParams *pStopReq);
221
222/* ---------------------------------------------------------------------------
223 \fn sme_SetBssHotlist
224 \brief SME API to set BSSID hotlist
225 \param hHal
226 \param pSetHotListReq: Extented Scan set hotlist structure
227 \- return eHalStatus
228 -------------------------------------------------------------------------*/
229eHalStatus sme_SetBssHotlist (tHalHandle hHal,
230 tSirEXTScanSetBssidHotListReqParams *pSetHotListReq);
231
232/* ---------------------------------------------------------------------------
233 \fn sme_ResetBssHotlist
234 \brief SME API to reset BSSID hotlist
235 \param hHal
236 \param pSetHotListReq: Extented Scan set hotlist structure
237 \- return eHalStatus
238 -------------------------------------------------------------------------*/
239eHalStatus sme_ResetBssHotlist (tHalHandle hHal,
240 tSirEXTScanResetBssidHotlistReqParams *pResetReq);
241
242/* ---------------------------------------------------------------------------
243 \fn sme_SetSignificantChange
244 \brief SME API to set significant change
245 \param hHal
246 \param pSetSignificantChangeReq: Extented Scan set significant
247 change structure
248 \- return eHalStatus
249 -------------------------------------------------------------------------*/
250eHalStatus sme_SetSignificantChange (tHalHandle hHal,
251 tSirEXTScanSetSignificantChangeReqParams* pSetSignificantChangeReq);
252
253/* ---------------------------------------------------------------------------
254 \fn sme_ResetSignificantChange
255 \brief SME API to reset significant change
256 \param hHal
257 \param pResetReq: Extented Scan reset significant change structure
258 \- return eHalStatus
259 -------------------------------------------------------------------------*/
260eHalStatus sme_ResetSignificantChange (tHalHandle hHal,
261 tSirEXTScanResetSignificantChangeReqParams *pResetReq);
262
263/* ---------------------------------------------------------------------------
264 \fn sme_getCachedResults
265 \brief SME API to get cached results
266 \param hHal
267 \param pCachedResultsReq: Extented Scan get cached results structure
268 \- return eHalStatus
269 -------------------------------------------------------------------------*/
270eHalStatus sme_getCachedResults (tHalHandle hHal,
271 tSirEXTScanGetCachedResultsReqParams *pCachedResultsReq);
272
273/* ---------------------------------------------------------------------------
274 \fn sme_EXTScanRegisterCallback
275 \brief SME API to register Extented Scan notification callback
276 \param pEXTScanIndCb
277 \- return void
278 -------------------------------------------------------------------------*/
279eHalStatus sme_EXTScanRegisterCallback (tHalHandle hHal,
280 void (*pEXTScanIndCb)(void *, const tANI_U16, void *),
281 void *);
282
283#endif /* WLAN_FEATURE_EXTSCAN */
Siddharth Bhal6af5d4e2014-09-29 21:11:16 +0530284tANI_BOOLEAN sme_SpoofMacAddrReq(tHalHandle hHal, v_MACADDR_t *macaddr);
Dino Mycle2c198072014-06-10 10:15:52 +0530285
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +0530286typedef enum
287{
288 eSME_ROAM_TRIGGER_NONE = 0,
289 eSME_ROAM_TRIGGER_SCAN = 1,
290 eSME_ROAM_TRIGGER_FAST_ROAM = 2,
291 eSME_ROAM_TRIGGER_MAX
292} tSmeFastRoamTrigger;
Jeff Johnson295189b2012-06-20 16:38:30 -0700293
294/*-------------------------------------------------------------------------
Sushant Kaushike0d2cce2014-04-10 14:36:07 +0530295 Function declarations and documentation.
Jeff Johnson295189b2012-06-20 16:38:30 -0700296 ------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700297/*--------------------------------------------------------------------------
298
299 \brief sme_Open() - Initialze all SME modules and put them at idle state
300
301 The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon
302 successfully return, all modules are at idle state ready to start.
303
304 smeOpen must be called before any other SME APIs can be involved.
305 smeOpen must be called after macOpen.
306
307 \param hHal - The handle returned by macOpen.
308
309 \return eHAL_STATUS_SUCCESS - SME is successfully initialized.
310
311 Other status means SME is failed to be initialized
312 \sa
313
314 --------------------------------------------------------------------------*/
315eHalStatus sme_Open(tHalHandle hHal);
316
317/*--------------------------------------------------------------------------
318
319 \brief sme_Close() - Release all SME modules and their resources.
320
321 The function release each module in SME, PMC, CCM, CSR, etc. . Upon
322 return, all modules are at closed state.
323
324 No SME APIs can be involved after sme_Close except sme_Open.
325 sme_Close must be called before macClose.
326
327 \param hHal - The handle returned by macOpen.
328
329 \return eHAL_STATUS_SUCCESS - SME is successfully close.
330
331 Other status means SME is failed to be closed but caller still cannot
332 call any other SME functions except smeOpen.
333 \sa
334
335 --------------------------------------------------------------------------*/
336eHalStatus sme_Close(tHalHandle hHal);
337
338/*--------------------------------------------------------------------------
339
340 \brief sme_Start() - Put all SME modules at ready state.
341
342 The function starts each module in SME, PMC, CCM, CSR, etc. . Upon
343 successfully return, all modules are ready to run.
344
345 \param hHal - The handle returned by macOpen.
346
347 \return eHAL_STATUS_SUCCESS - SME is ready.
348
349 Other status means SME is failed to start.
350 \sa
351
352 --------------------------------------------------------------------------*/
353eHalStatus sme_Start(tHalHandle hHal);
354
355/*--------------------------------------------------------------------------
356
357 \brief sme_Stop() - Stop all SME modules and put them at idle state
358
359 The function stops each module in SME, PMC, CCM, CSR, etc. . Upon
360 return, all modules are at idle state ready to start.
361
362
363 \param hHal - The handle returned by macOpen.
364
Kiet Lama72a2322013-11-15 11:18:11 +0530365 \param tHalStopType - reason for stopping
Jeff Johnson295189b2012-06-20 16:38:30 -0700366
367 \return eHAL_STATUS_SUCCESS - SME is stopped.
368
369 Other status means SME is failed to stop but caller should still consider
370 SME is stopped.
371 \sa
372
373 --------------------------------------------------------------------------*/
Kiet Lama72a2322013-11-15 11:18:11 +0530374eHalStatus sme_Stop(tHalHandle hHal, tHalStopType stopType);
Jeff Johnson295189b2012-06-20 16:38:30 -0700375
376
377/*--------------------------------------------------------------------------
378
379 \brief sme_OpenSession() - Open a session for scan/roam operation.
380
381 This is a synchronous API.
382
383
384 \param hHal - The handle returned by macOpen.
385 \param callback - A pointer to the function caller specifies for roam/connect status indication
386 \param pContext - The context passed with callback
387 \param pSelfMacAddr - Caller allocated memory filled with self MAC address (6 bytes)
388 \param pbSessionId - pointer to a caller allocated buffer for returned session ID
389
390 \return eHAL_STATUS_SUCCESS - session is opened. sessionId returned.
391
392 Other status means SME is failed to open the session.
393 eHAL_STATUS_RESOURCES - no more session available.
394 \sa
395
396 --------------------------------------------------------------------------*/
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700397eHalStatus sme_OpenSession(tHalHandle hHal, csrRoamCompleteCallback callback,
398 void *pContext, tANI_U8 *pSelfMacAddr,
399 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700400
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700401/*--------------------------------------------------------------------------
402
403 \brief sme_SetCurrDeviceMode() - Sets the current operating device mode.
404 \param hHal - The handle returned by macOpen.
405 \param currDeviceMode - Current operating device mode.
406 --------------------------------------------------------------------------*/
407
408void sme_SetCurrDeviceMode (tHalHandle hHal, tVOS_CON_MODE currDeviceMode);
Jeff Johnson295189b2012-06-20 16:38:30 -0700409
410/*--------------------------------------------------------------------------
411
412 \brief sme_CloseSession() - Open a session for scan/roam operation.
413
414 This is a synchronous API.
415
416
417 \param hHal - The handle returned by macOpen.
418
419 \param sessionId - A previous opened session's ID.
420
421 \return eHAL_STATUS_SUCCESS - session is closed.
422
423 Other status means SME is failed to open the session.
424 eHAL_STATUS_INVALID_PARAMETER - session is not opened.
425 \sa
426
427 --------------------------------------------------------------------------*/
428eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId,
429 csrRoamSessionCloseCallback callback, void *pContext);
430
431
432
433/*--------------------------------------------------------------------------
434
435 \brief sme_UpdateConfig() - Change configurations for all SME moduels
436
437 The function updates some configuration for modules in SME, CCM, CSR, etc
438 during SMEs close -> open sequence.
439
440 Modules inside SME apply the new configuration at the next transaction.
441
442
443 \param hHal - The handle returned by macOpen.
444 \Param pSmeConfigParams - a pointer to a caller allocated object of
445 typedef struct _smeConfigParams.
446
447 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
448
449 Other status means SME is failed to update the config parameters.
450 \sa
451
452 --------------------------------------------------------------------------*/
453eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
454
455#ifdef FEATURE_WLAN_SCAN_PNO
456/*--------------------------------------------------------------------------
457
458 \brief sme_UpdateChannelConfig() - Update channel configuration in RIVA.
459
460 It is used at driver start up to inform RIVA of the default channel
461 configuration.
462
463 This is a synchronuous call
464
465 \param hHal - The handle returned by macOpen.
466
467 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
468
469 Other status means SME is failed to update the channel config.
470 \sa
471
472 --------------------------------------------------------------------------*/
473eHalStatus sme_UpdateChannelConfig(tHalHandle hHal);
474
475#endif // FEATURE_WLAN_SCAN_PNLO
Jeff Johnson295189b2012-06-20 16:38:30 -0700476/*--------------------------------------------------------------------------
Abhishek Singhf644b272014-08-21 02:59:39 +0530477
478 \brief sme_UpdateChannelList() - Update channel List in FW.
479
480
481 \param hHal - The handle returned by macOpen.
482
483 \return eHAL_STATUS_SUCCESS - SME update the channel config successfully.
484
485 Other status means SME is failed to update the channel config.
486 \sa
487
488 --------------------------------------------------------------------------*/
489eHalStatus sme_UpdateChannelList(tHalHandle hHal);
490
491/*--------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700492
493 \brief sme_set11dinfo() - Set the 11d information about valid channels
494 and there power using information from nvRAM
495 This function is called only for AP.
496
497 This is a synchronuous call
498
499 \param hHal - The handle returned by macOpen.
500 \Param pSmeConfigParams - a pointer to a caller allocated object of
501 typedef struct _smeConfigParams.
502
503 \return eHAL_STATUS_SUCCESS - SME update the config parameters successfully.
504
505 Other status means SME is failed to update the config parameters.
506 \sa
507--------------------------------------------------------------------------*/
508
509eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams);
510
511/*--------------------------------------------------------------------------
512
513 \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp.
514
515 This is a synchronuous call
516
517 \param hHal - The handle returned by HostapdAdapter.
518 \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp.
519
520 \return eHAL_STATUS_SUCCESS - SME successfully completed the request.
521
522 Other status means, failed to get the current regulatory domain.
523 \sa
524--------------------------------------------------------------------------*/
525
526eHalStatus sme_getSoftApDomain(tHalHandle hHal, v_REGDOMAIN_t *domainIdSoftAp);
527
528eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
529
Jeff Johnson295189b2012-06-20 16:38:30 -0700530
531/* ---------------------------------------------------------------------------
532 \fn sme_ChangeConfigParams
533 \brief The SME API exposed for HDD to provide config params to SME during
534 SMEs stop -> start sequence.
535
536 If HDD changed the domain that will cause a reset. This function will
537 provide the new set of 11d information for the new domain. Currrently this
538 API provides info regarding 11d only at reset but we can extend this for
539 other params (PMC, QoS) which needs to be initialized again at reset.
540
541 This is a synchronuous call
542
543 \param hHal - The handle returned by macOpen.
544
545 \Param
546 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
547 currently provides 11d related information like Country code,
548 Regulatory domain, valid channel list, Tx power per channel, a
549 list with active/passive scan allowed per valid channel.
550
551 \return eHalStatus
552 ---------------------------------------------------------------------------*/
553eHalStatus sme_ChangeConfigParams(tHalHandle hHal,
554 tCsrUpdateConfigParam *pUpdateConfigParam);
555
556/*--------------------------------------------------------------------------
557
558 \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform that the NIC
559 is ready tio run.
560
561 The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC
562 to running state.
563
564
565 \param hHal - The handle returned by macOpen.
566
567 \return eHAL_STATUS_SUCCESS - eWNI_SME_SYS_READY_IND is sent to PE successfully.
568
569 Other status means SME failed to send the message to PE.
570 \sa
571
572 --------------------------------------------------------------------------*/
573eHalStatus sme_HDDReadyInd(tHalHandle hHal);
574
575
576/*--------------------------------------------------------------------------
577
578 \brief sme_ProcessMsg() - The main message processor for SME.
579
580 The function is called by a message dispatcher when to process a message
581 targeted for SME.
582
583
584 \param hHal - The handle returned by macOpen.
585 \param pMsg - A pointer to a caller allocated object of tSirMsgQ.
586
587 \return eHAL_STATUS_SUCCESS - SME successfully process the message.
588
589 Other status means SME failed to process the message.
590 \sa
591
592 --------------------------------------------------------------------------*/
593eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg);
594
595v_VOID_t sme_FreeMsg( tHalHandle hHal, vos_msg_t* pMsg );
596
597/* ---------------------------------------------------------------------------
598 \fn sme_ScanRequest
599 \brief a wrapper function to Request a 11d or full scan from CSR.
600 \param pScanRequestID - pointer to an object to get back the request ID
601 \param callback - a callback function that scan calls upon finish, will not
602 be called if csrScanRequest returns error
603 \param pContext - a pointer passed in for the callback
604 \return eHalStatus
605 ---------------------------------------------------------------------------*/
606eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest *,
607 tANI_U32 *pScanRequestID,
608 csrScanCompleteCallback callback, void *pContext);
609
610
611/* ---------------------------------------------------------------------------
612 \fn sme_ScanSetBGScanparams
613 \brief a wrapper function to request CSR to set BG scan params in PE
614 \param pScanReq - BG scan request structure
615 \return eHalStatus
616 ---------------------------------------------------------------------------*/
617eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGScanRequest *pScanReq);
618
619
620/* ---------------------------------------------------------------------------
621 \fn sme_ScanGetResult
622 \brief a wrapper function to request scan results from CSR.
623 \param pFilter - If pFilter is NULL, all cached results are returned
624 \param phResult - an object for the result.
625 \return eHalStatus
626 ---------------------------------------------------------------------------*/
627eHalStatus sme_ScanGetResult(tHalHandle hHal, tANI_U8 sessionId, tCsrScanResultFilter *pFilter,
628 tScanResultHandle *phResult);
629
630
631/* ---------------------------------------------------------------------------
632 \fn sme_ScanFlushResult
633 \brief a wrapper function to request CSR to clear scan results.
634 \return eHalStatus
635 ---------------------------------------------------------------------------*/
636eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530637
638/*
639 * ---------------------------------------------------------------------------
640 * \fn sme_FilterScanResults
641 * \brief a wrapper function to request CSR to filter the scan results based
642 * on valid chennel list.
643 * \return eHalStatus
644 *---------------------------------------------------------------------------
645 */
646eHalStatus sme_FilterScanResults(tHalHandle hHal, tANI_U8 sessionId);
647
Madan Mohan Koyyalamudia3fcf142012-10-18 15:01:20 -0700648eHalStatus sme_ScanFlushP2PResult(tHalHandle hHal, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700649
650/* ---------------------------------------------------------------------------
651 \fn sme_ScanResultGetFirst
652 \brief a wrapper function to request CSR to returns the first element of
653 scan result.
654 \param hScanResult - returned from csrScanGetResult
655 \return tCsrScanResultInfo * - NULL if no result
656 ---------------------------------------------------------------------------*/
657tCsrScanResultInfo *sme_ScanResultGetFirst(tHalHandle,
658 tScanResultHandle hScanResult);
659
660/* ---------------------------------------------------------------------------
661 \fn sme_ScanResultGetNext
662 \brief a wrapper function to request CSR to returns the next element of
663 scan result. It can be called without calling csrScanResultGetFirst
664 first
665 \param hScanResult - returned from csrScanGetResult
666 \return Null if no result or reach the end
667 ---------------------------------------------------------------------------*/
668tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle,
669 tScanResultHandle hScanResult);
670
671/* ---------------------------------------------------------------------------
672 \fn sme_ScanResultPurge
673 \brief a wrapper function to request CSR to remove all items(tCsrScanResult)
674 in the list and free memory for each item
675 \param hScanResult - returned from csrScanGetResult. hScanResult is
676 considered gone by
677 calling this function and even before this function reutrns.
678 \return eHalStatus
679 ---------------------------------------------------------------------------*/
680eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult);
681
682/* ---------------------------------------------------------------------------
683 \fn sme_ScanGetPMKIDCandidateList
684 \brief a wrapper function to return the PMKID candidate list
685 \param pPmkidList - caller allocated buffer point to an array of
686 tPmkidCandidateInfo
687 \param pNumItems - pointer to a variable that has the number of
688 tPmkidCandidateInfo allocated when retruning, this is
689 either the number needed or number of items put into
690 pPmkidList
691 \return eHalStatus - when fail, it usually means the buffer allocated is not
692 big enough and pNumItems
693 has the number of tPmkidCandidateInfo.
694 \Note: pNumItems is a number of tPmkidCandidateInfo,
695 not sizeof(tPmkidCandidateInfo) * something
696 ---------------------------------------------------------------------------*/
697eHalStatus sme_ScanGetPMKIDCandidateList(tHalHandle hHal, tANI_U8 sessionId,
698 tPmkidCandidateInfo *pPmkidList,
699 tANI_U32 *pNumItems );
700
701
702/*----------------------------------------------------------------------------
703 \fn sme_RoamRegisterLinkQualityIndCallback
704
705 \brief
706 a wrapper function to allow HDD to register a callback handler with CSR for
707 link quality indications.
708
709 Only one callback may be registered at any time.
710 In order to deregister the callback, a NULL cback may be provided.
711
712 Registration happens in the task context of the caller.
713
714 \param callback - Call back being registered
715 \param pContext - user data
716
717 DEPENDENCIES: After CSR open
718
719 \return eHalStatus
720-----------------------------------------------------------------------------*/
721eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessionId,
722 csrRoamLinkQualityIndCallback callback,
723 void *pContext);
724
725
726/* ---------------------------------------------------------------------------
727 \fn sme_RoamConnect
728 \brief a wrapper function to request CSR to inititiate an association
729 \param sessionId - the sessionId returned by sme_OpenSession.
730 \param pProfile - can be NULL to join to any open ones
731 \param pRoamId - to get back the request ID
732 \return eHalStatus
733 ---------------------------------------------------------------------------*/
734eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
735 tANI_U32 *pRoamId);
736
737/* ---------------------------------------------------------------------------
738 \fn sme_RoamReassoc
739 \brief a wrapper function to request CSR to inititiate a re-association
740 \param pProfile - can be NULL to join the currently connected AP. In that
741 case modProfileFields should carry the modified field(s) which could trigger
742 reassoc
743 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
744 that might need modification dynamically once STA is up & running and this
745 could trigger a reassoc
746 \param pRoamId - to get back the request ID
747 \return eHalStatus
748 -------------------------------------------------------------------------------*/
749eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile *pProfile,
750 tCsrRoamModifyProfileFields modProfileFields,
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700751 tANI_U32 *pRoamId, v_BOOL_t fForce);
Jeff Johnson295189b2012-06-20 16:38:30 -0700752
753/* ---------------------------------------------------------------------------
754 \fn sme_RoamConnectToLastProfile
755 \brief a wrapper function to request CSR to disconnect and reconnect with
756 the same profile
757 \return eHalStatus. It returns fail if currently connected
758 ---------------------------------------------------------------------------*/
759eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId);
760
761/* ---------------------------------------------------------------------------
762 \fn sme_RoamDisconnect
763 \brief a wrapper function to request CSR to disconnect from a network
764 \param reason -- To indicate the reason for disconnecting. Currently, only
765 eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
766 \return eHalStatus
767 ---------------------------------------------------------------------------*/
768eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason);
769
Jeff Johnson295189b2012-06-20 16:38:30 -0700770/* ---------------------------------------------------------------------------
771 \fn sme_RoamStopBss
772 \brief a wrapper function to request CSR to stop bss
773 \param sessionId - sessionId of SoftAP
774 \return eHalStatus
775 ---------------------------------------------------------------------------*/
776eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId);
777
778/* ---------------------------------------------------------------------------
779 \fn sme_RoamGetAssociatedStas
780 \brief To probe the list of associated stations from various modules of CORE stack.
781 \This is an asynchronous API.
782 \param sessionId - sessionId of SoftAP
783 \param modId - Module from whom list of associtated stations is to be probed.
784 If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed
785 \param pUsrContext - Opaque HDD context
786 \param pfnSapEventCallback - Sap event callback in HDD
787 \param pAssocBuf - Caller allocated memory to be filled with associatd stations info
788 \return eHalStatus
789 -------------------------------------------------------------------------------*/
790eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId,
791 VOS_MODULE_ID modId, void *pUsrContext,
792 void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf);
793
794/* ---------------------------------------------------------------------------
795 \fn sme_RoamDisconnectSta
796 \brief To disassociate a station. This is an asynchronous API.
797 \param pPeerMacAddr - Caller allocated memory filled with peer MAC address (6 bytes)
798 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
799 -------------------------------------------------------------------------------*/
800eHalStatus sme_RoamDisconnectSta(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPeerMacAddr);
801
802/* ---------------------------------------------------------------------------
803 \fn sme_RoamDeauthSta
804 \brief To disassociate a station. This is an asynchronous API.
805 \param hHal - Global structure
806 \param sessionId - sessionId of SoftAP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530807 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -0700808 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
809 -------------------------------------------------------------------------------*/
810eHalStatus sme_RoamDeauthSta(tHalHandle hHal, tANI_U8 sessionId,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +0530811 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -0700812
813/* ---------------------------------------------------------------------------
814 \fn sme_RoamTKIPCounterMeasures
815 \brief To start or stop TKIP counter measures. This is an asynchronous API.
816 \param sessionId - sessionId of SoftAP
817 \param bEnable - Flag to start/stop TKIP countermeasures
818 \return eHalStatus SUCCESS Roam callback will be called to indicate actual results
819 -------------------------------------------------------------------------------*/
820eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, tANI_BOOLEAN bEnable);
821
822/* ---------------------------------------------------------------------------
823 \fn sme_RoamGetWpsSessionOverlap
824 \brief To get the WPS PBC session overlap information.
825 \This is an asynchronous API.
826 \param sessionId - sessionId of SoftAP
827 \param pUsrContext - Opaque HDD context
828 \param pfnSapEventCallback - Sap event callback in HDD
829 \return eHalStatus
830 -------------------------------------------------------------------------------*/
831eHalStatus sme_RoamGetWpsSessionOverlap(tHalHandle hHal, tANI_U8 sessionId,
832 void *pUsrContext, void *pfnSapEventCallback,
833 v_MACADDR_t pRemoveMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700834
835/* ---------------------------------------------------------------------------
836 \fn sme_RoamGetConnectState
837 \brief a wrapper function to request CSR to return the current connect state
838 of Roaming
839 \return eHalStatus
840 ---------------------------------------------------------------------------*/
841eHalStatus sme_RoamGetConnectState(tHalHandle hHal, tANI_U8 sessionId, eCsrConnectState *pState);
842
843/* ---------------------------------------------------------------------------
844 \fn sme_RoamGetConnectProfile
845 \brief a wrapper function to request CSR to return the current connect
846 profile. Caller must call csrRoamFreeConnectProfile after it is done
847 and before reuse for another csrRoamGetConnectProfile call.
848 \param pProfile - pointer to a caller allocated structure
849 tCsrRoamConnectedProfile
850 \return eHalStatus. Failure if not connected
851 ---------------------------------------------------------------------------*/
852eHalStatus sme_RoamGetConnectProfile(tHalHandle hHal, tANI_U8 sessionId,
853 tCsrRoamConnectedProfile *pProfile);
854
855/* ---------------------------------------------------------------------------
856 \fn sme_RoamFreeConnectProfile
857 \brief a wrapper function to request CSR to free and reinitialize the
858 profile returned previously by csrRoamGetConnectProfile.
859 \param pProfile - pointer to a caller allocated structure
860 tCsrRoamConnectedProfile
861 \return eHalStatus.
862 ---------------------------------------------------------------------------*/
863eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal,
864 tCsrRoamConnectedProfile *pProfile);
865
866/* ---------------------------------------------------------------------------
867 \fn sme_RoamSetPMKIDCache
868 \brief a wrapper function to request CSR to return the PMKID candidate list
869 \param pPMKIDCache - caller allocated buffer point to an array of
870 tPmkidCacheInfo
871 \param numItems - a variable that has the number of tPmkidCacheInfo
872 allocated when retruning, this is either the number needed
873 or number of items put into pPMKIDCache
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530874 \param update_entire_cache - if TRUE, then it overwrites the entire cache
875 with pPMKIDCache, else it updates entry by
876 entry without deleting the old entries.
Jeff Johnson295189b2012-06-20 16:38:30 -0700877 \return eHalStatus - when fail, it usually means the buffer allocated is not
878 big enough and pNumItems has the number of
879 tPmkidCacheInfo.
880 \Note: pNumItems is a number of tPmkidCacheInfo,
881 not sizeof(tPmkidCacheInfo) * something
882 ---------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530883eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
884 tPmkidCacheInfo *pPMKIDCache,
885 tANI_U32 numItems,
886 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700887
888/* ---------------------------------------------------------------------------
889 \fn sme_RoamGetSecurityReqIE
890 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR
891 passes to PE to JOIN request or START_BSS request
892 This is a synchronuous call.
893 \param sessionId - returned by sme_OpenSession.
894 \param pLen - caller allocated memory that has the length of pBuf as input.
895 Upon returned, *pLen has the needed or IE length in pBuf.
896 \param pBuf - Caller allocated memory that contain the IE field, if any,
897 upon return
898 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
899 \return eHalStatus - when fail, it usually means the buffer allocated is not
900 big enough
901 ---------------------------------------------------------------------------*/
902eHalStatus sme_RoamGetSecurityReqIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
903 tANI_U8 *pBuf, eCsrSecurityType secType);
904
905/* ---------------------------------------------------------------------------
906 \fn sme_RoamGetSecurityRspIE
907 \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE from
908 the beacon or probe rsp if connected
909 \param sessionId - returned by sme_OpenSession.
910 \param pLen - caller allocated memory that has the length of pBuf as input.
911 Upon returned, *pLen has the needed or IE length in pBuf.
912 \param pBuf - Caller allocated memory that contain the IE field, if any,
913 upon return
914 \param secType - Specifies whether looking for WPA/WPA2/WAPI IE
915 \return eHalStatus - when fail, it usually means the buffer allocated is not
916 big enough
917 ---------------------------------------------------------------------------*/
918eHalStatus sme_RoamGetSecurityRspIE(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pLen,
919 tANI_U8 *pBuf, eCsrSecurityType secType);
920
921
922/* ---------------------------------------------------------------------------
923 \fn sme_RoamGetNumPMKIDCache
924 \brief a wrapper function to request CSR to return number of PMKID cache
925 entries
926 \return tANI_U32 - the number of PMKID cache entries
927 ---------------------------------------------------------------------------*/
928tANI_U32 sme_RoamGetNumPMKIDCache(tHalHandle hHal, tANI_U8 sessionId);
929
930/* ---------------------------------------------------------------------------
931 \fn sme_RoamGetPMKIDCache
932 \brief a wrapper function to request CSR to return PMKID cache from CSR
933 \param pNum - caller allocated memory that has the space of the number of
934 pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
935 needed or actually number in tPmkidCacheInfo.
936 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if
937 any, upon return
938 \return eHalStatus - when fail, it usually means the buffer allocated is not
939 big enough
940 ---------------------------------------------------------------------------*/
941eHalStatus sme_RoamGetPMKIDCache(tHalHandle hHal, tANI_U8 sessionId, tANI_U32 *pNum,
942 tPmkidCacheInfo *pPmkidCache);
943
944/* ---------------------------------------------------------------------------
945 \fn sme_GetConfigParam
946 \brief a wrapper function that HDD calls to get the global settings
947 currently maintained by CSR.
948 \param pParam - caller allocated memory
949 \return eHalStatus
950 ---------------------------------------------------------------------------*/
951eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam);
952
953/* ---------------------------------------------------------------------------
954 \fn sme_GetStatistics
955 \brief a wrapper function that client calls to register a callback to get
956 different PHY level statistics from CSR.
957
958 \param requesterId - different client requesting for statistics, HDD, UMA/GAN etc
959 \param statsMask - The different category/categories of stats requester is looking for
960 The order in which you set the bits in the statsMask for requesting
961 different type of stats is:
962
963 eCsrSummaryStats = bit 0
964 eCsrGlobalClassAStats = bit 1
965 eCsrGlobalClassBStats = bit 2
966 eCsrGlobalClassCStats = bit 3
967 eCsrGlobalClassDStats = bit 4
968 eCsrPerStaStats = bit 5
969
970 \param callback - SME sends back the requested stats using the callback
971 \param periodicity - If requester needs periodic update, 0 means it's an one
972 time request
973 \param cache - If requester is happy with cached stats
974 \param staId - The station ID for which the stats is requested for
975 \param pContext - user context to be passed back along with the callback
976 \return eHalStatus
977 ---------------------------------------------------------------------------*/
978eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId,
979 tANI_U32 statsMask,
980 tCsrStatsCallback callback,
981 tANI_U32 periodicity, tANI_BOOLEAN cache,
982 tANI_U8 staId, void *pContext);
983
Madan Mohan Koyyalamudi8af9b402013-07-11 14:59:10 +0530984/* ---------------------------------------------------------------------------
985 \fn smeGetTLSTAState
986 \helper function to get teh TL STA State whenever the function is called.
987
988 \param staId - The staID to be passed to the TL
989 to get the relevant TL STA State
990 \return the state as tANI_U16
991 ---------------------------------------------------------------------------*/
992tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
993
Jeff Johnson295189b2012-06-20 16:38:30 -0700994eHalStatus sme_GetRssi(tHalHandle hHal,
995 tCsrRssiCallback callback,
996 tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +0530997
998/* ---------------------------------------------------------------------------
999 \fn sme_GetSnr
1000 \brief a wrapper function that client calls to register a callback to get
1001 SNR from FW
1002
1003 \param callback - SME sends back the requested stats using the callback
1004 \param staId - The station ID for which the stats is requested for
1005 \param bssid - The bssid of the connected session
1006 \param pContext - user context to be passed back along with the callback
1007 ---------------------------------------------------------------------------*/
1008eHalStatus sme_GetSnr(tHalHandle hHal,
1009 tCsrSnrCallback callback,
1010 tANI_U8 staId, tCsrBssid bssId,
1011 void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001012#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_ESE || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdad34cedb2013-01-25 13:33:11 -08001013eHalStatus sme_GetRoamRssi(tHalHandle hHal,
1014 tCsrRssiCallback callback,
1015 tANI_U8 staId,
1016 tCsrBssid bssId,
1017 void *pContext,
1018 void* pVosContext);
1019#endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001020
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001021#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001022/* ---------------------------------------------------------------------------
1023 \fn sme_GetTsmStats
1024 \brief a wrapper function that client calls to register a callback to get TSM Stats
1025
1026 \param callback - SME sends back the requested stats using the callback
1027 \param staId - The station ID for which the stats is requested for
1028 \param pContext - user context to be passed back along with the callback
1029 \param pVosContext - vos context
1030 \return eHalStatus
1031 ---------------------------------------------------------------------------*/
1032eHalStatus sme_GetTsmStats(tHalHandle hHal,
1033 tCsrTsmStatsCallback callback,
1034 tANI_U8 staId, tCsrBssid bssId,
1035 void *pContext, void* pVosContext, tANI_U8 tid);
1036
1037/* ---------------------------------------------------------------------------
1038 \fn sme_SetCCKMIe
1039 \brief function to store the CCKM IE passed from supplicant and use it while packing
1040 reassociation request
1041 \param hHal - HAL handle for device
1042 \param pCckmIe - pointer to CCKM IE data
1043 \param pCckmIeLen - length of the CCKM IE
1044 \- return Success or failure
1045 -------------------------------------------------------------------------*/
1046eHalStatus sme_SetCCKMIe(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pCckmIe, tANI_U8 cckmIeLen);
1047
1048
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001049/* ---------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001050 \fn sme_SetEseBeaconRequest
1051 \brief function to set ESE beacon request parameters
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001052 \param hHal - HAL handle for device
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001053 \param pESEBcnReq - pointer to ESE beacon request
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001054 \- return Success or failure
1055 -------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001056eHalStatus sme_SetEseBeaconRequest(tHalHandle hHal, const tANI_U8 sessionId,
1057 const tCsrEseBeaconReq* pEseBcnReq);
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001058
1059
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001060#endif /*FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001061/* ---------------------------------------------------------------------------
1062 \fn sme_CfgSetInt
1063 \brief a wrapper function that HDD calls to set parameters in CFG.
1064 \param cfgId - Configuration Parameter ID (type) for STA.
1065 \param ccmValue - The information related to Configuration Parameter ID
1066 which needs to be saved in CFG
1067 \param callback - To be registered by CSR with CCM. Once the CFG done with
1068 saving the information in the database, it notifies CCM &
1069 then the callback will be invoked to notify.
1070 \param toBeSaved - To save the request for future reference
1071 \return eHalStatus
1072 ---------------------------------------------------------------------------*/
1073eHalStatus sme_CfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue,
1074 tCcmCfgSetCallback callback, eAniBoolean toBeSaved) ;
1075
1076/* ---------------------------------------------------------------------------
1077 \fn sme_CfgSetStr
1078 \brief a wrapper function that HDD calls to set parameters in CFG.
1079 \param cfgId - Configuration Parameter ID (type) for STA.
1080 \param pStr - Pointer to the byte array which carries the information needs
1081 to be saved in CFG
1082 \param length - Length of the data to be saved
1083 \param callback - To be registered by CSR with CCM. Once the CFG done with
1084 saving the information in the database, it notifies CCM &
1085 then the callback will be invoked to notify.
1086 \param toBeSaved - To save the request for future reference
1087 \return eHalStatus
1088 ---------------------------------------------------------------------------*/
1089eHalStatus sme_CfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr,
1090 tANI_U32 length, tCcmCfgSetCallback callback,
1091 eAniBoolean toBeSaved) ;
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301092/* ---------------------------------------------------------------------------
1093 \fn sme_GetModifyProfileFields
1094 \brief HDD or SME - QOS calls this function to get the current values of
1095 connected profile fields, changing which can cause reassoc.
1096 This function must be called after CFG is downloaded and STA is in connected
1097 state. Also, make sure to call this function to get the current profile
1098 fields before calling the reassoc. So that pModifyProfileFields will have
1099 all the latest values plus the one(s) has been updated as part of reassoc
1100 request.
1101 \param pModifyProfileFields - pointer to the connected profile fields
1102 changing which can cause reassoc
Jeff Johnson295189b2012-06-20 16:38:30 -07001103
Sandeep Puligillaa3e76952014-06-23 15:53:11 +05301104 \return eHalStatus
1105 -------------------------------------------------------------------------------*/
1106eHalStatus sme_GetModifyProfileFields(tHalHandle hHal, tANI_U8 sessionId,
1107 tCsrRoamModifyProfileFields * pModifyProfileFields);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301108/* ---------------------------------------------------------------------------
1109 \fn sme_HT40StopOBSSScan
1110 \brief HDD or SME - Command to stop the OBSS scan
1111 THis is implemented only for debugging purpose.
1112 As per spec while operating in 2.4GHz OBSS scan shouldnt be stopped.
1113 \param sessionId - sessionId
1114 changing which can cause reassoc
1115
1116 \return eHalStatus
1117 -------------------------------------------------------------------------------*/
1118eHalStatus sme_HT40StopOBSSScan(tHalHandle hHal, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -07001119
1120/*--------------------------------------------------------------------------
1121 \fn sme_SetConfigPowerSave
1122 \brief Wrapper fn to change power save configuration in SME (PMC) module.
1123 For BMPS related configuration, this function also updates the CFG
1124 and sends a message to FW to pick up the new values. Note: Calling
1125 this function only updates the configuration and does not enable
1126 the specified power save mode.
1127 \param hHal - The handle returned by macOpen.
1128 \param psMode - Power Saving mode being modified
1129 \param pConfigParams - a pointer to a caller allocated object of type
1130 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1131 \return eHalStatus
1132 --------------------------------------------------------------------------*/
1133eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1134 void *pConfigParams);
1135
1136/*--------------------------------------------------------------------------
1137 \fn sme_GetConfigPowerSave
1138 \brief Wrapper fn to retireve power save configuration in SME (PMC) module
1139 \param hHal - The handle returned by macOpen.
1140 \param psMode - Power Saving mode
1141 \param pConfigParams - a pointer to a caller allocated object of type
1142 tPmcSmpsConfigParams or tPmcBmpsConfigParams or tPmcImpsConfigParams
1143 \return eHalStatus
1144 --------------------------------------------------------------------------*/
1145eHalStatus sme_GetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode,
1146 void *pConfigParams);
1147
1148/* ---------------------------------------------------------------------------
1149 \fn sme_SignalPowerEvent
1150 \brief Signals to PMC that a power event has occurred. Used for putting
1151 the chip into deep sleep mode.
1152 \param hHal - The handle returned by macOpen.
1153 \param event - the event that has occurred
1154 \return eHalStatus
1155 ---------------------------------------------------------------------------*/
1156extern eHalStatus sme_SignalPowerEvent (
1157 tHalHandle hHal,
1158 tPmcPowerEvent event);
1159
1160/* ---------------------------------------------------------------------------
1161 \fn sme_EnablePowerSave
1162 \brief Enables one of the power saving modes. This API does not cause a
1163 device state change. This is purely a configuration API.
1164 \param hHal - The handle returned by macOpen.
1165 \param psMode - The power saving mode to enable.
1166 \return eHalStatus
1167 ---------------------------------------------------------------------------*/
1168extern eHalStatus sme_EnablePowerSave (
1169 tHalHandle hHal,
1170 tPmcPowerSavingMode psMode);
1171
1172/* ---------------------------------------------------------------------------
1173 \fn sme_DisablePowerSave
1174 \brief Disables one of the power saving modes.Disabling does not imply
1175 that device will be brought out of the current PS mode. This is
1176 purely a configuration API.
1177 \param hHal - The handle returned by macOpen.
1178 \param psMode - The power saving mode to disable.
1179 \return eHalStatus
1180 ---------------------------------------------------------------------------*/
1181extern eHalStatus sme_DisablePowerSave (
1182 tHalHandle hHal,
1183 tPmcPowerSavingMode psMode);
1184
Madan Mohan Koyyalamudi69b34182013-01-16 08:51:40 +05301185 /* ---------------------------------------------------------------------------
1186 \fn sme_SetHostPowerSave
1187 \brief The BMPS logic is controlled by the User level Apps
1188 \param hHal - The handle returned by macOpen.
1189 \param psMode - The power saving mode to enable.
1190 \return eHalStatus
1191 ---------------------------------------------------------------------------*/
1192extern eHalStatus sme_SetHostPowerSave (
1193 tHalHandle hHal,
1194 v_BOOL_t psMode);
1195
Jeff Johnson295189b2012-06-20 16:38:30 -07001196/* ---------------------------------------------------------------------------
1197 \fn sme_StartAutoBmpsTimer
1198 \brief Starts a timer that periodically polls all the registered
1199 module for entry into Bmps mode. This timer is started only if BMPS is
1200 enabled and whenever the device is in full power.
1201 \param hHal - The handle returned by macOpen.
1202 \return eHalStatus
1203 ---------------------------------------------------------------------------*/
1204extern eHalStatus sme_StartAutoBmpsTimer ( tHalHandle hHal);
1205
1206/* ---------------------------------------------------------------------------
1207 \fn sme_StopAutoBmpsTimer
1208 \brief Stops the Auto BMPS Timer that was started using sme_startAutoBmpsTimer
1209 Stopping the timer does not cause a device state change. Only the timer
1210 is stopped. If "Full Power" is desired, use the sme_RequestFullPower API
1211 \param hHal - The handle returned by macOpen.
1212 \return eHalStatus
1213 ---------------------------------------------------------------------------*/
1214extern eHalStatus sme_StopAutoBmpsTimer ( tHalHandle hHal);
1215
1216/* ---------------------------------------------------------------------------
1217 \fn sme_QueryPowerState
1218 \brief Returns the current power state of the device.
1219 \param hHal - The handle returned by macOpen.
1220 \param pPowerState - pointer to location to return power state
1221 \param pSwWlanSwitchState - ptr to location to return SW WLAN Switch state
1222 \return eHalStatus
1223 ---------------------------------------------------------------------------*/
1224extern eHalStatus sme_QueryPowerState (
1225 tHalHandle hHal,
1226 tPmcPowerState *pPowerState,
1227 tPmcSwitchState *pSwWlanSwitchState);
1228
1229/* ---------------------------------------------------------------------------
1230 \fn sme_IsPowerSaveEnabled
1231 \brief Checks if the device is able to enter a particular power save mode
1232 This does not imply that the device is in a particular PS mode
1233 \param hHal - The handle returned by macOpen.
1234 \param psMode - the power saving mode
1235 \return eHalStatus
1236 ---------------------------------------------------------------------------*/
1237extern tANI_BOOLEAN sme_IsPowerSaveEnabled(
1238 tHalHandle hHal,
1239 tPmcPowerSavingMode psMode);
1240
1241/* ---------------------------------------------------------------------------
1242 \fn sme_RequestFullPower
1243 \brief Request that the device be brought to full power state.
1244 Note 1: If "fullPowerReason" specificied in this API is set to
1245 eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests
1246 and also clear any "buffered BMPS requests by HDD". Assumption is that since
1247 HDD is requesting full power, we need to undo any previous HDD requests for
1248 BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is
1249 specified anything other than above, the buffered requests for BMPS and WoWL
1250 will not be cleared.
1251 Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't
1252 disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd
1253 request".
1254 Note 3: When the device finally enters Full Power PMC will start a timer
1255 if any of the following holds true:
1256 - Auto BMPS mode is enabled
1257 - Uapsd request is pending
1258 - HDD's request for BMPS is pending
1259 - HDD's request for WoWL is pending
1260 On timer expiry PMC will attempt to put the device in BMPS mode if following
1261 (in addition to those listed above) holds true:
1262 - Polling of all modules through the Power Save Check routine passes
1263 - STA is associated to an access point
1264 \param hHal - The handle returned by macOpen.
1265 \param - callbackRoutine Callback routine invoked in case of success/failure
1266 \param - callbackContext - Cookie to be passed back during callback
1267 \param - fullPowerReason - Reason why this API is being invoked. SME needs to
1268 distinguish between BAP and HDD requests
1269 \return eHalStatus - status
1270 eHAL_STATUS_SUCCESS - device brought to full power state
1271 eHAL_STATUS_FAILURE - device cannot be brought to full power state
1272 eHAL_STATUS_PMC_PENDING - device is being brought to full power state,
1273 ---------------------------------------------------------------------------*/
1274extern eHalStatus sme_RequestFullPower (
1275 tHalHandle hHal,
1276 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1277 void *callbackContext,
1278 tRequestFullPowerReason fullPowerReason);
1279
1280/* ---------------------------------------------------------------------------
1281 \fn sme_RequestBmps
1282 \brief Request that the device be put in BMPS state. Request will be
1283 accepted only if BMPS mode is enabled and power save check routine
1284 passes. Only HDD should invoke this API.
1285 \param hHal - The handle returned by macOpen.
1286 \param - callbackRoutine Callback routine invoked in case of success/failure
1287 \param - callbackContext - Cookie to be passed back during callback
1288 \return eHalStatus
1289 eHAL_STATUS_SUCCESS - device is in BMPS state
1290 eHAL_STATUS_FAILURE - device cannot be brought to BMPS state
1291 eHAL_STATUS_PMC_PENDING - device is being brought to BMPS state
1292 ---------------------------------------------------------------------------*/
1293extern eHalStatus sme_RequestBmps (
1294 tHalHandle hHal,
1295 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1296 void *callbackContext);
1297
1298/* ---------------------------------------------------------------------------
1299 \fn sme_SetDHCPTillPowerActiveFlag
1300 \brief Sets/Clears DHCP related flag in PMC to disable/enable auto BMPS
1301 entry by PMC
1302 \param hHal - The handle returned by macOpen.
1303 ---------------------------------------------------------------------------*/
1304void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag);
1305
1306
1307/* ---------------------------------------------------------------------------
1308 \fn sme_StartUapsd
1309 \brief Request that the device be put in UAPSD state. If the device is in
1310 Full Power it will be put in BMPS mode first and then into UAPSD
1311 mode.
1312 \param hHal - The handle returned by macOpen.
1313 \param - callbackRoutine Callback routine invoked in case of success/failure
1314 \param - callbackContext - Cookie to be passed back during callback
1315 eHAL_STATUS_SUCCESS - device is in UAPSD state
1316 eHAL_STATUS_FAILURE - device cannot be brought to UAPSD state
1317 eHAL_STATUS_PMC_PENDING - device is being brought to UAPSD state
1318 eHAL_STATUS_PMC_DISABLED - UAPSD is disabled or BMPS mode is disabled
1319 \return eHalStatus
1320 ---------------------------------------------------------------------------*/
1321extern eHalStatus sme_StartUapsd (
1322 tHalHandle hHal,
1323 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1324 void *callbackContext);
1325
1326/* ---------------------------------------------------------------------------
1327 \fn sme_StopUapsd
1328 \brief Request that the device be put out of UAPSD state. Device will be
1329 put in in BMPS state after stop UAPSD completes. Buffered requests for
1330 UAPSD will be cleared after this.
1331 \param hHal - The handle returned by macOpen.
1332 \return eHalStatus
1333 eHAL_STATUS_SUCCESS - device is put out of UAPSD and back in BMPS state
1334 eHAL_STATUS_FAILURE - device cannot be brought out of UAPSD state
1335 ---------------------------------------------------------------------------*/
1336extern eHalStatus sme_StopUapsd (tHalHandle hHal);
1337
1338/* ---------------------------------------------------------------------------
1339 \fn sme_RequestStandby
1340 \brief Request that the device be put in standby. It is HDD's responsibility
1341 to bring the chip to full power and do a discconnect before calling
1342 this API. Request for standby will be rejected if STA is associated
1343 to an AP.
1344 \param hHal - The handle returned by macOpen.
1345 \param - callbackRoutine Callback routine invoked in case of success/failure
1346 \param - callbackContext - Cookie to be passed back during callback
1347 \return eHalStatus
1348 eHAL_STATUS_SUCCESS - device is in Standby mode
1349 eHAL_STATUS_FAILURE - device cannot be put in standby mode
1350 eHAL_STATUS_PMC_PENDING - device is being put in standby mode
1351 ---------------------------------------------------------------------------*/
1352extern eHalStatus sme_RequestStandby (
1353 tHalHandle hHal,
1354 void (*callbackRoutine) (void *callbackContext, eHalStatus status),
1355 void *callbackContext);
1356
1357/* ---------------------------------------------------------------------------
1358 \fn sme_RegisterPowerSaveCheck
1359 \brief Register a power save check routine that is called whenever
1360 the device is about to enter one of the power save modes.
1361 \param hHal - The handle returned by macOpen.
1362 \param checkRoutine - Power save check routine to be registered
1363 \param callbackContext - Cookie to be passed back during callback
1364 \return eHalStatus
1365 eHAL_STATUS_SUCCESS - successfully registered
1366 eHAL_STATUS_FAILURE - not successfully registered
1367 ---------------------------------------------------------------------------*/
1368extern eHalStatus sme_RegisterPowerSaveCheck (
1369 tHalHandle hHal,
1370 tANI_BOOLEAN (*checkRoutine) (void *checkContext), void *checkContext);
1371
1372/* ---------------------------------------------------------------------------
Mihir Shetefc7ff5b2014-01-27 11:30:05 +05301373 \fn sme_Register11dScanDoneCallback
1374 \brief Register a routine of type csrScanCompleteCallback which is
1375 called whenever an 11d scan is done
1376 \param hHal - The handle returned by macOpen.
1377 \param callback - 11d scan complete routine to be registered
1378 \return eHalStatus
1379 ---------------------------------------------------------------------------*/
1380extern eHalStatus sme_Register11dScanDoneCallback (
1381 tHalHandle hHal,
1382 csrScanCompleteCallback);
1383
1384/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001385 \fn sme_DeregisterPowerSaveCheck
1386 \brief Deregister a power save check routine
1387 \param hHal - The handle returned by macOpen.
1388 \param checkRoutine - Power save check routine to be deregistered
1389 \return eHalStatus
1390 eHAL_STATUS_SUCCESS - successfully deregistered
1391 eHAL_STATUS_FAILURE - not successfully deregistered
1392 ---------------------------------------------------------------------------*/
1393extern eHalStatus sme_DeregisterPowerSaveCheck (
1394 tHalHandle hHal,
1395 tANI_BOOLEAN (*checkRoutine) (void *checkContext));
1396
1397/* ---------------------------------------------------------------------------
1398 \fn sme_RegisterDeviceStateUpdateInd
1399 \brief Register a callback routine that is called whenever
1400 the device enters a new device state (Full Power, BMPS, UAPSD)
1401 \param hHal - The handle returned by macOpen.
1402 \param callbackRoutine - Callback routine to be registered
1403 \param callbackContext - Cookie to be passed back during callback
1404 \return eHalStatus
1405 eHAL_STATUS_SUCCESS - successfully registered
1406 eHAL_STATUS_FAILURE - not successfully registered
1407 ---------------------------------------------------------------------------*/
1408extern eHalStatus sme_RegisterDeviceStateUpdateInd (
1409 tHalHandle hHal,
1410 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState),
1411 void *callbackContext);
1412
1413/* ---------------------------------------------------------------------------
1414 \fn sme_DeregisterDeviceStateUpdateInd
1415 \brief Deregister a routine that was registered for device state changes
1416 \param hHal - The handle returned by macOpen.
1417 \param callbackRoutine - Callback routine to be deregistered
1418 \return eHalStatus
1419 eHAL_STATUS_SUCCESS - successfully deregistered
1420 eHAL_STATUS_FAILURE - not successfully deregistered
1421 ---------------------------------------------------------------------------*/
1422extern eHalStatus sme_DeregisterDeviceStateUpdateInd (
1423 tHalHandle hHal,
1424 void (*callbackRoutine) (void *callbackContext, tPmcState pmcState));
1425
1426/* ---------------------------------------------------------------------------
1427 \fn sme_WowlAddBcastPattern
1428 \brief Add a pattern for Pattern Byte Matching in Wowl mode. Firmware will
1429 do a pattern match on these patterns when Wowl is enabled during BMPS
1430 mode.
1431 \param hHal - The handle returned by macOpen.
1432 \param pattern - Pattern to be added
1433 \return eHalStatus
1434 eHAL_STATUS_FAILURE Cannot add pattern
1435 eHAL_STATUS_SUCCESS Request accepted.
1436 ---------------------------------------------------------------------------*/
1437extern eHalStatus sme_WowlAddBcastPattern (
1438 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001439 tpSirWowlAddBcastPtrn pattern,
1440 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001441
1442/* ---------------------------------------------------------------------------
1443 \fn sme_WowlDelBcastPattern
1444 \brief Delete a pattern that was added for Pattern Byte Matching.
1445 \param hHal - The handle returned by macOpen.
1446 \param pattern - Pattern to be deleted
1447 \return eHalStatus
1448 eHAL_STATUS_FAILURE Cannot delete pattern
1449 eHAL_STATUS_SUCCESS Request accepted.
1450 ---------------------------------------------------------------------------*/
1451extern eHalStatus sme_WowlDelBcastPattern (
1452 tHalHandle hHal,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001453 tpSirWowlDelBcastPtrn pattern,
1454 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001455
1456/* ---------------------------------------------------------------------------
1457 \fn sme_EnterWowl
1458 \brief This is the API to request entry into WOWL mode.
1459 WoWLAN works on top of BMPS mode. If the device is not in BMPS mode,
1460 SME will will cache the information that WOWL has been requested and
1461 attempt to put the device in BMPS first. On entry into BMPS, SME will
1462 enter the WOWL mode.
1463 Note 1: After WoWL request is accepted, If module other than HDD requests
1464 full power BEFORE WoWL request is completed, PMC will buffer the WoWL request
1465 and attempt to put the chip into BMPS+WOWL based on a timer.
1466 Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl"
1467 completes or if HDD requests full power or if sme_ExitWoWL API is invoked.
1468 Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME
1469 will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL
1470 are required. Currently there is no requirement or use case to support UAPSD
1471 and WOWL at the same time.
1472 Note 4. Request for WoWL is rejected if there is a pending UAPSD request.
1473 Note 5. Request for WoWL is rejected if BMPS is disabled.
1474
1475 \param hHal - The handle returned by macOpen.
1476 \param enterWowlCallbackRoutine - Callback routine provided by HDD.
1477 Used for success/failure notification by SME
1478 \param enterWowlCallbackContext - A cookie passed by HDD, that is passed back to HDD
1479 at the time of callback.
1480 \param wakeReasonIndCB - Callback routine provided by HDD.
1481 Used for Wake Reason Indication by SME
1482 \param wakeReasonIndCBContext - A cookie passed by HDD, that is passed back to HDD
1483 at the time of callback.
1484 \return eHalStatus
1485 eHAL_STATUS_SUCCESS Device is already in WoWLAN mode
1486 eHAL_STATUS_FAILURE Device cannot enter WoWLAN mode.
1487 eHAL_STATUS_PMC_PENDING Request accepted. SME will enable WOWL when BMPS
1488 mode is entered.
1489 ---------------------------------------------------------------------------*/
1490extern eHalStatus sme_EnterWowl (
1491 tHalHandle hHal,
1492 void (*enterWowlCallbackRoutine) (void *callbackContext, eHalStatus status),
1493 void *enterWowlCallbackContext,
1494#ifdef WLAN_WAKEUP_EVENTS
1495 void (*wakeReasonIndCB) (void *callbackContext, tpSirWakeReasonInd pWakeReasonInd),
1496 void *wakeReasonIndCBContext,
1497#endif // WLAN_WAKEUP_EVENTS
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07001498 tpSirSmeWowlEnterParams wowlEnterParams, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07001499
1500/* ---------------------------------------------------------------------------
1501 \fn sme_ExitWowl
1502 \brief This is the SME API exposed to HDD to request exit from WoWLAN mode.
1503 SME will initiate exit from WoWLAN mode and device will be put in BMPS
1504 mode. Any Buffered request for WoWL will be cleared after this API.
1505 \param hHal - The handle returned by macOpen.
1506 \return eHalStatus
1507 eHAL_STATUS_FAILURE Device cannot exit WoWLAN mode. This can happen
1508 only if the previous "Enter WOWL" transaction has
1509 not even completed.
1510 eHAL_STATUS_SUCCESS Request accepted to exit WoWLAN mode.
1511 ---------------------------------------------------------------------------*/
c_hpothu01484c02014-05-16 14:05:15 +05301512extern eHalStatus sme_ExitWowl (tHalHandle hHal, tWowlExitSource wowlExitSrc);
Jeff Johnson295189b2012-06-20 16:38:30 -07001513
1514/* ---------------------------------------------------------------------------
1515
1516 \fn sme_RoamSetKey
1517
1518 \brief To set encryption key. This function should be called only when connected
1519 This is an asynchronous API.
1520
1521 \param pSetKeyInfo - pointer to a caller allocated object of tCsrSetContextInfo
1522
1523 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1524
1525 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1526
1527 FAILURE or RESOURCES The API finished and failed.
1528
1529 -------------------------------------------------------------------------------*/
1530eHalStatus sme_RoamSetKey(tHalHandle, tANI_U8 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 *pRoamId);
1531
1532/* ---------------------------------------------------------------------------
1533
1534 \fn sme_RoamRemoveKey
1535
1536 \brief To set encryption key. This is an asynchronous API.
1537
1538 \param pRemoveKey - pointer to a caller allocated object of tCsrRoamRemoveKey
1539
1540 \param pRoamId Upon success return, this is the id caller can use to identify the request in roamcallback
1541
1542 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
1543
1544 FAILURE or RESOURCES The API finished and failed.
1545
1546 -------------------------------------------------------------------------------*/
1547eHalStatus sme_RoamRemoveKey(tHalHandle, tANI_U8 sessionId, tCsrRoamRemoveKey *pRemoveKey, tANI_U32 *pRoamId);
1548
1549
1550/* ---------------------------------------------------------------------------
1551
1552 \fn sme_GetCountryCode
1553
1554 \brief To return the current country code. If no country code is applied, default country code is
1555 used to fill the buffer.
1556 If 11d supported is turned off, an error is return and the last applied/default country code is used.
1557 This is a synchronous API.
1558
1559 \param pBuf - pointer to a caller allocated buffer for returned country code.
1560
1561 \param pbLen For input, this parameter indicates how big is the buffer.
1562 Upon return, this parameter has the number of bytes for country. If pBuf
1563 doesn't have enough space, this function returns
1564 fail status and this parameter contains the number that is needed.
1565
1566 \return eHalStatus SUCCESS.
1567
1568 FAILURE or RESOURCES The API finished and failed.
1569
1570 -------------------------------------------------------------------------------*/
1571eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen);
1572
1573/* ---------------------------------------------------------------------------
1574
1575 \fn sme_SetCountryCode
1576
1577 \brief To change the current/default country code.
1578 If 11d supported is turned off, an error is return.
1579 This is a synchronous API.
1580
1581 \param pCountry - pointer to a caller allocated buffer for the country code.
1582
1583 \param pfRestartNeeded A pointer to caller allocated memory, upon successful return, it indicates
1584 whether a reset is required.
1585
1586 \return eHalStatus SUCCESS.
1587
1588 FAILURE or RESOURCES The API finished and failed.
1589
1590 -------------------------------------------------------------------------------*/
1591eHalStatus sme_SetCountryCode(tHalHandle hHal, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
1592
1593/* ---------------------------------------------------------------------------
Mihir Shetee1093ba2014-01-21 20:13:32 +05301594
1595 \fn sme_InitChannels
1596
1597 \brief Used to initialize CSR channel lists while driver loading
1598
1599 \param hHal - global pMac structure
1600
1601 \return eHalStatus SUCCESS.
1602
1603 FAILURE or RESOURCES The API finished and failed.
1604
1605 -------------------------------------------------------------------------------*/
1606eHalStatus sme_InitChannels(tHalHandle hHal);
1607
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301608
Mihir Shete04206452014-11-20 17:50:58 +05301609#ifdef CONFIG_ENABLE_LINUX_REG
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301610/* ---------------------------------------------------------------------------
1611 \fn sme_InitChannelsForCC
1612
1613 \brief Used to issue regulatory hint to user
1614
1615 \param hHal - global pMac structure
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301616 init - param to initiate channel list on basis of init/Reinit
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301617
1618 \return eHalStatus SUCCESS.
1619
1620 FAILURE or RESOURCES The API finished and failed.
1621
1622 -------------------------------------------------------------------------------*/
Agarwal Ashish6db9d532014-09-30 18:19:10 +05301623eHalStatus sme_InitChannelsForCC(tHalHandle hHal, driver_load_type init);
Mihir Shete04206452014-11-20 17:50:58 +05301624#endif
Mahesh A Saptasagar74289d22014-05-14 12:43:37 +05301625
Mihir Shetee1093ba2014-01-21 20:13:32 +05301626/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07001627 \fn sme_ResetCountryCodeInformation
1628 \brief this function is to reset the country code current being used back to EEPROM default
1629 this includes channel list and power setting. This is a synchronous API.
1630 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1631 a restart is needed to apply the change
1632 \return eHalStatus
1633 -------------------------------------------------------------------------------*/
1634eHalStatus sme_ResetCountryCodeInformation(tHalHandle hHal, tANI_BOOLEAN *pfRestartNeeded);
1635
1636/* ---------------------------------------------------------------------------
1637 \fn sme_GetSupportedCountryCode
1638 \brief this function is to get a list of the country code current being supported
1639 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
1640 this has the country code list. 3 bytes for each country code. This may be NULL if
1641 caller wants to know the needed byte count.
1642 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
1643 this contains the length of the data in pBuf. If pbuf is NULL, as input, *pbLen should be 0.
1644 \return eHalStatus
1645 -------------------------------------------------------------------------------*/
1646eHalStatus sme_GetSupportedCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U32 *pbLen);
1647
1648/* ---------------------------------------------------------------------------
1649 \fn sme_GetCurrentRegulatoryDomain
1650 \brief this function is to get the current regulatory domain. This is a synchronous API.
1651 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1652 SME. The function fails if 11d support is turned off.
1653 \param pDomain - Caller allocated buffer to return the current domain.
1654 \return eHalStatus SUCCESS.
1655
1656 FAILURE or RESOURCES The API finished and failed.
1657 -------------------------------------------------------------------------------*/
1658eHalStatus sme_GetCurrentRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t *pDomain);
1659
1660/* ---------------------------------------------------------------------------
1661 \fn sme_SetRegulatoryDomain
1662 \brief this function is to set the current regulatory domain.
1663 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1664 SME. This is a synchronous API.
1665 \param domainId - indicate the domain (defined in the driver) needs to set to.
1666 See v_REGDOMAIN_t for definition
1667 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
1668 a restart is needed to apply the change
1669 \return eHalStatus
1670 -------------------------------------------------------------------------------*/
1671eHalStatus sme_SetRegulatoryDomain(tHalHandle hHal, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
1672
1673/* ---------------------------------------------------------------------------
1674
1675 \fn sme_GetRegulatoryDomainForCountry
1676
1677 \brief To return a regulatory domain base on a country code. This is a synchronous API.
1678
1679 \param pCountry - pointer to a caller allocated buffer for input country code.
1680
1681 \param pDomainId Upon successful return, it is the domain that country belongs to.
1682 If it is NULL, returning success means that the country code is known.
1683
1684 \return eHalStatus SUCCESS.
1685
1686 FAILURE or RESOURCES The API finished and failed.
1687
1688 -------------------------------------------------------------------------------*/
1689eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, v_REGDOMAIN_t *pDomainId);
1690
1691
1692
1693/* ---------------------------------------------------------------------------
1694
1695 \fn sme_GetSupportedRegulatoryDomains
1696
1697 \brief To return a list of supported regulatory domains. This is a synchronous API.
1698
1699 \param pDomains - pointer to a caller allocated buffer for returned regulatory domains.
1700
1701 \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold.
1702 Upon return, this parameter has the number for supported domains. If pDomains
1703 doesn't have enough space for all the supported domains, this function returns
1704 fail status and this parameter contains the number that is needed.
1705
1706 \return eHalStatus SUCCESS.
1707
1708 FAILURE or RESOURCES The API finished and failed.
1709
1710 -------------------------------------------------------------------------------*/
1711eHalStatus sme_GetSupportedRegulatoryDomains(tHalHandle hHal, v_REGDOMAIN_t *pDomains, tANI_U32 *pNumDomains);
1712
1713//some support functions
1714tANI_BOOLEAN sme_Is11dSupported(tHalHandle hHal);
1715tANI_BOOLEAN sme_Is11hSupported(tHalHandle hHal);
1716tANI_BOOLEAN sme_IsWmmSupported(tHalHandle hHal);
1717//Upper layer to get the list of the base channels to scan for passively 11d info from csr
1718eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelInfo );
1719
1720typedef void ( *tSmeChangeCountryCallback)(void *pContext);
1721/* ---------------------------------------------------------------------------
1722
1723 \fn sme_ChangeCountryCode
1724
1725 \brief Change Country code from upperlayer during WLAN driver operation.
1726 This is a synchronous API.
1727
1728 \param hHal - The handle returned by macOpen.
1729
1730 \param pCountry New Country Code String
1731
Abhishek Singha306a442013-11-07 18:39:01 +05301732 \param sendRegHint If we want to send reg hint to nl80211
1733
Jeff Johnson295189b2012-06-20 16:38:30 -07001734 \return eHalStatus SUCCESS.
1735
1736 FAILURE or RESOURCES The API finished and failed.
1737
1738 -------------------------------------------------------------------------------*/
1739eHalStatus sme_ChangeCountryCode( tHalHandle hHal,
1740 tSmeChangeCountryCallback callback,
1741 tANI_U8 *pCountry,
1742 void *pContext,
Gopichand Nakkalaacd94112013-05-29 21:37:47 +05301743 void* pVosContext,
Abhishek Singha306a442013-11-07 18:39:01 +05301744 tAniBool countryFromUserSpace,
1745 tAniBool sendRegHint);
Jeff Johnson295189b2012-06-20 16:38:30 -07001746
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301747/* ---------------------------------------------------------------------------
1748
Amar Singhal0d15bd52013-10-12 23:13:13 -07001749 \fn sme_GenericChangeCountryCode
1750
1751 \brief Generic API to change country code
1752
1753 \param hHal - The handle returned by macOpen.
1754
1755 \param pCountry New Country Code String
1756
1757 \param reg_domain Regulatory domain for the new country code
1758
1759 \return eHalStatus SUCCESS.
1760
1761 FAILURE or RESOURCES The API finished and failed.
1762
1763 -------------------------------------------------------------------------------*/
1764eHalStatus sme_GenericChangeCountryCode( tHalHandle hHal,
1765 tANI_U8 *pCountry,
1766 v_REGDOMAIN_t reg_domain);
1767
1768/* ---------------------------------------------------------------------------
1769
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301770 \fn sme_DHCPStartInd
1771
1772 \brief Indicate FW about DHCP start event.
1773
1774 \param hHal - The handle returned by macOpen.
1775
1776 \param device_mode the mode of the device
1777
c_hpothu0b0cab72014-02-13 21:52:40 +05301778 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301779
1780 \return eHalStatus SUCCESS.
1781
1782 FAILURE or RESOURCES The API finished and failed.
1783
1784 -------------------------------------------------------------------------------*/
1785
1786eHalStatus sme_DHCPStartInd( tHalHandle hHal,
1787 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301788 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301789
1790/* ---------------------------------------------------------------------------
1791
1792 \fn sme_DHCPStopInd
1793
1794 \brief Indicate FW about DHCP stop event.
1795
1796 \param hHal - The handle returned by macOpen.
1797
1798 \param device_mode the mode of the device
1799
c_hpothu0b0cab72014-02-13 21:52:40 +05301800 \param sessionId session ID
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301801
1802 \return eHalStatus SUCCESS.
1803
1804 FAILURE or RESOURCES The API finished and failed.
1805
1806 -------------------------------------------------------------------------------*/
1807eHalStatus sme_DHCPStopInd( tHalHandle hHal,
1808 tANI_U8 device_mode,
c_hpothu0b0cab72014-02-13 21:52:40 +05301809 tANI_U8 sessionId );
Sundaresan Ramachandran76e48e82013-07-15 13:07:17 +05301810
Jeff Johnson295189b2012-06-20 16:38:30 -07001811
1812/* ---------------------------------------------------------------------------
1813 \fn sme_BtcSignalBtEvent
1814 \brief API to signal Bluetooth (BT) event to the WLAN driver. Based on the
1815 BT event type and the current operating mode of Libra (full power,
1816 BMPS, UAPSD etc), appropriate Bluetooth Coexistence (BTC) strategy
1817 would be employed.
1818 \param hHal - The handle returned by macOpen.
1819 \param pBtcBtEvent - Pointer to a caller allocated object of type tSmeBtEvent
1820 Caller owns the memory and is responsible for freeing it.
1821 \return VOS_STATUS
1822 VOS_STATUS_E_FAILURE BT Event not passed to HAL. This can happen
1823 if driver has not yet been initialized or if BTC
1824 Events Layer has been disabled.
1825 VOS_STATUS_SUCCESS BT Event passed to HAL
1826 ---------------------------------------------------------------------------*/
1827VOS_STATUS sme_BtcSignalBtEvent (tHalHandle hHal, tpSmeBtEvent pBtcBtEvent);
1828
1829/* ---------------------------------------------------------------------------
1830 \fn sme_BtcSetConfig
1831 \brief API to change the current Bluetooth Coexistence (BTC) configuration
1832 This function should be invoked only after CFG download has completed.
1833 Calling it after sme_HDDReadyInd is recommended.
1834 \param hHal - The handle returned by macOpen.
1835 \param pSmeBtcConfig - Pointer to a caller allocated object of type
1836 tSmeBtcConfig. Caller owns the memory and is responsible
1837 for freeing it.
1838 \return VOS_STATUS
1839 VOS_STATUS_E_FAILURE Config not passed to HAL.
1840 VOS_STATUS_SUCCESS Config passed to HAL
1841 ---------------------------------------------------------------------------*/
1842VOS_STATUS sme_BtcSetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1843
1844/* ---------------------------------------------------------------------------
1845 \fn sme_BtcGetConfig
1846 \brief API to retrieve the current Bluetooth Coexistence (BTC) configuration
1847 \param hHal - The handle returned by macOpen.
1848 \param pSmeBtcConfig - Pointer to a caller allocated object of type tSmeBtcConfig.
1849 Caller owns the memory and is responsible for freeing it.
1850 \return VOS_STATUS
1851 VOS_STATUS_E_FAILURE - failure
1852 VOS_STATUS_SUCCESS success
1853 ---------------------------------------------------------------------------*/
1854VOS_STATUS sme_BtcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig);
1855
1856/* ---------------------------------------------------------------------------
1857 \fn sme_SetCfgPrivacy
1858 \brief API to set configure privacy parameters
1859 \param hHal - The handle returned by macOpen.
1860 \param pProfile - Pointer CSR Roam profile.
1861 \param fPrivacy - This parameter indicates status of privacy
1862
1863 \return void
1864 ---------------------------------------------------------------------------*/
1865void sme_SetCfgPrivacy(tHalHandle hHal, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy);
1866
1867#if defined WLAN_FEATURE_VOWIFI
1868/* ---------------------------------------------------------------------------
1869 \fn sme_NeighborReportRequest
1870 \brief API to request neighbor report.
1871 \param hHal - The handle returned by macOpen.
1872 \param pRrmNeighborReq - Pointer to a caller allocated object of type
1873 tRrmNeighborReq. Caller owns the memory and is responsible
1874 for freeing it.
1875 \return VOS_STATUS
1876 VOS_STATUS_E_FAILURE - failure
1877 VOS_STATUS_SUCCESS success
1878 ---------------------------------------------------------------------------*/
1879VOS_STATUS sme_NeighborReportRequest (tHalHandle hHal, tANI_U8 sessionId,
1880 tpRrmNeighborReq pRrmNeighborReq, tpRrmNeighborRspCallbackInfo callbackInfo);
1881#endif
1882
1883//The following are debug APIs to support direct read/write register/memory
1884//They are placed in SME because HW cannot be access when in LOW_POWER state
1885//AND not connected. The knowledge and synchronization is done in SME
1886
1887//sme_DbgReadRegister
1888//Caller needs to validate the input values
1889VOS_STATUS sme_DbgReadRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t *pRegValue);
1890
1891//sme_DbgWriteRegister
1892//Caller needs to validate the input values
1893VOS_STATUS sme_DbgWriteRegister(tHalHandle hHal, v_U32_t regAddr, v_U32_t regValue);
1894
1895//sme_DbgReadMemory
1896//Caller needs to validate the input values
1897//pBuf caller allocated buffer has the length of nLen
1898VOS_STATUS sme_DbgReadMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1899
1900//sme_DbgWriteMemory
1901//Caller needs to validate the input values
1902VOS_STATUS sme_DbgWriteMemory(tHalHandle hHal, v_U32_t memAddr, v_U8_t *pBuf, v_U32_t nLen);
1903
Jeff Johnson295189b2012-06-20 16:38:30 -07001904VOS_STATUS sme_GetWcnssWlanCompiledVersion(tHalHandle hHal,
1905 tSirVersionType *pVersion);
1906VOS_STATUS sme_GetWcnssWlanReportedVersion(tHalHandle hHal,
1907 tSirVersionType *pVersion);
1908VOS_STATUS sme_GetWcnssSoftwareVersion(tHalHandle hHal,
1909 tANI_U8 *pVersion,
1910 tANI_U32 versionBufferSize);
1911VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal,
1912 tANI_U8 *pVersion,
1913 tANI_U32 versionBufferSize);
Jeff Johnson295189b2012-06-20 16:38:30 -07001914eHalStatus sme_RoamRegisterCallback(tHalHandle hHal,
1915 csrRoamCompleteCallback callback,
1916 void *pContext);
1917
1918#ifdef FEATURE_WLAN_WAPI
1919/* ---------------------------------------------------------------------------
1920 \fn sme_RoamSetBKIDCache
1921 \brief The SME API exposed to HDD to allow HDD to provde SME the BKID
1922 candidate list.
1923 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1924 it is opened (by calling halOpen).
1925 \param pBKIDCache - caller allocated buffer point to an array of tBkidCacheInfo
1926 \param numItems - a variable that has the number of tBkidCacheInfo allocated
1927 when retruning, this is the number of items put into pBKIDCache
1928 \return eHalStatus - when fail, it usually means the buffer allocated is not
1929 big enough and pNumItems has the number of tBkidCacheInfo.
1930 ---------------------------------------------------------------------------*/
1931eHalStatus sme_RoamSetBKIDCache( tHalHandle hHal, tANI_U32 sessionId, tBkidCacheInfo *pBKIDCache,
1932 tANI_U32 numItems );
1933
1934/* ---------------------------------------------------------------------------
1935 \fn sme_RoamGetBKIDCache
1936 \brief The SME API exposed to HDD to allow HDD to request SME to return its
1937 BKID cache.
1938 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1939 it is opened (by calling halOpen).
1940 \param pNum - caller allocated memory that has the space of the number of
1941 tBkidCacheInfo as input. Upon returned, *pNum has the needed number of entries
1942 in SME cache.
1943 \param pBkidCache - Caller allocated memory that contains BKID cache, if any,
1944 upon return
1945 \return eHalStatus - when fail, it usually means the buffer allocated is not
1946 big enough.
1947 ---------------------------------------------------------------------------*/
1948eHalStatus sme_RoamGetBKIDCache(tHalHandle hHal, tANI_U32 *pNum,
1949 tBkidCacheInfo *pBkidCache);
1950
1951/* ---------------------------------------------------------------------------
1952 \fn sme_RoamGetNumBKIDCache
1953 \brief The SME API exposed to HDD to allow HDD to request SME to return the
1954 number of BKID cache entries.
1955 \param hHal - Handle to the HAL. The HAL handle is returned by the HAL after
1956 it is opened (by calling halOpen).
1957 \return tANI_U32 - the number of BKID cache entries.
1958 ---------------------------------------------------------------------------*/
1959tANI_U32 sme_RoamGetNumBKIDCache(tHalHandle hHal, tANI_U32 sessionId);
1960
1961/* ---------------------------------------------------------------------------
1962 \fn sme_ScanGetBKIDCandidateList
1963 \brief a wrapper function to return the BKID candidate list
1964 \param pBkidList - caller allocated buffer point to an array of
1965 tBkidCandidateInfo
1966 \param pNumItems - pointer to a variable that has the number of
1967 tBkidCandidateInfo allocated when retruning, this is
1968 either the number needed or number of items put into
1969 pPmkidList
1970 \return eHalStatus - when fail, it usually means the buffer allocated is not
1971 big enough and pNumItems
1972 has the number of tBkidCandidateInfo.
1973 \Note: pNumItems is a number of tBkidCandidateInfo,
1974 not sizeof(tBkidCandidateInfo) * something
1975 ---------------------------------------------------------------------------*/
1976eHalStatus sme_ScanGetBKIDCandidateList(tHalHandle hHal, tANI_U32 sessionId,
1977 tBkidCandidateInfo *pBkidList,
1978 tANI_U32 *pNumItems );
1979#endif /* FEATURE_WLAN_WAPI */
1980
Jeff Johnsone7245742012-09-05 17:12:55 -07001981#ifdef FEATURE_OEM_DATA_SUPPORT
1982/********************************************************************************************
1983 Oem data related modifications
1984*********************************************************************************************/
1985/* ---------------------------------------------------------------------------
1986 \fn sme_OemDataReq
1987 \param sessionId - session id of session to be used for oem data req.
1988 \param pOemDataReqID - pointer to an object to get back the request ID
1989 \param callback - a callback function that is called upon finish
1990 \param pContext - a pointer passed in for the callback
1991 \return eHalStatus
1992 ---------------------------------------------------------------------------*/
1993eHalStatus sme_OemDataReq(tHalHandle hHal,
1994 tANI_U8 sessionId,
1995 tOemDataReqConfig *,
1996 tANI_U32 *pOemDataReqID,
1997 oemData_OemDataReqCompleteCallback callback,
1998 void *pContext);
1999
2000/* ---------------------------------------------------------------------------
2001 \fn sme_getOemDataRsp
2002 \param pOemDataRsp - A pointer to the response object
2003 \param pOemDataReqID - pointer to an object to get back the request ID
2004 \return eHalStatus
2005 ---------------------------------------------------------------------------*/
2006eHalStatus sme_getOemDataRsp(tHalHandle hHal,
2007 tOemDataRsp **pOemDataRsp);
2008
2009#endif /*FEATURE_OEM_DATA_SUPPORT*/
Jeff Johnson295189b2012-06-20 16:38:30 -07002010
2011
Jeff Johnson295189b2012-06-20 16:38:30 -07002012
2013/* ---------------------------------------------------------------------------
2014
2015 \fn sme_RoamUpdateAPWPSIE
2016
2017 \brief To update AP's WPS IE. This function should be called after SME AP session is created
2018 This is an asynchronous API.
2019
2020 \param pAPWPSIES - pointer to a caller allocated object of tCsrRoamAPWPSIES
2021
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002022 \return eHalStatus SUCCESS Roam callback will be called indicate actually results
Jeff Johnson295189b2012-06-20 16:38:30 -07002023
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002024 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002025
2026 -------------------------------------------------------------------------------*/
2027
2028eHalStatus sme_RoamUpdateAPWPSIE(tHalHandle, tANI_U8 sessionId, tSirAPWPSIEs *pAPWPSIES);
2029/* ---------------------------------------------------------------------------
2030
2031 \fn sme_RoamUpdateAPWPARSNIEs
2032
2033 \brief To update AP's WPA/RSN IEs. This function should be called after SME AP session is created
2034 This is an asynchronous API.
2035
2036 \param pAPSirRSNie - pointer to a caller allocated object of tSirRSNie with WPS/RSN IEs
2037
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002038 \return eHalStatus SUCCESS
Jeff Johnson295189b2012-06-20 16:38:30 -07002039
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002040 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002041
2042 -------------------------------------------------------------------------------*/
2043eHalStatus sme_RoamUpdateAPWPARSNIEs(tHalHandle hHal, tANI_U8 sessionId, tSirRSNie * pAPSirRSNie);
2044
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002045/* ---------------------------------------------------------------------------
2046
2047 sme_ChangeMCCBeaconInterval
2048
2049 \brief To update P2P-GO's beacon Interval.
2050
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002051 \return eHalStatus SUCCESS
2052 FAILURE or RESOURCES
2053 The API finished and failed.
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08002054 -------------------------------------------------------------------------------*/
2055eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId);
2056
2057
Jeff Johnson295189b2012-06-20 16:38:30 -07002058
2059/* ---------------------------------------------------------------------------
2060 \fn sme_sendBTAmpEvent
2061 \brief API to send the btAMPstate to FW
2062 \param hHal - The handle returned by macOpen.
2063 \param btAmpEvent -- btAMP event
Mohit Khanna698ba2a2012-12-04 15:08:18 -08002064 \return eHalStatus SUCCESS
2065 FAILURE or RESOURCES The API finished and failed.
Jeff Johnson295189b2012-06-20 16:38:30 -07002066
2067--------------------------------------------------------------------------- */
2068
2069eHalStatus sme_sendBTAmpEvent(tHalHandle hHal, tSmeBtAmpEvent btAmpEvent);
2070
2071
2072
2073/* ---------------------------------------------------------------------------
2074 \fn sme_SetHostOffload
2075 \brief API to set the host offload feature.
2076 \param hHal - The handle returned by macOpen.
2077 \param pRequest - Pointer to the offload request.
2078 \return eHalStatus
2079 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002080eHalStatus sme_SetHostOffload (tHalHandle hHal, tANI_U8 sessionId,
2081 tpSirHostOffloadReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002082
2083/* ---------------------------------------------------------------------------
2084 \fn sme_SetKeepAlive
2085 \brief API to set the Keep Alive feature.
2086 \param hHal - The handle returned by macOpen.
2087 \param pRequest - Pointer to the Keep Alive request.
2088 \return eHalStatus
2089 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002090eHalStatus sme_SetKeepAlive (tHalHandle hHal, tANI_U8 sessionId,
2091 tpSirKeepAliveReq pRequest);
Jeff Johnson295189b2012-06-20 16:38:30 -07002092
Jeff Johnson295189b2012-06-20 16:38:30 -07002093/* ----------------------------------------------------------------------------
2094 \fn sme_GetOperationChannel
2095 \brief API to get current channel on which STA is parked
2096 this function gives channel information only of infra station or IBSS station.
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002097 \param hHal, pointer to memory location and sessionId
Jeff Johnson295189b2012-06-20 16:38:30 -07002098 \returns eHAL_STATUS_SUCCESS
2099 eHAL_STATUS_FAILURE
2100-------------------------------------------------------------------------------*/
Jeff Johnson04dd8a82012-06-29 20:41:40 -07002101eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002102
Jeff Johnson295189b2012-06-20 16:38:30 -07002103/* ---------------------------------------------------------------------------
2104
2105 \fn sme_RegisterMgtFrame
2106
2107 \brief To register managment frame of specified type and subtype.
2108 \param frameType - type of the frame that needs to be passed to HDD.
2109 \param matchData - data which needs to be matched before passing frame
2110 to HDD.
2111 \param matchDataLen - Length of matched data.
2112 \return eHalStatus
2113 -------------------------------------------------------------------------------*/
2114eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2115 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
2116
2117/* ---------------------------------------------------------------------------
2118
2119 \fn sme_DeregisterMgtFrame
2120
2121 \brief To De-register managment frame of specified type and subtype.
2122 \param frameType - type of the frame that needs to be passed to HDD.
2123 \param matchData - data which needs to be matched before passing frame
2124 to HDD.
2125 \param matchDataLen - Length of matched data.
2126 \return eHalStatus
2127 -------------------------------------------------------------------------------*/
2128eHalStatus sme_DeregisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId,
2129 tANI_U16 frameType, tANI_U8* matchData, tANI_U16 matchLen);
Jeff Johnson295189b2012-06-20 16:38:30 -07002130
2131/* ---------------------------------------------------------------------------
2132
2133 \fn sme_ConfigureRxpFilter
2134
2135 \brief
2136 SME will pass this request to lower mac to set/reset the filter on RXP for
2137 multicast & broadcast traffic.
2138
2139 \param
2140
2141 hHal - The handle returned by macOpen.
2142
2143 filterMask- Currently the API takes a 1 or 0 (set or reset) as filter.
2144 Basically to enable/disable the filter (to filter "all" mcbc traffic) based
2145 on this param. In future we can use this as a mask to set various types of
2146 filters as suggested below:
2147 FILTER_ALL_MULTICAST:
2148 FILTER_ALL_BROADCAST:
2149 FILTER_ALL_MULTICAST_BROADCAST:
2150
2151
2152 \return eHalStatus
2153
2154
2155--------------------------------------------------------------------------- */
2156eHalStatus sme_ConfigureRxpFilter( tHalHandle hHal,
2157 tpSirWlanSetRxpFilters wlanRxpFilterParam);
2158
2159/* ---------------------------------------------------------------------------
2160
2161 \fn sme_ConfigureAppsCpuWakeupState
2162
2163 \brief
2164 SME will pass this request to lower mac to dynamically adjusts the listen
2165 interval based on the WLAN/MSM activity. This feature is named as
2166 Telescopic Beacon wakeup feature.
2167
2168 \param
2169
2170 hHal - The handle returned by macOpen.
2171
2172 isAppsAwake- Depicts the state of the Apps CPU
2173
2174
2175 \return eHalStatus
2176
2177
2178--------------------------------------------------------------------------- */
2179eHalStatus sme_ConfigureAppsCpuWakeupState( tHalHandle hHal, tANI_BOOLEAN isAppsAwake);
2180
Jeff Johnson295189b2012-06-20 16:38:30 -07002181/* ---------------------------------------------------------------------------
2182
2183 \fn sme_ConfigureSuspendInd
2184
2185 \brief
2186 SME will pass this request to lower mac to Indicate that the wlan needs to
2187 be suspended
2188
2189 \param
2190
2191 hHal - The handle returned by macOpen.
2192
2193 wlanSuspendParam- Depicts the wlan suspend params
2194
2195
2196 \return eHalStatus
2197
2198
2199--------------------------------------------------------------------------- */
2200eHalStatus sme_ConfigureSuspendInd( tHalHandle hHal,
2201 tpSirWlanSuspendParam wlanSuspendParam);
2202
2203/* ---------------------------------------------------------------------------
2204
2205 \fn sme_ConfigureResumeReq
2206
2207 \brief
2208 SME will pass this request to lower mac to Indicate that the wlan needs to
2209 be Resumed
2210
2211 \param
2212
2213 hHal - The handle returned by macOpen.
2214
2215 wlanResumeParam- Depicts the wlan resume params
2216
2217
2218 \return eHalStatus
2219
2220
2221--------------------------------------------------------------------------- */
2222eHalStatus sme_ConfigureResumeReq( tHalHandle hHal,
2223 tpSirWlanResumeParam wlanResumeParam);
2224
Jeff Johnson295189b2012-06-20 16:38:30 -07002225
2226/* ---------------------------------------------------------------------------
2227
2228 \fn sme_GetInfraSessionId
2229
2230 \brief To get the session ID for infra session, if connected
2231 This is a synchronous API.
2232
2233 \param hHal - The handle returned by macOpen.
2234
2235 \return sessionid, -1 if infra session is not connected
2236
2237 -------------------------------------------------------------------------------*/
2238tANI_S8 sme_GetInfraSessionId(tHalHandle hHal);
2239
2240/* ---------------------------------------------------------------------------
2241
2242 \fn sme_GetInfraOperationChannel
2243
2244 \brief To get the operating channel for infra session, if connected
2245 This is a synchronous API.
2246
2247 \param hHal - The handle returned by macOpen.
2248 \param sessionId - the sessionId returned by sme_OpenSession.
2249
2250 \return operating channel, 0 if infra session is not connected
2251
2252 -------------------------------------------------------------------------------*/
2253tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId);
2254/* ---------------------------------------------------------------------------
2255
2256 \fn sme_GetConcurrentOperationChannel
2257
2258 \brief To get the operating channel for other concurrent sessions, if connected
2259 This is a synchronous API.
2260
2261 \param hHal - The handle returned by macOpen.
2262 \param currentPersona - persona that is trying to come up.
2263
2264 \return operating channel, 0 if infra session is not connected
2265
2266 -------------------------------------------------------------------------------*/
2267tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal );
2268
2269/* ---------------------------------------------------------------------------
2270 \fn sme_AbortMacScan
2271 \brief API to cancel MAC scan.
2272 \param hHal - The handle returned by macOpen.
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +05302273 \param sessionId - sessionId for interface
Jeff Johnson295189b2012-06-20 16:38:30 -07002274 \return VOS_STATUS
2275 VOS_STATUS_E_FAILURE - failure
2276 VOS_STATUS_SUCCESS success
2277 ---------------------------------------------------------------------------*/
Srinivas, Dasari138af4f2014-02-07 11:13:45 +05302278eHalStatus sme_AbortMacScan(tHalHandle hHal, tANI_U8 sessionId,
2279 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -07002280
2281/* ---------------------------------------------------------------------------
2282 \fn sme_GetCfgValidChannels
2283 \brief API to get valid channel list
2284 \param hHal - The handle returned by macOpen.
2285 \param aValidChannels - Pointer to the valid channel list
2286 \param len - valid channel list length
2287 \return eHalStatus
2288 ---------------------------------------------------------------------------*/
2289eHalStatus sme_GetCfgValidChannels(tHalHandle hHal, tANI_U8 *aValidChannels, tANI_U32 *len);
2290
2291#ifdef FEATURE_WLAN_SCAN_PNO
2292
2293/* ---------------------------------------------------------------------------
2294 \fn sme_SetPreferredNetworkList
2295 \brief API to set the Preferred Network List Offload feature.
2296 \param hHal - The handle returned by macOpen.
2297 \param pRequest - Pointer to the offload request.
2298 \return eHalStatus
2299 ---------------------------------------------------------------------------*/
2300eHalStatus sme_SetPreferredNetworkList (tHalHandle hHal, tpSirPNOScanReq pRequest, tANI_U8 sessionId, preferredNetworkFoundIndCallback callbackRoutine, void *callbackContext );
2301
2302/* ---------------------------------------------------------------------------
2303 \fn sme_SetRSSIFilter
2304 \brief API to set RSSI Filter feature.
2305 \param hHal - The handle returned by macOpen.
2306 \param pRequest - Pointer to the offload request.
2307 \return eHalStatus
2308 ---------------------------------------------------------------------------*/
2309eHalStatus sme_SetRSSIFilter(tHalHandle hHal, v_U8_t rssiThreshold);
2310
2311/******************************************************************************
2312*
2313* Name: sme_PreferredNetworkFoundInd
2314*
2315* Description:
2316* Invoke Preferred Network Found Indication
2317*
2318* Parameters:
2319* hHal - HAL handle for device
2320* pMsg - found network description
2321*
2322* Returns: eHalStatus
2323*
2324******************************************************************************/
2325eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg);
2326#endif // FEATURE_WLAN_SCAN_PNO
2327
2328/* ---------------------------------------------------------------------------
2329 \fn sme_SetPowerParams
2330 \brief API to set Power Parameters
2331 \param hHal - The handle returned by macOpen.
2332 \param pwParams - Pointer to the power parameters requested.
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002333 \param forced - if true, not to be dropped silently in host, it must reach
2334 FW; It is added to avoid a race condition scenario where LIM hasn't deleted
2335 the session yet before power params gets sent to PMC
Jeff Johnson295189b2012-06-20 16:38:30 -07002336 \return eHalStatus
2337 ---------------------------------------------------------------------------*/
Tushnim Bhattacharyya3a37def2013-02-24 11:11:15 -08002338eHalStatus sme_SetPowerParams(tHalHandle hHal, tSirSetPowerParamsReq* pwParams, tANI_BOOLEAN forced);
Jeff Johnson295189b2012-06-20 16:38:30 -07002339
2340/* ---------------------------------------------------------------------------
2341 \fn sme_SetTxPerTracking
2342 \brief Set Tx PER tracking configuration parameters
2343 \param hHal - The handle returned by macOpen.
2344 \param pTxPerTrackingParam - Tx PER configuration parameters
2345 \return eHalStatus
2346 ---------------------------------------------------------------------------*/
2347eHalStatus sme_SetTxPerTracking (
2348 tHalHandle hHal,
2349 void (*pCallbackfn) (void *pCallbackContext),
2350 void *pCallbackContext,
2351 tpSirTxPerTrackingParam pTxPerTrackingParam);
2352
2353#ifdef WLAN_FEATURE_PACKET_FILTERING
2354/* ---------------------------------------------------------------------------
2355 \fn sme_ReceiveFilterSetFilter
2356 \brief API to set 8023 Multicast Address List
2357 \param hHal - The handle returned by macOpen.
2358 \param pMulticastAddrs - Pointer to the Multicast Address List
2359 \return eHalStatus
2360 ---------------------------------------------------------------------------*/
Amar Singhalf3a6e762013-02-19 15:06:50 -08002361eHalStatus sme_8023MulticastList(tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFltMcAddrList pMulticastAddrs);
Jeff Johnson295189b2012-06-20 16:38:30 -07002362
2363/* ---------------------------------------------------------------------------
2364 \fn sme_ReceiveFilterSetFilter
2365 \brief API to set Receive Packet Filter
2366 \param hHal - The handle returned by macOpen.
2367 \param pRcvPktFilterCfg - Receive Packet Filter parameter
2368 \return eHalStatus
2369 ---------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -07002370eHalStatus sme_ReceiveFilterSetFilter(tHalHandle hHal, tpSirRcvPktFilterCfgType pRcvPktFilterCfg,
2371 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002372
2373/* ---------------------------------------------------------------------------
2374 \fn sme_GetFilterMatchCount
2375 \brief API to get D0 PC Filter Match Count
2376 \param hHal - The handle returned by macOpen
2377 \param callbackRoutine - Callback routine invoked to receive Packet Coalescing Filter Match Count
2378 \param callbackContext - Cookie to be passed back during callback
2379 \return eHalStatus
2380 ---------------------------------------------------------------------------*/
2381eHalStatus sme_GetFilterMatchCount(tHalHandle hHal,
2382 FilterMatchCountCallback callbackRoutine,
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002383 void *callbackContext,
2384 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002385
2386/* ---------------------------------------------------------------------------
2387 \fn sme_ReceiveFilterClearFilter
2388 \brief API to clear Receive Packet Filter
2389 \param hHal - The handle returned by macOpen.
2390 \param pRcvFltPktClearParam - Receive Packet Filter Clear parameter
2391 \return eHalStatus
2392 ---------------------------------------------------------------------------*/
2393eHalStatus sme_ReceiveFilterClearFilter(tHalHandle hHal,
Jeff Johnsone7245742012-09-05 17:12:55 -07002394 tpSirRcvFltPktClearParam pRcvFltPktClearParam,
2395 tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002396#endif // WLAN_FEATURE_PACKET_FILTERING
2397/* ---------------------------------------------------------------------------
2398
2399 \fn sme_IsChannelValid
2400 \brief To check if the channel is valid for currently established domain
2401 This is a synchronous API.
2402
2403 \param hHal - The handle returned by macOpen.
2404 \param channel - channel to verify
2405
2406 \return TRUE/FALSE, TRUE if channel is valid
2407
2408 -------------------------------------------------------------------------------*/
2409tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2410
2411/* ---------------------------------------------------------------------------
2412 \fn sme_SetFreqBand
2413 \brief Used to set frequency band.
2414 \param hHal
2415 \eBand band value to be configured
2416 \- return eHalStatus
2417 -------------------------------------------------------------------------*/
2418eHalStatus sme_SetFreqBand(tHalHandle hHal, eCsrBand eBand);
2419
2420/* ---------------------------------------------------------------------------
2421 \fn sme_GetFreqBand
2422 \brief Used to get the current band settings.
2423 \param hHal
2424 \pBand pointer to hold the current band value
2425 \- return eHalStatus
2426 -------------------------------------------------------------------------*/
2427eHalStatus sme_GetFreqBand(tHalHandle hHal, eCsrBand *pBand);
2428
2429/* ---------------------------------------------------------------------------
2430
2431 \fn sme_SetTxPerTracking
2432 \brief Set Tx PER tracking configuration parameters
2433 \param hHal - The handle returned by macOpen.
2434 \param pTxPerTrackingParam - Tx PER configuration parameters
2435 \return eHalStatus
2436 ---------------------------------------------------------------------------*/
2437eHalStatus sme_SetTxPerTracking (
2438 tHalHandle hHal,
2439 void (*pCallbackfn) (void *pCallbackContext),
2440 void *pCallbackContext,
2441 tpSirTxPerTrackingParam pTxPerTrackingParam);
2442
2443#ifdef WLAN_FEATURE_GTK_OFFLOAD
2444/* ---------------------------------------------------------------------------
2445 \fn sme_SetGTKOffload
2446 \brief API to set GTK offload feature.
2447 \param hHal - The handle returned by macOpen.
2448 \param pRequest - Pointer to the GTK offload request.
2449 \return eHalStatus
2450 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002451eHalStatus sme_SetGTKOffload (tHalHandle hHal, tpSirGtkOffloadParams pRequest, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002452
2453/* ---------------------------------------------------------------------------
2454 \fn sme_GetGTKOffload
2455 \brief API to get GTK offload information.
2456 \param hHal - The handle returned by macOpen.
2457 \param pRequest - Pointer to the GTK offload response.
2458 \return eHalStatus
2459 ---------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi96dd30d2012-10-05 17:24:51 -07002460eHalStatus sme_GetGTKOffload (tHalHandle hHal, GTKOffloadGetInfoCallback callbackRoutine,
2461 void *callbackContext, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -07002462#endif // WLAN_FEATURE_GTK_OFFLOAD
2463
2464#ifdef WLAN_WAKEUP_EVENTS
2465eHalStatus sme_WakeReasonIndCallback (tHalHandle hHal, void* pMsg);
2466#endif // WLAN_WAKEUP_EVENTS
2467
2468/* ---------------------------------------------------------------------------
2469 \fn sme_SetTxPerTracking
2470 \brief Set Tx PER tracking configuration parameters
2471 \param hHal - The handle returned by macOpen.
2472 \param pTxPerTrackingParam - Tx PER configuration parameters
2473 \return eHalStatus
2474 ---------------------------------------------------------------------------*/
2475eHalStatus sme_SetTxPerTracking (
2476 tHalHandle hHal,
2477 void (*pCallbackfn) (void *pCallbackContext),
2478 void *pCallbackContext,
2479 tpSirTxPerTrackingParam pTxPerTrackingParam);
2480
2481
2482//return frequency for a particular channel
2483tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
2484
2485tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
2486
2487#if defined WLAN_FEATURE_P2P_INTERNAL
2488
2489eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
2490
2491/* ---------------------------------------------------------------------------
2492 \fn sme_p2pFlushDeviceList
2493 \brief Remove cached P2P result from scan results
2494 \param hHal - The handle returned by macOpen.
2495 \param HDDSessionId - HDD's sessionId. Currently unused.
2496 \return eHalStatus
2497 ---------------------------------------------------------------------------*/
2498eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
2499
2500eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
2501 tCsrScanResultFilter *pFilter);
2502
2503#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
2504
2505/* ---------------------------------------------------------------------------
2506 \fn sme_SetMaxTxPower
2507 \brief Used to set the Maximum Transmit Power dynamically. Note: this
2508 setting will not persist over reboots
2509 \param hHal
2510 \param pBssid BSSID to set the power cap for
2511 \param pBssid pSelfMacAddress self MAC Address
2512 \param pBssid power to set in dB
2513 \- return eHalStatus
2514 -------------------------------------------------------------------------*/
2515eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
2516 tSirMacAddr pSelfMacAddress, v_S7_t dB);
2517
Jeff Johnson295189b2012-06-20 16:38:30 -07002518/* ---------------------------------------------------------------------------
Arif Hussaina5ebce02013-08-09 15:09:58 -07002519 \fn sme_SetMaxTxPowerPerBand
2520 \brief Used to set the Maximum Transmit Power for
2521 specific band dynamically. Note: this setting will not persist over reboots
2522 \param band
2523 \param power to set in dB
2524 \- return eHalStatus
2525 -------------------------------------------------------------------------*/
2526eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
2527
2528/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -07002529
schang86c22c42013-03-13 18:41:24 -07002530 \fn sme_SetTxPower
2531
2532 \brief Set Transmit Power dynamically. Note: this setting will
2533 not persist over reboots.
2534
2535 \param hHal
2536 \param sessionId Target Session ID
2537 \param mW power to set in mW
2538 \- return eHalStatus
2539
2540 -------------------------------------------------------------------------------*/
2541eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
2542
2543/* ---------------------------------------------------------------------------
2544
Jeff Johnson295189b2012-06-20 16:38:30 -07002545 \fn sme_HideSSID
2546
2547 \brief Enable/Disables hidden SSID dynamically. Note: this setting will
2548 not persist over reboots.
2549
2550 \param hHal
2551 \param sessionId
2552 \param ssidHidden 0 - Broadcast SSID, 1 - Disable broadcast SSID
2553 \- return eHalStatus
2554
2555 -------------------------------------------------------------------------------*/
2556eHalStatus sme_HideSSID(tHalHandle hHal, v_U8_t sessionId, v_U8_t ssidHidden);
Jeff Johnson295189b2012-06-20 16:38:30 -07002557
2558/* ---------------------------------------------------------------------------
2559
2560 \fn sme_SetTmLevel
2561 \brief Set Thermal Mitigation Level to RIVA
2562 \param hHal - The handle returned by macOpen.
2563 \param newTMLevel - new Thermal Mitigation Level
2564 \param tmMode - Thermal Mitigation handle mode, default 0
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07002565 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07002566 ---------------------------------------------------------------------------*/
2567eHalStatus sme_SetTmLevel(tHalHandle hHal, v_U16_t newTMLevel, v_U16_t tmMode);
2568
2569/*---------------------------------------------------------------------------
2570
2571 \brief sme_featureCapsExchange() - SME interface to exchange capabilities between
2572 Host and FW.
2573
2574 \param hHal - HAL handle for device
2575
2576 \return NONE
2577
2578---------------------------------------------------------------------------*/
2579void sme_featureCapsExchange(tHalHandle hHal);
2580
Jeff Johnsond13512a2012-07-17 11:42:19 -07002581/*---------------------------------------------------------------------------
2582
Yathish9f22e662012-12-10 14:21:35 -08002583 \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu
2584 between in Host.
2585
2586 \param hHal - HAL handle for device
2587
2588 \return NONE
2589
2590---------------------------------------------------------------------------*/
2591void sme_disableFeatureCapablity(tANI_U8 feature_index);
2592
2593/*---------------------------------------------------------------------------
2594
Jeff Johnsond13512a2012-07-17 11:42:19 -07002595 \brief sme_GetDefaultCountryCodeFrmNv() - SME interface to get the default
2596 country code
2597 Host and FW.
2598
2599 \param hHal - HAL handle for device
2600 \param pCountry - pointer to country code
2601
Jeff Johnsonfeddb2d2012-12-10 14:41:22 -08002602 \return Success or failure
Jeff Johnsond13512a2012-07-17 11:42:19 -07002603
2604 ---------------------------------------------------------------------------*/
2605eHalStatus sme_GetDefaultCountryCodeFrmNv(tHalHandle hHal, tANI_U8 *pCountry);
2606
2607/*---------------------------------------------------------------------------
2608
2609 \brief sme_GetCurrentCountryCode() - SME interface to get the current operating
2610 country code.
2611
2612 \param hHal - HAL handle for device
2613 \param pCountry - pointer to country code
2614
2615 \return Success or failure
2616
2617 ---------------------------------------------------------------------------*/
2618eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry);
2619
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002620/* ---------------------------------------------------------------------------
2621 \fn sme_transportDebug
2622 \brief Dynamically monitoring Transport channels
2623 Private IOCTL will querry transport channel status if driver loaded
schang6295e542013-03-12 15:31:23 -07002624 \param hHal Upper MAC context
Jeff Johnsonb88db982012-12-10 13:34:59 -08002625 \param displaySnapshot Display transport channel snapshot option
Madan Mohan Koyyalamudi8cb53982012-09-28 14:34:47 -07002626 \param toggleStallDetect Enable stall detect feature
2627 This feature will take effect to data performance
2628 Not integrate till fully verification
2629 \- return NONE
2630 -------------------------------------------------------------------------*/
schang6295e542013-03-12 15:31:23 -07002631void sme_transportDebug(tHalHandle hHal, v_BOOL_t displaySnapshot, v_BOOL_t toggleStallDetect);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002632
Kiran4a17ebe2013-01-31 10:43:43 -08002633/* ---------------------------------------------------------------------------
2634 \fn sme_ResetPowerValuesFor5G
2635 \brief Reset the power values for 5G band with NV power values.
2636 \param hHal - HAL handle for device
2637 \- return NONE
2638 -------------------------------------------------------------------------*/
2639void sme_ResetPowerValuesFor5G (tHalHandle hHal);
2640
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002641#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002642/* ---------------------------------------------------------------------------
2643 \fn sme_UpdateRoamPrefer5GHz
2644 \brief enable/disable Roam prefer 5G runtime option
2645 This function is called through dynamic setConfig callback function
2646 to configure the Roam prefer 5G runtime option
2647 \param hHal - HAL handle for device
2648 \param nRoamPrefer5GHz Enable/Disable Roam prefer 5G runtime option
2649 \- return Success or failure
2650 -------------------------------------------------------------------------*/
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002651eHalStatus sme_UpdateRoamPrefer5GHz(tHalHandle hHal, v_BOOL_t nRoamPrefer5GHz);
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002652
2653/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002654 \fn sme_setRoamIntraBand
2655 \brief enable/disable Intra band roaming
2656 This function is called through dynamic setConfig callback function
2657 to configure the intra band roaming
2658 \param hHal - HAL handle for device
2659 \param nRoamIntraBand Enable/Disable Intra band roaming
2660 \- return Success or failure
2661 -------------------------------------------------------------------------*/
2662eHalStatus sme_setRoamIntraBand(tHalHandle hHal, const v_BOOL_t nRoamIntraBand);
2663
2664/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002665 \fn sme_UpdateRoamScanNProbes
2666 \brief function to update roam scan N probes
2667 This function is called through dynamic setConfig callback function
2668 to update roam scan N probes
2669 \param hHal - HAL handle for device
2670 \param nProbes number of probe requests to be sent out
2671 \- return Success or failure
2672 -------------------------------------------------------------------------*/
2673eHalStatus sme_UpdateRoamScanNProbes(tHalHandle hHal, const v_U8_t nProbes);
2674
2675/* ---------------------------------------------------------------------------
2676 \fn sme_UpdateRoamScanHomeAwayTime
2677 \brief function to update roam scan Home away time
2678 This function is called through dynamic setConfig callback function
2679 to update roam scan home away time
2680 \param hHal - HAL handle for device
2681 \param nRoamScanAwayTime Scan home away time
2682 \- return Success or failure
2683 -------------------------------------------------------------------------*/
Srinivas Girigowda6cf0b822013-06-27 14:00:20 -07002684eHalStatus sme_UpdateRoamScanHomeAwayTime(tHalHandle hHal,
2685 const v_U16_t nRoamScanHomeAwayTime,
2686 const eAniBoolean bSendOffloadCmd);
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002687
2688/* ---------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002689 \fn sme_getRoamIntraBand
2690 \brief get Intra band roaming
2691 \param hHal - HAL handle for device
2692 \- return Success or failure
2693 -------------------------------------------------------------------------*/
2694v_BOOL_t sme_getRoamIntraBand(tHalHandle hHal);
2695
2696/* ---------------------------------------------------------------------------
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07002697 \fn sme_getRoamScanNProbes
2698 \brief get N Probes
2699 \param hHal - HAL handle for device
2700 \- return Success or failure
2701 -------------------------------------------------------------------------*/
2702v_U8_t sme_getRoamScanNProbes(tHalHandle hHal);
2703
2704/* ---------------------------------------------------------------------------
2705 \fn sme_getRoamScanHomeAwayTime
2706 \brief get Roam scan home away time
2707 \param hHal - HAL handle for device
2708 \- return Success or failure
2709 -------------------------------------------------------------------------*/
2710v_U16_t sme_getRoamScanHomeAwayTime(tHalHandle hHal);
2711
2712/* ---------------------------------------------------------------------------
Madan Mohan Koyyalamudi62b55b02012-12-03 16:45:39 -08002713 \fn sme_UpdateImmediateRoamRssiDiff
2714 \brief Update nImmediateRoamRssiDiff
2715 This function is called through dynamic setConfig callback function
2716 to configure nImmediateRoamRssiDiff
2717 Usage: adb shell iwpriv wlan0 setConfig gImmediateRoamRssiDiff=[0 .. 125]
2718 \param hHal - HAL handle for device
2719 \param nImmediateRoamRssiDiff - minimum rssi difference between potential
2720 candidate and current AP.
2721 \- return Success or failure
2722 -------------------------------------------------------------------------*/
2723
2724eHalStatus sme_UpdateImmediateRoamRssiDiff(tHalHandle hHal, v_U8_t nImmediateRoamRssiDiff);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002725
Srinivas Girigowdade697412013-02-14 16:31:48 -08002726/* ---------------------------------------------------------------------------
2727 \fn sme_UpdateRoamRssiDiff
2728 \brief Update RoamRssiDiff
2729 This function is called through dynamic setConfig callback function
2730 to configure RoamRssiDiff
2731 Usage: adb shell iwpriv wlan0 setConfig RoamRssiDiff=[0 .. 125]
2732 \param hHal - HAL handle for device
2733 \param RoamRssiDiff - minimum rssi difference between potential
2734 candidate and current AP.
2735 \- return Success or failure
2736 -------------------------------------------------------------------------*/
2737
2738eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, v_U8_t RoamRssiDiff);
2739
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002740/*--------------------------------------------------------------------------
2741 \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime
2742 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2743 isFastTransitionEnabled.
2744 This is a synchronuous call
2745 \param hHal - The handle returned by macOpen.
2746 \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully.
2747 Other status means SME is failed to update isFastTransitionEnabled.
2748 \sa
2749 --------------------------------------------------------------------------*/
2750
2751eHalStatus sme_UpdateFastTransitionEnabled(tHalHandle hHal,
2752 v_BOOL_t isFastTransitionEnabled);
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002753
2754/* ---------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07002755 \fn sme_UpdateWESMode
2756 \brief Update WESMode
2757 This function is called through dynamic setConfig callback function
2758 to configure isWESModeEnabled
2759 \param hHal - HAL handle for device
2760 \param isWESModeEnabled - Enable/Disable WES Mode
2761 \- return Success or failure
2762 -------------------------------------------------------------------------*/
2763eHalStatus sme_UpdateWESMode(tHalHandle hHal, v_BOOL_t isWESModeEnabled);
2764
2765/* ---------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07002766 \fn sme_SetRoamScanControl
2767 \brief Set roam scan control
2768 This function is called to set roam scan control
2769 if roam scan control is set to 0, roaming scan cache is cleared
2770 any value other than 0 is treated as invalid value
2771 \param hHal - HAL handle for device
2772 \return eHAL_STATUS_SUCCESS - SME update config successfully.
2773 Other status means SME failure to update
2774 -------------------------------------------------------------------------*/
2775eHalStatus sme_SetRoamScanControl(tHalHandle hHal, v_BOOL_t roamScanControl);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002776#endif /* (WLAN_FEATURE_VOWIFI_11R) || (FEATURE_WLAN_ESE) || (FEATURE_WLAN_LFR) */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002777
2778#ifdef FEATURE_WLAN_LFR
2779/*--------------------------------------------------------------------------
2780 \brief sme_UpdateIsFastRoamIniFeatureEnabled() - enable/disable LFR support at runtime
Srinivas Girigowdade697412013-02-14 16:31:48 -08002781 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002782 isFastRoamIniFeatureEnabled.
2783 This is a synchronuous call
2784 \param hHal - The handle returned by macOpen.
2785 \return eHAL_STATUS_SUCCESS - SME update isFastRoamIniFeatureEnabled config successfully.
2786 Other status means SME is failed to update isFastRoamIniFeatureEnabled.
2787 \sa
2788 --------------------------------------------------------------------------*/
2789
Srinivas Girigowdade697412013-02-14 16:31:48 -08002790eHalStatus sme_UpdateIsFastRoamIniFeatureEnabled(tHalHandle hHal,
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002791 const v_BOOL_t isFastRoamIniFeatureEnabled);
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002792
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002793/*--------------------------------------------------------------------------
Mukul Sharma2a271632014-10-13 14:59:01 +05302794 \brief sme_ConfigFwrRoaming() - enable/disable LFR support at runtime
2795 When Supplicant issue enabled / disable fwr based roaming on the basis
2796 of the Bssid modification in network block ( e.g. AutoJoin mody N/W block)
2797
2798 This is a synchronous call
2799 \param hHal - The handle returned by macOpen.
2800 \return eHAL_STATUS_SUCCESS - SME (enabled/disabled) offload scan successfully.
2801 Other status means SME is failed to (enabled/disabled) offload scan.
2802 \sa
2803 --------------------------------------------------------------------------*/
2804
2805eHalStatus sme_ConfigFwrRoaming(tHalHandle hHal,
2806 const v_BOOL_t isFastRoamEnabled);
2807
2808/*--------------------------------------------------------------------------
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08002809 \brief sme_UpdateIsMAWCIniFeatureEnabled() -
2810 Enable/disable LFR MAWC support at runtime
2811 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2812 isMAWCIniFeatureEnabled.
2813 This is a synchronous call
2814 \param hHal - The handle returned by macOpen.
2815 \return eHAL_STATUS_SUCCESS - SME update MAWCEnabled config successfully.
2816 Other status means SME is failed to update MAWCEnabled.
2817 \sa
2818 --------------------------------------------------------------------------*/
2819eHalStatus sme_UpdateIsMAWCIniFeatureEnabled(tHalHandle hHal,
2820 const v_BOOL_t MAWCEnabled);
2821
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07002822
2823#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
2824/*--------------------------------------------------------------------------
2825 \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists
2826 This is a synchronuous call
2827 \param hHal - The handle returned by macOpen.
2828 \return eHAL_STATUS_SUCCESS
2829 Other status means SME is failed
2830 \sa
2831 --------------------------------------------------------------------------*/
2832
2833eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal,
2834 v_BOOL_t bFastRoamInConIniFeatureEnabled);
2835#endif
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002836#endif /* FEATURE_WLAN_LFR */
2837
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002838#ifdef FEATURE_WLAN_ESE
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002839/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002840 \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002841 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002842 isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002843 This is a synchronuous call
2844 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002845 \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully.
2846 Other status means SME is failed to update isEseIniFeatureEnabled.
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002847 \sa
2848 --------------------------------------------------------------------------*/
2849
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002850eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal,
2851 const v_BOOL_t isEseIniFeatureEnabled);
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002852
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002853#endif /* FEATURE_WLAN_ESE */
Gopichand Nakkala98a98af2012-12-31 14:38:47 -08002854
2855/*--------------------------------------------------------------------------
2856 \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime
2857 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
2858 fEnableFwRssiMonitoring.
2859 This is a synchronuous call
2860 \param hHal - The handle returned by macOpen.
2861 \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully.
2862 Other status means SME is failed to update
2863 \sa
2864 --------------------------------------------------------------------------*/
2865
2866eHalStatus sme_UpdateConfigFwRssiMonitoring(tHalHandle hHal,
2867 v_BOOL_t fEnableFwRssiMonitoring);
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08002868
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002869#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
Srinivas Girigowdade697412013-02-14 16:31:48 -08002870/*--------------------------------------------------------------------------
2871 \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
2872 This is a synchronuous call
2873 \param hHal - The handle returned by macOpen.
2874 \return eHAL_STATUS_SUCCESS - SME update config successful.
2875 Other status means SME is failed to update
2876 \sa
2877 --------------------------------------------------------------------------*/
2878eHalStatus sme_setNeighborLookupRssiThreshold(tHalHandle hHal,
2879 v_U8_t neighborLookupRssiThreshold);
2880
2881/*--------------------------------------------------------------------------
2882 \brief sme_setNeighborReassocRssiThreshold() - update neighbor reassoc rssi threshold
2883 This is a synchronuous call
2884 \param hHal - The handle returned by macOpen.
2885 \return eHAL_STATUS_SUCCESS - SME update config successful.
2886 Other status means SME is failed to update
2887 \sa
2888 --------------------------------------------------------------------------*/
2889eHalStatus sme_setNeighborReassocRssiThreshold(tHalHandle hHal,
2890 v_U8_t neighborReassocRssiThreshold);
2891
2892/*--------------------------------------------------------------------------
2893 \brief sme_getNeighborLookupRssiThreshold() - get neighbor lookup rssi threshold
2894 This is a synchronuous call
2895 \param hHal - The handle returned by macOpen.
2896 \return eHAL_STATUS_SUCCESS - SME update config successful.
2897 Other status means SME is failed to update
2898 \sa
2899 --------------------------------------------------------------------------*/
2900v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal);
2901
2902/*--------------------------------------------------------------------------
2903 \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period
2904 This is a synchronuous call
2905 \param hHal - The handle returned by macOpen.
2906 \return eHAL_STATUS_SUCCESS - SME update config successful.
2907 Other status means SME is failed to update
2908 \sa
2909 --------------------------------------------------------------------------*/
2910eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal,
2911 v_U16_t neighborScanResultsRefreshPeriod);
2912
2913/*--------------------------------------------------------------------------
2914 \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period
2915 This is a synchronuous call
2916 \param hHal - The handle returned by macOpen.
2917 \return eHAL_STATUS_SUCCESS - SME update config successful.
2918 Other status means SME is failed to update
2919 \sa
2920 --------------------------------------------------------------------------*/
2921v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal);
2922
2923/*--------------------------------------------------------------------------
2924 \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period
2925 This is a synchronuous call
2926 \param hHal - The handle returned by macOpen.
2927 \return eHAL_STATUS_SUCCESS - SME update config successful.
2928 Other status means SME is failed to update
2929 \sa
2930 --------------------------------------------------------------------------*/
2931v_U16_t sme_getEmptyScanRefreshPeriod(tHalHandle hHal);
2932
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07002933/* ---------------------------------------------------------------------------
2934 \fn sme_UpdateEmptyScanRefreshPeriod
2935 \brief Update nEmptyScanRefreshPeriod
2936 This function is called through dynamic setConfig callback function
2937 to configure nEmptyScanRefreshPeriod
2938 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
2939 \param hHal - HAL handle for device
2940 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
2941 \- return Success or failure
2942 -------------------------------------------------------------------------*/
2943eHalStatus sme_UpdateEmptyScanRefreshPeriod(tHalHandle hHal, v_U16_t nEmptyScanRefreshPeriod);
2944
2945/* ---------------------------------------------------------------------------
2946 \fn sme_setNeighborScanMinChanTime
2947 \brief Update nNeighborScanMinChanTime
2948 This function is called through dynamic setConfig callback function
2949 to configure gNeighborScanChannelMinTime
2950 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMinTime=[0 .. 60]
2951 \param hHal - HAL handle for device
2952 \param nNeighborScanMinChanTime - Channel minimum dwell time
2953 \- return Success or failure
2954 -------------------------------------------------------------------------*/
2955eHalStatus sme_setNeighborScanMinChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMinChanTime);
2956
2957/* ---------------------------------------------------------------------------
2958 \fn sme_setNeighborScanMaxChanTime
2959 \brief Update nNeighborScanMaxChanTime
2960 This function is called through dynamic setConfig callback function
2961 to configure gNeighborScanChannelMaxTime
2962 Usage: adb shell iwpriv wlan0 setConfig gNeighborScanChannelMaxTime=[0 .. 60]
2963 \param hHal - HAL handle for device
2964 \param nNeighborScanMinChanTime - Channel maximum dwell time
2965 \- return Success or failure
2966 -------------------------------------------------------------------------*/
2967eHalStatus sme_setNeighborScanMaxChanTime(tHalHandle hHal, const v_U16_t nNeighborScanMaxChanTime);
2968
2969/* ---------------------------------------------------------------------------
2970 \fn sme_getNeighborScanMinChanTime
2971 \brief get neighbor scan min channel time
2972 \param hHal - The handle returned by macOpen.
2973 \return v_U16_t - channel min time value
2974 -------------------------------------------------------------------------*/
2975v_U16_t sme_getNeighborScanMinChanTime(tHalHandle hHal);
2976
2977/* ---------------------------------------------------------------------------
2978 \fn sme_getNeighborScanMaxChanTime
2979 \brief get neighbor scan max channel time
2980 \param hHal - The handle returned by macOpen.
2981 \return v_U16_t - channel max time value
2982 -------------------------------------------------------------------------*/
2983v_U16_t sme_getNeighborScanMaxChanTime(tHalHandle hHal);
2984
2985/* ---------------------------------------------------------------------------
2986 \fn sme_setNeighborScanPeriod
2987 \brief Update nNeighborScanPeriod
2988 This function is called through dynamic setConfig callback function
2989 to configure nNeighborScanPeriod
2990 Usage: adb shell iwpriv wlan0 setConfig nNeighborScanPeriod=[0 .. 60]
2991 \param hHal - HAL handle for device
2992 \param nNeighborScanPeriod - neighbor scan period
2993 \- return Success or failure
2994 -------------------------------------------------------------------------*/
2995eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborScanPeriod);
2996
2997/* ---------------------------------------------------------------------------
2998 \fn sme_getNeighborScanPeriod
2999 \brief get neighbor scan period
3000 \param hHal - The handle returned by macOpen.
3001 \return v_U16_t - neighbor scan period
3002 -------------------------------------------------------------------------*/
3003v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
3004
3005#endif
Srinivas Girigowdade697412013-02-14 16:31:48 -08003006
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003007#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowdade697412013-02-14 16:31:48 -08003008/*--------------------------------------------------------------------------
3009 \brief sme_getRoamRssiDiff() - get Roam rssi diff
3010 This is a synchronuous call
3011 \param hHal - The handle returned by macOpen.
3012 \return eHAL_STATUS_SUCCESS - SME update config successful.
3013 Other status means SME is failed to update
3014 \sa
3015 --------------------------------------------------------------------------*/
3016v_U8_t sme_getRoamRssiDiff(tHalHandle hHal);
3017
3018/*--------------------------------------------------------------------------
3019 \brief sme_ChangeRoamScanChannelList() - Change roam scan channel list
3020 This is a synchronuous call
3021 \param hHal - The handle returned by macOpen.
3022 \return eHAL_STATUS_SUCCESS - SME update config successful.
3023 Other status means SME is failed to update
3024 \sa
3025 --------------------------------------------------------------------------*/
3026eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3027 tANI_U8 numChannels);
3028
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003029#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003030/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003031 \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003032 This is a synchronuous call
3033 \param hHal - The handle returned by macOpen.
3034 \return eHAL_STATUS_SUCCESS - SME update config successful.
3035 Other status means SME is failed to update
3036 \sa
3037 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003038eHalStatus sme_SetEseRoamScanChannelList(tHalHandle hHal,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07003039 tANI_U8 *pChannelList,
3040 tANI_U8 numChannels);
3041#endif
3042
Srinivas Girigowdade697412013-02-14 16:31:48 -08003043/*--------------------------------------------------------------------------
Srinivas Girigowdade697412013-02-14 16:31:48 -08003044 \brief sme_getRoamScanChannelList() - get roam scan channel list
3045 This is a synchronuous call
3046 \param hHal - The handle returned by macOpen.
3047 \return eHAL_STATUS_SUCCESS - SME update config successful.
3048 Other status means SME is failed to update
3049 \sa
3050 --------------------------------------------------------------------------*/
3051eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList,
3052 tANI_U8 *pNumChannels);
3053
3054/*--------------------------------------------------------------------------
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003055 \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003056 This is a synchronuous call
3057 \param hHal - The handle returned by macOpen.
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003058 \return TRUE (1) - if the ESE feature is enabled
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003059 FALSE (0) - if feature is disabled (compile or runtime)
3060 \sa
3061 --------------------------------------------------------------------------*/
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08003062tANI_BOOLEAN sme_getIsEseFeatureEnabled(tHalHandle hHal);
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003063
3064/*--------------------------------------------------------------------------
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07003065 \brief sme_getWESMode() - getWES Mode
3066 This is a synchronous call
3067 \param hHal - The handle returned by macOpen.
3068 \return v_U8_t - WES Mode Enabled(1)/Disabled(0)
3069 \sa
3070 --------------------------------------------------------------------------*/
3071v_BOOL_t sme_GetWESMode(tHalHandle hHal);
3072
3073/*--------------------------------------------------------------------------
Srinivas Girigowda100eb322013-03-15 16:48:20 -07003074 \brief sme_GetRoamScanControl() - get scan control
3075 This is a synchronous call
3076 \param hHal - The handle returned by macOpen.
3077 \return v_BOOL_t - Enabled(1)/Disabled(0)
3078 \sa
3079 --------------------------------------------------------------------------*/
3080v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal);
3081
3082/* ---------------------------------------------------------------------------
3083 \fn sme_UpdateEmptyScanRefreshPeriod
3084 \brief Update nnEmptyScanRefreshPeriod
3085 This function is called through dynamic setConfig callback function
3086 to configure nnEmptyScanRefreshPeriod
3087 Usage: adb shell iwpriv wlan0 setConfig nEmptyScanRefreshPeriod=[0 .. 60]
3088 \param hHal - HAL handle for device
3089 \param nEmptyScanRefreshPeriod - scan period following empty scan results.
3090 \- return Success or failure
3091 -------------------------------------------------------------------------*/
3092
3093/*--------------------------------------------------------------------------
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07003094 \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not
3095 This is a synchronuous call
3096 \param hHal - The handle returned by macOpen.
3097 \return TRUE (1) - if the feature is enabled
3098 FALSE (0) - if feature is disabled (compile or runtime)
3099 \sa
3100 --------------------------------------------------------------------------*/
3101tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal);
3102
3103/*--------------------------------------------------------------------------
3104 \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not
3105 This is a synchronuous call
3106 \param hHal - The handle returned by macOpen.
3107 \return TRUE (1) - if the feature is enabled
3108 FALSE (0) - if feature is disabled (compile or runtime)
3109 \sa
3110 --------------------------------------------------------------------------*/
3111tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal);
3112
Srinivas Girigowdade697412013-02-14 16:31:48 -08003113#endif
3114
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07003115#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3116/*--------------------------------------------------------------------------
3117 \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure
3118 It is used at in the REG_DYNAMIC_VARIABLE macro definition of
3119 gRoamScanOffloadEnabled.
3120 This is a synchronous call
3121 \param hHal - The handle returned by macOpen.
3122 \return eHAL_STATUS_SUCCESS - SME update config successfully.
3123 Other status means SME is failed to update.
3124 \sa
3125 --------------------------------------------------------------------------*/
3126
3127eHalStatus sme_UpdateRoamScanOffloadEnabled(tHalHandle hHal, v_BOOL_t nRoamScanOffloadEnabled);
3128#endif
3129
3130
Srinivas Girigowdade697412013-02-14 16:31:48 -08003131/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003132 \fn sme_IsFeatureSupportedByFW
Kiet Lam0f320422013-11-21 19:29:17 +05303133 \brief Check if a feature is enabled by FW
3134
3135 \param featEnumValue - Enumeration value of the feature to be checked.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003136 A value from enum placeHolderInCapBitmap
3137
3138 \- return 1/0 (TRUE/FALSE)
3139 -------------------------------------------------------------------------*/
3140tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue);
Kiet Lam0f320422013-11-21 19:29:17 +05303141
3142/* ---------------------------------------------------------------------------
3143 \fn sme_IsFeatureSupportedByDriver
3144 \brief Check if a feature is enabled by driver
3145
3146 \param featEnumValue - Enumeration value of the feature to be checked.
3147 A value from enum placeHolderInCapBitmap
3148
3149 \- return 1/0 (TRUE/FALSE)
3150 -------------------------------------------------------------------------*/
3151tANI_U8 sme_IsFeatureSupportedByDriver(tANI_U8 featEnumValue);
3152
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003153#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05303154
3155/* ---------------------------------------------------------------------------
3156 \fn sme_SendTdlsLinkEstablishParams
3157 \brief API to send TDLS Link Establishment Parameters.
3158
3159 \param peerMac - peer's Mac Adress.
3160 \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters
3161 \- return VOS_STATUS_SUCCES
3162 -------------------------------------------------------------------------*/
3163
3164VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal,
3165 tANI_U8 sessionId,
3166 tSirMacAddr peerMac,
3167 tCsrTdlsLinkEstablishParams *tdlsLinkEstablishParams);
3168
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003169/* ---------------------------------------------------------------------------
3170 \fn sme_SendTdlsMgmtFrame
3171 \brief API to send TDLS management frames.
3172
3173 \param peerMac - peer's Mac Adress.
3174 \param frame_type - Type of TDLS mgmt frame to be sent.
3175 \param dialog - dialog token used in the frame.
3176 \param status - status to be incuded in the frame.
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303177 \param peerCapability - peerCapability to be incuded in the frame.
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003178 \param buf - additional IEs to be included
3179 \param len - lenght of additional Ies
Hoonki Leea34dd892013-02-05 22:56:02 -08003180 \param responder - Tdls request type
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003181 \- return VOS_STATUS_SUCCES
3182 -------------------------------------------------------------------------*/
3183VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05303184 tANI_U8 frame_type, tANI_U8 dialog, tANI_U16 status, tANI_U32 peerCapability, tANI_U8 *buf, tANI_U8 len, tANI_U8 responder);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003185/* ---------------------------------------------------------------------------
Gopichand Nakkala681989c2013-03-06 22:27:48 -08003186 \fn sme_ChangeTdlsPeerSta
3187 \brief API to Update TDLS peer sta parameters.
3188
3189 \param peerMac - peer's Mac Adress.
3190 \param staParams - Peer Station Parameters.
3191 \- return VOS_STATUS_SUCCES
3192 -------------------------------------------------------------------------*/
3193VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac,
3194 tCsrStaParams *pstaParams);
3195/* ---------------------------------------------------------------------------
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003196 \fn sme_AddTdlsPeerSta
3197 \brief API to Add TDLS peer sta entry.
3198
3199 \param peerMac - peer's Mac Adress.
3200 \- return VOS_STATUS_SUCCES
3201 -------------------------------------------------------------------------*/
3202VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3203/* ---------------------------------------------------------------------------
3204 \fn sme_DeleteTdlsPeerSta
3205 \brief API to Delete TDLS peer sta entry.
3206
3207 \param peerMac - peer's Mac Adress.
3208 \- return VOS_STATUS_SUCCES
3209 -------------------------------------------------------------------------*/
3210VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Gopichand Nakkala75e7b282013-03-15 18:37:13 -07003211/* ---------------------------------------------------------------------------
Gopichand Nakkalaccd3a382013-03-19 13:56:10 -07003212 \fn sme_SetTdlsPowerSaveProhibited
3213 \API to set/reset the isTdlsPowerSaveProhibited.
3214
3215 \- return void
3216 -------------------------------------------------------------------------*/
3217void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, v_BOOL_t val);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003218#endif
Gopichand Nakkalafe7246d2013-06-10 17:43:37 +05303219/* ---------------------------------------------------------------------------
3220 \fn sme_IsPmcBmps
3221 \brief API to Check if PMC state is BMPS.
3222
3223 \- return v_BOOL_t
3224 -------------------------------------------------------------------------*/
3225v_BOOL_t sme_IsPmcBmps(tHalHandle hHal);
3226
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003227#ifdef FEATURE_WLAN_TDLS_INTERNAL
3228typedef struct smeTdlsDisResult
3229{
3230 tSirMacAddr tdlsPeerMac;
3231 v_S7_t tdlsPeerRssi;
3232} tSmeTdlsDisResult;
3233
3234VOS_STATUS sme_StartTdlsDiscoveryReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3235v_U8_t sme_GetTdlsDiscoveryResult(tHalHandle hHal,
3236 tSmeTdlsDisResult *disResult, v_U8_t listType);
3237VOS_STATUS sme_StartTdlsLinkSetupReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
3238VOS_STATUS sme_StartTdlsLinkTeardownReq(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003239#endif /* FEATURE_WLAN_TDLS */
Tushnim Bhattacharyya9cdf6082013-04-21 16:33:30 -07003240eHalStatus sme_UpdateDfsSetting(tHalHandle hHal, tANI_U8 fUpdateEnableDFSChnlScan);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08003241
Gopichand Nakkalae620d5a2013-04-26 05:45:57 -07003242/*
3243 * SME API to enable/disable WLAN driver initiated SSR
3244 */
3245void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR);
3246
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +05303247/* ---------------------------------------------------------------------------
3248
3249 \fn sme_SetPhyMode
3250
3251 \brief Changes the PhyMode.
3252
3253 \param hHal - The handle returned by macOpen.
3254
3255 \param phyMode new phyMode which is to set
3256
3257 \return eHalStatus SUCCESS.
3258
3259 -------------------------------------------------------------------------------*/
3260eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode);
3261
3262/* ---------------------------------------------------------------------------
3263
3264 \fn sme_GetPhyMode
3265
3266 \brief gets current PhyMode.
3267
3268 \param hHal - The handle returned by macOpen.
3269
3270 \return eHalStatus PhyMode
3271
3272 -------------------------------------------------------------------------------*/
3273eCsrPhyMode sme_GetPhyMode(tHalHandle hHal);
3274
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -07003275/*
3276 * SME API to determine the channel bonding mode
3277 */
3278VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 channel);
3279
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07003280#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
3281/*--------------------------------------------------------------------------
3282 \brief sme_HandoffRequest() - a wrapper function to Request a handoff
3283 from CSR.
3284 This is a synchronous call
3285 \param hHal - The handle returned by macOpen
3286 \param pHandoffInfo - info provided by HDD with the handoff request (namely:
3287 BSSID, channel etc.)
3288 \return eHAL_STATUS_SUCCESS - SME passed the request to CSR successfully.
3289 Other status means SME is failed to send the request.
3290 \sa
3291 --------------------------------------------------------------------------*/
3292
3293eHalStatus sme_HandoffRequest(tHalHandle hHal, tCsrHandoffRequest *pHandoffInfo);
3294#endif
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003295/*--------------------------------------------------------------------------
3296 \brief sme_isSta_p2p_clientConnected() - a wrapper function to check if there
3297 is any connected session .
3298 This is a synchronous call
3299 \param hHal - The handle returned by macOpen
3300 \return VOS_STATUS - SME passed the request to CSR successfully.
3301 Other status means SME is failed to send the request.
3302 \sa
3303 --------------------------------------------------------------------------*/
Sudhir Sattayappa Kohallib1d8c3a2013-06-18 14:47:20 -07003304VOS_STATUS sme_isSta_p2p_clientConnected(tHalHandle hHal);
Leo Chang9056f462013-08-01 19:21:11 -07003305
Agarwal Ashish57e84372014-12-05 18:26:53 +05303306/*--------------------------------------------------------------------------
3307 \brief hdd_is_any_session_connected() - a wrapper function to check if there
3308 is any connected session .
3309 This is a synchronous call
3310 \param hHal - The handle returned by macOpen
3311 \return VOS_STATUS - SME passed the request to CSR successfully.
3312 Other status means SME is failed to send the request.
3313 \sa
3314 --------------------------------------------------------------------------*/
3315VOS_STATUS sme_is_any_session_connected(tHalHandle hHal);
3316
Leo Chang9056f462013-08-01 19:21:11 -07003317#ifdef FEATURE_WLAN_LPHB
3318/* ---------------------------------------------------------------------------
3319 \fn sme_LPHBConfigReq
3320 \API to make configuration LPHB within FW.
3321 \param hHal - The handle returned by macOpen
3322 \param lphdReq - LPHB request argument by client
3323 \param pCallbackfn - LPHB timeout notification callback function pointer
3324 \- return Configuration message posting status, SUCCESS or Fail
3325 -------------------------------------------------------------------------*/
3326eHalStatus sme_LPHBConfigReq(
3327 tHalHandle hHal,
3328 tSirLPHBReq *lphdReq,
3329 void (*pCallbackfn)(void *pAdapter, void *indParam));
3330#endif /* FEATURE_WLAN_LPHB */
Yue Mab9c86f42013-08-14 15:59:08 -07003331
3332/* ---------------------------------------------------------------------------
3333 \fn sme_AddPeriodicTxPtrn
3334 \brief API to Periodic TX Pattern Offload feature
3335 \param hHal - The handle returned by macOpen
3336 \param addPeriodicTxPtrnParams - Pointer to the add pattern structure
3337 \return eHalStatus
3338 ---------------------------------------------------------------------------*/
3339eHalStatus sme_AddPeriodicTxPtrn(tHalHandle hHal, tSirAddPeriodicTxPtrn
3340 *addPeriodicTxPtrnParams);
3341
3342/* ---------------------------------------------------------------------------
3343 \fn sme_DelPeriodicTxPtrn
3344 \brief API to Periodic TX Pattern Offload feature
3345 \param hHal - The handle returned by macOpen
3346 \param delPeriodicTxPtrnParams - Pointer to the deleting pattern structure
3347 \return eHalStatus
3348 ---------------------------------------------------------------------------*/
3349eHalStatus sme_DelPeriodicTxPtrn(tHalHandle hHal, tSirDelPeriodicTxPtrn
3350 *delPeriodicTxPtrnParams);
Sudhir Sattayappa Kohalli37620692013-08-05 14:02:26 -07003351/*--------------------------------------------------------------------------
3352 \brief sme_enable_disable_split_scan() - a wrapper function to set the split
3353 scan parameter.
3354 This is a synchronous call
3355 \param hHal - The handle returned by macOpen
3356 \return None.
3357 \sa
3358 --------------------------------------------------------------------------*/
3359void sme_enable_disable_split_scan (tHalHandle hHal, tANI_U8 nNumStaChan,
3360 tANI_U8 nNumP2PChan);
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303361
Chittajit Mitraf5413a42013-10-18 14:20:08 -07003362/* ---------------------------------------------------------------------------
3363 \fn sme_SendRateUpdateInd
3364 \brief API to Update rate
3365 \param hHal - The handle returned by macOpen
3366 \param rateUpdateParams - Pointer to rate update params
3367 \return eHalStatus
3368 ---------------------------------------------------------------------------*/
3369eHalStatus sme_SendRateUpdateInd(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams);
3370
Madan Mohan Koyyalamudi48101412013-09-11 23:09:37 +05303371/*
3372 * sme API to trigger fast BSS roam to a given BSSID independent of RSSI
3373 * triggers
3374 * return status
3375*/
3376eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
3377 tANI_U8 *bssid,
3378 tSmeFastRoamTrigger fastRoamTrig);
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +05303379
3380eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
3381 tANI_U8 *pBSSId,
3382 tANI_BOOLEAN flush_cache );
Tushnim Bhattacharyyaad37df12013-10-02 12:01:33 -07003383
3384void smeGetCommandQStatus( tHalHandle hHal );
Rajeev79dbe4c2013-10-05 11:03:42 +05303385
3386#ifdef FEATURE_WLAN_BATCH_SCAN
3387/* ---------------------------------------------------------------------------
3388 \fn sme_SetBatchScanReq
3389 \brief API to set batch scan request in FW
3390 \param hHal - The handle returned by macOpen.
3391 \param pRequest - Pointer to the batch request.
3392 \param sessionId - session ID
3393 \param callbackRoutine - HDD callback which needs to be invoked after
3394 getting set batch scan response from FW
3395 \param callbackContext - pAdapter context
3396 \return eHalStatus
3397 ---------------------------------------------------------------------------*/
3398eHalStatus
3399sme_SetBatchScanReq
3400(
3401 tHalHandle hHal, tSirSetBatchScanReq *pRequest, tANI_U8 sessionId,
3402 void (*callbackRoutine) (void *callbackCtx, tSirSetBatchScanRsp *pRsp),
3403 void *callbackContext
3404);
3405
3406/* ---------------------------------------------------------------------------
3407 \fn sme_TriggerBatchScanResultInd
3408 \brief API to trigger batch scan result indications from from FW
3409 \param hHal - The handle returned by macOpen.
3410 \param pRequest - Pointer to get batch request.
3411 \param sessionId - session ID
3412 \param callbackRoutine - HDD callback which needs to be invoked after
3413 getting get batch scan response from FW
3414 \param callbackContext - pAdapter context
3415 \return eHalStatus
3416 ---------------------------------------------------------------------------*/
3417eHalStatus
3418sme_TriggerBatchScanResultInd
3419(
3420 tHalHandle hHal, tSirTriggerBatchScanResultInd *pRequest, tANI_U8 sessionId,
3421 void (*callbackRoutine) (void *callbackCtx, void *pRsp),
3422 void *callbackContext
3423);
3424
3425/* ---------------------------------------------------------------------------
3426 \fn sme_StopBatchScanInd
3427 \brief API to stop batch scan request in FW
3428 \param hHal - The handle returned by macOpen.
3429 \param pRequest - Pointer to stop batch indication
3430 \return eHalStatus
3431 ---------------------------------------------------------------------------*/
3432eHalStatus
3433sme_StopBatchScanInd
3434(
3435 tHalHandle hHal, tSirStopBatchScanInd *pInd, tANI_U8 sessionId
3436);
3437
3438#endif
Leo Chang0b0e45a2013-12-15 15:18:55 -08003439
3440#ifdef FEATURE_WLAN_CH_AVOID
3441/* ---------------------------------------------------------------------------
3442 \fn sme_AddChAvoidCallback
3443 \brief Used to plug in callback function
3444 Which notify channel may not be used with SAP or P2PGO mode.
3445 Notification come from FW.
3446 \param hHal
3447 \param pCallbackfn : callback function pointer should be plugged in
3448 \- return eHalStatus
3449 -------------------------------------------------------------------------*/
3450eHalStatus sme_AddChAvoidCallback
3451(
3452 tHalHandle hHal,
3453 void (*pCallbackfn)(void *pAdapter, void *indParam)
3454);
3455#endif /* FEATURE_WLAN_CH_AVOID */
Tushnim Bhattacharyyaed4d0c22014-01-30 11:56:44 -08003456eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
Sushant Kaushike0d2cce2014-04-10 14:36:07 +05303457/* ---------------------------------------------------------------------------
3458 \fn sme_requestTypetoString
3459 \brief API to convert requestType enum values
3460 to string.
3461 ---------------------------------------------------------------------------*/
3462const char * sme_requestTypetoString(const v_U8_t requestType);
3463/* ---------------------------------------------------------------------------
3464 \fn sme_PmcStatetoString
3465 \brief API to convert PmcState enum values
3466 to string.
3467 ---------------------------------------------------------------------------*/
3468const char * sme_PmcStatetoString(const v_U8_t pmcState);
c_hpothu92367912014-05-01 15:18:17 +05303469
3470eHalStatus sme_getBcnMissRate(tHalHandle, tANI_U8, void *, void *);
3471
Agarwal Ashish5e414792014-06-08 15:25:23 +05303472tANI_BOOLEAN sme_Is11dCountrycode(tHalHandle hHal);
Atul Mittalc0f739f2014-07-31 13:47:47 +05303473
3474// tdlsoffchan
3475VOS_STATUS sme_SendTdlsChanSwitchReq(tHalHandle hHal,
3476 tANI_U8 sessionId,
3477 tSirMacAddr peerMac,
3478 tANI_S32 tdlsOffCh,
3479 tANI_S32 tdlsOffChBwOffset,
3480 tANI_U8 tdlsSwMode);
Abhishek Singh3ae443b2014-10-08 11:49:27 +05303481eHalStatus sme_GetFwStats(tHalHandle hHal, tANI_U32 stats, void *data,
3482 void *callback);
Ganesh Kondabattini8f6e3b32014-08-25 16:07:54 +05303483void sme_SetMiracastMode (tHalHandle hHal,tANI_U8 mode);
c_hpothuef45bc32014-09-11 10:10:18 +05303484
3485void sme_resetCoexEevent(tHalHandle hHal);
3486
Peng Xu117eab42014-09-25 13:33:27 +05303487tANI_U32 sme_GetChannelBondingMode5G(tHalHandle hHal);
3488tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303489#ifdef WLAN_FEATURE_AP_HT40_24G
3490void sme_UpdateChannelBondingMode24G(tHalHandle hHal,
3491 tANI_U8 cbMode);
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05303492eHalStatus sme_SetHT2040Mode(tHalHandle hHal,
3493 tANI_U8 sessionId, tANI_U8 cbMode);
Hardik Kantilal Pateldd107952014-11-20 15:24:52 +05303494#endif
Peng Xu117eab42014-09-25 13:33:27 +05303495
Agarwal Ashish738843c2014-09-25 12:27:56 +05303496void sme_disable_dfs_channel(tHalHandle hHal, bool disable_dfs);
3497
Srinivas Dasarib8fdd422014-11-27 10:44:20 +05303498/* HDD Callback function */
3499typedef void(*pEncryptMsgRSPCb)(void *pUserData, void *infoParam);
3500
3501eHalStatus sme_Encryptmsgsend (tHalHandle hHal,
3502 u8 *pCmd,
3503 int length,
3504 pEncryptMsgRSPCb encCB);
3505
3506
Jeff Johnson295189b2012-06-20 16:38:30 -07003507#endif //#if !defined( __SME_API_H )