blob: cfd2e9055d08deb6140badcec42ca0f5c56c2020 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Abhishek Singh99f17b82017-02-06 16:57:56 +05302 * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
Kiet Lam0fb93dd2014-02-19 00:32:59 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam0fb93dd2014-02-19 00:32:59 -080021
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028/** ------------------------------------------------------------------------- *
29 ------------------------------------------------------------------------- *
30
31
32 \file csrInsideApi.h
33
34 Define interface only used by CSR.
Jeff Johnson295189b2012-06-20 16:38:30 -070035 ========================================================================== */
36#ifndef CSR_INSIDE_API_H__
37#define CSR_INSIDE_API_H__
38
39
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +053040#include <linux/version.h>
Jeff Johnson295189b2012-06-20 16:38:30 -070041#include "csrSupport.h"
42#include "smeInside.h"
43#include "vos_nvitem.h"
44
45#define CSR_PASSIVE_MAX_CHANNEL_TIME 110
46#define CSR_PASSIVE_MIN_CHANNEL_TIME 60
47
48#define CSR_ACTIVE_MAX_CHANNEL_TIME 40
49#define CSR_ACTIVE_MIN_CHANNEL_TIME 20
50
Abhishek Singhadd13582016-09-29 17:00:03 +053051#define CSR_ACTIVE_MAX_CHANNEL_TIME_ESCO_BTC 120
52#define CSR_ACTIVE_MIN_CHANNEL_TIME_ESCO_BTC 60
53
54#define CSR_ACTIVE_MIN_CHANNEL_TIME_SCO_BTC 20
55#define CSR_ACTIVE_MAX_CHANNEL_TIME_SCO_BTC 40
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080056
Jeff Johnson295189b2012-06-20 16:38:30 -070057#ifdef WLAN_AP_STA_CONCURRENCY
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -070058#define CSR_PASSIVE_MAX_CHANNEL_TIME_CONC 110
59#define CSR_PASSIVE_MIN_CHANNEL_TIME_CONC 60
60
Jeff Johnson295189b2012-06-20 16:38:30 -070061#define CSR_ACTIVE_MAX_CHANNEL_TIME_CONC 27
62#define CSR_ACTIVE_MIN_CHANNEL_TIME_CONC 20
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -070063
Madan Mohan Koyyalamudi4805fa82012-11-09 17:53:39 -080064#define CSR_REST_TIME_CONC 100
Vinay Malekal05fdc812012-12-17 13:04:30 -080065
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -070066#define CSR_NUM_STA_CHAN_COMBINED_CONC 3
67#define CSR_NUM_P2P_CHAN_COMBINED_CONC 1
Jeff Johnson295189b2012-06-20 16:38:30 -070068#endif
69
70#define CSR_MAX_NUM_SUPPORTED_CHANNELS 55
71
Jeff Johnsone7245742012-09-05 17:12:55 -070072#define CSR_MAX_2_4_GHZ_SUPPORTED_CHANNELS 14
73
Deepthi Gowri50e2fa52016-03-17 15:30:53 +053074#define CSR_MAX_BSS_SUPPORT 512
Srinivas Girigowda5cecb202013-10-08 09:13:25 -070075#define SYSTEM_TIME_MSEC_TO_USEC 1000
Deepthi Gowri4480a3f2016-05-18 19:30:17 +053076#define SYSTEM_TIME_SEC_TO_MSEC 1000
Jeff Johnson295189b2012-06-20 16:38:30 -070077
78//This number minus 1 means the number of times a channel is scanned before a BSS is remvoed from
79//cache scan result
80#define CSR_AGING_COUNT 3
81//The following defines are used by palTimer
82//This is used for palTimer when request to imps fails
83#define CSR_IDLE_SCAN_WAIT_TIME (1 * PAL_TIMER_TO_SEC_UNIT) //1 second
84//This is used for palTimer when imps ps is disabled
85//This number shall not be smaller than 5-6 seconds in general because a full scan may take 3-4 seconds
86#define CSR_IDLE_SCAN_NO_PS_INTERVAL (10 * PAL_TIMER_TO_SEC_UNIT) //10 second
87#define CSR_IDLE_SCAN_NO_PS_INTERVAL_MIN (5 * PAL_TIMER_TO_SEC_UNIT)
88#define CSR_SCAN_GET_RESULT_INTERVAL (5 * PAL_TIMER_TO_SEC_UNIT) //5 seconds
Jeff Johnson295189b2012-06-20 16:38:30 -070089#define CSR_MIC_ERROR_TIMEOUT (60 * PAL_TIMER_TO_SEC_UNIT) //60 seconds
90#define CSR_TKIP_COUNTER_MEASURE_TIMEOUT (60 * PAL_TIMER_TO_SEC_UNIT) //60 seconds
91#define CSR_SCAN_RESULT_AGING_INTERVAL (5 * PAL_TIMER_TO_SEC_UNIT) //5 seconds
92//the following defines are NOT used by palTimer
93#define CSR_SCAN_AGING_TIME_NOT_CONNECT_NO_PS 50 //50 seconds
94#define CSR_SCAN_AGING_TIME_NOT_CONNECT_W_PS 300 //300 seconds
95#define CSR_SCAN_AGING_TIME_CONNECT_NO_PS 150 //150 seconds
96#define CSR_SCAN_AGING_TIME_CONNECT_W_PS 600 //600 seconds
Abhishek Singh6e8ca792017-11-30 15:43:22 +053097#define CSR_JOIN_FAILURE_TIMEOUT_DEFAULT ( 300 )
98#define CSR_JOIN_FAILURE_TIMEOUT_MIN (300) //minimal value
Jeff Johnson295189b2012-06-20 16:38:30 -070099//These are going against the signed RSSI (tANI_S8) so it is between -+127
100#define CSR_BEST_RSSI_VALUE (-30) //RSSI >= this is in CAT4
101#define CSR_DEFAULT_RSSI_DB_GAP 30 //every 30 dbm for one category
102#define CSR_BSS_CAP_VALUE_NONE 0 //not much value
103#define CSR_BSS_CAP_VALUE_HT 2
104#define CSR_BSS_CAP_VALUE_WMM 1
105#define CSR_BSS_CAP_VALUE_UAPSD 1
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800106#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -0800107#define CSR_BSS_CAP_VALUE_5GHZ 1
108#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700109#define CSR_DEFAULT_ROAMING_TIME 10 //10 seconds
110#define CSR_ROAM_MIN(X, Y) ((X) < (Y) ? (X) : (Y))
111#define CSR_ROAM_MAX(X, Y) ((X) > (Y) ? (X) : (Y))
112
113#ifdef FEATURE_WLAN_BTAMP_UT_RF
114#define CSR_JOIN_MAX_RETRY_COUNT 10
115#define CSR_JOIN_RETRY_TIMEOUT_PERIOD ( 1 * PAL_TIMER_TO_SEC_UNIT ) // 1 second
116#endif
117
Padma, Santhosh Kumar36183352016-11-08 17:48:34 +0530118#define CSR_DISABLE_SCAN_DURING_SCO 100 //100 milliseconds
119
120
Kapil Guptab3a981b2016-06-26 13:36:51 +0530121#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
122#define ROAMING_RSSI_WEIGHT 50
123#define MIN_RSSI (-100)
124#define MAX_RSSI 0
125#define ROAM_AP_COUNT_WEIGHT 50
126#define ROAM_MAX_COUNT 30
127#define ROAM_MIN_COUNT 0
128#define ROAM_MAX_WEIGHT 100
129
130#define RSSI_WEIGHTAGE 25
131#define HT_CAPABILITY_WEIGHTAGE 10
132#define VHT_CAP_WEIGHTAGE 6
133#define BEAMFORMING_CAP_WEIGHTAGE 2
134#define CHAN_WIDTH_WEIGHTAGE 10
135#define CHAN_BAND_WEIGHTAGE 5
136#define WMM_WEIGHTAGE 2
137#define CCA_WEIGHTAGE 10
138#define OTHER_AP_WEIGHT 30
139
140#define MAX_AP_LOAD 255
141#define PENALTY_TIMEOUT (30 * 60 * 1000)
142#define PENALTY_REMAINING_SCORE (7)
143#define PENALTY_TOTAL_SCORE (10)
144#define PER_EXCELENT_RSSI -40
145#define PER_GOOD_RSSI -55
146#define PER_POOR_RSSI -65
Kapil Guptaa040e772016-09-15 19:03:45 +0530147#define PER_BAD_RSSI -80
Kapil Guptab3a981b2016-06-26 13:36:51 +0530148#define PER_ROAM_EXCELLENT_RSSI_WEIGHT 100
149#define PER_ROAM_GOOD_RSSI_WEIGHT 80
150#define PER_ROAM_BAD_RSSI_WEIGHT 60
151#define PER_ROAM_MAX_WEIGHT 100
152#define PER_ROAM_80MHZ 100
153#define PER_ROAM_40MHZ 70
154#define PER_ROAM_20MHZ 30
155#define PER_ROAM_PENALTY (3/10)
156#define PER_ROAM_MAX_BSS_SCORE 10000
157#endif
158
Jeff Johnson295189b2012-06-20 16:38:30 -0700159typedef enum
160{
161 eCsrNextScanNothing,
162 eCsrNextLostLinkScan1Success,
163 eCsrNextLostLinkScan1Failed,
164 eCsrNextLostLinkScan2Success,
165 eCsrNextLostLinkScan2Failed,
166 eCsrNextLostLinkScan3Success,
167 eCsrNexteScanForSsidSuccess,
168 eCsrNextLostLinkScan3Failed,
169 eCsrNext11dScan1Failure,
170 eCsrNext11dScan1Success,
171 eCsrNext11dScan2Failure,
172 eCsrNext11dScan2Success,
173 eCsrNext11dScanComplete,
174 eCsrNexteScanForSsidFailure,
175 eCsrNextIdleScanComplete,
176 eCsrNextCapChangeScanComplete,
177
178}eCsrScanCompleteNextCommand;
179
180typedef enum
181{
182 eCsrJoinSuccess,
183 eCsrJoinFailure,
184 eCsrReassocSuccess,
185 eCsrReassocFailure,
186 eCsrNothingToJoin,
187 eCsrStartBssSuccess,
188 eCsrStartBssFailure,
189 eCsrSilentlyStopRoaming,
190 eCsrSilentlyStopRoamingSaveState,
191 eCsrJoinWdsFailure,
Jeff Johnsone7245742012-09-05 17:12:55 -0700192 eCsrJoinFailureDueToConcurrency,
Jeff Johnson295189b2012-06-20 16:38:30 -0700193
194}eCsrRoamCompleteResult;
195
196typedef struct tagScanReqParam
197{
198 tANI_U8 bReturnAfter1stMatch;
199 tANI_U8 fUniqueResult;
200 tANI_U8 freshScan;
201 tANI_U8 hiddenSsid;
202 tANI_U8 reserved;
203}tScanReqParam;
204
205typedef struct tagCsrScanResult
206{
207 tListElem Link;
208 tANI_S32 AgingCount; //This BSS is removed when it reaches 0 or less
209 tANI_U32 preferValue; //The bigger the number, the better the BSS. This value override capValue
210 tANI_U32 capValue; //The biggger the better. This value is in use only if we have equal preferValue
Jeff Johnson295189b2012-06-20 16:38:30 -0700211
212 eCsrEncryptionType ucEncryptionType; //Preferred Encryption type that matched with profile.
213 eCsrEncryptionType mcEncryptionType;
214 eCsrAuthType authType; //Preferred auth type that matched with the profile.
Kapil Guptab3a981b2016-06-26 13:36:51 +0530215#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
216 int congestionScore;
217#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700218 tCsrScanResultInfo Result;
Sridhar Selvarajb59cd8c2017-07-17 18:43:55 +0530219 /*
220 * WARNING - Do not add any element here
221 * This member Result must be the last in the structure because the end
222 * of tSirBssDescription (inside) is an array with nonknown size at
223 * this time.
224 */
Jeff Johnson295189b2012-06-20 16:38:30 -0700225}tCsrScanResult;
226
227typedef struct
228{
229 tDblLinkList List;
230 tListElem *pCurEntry;
231}tScanResultList;
232
Kapil Guptac46b7542016-10-25 13:03:20 +0530233/**
234 * csr_scan_for_ssid_context() - Callback context for SSID scan
235 *
236 * @pMac: pMac handle
237 * @sessionId: scan session id
238 * @roamId: roam Id
239 */
240struct csr_scan_for_ssid_context
241{
242 tpAniSirGlobal pMac;
243 tANI_U32 sessionId;
244 tANI_U32 roamId;
245};
Jeff Johnson295189b2012-06-20 16:38:30 -0700246
247#define CSR_IS_ROAM_REASON( pCmd, reason ) ( (reason) == (pCmd)->roamCmd.roamReason )
248#define CSR_IS_BETTER_PREFER_VALUE(v1, v2) ((v1) > (v2))
249#define CSR_IS_EQUAL_PREFER_VALUE(v1, v2) ((v1) == (v2))
250#define CSR_IS_BETTER_CAP_VALUE(v1, v2) ((v1) > (v2))
251#define CSR_IS_ENC_TYPE_STATIC( encType ) ( ( eCSR_ENCRYPT_TYPE_NONE == (encType) ) || \
252 ( eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == (encType) ) || \
253 ( eCSR_ENCRYPT_TYPE_WEP104_STATICKEY == (encType) ) )
254#define CSR_IS_WAIT_FOR_KEY( pMac, sessionId ) ( CSR_IS_ROAM_JOINED( pMac, sessionId ) && CSR_IS_ROAM_SUBSTATE_WAITFORKEY( pMac, sessionId ) )
255//WIFI has a test case for not using HT rates with TKIP as encryption
256//We may need to add WEP but for now, TKIP only.
257
258#define CSR_IS_11n_ALLOWED( encType ) (( eCSR_ENCRYPT_TYPE_TKIP != (encType) ) && \
259 ( eCSR_ENCRYPT_TYPE_WEP40_STATICKEY != (encType) ) && \
260 ( eCSR_ENCRYPT_TYPE_WEP104_STATICKEY != (encType) ) && \
261 ( eCSR_ENCRYPT_TYPE_WEP40 != (encType) ) && \
262 ( eCSR_ENCRYPT_TYPE_WEP104 != (encType) ) )
263
Abhishek Singh99f17b82017-02-06 16:57:56 +0530264#define CSR_IS_DISCONNECT_COMMAND(pCommand) ((eSmeCommandRoam == \
265 (pCommand)->command) &&\
266 ((eCsrForcedDisassoc == (pCommand)->u.roamCmd.roamReason) ||\
267 (eCsrForcedIbssLeave == (pCommand)->u.roamCmd.roamReason) ||\
268 (eCsrForcedDeauth == (pCommand)->u.roamCmd.roamReason) ||\
269 (eCsrSmeIssuedDisassocForHandoff ==\
270 (pCommand)->u.roamCmd.roamReason) ||\
271 (eCsrForcedDisassocMICFailure ==\
272 (pCommand)->u.roamCmd.roamReason)))
Abhishek Singhf4669da2014-05-26 15:07:49 +0530273
Jeff Johnson295189b2012-06-20 16:38:30 -0700274eCsrRoamState csrRoamStateChange( tpAniSirGlobal pMac, eCsrRoamState NewRoamState, tANI_U8 sessionId);
275eHalStatus csrScanningStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
276void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
277void csrRoamJoinedStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
278tANI_BOOLEAN csrScanComplete( tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp );
279void csrReleaseCommandRoam(tpAniSirGlobal pMac, tSmeCmd *pCommand);
Padma, Santhosh Kumar67f479b2016-12-28 15:43:42 +0530280tpCsrNeighborRoamBSSInfo csrNeighborRoamGetRoamableAPListNextEntry(tpAniSirGlobal pMac,
281 tDblLinkList *pList, tpCsrNeighborRoamBSSInfo pNeighborEntry);
282v_U8_t *csrNeighborRoamStateToString(v_U8_t state);
283void csrReleaseCommandPreauth(tpAniSirGlobal pMac, tSmeCmd *pCommand);
Jeff Johnson295189b2012-06-20 16:38:30 -0700284void csrReleaseCommandScan(tpAniSirGlobal pMac, tSmeCmd *pCommand);
285void csrReleaseCommandWmStatusChange(tpAniSirGlobal pMac, tSmeCmd *pCommand);
286//pIes2 can be NULL
287tANI_BOOLEAN csrIsDuplicateBssDescription( tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc1,
Tushnim Bhattacharyya5128d752013-06-26 23:23:18 -0700288 tSirBssDescription *pSirBssDesc2, tDot11fBeaconIEs *pIes2, tANI_BOOLEAN fForced );
Jeff Johnson295189b2012-06-20 16:38:30 -0700289eHalStatus csrRoamSaveConnectedBssDesc( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDesc );
290tANI_BOOLEAN csrIsNetworkTypeEqual( tSirBssDescription *pSirBssDesc1, tSirBssDescription *pSirBssDesc2 );
291eHalStatus csrScanSmeScanResponse( tpAniSirGlobal pMac, void *pMsgBuf );
292/*
293 Prepare a filter base on a profile for parsing the scan results.
294 Upon successful return, caller MUST call csrFreeScanFilter on
295 pScanFilter when it is done with the filter.
296*/
297eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tCsrScanResultFilter *pScanFilter);
298eHalStatus csrRoamCopyProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pDstProfile, tCsrRoamProfile *pSrcProfile);
299eHalStatus csrRoamStart(tpAniSirGlobal pMac);
300void csrRoamStop(tpAniSirGlobal pMac, tANI_U32 sessionId);
301void csrRoamStartMICFailureTimer(tpAniSirGlobal pMac);
302void csrRoamStopMICFailureTimer(tpAniSirGlobal pMac);
303void csrRoamStartTKIPCounterMeasureTimer(tpAniSirGlobal pMac);
304void csrRoamStopTKIPCounterMeasureTimer(tpAniSirGlobal pMac);
305
306eHalStatus csrScanOpen(tpAniSirGlobal pMac);
307eHalStatus csrScanClose(tpAniSirGlobal pMac);
308eHalStatus csrScanRequestLostLink1( tpAniSirGlobal pMac, tANI_U32 sessionId );
309eHalStatus csrScanRequestLostLink2( tpAniSirGlobal pMac, tANI_U32 sessionId );
310eHalStatus csrScanRequestLostLink3( tpAniSirGlobal pMac, tANI_U32 sessionId );
311eHalStatus csrScanHandleFailedLostlink1(tpAniSirGlobal pMac, tANI_U32 sessionId);
312eHalStatus csrScanHandleFailedLostlink2(tpAniSirGlobal pMac, tANI_U32 sessionId);
313eHalStatus csrScanHandleFailedLostlink3(tpAniSirGlobal pMac, tANI_U32 sessionId);
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700314tCsrScanResult *csrScanAppendBssDescription( tpAniSirGlobal pMac,
Jeff Johnson295189b2012-06-20 16:38:30 -0700315 tSirBssDescription *pSirBssDescription,
Tushnim Bhattacharyya5128d752013-06-26 23:23:18 -0700316 tDot11fBeaconIEs *pIes, tANI_BOOLEAN fForced);
Jeff Johnson295189b2012-06-20 16:38:30 -0700317void csrScanCallCallback(tpAniSirGlobal pMac, tSmeCmd *pCommand, eCsrScanStatus scanStatus);
318eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCsrScanRequest *pSrcReq);
319eHalStatus csrScanFreeRequest(tpAniSirGlobal pMac, tCsrScanRequest *pReq);
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700320eHalStatus csrScanCopyResultList(tpAniSirGlobal pMac, tScanResultHandle hIn, tScanResultHandle *phResult);
Jeff Johnson295189b2012-06-20 16:38:30 -0700321void csrInitBGScanChannelList(tpAniSirGlobal pMac);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -0700322eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, tANI_U32 roamId, tANI_BOOLEAN notify);
Jeff Johnson295189b2012-06-20 16:38:30 -0700323eHalStatus csrScanForCapabilityChange(tpAniSirGlobal pMac, tSirSmeApNewCaps *pNewCaps);
324eHalStatus csrScanStartGetResultTimer(tpAniSirGlobal pMac);
325eHalStatus csrScanStopGetResultTimer(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700326eHalStatus csrScanBGScanEnable(tpAniSirGlobal pMac);
327eHalStatus csrScanStartIdleScanTimer(tpAniSirGlobal pMac, tANI_U32 interval);
328eHalStatus csrScanStopIdleScanTimer(tpAniSirGlobal pMac);
329eHalStatus csrScanStartIdleScan(tpAniSirGlobal pMac);
330//Param: pTimeInterval -- Caller allocated memory in return, if failed, to specify the nxt time interval for
331//idle scan timer interval
332//Return: Not success -- meaning it cannot start IMPS, caller needs to start a timer for idle scan
333eHalStatus csrScanTriggerIdleScan(tpAniSirGlobal pMac, tANI_U32 *pTimeInterval);
334void csrScanCancelIdleScan(tpAniSirGlobal pMac);
335void csrScanStopTimers(tpAniSirGlobal pMac);
336//This function will remove scan commands that are not related to association or IBSS
337tANI_BOOLEAN csrScanRemoveNotRoamingScanCommand(tpAniSirGlobal pMac);
338//To remove fresh scan commands from the pending queue
339tANI_BOOLEAN csrScanRemoveFreshScanCommand(tpAniSirGlobal pMac, tANI_U8 sessionId);
c_hpothua3d45d52015-01-05 14:11:17 +0530340tSirAbortScanStatus csrScanAbortMacScan(tpAniSirGlobal pMac,
341 tANI_U8 sessionId,
342 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -0700343void csrRemoveCmdFromPendingList(tpAniSirGlobal pMac, tDblLinkList *pList,
344 eSmeCommandType commandType );
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +0530345void csrRemoveCmdWithSessionIdFromPendingList(tpAniSirGlobal pMac,
346 tANI_U8 sessionId,
347 tDblLinkList *pList,
348 eSmeCommandType commandType);
349eHalStatus csrScanAbortMacScanNotForConnect(tpAniSirGlobal pMac,
350 tANI_U8 sessionId);
Madan Mohan Koyyalamudide1b5bc2013-07-12 00:56:04 +0530351eHalStatus csrScanGetScanChannelInfo(tpAniSirGlobal pMac, tANI_U8 sessionId);
Abhishek Singhdc2bfd42014-06-19 17:59:05 +0530352eHalStatus csrScanAbortScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId);
353void csrRemoveScanForSSIDFromPendingList(tpAniSirGlobal pMac, tDblLinkList *pList, tANI_U32 sessionId);
354
Jeff Johnson295189b2012-06-20 16:38:30 -0700355//To age out scan results base. tSmeGetScanChnRsp is a pointer returned by LIM that
356//has the information regarding scanned channels.
357//The logic is that whenever CSR add a BSS to scan result, it set the age count to
358//a value. This function deduct the age count if channelId matches the BSS' channelId
359//The BSS is remove if the count reaches 0.
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700360eHalStatus csrScanAgeResults(tpAniSirGlobal pMac, tSmeGetScanChnRsp *pScanChnInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700361
Abhishek Singhc640dbb2015-06-08 10:54:17 +0530362eHalStatus csrIbssAgeBss(tpAniSirGlobal pMac);
363
Jeff Johnson295189b2012-06-20 16:38:30 -0700364//If fForce is TRUE we will save the new String that is learn't.
365//Typically it will be true in case of Join or user initiated ioctl
Chandrasekaran, Manishekar90c49322014-06-24 13:26:14 +0530366tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc,
367 tDot11fBeaconIEs *pIes, tANI_BOOLEAN fForce );
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700368void csrApplyCountryInformation( tpAniSirGlobal pMac, tANI_BOOLEAN fForce );
Jeff Johnson295189b2012-06-20 16:38:30 -0700369void csrSetCfgScanControlList( tpAniSirGlobal pMac, tANI_U8 *countryCode, tCsrChannel *pChannelList );
370void csrReinitScanCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand);
371void csrFreeScanResultEntry( tpAniSirGlobal pMac, tCsrScanResult *pResult );
372
373eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pRoamInfo,
374 tANI_U32 roamId, eRoamCmdStatus u1, eCsrRoamResult u2);
375eHalStatus csrRoamIssueConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
376 tScanResultHandle hBSSList,
377 eCsrRoamReason reason, tANI_U32 roamId,
378 tANI_BOOLEAN fImediate, tANI_BOOLEAN fClearScan);
379eHalStatus csrRoamIssueReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
380 tCsrRoamModifyProfileFields *pModProfileFields,
381 eCsrRoamReason reason, tANI_U32 roamId, tANI_BOOLEAN fImediate);
382void csrRoamComplete( tpAniSirGlobal pMac, eCsrRoamCompleteResult Result, void *Context );
383eHalStatus csrRoamIssueSetContextReq( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrEncryptionType EncryptType,
384 tSirBssDescription *pBssDescription,
385 tSirMacAddr *bssId, tANI_BOOLEAN addKey,
386 tANI_BOOLEAN fUnicast, tAniKeyDirection aniKeyDirection,
387 tANI_U8 keyId, tANI_U16 keyLength,
388 tANI_U8 *pKey, tANI_U8 paeRole );
389eHalStatus csrRoamProcessDisassocDeauth( tpAniSirGlobal pMac, tSmeCmd *pCommand,
390 tANI_BOOLEAN fDisassoc, tANI_BOOLEAN fMICFailure );
391eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
392 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes);
393void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg );
394void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg);
395eHalStatus csrRoamIssueStartBss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamStartBssParams *pParam,
396 tCsrRoamProfile *pProfile, tSirBssDescription *pBssDesc, tANI_U32 roamId );
397eHalStatus csrRoamIssueStopBss( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamSubState NewSubstate );
398tANI_BOOLEAN csrIsSameProfile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pProfile1, tCsrRoamProfile *pProfile2);
399tANI_BOOLEAN csrIsRoamCommandWaiting(tpAniSirGlobal pMac);
400tANI_BOOLEAN csrIsRoamCommandWaitingForSession(tpAniSirGlobal pMac, tANI_U32 sessionId);
401tANI_BOOLEAN csrIsScanForRoamCommandActive( tpAniSirGlobal pMac );
402eRoamCmdStatus csrGetRoamCompleteStatus(tpAniSirGlobal pMac, tANI_U32 sessionId);
403//pBand can be NULL if caller doesn't need to get it
404//eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, eCsrPhyMode phyModeIn, tANI_U8 operationChn, eCsrBand *pBand );
405eHalStatus csrRoamIssueDisassociateCmd( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason );
406eHalStatus csrRoamDisconnectInternal(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason);
407//pCommand may be NULL
408void csrRoamRemoveDuplicateCommand(tpAniSirGlobal pMac, tANI_U32 sessionId, tSmeCmd *pCommand, eCsrRoamReason eRoamReason);
409
410eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDescription,
Srinivas Girigowdac16730e2013-01-16 13:39:39 -0800411 tCsrRoamProfile *pProfile, tDot11fBeaconIEs *pIes, tANI_U16 messageType );
Jeff Johnson295189b2012-06-20 16:38:30 -0700412eHalStatus csrSendMBDisassocReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirMacAddr bssId, tANI_U16 reasonCode );
Padma, Santhosh Kumarf4966dc2017-01-03 18:56:00 +0530413#ifdef WLAN_FEATURE_LFR_MBB
414eHalStatus csr_fill_reassoc_req(tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDescription,
415 tDot11fBeaconIEs *pIes, tSirSmeJoinReq **reassoc_req);
416#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700417eHalStatus csrSendMBDeauthReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirMacAddr bssId, tANI_U16 reasonCode );
418eHalStatus csrSendMBDisassocCnfMsg( tpAniSirGlobal pMac, tpSirSmeDisassocInd pDisassocInd );
419eHalStatus csrSendMBDeauthCnfMsg( tpAniSirGlobal pMac, tpSirSmeDeauthInd pDeauthInd );
420eHalStatus csrSendAssocCnfMsg( tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocInd, eHalStatus status );
Jeff Johnson295189b2012-06-20 16:38:30 -0700421eHalStatus csrSendAssocIndToUpperLayerCnfMsg( tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocInd, eHalStatus Halstatus, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -0700422eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamBssType bssType,
423 tCsrRoamStartBssParams *pParam, tSirBssDescription *pBssDesc );
424eHalStatus csrSendMBStopBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -0700425
426tANI_BOOLEAN csrIsMacAddressEqual( tpAniSirGlobal pMac, tCsrBssid *pMacAddr1, tCsrBssid *pMacAddr2 );
427//Caller should put the BSS' ssid to fiedl bssSsid when comparing SSID for a BSS.
428tANI_BOOLEAN csrIsSsidMatch( tpAniSirGlobal pMac, tANI_U8 *ssid1, tANI_U8 ssid1Len, tANI_U8 *bssSsid,
429 tANI_U8 bssSsidLen, tANI_BOOLEAN fSsidRequired );
430tANI_BOOLEAN csrIsPhyModeMatch( tpAniSirGlobal pMac, tANI_U32 phyMode,
431 tSirBssDescription *pSirBssDesc, tCsrRoamProfile *pProfile,
432 eCsrCfgDot11Mode *pReturnCfgDot11Mode,
433 tDot11fBeaconIEs *pIes);
434tANI_BOOLEAN csrRoamIsChannelValid( tpAniSirGlobal pMac, tANI_U8 channel );
435
436//pNumChan is a caller allocated space with the sizeof pChannels
437eHalStatus csrGetCfgValidChannels(tpAniSirGlobal pMac, tANI_U8 *pChannels, tANI_U32 *pNumChan);
438void csrRoamCcmCfgSetCallback(tHalHandle hHal, tANI_S32 result);
439void csrScanCcmCfgSetCallback(tHalHandle hHal, tANI_S32 result);
440
Kiran4a17ebe2013-01-31 10:43:43 -0800441tPowerdBm csrGetCfgMaxTxPower (tpAniSirGlobal pMac, tANI_U8 channel);
442
Jeff Johnson295189b2012-06-20 16:38:30 -0700443//To free the last roaming profile
444void csrFreeRoamProfile(tpAniSirGlobal pMac, tANI_U32 sessionId);
445void csrFreeConnectBssDesc(tpAniSirGlobal pMac, tANI_U32 sessionId);
446eHalStatus csrMoveBssToHeadFromBSSID(tpAniSirGlobal pMac, tCsrBssid *bssid, tScanResultHandle hScanResult);
447tANI_BOOLEAN csrCheckPSReady(void *pv);
448void csrFullPowerCallback(void *pv, eHalStatus status);
449//to free memory allocated inside the profile structure
450void csrReleaseProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile);
451//To free memory allocated inside scanFilter
452void csrFreeScanFilter(tpAniSirGlobal pMac, tCsrScanResultFilter *pScanFilter);
Jeff Johnson295189b2012-06-20 16:38:30 -0700453eCsrCfgDot11Mode csrGetCfgDot11ModeFromCsrPhyMode(tCsrRoamProfile *pProfile, eCsrPhyMode phyMode, tANI_BOOLEAN fProprietary);
Jeff Johnson295189b2012-06-20 16:38:30 -0700454tANI_U32 csrTranslateToWNICfgDot11Mode(tpAniSirGlobal pMac, eCsrCfgDot11Mode csrDot11Mode);
455void csrSaveChannelPowerForBand( tpAniSirGlobal pMac, tANI_BOOLEAN fPopulate5GBand );
Gopichand Nakkalab9185f22012-12-21 08:03:42 -0800456void csrApplyChannelPowerCountryInfo( tpAniSirGlobal pMac, tCsrChannel *pChannelList, tANI_U8 *countryCode, tANI_BOOLEAN updateRiva);
Jeff Johnsone7245742012-09-05 17:12:55 -0700457void csrApplyPower2Current( tpAniSirGlobal pMac );
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700458void csrAssignRssiForCategory(tpAniSirGlobal pMac, tANI_S8 bestApRssi, tANI_U8 catOffset);
Jeff Johnson295189b2012-06-20 16:38:30 -0700459tANI_BOOLEAN csrIsMacAddressZero( tpAniSirGlobal pMac, tCsrBssid *pMacAddr );
460tANI_BOOLEAN csrIsMacAddressBroadcast( tpAniSirGlobal pMac, tCsrBssid *pMacAddr );
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700461eHalStatus csrRoamRemoveConnectedBssFromScanCache(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pConnProfile);
Jeff Johnson295189b2012-06-20 16:38:30 -0700462eHalStatus csrRoamStartRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamingReason roamingReason);
463//return a boolean to indicate whether roaming completed or continue.
464tANI_BOOLEAN csrRoamCompleteRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId,
465 tANI_BOOLEAN fForce, eCsrRoamResult roamResult);
466void csrRoamCompletion(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pRoamInfo, tSmeCmd *pCommand, eCsrRoamResult roamResult, tANI_BOOLEAN fSuccess);
467void csrRoamCancelRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId);
Gopichand Nakkalab9185f22012-12-21 08:03:42 -0800468void csrResetCountryInformation( tpAniSirGlobal pMac, tANI_BOOLEAN fForce, tANI_BOOLEAN updateRiva );
Jeff Johnson295189b2012-06-20 16:38:30 -0700469void csrResetPMKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId );
470#ifdef FEATURE_WLAN_WAPI
471void csrResetBKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId );
472#endif /* FEATURE_WLAN_WAPI */
Jeff Johnsone7245742012-09-05 17:12:55 -0700473eHalStatus csrSaveToChannelPower2G_5G( tpAniSirGlobal pMac, tANI_U32 tableSize, tSirMacChanInfo *channelTable );
Jeff Johnson295189b2012-06-20 16:38:30 -0700474//Get the list of the base channels to scan for passively 11d info
475eHalStatus csrScanGetSupportedChannels( tpAniSirGlobal pMac );
476//To check whether a country code matches the one in the IE
477//Only check the first two characters, ignoring in/outdoor
478//pCountry -- caller allocated buffer contain the country code that is checking against
479//the one in pIes. It can be NULL.
480//caller must provide pIes, it cannot be NULL
481//This function always return TRUE if 11d support is not turned on.
482//pIes cannot be NULL
483tANI_BOOLEAN csrMatchCountryCode( tpAniSirGlobal pMac, tANI_U8 *pCountry, tDot11fBeaconIEs *pIes );
484eHalStatus csrRoamSetKey( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 roamId );
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700485eHalStatus csrRoamOpenSession(tpAniSirGlobal pMac,
486 csrRoamCompleteCallback callback,
487 void *pContext, tANI_U8 *pSelfMacAddr,
488 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700489//fSync: TRUE means cleanupneeds to handle synchronously.
490eHalStatus csrRoamCloseSession( tpAniSirGlobal pMac, tANI_U32 sessionId,
mukul sharmabab477d2015-06-11 17:14:55 +0530491 tANI_BOOLEAN fSync, tANI_U8 bPurgeList,
Jeff Johnson295189b2012-06-20 16:38:30 -0700492 csrRoamSessionCloseCallback callback,
493 void *pContext );
Abhishek Singhdeb782f2016-04-28 11:44:29 +0530494void csrPurgeSmeCmdList(tpAniSirGlobal pMac, tANI_U32 sessionId,
495 bool flush_all);
Jeff Johnson295189b2012-06-20 16:38:30 -0700496void csrCleanupSession(tpAniSirGlobal pMac, tANI_U32 sessionId);
497eHalStatus csrRoamGetSessionIdFromBSSID( tpAniSirGlobal pMac, tCsrBssid *bssid, tANI_U32 *pSessionId );
498eCsrCfgDot11Mode csrFindBestPhyMode( tpAniSirGlobal pMac, tANI_U32 phyMode );
499
500/* ---------------------------------------------------------------------------
501 \fn csrScanEnable
502 \brief Enable the scanning feature of CSR. It must be called before any scan request can be performed.
503 \param tHalHandle - HAL context handle
504 \return eHalStatus
505 -------------------------------------------------------------------------------*/
506eHalStatus csrScanEnable(tpAniSirGlobal);
507
508/* ---------------------------------------------------------------------------
509 \fn csrScanDisable
510 \brief Disableing the scanning feature of CSR. After this function return success, no scan is performed until
511a successfull to csrScanEnable
512 \param tHalHandle - HAL context handle
513 \return eHalStatus
514 -------------------------------------------------------------------------------*/
515eHalStatus csrScanDisable(tpAniSirGlobal);
516/* ---------------------------------------------------------------------------
517 \fn csrScanRequest
518 \brief Request a 11d or full scan.
519 \param pScanRequestID - pointer to an object to get back the request ID
520 \param callback - a callback function that scan calls upon finish, will not be called if csrScanRequest returns error
521 \param pContext - a pointer passed in for the callback
522 \return eHalStatus
523 -------------------------------------------------------------------------------*/
524eHalStatus csrScanRequest(tpAniSirGlobal, tANI_U16, tCsrScanRequest *,
525 tANI_U32 *pScanRequestID, csrScanCompleteCallback callback,
526 void *pContext);
527
528/* ---------------------------------------------------------------------------
529 \fn csrScanAbort
530 \brief If a scan request is abort, the scan complete callback will be called first before csrScanAbort returns.
531 \param pScanRequestID - The request ID returned from csrScanRequest
532 \return eHalStatus
533 -------------------------------------------------------------------------------*/
534eHalStatus csrScanAbort(tpAniSirGlobal, tANI_U32 scanRequestID);
535
536eHalStatus csrScanSetBGScanparams(tpAniSirGlobal, tCsrBGScanRequest *);
537eHalStatus csrScanBGScanAbort(tpAniSirGlobal);
538
539/* ---------------------------------------------------------------------------
540 \fn csrScanGetResult
541 \brief Return scan results.
542 \param pFilter - If pFilter is NULL, all cached results are returned
543 \param phResult - an object for the result.
544 \return eHalStatus
545 -------------------------------------------------------------------------------*/
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700546eHalStatus csrScanGetResult(tpAniSirGlobal, tCsrScanResultFilter *pFilter, tScanResultHandle *phResult);
Jeff Johnson295189b2012-06-20 16:38:30 -0700547
Mukul Sharma9e4e0f92015-02-13 18:45:20 +0530548#ifdef FEATURE_WLAN_LFR
549/* ---------------------------------------------------------------------------
550 \fn csrAddChannelToOccupiedChannelList
551 \brief Add channel no given by fast reassoc cmd into occ chn list
552 \param channel - channel no passed by fast reassoc cmd
553 \return void
554 -------------------------------------------------------------------------------*/
555void csrAddChannelToOccupiedChannelList(tpAniSirGlobal pMac, tANI_U8 channel);
556#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700557/* ---------------------------------------------------------------------------
558 \fn csrScanFlushResult
559 \brief Clear scan results.
560 \return eHalStatus
561 -------------------------------------------------------------------------------*/
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700562eHalStatus csrScanFlushResult(tpAniSirGlobal);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530563/* ---------------------------------------------------------------------------
564 * \fn csrScanFilterResults
565 * \brief Filter scan results based on valid channel list.
566 * \return eHalStatus
567 *-------------------------------------------------------------------------------
568 */
569eHalStatus csrScanFilterResults(tpAniSirGlobal pMac);
570
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530571/* ---------------------------------------------------------------------------
572 * \fn csrScanFilterDFSResults
573 * \brief Filter BSSIDs on DFS channels from the scan results.
574 * \return eHalStatus
575 *-------------------------------------------------------------------------------
576 */
577eHalStatus csrScanFilterDFSResults(tpAniSirGlobal pMac);
578
Madan Mohan Koyyalamudi5850f312012-11-27 19:00:25 +0530579eHalStatus csrScanFlushSelectiveResult(tpAniSirGlobal, v_BOOL_t flushP2P);
Mukul Sharma20aa6582014-08-07 21:36:12 +0530580
581eHalStatus csrScanFlushSelectiveResultForBand(tpAniSirGlobal, v_BOOL_t flushP2P, tSirRFBand band);
582
Jeff Johnson295189b2012-06-20 16:38:30 -0700583/* ---------------------------------------------------------------------------
584 \fn csrScanBGScanGetParam
585 \brief Returns the current background scan settings.
586 \return eHalStatus
587 -------------------------------------------------------------------------------*/
588eHalStatus csrScanBGScanGetParam(tpAniSirGlobal, tCsrBGScanRequest *);
589
590/* ---------------------------------------------------------------------------
591 \fn csrScanResultGetFirst
592 \brief Returns the first element of scan result.
593 \param hScanResult - returned from csrScanGetResult
594 \return tCsrScanResultInfo * - NULL if no result
595 -------------------------------------------------------------------------------*/
596tCsrScanResultInfo *csrScanResultGetFirst(tpAniSirGlobal, tScanResultHandle hScanResult);
597/* ---------------------------------------------------------------------------
598 \fn csrScanResultGetNext
599 \brief Returns the next element of scan result. It can be called without calling csrScanResultGetFirst first
600 \param hScanResult - returned from csrScanGetResult
601 \return Null if no result or reach the end
602 -------------------------------------------------------------------------------*/
603tCsrScanResultInfo *csrScanResultGetNext(tpAniSirGlobal, tScanResultHandle hScanResult);
604
605/* ---------------------------------------------------------------------------
606 \fn csrGetCountryCode
607 \brief this function is to get the country code current being used
608 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return, this has the country code
609 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
610 this contains the length of the data in pBuf
611 \return eHalStatus
612 -------------------------------------------------------------------------------*/
613eHalStatus csrGetCountryCode(tpAniSirGlobal pMac, tANI_U8 *pBuf, tANI_U8 *pbLen);
614
615/* ---------------------------------------------------------------------------
616 \fn csrSetCountryCode
617 \brief this function is to set the country code so channel/power setting matches the countrycode and
618 the domain it belongs to.
619 \param pCountry - Caller allocated buffer with at least 3 bytes specifying the country code
620 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
621 a restart is needed to apply the change
622 \return eHalStatus
623 -------------------------------------------------------------------------------*/
624eHalStatus csrSetCountryCode(tpAniSirGlobal pMac, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
625
626/* ---------------------------------------------------------------------------
627 \fn csrResetCountryCodeInformation
628 \brief this function is to reset the country code current being used back to EEPROM default
629 this includes channel list and power setting.
630 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
631 a restart is needed to apply the change
632 \return eHalStatus
633 -------------------------------------------------------------------------------*/
634eHalStatus csrResetCountryCodeInformation(tpAniSirGlobal pMac, tANI_BOOLEAN *pfRestartNeeded);
635
636/* ---------------------------------------------------------------------------
637 \fn csrGetSupportedCountryCode
638 \brief this function is to get a list of the country code current being supported
639 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
640 this has the country code list. 3 bytes for each country code. This may be NULL if
641 caller wants to know the needed bytes.
642 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
643 this contains the length of the data in pBuf
644 \return eHalStatus
645 -------------------------------------------------------------------------------*/
646eHalStatus csrGetSupportedCountryCode(tpAniSirGlobal pMac, tANI_U8 *pBuf, tANI_U32 *pbLen);
647
648/* ---------------------------------------------------------------------------
649 \fn csrSetRegulatoryDomain
650 \brief this function is to set the current regulatory domain.
651 This function must be called after CFG is downloaded and all the band/mode setting already passed into
652 CSR.
653 \param domainId - indicate the domain (defined in the driver) needs to set to.
654 See eRegDomainId for definition
655 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
656 a restart is needed to apply the change
657 \return eHalStatus
658 -------------------------------------------------------------------------------*/
659eHalStatus csrSetRegulatoryDomain(tpAniSirGlobal pMac, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
660
661/* ---------------------------------------------------------------------------
662 \fn csrGetCurrentRegulatoryDomain
663 \brief this function is to get the current regulatory domain.
664 This function must be called after CFG is downloaded and all the band/mode setting already passed into
665 CSR.
666 \return eRegDomainId
667 -------------------------------------------------------------------------------*/
668v_REGDOMAIN_t csrGetCurrentRegulatoryDomain(tpAniSirGlobal pMac);
669
670/* ---------------------------------------------------------------------------
671 \fn csrGetRegulatoryDomainForCountry
672 \brief this function is to get the regulatory domain for a country.
673 This function must be called after CFG is downloaded and all the band/mode setting already passed into
674 CSR.
675 \param pCountry - Caller allocated buffer with at least 3 bytes specifying the country code
676 \param pDomainId - Caller allocated buffer to get the return domain ID upon success return. Can be NULL.
Kiet Lam6c583332013-10-14 05:37:09 +0530677 \param source - the source of country information.
Jeff Johnson295189b2012-06-20 16:38:30 -0700678 \return eHalStatus
679 -------------------------------------------------------------------------------*/
Kiet Lam6c583332013-10-14 05:37:09 +0530680eHalStatus csrGetRegulatoryDomainForCountry(tpAniSirGlobal pMac,
681 tANI_U8 *pCountry,
682 v_REGDOMAIN_t *pDomainId,
683 v_CountryInfoSource_t source);
Jeff Johnson295189b2012-06-20 16:38:30 -0700684
685
686tANI_BOOLEAN csrSave11dCountryString( tpAniSirGlobal pMac, tANI_U8 *pCountryCode, tANI_BOOLEAN fForce );
687
688//some support functions
689tANI_BOOLEAN csrIs11dSupported(tpAniSirGlobal pMac);
690tANI_BOOLEAN csrIs11hSupported(tpAniSirGlobal pMac);
691tANI_BOOLEAN csrIs11eSupported(tpAniSirGlobal pMac);
692tANI_BOOLEAN csrIsWmmSupported(tpAniSirGlobal pMac);
693tANI_BOOLEAN csrIsMCCSupported(tpAniSirGlobal pMac);
694
695//Upper layer to get the list of the base channels to scan for passively 11d info from csr
696eHalStatus csrScanGetBaseChannels( tpAniSirGlobal pMac, tCsrChannelInfo * pChannelInfo );
697//Return SUCCESS is the command is queued, failed
698eHalStatus csrQueueSmeCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand, tANI_BOOLEAN fHighPriority );
699tSmeCmd *csrGetCommandBuffer( tpAniSirGlobal pMac );
700void csrReleaseCommand(tpAniSirGlobal pMac, tSmeCmd *pCommand);
701#ifdef FEATURE_WLAN_WAPI
702tANI_BOOLEAN csrIsProfileWapi( tCsrRoamProfile *pProfile );
703#endif /* FEATURE_WLAN_WAPI */
704
705#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
706
707//Security
708#define WLAN_SECURITY_EVENT_SET_PTK_REQ 1
709#define WLAN_SECURITY_EVENT_SET_PTK_RSP 2
710#define WLAN_SECURITY_EVENT_SET_GTK_REQ 3
711#define WLAN_SECURITY_EVENT_SET_GTK_RSP 4
712#define WLAN_SECURITY_EVENT_REMOVE_KEY_REQ 5
713#define WLAN_SECURITY_EVENT_REMOVE_KEY_RSP 6
714#define WLAN_SECURITY_EVENT_PMKID_CANDIDATE_FOUND 7
715#define WLAN_SECURITY_EVENT_PMKID_UPDATE 8
716#define WLAN_SECURITY_EVENT_MIC_ERROR 9
Abhishek Singh5f693202016-01-06 13:47:33 +0530717#define WLAN_SECURITY_EVENT_SET_UNICAST_REQ 10
718#define WLAN_SECURITY_EVENT_SET_UNICAST_RSP 11
719#define WLAN_SECURITY_EVENT_SET_BCAST_REQ 12
720#define WLAN_SECURITY_EVENT_SET_BCAST_RSP 13
721
Jeff Johnson295189b2012-06-20 16:38:30 -0700722
723#define AUTH_OPEN 0
724#define AUTH_SHARED 1
725#define AUTH_WPA_EAP 2
726#define AUTH_WPA_PSK 3
727#define AUTH_WPA2_EAP 4
728#define AUTH_WPA2_PSK 5
729#ifdef FEATURE_WLAN_WAPI
730#define AUTH_WAPI_CERT 6
731#define AUTH_WAPI_PSK 7
732#endif /* FEATURE_WLAN_WAPI */
733
734#define ENC_MODE_OPEN 0
735#define ENC_MODE_WEP40 1
736#define ENC_MODE_WEP104 2
737#define ENC_MODE_TKIP 3
738#define ENC_MODE_AES 4
739#ifdef FEATURE_WLAN_WAPI
740#define ENC_MODE_SMS4 5 //WAPI
741#endif /* FEATURE_WLAN_WAPI */
742
743#define NO_MATCH 0
744#define MATCH 1
745
746#define WLAN_SECURITY_STATUS_SUCCESS 0
747#define WLAN_SECURITY_STATUS_FAILURE 1
748
749//Scan
750#define WLAN_SCAN_EVENT_ACTIVE_SCAN_REQ 1
751#define WLAN_SCAN_EVENT_ACTIVE_SCAN_RSP 2
752#define WLAN_SCAN_EVENT_PASSIVE_SCAN_REQ 3
753#define WLAN_SCAN_EVENT_PASSIVE_SCAN_RSP 4
754#define WLAN_SCAN_EVENT_HO_SCAN_REQ 5
755#define WLAN_SCAN_EVENT_HO_SCAN_RSP 6
756
757#define WLAN_SCAN_STATUS_SUCCESS 0
758#define WLAN_SCAN_STATUS_FAILURE 1
759#define WLAN_SCAN_STATUS_ABORT 2
760
761//Ibss
762#define WLAN_IBSS_EVENT_START_IBSS_REQ 0
763#define WLAN_IBSS_EVENT_START_IBSS_RSP 1
764#define WLAN_IBSS_EVENT_JOIN_IBSS_REQ 2
765#define WLAN_IBSS_EVENT_JOIN_IBSS_RSP 3
766#define WLAN_IBSS_EVENT_COALESCING 4
767#define WLAN_IBSS_EVENT_PEER_JOIN 5
768#define WLAN_IBSS_EVENT_PEER_LEAVE 6
769#define WLAN_IBSS_EVENT_STOP_REQ 7
770#define WLAN_IBSS_EVENT_STOP_RSP 8
771
772#define AUTO_PICK 0
773#define SPECIFIED 1
774
775#define WLAN_IBSS_STATUS_SUCCESS 0
776#define WLAN_IBSS_STATUS_FAILURE 1
777
778//11d
779#define WLAN_80211D_EVENT_COUNTRY_SET 0
780#define WLAN_80211D_EVENT_RESET 1
781
782#define WLAN_80211D_DISABLED 0
783#define WLAN_80211D_SUPPORT_MULTI_DOMAIN 1
784#define WLAN_80211D_NOT_SUPPORT_MULTI_DOMAIN 2
785
786int diagAuthTypeFromCSRType(eCsrAuthType authType);
787int diagEncTypeFromCSRType(eCsrEncryptionType encType);
788#endif //#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
789/* ---------------------------------------------------------------------------
790 \fn csrScanResultPurge
791 \brief remove all items(tCsrScanResult) in the list and free memory for each item
792 \param hScanResult - returned from csrScanGetResult. hScanResult is considered gone by
793 calling this function and even before this function reutrns.
794 \return eHalStatus
795 -------------------------------------------------------------------------------*/
796eHalStatus csrScanResultPurge(tpAniSirGlobal pMac, tScanResultHandle hScanResult);
797
798
799///////////////////////////////////////////Common Scan ends
800
801/* ---------------------------------------------------------------------------
802 \fn csrRoamConnect
803 \brief To inititiate an association
804 \param pProfile - can be NULL to join to any open ones
805 \param hBssListIn - a list of BSS descriptor to roam to. It is returned from csrScanGetResult
806 \param pRoamId - to get back the request ID
807 \return eHalStatus
808 -------------------------------------------------------------------------------*/
809eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
810 tScanResultHandle hBssListIn, tANI_U32 *pRoamId);
811
812/* ---------------------------------------------------------------------------
813 \fn csrRoamReassoc
814 \brief To inititiate a re-association
815 \param pProfile - can be NULL to join the currently connected AP. In that
816 case modProfileFields should carry the modified field(s) which could trigger
817 reassoc
818 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
819 that might need modification dynamically once STA is up & running and this
820 could trigger a reassoc
821 \param pRoamId - to get back the request ID
822 \return eHalStatus
823 -------------------------------------------------------------------------------*/
824eHalStatus csrRoamReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
825 tCsrRoamModifyProfileFields modProfileFields,
826 tANI_U32 *pRoamId);
827
828
829/* ---------------------------------------------------------------------------
830 \fn csrRoamReconnect
831 \brief To disconnect and reconnect with the same profile
832 \return eHalStatus. It returns fail if currently not connected
833 -------------------------------------------------------------------------------*/
834eHalStatus csrRoamReconnect(tpAniSirGlobal pMac, tANI_U32 sessionId);
835
836/* ---------------------------------------------------------------------------
837 \fn csrRoamSetPMKIDCache
838 \brief return the PMKID candidate list
839 \param pPMKIDCache - caller allocated buffer point to an array of tPmkidCacheInfo
840 \param numItems - a variable that has the number of tPmkidCacheInfo allocated
841 when retruning, this is either the number needed or number of items put into pPMKIDCache
842 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough and pNumItems
843 has the number of tPmkidCacheInfo.
844 \Note: pNumItems is a number of tPmkidCacheInfo, not sizeof(tPmkidCacheInfo) * something
845 -------------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530846eHalStatus csrRoamSetPMKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
847 tPmkidCacheInfo *pPMKIDCache,
848 tANI_U32 numItems,
849 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700850
851/* ---------------------------------------------------------------------------
852 \fn csrRoamGetWpaRsnReqIE
853 \brief return the WPA or RSN IE CSR passes to PE to JOIN request or START_BSS request
854 \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the
855 needed or IE length in pBuf.
856 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
857 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
858 -------------------------------------------------------------------------------*/
859eHalStatus csrRoamGetWpaRsnReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
860
861/* ---------------------------------------------------------------------------
862 \fn csrRoamGetWpaRsnRspIE
863 \brief return the WPA or RSN IE from the beacon or probe rsp if connected
864 \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the
865 needed or IE length in pBuf.
866 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
867 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
868 -------------------------------------------------------------------------------*/
869eHalStatus csrRoamGetWpaRsnRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
870
871
872/* ---------------------------------------------------------------------------
873 \fn csrRoamGetNumPMKIDCache
874 \brief return number of PMKID cache entries
875 \return tANI_U32 - the number of PMKID cache entries
876 -------------------------------------------------------------------------------*/
877tANI_U32 csrRoamGetNumPMKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
878
879/* ---------------------------------------------------------------------------
880 \fn csrRoamGetPMKIDCache
881 \brief return PMKID cache from CSR
882 \param pNum - caller allocated memory that has the space of the number of pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
883 needed or actually number in tPmkidCacheInfo.
884 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return
885 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
886 -------------------------------------------------------------------------------*/
887eHalStatus csrRoamGetPMKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId,
888 tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache);
889
890/* ---------------------------------------------------------------------------
891 \fn csrRoamGetConnectProfile
892 \brief To return the current connect profile. Caller must call csrRoamFreeConnectProfile
893 after it is done and before reuse for another csrRoamGetConnectProfile call.
894 \param pProfile - pointer to a caller allocated structure tCsrRoamConnectedProfile
895 \return eHalStatus. Failure if not connected
896 -------------------------------------------------------------------------------*/
897eHalStatus csrRoamGetConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
898 tCsrRoamConnectedProfile *pProfile);
899
900/* ---------------------------------------------------------------------------
901 \fn csrRoamGetConnectState
902 \brief To return the current connect state of Roaming
903 \return eHalStatus
904 -------------------------------------------------------------------------------*/
905eHalStatus csrRoamGetConnectState(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrConnectState *pState);
906
907/* ---------------------------------------------------------------------------
908 \fn csrRoamFreeConnectProfile
909 \brief To free and reinitialize the profile return previous by csrRoamGetConnectProfile.
910 \param pProfile - pointer to a caller allocated structure tCsrRoamConnectedProfile
911 \return eHalStatus.
912 -------------------------------------------------------------------------------*/
913eHalStatus csrRoamFreeConnectProfile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pProfile);
914
915/* ---------------------------------------------------------------------------
916 \fn csrInitChannelList
917 \brief HDD calls this function to set the WNI_CFG_VALID_CHANNEL_LIST base on the band/mode settings.
918 This function must be called after CFG is downloaded and all the band/mode setting already passed into
919 CSR.
920 \return eHalStatus
921 -------------------------------------------------------------------------------*/
922eHalStatus csrInitChannelList( tHalHandle hHal );
923
924/* ---------------------------------------------------------------------------
925 \fn csrChangeConfigParams
926 \brief The CSR API exposed for HDD to provide config params to CSR during
927 SMEs stop -> start sequence.
928 If HDD changed the domain that will cause a reset. This function will
929 provide the new set of 11d information for the new domain. Currrently this
930 API provides info regarding 11d only at reset but we can extend this for
931 other params (PMC, QoS) which needs to be initialized again at reset.
932 \param
933 hHal - Handle to the HAL. The HAL handle is returned by the HAL after it is
934 opened (by calling halOpen).
935 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
936 currently provides 11d related information like Country code,
937 Regulatory domain, valid channel list, Tx power per channel, a
938 list with active/passive scan allowed per valid channel.
939
940 \return eHalStatus
941 ---------------------------------------------------------------------------*/
942eHalStatus csrChangeConfigParams(tpAniSirGlobal pMac,
943 tCsrUpdateConfigParam *pUpdateConfigParam);
944
945/* ---------------------------------------------------------------------------
946 \fn csrRoamConnectToLastProfile
947 \brief To disconnect and reconnect with the same profile
948 \return eHalStatus. It returns fail if currently connected
949 -------------------------------------------------------------------------------*/
950eHalStatus csrRoamConnectToLastProfile(tpAniSirGlobal pMac, tANI_U32 sessionId);
951
952/* ---------------------------------------------------------------------------
953 \fn csrRoamDisconnect
954 \brief To disconnect from a network
955 \param reason -- To indicate the reason for disconnecting. Currently, only eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
956 \return eHalStatus
957 -------------------------------------------------------------------------------*/
958eHalStatus csrRoamDisconnect(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason);
959
960/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530961 \fn csr_abortConnection
962 \brief To disconnect from a connecting network
963 \retutn void.
964----------------------------------------------------------------------------*/
965
966void csr_abortConnection(tpAniSirGlobal pMac, tANI_U32 sessionId);
967
968/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700969 \fn csrScanGetPMKIDCandidateList
970 \brief return the PMKID candidate list
971 \param pPmkidList - caller allocated buffer point to an array of tPmkidCandidateInfo
972 \param pNumItems - pointer to a variable that has the number of tPmkidCandidateInfo allocated
973 when retruning, this is either the number needed or number of items put into pPmkidList
974 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough and pNumItems
975 has the number of tPmkidCandidateInfo.
976 \Note: pNumItems is a number of tPmkidCandidateInfo, not sizeof(tPmkidCandidateInfo) * something
977 -------------------------------------------------------------------------------*/
978eHalStatus csrScanGetPMKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
979 tPmkidCandidateInfo *pPmkidList, tANI_U32 *pNumItems );
980
981//This function is used to stop a BSS. It is similar of csrRoamIssueDisconnect but this function
982//doesn't have any logic other than blindly trying to stop BSS
983eHalStatus csrRoamIssueStopBssCmd( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_BOOLEAN fHighPriority );
984
985void csrCallRoamingCompletionCallback(tpAniSirGlobal pMac, tCsrRoamSession *pSession,
986 tCsrRoamInfo *pRoamInfo, tANI_U32 roamId, eCsrRoamResult roamResult);
987
Jeff Johnson295189b2012-06-20 16:38:30 -0700988/* ---------------------------------------------------------------------------
989 \fn csrRoamIssueDisassociateStaCmd
990 \brief csr function that HDD calls to disassociate a associated station
991 \param sessionId - session Id for Soft AP
992 \param pPeerMacAddr - MAC of associated station to delete
993 \param reason - reason code, be one of the tSirMacReasonCodes
994 \return eHalStatus
995 ---------------------------------------------------------------------------*/
996eHalStatus csrRoamIssueDisassociateStaCmd( tpAniSirGlobal pMac,
Anand N Sunkadc205d952015-07-30 15:36:03 +0530997 tANI_U32 sessionId,
998#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
999 const tANI_U8 *pPeerMacAddr,
1000#else
Jeff Johnson295189b2012-06-20 16:38:30 -07001001 tANI_U8 *pPeerMacAddr,
Anand N Sunkadc205d952015-07-30 15:36:03 +05301002#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001003 tANI_U32 reason);
1004
1005/* ---------------------------------------------------------------------------
1006 \fn csrRoamIssueDeauthSta
1007 \brief csr function that HDD calls to delete a associated station
1008 \param sessionId - session Id for Soft AP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +05301009 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -07001010 \return eHalStatus
1011 ---------------------------------------------------------------------------*/
1012eHalStatus csrRoamIssueDeauthStaCmd( tpAniSirGlobal pMac,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +05301013 tANI_U32 sessionId,
1014 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -07001015
1016/* ---------------------------------------------------------------------------
1017 \fn csrRoamIssueTkipCounterMeasures
1018 \brief csr function that HDD calls to start and stop tkip countermeasures
1019 \param sessionId - session Id for Soft AP
1020 \param bEnable - Flag to start/stop countermeasures
1021 \return eHalStatus
1022 ---------------------------------------------------------------------------*/
1023eHalStatus csrRoamIssueTkipCounterMeasures( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_BOOLEAN bEnable);
1024
1025eHalStatus csrSendMBTkipCounterMeasuresReqMsg( tpAniSirGlobal pMac, tANI_U32 sessinId, tANI_BOOLEAN bEnable, tSirMacAddr bssId );
1026
1027/* ---------------------------------------------------------------------------
1028 \fn csrRoamGetAssociatedStas
1029 \brief csr function that HDD calls to get list of associated stations based on module ID
1030 \param sessionId - session Id for Soft AP
1031 \param modId - module ID - PE/HAL/TL
1032 \param pUsrContext - Opaque HDD context
1033 \param pfnSapEventCallback - Sap event callback in HDD
1034 \param pAssocStasBuf - Caller allocated memory to be filled with associatd stations info
1035 \return eHalStatus
1036 ---------------------------------------------------------------------------*/
1037eHalStatus csrRoamGetAssociatedStas( tpAniSirGlobal pMac, tANI_U32 sessionId, VOS_MODULE_ID modId,
1038 void *pUsrContext, void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf );
1039
1040eHalStatus csrSendMBGetAssociatedStasReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, VOS_MODULE_ID modId, tSirMacAddr bssId,
1041 void *pUsrContext, void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf );
1042
1043/* ---------------------------------------------------------------------------
1044 \fn csrRoamGetWpsSessionOverlap
1045 \brief csr function that HDD calls to get WPS PBC session overlap information
1046 \param sessionId - session Id for Soft AP
1047 \param pUsrContext - Opaque HDD context
1048 \param pfnSapEventCallback - Sap event callback in HDD
1049 \param pRemoveMac - pointer to MAC address of session to be removed
1050 \return eHalStatus
1051 ---------------------------------------------------------------------------*/
1052eHalStatus csrRoamGetWpsSessionOverlap( tpAniSirGlobal pMac, tANI_U32 sessionId,
1053 void *pUsrContext, void *pfnSapEventCallback,v_MACADDR_t pRemoveMac );
1054
1055eHalStatus csrSendMBGetWPSPBCSessions( tpAniSirGlobal pMac, tANI_U32 sessionId,
1056 tSirMacAddr bssId, void *pUsrContext, void *pfnSapEventCallback,v_MACADDR_t pRemoveMac);
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001057
1058/* ---------------------------------------------------------------------------
1059 \fn csrSendChngMCCBeaconInterval
1060 \brief csr function that HDD calls to send Update beacon interval
1061 \param sessionId - session Id for Soft AP
1062 \return eHalStatus
1063 ---------------------------------------------------------------------------*/
1064eHalStatus
1065csrSendChngMCCBeaconInterval(tpAniSirGlobal pMac, tANI_U32 sessionId);
1066
Jeff Johnson295189b2012-06-20 16:38:30 -07001067#ifdef FEATURE_WLAN_BTAMP_UT_RF
1068eHalStatus csrRoamStartJoinRetryTimer(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 interval);
1069eHalStatus csrRoamStopJoinRetryTimer(tpAniSirGlobal pMac, tANI_U32 sessionId);
1070#endif
1071#ifdef WLAN_FEATURE_VOWIFI_11R
1072/* ---------------------------------------------------------------------------
1073 \fn csrRoamFTPreAuthRspProcessor
1074 \brief csr function that handles pre auth response from LIM
1075 ---------------------------------------------------------------------------*/
1076void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuthRsp );
1077#endif
1078
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001079#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
1080void csrEseSendAdjacentApRepMsg(tpAniSirGlobal pMac, tCsrRoamSession *pSession);
Jeff Johnson295189b2012-06-20 16:38:30 -07001081#endif
Jeff Johnsond13512a2012-07-17 11:42:19 -07001082
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001083#if defined(FEATURE_WLAN_ESE)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001084void UpdateCCKMTSF(tANI_U32 *timeStamp0, tANI_U32 *timeStamp1, tANI_U32 *incr);
1085#endif
1086
Jeff Johnsond13512a2012-07-17 11:42:19 -07001087eHalStatus csrGetDefaultCountryCodeFrmNv(tpAniSirGlobal pMac, tANI_U8 *pCountry);
1088eHalStatus csrGetCurrentCountryCode(tpAniSirGlobal pMac, tANI_U8 *pCountry);
1089
Madan Mohan Koyyalamudi286b60e2012-10-11 12:59:07 -07001090
1091eHalStatus csrRoamEnqueuePreauth(tpAniSirGlobal pMac, tANI_U32 sessionId, tpSirBssDescription pBssDescription,
1092 eCsrRoamReason reason, tANI_BOOLEAN fImmediate);
1093eHalStatus csrRoamDequeuePreauth(tpAniSirGlobal pMac);
Madan Mohan Koyyalamudidd3c9662012-11-09 17:39:30 -08001094#ifdef FEATURE_WLAN_LFR
1095void csrInitOccupiedChannelsList(tpAniSirGlobal pMac);
1096tANI_BOOLEAN csrNeighborRoamIsNewConnectedProfile(tpAniSirGlobal pMac);
1097tANI_BOOLEAN csrNeighborRoamConnectedProfileMatch(tpAniSirGlobal pMac, tCsrScanResult *pResult,
1098 tDot11fBeaconIEs *pIes);
1099#endif
schang86c22c42013-03-13 18:41:24 -07001100eHalStatus csrSetTxPower(tpAniSirGlobal pMac, v_U8_t sessionId, v_U8_t mW);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301101eHalStatus csrHT40StopOBSSScan(tpAniSirGlobal pMac, v_U8_t sessionId);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001102
1103eHalStatus csrScanCreateEntryInScanCache(tpAniSirGlobal pMac, tANI_U32 sessionId,
1104 tCsrBssid bssid, tANI_U8 channel);
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05301105
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08001106eHalStatus csrUpdateChannelList(tpAniSirGlobal pMac);
Leela Venkata Kiran Kumar Reddy Chiralaede10652013-09-11 18:48:46 -07001107eHalStatus csrRoamDelPMKIDfromCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05301108#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
1109 const tANI_U8 *pBSSId,
1110#else
1111 tANI_U8 *pBSSId,
1112#endif
1113 tANI_BOOLEAN flush_cache );
Agrawal Ashish0b6984f2014-04-05 18:35:45 +05301114tANI_BOOLEAN csrElectedCountryInfo(tpAniSirGlobal pMac);
1115void csrAddVoteForCountryInfo(tpAniSirGlobal pMac, tANI_U8 *pCountryCode);
1116void csrClearVotesForCountryInfo(tpAniSirGlobal pMac);
Abhishek Singh72c2f4e2016-07-22 11:25:43 +05301117void csr_remove_bssid_from_scan_list(tpAniSirGlobal pMac,
1118 tSirMacAddr bssid);
1119
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05301120#ifdef WLAN_FEATURE_AP_HT40_24G
1121eHalStatus csrSetHT2040Mode(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U8 cbMode);
1122#endif
Deepthi Gowriecc93352016-11-09 16:58:47 +05301123void csrValidateScanChannels(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq,
Nishank Aggarwal42f76502017-02-16 12:00:19 +05301124 tCsrScanRequest *pSrcReq, tANI_U32 *new_index, tANI_U8 ch144_support);
Jeff Johnson295189b2012-06-20 16:38:30 -07001125#endif
1126