blob: 1d5cbc0ce156c17f6d2fc40d5323f055fd2240c6 [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
97#define CSR_JOIN_FAILURE_TIMEOUT_DEFAULT ( 3000 )
Jeff Johnsone7245742012-09-05 17:12:55 -070098#define CSR_JOIN_FAILURE_TIMEOUT_MIN (1000) //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
211 //This member must be the last in the structure because the end of tSirBssDescription (inside) is an
212 // array with nonknown size at this time
213
214 eCsrEncryptionType ucEncryptionType; //Preferred Encryption type that matched with profile.
215 eCsrEncryptionType mcEncryptionType;
216 eCsrAuthType authType; //Preferred auth type that matched with the profile.
Kapil Guptab3a981b2016-06-26 13:36:51 +0530217#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
218 int congestionScore;
219#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700220 tCsrScanResultInfo Result;
221}tCsrScanResult;
222
223typedef struct
224{
225 tDblLinkList List;
226 tListElem *pCurEntry;
227}tScanResultList;
228
Kapil Guptac46b7542016-10-25 13:03:20 +0530229/**
230 * csr_scan_for_ssid_context() - Callback context for SSID scan
231 *
232 * @pMac: pMac handle
233 * @sessionId: scan session id
234 * @roamId: roam Id
235 */
236struct csr_scan_for_ssid_context
237{
238 tpAniSirGlobal pMac;
239 tANI_U32 sessionId;
240 tANI_U32 roamId;
241};
Jeff Johnson295189b2012-06-20 16:38:30 -0700242
243#define CSR_IS_ROAM_REASON( pCmd, reason ) ( (reason) == (pCmd)->roamCmd.roamReason )
244#define CSR_IS_BETTER_PREFER_VALUE(v1, v2) ((v1) > (v2))
245#define CSR_IS_EQUAL_PREFER_VALUE(v1, v2) ((v1) == (v2))
246#define CSR_IS_BETTER_CAP_VALUE(v1, v2) ((v1) > (v2))
247#define CSR_IS_ENC_TYPE_STATIC( encType ) ( ( eCSR_ENCRYPT_TYPE_NONE == (encType) ) || \
248 ( eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == (encType) ) || \
249 ( eCSR_ENCRYPT_TYPE_WEP104_STATICKEY == (encType) ) )
250#define CSR_IS_WAIT_FOR_KEY( pMac, sessionId ) ( CSR_IS_ROAM_JOINED( pMac, sessionId ) && CSR_IS_ROAM_SUBSTATE_WAITFORKEY( pMac, sessionId ) )
251//WIFI has a test case for not using HT rates with TKIP as encryption
252//We may need to add WEP but for now, TKIP only.
253
254#define CSR_IS_11n_ALLOWED( encType ) (( eCSR_ENCRYPT_TYPE_TKIP != (encType) ) && \
255 ( eCSR_ENCRYPT_TYPE_WEP40_STATICKEY != (encType) ) && \
256 ( eCSR_ENCRYPT_TYPE_WEP104_STATICKEY != (encType) ) && \
257 ( eCSR_ENCRYPT_TYPE_WEP40 != (encType) ) && \
258 ( eCSR_ENCRYPT_TYPE_WEP104 != (encType) ) )
259
Abhishek Singh99f17b82017-02-06 16:57:56 +0530260#define CSR_IS_DISCONNECT_COMMAND(pCommand) ((eSmeCommandRoam == \
261 (pCommand)->command) &&\
262 ((eCsrForcedDisassoc == (pCommand)->u.roamCmd.roamReason) ||\
263 (eCsrForcedIbssLeave == (pCommand)->u.roamCmd.roamReason) ||\
264 (eCsrForcedDeauth == (pCommand)->u.roamCmd.roamReason) ||\
265 (eCsrSmeIssuedDisassocForHandoff ==\
266 (pCommand)->u.roamCmd.roamReason) ||\
267 (eCsrForcedDisassocMICFailure ==\
268 (pCommand)->u.roamCmd.roamReason)))
Abhishek Singhf4669da2014-05-26 15:07:49 +0530269
Jeff Johnson295189b2012-06-20 16:38:30 -0700270eCsrRoamState csrRoamStateChange( tpAniSirGlobal pMac, eCsrRoamState NewRoamState, tANI_U8 sessionId);
271eHalStatus csrScanningStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
272void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
273void csrRoamJoinedStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf );
274tANI_BOOLEAN csrScanComplete( tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp );
275void csrReleaseCommandRoam(tpAniSirGlobal pMac, tSmeCmd *pCommand);
Padma, Santhosh Kumar67f479b2016-12-28 15:43:42 +0530276tpCsrNeighborRoamBSSInfo csrNeighborRoamGetRoamableAPListNextEntry(tpAniSirGlobal pMac,
277 tDblLinkList *pList, tpCsrNeighborRoamBSSInfo pNeighborEntry);
278v_U8_t *csrNeighborRoamStateToString(v_U8_t state);
279void csrReleaseCommandPreauth(tpAniSirGlobal pMac, tSmeCmd *pCommand);
Jeff Johnson295189b2012-06-20 16:38:30 -0700280void csrReleaseCommandScan(tpAniSirGlobal pMac, tSmeCmd *pCommand);
281void csrReleaseCommandWmStatusChange(tpAniSirGlobal pMac, tSmeCmd *pCommand);
282//pIes2 can be NULL
283tANI_BOOLEAN csrIsDuplicateBssDescription( tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc1,
Tushnim Bhattacharyya5128d752013-06-26 23:23:18 -0700284 tSirBssDescription *pSirBssDesc2, tDot11fBeaconIEs *pIes2, tANI_BOOLEAN fForced );
Jeff Johnson295189b2012-06-20 16:38:30 -0700285eHalStatus csrRoamSaveConnectedBssDesc( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDesc );
286tANI_BOOLEAN csrIsNetworkTypeEqual( tSirBssDescription *pSirBssDesc1, tSirBssDescription *pSirBssDesc2 );
287eHalStatus csrScanSmeScanResponse( tpAniSirGlobal pMac, void *pMsgBuf );
288/*
289 Prepare a filter base on a profile for parsing the scan results.
290 Upon successful return, caller MUST call csrFreeScanFilter on
291 pScanFilter when it is done with the filter.
292*/
293eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tCsrScanResultFilter *pScanFilter);
294eHalStatus csrRoamCopyProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pDstProfile, tCsrRoamProfile *pSrcProfile);
295eHalStatus csrRoamStart(tpAniSirGlobal pMac);
296void csrRoamStop(tpAniSirGlobal pMac, tANI_U32 sessionId);
297void csrRoamStartMICFailureTimer(tpAniSirGlobal pMac);
298void csrRoamStopMICFailureTimer(tpAniSirGlobal pMac);
299void csrRoamStartTKIPCounterMeasureTimer(tpAniSirGlobal pMac);
300void csrRoamStopTKIPCounterMeasureTimer(tpAniSirGlobal pMac);
301
302eHalStatus csrScanOpen(tpAniSirGlobal pMac);
303eHalStatus csrScanClose(tpAniSirGlobal pMac);
304eHalStatus csrScanRequestLostLink1( tpAniSirGlobal pMac, tANI_U32 sessionId );
305eHalStatus csrScanRequestLostLink2( tpAniSirGlobal pMac, tANI_U32 sessionId );
306eHalStatus csrScanRequestLostLink3( tpAniSirGlobal pMac, tANI_U32 sessionId );
307eHalStatus csrScanHandleFailedLostlink1(tpAniSirGlobal pMac, tANI_U32 sessionId);
308eHalStatus csrScanHandleFailedLostlink2(tpAniSirGlobal pMac, tANI_U32 sessionId);
309eHalStatus csrScanHandleFailedLostlink3(tpAniSirGlobal pMac, tANI_U32 sessionId);
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700310tCsrScanResult *csrScanAppendBssDescription( tpAniSirGlobal pMac,
Jeff Johnson295189b2012-06-20 16:38:30 -0700311 tSirBssDescription *pSirBssDescription,
Tushnim Bhattacharyya5128d752013-06-26 23:23:18 -0700312 tDot11fBeaconIEs *pIes, tANI_BOOLEAN fForced);
Jeff Johnson295189b2012-06-20 16:38:30 -0700313void csrScanCallCallback(tpAniSirGlobal pMac, tSmeCmd *pCommand, eCsrScanStatus scanStatus);
314eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCsrScanRequest *pSrcReq);
315eHalStatus csrScanFreeRequest(tpAniSirGlobal pMac, tCsrScanRequest *pReq);
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700316eHalStatus csrScanCopyResultList(tpAniSirGlobal pMac, tScanResultHandle hIn, tScanResultHandle *phResult);
Jeff Johnson295189b2012-06-20 16:38:30 -0700317void csrInitBGScanChannelList(tpAniSirGlobal pMac);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -0700318eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, tANI_U32 roamId, tANI_BOOLEAN notify);
Jeff Johnson295189b2012-06-20 16:38:30 -0700319eHalStatus csrScanForCapabilityChange(tpAniSirGlobal pMac, tSirSmeApNewCaps *pNewCaps);
320eHalStatus csrScanStartGetResultTimer(tpAniSirGlobal pMac);
321eHalStatus csrScanStopGetResultTimer(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700322eHalStatus csrScanBGScanEnable(tpAniSirGlobal pMac);
323eHalStatus csrScanStartIdleScanTimer(tpAniSirGlobal pMac, tANI_U32 interval);
324eHalStatus csrScanStopIdleScanTimer(tpAniSirGlobal pMac);
325eHalStatus csrScanStartIdleScan(tpAniSirGlobal pMac);
326//Param: pTimeInterval -- Caller allocated memory in return, if failed, to specify the nxt time interval for
327//idle scan timer interval
328//Return: Not success -- meaning it cannot start IMPS, caller needs to start a timer for idle scan
329eHalStatus csrScanTriggerIdleScan(tpAniSirGlobal pMac, tANI_U32 *pTimeInterval);
330void csrScanCancelIdleScan(tpAniSirGlobal pMac);
331void csrScanStopTimers(tpAniSirGlobal pMac);
332//This function will remove scan commands that are not related to association or IBSS
333tANI_BOOLEAN csrScanRemoveNotRoamingScanCommand(tpAniSirGlobal pMac);
334//To remove fresh scan commands from the pending queue
335tANI_BOOLEAN csrScanRemoveFreshScanCommand(tpAniSirGlobal pMac, tANI_U8 sessionId);
c_hpothua3d45d52015-01-05 14:11:17 +0530336tSirAbortScanStatus csrScanAbortMacScan(tpAniSirGlobal pMac,
337 tANI_U8 sessionId,
338 eCsrAbortReason reason);
Jeff Johnson295189b2012-06-20 16:38:30 -0700339void csrRemoveCmdFromPendingList(tpAniSirGlobal pMac, tDblLinkList *pList,
340 eSmeCommandType commandType );
Madan Mohan Koyyalamudiff3a7152013-06-13 14:47:55 +0530341void csrRemoveCmdWithSessionIdFromPendingList(tpAniSirGlobal pMac,
342 tANI_U8 sessionId,
343 tDblLinkList *pList,
344 eSmeCommandType commandType);
345eHalStatus csrScanAbortMacScanNotForConnect(tpAniSirGlobal pMac,
346 tANI_U8 sessionId);
Madan Mohan Koyyalamudide1b5bc2013-07-12 00:56:04 +0530347eHalStatus csrScanGetScanChannelInfo(tpAniSirGlobal pMac, tANI_U8 sessionId);
Abhishek Singhdc2bfd42014-06-19 17:59:05 +0530348eHalStatus csrScanAbortScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId);
349void csrRemoveScanForSSIDFromPendingList(tpAniSirGlobal pMac, tDblLinkList *pList, tANI_U32 sessionId);
350
Jeff Johnson295189b2012-06-20 16:38:30 -0700351//To age out scan results base. tSmeGetScanChnRsp is a pointer returned by LIM that
352//has the information regarding scanned channels.
353//The logic is that whenever CSR add a BSS to scan result, it set the age count to
354//a value. This function deduct the age count if channelId matches the BSS' channelId
355//The BSS is remove if the count reaches 0.
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700356eHalStatus csrScanAgeResults(tpAniSirGlobal pMac, tSmeGetScanChnRsp *pScanChnInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700357
Abhishek Singhc640dbb2015-06-08 10:54:17 +0530358eHalStatus csrIbssAgeBss(tpAniSirGlobal pMac);
359
Jeff Johnson295189b2012-06-20 16:38:30 -0700360//If fForce is TRUE we will save the new String that is learn't.
361//Typically it will be true in case of Join or user initiated ioctl
Chandrasekaran, Manishekar90c49322014-06-24 13:26:14 +0530362tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc,
363 tDot11fBeaconIEs *pIes, tANI_BOOLEAN fForce );
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700364void csrApplyCountryInformation( tpAniSirGlobal pMac, tANI_BOOLEAN fForce );
Jeff Johnson295189b2012-06-20 16:38:30 -0700365void csrSetCfgScanControlList( tpAniSirGlobal pMac, tANI_U8 *countryCode, tCsrChannel *pChannelList );
366void csrReinitScanCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand);
367void csrFreeScanResultEntry( tpAniSirGlobal pMac, tCsrScanResult *pResult );
368
369eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pRoamInfo,
370 tANI_U32 roamId, eRoamCmdStatus u1, eCsrRoamResult u2);
371eHalStatus csrRoamIssueConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
372 tScanResultHandle hBSSList,
373 eCsrRoamReason reason, tANI_U32 roamId,
374 tANI_BOOLEAN fImediate, tANI_BOOLEAN fClearScan);
375eHalStatus csrRoamIssueReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
376 tCsrRoamModifyProfileFields *pModProfileFields,
377 eCsrRoamReason reason, tANI_U32 roamId, tANI_BOOLEAN fImediate);
378void csrRoamComplete( tpAniSirGlobal pMac, eCsrRoamCompleteResult Result, void *Context );
379eHalStatus csrRoamIssueSetContextReq( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrEncryptionType EncryptType,
380 tSirBssDescription *pBssDescription,
381 tSirMacAddr *bssId, tANI_BOOLEAN addKey,
382 tANI_BOOLEAN fUnicast, tAniKeyDirection aniKeyDirection,
383 tANI_U8 keyId, tANI_U16 keyLength,
384 tANI_U8 *pKey, tANI_U8 paeRole );
385eHalStatus csrRoamProcessDisassocDeauth( tpAniSirGlobal pMac, tSmeCmd *pCommand,
386 tANI_BOOLEAN fDisassoc, tANI_BOOLEAN fMICFailure );
387eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
388 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes);
389void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg );
390void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg);
391eHalStatus csrRoamIssueStartBss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamStartBssParams *pParam,
392 tCsrRoamProfile *pProfile, tSirBssDescription *pBssDesc, tANI_U32 roamId );
393eHalStatus csrRoamIssueStopBss( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamSubState NewSubstate );
394tANI_BOOLEAN csrIsSameProfile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pProfile1, tCsrRoamProfile *pProfile2);
395tANI_BOOLEAN csrIsRoamCommandWaiting(tpAniSirGlobal pMac);
396tANI_BOOLEAN csrIsRoamCommandWaitingForSession(tpAniSirGlobal pMac, tANI_U32 sessionId);
397tANI_BOOLEAN csrIsScanForRoamCommandActive( tpAniSirGlobal pMac );
398eRoamCmdStatus csrGetRoamCompleteStatus(tpAniSirGlobal pMac, tANI_U32 sessionId);
399//pBand can be NULL if caller doesn't need to get it
400//eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, eCsrPhyMode phyModeIn, tANI_U8 operationChn, eCsrBand *pBand );
401eHalStatus csrRoamIssueDisassociateCmd( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason );
402eHalStatus csrRoamDisconnectInternal(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason);
403//pCommand may be NULL
404void csrRoamRemoveDuplicateCommand(tpAniSirGlobal pMac, tANI_U32 sessionId, tSmeCmd *pCommand, eCsrRoamReason eRoamReason);
405
406eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDescription,
Srinivas Girigowdac16730e2013-01-16 13:39:39 -0800407 tCsrRoamProfile *pProfile, tDot11fBeaconIEs *pIes, tANI_U16 messageType );
Jeff Johnson295189b2012-06-20 16:38:30 -0700408eHalStatus csrSendMBDisassocReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirMacAddr bssId, tANI_U16 reasonCode );
409eHalStatus csrSendMBDeauthReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirMacAddr bssId, tANI_U16 reasonCode );
410eHalStatus csrSendMBDisassocCnfMsg( tpAniSirGlobal pMac, tpSirSmeDisassocInd pDisassocInd );
411eHalStatus csrSendMBDeauthCnfMsg( tpAniSirGlobal pMac, tpSirSmeDeauthInd pDeauthInd );
412eHalStatus csrSendAssocCnfMsg( tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocInd, eHalStatus status );
Jeff Johnson295189b2012-06-20 16:38:30 -0700413eHalStatus csrSendAssocIndToUpperLayerCnfMsg( tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocInd, eHalStatus Halstatus, tANI_U8 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -0700414eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamBssType bssType,
415 tCsrRoamStartBssParams *pParam, tSirBssDescription *pBssDesc );
416eHalStatus csrSendMBStopBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId );
Jeff Johnson295189b2012-06-20 16:38:30 -0700417
418tANI_BOOLEAN csrIsMacAddressEqual( tpAniSirGlobal pMac, tCsrBssid *pMacAddr1, tCsrBssid *pMacAddr2 );
419//Caller should put the BSS' ssid to fiedl bssSsid when comparing SSID for a BSS.
420tANI_BOOLEAN csrIsSsidMatch( tpAniSirGlobal pMac, tANI_U8 *ssid1, tANI_U8 ssid1Len, tANI_U8 *bssSsid,
421 tANI_U8 bssSsidLen, tANI_BOOLEAN fSsidRequired );
422tANI_BOOLEAN csrIsPhyModeMatch( tpAniSirGlobal pMac, tANI_U32 phyMode,
423 tSirBssDescription *pSirBssDesc, tCsrRoamProfile *pProfile,
424 eCsrCfgDot11Mode *pReturnCfgDot11Mode,
425 tDot11fBeaconIEs *pIes);
426tANI_BOOLEAN csrRoamIsChannelValid( tpAniSirGlobal pMac, tANI_U8 channel );
427
428//pNumChan is a caller allocated space with the sizeof pChannels
429eHalStatus csrGetCfgValidChannels(tpAniSirGlobal pMac, tANI_U8 *pChannels, tANI_U32 *pNumChan);
430void csrRoamCcmCfgSetCallback(tHalHandle hHal, tANI_S32 result);
431void csrScanCcmCfgSetCallback(tHalHandle hHal, tANI_S32 result);
432
Kiran4a17ebe2013-01-31 10:43:43 -0800433tPowerdBm csrGetCfgMaxTxPower (tpAniSirGlobal pMac, tANI_U8 channel);
434
Jeff Johnson295189b2012-06-20 16:38:30 -0700435//To free the last roaming profile
436void csrFreeRoamProfile(tpAniSirGlobal pMac, tANI_U32 sessionId);
437void csrFreeConnectBssDesc(tpAniSirGlobal pMac, tANI_U32 sessionId);
438eHalStatus csrMoveBssToHeadFromBSSID(tpAniSirGlobal pMac, tCsrBssid *bssid, tScanResultHandle hScanResult);
439tANI_BOOLEAN csrCheckPSReady(void *pv);
440void csrFullPowerCallback(void *pv, eHalStatus status);
441//to free memory allocated inside the profile structure
442void csrReleaseProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile);
443//To free memory allocated inside scanFilter
444void csrFreeScanFilter(tpAniSirGlobal pMac, tCsrScanResultFilter *pScanFilter);
Jeff Johnson295189b2012-06-20 16:38:30 -0700445eCsrCfgDot11Mode csrGetCfgDot11ModeFromCsrPhyMode(tCsrRoamProfile *pProfile, eCsrPhyMode phyMode, tANI_BOOLEAN fProprietary);
Jeff Johnson295189b2012-06-20 16:38:30 -0700446tANI_U32 csrTranslateToWNICfgDot11Mode(tpAniSirGlobal pMac, eCsrCfgDot11Mode csrDot11Mode);
447void csrSaveChannelPowerForBand( tpAniSirGlobal pMac, tANI_BOOLEAN fPopulate5GBand );
Gopichand Nakkalab9185f22012-12-21 08:03:42 -0800448void csrApplyChannelPowerCountryInfo( tpAniSirGlobal pMac, tCsrChannel *pChannelList, tANI_U8 *countryCode, tANI_BOOLEAN updateRiva);
Jeff Johnsone7245742012-09-05 17:12:55 -0700449void csrApplyPower2Current( tpAniSirGlobal pMac );
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -0700450void csrAssignRssiForCategory(tpAniSirGlobal pMac, tANI_S8 bestApRssi, tANI_U8 catOffset);
Jeff Johnson295189b2012-06-20 16:38:30 -0700451tANI_BOOLEAN csrIsMacAddressZero( tpAniSirGlobal pMac, tCsrBssid *pMacAddr );
452tANI_BOOLEAN csrIsMacAddressBroadcast( tpAniSirGlobal pMac, tCsrBssid *pMacAddr );
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700453eHalStatus csrRoamRemoveConnectedBssFromScanCache(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pConnProfile);
Jeff Johnson295189b2012-06-20 16:38:30 -0700454eHalStatus csrRoamStartRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamingReason roamingReason);
455//return a boolean to indicate whether roaming completed or continue.
456tANI_BOOLEAN csrRoamCompleteRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId,
457 tANI_BOOLEAN fForce, eCsrRoamResult roamResult);
458void csrRoamCompletion(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pRoamInfo, tSmeCmd *pCommand, eCsrRoamResult roamResult, tANI_BOOLEAN fSuccess);
459void csrRoamCancelRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId);
Gopichand Nakkalab9185f22012-12-21 08:03:42 -0800460void csrResetCountryInformation( tpAniSirGlobal pMac, tANI_BOOLEAN fForce, tANI_BOOLEAN updateRiva );
Jeff Johnson295189b2012-06-20 16:38:30 -0700461void csrResetPMKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId );
462#ifdef FEATURE_WLAN_WAPI
463void csrResetBKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId );
464#endif /* FEATURE_WLAN_WAPI */
Jeff Johnsone7245742012-09-05 17:12:55 -0700465eHalStatus csrSaveToChannelPower2G_5G( tpAniSirGlobal pMac, tANI_U32 tableSize, tSirMacChanInfo *channelTable );
Jeff Johnson295189b2012-06-20 16:38:30 -0700466//Get the list of the base channels to scan for passively 11d info
467eHalStatus csrScanGetSupportedChannels( tpAniSirGlobal pMac );
468//To check whether a country code matches the one in the IE
469//Only check the first two characters, ignoring in/outdoor
470//pCountry -- caller allocated buffer contain the country code that is checking against
471//the one in pIes. It can be NULL.
472//caller must provide pIes, it cannot be NULL
473//This function always return TRUE if 11d support is not turned on.
474//pIes cannot be NULL
475tANI_BOOLEAN csrMatchCountryCode( tpAniSirGlobal pMac, tANI_U8 *pCountry, tDot11fBeaconIEs *pIes );
476eHalStatus csrRoamSetKey( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 roamId );
Kiran Kumar Lokere0ad5cd32013-06-25 11:26:22 -0700477eHalStatus csrRoamOpenSession(tpAniSirGlobal pMac,
478 csrRoamCompleteCallback callback,
479 void *pContext, tANI_U8 *pSelfMacAddr,
480 tANI_U8 *pbSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700481//fSync: TRUE means cleanupneeds to handle synchronously.
482eHalStatus csrRoamCloseSession( tpAniSirGlobal pMac, tANI_U32 sessionId,
mukul sharmabab477d2015-06-11 17:14:55 +0530483 tANI_BOOLEAN fSync, tANI_U8 bPurgeList,
Jeff Johnson295189b2012-06-20 16:38:30 -0700484 csrRoamSessionCloseCallback callback,
485 void *pContext );
Abhishek Singhdeb782f2016-04-28 11:44:29 +0530486void csrPurgeSmeCmdList(tpAniSirGlobal pMac, tANI_U32 sessionId,
487 bool flush_all);
Jeff Johnson295189b2012-06-20 16:38:30 -0700488void csrCleanupSession(tpAniSirGlobal pMac, tANI_U32 sessionId);
489eHalStatus csrRoamGetSessionIdFromBSSID( tpAniSirGlobal pMac, tCsrBssid *bssid, tANI_U32 *pSessionId );
490eCsrCfgDot11Mode csrFindBestPhyMode( tpAniSirGlobal pMac, tANI_U32 phyMode );
491
492/* ---------------------------------------------------------------------------
493 \fn csrScanEnable
494 \brief Enable the scanning feature of CSR. It must be called before any scan request can be performed.
495 \param tHalHandle - HAL context handle
496 \return eHalStatus
497 -------------------------------------------------------------------------------*/
498eHalStatus csrScanEnable(tpAniSirGlobal);
499
500/* ---------------------------------------------------------------------------
501 \fn csrScanDisable
502 \brief Disableing the scanning feature of CSR. After this function return success, no scan is performed until
503a successfull to csrScanEnable
504 \param tHalHandle - HAL context handle
505 \return eHalStatus
506 -------------------------------------------------------------------------------*/
507eHalStatus csrScanDisable(tpAniSirGlobal);
508/* ---------------------------------------------------------------------------
509 \fn csrScanRequest
510 \brief Request a 11d or full scan.
511 \param pScanRequestID - pointer to an object to get back the request ID
512 \param callback - a callback function that scan calls upon finish, will not be called if csrScanRequest returns error
513 \param pContext - a pointer passed in for the callback
514 \return eHalStatus
515 -------------------------------------------------------------------------------*/
516eHalStatus csrScanRequest(tpAniSirGlobal, tANI_U16, tCsrScanRequest *,
517 tANI_U32 *pScanRequestID, csrScanCompleteCallback callback,
518 void *pContext);
519
520/* ---------------------------------------------------------------------------
521 \fn csrScanAbort
522 \brief If a scan request is abort, the scan complete callback will be called first before csrScanAbort returns.
523 \param pScanRequestID - The request ID returned from csrScanRequest
524 \return eHalStatus
525 -------------------------------------------------------------------------------*/
526eHalStatus csrScanAbort(tpAniSirGlobal, tANI_U32 scanRequestID);
527
528eHalStatus csrScanSetBGScanparams(tpAniSirGlobal, tCsrBGScanRequest *);
529eHalStatus csrScanBGScanAbort(tpAniSirGlobal);
530
531/* ---------------------------------------------------------------------------
532 \fn csrScanGetResult
533 \brief Return scan results.
534 \param pFilter - If pFilter is NULL, all cached results are returned
535 \param phResult - an object for the result.
536 \return eHalStatus
537 -------------------------------------------------------------------------------*/
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700538eHalStatus csrScanGetResult(tpAniSirGlobal, tCsrScanResultFilter *pFilter, tScanResultHandle *phResult);
Jeff Johnson295189b2012-06-20 16:38:30 -0700539
Mukul Sharma9e4e0f92015-02-13 18:45:20 +0530540#ifdef FEATURE_WLAN_LFR
541/* ---------------------------------------------------------------------------
542 \fn csrAddChannelToOccupiedChannelList
543 \brief Add channel no given by fast reassoc cmd into occ chn list
544 \param channel - channel no passed by fast reassoc cmd
545 \return void
546 -------------------------------------------------------------------------------*/
547void csrAddChannelToOccupiedChannelList(tpAniSirGlobal pMac, tANI_U8 channel);
548#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700549/* ---------------------------------------------------------------------------
550 \fn csrScanFlushResult
551 \brief Clear scan results.
552 \return eHalStatus
553 -------------------------------------------------------------------------------*/
Madan Mohan Koyyalamudica43cdf2012-09-24 13:15:49 -0700554eHalStatus csrScanFlushResult(tpAniSirGlobal);
Srinivas, Dasari42bf7702014-02-07 11:29:53 +0530555/* ---------------------------------------------------------------------------
556 * \fn csrScanFilterResults
557 * \brief Filter scan results based on valid channel list.
558 * \return eHalStatus
559 *-------------------------------------------------------------------------------
560 */
561eHalStatus csrScanFilterResults(tpAniSirGlobal pMac);
562
Padma, Santhosh Kumar778d8382015-03-04 17:41:22 +0530563/* ---------------------------------------------------------------------------
564 * \fn csrScanFilterDFSResults
565 * \brief Filter BSSIDs on DFS channels from the scan results.
566 * \return eHalStatus
567 *-------------------------------------------------------------------------------
568 */
569eHalStatus csrScanFilterDFSResults(tpAniSirGlobal pMac);
570
Madan Mohan Koyyalamudi5850f312012-11-27 19:00:25 +0530571eHalStatus csrScanFlushSelectiveResult(tpAniSirGlobal, v_BOOL_t flushP2P);
Mukul Sharma20aa6582014-08-07 21:36:12 +0530572
573eHalStatus csrScanFlushSelectiveResultForBand(tpAniSirGlobal, v_BOOL_t flushP2P, tSirRFBand band);
574
Jeff Johnson295189b2012-06-20 16:38:30 -0700575/* ---------------------------------------------------------------------------
576 \fn csrScanBGScanGetParam
577 \brief Returns the current background scan settings.
578 \return eHalStatus
579 -------------------------------------------------------------------------------*/
580eHalStatus csrScanBGScanGetParam(tpAniSirGlobal, tCsrBGScanRequest *);
581
582/* ---------------------------------------------------------------------------
583 \fn csrScanResultGetFirst
584 \brief Returns the first element of scan result.
585 \param hScanResult - returned from csrScanGetResult
586 \return tCsrScanResultInfo * - NULL if no result
587 -------------------------------------------------------------------------------*/
588tCsrScanResultInfo *csrScanResultGetFirst(tpAniSirGlobal, tScanResultHandle hScanResult);
589/* ---------------------------------------------------------------------------
590 \fn csrScanResultGetNext
591 \brief Returns the next element of scan result. It can be called without calling csrScanResultGetFirst first
592 \param hScanResult - returned from csrScanGetResult
593 \return Null if no result or reach the end
594 -------------------------------------------------------------------------------*/
595tCsrScanResultInfo *csrScanResultGetNext(tpAniSirGlobal, tScanResultHandle hScanResult);
596
597/* ---------------------------------------------------------------------------
598 \fn csrGetCountryCode
599 \brief this function is to get the country code current being used
600 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return, this has the country code
601 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
602 this contains the length of the data in pBuf
603 \return eHalStatus
604 -------------------------------------------------------------------------------*/
605eHalStatus csrGetCountryCode(tpAniSirGlobal pMac, tANI_U8 *pBuf, tANI_U8 *pbLen);
606
607/* ---------------------------------------------------------------------------
608 \fn csrSetCountryCode
609 \brief this function is to set the country code so channel/power setting matches the countrycode and
610 the domain it belongs to.
611 \param pCountry - Caller allocated buffer with at least 3 bytes specifying the country code
612 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
613 a restart is needed to apply the change
614 \return eHalStatus
615 -------------------------------------------------------------------------------*/
616eHalStatus csrSetCountryCode(tpAniSirGlobal pMac, tANI_U8 *pCountry, tANI_BOOLEAN *pfRestartNeeded);
617
618/* ---------------------------------------------------------------------------
619 \fn csrResetCountryCodeInformation
620 \brief this function is to reset the country code current being used back to EEPROM default
621 this includes channel list and power setting.
622 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
623 a restart is needed to apply the change
624 \return eHalStatus
625 -------------------------------------------------------------------------------*/
626eHalStatus csrResetCountryCodeInformation(tpAniSirGlobal pMac, tANI_BOOLEAN *pfRestartNeeded);
627
628/* ---------------------------------------------------------------------------
629 \fn csrGetSupportedCountryCode
630 \brief this function is to get a list of the country code current being supported
631 \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
632 this has the country code list. 3 bytes for each country code. This may be NULL if
633 caller wants to know the needed bytes.
634 \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
635 this contains the length of the data in pBuf
636 \return eHalStatus
637 -------------------------------------------------------------------------------*/
638eHalStatus csrGetSupportedCountryCode(tpAniSirGlobal pMac, tANI_U8 *pBuf, tANI_U32 *pbLen);
639
640/* ---------------------------------------------------------------------------
641 \fn csrSetRegulatoryDomain
642 \brief this function is to set the current regulatory domain.
643 This function must be called after CFG is downloaded and all the band/mode setting already passed into
644 CSR.
645 \param domainId - indicate the domain (defined in the driver) needs to set to.
646 See eRegDomainId for definition
647 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
648 a restart is needed to apply the change
649 \return eHalStatus
650 -------------------------------------------------------------------------------*/
651eHalStatus csrSetRegulatoryDomain(tpAniSirGlobal pMac, v_REGDOMAIN_t domainId, tANI_BOOLEAN *pfRestartNeeded);
652
653/* ---------------------------------------------------------------------------
654 \fn csrGetCurrentRegulatoryDomain
655 \brief this function is to get the current regulatory domain.
656 This function must be called after CFG is downloaded and all the band/mode setting already passed into
657 CSR.
658 \return eRegDomainId
659 -------------------------------------------------------------------------------*/
660v_REGDOMAIN_t csrGetCurrentRegulatoryDomain(tpAniSirGlobal pMac);
661
662/* ---------------------------------------------------------------------------
663 \fn csrGetRegulatoryDomainForCountry
664 \brief this function is to get the regulatory domain for a country.
665 This function must be called after CFG is downloaded and all the band/mode setting already passed into
666 CSR.
667 \param pCountry - Caller allocated buffer with at least 3 bytes specifying the country code
668 \param pDomainId - Caller allocated buffer to get the return domain ID upon success return. Can be NULL.
Kiet Lam6c583332013-10-14 05:37:09 +0530669 \param source - the source of country information.
Jeff Johnson295189b2012-06-20 16:38:30 -0700670 \return eHalStatus
671 -------------------------------------------------------------------------------*/
Kiet Lam6c583332013-10-14 05:37:09 +0530672eHalStatus csrGetRegulatoryDomainForCountry(tpAniSirGlobal pMac,
673 tANI_U8 *pCountry,
674 v_REGDOMAIN_t *pDomainId,
675 v_CountryInfoSource_t source);
Jeff Johnson295189b2012-06-20 16:38:30 -0700676
677
678tANI_BOOLEAN csrSave11dCountryString( tpAniSirGlobal pMac, tANI_U8 *pCountryCode, tANI_BOOLEAN fForce );
679
680//some support functions
681tANI_BOOLEAN csrIs11dSupported(tpAniSirGlobal pMac);
682tANI_BOOLEAN csrIs11hSupported(tpAniSirGlobal pMac);
683tANI_BOOLEAN csrIs11eSupported(tpAniSirGlobal pMac);
684tANI_BOOLEAN csrIsWmmSupported(tpAniSirGlobal pMac);
685tANI_BOOLEAN csrIsMCCSupported(tpAniSirGlobal pMac);
686
687//Upper layer to get the list of the base channels to scan for passively 11d info from csr
688eHalStatus csrScanGetBaseChannels( tpAniSirGlobal pMac, tCsrChannelInfo * pChannelInfo );
689//Return SUCCESS is the command is queued, failed
690eHalStatus csrQueueSmeCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand, tANI_BOOLEAN fHighPriority );
691tSmeCmd *csrGetCommandBuffer( tpAniSirGlobal pMac );
692void csrReleaseCommand(tpAniSirGlobal pMac, tSmeCmd *pCommand);
693#ifdef FEATURE_WLAN_WAPI
694tANI_BOOLEAN csrIsProfileWapi( tCsrRoamProfile *pProfile );
695#endif /* FEATURE_WLAN_WAPI */
696
697#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
698
699//Security
700#define WLAN_SECURITY_EVENT_SET_PTK_REQ 1
701#define WLAN_SECURITY_EVENT_SET_PTK_RSP 2
702#define WLAN_SECURITY_EVENT_SET_GTK_REQ 3
703#define WLAN_SECURITY_EVENT_SET_GTK_RSP 4
704#define WLAN_SECURITY_EVENT_REMOVE_KEY_REQ 5
705#define WLAN_SECURITY_EVENT_REMOVE_KEY_RSP 6
706#define WLAN_SECURITY_EVENT_PMKID_CANDIDATE_FOUND 7
707#define WLAN_SECURITY_EVENT_PMKID_UPDATE 8
708#define WLAN_SECURITY_EVENT_MIC_ERROR 9
Abhishek Singh5f693202016-01-06 13:47:33 +0530709#define WLAN_SECURITY_EVENT_SET_UNICAST_REQ 10
710#define WLAN_SECURITY_EVENT_SET_UNICAST_RSP 11
711#define WLAN_SECURITY_EVENT_SET_BCAST_REQ 12
712#define WLAN_SECURITY_EVENT_SET_BCAST_RSP 13
713
Jeff Johnson295189b2012-06-20 16:38:30 -0700714
715#define AUTH_OPEN 0
716#define AUTH_SHARED 1
717#define AUTH_WPA_EAP 2
718#define AUTH_WPA_PSK 3
719#define AUTH_WPA2_EAP 4
720#define AUTH_WPA2_PSK 5
721#ifdef FEATURE_WLAN_WAPI
722#define AUTH_WAPI_CERT 6
723#define AUTH_WAPI_PSK 7
724#endif /* FEATURE_WLAN_WAPI */
725
726#define ENC_MODE_OPEN 0
727#define ENC_MODE_WEP40 1
728#define ENC_MODE_WEP104 2
729#define ENC_MODE_TKIP 3
730#define ENC_MODE_AES 4
731#ifdef FEATURE_WLAN_WAPI
732#define ENC_MODE_SMS4 5 //WAPI
733#endif /* FEATURE_WLAN_WAPI */
734
735#define NO_MATCH 0
736#define MATCH 1
737
738#define WLAN_SECURITY_STATUS_SUCCESS 0
739#define WLAN_SECURITY_STATUS_FAILURE 1
740
741//Scan
742#define WLAN_SCAN_EVENT_ACTIVE_SCAN_REQ 1
743#define WLAN_SCAN_EVENT_ACTIVE_SCAN_RSP 2
744#define WLAN_SCAN_EVENT_PASSIVE_SCAN_REQ 3
745#define WLAN_SCAN_EVENT_PASSIVE_SCAN_RSP 4
746#define WLAN_SCAN_EVENT_HO_SCAN_REQ 5
747#define WLAN_SCAN_EVENT_HO_SCAN_RSP 6
748
749#define WLAN_SCAN_STATUS_SUCCESS 0
750#define WLAN_SCAN_STATUS_FAILURE 1
751#define WLAN_SCAN_STATUS_ABORT 2
752
753//Ibss
754#define WLAN_IBSS_EVENT_START_IBSS_REQ 0
755#define WLAN_IBSS_EVENT_START_IBSS_RSP 1
756#define WLAN_IBSS_EVENT_JOIN_IBSS_REQ 2
757#define WLAN_IBSS_EVENT_JOIN_IBSS_RSP 3
758#define WLAN_IBSS_EVENT_COALESCING 4
759#define WLAN_IBSS_EVENT_PEER_JOIN 5
760#define WLAN_IBSS_EVENT_PEER_LEAVE 6
761#define WLAN_IBSS_EVENT_STOP_REQ 7
762#define WLAN_IBSS_EVENT_STOP_RSP 8
763
764#define AUTO_PICK 0
765#define SPECIFIED 1
766
767#define WLAN_IBSS_STATUS_SUCCESS 0
768#define WLAN_IBSS_STATUS_FAILURE 1
769
770//11d
771#define WLAN_80211D_EVENT_COUNTRY_SET 0
772#define WLAN_80211D_EVENT_RESET 1
773
774#define WLAN_80211D_DISABLED 0
775#define WLAN_80211D_SUPPORT_MULTI_DOMAIN 1
776#define WLAN_80211D_NOT_SUPPORT_MULTI_DOMAIN 2
777
778int diagAuthTypeFromCSRType(eCsrAuthType authType);
779int diagEncTypeFromCSRType(eCsrEncryptionType encType);
780#endif //#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
781/* ---------------------------------------------------------------------------
782 \fn csrScanResultPurge
783 \brief remove all items(tCsrScanResult) in the list and free memory for each item
784 \param hScanResult - returned from csrScanGetResult. hScanResult is considered gone by
785 calling this function and even before this function reutrns.
786 \return eHalStatus
787 -------------------------------------------------------------------------------*/
788eHalStatus csrScanResultPurge(tpAniSirGlobal pMac, tScanResultHandle hScanResult);
789
790
791///////////////////////////////////////////Common Scan ends
792
793/* ---------------------------------------------------------------------------
794 \fn csrRoamConnect
795 \brief To inititiate an association
796 \param pProfile - can be NULL to join to any open ones
797 \param hBssListIn - a list of BSS descriptor to roam to. It is returned from csrScanGetResult
798 \param pRoamId - to get back the request ID
799 \return eHalStatus
800 -------------------------------------------------------------------------------*/
801eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
802 tScanResultHandle hBssListIn, tANI_U32 *pRoamId);
803
804/* ---------------------------------------------------------------------------
805 \fn csrRoamReassoc
806 \brief To inititiate a re-association
807 \param pProfile - can be NULL to join the currently connected AP. In that
808 case modProfileFields should carry the modified field(s) which could trigger
809 reassoc
810 \param modProfileFields - fields which are part of tCsrRoamConnectedProfile
811 that might need modification dynamically once STA is up & running and this
812 could trigger a reassoc
813 \param pRoamId - to get back the request ID
814 \return eHalStatus
815 -------------------------------------------------------------------------------*/
816eHalStatus csrRoamReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
817 tCsrRoamModifyProfileFields modProfileFields,
818 tANI_U32 *pRoamId);
819
820
821/* ---------------------------------------------------------------------------
822 \fn csrRoamReconnect
823 \brief To disconnect and reconnect with the same profile
824 \return eHalStatus. It returns fail if currently not connected
825 -------------------------------------------------------------------------------*/
826eHalStatus csrRoamReconnect(tpAniSirGlobal pMac, tANI_U32 sessionId);
827
828/* ---------------------------------------------------------------------------
829 \fn csrRoamSetPMKIDCache
830 \brief return the PMKID candidate list
831 \param pPMKIDCache - caller allocated buffer point to an array of tPmkidCacheInfo
832 \param numItems - a variable that has the number of tPmkidCacheInfo allocated
833 when retruning, this is either the number needed or number of items put into pPMKIDCache
834 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough and pNumItems
835 has the number of tPmkidCacheInfo.
836 \Note: pNumItems is a number of tPmkidCacheInfo, not sizeof(tPmkidCacheInfo) * something
837 -------------------------------------------------------------------------------*/
Kanchanapally, Vidyullatha2633ace2014-09-25 15:16:50 +0530838eHalStatus csrRoamSetPMKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
839 tPmkidCacheInfo *pPMKIDCache,
840 tANI_U32 numItems,
841 tANI_BOOLEAN update_entire_cache );
Jeff Johnson295189b2012-06-20 16:38:30 -0700842
843/* ---------------------------------------------------------------------------
844 \fn csrRoamGetWpaRsnReqIE
845 \brief return the WPA or RSN IE CSR passes to PE to JOIN request or START_BSS request
846 \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the
847 needed or IE length in pBuf.
848 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
849 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
850 -------------------------------------------------------------------------------*/
851eHalStatus csrRoamGetWpaRsnReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
852
853/* ---------------------------------------------------------------------------
854 \fn csrRoamGetWpaRsnRspIE
855 \brief return the WPA or RSN IE from the beacon or probe rsp if connected
856 \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the
857 needed or IE length in pBuf.
858 \param pBuf - Caller allocated memory that contain the IE field, if any, upon return
859 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
860 -------------------------------------------------------------------------------*/
861eHalStatus csrRoamGetWpaRsnRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 *pLen, tANI_U8 *pBuf);
862
863
864/* ---------------------------------------------------------------------------
865 \fn csrRoamGetNumPMKIDCache
866 \brief return number of PMKID cache entries
867 \return tANI_U32 - the number of PMKID cache entries
868 -------------------------------------------------------------------------------*/
869tANI_U32 csrRoamGetNumPMKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId);
870
871/* ---------------------------------------------------------------------------
872 \fn csrRoamGetPMKIDCache
873 \brief return PMKID cache from CSR
874 \param pNum - caller allocated memory that has the space of the number of pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
875 needed or actually number in tPmkidCacheInfo.
876 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return
877 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
878 -------------------------------------------------------------------------------*/
879eHalStatus csrRoamGetPMKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId,
880 tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache);
881
882/* ---------------------------------------------------------------------------
883 \fn csrRoamGetConnectProfile
884 \brief To return the current connect profile. Caller must call csrRoamFreeConnectProfile
885 after it is done and before reuse for another csrRoamGetConnectProfile call.
886 \param pProfile - pointer to a caller allocated structure tCsrRoamConnectedProfile
887 \return eHalStatus. Failure if not connected
888 -------------------------------------------------------------------------------*/
889eHalStatus csrRoamGetConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
890 tCsrRoamConnectedProfile *pProfile);
891
892/* ---------------------------------------------------------------------------
893 \fn csrRoamGetConnectState
894 \brief To return the current connect state of Roaming
895 \return eHalStatus
896 -------------------------------------------------------------------------------*/
897eHalStatus csrRoamGetConnectState(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrConnectState *pState);
898
899/* ---------------------------------------------------------------------------
900 \fn csrRoamFreeConnectProfile
901 \brief To free and reinitialize the profile return previous by csrRoamGetConnectProfile.
902 \param pProfile - pointer to a caller allocated structure tCsrRoamConnectedProfile
903 \return eHalStatus.
904 -------------------------------------------------------------------------------*/
905eHalStatus csrRoamFreeConnectProfile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pProfile);
906
907/* ---------------------------------------------------------------------------
908 \fn csrInitChannelList
909 \brief HDD calls this function to set the WNI_CFG_VALID_CHANNEL_LIST base on the band/mode settings.
910 This function must be called after CFG is downloaded and all the band/mode setting already passed into
911 CSR.
912 \return eHalStatus
913 -------------------------------------------------------------------------------*/
914eHalStatus csrInitChannelList( tHalHandle hHal );
915
916/* ---------------------------------------------------------------------------
917 \fn csrChangeConfigParams
918 \brief The CSR API exposed for HDD to provide config params to CSR during
919 SMEs stop -> start sequence.
920 If HDD changed the domain that will cause a reset. This function will
921 provide the new set of 11d information for the new domain. Currrently this
922 API provides info regarding 11d only at reset but we can extend this for
923 other params (PMC, QoS) which needs to be initialized again at reset.
924 \param
925 hHal - Handle to the HAL. The HAL handle is returned by the HAL after it is
926 opened (by calling halOpen).
927 pUpdateConfigParam - a pointer to a structure (tCsrUpdateConfigParam) that
928 currently provides 11d related information like Country code,
929 Regulatory domain, valid channel list, Tx power per channel, a
930 list with active/passive scan allowed per valid channel.
931
932 \return eHalStatus
933 ---------------------------------------------------------------------------*/
934eHalStatus csrChangeConfigParams(tpAniSirGlobal pMac,
935 tCsrUpdateConfigParam *pUpdateConfigParam);
936
937/* ---------------------------------------------------------------------------
938 \fn csrRoamConnectToLastProfile
939 \brief To disconnect and reconnect with the same profile
940 \return eHalStatus. It returns fail if currently connected
941 -------------------------------------------------------------------------------*/
942eHalStatus csrRoamConnectToLastProfile(tpAniSirGlobal pMac, tANI_U32 sessionId);
943
944/* ---------------------------------------------------------------------------
945 \fn csrRoamDisconnect
946 \brief To disconnect from a network
947 \param reason -- To indicate the reason for disconnecting. Currently, only eCSR_DISCONNECT_REASON_MIC_ERROR is meanful.
948 \return eHalStatus
949 -------------------------------------------------------------------------------*/
950eHalStatus csrRoamDisconnect(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason);
951
952/* ---------------------------------------------------------------------------
Sushant Kaushikb4834d22015-07-15 15:29:05 +0530953 \fn csr_abortConnection
954 \brief To disconnect from a connecting network
955 \retutn void.
956----------------------------------------------------------------------------*/
957
958void csr_abortConnection(tpAniSirGlobal pMac, tANI_U32 sessionId);
959
960/* ---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -0700961 \fn csrScanGetPMKIDCandidateList
962 \brief return the PMKID candidate list
963 \param pPmkidList - caller allocated buffer point to an array of tPmkidCandidateInfo
964 \param pNumItems - pointer to a variable that has the number of tPmkidCandidateInfo allocated
965 when retruning, this is either the number needed or number of items put into pPmkidList
966 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough and pNumItems
967 has the number of tPmkidCandidateInfo.
968 \Note: pNumItems is a number of tPmkidCandidateInfo, not sizeof(tPmkidCandidateInfo) * something
969 -------------------------------------------------------------------------------*/
970eHalStatus csrScanGetPMKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
971 tPmkidCandidateInfo *pPmkidList, tANI_U32 *pNumItems );
972
973//This function is used to stop a BSS. It is similar of csrRoamIssueDisconnect but this function
974//doesn't have any logic other than blindly trying to stop BSS
975eHalStatus csrRoamIssueStopBssCmd( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_BOOLEAN fHighPriority );
976
977void csrCallRoamingCompletionCallback(tpAniSirGlobal pMac, tCsrRoamSession *pSession,
978 tCsrRoamInfo *pRoamInfo, tANI_U32 roamId, eCsrRoamResult roamResult);
979
Jeff Johnson295189b2012-06-20 16:38:30 -0700980/* ---------------------------------------------------------------------------
981 \fn csrRoamIssueDisassociateStaCmd
982 \brief csr function that HDD calls to disassociate a associated station
983 \param sessionId - session Id for Soft AP
984 \param pPeerMacAddr - MAC of associated station to delete
985 \param reason - reason code, be one of the tSirMacReasonCodes
986 \return eHalStatus
987 ---------------------------------------------------------------------------*/
988eHalStatus csrRoamIssueDisassociateStaCmd( tpAniSirGlobal pMac,
Anand N Sunkadc205d952015-07-30 15:36:03 +0530989 tANI_U32 sessionId,
990#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
991 const tANI_U8 *pPeerMacAddr,
992#else
Jeff Johnson295189b2012-06-20 16:38:30 -0700993 tANI_U8 *pPeerMacAddr,
Anand N Sunkadc205d952015-07-30 15:36:03 +0530994#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700995 tANI_U32 reason);
996
997/* ---------------------------------------------------------------------------
998 \fn csrRoamIssueDeauthSta
999 \brief csr function that HDD calls to delete a associated station
1000 \param sessionId - session Id for Soft AP
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +05301001 \param pDelStaParams- Pointer to parameters of the station to deauthenticate
Jeff Johnson295189b2012-06-20 16:38:30 -07001002 \return eHalStatus
1003 ---------------------------------------------------------------------------*/
1004eHalStatus csrRoamIssueDeauthStaCmd( tpAniSirGlobal pMac,
Hanumantha Reddy Pothulaf57da152014-10-31 13:02:08 +05301005 tANI_U32 sessionId,
1006 struct tagCsrDelStaParams *pDelStaParams);
Jeff Johnson295189b2012-06-20 16:38:30 -07001007
1008/* ---------------------------------------------------------------------------
1009 \fn csrRoamIssueTkipCounterMeasures
1010 \brief csr function that HDD calls to start and stop tkip countermeasures
1011 \param sessionId - session Id for Soft AP
1012 \param bEnable - Flag to start/stop countermeasures
1013 \return eHalStatus
1014 ---------------------------------------------------------------------------*/
1015eHalStatus csrRoamIssueTkipCounterMeasures( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_BOOLEAN bEnable);
1016
1017eHalStatus csrSendMBTkipCounterMeasuresReqMsg( tpAniSirGlobal pMac, tANI_U32 sessinId, tANI_BOOLEAN bEnable, tSirMacAddr bssId );
1018
1019/* ---------------------------------------------------------------------------
1020 \fn csrRoamGetAssociatedStas
1021 \brief csr function that HDD calls to get list of associated stations based on module ID
1022 \param sessionId - session Id for Soft AP
1023 \param modId - module ID - PE/HAL/TL
1024 \param pUsrContext - Opaque HDD context
1025 \param pfnSapEventCallback - Sap event callback in HDD
1026 \param pAssocStasBuf - Caller allocated memory to be filled with associatd stations info
1027 \return eHalStatus
1028 ---------------------------------------------------------------------------*/
1029eHalStatus csrRoamGetAssociatedStas( tpAniSirGlobal pMac, tANI_U32 sessionId, VOS_MODULE_ID modId,
1030 void *pUsrContext, void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf );
1031
1032eHalStatus csrSendMBGetAssociatedStasReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, VOS_MODULE_ID modId, tSirMacAddr bssId,
1033 void *pUsrContext, void *pfnSapEventCallback, tANI_U8 *pAssocStasBuf );
1034
1035/* ---------------------------------------------------------------------------
1036 \fn csrRoamGetWpsSessionOverlap
1037 \brief csr function that HDD calls to get WPS PBC session overlap information
1038 \param sessionId - session Id for Soft AP
1039 \param pUsrContext - Opaque HDD context
1040 \param pfnSapEventCallback - Sap event callback in HDD
1041 \param pRemoveMac - pointer to MAC address of session to be removed
1042 \return eHalStatus
1043 ---------------------------------------------------------------------------*/
1044eHalStatus csrRoamGetWpsSessionOverlap( tpAniSirGlobal pMac, tANI_U32 sessionId,
1045 void *pUsrContext, void *pfnSapEventCallback,v_MACADDR_t pRemoveMac );
1046
1047eHalStatus csrSendMBGetWPSPBCSessions( tpAniSirGlobal pMac, tANI_U32 sessionId,
1048 tSirMacAddr bssId, void *pUsrContext, void *pfnSapEventCallback,v_MACADDR_t pRemoveMac);
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -08001049
1050/* ---------------------------------------------------------------------------
1051 \fn csrSendChngMCCBeaconInterval
1052 \brief csr function that HDD calls to send Update beacon interval
1053 \param sessionId - session Id for Soft AP
1054 \return eHalStatus
1055 ---------------------------------------------------------------------------*/
1056eHalStatus
1057csrSendChngMCCBeaconInterval(tpAniSirGlobal pMac, tANI_U32 sessionId);
1058
Jeff Johnson295189b2012-06-20 16:38:30 -07001059#ifdef FEATURE_WLAN_BTAMP_UT_RF
1060eHalStatus csrRoamStartJoinRetryTimer(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 interval);
1061eHalStatus csrRoamStopJoinRetryTimer(tpAniSirGlobal pMac, tANI_U32 sessionId);
1062#endif
1063#ifdef WLAN_FEATURE_VOWIFI_11R
1064/* ---------------------------------------------------------------------------
1065 \fn csrRoamFTPreAuthRspProcessor
1066 \brief csr function that handles pre auth response from LIM
1067 ---------------------------------------------------------------------------*/
1068void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuthRsp );
1069#endif
1070
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001071#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
1072void csrEseSendAdjacentApRepMsg(tpAniSirGlobal pMac, tCsrRoamSession *pSession);
Jeff Johnson295189b2012-06-20 16:38:30 -07001073#endif
Jeff Johnsond13512a2012-07-17 11:42:19 -07001074
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001075#if defined(FEATURE_WLAN_ESE)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001076void UpdateCCKMTSF(tANI_U32 *timeStamp0, tANI_U32 *timeStamp1, tANI_U32 *incr);
1077#endif
1078
Jeff Johnsond13512a2012-07-17 11:42:19 -07001079eHalStatus csrGetDefaultCountryCodeFrmNv(tpAniSirGlobal pMac, tANI_U8 *pCountry);
1080eHalStatus csrGetCurrentCountryCode(tpAniSirGlobal pMac, tANI_U8 *pCountry);
1081
Madan Mohan Koyyalamudi286b60e2012-10-11 12:59:07 -07001082
1083eHalStatus csrRoamEnqueuePreauth(tpAniSirGlobal pMac, tANI_U32 sessionId, tpSirBssDescription pBssDescription,
1084 eCsrRoamReason reason, tANI_BOOLEAN fImmediate);
1085eHalStatus csrRoamDequeuePreauth(tpAniSirGlobal pMac);
Madan Mohan Koyyalamudidd3c9662012-11-09 17:39:30 -08001086#ifdef FEATURE_WLAN_LFR
1087void csrInitOccupiedChannelsList(tpAniSirGlobal pMac);
1088tANI_BOOLEAN csrNeighborRoamIsNewConnectedProfile(tpAniSirGlobal pMac);
1089tANI_BOOLEAN csrNeighborRoamConnectedProfileMatch(tpAniSirGlobal pMac, tCsrScanResult *pResult,
1090 tDot11fBeaconIEs *pIes);
1091#endif
schang86c22c42013-03-13 18:41:24 -07001092eHalStatus csrSetTxPower(tpAniSirGlobal pMac, v_U8_t sessionId, v_U8_t mW);
Sandeep Puligilla332ea912014-02-04 00:16:24 +05301093eHalStatus csrHT40StopOBSSScan(tpAniSirGlobal pMac, v_U8_t sessionId);
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001094
1095eHalStatus csrScanCreateEntryInScanCache(tpAniSirGlobal pMac, tANI_U32 sessionId,
1096 tCsrBssid bssid, tANI_U8 channel);
Gopichand Nakkalaf72a3872013-06-11 17:51:13 +05301097
Leela Venkata Kiran Kumar Reddy Chiralac6663f72014-02-03 21:04:58 -08001098eHalStatus csrUpdateChannelList(tpAniSirGlobal pMac);
Leela Venkata Kiran Kumar Reddy Chiralaede10652013-09-11 18:48:46 -07001099eHalStatus csrRoamDelPMKIDfromCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
Anand N Sunkadb3ab97d2015-07-29 09:58:13 +05301100#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
1101 const tANI_U8 *pBSSId,
1102#else
1103 tANI_U8 *pBSSId,
1104#endif
1105 tANI_BOOLEAN flush_cache );
Agrawal Ashish0b6984f2014-04-05 18:35:45 +05301106tANI_BOOLEAN csrElectedCountryInfo(tpAniSirGlobal pMac);
1107void csrAddVoteForCountryInfo(tpAniSirGlobal pMac, tANI_U8 *pCountryCode);
1108void csrClearVotesForCountryInfo(tpAniSirGlobal pMac);
Abhishek Singh72c2f4e2016-07-22 11:25:43 +05301109void csr_remove_bssid_from_scan_list(tpAniSirGlobal pMac,
1110 tSirMacAddr bssid);
1111
Hardik Kantilal Patel62a3a762014-11-21 12:55:57 +05301112#ifdef WLAN_FEATURE_AP_HT40_24G
1113eHalStatus csrSetHT2040Mode(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U8 cbMode);
1114#endif
Deepthi Gowriecc93352016-11-09 16:58:47 +05301115void csrValidateScanChannels(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq,
Nishank Aggarwal42f76502017-02-16 12:00:19 +05301116 tCsrScanRequest *pSrcReq, tANI_U32 *new_index, tANI_U8 ch144_support);
Jeff Johnson295189b2012-06-20 16:38:30 -07001117#endif
1118