blob: 9d72010bd9ae2a458b0e42df3da8a5a22986c4e8 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002 * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
Kiet Lam0fb93dd2014-02-19 00:32:59 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080023 * Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
Kiet Lamaa8e15a2014-02-11 23:30:06 -080024 * All Rights Reserved.
25 * Qualcomm Atheros Confidential and Proprietary.
Kiet Lam0fb93dd2014-02-19 00:32:59 -080026 *
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080027 */
Kiet Lam0fb93dd2014-02-19 00:32:59 -080028
29
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080030/** ------------------------------------------------------------------------- *
31 ------------------------------------------------------------------------- *
Jeff Johnson295189b2012-06-20 16:38:30 -070032 \file csrApi.h
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080033
Jeff Johnson295189b2012-06-20 16:38:30 -070034 Exports and types for the Common Scan and Roaming Module interfaces.
Jeff Johnson295189b2012-06-20 16:38:30 -070035 ========================================================================== */
36#ifndef CSRAPI_H__
37#define CSRAPI_H__
38
39#include "sirApi.h"
40#include "sirMacProtDef.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070041#include "csrLinkList.h"
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080042typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -070043{
44 eCSR_AUTH_TYPE_NONE, //never used
45 // MAC layer authentication types
46 eCSR_AUTH_TYPE_OPEN_SYSTEM,
47 eCSR_AUTH_TYPE_SHARED_KEY,
48 eCSR_AUTH_TYPE_AUTOSWITCH,
49
50 // Upper layer authentication types
51 eCSR_AUTH_TYPE_WPA,
52 eCSR_AUTH_TYPE_WPA_PSK,
53 eCSR_AUTH_TYPE_WPA_NONE,
54
55 eCSR_AUTH_TYPE_RSN,
56 eCSR_AUTH_TYPE_RSN_PSK,
57#if defined WLAN_FEATURE_VOWIFI_11R
58 eCSR_AUTH_TYPE_FT_RSN,
59 eCSR_AUTH_TYPE_FT_RSN_PSK,
60#endif
61#ifdef FEATURE_WLAN_WAPI
62 eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
63 eCSR_AUTH_TYPE_WAPI_WAI_PSK,
64#endif /* FEATURE_WLAN_WAPI */
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080065#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -070066 eCSR_AUTH_TYPE_CCKM_WPA,
67 eCSR_AUTH_TYPE_CCKM_RSN,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080068#endif /* FEATURE_WLAN_ESE */
Chet Lanctot186b5732013-03-18 10:26:30 -070069#ifdef WLAN_FEATURE_11W
70 eCSR_AUTH_TYPE_RSN_PSK_SHA256,
71#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070072 eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
73 eCSR_AUTH_TYPE_FAILED = 0xff,
74 eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
75
76}eCsrAuthType;
77
78
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080079typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -070080{
81 eCSR_ENCRYPT_TYPE_NONE,
82 eCSR_ENCRYPT_TYPE_WEP40_STATICKEY,
83 eCSR_ENCRYPT_TYPE_WEP104_STATICKEY,
84
85 eCSR_ENCRYPT_TYPE_WEP40,
86 eCSR_ENCRYPT_TYPE_WEP104,
87 eCSR_ENCRYPT_TYPE_TKIP,
88 eCSR_ENCRYPT_TYPE_AES,
89#ifdef FEATURE_WLAN_WAPI
90 eCSR_ENCRYPT_TYPE_WPI, //WAPI
91#endif /* FEATURE_WLAN_WAPI */
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080092#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -070093 eCSR_ENCRYPT_TYPE_KRK,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080094#endif /* FEATURE_WLAN_ESE */
Jeff Johnson295189b2012-06-20 16:38:30 -070095#ifdef WLAN_FEATURE_11W
96 //11w BIP
97 eCSR_ENCRYPT_TYPE_AES_CMAC,
98#endif
99 eCSR_ENCRYPT_TYPE_ANY,
100 eCSR_NUM_OF_ENCRYPT_TYPE = eCSR_ENCRYPT_TYPE_ANY,
101
102 eCSR_ENCRYPT_TYPE_FAILED = 0xff,
103 eCSR_ENCRYPT_TYPE_UNKNOWN = eCSR_ENCRYPT_TYPE_FAILED,
104
105}eCsrEncryptionType;
106
107/*---------------------------------------------------------------------------
108 Enumeration of the various Security types
109---------------------------------------------------------------------------*/
110typedef enum
111{
112 eCSR_SECURITY_TYPE_WPA,
113 eCSR_SECURITY_TYPE_RSN,
114#ifdef FEATURE_WLAN_WAPI
115 eCSR_SECURITY_TYPE_WAPI,
116#endif /* FEATURE_WLAN_WAPI */
117 eCSR_SECURITY_TYPE_UNKNOWN,
118
119}eCsrSecurityType;
120
121typedef enum
122{
123 eCSR_DOT11_MODE_TAURUS = 0, //This mean everything because it covers all thing we support
124 eCSR_DOT11_MODE_abg = 0x0001, //11a/b/g only, no HT, no proprietary
125 eCSR_DOT11_MODE_11a = 0x0002,
126 eCSR_DOT11_MODE_11b = 0x0004,
127 eCSR_DOT11_MODE_11g = 0x0008,
128 eCSR_DOT11_MODE_11n = 0x0010,
129 eCSR_DOT11_MODE_POLARIS = 0x0020,
130 eCSR_DOT11_MODE_TITAN = 0x0040,
131 eCSR_DOT11_MODE_11g_ONLY = 0x0080,
132 eCSR_DOT11_MODE_11n_ONLY = 0x0100,
133 eCSR_DOT11_MODE_TAURUS_ONLY = 0x0200,
134 eCSR_DOT11_MODE_11b_ONLY = 0x0400,
135 eCSR_DOT11_MODE_11a_ONLY = 0x0800,
Jeff Johnsone7245742012-09-05 17:12:55 -0700136#ifdef WLAN_FEATURE_11AC
137 eCSR_DOT11_MODE_11ac = 0x1000,
138 eCSR_DOT11_MODE_11ac_ONLY = 0x2000,
139#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700140 //This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL except when it starts IBSS in 11B of 2.4GHz
141 //It is for CSR internal use
Jeff Johnsone7245742012-09-05 17:12:55 -0700142 eCSR_DOT11_MODE_AUTO = 0x4000,
Jeff Johnson295189b2012-06-20 16:38:30 -0700143
144 eCSR_NUM_PHY_MODE = 16, //specify the number of maximum bits for phyMode
145}eCsrPhyMode;
146
147
148typedef tANI_U8 tCsrBssid[WNI_CFG_BSSID_LEN];
149
150typedef enum
151{
Varun Reddy Yeturu2cc78922013-04-10 11:50:02 -0700152 eCSR_BSS_TYPE_NONE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700153 eCSR_BSS_TYPE_INFRASTRUCTURE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700154 eCSR_BSS_TYPE_INFRA_AP, // SoftAP AP
Jeff Johnson295189b2012-06-20 16:38:30 -0700155 eCSR_BSS_TYPE_IBSS, // an IBSS network we will NOT start
156 eCSR_BSS_TYPE_START_IBSS, // an IBSS network we will start if no partners detected.
157 eCSR_BSS_TYPE_WDS_AP, // BT-AMP AP
158 eCSR_BSS_TYPE_WDS_STA, // BT-AMP station
159 eCSR_BSS_TYPE_ANY, // any BSS type (IBSS or Infrastructure).
160}eCsrRoamBssType;
161
162
163
164typedef enum {
165 eCSR_SCAN_REQUEST_11D_SCAN = 1,
166 eCSR_SCAN_REQUEST_FULL_SCAN,
167 eCSR_SCAN_IDLE_MODE_SCAN,
168 eCSR_SCAN_HO_BG_SCAN, // bg scan request in NRT & RT Handoff sub-states
169 eCSR_SCAN_HO_PROBE_SCAN, // directed probe on an entry from the candidate list
170 eCSR_SCAN_HO_NT_BG_SCAN, // bg scan request in NT sub-state
171 eCSR_SCAN_P2P_DISCOVERY,
172
173 eCSR_SCAN_SOFTAP_CHANNEL_RANGE,
174 eCSR_SCAN_P2P_FIND_PEER,
175}eCsrRequestType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700176typedef enum {
177 eCSR_SCAN_RESULT_GET = 0,
178 eCSR_SCAN_RESULT_FLUSH = 1, //to delete all cached scan results
179}eCsrScanResultCmd;
180
181typedef enum
182{
183 eCSR_SCAN_SUCCESS,
184 eCSR_SCAN_FAILURE,
185 eCSR_SCAN_ABORT,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800186 eCSR_SCAN_FOUND_PEER,
Jeff Johnson295189b2012-06-20 16:38:30 -0700187}eCsrScanStatus;
188
Srinivas, Dasari138af4f2014-02-07 11:13:45 +0530189/* Reason to abort the scan
190 * The reason can used later to decide whether to update the scan results
191 * to upper layer or not
192 */
193typedef enum
194{
195 eCSR_SCAN_ABORT_DEFAULT,
196 eCSR_SCAN_ABORT_DUE_TO_BAND_CHANGE, //Scan aborted due to band change
197}eCsrAbortReason;
198
Jeff Johnson295189b2012-06-20 16:38:30 -0700199#define CSR_SCAN_TIME_DEFAULT 0
200#define CSR_VALUE_IGNORED 0xFFFFFFFF
201#define CSR_RSN_PMKID_SIZE 16
202#define CSR_MAX_PMKID_ALLOWED 16
203#define CSR_WEP40_KEY_LEN 5
204#define CSR_WEP104_KEY_LEN 13
205#define CSR_TKIP_KEY_LEN 32
206#define CSR_AES_KEY_LEN 16
207#define CSR_MAX_TX_POWER ( WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX )
208#define CSR_MAX_RSC_LEN 16
209#ifdef FEATURE_WLAN_WAPI
210#define CSR_WAPI_BKID_SIZE 16
211#define CSR_MAX_BKID_ALLOWED 16
212#define CSR_WAPI_KEY_LEN 32
213#define CSR_MAX_KEY_LEN ( CSR_WAPI_KEY_LEN ) //longest one is for WAPI
214#else
215#define CSR_MAX_KEY_LEN ( CSR_TKIP_KEY_LEN ) //longest one is for TKIP
216#endif /* FEATURE_WLAN_WAPI */
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800217#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700218#define CSR_KRK_KEY_LEN 16
219#endif
220
221
222
223typedef struct tagCsrChannelInfo
224{
225 tANI_U8 numOfChannels;
226 tANI_U8 *ChannelList; //it will be an array of channels
Madan Mohan Koyyalamudidd3c9662012-11-09 17:39:30 -0800227}tCsrChannelInfo, *tpCsrChannelInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700228
229typedef struct tagCsrSSIDInfo
230{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800231 tSirMacSSid SSID;
Jeff Johnson295189b2012-06-20 16:38:30 -0700232 tANI_BOOLEAN handoffPermitted;
233 tANI_BOOLEAN ssidHidden;
234}tCsrSSIDInfo;
235
236typedef struct tagCsrSSIDs
237{
238 tANI_U32 numOfSSIDs;
239 tCsrSSIDInfo *SSIDList; //To be allocated for array of SSIDs
240}tCsrSSIDs;
241
242typedef struct tagCsrBSSIDs
243{
244 tANI_U32 numOfBSSIDs;
245 tCsrBssid *bssid;
246}tCsrBSSIDs;
247
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800248typedef struct tagCsrStaParams
249{
250 tANI_U16 capability;
251 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
252 tANI_U8 supported_rates_len;
253 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -0700254 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800255 tSirHTCap HTCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -0700256 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800257 tSirVHTCap VHTCap;
258 tANI_U8 uapsd_queues;
259 tANI_U8 max_sp;
Naresh Jayaramdff88f92014-02-12 21:44:29 +0530260 tANI_U8 supported_channels_len;
261 tANI_U8 supported_channels[SIR_MAC_MAX_SUPP_CHANNELS];
262 tANI_U8 supported_oper_classes_len;
263 tANI_U8 supported_oper_classes[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800264}tCsrStaParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700265
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800266typedef struct tagCsrScanRequest
Jeff Johnson295189b2012-06-20 16:38:30 -0700267{
268 tSirScanType scanType;
269 tCsrBssid bssid;
270 eCsrRoamBssType BSSType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800271 tCsrSSIDs SSIDs;
Jeff Johnson295189b2012-06-20 16:38:30 -0700272 tCsrChannelInfo ChannelInfo;
273 tANI_U32 minChnTime; //in units of milliseconds
274 tANI_U32 maxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800275 tANI_U32 minChnTimeBtc; //in units of milliseconds
276 tANI_U32 maxChnTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700277 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
278 tANI_U32 uIEFieldLen;
279 tANI_U8 *pIEField;
280 eCsrRequestType requestType; //11d scan or full scan
Jeff Johnson295189b2012-06-20 16:38:30 -0700281 tANI_BOOLEAN p2pSearch;
Jeff Johnsone7245742012-09-05 17:12:55 -0700282 tANI_BOOLEAN skipDfsChnlInP2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700283}tCsrScanRequest;
284
285typedef struct tagCsrBGScanRequest
286{
287 tSirScanType scanType;
288 tSirMacSSid SSID;
289 tCsrChannelInfo ChannelInfo;
290 tANI_U32 scanInterval; //in units of milliseconds
291 tANI_U32 minChnTime; //in units of milliseconds
292 tANI_U32 maxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800293 tANI_U32 minChnTimeBtc; //in units of milliseconds
294 tANI_U32 maxChnTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700295 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
296 tANI_U32 throughputImpact; //specify whether BG scan cares about impacting throughput //ignored when not connected
297 tCsrBssid bssid; //how to use it?? Apple
Srikant Kuppa866893f2012-12-27 17:28:14 -0800298}tCsrBGScanRequest, *tpCsrBGScanRequest;
Jeff Johnson295189b2012-06-20 16:38:30 -0700299
300
301typedef struct tagCsrScanResultInfo
302{
303 //Carry the IEs for the current BSSDescription. A pointer to tDot11fBeaconIEs. Maybe NULL for start BSS.
304 void *pvIes;
305 tAniSSID ssId;
306 v_TIME_t timer; // timer is variable which is used for hidden SSID's timer value
307 //This member must be the last in the structure because the end of tSirBssDescription is an
308 // array with nonknown size at this time
309 tSirBssDescription BssDescriptor;
310}tCsrScanResultInfo;
311
312typedef struct tagCsrEncryptionList
313{
314
315 tANI_U32 numEntries;
316 eCsrEncryptionType encryptionType[eCSR_NUM_OF_ENCRYPT_TYPE];
317
318}tCsrEncryptionList, *tpCsrEncryptionList;
319
320typedef struct tagCsrAuthList
321{
322 tANI_U32 numEntries;
323 eCsrAuthType authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE];
324}tCsrAuthList, *tpCsrAuthList;
325
326#ifdef WLAN_FEATURE_VOWIFI_11R
327typedef struct tagCsrMobilityDomainInfo
328{
329 tANI_U8 mdiePresent;
330 tANI_U16 mobilityDomain;
331} tCsrMobilityDomainInfo;
332#endif
333
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800334#ifdef FEATURE_WLAN_ESE
335typedef struct tagCsrEseCckmInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700336{
337 tANI_U32 reassoc_req_num;
338 tANI_BOOLEAN krk_plumbed;
339 tANI_U8 krk[CSR_KRK_KEY_LEN];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800340} tCsrEseCckmInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700341#endif
342
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800343#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700344#define CSR_DOT11F_IE_RSN_MAX_LEN (114) /*TODO: duplicate one in dot11f.h */
345
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800346typedef struct tagCsrEseCckmIe
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700347{
348 tANI_U8 cckmIe[CSR_DOT11F_IE_RSN_MAX_LEN];
349 tANI_U8 cckmIeLen;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800350} tCsrEseCckmIe;
351#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700352
353typedef struct tagCsrScanResultFilter
354{
355 tCsrBSSIDs BSSIDs; //each bssid has a length of WNI_CFG_BSSID_LEN (6)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800356 tCsrSSIDs SSIDs;
Jeff Johnson295189b2012-06-20 16:38:30 -0700357 tCsrChannelInfo ChannelInfo;
358 tCsrAuthList authType;
359 tCsrEncryptionList EncryptionType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800360 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
Jeff Johnson295189b2012-06-20 16:38:30 -0700361 //put all supported encryption types in here
362 tCsrEncryptionList mcEncryptionType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800363 eCsrRoamBssType BSSType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700364 //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800365 tANI_U32 phyMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700366 //If countryCode[0] is not 0, countryCode is checked independent of fCheckUnknownCountryCode
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800367 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN];
368 tANI_U8 uapsd_mask;
Jeff Johnson295189b2012-06-20 16:38:30 -0700369 /*For WPS filtering if true => auth and ecryption should be ignored*/
370 tANI_BOOLEAN bWPSAssociation;
Leela Venkata Kiran Kumar Reddy Chiralaf257bef2014-04-11 18:48:12 -0700371 tANI_BOOLEAN bOSENAssociation;
Jeff Johnson295189b2012-06-20 16:38:30 -0700372#if defined WLAN_FEATURE_VOWIFI
373 /*For measurement reports --> if set, only SSID, BSSID and channel is considered for filtering.*/
374 tANI_BOOLEAN fMeasurement;
375#endif
376#ifdef WLAN_FEATURE_VOWIFI_11R
377 tCsrMobilityDomainInfo MDID;
378#endif
379 tANI_BOOLEAN p2pResult;
380}tCsrScanResultFilter;
381
382
383typedef struct sCsrChnPower_
384{
385 tANI_U8 firstChannel;
386 tANI_U8 numChannels;
387 tANI_U8 maxtxPower;
388}sCsrChnPower;
389
390
391typedef struct sCsrChannel_
392{
393 tANI_U8 numChannels;
394 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
395}sCsrChannel;
396
397
398typedef struct tagCsr11dinfo
399{
400 sCsrChannel Channels;
401 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN+1];
402 //max power channel list
403 sCsrChnPower ChnPower[WNI_CFG_VALID_CHANNEL_LIST_LEN];
404}tCsr11dinfo;
405
406
407typedef enum
408{
409 eCSR_ROAM_CANCELLED = 1,
410 //this mean error happens before association_start or roaming_start is called.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800411 eCSR_ROAM_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700412 //a CSR trigger roaming operation starts, callback may get a pointer to tCsrConnectedProfile
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800413 eCSR_ROAM_ROAMING_START,
Jeff Johnson295189b2012-06-20 16:38:30 -0700414 //a CSR trigger roaming operation is completed
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800415 eCSR_ROAM_ROAMING_COMPLETION,
Jeff Johnson295189b2012-06-20 16:38:30 -0700416 //Connection completed status.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800417 eCSR_ROAM_CONNECT_COMPLETION,
418 //an association or start_IBSS operation starts,
419 //callback may get a pointer to tCsrRoamProfile and a pointer to tSirBssDescription
420 eCSR_ROAM_ASSOCIATION_START,
421 //a roaming operation is finish, see eCsrRoamResult for
Jeff Johnson295189b2012-06-20 16:38:30 -0700422 //possible data passed back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800423 eCSR_ROAM_ASSOCIATION_COMPLETION,
Jeff Johnson295189b2012-06-20 16:38:30 -0700424 eCSR_ROAM_DISASSOCIATED,
425 eCSR_ROAM_ASSOCIATION_FAILURE,
426 //when callback with this flag. callback gets a pointer to the BSS desc.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800427 eCSR_ROAM_SHOULD_ROAM,
Jeff Johnson295189b2012-06-20 16:38:30 -0700428 //A new candidate for PMKID is found
429 eCSR_ROAM_SCAN_FOUND_NEW_BSS,
430 //CSR is done lostlink roaming and still cannot reconnect
431 eCSR_ROAM_LOSTLINK,
432 //a link lost is detected. CSR starts roaming.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800433 eCSR_ROAM_LOSTLINK_DETECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700434 //TKIP MIC error detected, callback gets a pointer to tpSirSmeMicFailureInd
435 eCSR_ROAM_MIC_ERROR_IND,
436 eCSR_ROAM_IBSS_IND, //IBSS indications.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800437 //Update the connection status, useful for IBSS: new peer added, network is active etc.
438 eCSR_ROAM_CONNECT_STATUS_UPDATE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700439 eCSR_ROAM_GEN_INFO,
440 eCSR_ROAM_SET_KEY_COMPLETE,
441 eCSR_ROAM_REMOVE_KEY_COMPLETE,
442 eCSR_ROAM_IBSS_LEAVE, //IBSS indications.
443 //BSS in WDS mode status indication
444 eCSR_ROAM_WDS_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700445 //BSS in SoftAP mode status indication
446 eCSR_ROAM_INFRA_IND,
447 eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700448#ifdef WLAN_FEATURE_VOWIFI_11R
449 eCSR_ROAM_FT_RESPONSE,
450#endif
451 eCSR_ROAM_FT_START,
452 eCSR_ROAM_INDICATE_MGMT_FRAME,
453 eCSR_ROAM_REMAIN_CHAN_READY,
454 eCSR_ROAM_SEND_ACTION_CNF,
455 //this mean error happens before association_start or roaming_start is called.
456 eCSR_ROAM_SESSION_OPENED,
457 eCSR_ROAM_FT_REASSOC_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700458#ifdef FEATURE_WLAN_LFR
459 eCSR_ROAM_PMK_NOTIFY,
460#endif
Yue Maef608272013-04-08 23:09:17 -0700461#ifdef FEATURE_WLAN_LFR_METRICS
462 eCSR_ROAM_PREAUTH_INIT_NOTIFY,
463 eCSR_ROAM_PREAUTH_STATUS_SUCCESS,
464 eCSR_ROAM_PREAUTH_STATUS_FAILURE,
465 eCSR_ROAM_HANDOVER_SUCCESS,
466#endif
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800467#ifdef FEATURE_WLAN_TDLS
468 eCSR_ROAM_TDLS_STATUS_UPDATE,
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800469 eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800470#endif
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800471 eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS, //Disaconnect all the clients
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800472 eCSR_ROAM_SEND_P2P_STOP_BSS, //Stopbss triggered from SME due to different
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800473 // beacon interval
Chet Lanctot186b5732013-03-18 10:26:30 -0700474#ifdef WLAN_FEATURE_11W
475 eCSR_ROAM_UNPROT_MGMT_FRAME_IND,
476#endif
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800477
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800478#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700479 eCSR_ROAM_TSM_IE_IND,
480 eCSR_ROAM_CCKM_PREAUTH_NOTIFY,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800481 eCSR_ROAM_ESE_ADJ_AP_REPORT_IND,
482 eCSR_ROAM_ESE_BCN_REPORT_IND,
483#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700484}eRoamCmdStatus;
485
486
487//comment inside indicates what roaming callback gets
488typedef enum
489{
490 eCSR_ROAM_RESULT_NONE,
491 //this means no more action in CSR
492 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION, tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800493 eCSR_ROAM_RESULT_FAILURE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700494 //Pass back pointer to tCsrRoamInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800495 eCSR_ROAM_RESULT_ASSOCIATED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700496 eCSR_ROAM_RESULT_NOT_ASSOCIATED,
497 eCSR_ROAM_RESULT_MIC_FAILURE,
498 eCSR_ROAM_RESULT_FORCED,
499 eCSR_ROAM_RESULT_DISASSOC_IND,
500 eCSR_ROAM_RESULT_DEAUTH_IND,
501 eCSR_ROAM_RESULT_CAP_CHANGED,
502 //This means we starts an IBSS
503 //tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800504 eCSR_ROAM_RESULT_IBSS_STARTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700505 //START_BSS failed
506 //tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800507 eCSR_ROAM_RESULT_IBSS_START_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700508 eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800509 eCSR_ROAM_RESULT_IBSS_JOIN_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700510 eCSR_ROAM_RESULT_IBSS_CONNECT,
511 eCSR_ROAM_RESULT_IBSS_INACTIVE,
512 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800513 //tCsrRoamInfo's pBssDesc may pass back. and the peer's MAC address in peerMacOrBssid
514 //If roamStatus is eCSR_ROAM_IBSS_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700515 //the peer's MAC address in peerMacOrBssid and a beacon frame of the IBSS in pbFrames
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800516 eCSR_ROAM_RESULT_IBSS_NEW_PEER,
Jeff Johnson295189b2012-06-20 16:38:30 -0700517 //Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd in pIbssPeerInd
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800518 eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700519 //Coalescing in the IBSS network (joined an IBSS network)
520 //Callback pass a BSSID in peerMacOrBssid
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800521 eCSR_ROAM_RESULT_IBSS_COALESCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700522 //If roamStatus is eCSR_ROAM_ROAMING_START, callback may get a pointer to tCsrConnectedProfile used to connect.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800523 eCSR_ROAM_RESULT_IBSS_STOP,
524 eCSR_ROAM_RESULT_LOSTLINK,
Jeff Johnson295189b2012-06-20 16:38:30 -0700525 eCSR_ROAM_RESULT_MIC_ERROR_UNICAST,
526 eCSR_ROAM_RESULT_MIC_ERROR_GROUP,
527 eCSR_ROAM_RESULT_AUTHENTICATED,
528 eCSR_ROAM_RESULT_NEW_RSN_BSS,
529#ifdef FEATURE_WLAN_WAPI
530 eCSR_ROAM_RESULT_NEW_WAPI_BSS,
531#endif /* FEATURE_WLAN_WAPI */
532 // WDS started successfully
533 eCSR_ROAM_RESULT_WDS_STARTED,
534 // WDS start failed
535 eCSR_ROAM_RESULT_WDS_START_FAILED,
536 // WDS stopped
537 eCSR_ROAM_RESULT_WDS_STOPPED,
538 // WDS joined successfully in STA mode
539 eCSR_ROAM_RESULT_WDS_ASSOCIATED,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800540 // A station joined WDS AP
Jeff Johnson295189b2012-06-20 16:38:30 -0700541 eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND,
542 // WDS join failed in STA mode
543 eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED,
544 // WDS disassociated
545 eCSR_ROAM_RESULT_WDS_DISASSOCIATED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700546 // INFRA started successfully
547 eCSR_ROAM_RESULT_INFRA_STARTED,
548 // INFRA start failed
549 eCSR_ROAM_RESULT_INFRA_START_FAILED,
550 // INFRA stopped
551 eCSR_ROAM_RESULT_INFRA_STOPPED,
552 // A station joining INFRA AP
553 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND,
554 // A station joined INFRA AP
555 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF,
556 // INFRA disassociated
557 eCSR_ROAM_RESULT_INFRA_DISASSOCIATED,
558 eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700559 eCSR_ROAM_RESULT_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700560 // peer rejected assoc because max assoc limit reached. callback gets pointer to peer
561 eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED,
Jeff Johnsone7245742012-09-05 17:12:55 -0700562 //Assoc rejected due to concurrent session running on a different channel
563 eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800564#ifdef FEATURE_WLAN_TDLS
565 eCSR_ROAM_RESULT_ADD_TDLS_PEER,
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800566 eCSR_ROAM_RESULT_UPDATE_TDLS_PEER,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800567 eCSR_ROAM_RESULT_DELETE_TDLS_PEER,
Hoonki Leee6bfe942013-02-05 15:01:19 -0800568 eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND,
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800569 eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND,
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530570 eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800571#endif
572
Jeff Johnson295189b2012-06-20 16:38:30 -0700573}eCsrRoamResult;
574
575
576
577/*----------------------------------------------------------------------------
578 List of link quality indications HDD can receive from SME
579-----------------------------------------------------------------------------*/
580typedef enum
581{
582 eCSR_ROAM_LINK_QUAL_MIN_IND = -1,
583
584 eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */
585 eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */
586 eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */
587 eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */
588
589 eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */
590
591} eCsrRoamLinkQualityInd;
592
593typedef enum
594{
595 eCSR_DISCONNECT_REASON_UNSPECIFIED = 0,
596 eCSR_DISCONNECT_REASON_MIC_ERROR,
597 eCSR_DISCONNECT_REASON_DISASSOC,
598 eCSR_DISCONNECT_REASON_DEAUTH,
599 eCSR_DISCONNECT_REASON_HANDOFF,
600 eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE,
601 eCSR_DISCONNECT_REASON_IBSS_LEAVE,
602}eCsrRoamDisconnectReason;
603
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800604typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700605{
606 // Not associated in Infra or participating in an IBSS / Ad-hoc network.
607 eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED,
608 // Associated in an Infrastructure network.
609 eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED,
610 // Participating in an IBSS network though disconnected (no partner stations
611 // in the IBSS).
612 eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED,
613 // Participating in an IBSS network with partner stations also present
614 eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED,
615 // Participating in a WDS network in AP or STA mode but not connected yet
616 eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED,
617 // Participating in a WDS network and connected peer to peer
618 eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700619 // Participating in a Infra network in AP not yet in connected state
620 eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED,
621 // Participating in a Infra network and connected to a peer
622 eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700623
624}eCsrConnectState;
625
626
627// This parameter is no longer supported in the Profile. Need to set this in the global properties
628// for the adapter.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800629typedef enum eCSR_MEDIUM_ACCESS
Jeff Johnson295189b2012-06-20 16:38:30 -0700630{
631 eCSR_MEDIUM_ACCESS_AUTO = 0,
632 eCSR_MEDIUM_ACCESS_DCF,
633 eCSR_MEDIUM_ACCESS_eDCF,
634 eCSR_MEDIUM_ACCESS_HCF,
635
636 eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p,
637 eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP,
638 eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify,
639 eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF,
640 eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF,
641}eCsrMediaAccessType;
642
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800643typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700644{
645 eCSR_TX_RATE_AUTO = 0, // use rate adaption to determine Tx rate.
646
647 eCSR_TX_RATE_1Mbps = 0x00000001,
648 eCSR_TX_RATE_2Mbps = 0x00000002,
649 eCSR_TX_RATE_5_5Mbps = 0x00000004,
650 eCSR_TX_RATE_6Mbps = 0x00000008,
651 eCSR_TX_RATE_9Mbps = 0x00000010,
652 eCSR_TX_RATE_11Mbps = 0x00000020,
653 eCSR_TX_RATE_12Mbps = 0x00000040,
654 eCSR_TX_RATE_18Mbps = 0x00000080,
655 eCSR_TX_RATE_24Mbps = 0x00000100,
656 eCSR_TX_RATE_36Mbps = 0x00000200,
657 eCSR_TX_RATE_42Mbps = 0x00000400,
658 eCSR_TX_RATE_48Mbps = 0x00000800,
659 eCSR_TX_RATE_54Mbps = 0x00001000,
660 eCSR_TX_RATE_72Mbps = 0x00002000,
661 eCSR_TX_RATE_84Mbps = 0x00004000,
662 eCSR_TX_RATE_96Mbps = 0x00008000,
663 eCSR_TX_RATE_108Mbps = 0x00010000,
664 eCSR_TX_RATE_126Mbps = 0x00020000,
665 eCSR_TX_RATE_144Mbps = 0x00040000,
666 eCSR_TX_RATE_168Mbps = 0x00080000,
667 eCSR_TX_RATE_192Mbps = 0x00100000,
668 eCSR_TX_RATE_216Mbps = 0x00200000,
669 eCSR_TX_RATE_240Mbps = 0x00400000,
670
671}eCsrExposedTxRate;
672
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800673typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700674{
675 eCSR_OPERATING_CHANNEL_ALL = 0,
676 eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL,
677 eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL,
678}eOperationChannel;
679
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800680typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700681{
682 eCSR_DOT11_FRAG_THRESH_AUTO = -1,
683 eCSR_DOT11_FRAG_THRESH_MIN = 256,
684 eCSR_DOT11_FRAG_THRESH_MAX = 2346,
685 eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000
686}eCsrDot11FragThresh;
687
688
689//for channel bonding for ibss
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800690typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700691{
692 eCSR_CB_OFF = 0,
693 eCSR_CB_AUTO = 1,
694 eCSR_CB_DOWN = 2,
695 eCSR_CB_UP = 3,
696}eCsrCBChoice;
697
698//For channel bonding, the channel number gap is 4, either up or down. For both 11a and 11g mode.
699#define CSR_CB_CHANNEL_GAP 4
700#define CSR_CB_CENTER_CHANNEL_OFFSET 2
701#define CSR_MAX_24GHz_CHANNEL_NUMBER ( SIR_11B_CHANNEL_END )
Jeff Johnsone7245742012-09-05 17:12:55 -0700702#define CSR_MIN_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_BEGIN )
703#define CSR_MAX_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_END )
Jeff Johnson295189b2012-06-20 16:38:30 -0700704
705// WEP keysize (in bits)...
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800706typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700707{
708 eCSR_SECURITY_WEP_KEYSIZE_40 = 40, // 40 bit key + 24bit IV = 64bit WEP
709 eCSR_SECURITY_WEP_KEYSIZE_104 = 104, // 104bit key + 24bit IV = 128bit WEP
710
711 eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40,
712 eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104,
713 eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = ( eCSR_SECURITY_WEP_KEYSIZE_MAX / 8 ),
714}eCsrWEPKeySize;
715
716
717// Possible values for the WEP static key ID...
718typedef enum
719{
720
721 eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0,
722 eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3,
723 eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0,
724
725 eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1,
726
727}eCsrWEPStaticKeyID;
728
Chet Lanctot186b5732013-03-18 10:26:30 -0700729// Two extra key indicies are used for the IGTK (which is used by BIP)
730#define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 2 + 1)
Jeff Johnson295189b2012-06-20 16:38:30 -0700731
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800732typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700733{
734 eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE,
735 eCSR_SECURITY_SET_KEY_ACTION_SET_KEY,
736 eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY,
737}eCsrSetKeyAction;
738
739typedef enum
740{
741 eCSR_BAND_ALL,
742 eCSR_BAND_24,
743 eCSR_BAND_5G,
744 eCSR_BAND_MAX,
745}eCsrBand;
746
747
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800748typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700749{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800750 // Roaming because HDD requested for reassoc by changing one of the fields in
Jeff Johnson295189b2012-06-20 16:38:30 -0700751 // tCsrRoamModifyProfileFields. OR
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800752 // Roaming because SME requested for reassoc by changing one of the fields in
Jeff Johnson295189b2012-06-20 16:38:30 -0700753 // tCsrRoamModifyProfileFields.
754 eCsrRoamReasonStaCapabilityChanged,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800755 // Roaming because SME requested for reassoc to a different AP, as part of
Jeff Johnson295189b2012-06-20 16:38:30 -0700756 // inter AP handoff.
757 eCsrRoamReasonBetterAP,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800758 // Roaming because SME requested it as the link is lost - placeholder, will
Jeff Johnson295189b2012-06-20 16:38:30 -0700759 // clean it up once handoff code gets in
760 eCsrRoamReasonSmeIssuedForLostLink,
761
762}eCsrRoamReasonCodes;
763
764typedef enum
765{
766 eCsrRoamWmmAuto = 0,
767 eCsrRoamWmmQbssOnly = 1,
768 eCsrRoamWmmNoQos = 2,
769
770} eCsrRoamWmmUserModeType;
771
772typedef enum
773{
774 eCSR_REQUESTER_MIN = 0,
775 eCSR_DIAG,
776 eCSR_UMA_GAN,
777 eCSR_HDD
778} eCsrStatsRequesterType;
779
780typedef struct tagPmkidCandidateInfo
781{
782 tCsrBssid BSSID;
783 tANI_BOOLEAN preAuthSupported;
784}tPmkidCandidateInfo;
785
786typedef struct tagPmkidCacheInfo
787{
788 tCsrBssid BSSID;
789 tANI_U8 PMKID[CSR_RSN_PMKID_SIZE];
790}tPmkidCacheInfo;
791
792#ifdef FEATURE_WLAN_WAPI
793typedef struct tagBkidCandidateInfo
794{
795 tCsrBssid BSSID;
796 tANI_BOOLEAN preAuthSupported;
797}tBkidCandidateInfo;
798
799typedef struct tagBkidCacheInfo
800{
801 tCsrBssid BSSID;
802 tANI_U8 BKID[CSR_WAPI_BKID_SIZE];
803}tBkidCacheInfo;
804#endif /* FEATURE_WLAN_WAPI */
805
806typedef struct tagCsrKeys
807{
808 tANI_U8 KeyLength[ CSR_MAX_NUM_KEY ]; //Also use to indicate whether the key index is set
809 tANI_U8 KeyMaterial[ CSR_MAX_NUM_KEY ][ CSR_MAX_KEY_LEN ];
810 tANI_U8 defaultIndex;
811}tCsrKeys;
812
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800813/* Following are fields which are part of tCsrRoamConnectedProfile might need
Jeff Johnson295189b2012-06-20 16:38:30 -0700814 modification dynamically once STA is up & running and this could trigger
815 reassoc */
816typedef struct tagCsrRoamModifyProfileFields
817{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800818 // during connect this specifies ACs U-APSD is to be setup
Jeff Johnson295189b2012-06-20 16:38:30 -0700819 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800820 // During assoc response this COULD carry confirmation of what ACs U-APSD
Jeff Johnson295189b2012-06-20 16:38:30 -0700821 // got setup for. Later if an APP looking for APSD, SME-QoS might need to
822 // modify this field
823 tANI_U8 uapsd_mask;
824 // HDD might ask to modify this field
825 tANI_U16 listen_interval;
826}tCsrRoamModifyProfileFields;
827
828typedef struct tagCsrRoamProfile
829{
830 //For eCSR_BSS_TYPE_WDS_AP. There must be one SSID in SSIDs.
831 //For eCSR_BSS_TYPE_WDS_STA. There must be two SSIDs. Index 0 is the SSID of the WDS-AP
832 //that we need to join. Index 1 is the SSID for self BSS.
833 tCsrSSIDs SSIDs;
834 tCsrBSSIDs BSSIDs;
835 tANI_U32 phyMode; //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
836 eCsrRoamBssType BSSType;
837
838 tCsrAuthList AuthType;
839 eCsrAuthType negotiatedAuthType;
840
841 tCsrEncryptionList EncryptionType;
842 //This field is for output only, not for input
843 eCsrEncryptionType negotiatedUCEncryptionType;
844
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800845 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
Jeff Johnson295189b2012-06-20 16:38:30 -0700846 //put all supported encryption types in here
847 tCsrEncryptionList mcEncryptionType;
848 //This field is for output only, not for input
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800849 eCsrEncryptionType negotiatedMCEncryptionType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700850
Chet Lanctot186b5732013-03-18 10:26:30 -0700851#ifdef WLAN_FEATURE_11W
852 // Management Frame Protection
853 tANI_BOOLEAN MFPEnabled;
854 tANI_U8 MFPRequired;
855 tANI_U8 MFPCapable;
856#endif
857
Jeff Johnson295189b2012-06-20 16:38:30 -0700858 tCsrKeys Keys;
859 eCsrCBChoice CBMode; //up, down or auto
860 tCsrChannelInfo ChannelInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800861 tANI_U8 operationChannel;
Jeff Johnson295189b2012-06-20 16:38:30 -0700862 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800863 // during connect this specifies ACs U-APSD is to be setup
Jeff Johnson295189b2012-06-20 16:38:30 -0700864 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
865 // During assoc response this COULD carry confirmation of what ACs U-APSD got setup for
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800866 tANI_U8 uapsd_mask;
Jeff Johnson295189b2012-06-20 16:38:30 -0700867 tANI_U32 nWPAReqIELength; //The byte count in the pWPAReqIE
868 tANI_U8 *pWPAReqIE; //If not null, it has the IE byte stream for WPA
869 tANI_U32 nRSNReqIELength; //The byte count in the pRSNReqIE
870 tANI_U8 *pRSNReqIE; //If not null, it has the IE byte stream for RSN
871#ifdef FEATURE_WLAN_WAPI
872 tANI_U32 nWAPIReqIELength; //The byte count in the pWAPIReqIE
873 tANI_U8 *pWAPIReqIE; //If not null, it has the IE byte stream for WAPI
874#endif /* FEATURE_WLAN_WAPI */
875
Agarwal Ashish4f616132013-12-30 23:32:50 +0530876 //The byte count in the pAddIE for scan (at the time of join)
877 tANI_U32 nAddIEScanLength;
878 /* Additional IE information.
879 * It has the IE byte stream for additional IE,
880 * which can be WSC IE and/or P2P IE
881 */
882 tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2]; //Additional IE information.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800883 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
Jeff Johnson295189b2012-06-20 16:38:30 -0700884 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
885
886 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //it is ignored if [0] is 0.
887 /*WPS Association if true => auth and ecryption should be ignored*/
888 tANI_BOOLEAN bWPSAssociation;
Leela Venkata Kiran Kumar Reddy Chiralaf257bef2014-04-11 18:48:12 -0700889 tANI_BOOLEAN bOSENAssociation;
Jeff Johnson295189b2012-06-20 16:38:30 -0700890 tANI_U32 nWSCReqIELength; //The byte count in the pWSCReqIE
891 tANI_U8 *pWSCReqIE; //If not null, it has the IE byte stream for WSC
892
Jeff Johnson295189b2012-06-20 16:38:30 -0700893 tANI_U8 ieee80211d;
894 tANI_U8 privacy;
895 tANI_BOOLEAN fwdWPSPBCProbeReq;
896 tAniAuthType csr80211AuthType;
897 tANI_U32 dtimPeriod;
898 tANI_BOOLEAN ApUapsdEnable;
899 tANI_BOOLEAN protEnabled;
900 tANI_BOOLEAN obssProtEnabled;
901 tANI_U16 cfg_protection;
902 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700903
904#ifdef WLAN_FEATURE_VOWIFI_11R
905 tCsrMobilityDomainInfo MDID;
906#endif
907 tVOS_CON_MODE csrPersona;
908
909}tCsrRoamProfile;
910
911
912typedef struct tagCsrRoamConnectedProfile
913{
914 tSirMacSSid SSID;
915 tANI_BOOLEAN handoffPermitted;
916 tANI_BOOLEAN ssidHidden;
917 tCsrBssid bssid;
918 eCsrRoamBssType BSSType;
919 eCsrAuthType AuthType;
920 tCsrAuthList AuthInfo;
921 eCsrEncryptionType EncryptionType;
922 tCsrEncryptionList EncryptionInfo;
923 eCsrEncryptionType mcEncryptionType;
924 tCsrEncryptionList mcEncryptionInfo;
925 eCsrCBChoice CBMode; //up, down or auto
926 tANI_U8 operationChannel;
Jeff Johnsone7245742012-09-05 17:12:55 -0700927 tANI_U16 beaconInterval;
Jeff Johnson295189b2012-06-20 16:38:30 -0700928 tCsrKeys Keys;
929 // meaningless on connect. It's an OUT param from CSR's point of view
930 // During assoc response carries the ACM bit-mask i.e. what
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800931 // ACs have ACM=1 (if any),
Jeff Johnson295189b2012-06-20 16:38:30 -0700932 // (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored)
933 tANI_U8 acm_mask;
934 tCsrRoamModifyProfileFields modifyProfileFields;
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700935 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
936 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800937
938 tSirBssDescription *pBssDesc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700939 tANI_BOOLEAN qap; //AP supports QoS
940 tANI_BOOLEAN qosConnection; //A connection is QoS enabled
941#ifdef WLAN_FEATURE_VOWIFI_11R
942 tCsrMobilityDomainInfo MDID;
943#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800944
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800945#ifdef FEATURE_WLAN_ESE
946 tCsrEseCckmInfo eseCckmInfo;
947 tANI_BOOLEAN isESEAssoc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700948#endif
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +0530949 tANI_U32 dot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700950}tCsrRoamConnectedProfile;
951
952
953#ifdef WLAN_FEATURE_VOWIFI_11R
954typedef struct tagCsr11rConfigParams
955{
956 tANI_BOOLEAN IsFTResourceReqSupported;
957} tCsr11rConfigParams;
958#endif
959
960#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
961typedef struct tagCsrNeighborRoamConfigParams
962{
963
964 tANI_U32 nNeighborScanTimerPeriod;
965 tANI_U8 nNeighborLookupRssiThreshold;
966 tANI_U8 nNeighborReassocRssiThreshold;
967 tANI_U16 nNeighborScanMinChanTime;
968 tANI_U16 nNeighborScanMaxChanTime;
969 sCsrChannel neighborScanChanList;
970 tANI_U8 nMaxNeighborRetries;
971 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowdade697412013-02-14 16:31:48 -0800972 tANI_U16 nEmptyScanRefreshPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -0700973}tCsrNeighborRoamConfigParams;
974#endif
975
976typedef struct tagCsrConfigParam
977{
978 tANI_U32 FragmentationThreshold;
Jeff Johnsone7245742012-09-05 17:12:55 -0700979 tANI_U32 channelBondingMode24GHz; // keep this tANI_U32. This gets converted to ePhyChannelBondState
980 tANI_U32 channelBondingMode5GHz; // in csrChangeDefaultConfigParam using convertCBIniValueToPhyCBState
Jeff Johnson295189b2012-06-20 16:38:30 -0700981 eCsrPhyMode phyMode;
982 eCsrBand eBand;
983 tANI_U32 RTSThreshold;
984 tANI_U32 HeartbeatThresh50;
985 tANI_U32 HeartbeatThresh24;
986 eCsrCBChoice cbChoice;
987 eCsrBand bandCapability; //indicate hw capability
988 tANI_U32 bgScanInterval;
989 tANI_U16 TxRate;
990 eCsrRoamWmmUserModeType WMMSupportMode;
991 tANI_BOOLEAN Is11eSupportEnabled;
992 tANI_BOOLEAN Is11dSupportEnabled;
993 tANI_BOOLEAN Is11dSupportEnabledOriginal;
994 tANI_BOOLEAN Is11hSupportEnabled;
995 tANI_BOOLEAN shortSlotTime;
996 tANI_BOOLEAN ProprietaryRatesEnabled;
997 tANI_U8 AdHocChannel24;
998 tANI_U8 AdHocChannel5G;
999 tANI_U32 impsSleepTime; //in units of seconds
1000 tANI_U32 nScanResultAgeCount; //this number minus one is the number of times a scan doesn't find it before it is removed
1001 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
1002 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
1003 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
1004 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
1005 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up. 0 means no roaming
1006 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
1007 tANI_U8 fEnableMCCMode; //to set MCC Enable/Disable mode
Mohit Khanna7ed53f02012-09-11 17:52:10 -07001008 tANI_U8 fAllowMCCGODiffBI; //to allow MCC GO different B.I than STA's. NOTE: make sure if RIVA firmware can handle this combination before enabling this
1009 //at the moment, this flag is provided only to pass Wi-Fi Cert. 5.1.12
Jeff Johnson295189b2012-06-20 16:38:30 -07001010 tCsr11dinfo Csr11dinfo;
1011 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001012 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -07001013 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001014 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001015 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001016 //0 = 802.11D > Country IOCTL > NV
Jeff Johnson295189b2012-06-20 16:38:30 -07001017 //1 = Country IOCTL > 802.11D > NV
1018 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001019 //When true, AP with unknown country code won't be see.
1020 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
1021 //find a domain for the country code in its 11d IE.
1022 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -07001023 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
1024 //code", or the domain of the country code doesn't match the default domain, the Ap is
1025 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001026 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -07001027
1028 tANI_U16 vccRssiThreshold;
1029 tANI_U32 vccUlMacLossThreshold;
1030
1031 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
1032 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
1033 tANI_U32 nActiveMinChnTime; //in units of milliseconds
1034 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001035
c_hpothu059edb02014-03-12 21:44:28 +05301036 tANI_U32 nInitialDwellTime; //in units of milliseconds
1037
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001038 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
1039 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07001040 tANI_U32 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -07001041#ifdef WLAN_AP_STA_CONCURRENCY
1042 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
1043 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
1044 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
1045 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
1046 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -07001047 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
1048 //STA in each split scan operation
1049 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
1050 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -07001051#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001052
1053 tANI_BOOLEAN IsIdleScanEnabled;
1054 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001055 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -07001056 //If 11d is disable, the lesser of this and default setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001057 tANI_U8 nTxPowerCap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001058 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
1059 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
1060#ifdef WLAN_FEATURE_VOWIFI_11R
1061 tCsr11rConfigParams csr11rConfig;
1062#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001063#ifdef FEATURE_WLAN_ESE
1064 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001065#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001066#ifdef FEATURE_WLAN_LFR
1067 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08001068 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001069#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001070
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001071#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07001072 tANI_U8 isFastTransitionEnabled;
1073 tANI_U8 RoamRssiDiff;
1074 tANI_U8 nImmediateRoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07001075 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001076#endif
1077
1078#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
1079 tCsrNeighborRoamConfigParams neighborRoamConfig;
1080#endif
1081
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001082 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -07001083 * This is mandated by WMM-AC certification */
1084 tANI_BOOLEAN addTSWhenACMIsOff;
1085
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001086
1087 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -07001088 * detect when it happens. Adding this into code because we can't reproduce it easily.
1089 * We don't know when it happens. */
1090 tANI_BOOLEAN fValidateList;
1091
1092 /*Customer wants to start with an active scan based on the default country code.
1093 * This optimization will minimize the driver load to association time.
1094 * Based on this flag we will bypass the initial passive scan needed for 11d
1095 * to determine the country code & domain */
1096 tANI_BOOLEAN fEnableBypass11d;
1097
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001098 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
1099 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -07001100 * (apprx 1.3 sec) */
1101 tANI_BOOLEAN fEnableDFSChnlScan;
1102
1103 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
1104 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -07001105#ifdef WLAN_FEATURE_11AC
Ravi Joshi83bfaa12013-05-28 22:12:08 -07001106 tANI_U32 nVhtChannelWidth;
1107 tANI_U8 enableTxBF;
1108 tANI_U8 txBFCsnValue;
1109 tANI_BOOLEAN enableVhtFor24GHz;
Jeff Johnsone7245742012-09-05 17:12:55 -07001110#endif
1111
1112 /*
1113 * To enable/disable scanning only 2.4Ghz channels on first scan
1114 */
1115 tANI_BOOLEAN fFirstScanOnly2GChnl;
Jeff Johnson295189b2012-06-20 16:38:30 -07001116
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001117#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08001118 tANI_BOOLEAN nRoamPrefer5GHz;
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07001119 tANI_BOOLEAN nRoamIntraBand;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07001120 tANI_U8 nProbes;
1121 tANI_U16 nRoamScanHomeAwayTime;
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001122
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001123#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1124 tANI_BOOLEAN isRoamOffloadScanEnabled;
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07001125 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001126#endif
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07001127#endif
1128
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001129
Sandeep Puligilla2b6dc632012-12-17 14:44:16 -08001130 tANI_U8 scanCfgAgingTime;
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001131
1132 tANI_U8 enableTxLdpc;
krunal soni4f087d22013-07-29 16:32:26 -07001133
krunal soni5afa96c2013-09-06 22:19:02 -07001134 tANI_U8 isAmsduSupportInAMPDU;
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -07001135 tANI_U8 nSelect5GHzMargin;
krunal soni5afa96c2013-09-06 22:19:02 -07001136
krunal sonie9002db2013-11-25 14:24:17 -08001137 tANI_U8 isCoalesingInIBSSAllowed;
Sandeep Puligillac80f26e2014-03-11 18:36:10 +05301138 tANI_U8 allowDFSChannelRoam;
c_hpothu0d5a7352014-03-22 12:30:25 +05301139 tANI_BOOLEAN initialScanSkipDFSCh;
krunal sonie9002db2013-11-25 14:24:17 -08001140
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001141}tCsrConfigParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07001142
1143//Tush
1144typedef struct tagCsrUpdateConfigParam
1145{
1146 tCsr11dinfo Csr11dinfo;
1147}tCsrUpdateConfigParam;
1148
1149typedef struct tagCsrRoamInfo
1150{
1151 tCsrRoamProfile *pProfile; //may be NULL
1152 tSirBssDescription *pBssDesc; //May be NULL
1153 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
1154 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
1155 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
1156 tANI_U32 nFrameLength;
1157 tANI_U8 frameType;
1158 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
1159 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
1160 //each frame starts and ends.
1161 tANI_BOOLEAN fReassocReq; //set to true if for re-association
1162 tANI_BOOLEAN fReassocRsp; //set to true if for re-association
1163 tCsrBssid bssid;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001164 //Only valid in IBSS
Jeff Johnson295189b2012-06-20 16:38:30 -07001165 //this is the peers MAC address for eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001166 tCsrBssid peerMac;
Jeff Johnson295189b2012-06-20 16:38:30 -07001167 tSirResultCodes statusCode;
1168 tANI_U32 reasonCode; //this could be our own defined or sent from the other BSS(per 802.11 spec)
1169 tANI_U8 staId; // Peer stationId when connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001170 /*The DPU signatures will be sent eventually to TL to help it determine the
Jeff Johnson295189b2012-06-20 16:38:30 -07001171 association to which a packet belongs to*/
1172 /*Unicast DPU signature*/
1173 tANI_U8 ucastSig;
1174
1175 /*Broadcast DPU signature*/
1176 tANI_U8 bcastSig;
1177
1178 tANI_BOOLEAN fAuthRequired; //FALSE means auth needed from supplicant. TRUE means authenticated(static WEP, open)
1179 tANI_U8 sessionId;
1180 tANI_U8 rsnIELen;
1181 tANI_U8 *prsnIE;
1182
1183 tANI_U8 addIELen;
1184 tANI_U8 *paddIE;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001185
Jeff Johnson295189b2012-06-20 16:38:30 -07001186 union
1187 {
1188 tSirMicFailureInfo *pMICFailureInfo;
1189 tCsrRoamConnectedProfile *pConnectedProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -07001190 tSirWPSPBCProbeReq *pWPSPBCProbeReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001191 } u;
1192
Jeff Johnson295189b2012-06-20 16:38:30 -07001193 tANI_BOOLEAN wmmEnabledSta; //set to true if WMM enabled STA
1194 tANI_U32 dtimPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -07001195
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001196#ifdef FEATURE_WLAN_ESE
1197 tANI_BOOLEAN isESEAssoc;
1198#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001199 tSirTsmIE tsmIe;
1200 tANI_U32 timestamp[2];
1201 tANI_U16 tsmRoamDelay;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001202 tSirEseBcnReportRsp *pEseBcnReportRsp;
1203#endif /* FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001204#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001205 void* pRemainCtx;
Jeff Johnson295189b2012-06-20 16:38:30 -07001206 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07001207
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001208#ifdef FEATURE_WLAN_TDLS
1209 tANI_U8 staType;
1210#endif
1211
Jeff Johnson295189b2012-06-20 16:38:30 -07001212 // Required for indicating the frames to upper layer
1213 tANI_U32 beaconLength;
1214 tANI_U8* beaconPtr;
1215 tANI_U32 assocReqLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001216 tANI_U8* assocReqPtr;
Chilam NG571c65a2013-01-19 12:27:36 +05301217
1218 tANI_S8 rxRssi;
c_hpothu44ff4e02014-05-08 00:13:57 +05301219 tANI_U32 maxRateFlags;
Jeff Johnson295189b2012-06-20 16:38:30 -07001220}tCsrRoamInfo;
1221
Jeff Johnson295189b2012-06-20 16:38:30 -07001222typedef struct tagCsrFreqScanInfo
1223{
1224 tANI_U32 nStartFreq; //in unit of MHz
1225 tANI_U32 nEndFreq; //in unit of MHz
1226 tSirScanType scanType;
1227}tCsrFreqScanInfo;
1228
1229
Jeff Johnson295189b2012-06-20 16:38:30 -07001230typedef struct sSirSmeAssocIndToUpperLayerCnf
1231{
1232 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1233 tANI_U16 length;
1234 tANI_U8 sessionId;
1235 tSirResultCodes statusCode;
1236 tSirMacAddr bssId; // Self BSSID
1237 tSirMacAddr peerMacAddr;
1238 tANI_U16 aid;
1239 tSirMacAddr alternateBssId;
1240 tANI_U8 alternateChannelId;
1241 tANI_U8 wmmEnabledSta; //set to true if WMM enabled STA
1242 tSirRSNie rsnIE; // RSN IE received from peer
1243 tSirAddie addIE; // Additional IE received from peer, which can be WSC and/or P2P IE
1244 tANI_U8 reassocReq; //set to true if reassoc
1245} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
Jeff Johnson295189b2012-06-20 16:38:30 -07001246
1247typedef struct tagCsrSummaryStatsInfo
1248{
1249 tANI_U32 retry_cnt[4];
1250 tANI_U32 multiple_retry_cnt[4];
1251 tANI_U32 tx_frm_cnt[4];
1252 //tANI_U32 num_rx_frm_crc_err; same as rx_error_cnt
1253 //tANI_U32 num_rx_frm_crc_ok; same as rx_frm_cnt
1254 tANI_U32 rx_frm_cnt;
1255 tANI_U32 frm_dup_cnt;
1256 tANI_U32 fail_cnt[4];
1257 tANI_U32 rts_fail_cnt;
1258 tANI_U32 ack_fail_cnt;
1259 tANI_U32 rts_succ_cnt;
1260 tANI_U32 rx_discard_cnt;
1261 tANI_U32 rx_error_cnt;
1262 tANI_U32 tx_byte_cnt;
1263
1264}tCsrSummaryStatsInfo;
1265
1266typedef struct tagCsrGlobalClassAStatsInfo
1267{
1268 tANI_U32 rx_frag_cnt;
1269 tANI_U32 promiscuous_rx_frag_cnt;
1270 //tANI_U32 rx_fcs_err;
1271 tANI_U32 rx_input_sensitivity;
1272 tANI_U32 max_pwr;
1273 //tANI_U32 default_pwr;
1274 tANI_U32 sync_fail_cnt;
1275 tANI_U32 tx_rate;
1276 //mcs index for HT20 and HT40 rates
1277 tANI_U32 mcs_index;
1278 //to defferentiate between HT20 and HT40 rates;short and long guard interval
1279 tANI_U32 tx_rate_flags;
1280
1281}tCsrGlobalClassAStatsInfo;
1282
1283typedef struct tagCsrGlobalClassBStatsInfo
1284{
1285 tANI_U32 uc_rx_wep_unencrypted_frm_cnt;
1286 tANI_U32 uc_rx_mic_fail_cnt;
1287 tANI_U32 uc_tkip_icv_err;
1288 tANI_U32 uc_aes_ccmp_format_err;
1289 tANI_U32 uc_aes_ccmp_replay_cnt;
1290 tANI_U32 uc_aes_ccmp_decrpt_err;
1291 tANI_U32 uc_wep_undecryptable_cnt;
1292 tANI_U32 uc_wep_icv_err;
1293 tANI_U32 uc_rx_decrypt_succ_cnt;
1294 tANI_U32 uc_rx_decrypt_fail_cnt;
1295 tANI_U32 mcbc_rx_wep_unencrypted_frm_cnt;
1296 tANI_U32 mcbc_rx_mic_fail_cnt;
1297 tANI_U32 mcbc_tkip_icv_err;
1298 tANI_U32 mcbc_aes_ccmp_format_err;
1299 tANI_U32 mcbc_aes_ccmp_replay_cnt;
1300 tANI_U32 mcbc_aes_ccmp_decrpt_err;
1301 tANI_U32 mcbc_wep_undecryptable_cnt;
1302 tANI_U32 mcbc_wep_icv_err;
1303 tANI_U32 mcbc_rx_decrypt_succ_cnt;
1304 tANI_U32 mcbc_rx_decrypt_fail_cnt;
1305
1306}tCsrGlobalClassBStatsInfo;
1307
1308typedef struct tagCsrGlobalClassCStatsInfo
1309{
1310 tANI_U32 rx_amsdu_cnt;
1311 tANI_U32 rx_ampdu_cnt;
1312 tANI_U32 tx_20_frm_cnt;
1313 tANI_U32 rx_20_frm_cnt;
1314 tANI_U32 rx_mpdu_in_ampdu_cnt;
1315 tANI_U32 ampdu_delimiter_crc_err;
1316
1317}tCsrGlobalClassCStatsInfo;
1318
1319typedef struct tagCsrGlobalClassDStatsInfo
1320{
1321 tANI_U32 tx_uc_frm_cnt;
1322 tANI_U32 tx_mc_frm_cnt;
1323 tANI_U32 tx_bc_frm_cnt;
1324 tANI_U32 rx_uc_frm_cnt;
1325 tANI_U32 rx_mc_frm_cnt;
1326 tANI_U32 rx_bc_frm_cnt;
1327 tANI_U32 tx_uc_byte_cnt[4];
1328 tANI_U32 tx_mc_byte_cnt;
1329 tANI_U32 tx_bc_byte_cnt;
1330 tANI_U32 rx_uc_byte_cnt[4];
1331 tANI_U32 rx_mc_byte_cnt;
1332 tANI_U32 rx_bc_byte_cnt;
1333 tANI_U32 rx_byte_cnt;
1334 tANI_U32 num_rx_bytes_crc_ok;
1335 tANI_U32 rx_rate;
1336
1337}tCsrGlobalClassDStatsInfo;
1338
1339typedef struct tagCsrPerStaStatsInfo
1340{
1341 tANI_U32 tx_frag_cnt[4];
1342 tANI_U32 tx_ampdu_cnt;
1343 tANI_U32 tx_mpdu_in_ampdu_cnt;
1344} tCsrPerStaStatsInfo;
1345
1346typedef struct tagCsrRoamSetKey
1347{
1348 eCsrEncryptionType encType;
1349 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
1350 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1351 tANI_U8 paeRole; //0 for supplicant
1352 tANI_U8 keyId; // Kye index
1353 tANI_U16 keyLength; //Number of bytes containing the key in pKey
1354 tANI_U8 Key[CSR_MAX_KEY_LEN];
1355 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
1356} tCsrRoamSetKey;
1357
1358typedef struct tagCsrRoamRemoveKey
1359{
1360 eCsrEncryptionType encType;
1361 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1362 tANI_U8 keyId; //key index
1363} tCsrRoamRemoveKey;
1364
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001365#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05301366
1367typedef struct tagCsrLinkEstablishParams
1368{
1369 tSirMacAddr peerMac;
1370 tANI_U8 uapsdQueues;
1371 tANI_U8 maxSp;
1372 tANI_U8 isBufSta;
Naresh Jayaramdff88f92014-02-12 21:44:29 +05301373 tANI_U8 isOffChannelSupported;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05301374 tANI_U8 isResponder;
Naresh Jayaramdff88f92014-02-12 21:44:29 +05301375 tANI_U8 supportedChannelsLen;
1376 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
1377 tANI_U8 supportedOperClassesLen;
1378 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05301379}tCsrTdlsLinkEstablishParams;
1380
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001381typedef struct tagCsrTdlsSendMgmt
1382{
1383 tSirMacAddr peerMac;
1384 tANI_U8 frameType;
1385 tANI_U8 dialog;
1386 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08001387 tANI_U8 responder;
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05301388 tANI_U32 peerCapability;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001389 tANI_U8 *buf;
1390 tANI_U8 len;
1391
1392}tCsrTdlsSendMgmt;
1393
1394#ifdef FEATURE_WLAN_TDLS_INTERNAL
1395typedef struct tagCsrTdlsDisRequest
1396{
1397 tSirMacAddr peerMac;
1398 tANI_U8 disType;
1399}tCsrTdlsDisRequest;
1400
1401typedef struct tagCsrTdlsSetupRequest
1402{
1403 tSirMacAddr peerMac;
1404 tANI_U8 linkIndex;
1405}tCsrTdlsSetupRequest;
1406
1407typedef struct tagCsrTdlsTeardownRequest
1408{
1409 tSirMacAddr peerMac;
1410 tANI_U8 linkIndex;
1411}tCsrTdlsTeardownRequest ;
1412#endif
1413#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001414
1415typedef void * tScanResultHandle;
1416
1417#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
1418
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001419#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1420typedef struct tagCsrHandoffRequest
1421{
1422 tCsrBssid bssid;
1423 tANI_U8 channel;
1424}tCsrHandoffRequest;
1425#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001426
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001427#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
1428typedef struct tagCsrEseBeaconReqParams
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001429{
1430 tANI_U16 measurementToken;
1431 tANI_U8 channel;
1432 tANI_U8 scanMode;
1433 tANI_U16 measurementDuration;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001434} tCsrEseBeaconReqParams, *tpCsrEseBeaconReqParams;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001435
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001436typedef struct tagCsrEseBeaconReq
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001437{
1438 tANI_U8 numBcnReqIe;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001439 tCsrEseBeaconReqParams bcnReq[SIR_ESE_MAX_MEAS_IE_REQS];
1440} tCsrEseBeaconReq, *tpCsrEseBeaconReq;
1441#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001442
1443////////////////////////////////////////////Common SCAN starts
1444
1445//void *p2 -- the second context pass in for the caller
1446//***what if callback is called before requester gets the scanId??
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001447typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2, tANI_U32 scanID, eCsrScanStatus status);
Jeff Johnson295189b2012-06-20 16:38:30 -07001448
1449
1450
1451///////////////////////////////////////////Common Roam starts
1452
1453//pContext is the pContext passed in with the roam request
1454//pParam is a pointer to a tCsrRoamInfo, see definition of eRoamCmdStatus and
1455// eRoamCmdResult for detail valid members. It may be NULL
1456//roamId is to identify the callback related roam request. 0 means unsolicit
1457//roamStatus is a flag indicating the status of the callback
1458//roamResult is the result
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001459typedef eHalStatus (*csrRoamCompleteCallback)(void *pContext, tCsrRoamInfo *pParam, tANI_U32 roamId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001460 eRoamCmdStatus roamStatus, eCsrRoamResult roamResult);
1461
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001462typedef eHalStatus (*csrRoamSessionCloseCallback)(void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -07001463
1464/* ---------------------------------------------------------------------------
1465 \fn csrRoamGetNumPMKIDCache
1466 \brief return number of PMKID cache entries
1467 \return tANI_U32 - the number of PMKID cache entries
1468 -------------------------------------------------------------------------------*/
1469//tANI_U32 csrRoamGetNumPMKIDCache(tHalHandle hHal);
1470
1471/* ---------------------------------------------------------------------------
1472 \fn csrRoamGetPMKIDCache
1473 \brief return PMKID cache from CSR
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001474 \param pNum - caller allocated memory that has the space of the number of pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the
Jeff Johnson295189b2012-06-20 16:38:30 -07001475 needed or actually number in tPmkidCacheInfo.
1476 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return
1477 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1478 -------------------------------------------------------------------------------*/
1479//eHalStatus csrRoamGetPMKIDCache(tHalHandle hHal, tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache);
1480
1481//pProfile - pointer to tCsrRoamProfile
1482#define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == (pProfile)->BSSType)
1483#define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == (pProfile)->BSSType)
1484#define CSR_IS_IBSS(pProfile) ( CSR_IS_START_IBSS(pProfile) || CSR_IS_JOIN_TO_IBSS(pProfile) )
1485#define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == (pProfile)->BSSType)
1486#define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == (pProfile)->BSSType)
1487#define CSR_IS_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1488#define CSR_IS_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1489#define CSR_IS_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
Jeff Johnson295189b2012-06-20 16:38:30 -07001490#define CSR_IS_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
Jeff Johnson295189b2012-06-20 16:38:30 -07001491
1492//pProfile - pointer to tCsrRoamConnectedProfile
Jeff Johnson295189b2012-06-20 16:38:30 -07001493#define CSR_IS_CONN_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
Jeff Johnson295189b2012-06-20 16:38:30 -07001494#define CSR_IS_CONN_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1495#define CSR_IS_CONN_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1496#define CSR_IS_CONN_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
1497
1498
1499
1500///////////////////////////////////////////Common Roam ends
1501
1502
Jeff Johnson295189b2012-06-20 16:38:30 -07001503/* ---------------------------------------------------------------------------
1504 \fn csrSetChannels
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001505 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001506 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1507 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001508 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001509 -------------------------------------------------------------------------------*/
1510
1511eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam );
1512
1513eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
Jeff Johnson295189b2012-06-20 16:38:30 -07001514
1515
1516//enum to string conversion for debug output
1517const char * get_eRoamCmdStatus_str(eRoamCmdStatus val);
1518const char * get_eCsrRoamResult_str(eCsrRoamResult val);
1519/* ---------------------------------------------------------------------------
1520 \fn csrSetPhyMode
1521 \brief HDD calls this function to set the phyMode.
1522 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1523 CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001524 \param phyMode - indicate the phyMode needs to set to. The value has to be either 0, or some bits set.
Jeff Johnson295189b2012-06-20 16:38:30 -07001525 See eCsrPhyMode for definition
1526 \param eBand - specify the operational band (2.4, 5 or both)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001527 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
Jeff Johnson295189b2012-06-20 16:38:30 -07001528 a restart is needed to apply the change
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001529 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001530 -------------------------------------------------------------------------------*/
1531eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI_BOOLEAN *pfRestartNeeded);
1532
1533void csrDumpInit(tHalHandle hHal);
1534
1535
1536/*---------------------------------------------------------------------------
1537 This is the type for a link quality callback to be registered with SME
1538 for indications
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001539 Once the link quality has been indicated, subsequently, link indications are
Jeff Johnson295189b2012-06-20 16:38:30 -07001540 posted each time there is a CHANGE in link quality.
1541 *** If there is no change in link, there will be no indication ***
1542
1543 The indications may be based on one or more criteria internal to SME
1544 such as RSSI and PER.
1545
1546 \param ind - Indication being posted
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001547 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001548 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001549
Jeff Johnson295189b2012-06-20 16:38:30 -07001550---------------------------------------------------------------------------*/
1551typedef void (* csrRoamLinkQualityIndCallback)
1552 (eCsrRoamLinkQualityInd ind, void *pContext);
1553
1554
1555/*---------------------------------------------------------------------------
1556 This is the type for a statistics callback to be registered with SME
1557 for stats reporting
1558
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001559 Since the client requesting for the stats already know which class/type of
1560 stats it asked for, the callback will carry them in the rsp buffer
1561 (void * stats) whose size will be same as the size of requested stats &
Jeff Johnson295189b2012-06-20 16:38:30 -07001562 will be exactly in the same order requested in the stats mask from LSB to MSB
1563
1564 \param stats - stats rsp buffer sent back with the report
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001565 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001566 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001567
Jeff Johnson295189b2012-06-20 16:38:30 -07001568---------------------------------------------------------------------------*/
1569typedef void ( *tCsrStatsCallback) (void * stats, void *pContext);
1570
1571/*---------------------------------------------------------------------------
1572 This is the type for a rssi callback to be registered with SME
1573 for getting rssi
1574
1575 \param rssi - rssi
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001576 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001577 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001578
Jeff Johnson295189b2012-06-20 16:38:30 -07001579---------------------------------------------------------------------------*/
1580
1581typedef void ( *tCsrRssiCallback) (v_S7_t rssi, tANI_U32 staId, void *pContext);
1582
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001583
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001584#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001585/*---------------------------------------------------------------------------
1586 This is the type for a tsm stats callback to be registered with SME
1587 for getting tsm stats
1588
1589 \param tsmMetrics - tsmMetrics
1590 \param pContext - any user data given at callback registration.
1591 \return None
1592
1593---------------------------------------------------------------------------*/
1594
1595typedef void ( *tCsrTsmStatsCallback) (tAniTrafStrmMetrics tsmMetrics, tANI_U32 staId, void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001596#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001597
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301598/*---------------------------------------------------------------------------
1599 This is the type for a snr callback to be registered with SME
1600 for getting snr
1601
1602 \param snr
1603 \param pContext - any user data given at callback registration.
1604 \return None
1605
1606---------------------------------------------------------------------------*/
1607typedef void (*tCsrSnrCallback) (v_S7_t snr, tANI_U32 staId, void *pContext);
1608
Jeff Johnson295189b2012-06-20 16:38:30 -07001609#ifdef WLAN_FEATURE_VOWIFI_11R
1610eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBssDescription pBssDescription);
1611#endif
1612
1613/*---------------------------------------------------------------------------
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001614 This is the function to change the Band configuraiton (ALL/2.4 GHZ/5 GHZ)
Jeff Johnson295189b2012-06-20 16:38:30 -07001615
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001616 \param hHal - handle to Hal context
Jeff Johnson295189b2012-06-20 16:38:30 -07001617 \param eBand - band value
1618 \return eHalStatus
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001619
Jeff Johnson295189b2012-06-20 16:38:30 -07001620---------------------------------------------------------------------------*/
1621eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand);
1622
1623/*---------------------------------------------------------------------------
1624 This is the function to get the current operating band value
1625 \param hHal - handl to Hal context
1626 \return eCsrband - band value
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001627
Jeff Johnson295189b2012-06-20 16:38:30 -07001628---------------------------------------------------------------------------*/
1629eCsrBand csrGetCurrentBand (tHalHandle hHal);
1630
1631#endif
1632