blob: cd4c8b6992522676538258aa17ee9fb77a3f9480 [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"
42
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080043typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -070044{
45 eCSR_AUTH_TYPE_NONE, //never used
46 // MAC layer authentication types
47 eCSR_AUTH_TYPE_OPEN_SYSTEM,
48 eCSR_AUTH_TYPE_SHARED_KEY,
49 eCSR_AUTH_TYPE_AUTOSWITCH,
50
51 // Upper layer authentication types
52 eCSR_AUTH_TYPE_WPA,
53 eCSR_AUTH_TYPE_WPA_PSK,
54 eCSR_AUTH_TYPE_WPA_NONE,
55
56 eCSR_AUTH_TYPE_RSN,
57 eCSR_AUTH_TYPE_RSN_PSK,
58#if defined WLAN_FEATURE_VOWIFI_11R
59 eCSR_AUTH_TYPE_FT_RSN,
60 eCSR_AUTH_TYPE_FT_RSN_PSK,
61#endif
62#ifdef FEATURE_WLAN_WAPI
63 eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
64 eCSR_AUTH_TYPE_WAPI_WAI_PSK,
65#endif /* FEATURE_WLAN_WAPI */
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080066#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -070067 eCSR_AUTH_TYPE_CCKM_WPA,
68 eCSR_AUTH_TYPE_CCKM_RSN,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080069#endif /* FEATURE_WLAN_ESE */
Chet Lanctot186b5732013-03-18 10:26:30 -070070#ifdef WLAN_FEATURE_11W
71 eCSR_AUTH_TYPE_RSN_PSK_SHA256,
72#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070073 eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
74 eCSR_AUTH_TYPE_FAILED = 0xff,
75 eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
76
77}eCsrAuthType;
78
79
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -080080typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -070081{
82 eCSR_ENCRYPT_TYPE_NONE,
83 eCSR_ENCRYPT_TYPE_WEP40_STATICKEY,
84 eCSR_ENCRYPT_TYPE_WEP104_STATICKEY,
85
86 eCSR_ENCRYPT_TYPE_WEP40,
87 eCSR_ENCRYPT_TYPE_WEP104,
88 eCSR_ENCRYPT_TYPE_TKIP,
89 eCSR_ENCRYPT_TYPE_AES,
90#ifdef FEATURE_WLAN_WAPI
91 eCSR_ENCRYPT_TYPE_WPI, //WAPI
92#endif /* FEATURE_WLAN_WAPI */
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080093#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -070094 eCSR_ENCRYPT_TYPE_KRK,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -080095#endif /* FEATURE_WLAN_ESE */
Jeff Johnson295189b2012-06-20 16:38:30 -070096#ifdef WLAN_FEATURE_11W
97 //11w BIP
98 eCSR_ENCRYPT_TYPE_AES_CMAC,
99#endif
100 eCSR_ENCRYPT_TYPE_ANY,
101 eCSR_NUM_OF_ENCRYPT_TYPE = eCSR_ENCRYPT_TYPE_ANY,
102
103 eCSR_ENCRYPT_TYPE_FAILED = 0xff,
104 eCSR_ENCRYPT_TYPE_UNKNOWN = eCSR_ENCRYPT_TYPE_FAILED,
105
106}eCsrEncryptionType;
107
108/*---------------------------------------------------------------------------
109 Enumeration of the various Security types
110---------------------------------------------------------------------------*/
111typedef enum
112{
113 eCSR_SECURITY_TYPE_WPA,
114 eCSR_SECURITY_TYPE_RSN,
115#ifdef FEATURE_WLAN_WAPI
116 eCSR_SECURITY_TYPE_WAPI,
117#endif /* FEATURE_WLAN_WAPI */
118 eCSR_SECURITY_TYPE_UNKNOWN,
119
120}eCsrSecurityType;
121
122typedef enum
123{
124 eCSR_DOT11_MODE_TAURUS = 0, //This mean everything because it covers all thing we support
125 eCSR_DOT11_MODE_abg = 0x0001, //11a/b/g only, no HT, no proprietary
126 eCSR_DOT11_MODE_11a = 0x0002,
127 eCSR_DOT11_MODE_11b = 0x0004,
128 eCSR_DOT11_MODE_11g = 0x0008,
129 eCSR_DOT11_MODE_11n = 0x0010,
130 eCSR_DOT11_MODE_POLARIS = 0x0020,
131 eCSR_DOT11_MODE_TITAN = 0x0040,
132 eCSR_DOT11_MODE_11g_ONLY = 0x0080,
133 eCSR_DOT11_MODE_11n_ONLY = 0x0100,
134 eCSR_DOT11_MODE_TAURUS_ONLY = 0x0200,
135 eCSR_DOT11_MODE_11b_ONLY = 0x0400,
136 eCSR_DOT11_MODE_11a_ONLY = 0x0800,
Jeff Johnsone7245742012-09-05 17:12:55 -0700137#ifdef WLAN_FEATURE_11AC
138 eCSR_DOT11_MODE_11ac = 0x1000,
139 eCSR_DOT11_MODE_11ac_ONLY = 0x2000,
140#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700141 //This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL except when it starts IBSS in 11B of 2.4GHz
142 //It is for CSR internal use
Jeff Johnsone7245742012-09-05 17:12:55 -0700143 eCSR_DOT11_MODE_AUTO = 0x4000,
Jeff Johnson295189b2012-06-20 16:38:30 -0700144
145 eCSR_NUM_PHY_MODE = 16, //specify the number of maximum bits for phyMode
146}eCsrPhyMode;
147
148
149typedef tANI_U8 tCsrBssid[WNI_CFG_BSSID_LEN];
150
151typedef enum
152{
Varun Reddy Yeturu2cc78922013-04-10 11:50:02 -0700153 eCSR_BSS_TYPE_NONE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700154 eCSR_BSS_TYPE_INFRASTRUCTURE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700155 eCSR_BSS_TYPE_INFRA_AP, // SoftAP AP
Jeff Johnson295189b2012-06-20 16:38:30 -0700156 eCSR_BSS_TYPE_IBSS, // an IBSS network we will NOT start
157 eCSR_BSS_TYPE_START_IBSS, // an IBSS network we will start if no partners detected.
158 eCSR_BSS_TYPE_WDS_AP, // BT-AMP AP
159 eCSR_BSS_TYPE_WDS_STA, // BT-AMP station
160 eCSR_BSS_TYPE_ANY, // any BSS type (IBSS or Infrastructure).
161}eCsrRoamBssType;
162
163
164
165typedef enum {
166 eCSR_SCAN_REQUEST_11D_SCAN = 1,
167 eCSR_SCAN_REQUEST_FULL_SCAN,
168 eCSR_SCAN_IDLE_MODE_SCAN,
169 eCSR_SCAN_HO_BG_SCAN, // bg scan request in NRT & RT Handoff sub-states
170 eCSR_SCAN_HO_PROBE_SCAN, // directed probe on an entry from the candidate list
171 eCSR_SCAN_HO_NT_BG_SCAN, // bg scan request in NT sub-state
172 eCSR_SCAN_P2P_DISCOVERY,
173
174 eCSR_SCAN_SOFTAP_CHANNEL_RANGE,
175 eCSR_SCAN_P2P_FIND_PEER,
176}eCsrRequestType;
177
178typedef enum {
179 eCSR_SCAN_RESULT_GET = 0,
180 eCSR_SCAN_RESULT_FLUSH = 1, //to delete all cached scan results
181}eCsrScanResultCmd;
182
183typedef enum
184{
185 eCSR_SCAN_SUCCESS,
186 eCSR_SCAN_FAILURE,
187 eCSR_SCAN_ABORT,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800188 eCSR_SCAN_FOUND_PEER,
Jeff Johnson295189b2012-06-20 16:38:30 -0700189}eCsrScanStatus;
190
Srinivas, Dasari138af4f2014-02-07 11:13:45 +0530191/* Reason to abort the scan
192 * The reason can used later to decide whether to update the scan results
193 * to upper layer or not
194 */
195typedef enum
196{
197 eCSR_SCAN_ABORT_DEFAULT,
198 eCSR_SCAN_ABORT_DUE_TO_BAND_CHANGE, //Scan aborted due to band change
199}eCsrAbortReason;
200
Jeff Johnson295189b2012-06-20 16:38:30 -0700201#define CSR_SCAN_TIME_DEFAULT 0
202#define CSR_VALUE_IGNORED 0xFFFFFFFF
203#define CSR_RSN_PMKID_SIZE 16
204#define CSR_MAX_PMKID_ALLOWED 16
205#define CSR_WEP40_KEY_LEN 5
206#define CSR_WEP104_KEY_LEN 13
207#define CSR_TKIP_KEY_LEN 32
208#define CSR_AES_KEY_LEN 16
209#define CSR_MAX_TX_POWER ( WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX )
210#define CSR_MAX_RSC_LEN 16
211#ifdef FEATURE_WLAN_WAPI
212#define CSR_WAPI_BKID_SIZE 16
213#define CSR_MAX_BKID_ALLOWED 16
214#define CSR_WAPI_KEY_LEN 32
215#define CSR_MAX_KEY_LEN ( CSR_WAPI_KEY_LEN ) //longest one is for WAPI
216#else
217#define CSR_MAX_KEY_LEN ( CSR_TKIP_KEY_LEN ) //longest one is for TKIP
218#endif /* FEATURE_WLAN_WAPI */
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800219#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700220#define CSR_KRK_KEY_LEN 16
221#endif
222
223
224
225typedef struct tagCsrChannelInfo
226{
227 tANI_U8 numOfChannels;
228 tANI_U8 *ChannelList; //it will be an array of channels
Madan Mohan Koyyalamudidd3c9662012-11-09 17:39:30 -0800229}tCsrChannelInfo, *tpCsrChannelInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700230
231typedef struct tagCsrSSIDInfo
232{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800233 tSirMacSSid SSID;
Jeff Johnson295189b2012-06-20 16:38:30 -0700234 tANI_BOOLEAN handoffPermitted;
235 tANI_BOOLEAN ssidHidden;
236}tCsrSSIDInfo;
237
238typedef struct tagCsrSSIDs
239{
240 tANI_U32 numOfSSIDs;
241 tCsrSSIDInfo *SSIDList; //To be allocated for array of SSIDs
242}tCsrSSIDs;
243
244typedef struct tagCsrBSSIDs
245{
246 tANI_U32 numOfBSSIDs;
247 tCsrBssid *bssid;
248}tCsrBSSIDs;
249
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800250typedef struct tagCsrStaParams
251{
252 tANI_U16 capability;
253 tANI_U8 extn_capability[SIR_MAC_MAX_EXTN_CAP];
254 tANI_U8 supported_rates_len;
255 tANI_U8 supported_rates[SIR_MAC_MAX_SUPP_RATES];
Hoonki Lee66b75f32013-04-16 18:30:07 -0700256 tANI_U8 htcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800257 tSirHTCap HTCap;
Hoonki Lee66b75f32013-04-16 18:30:07 -0700258 tANI_U8 vhtcap_present;
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800259 tSirVHTCap VHTCap;
260 tANI_U8 uapsd_queues;
261 tANI_U8 max_sp;
Naresh Jayaramdff88f92014-02-12 21:44:29 +0530262 tANI_U8 supported_channels_len;
263 tANI_U8 supported_channels[SIR_MAC_MAX_SUPP_CHANNELS];
264 tANI_U8 supported_oper_classes_len;
265 tANI_U8 supported_oper_classes[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800266}tCsrStaParams;
Jeff Johnson295189b2012-06-20 16:38:30 -0700267
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800268typedef struct tagCsrScanRequest
Jeff Johnson295189b2012-06-20 16:38:30 -0700269{
270 tSirScanType scanType;
271 tCsrBssid bssid;
272 eCsrRoamBssType BSSType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800273 tCsrSSIDs SSIDs;
Jeff Johnson295189b2012-06-20 16:38:30 -0700274 tCsrChannelInfo ChannelInfo;
275 tANI_U32 minChnTime; //in units of milliseconds
276 tANI_U32 maxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800277 tANI_U32 minChnTimeBtc; //in units of milliseconds
278 tANI_U32 maxChnTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700279 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
280 tANI_U32 uIEFieldLen;
281 tANI_U8 *pIEField;
282 eCsrRequestType requestType; //11d scan or full scan
Jeff Johnson295189b2012-06-20 16:38:30 -0700283 tANI_BOOLEAN p2pSearch;
Jeff Johnsone7245742012-09-05 17:12:55 -0700284 tANI_BOOLEAN skipDfsChnlInP2pSearch;
Madan Mohan Koyyalamudi04a65f02013-07-26 13:58:38 +0530285 tANI_BOOLEAN bcnRptReqScan; //is Scan issued by Beacon Report Request
Jeff Johnson295189b2012-06-20 16:38:30 -0700286}tCsrScanRequest;
287
288typedef struct tagCsrBGScanRequest
289{
290 tSirScanType scanType;
291 tSirMacSSid SSID;
292 tCsrChannelInfo ChannelInfo;
293 tANI_U32 scanInterval; //in units of milliseconds
294 tANI_U32 minChnTime; //in units of milliseconds
295 tANI_U32 maxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800296 tANI_U32 minChnTimeBtc; //in units of milliseconds
297 tANI_U32 maxChnTimeBtc; //in units of milliseconds
Jeff Johnson295189b2012-06-20 16:38:30 -0700298 tANI_U32 restTime; //in units of milliseconds //ignored when not connected
299 tANI_U32 throughputImpact; //specify whether BG scan cares about impacting throughput //ignored when not connected
300 tCsrBssid bssid; //how to use it?? Apple
Srikant Kuppa866893f2012-12-27 17:28:14 -0800301}tCsrBGScanRequest, *tpCsrBGScanRequest;
Jeff Johnson295189b2012-06-20 16:38:30 -0700302
303
304typedef struct tagCsrScanResultInfo
305{
306 //Carry the IEs for the current BSSDescription. A pointer to tDot11fBeaconIEs. Maybe NULL for start BSS.
307 void *pvIes;
308 tAniSSID ssId;
309 v_TIME_t timer; // timer is variable which is used for hidden SSID's timer value
310 //This member must be the last in the structure because the end of tSirBssDescription is an
311 // array with nonknown size at this time
312 tSirBssDescription BssDescriptor;
313}tCsrScanResultInfo;
314
315typedef struct tagCsrEncryptionList
316{
317
318 tANI_U32 numEntries;
319 eCsrEncryptionType encryptionType[eCSR_NUM_OF_ENCRYPT_TYPE];
320
321}tCsrEncryptionList, *tpCsrEncryptionList;
322
323typedef struct tagCsrAuthList
324{
325 tANI_U32 numEntries;
326 eCsrAuthType authType[eCSR_NUM_OF_SUPPORT_AUTH_TYPE];
327}tCsrAuthList, *tpCsrAuthList;
328
329#ifdef WLAN_FEATURE_VOWIFI_11R
330typedef struct tagCsrMobilityDomainInfo
331{
332 tANI_U8 mdiePresent;
333 tANI_U16 mobilityDomain;
334} tCsrMobilityDomainInfo;
335#endif
336
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800337#ifdef FEATURE_WLAN_ESE
338typedef struct tagCsrEseCckmInfo
Jeff Johnson295189b2012-06-20 16:38:30 -0700339{
340 tANI_U32 reassoc_req_num;
341 tANI_BOOLEAN krk_plumbed;
342 tANI_U8 krk[CSR_KRK_KEY_LEN];
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800343} tCsrEseCckmInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700344#endif
345
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800346#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700347#define CSR_DOT11F_IE_RSN_MAX_LEN (114) /*TODO: duplicate one in dot11f.h */
348
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800349typedef struct tagCsrEseCckmIe
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700350{
351 tANI_U8 cckmIe[CSR_DOT11F_IE_RSN_MAX_LEN];
352 tANI_U8 cckmIeLen;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800353} tCsrEseCckmIe;
354#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700355
356typedef struct tagCsrScanResultFilter
357{
358 tCsrBSSIDs BSSIDs; //each bssid has a length of WNI_CFG_BSSID_LEN (6)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800359 tCsrSSIDs SSIDs;
Jeff Johnson295189b2012-06-20 16:38:30 -0700360 tCsrChannelInfo ChannelInfo;
361 tCsrAuthList authType;
362 tCsrEncryptionList EncryptionType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800363 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
Jeff Johnson295189b2012-06-20 16:38:30 -0700364 //put all supported encryption types in here
365 tCsrEncryptionList mcEncryptionType;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800366 eCsrRoamBssType BSSType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700367 //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800368 tANI_U32 phyMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700369 //If countryCode[0] is not 0, countryCode is checked independent of fCheckUnknownCountryCode
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800370 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN];
371 tANI_U8 uapsd_mask;
Jeff Johnson295189b2012-06-20 16:38:30 -0700372 /*For WPS filtering if true => auth and ecryption should be ignored*/
373 tANI_BOOLEAN bWPSAssociation;
Leela Venkata Kiran Kumar Reddy Chiralaf257bef2014-04-11 18:48:12 -0700374 tANI_BOOLEAN bOSENAssociation;
Jeff Johnson295189b2012-06-20 16:38:30 -0700375#if defined WLAN_FEATURE_VOWIFI
376 /*For measurement reports --> if set, only SSID, BSSID and channel is considered for filtering.*/
377 tANI_BOOLEAN fMeasurement;
378#endif
379#ifdef WLAN_FEATURE_VOWIFI_11R
380 tCsrMobilityDomainInfo MDID;
381#endif
382 tANI_BOOLEAN p2pResult;
383}tCsrScanResultFilter;
384
385
386typedef struct sCsrChnPower_
387{
388 tANI_U8 firstChannel;
389 tANI_U8 numChannels;
390 tANI_U8 maxtxPower;
391}sCsrChnPower;
392
393
394typedef struct sCsrChannel_
395{
396 tANI_U8 numChannels;
397 tANI_U8 channelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
398}sCsrChannel;
399
400
401typedef struct tagCsr11dinfo
402{
403 sCsrChannel Channels;
404 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN+1];
405 //max power channel list
406 sCsrChnPower ChnPower[WNI_CFG_VALID_CHANNEL_LIST_LEN];
407}tCsr11dinfo;
408
409
410typedef enum
411{
412 eCSR_ROAM_CANCELLED = 1,
413 //this mean error happens before association_start or roaming_start is called.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800414 eCSR_ROAM_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700415 //a CSR trigger roaming operation starts, callback may get a pointer to tCsrConnectedProfile
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800416 eCSR_ROAM_ROAMING_START,
Jeff Johnson295189b2012-06-20 16:38:30 -0700417 //a CSR trigger roaming operation is completed
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800418 eCSR_ROAM_ROAMING_COMPLETION,
Jeff Johnson295189b2012-06-20 16:38:30 -0700419 //Connection completed status.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800420 eCSR_ROAM_CONNECT_COMPLETION,
421 //an association or start_IBSS operation starts,
422 //callback may get a pointer to tCsrRoamProfile and a pointer to tSirBssDescription
423 eCSR_ROAM_ASSOCIATION_START,
424 //a roaming operation is finish, see eCsrRoamResult for
Jeff Johnson295189b2012-06-20 16:38:30 -0700425 //possible data passed back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800426 eCSR_ROAM_ASSOCIATION_COMPLETION,
Jeff Johnson295189b2012-06-20 16:38:30 -0700427 eCSR_ROAM_DISASSOCIATED,
428 eCSR_ROAM_ASSOCIATION_FAILURE,
429 //when callback with this flag. callback gets a pointer to the BSS desc.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800430 eCSR_ROAM_SHOULD_ROAM,
Jeff Johnson295189b2012-06-20 16:38:30 -0700431 //A new candidate for PMKID is found
432 eCSR_ROAM_SCAN_FOUND_NEW_BSS,
433 //CSR is done lostlink roaming and still cannot reconnect
434 eCSR_ROAM_LOSTLINK,
435 //a link lost is detected. CSR starts roaming.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800436 eCSR_ROAM_LOSTLINK_DETECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700437 //TKIP MIC error detected, callback gets a pointer to tpSirSmeMicFailureInd
438 eCSR_ROAM_MIC_ERROR_IND,
439 eCSR_ROAM_IBSS_IND, //IBSS indications.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800440 //Update the connection status, useful for IBSS: new peer added, network is active etc.
441 eCSR_ROAM_CONNECT_STATUS_UPDATE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700442 eCSR_ROAM_GEN_INFO,
443 eCSR_ROAM_SET_KEY_COMPLETE,
444 eCSR_ROAM_REMOVE_KEY_COMPLETE,
445 eCSR_ROAM_IBSS_LEAVE, //IBSS indications.
446 //BSS in WDS mode status indication
447 eCSR_ROAM_WDS_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700448 //BSS in SoftAP mode status indication
449 eCSR_ROAM_INFRA_IND,
450 eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700451#ifdef WLAN_FEATURE_VOWIFI_11R
452 eCSR_ROAM_FT_RESPONSE,
453#endif
454 eCSR_ROAM_FT_START,
455 eCSR_ROAM_INDICATE_MGMT_FRAME,
456 eCSR_ROAM_REMAIN_CHAN_READY,
457 eCSR_ROAM_SEND_ACTION_CNF,
458 //this mean error happens before association_start or roaming_start is called.
459 eCSR_ROAM_SESSION_OPENED,
460 eCSR_ROAM_FT_REASSOC_FAILED,
Jeff Johnson04dd8a82012-06-29 20:41:40 -0700461#ifdef FEATURE_WLAN_LFR
462 eCSR_ROAM_PMK_NOTIFY,
463#endif
Yue Maef608272013-04-08 23:09:17 -0700464#ifdef FEATURE_WLAN_LFR_METRICS
465 eCSR_ROAM_PREAUTH_INIT_NOTIFY,
466 eCSR_ROAM_PREAUTH_STATUS_SUCCESS,
467 eCSR_ROAM_PREAUTH_STATUS_FAILURE,
468 eCSR_ROAM_HANDOVER_SUCCESS,
469#endif
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800470#ifdef FEATURE_WLAN_TDLS
471 eCSR_ROAM_TDLS_STATUS_UPDATE,
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800472 eCSR_ROAM_RESULT_MGMT_TX_COMPLETE_IND,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800473#endif
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800474 eCSR_ROAM_DISCONNECT_ALL_P2P_CLIENTS, //Disaconnect all the clients
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800475 eCSR_ROAM_SEND_P2P_STOP_BSS, //Stopbss triggered from SME due to different
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800476 // beacon interval
Chet Lanctot186b5732013-03-18 10:26:30 -0700477#ifdef WLAN_FEATURE_11W
478 eCSR_ROAM_UNPROT_MGMT_FRAME_IND,
479#endif
Madan Mohan Koyyalamudi167b95e2012-11-27 15:53:38 -0800480
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800481#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700482 eCSR_ROAM_TSM_IE_IND,
483 eCSR_ROAM_CCKM_PREAUTH_NOTIFY,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800484 eCSR_ROAM_ESE_ADJ_AP_REPORT_IND,
485 eCSR_ROAM_ESE_BCN_REPORT_IND,
486#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -0700487}eRoamCmdStatus;
488
489
490//comment inside indicates what roaming callback gets
491typedef enum
492{
493 eCSR_ROAM_RESULT_NONE,
494 //this means no more action in CSR
495 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION, tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800496 eCSR_ROAM_RESULT_FAILURE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700497 //Pass back pointer to tCsrRoamInfo
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800498 eCSR_ROAM_RESULT_ASSOCIATED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700499 eCSR_ROAM_RESULT_NOT_ASSOCIATED,
500 eCSR_ROAM_RESULT_MIC_FAILURE,
501 eCSR_ROAM_RESULT_FORCED,
502 eCSR_ROAM_RESULT_DISASSOC_IND,
503 eCSR_ROAM_RESULT_DEAUTH_IND,
504 eCSR_ROAM_RESULT_CAP_CHANGED,
505 //This means we starts an IBSS
506 //tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800507 eCSR_ROAM_RESULT_IBSS_STARTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700508 //START_BSS failed
509 //tCsrRoamInfo's pBssDesc may pass back
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800510 eCSR_ROAM_RESULT_IBSS_START_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700511 eCSR_ROAM_RESULT_IBSS_JOIN_SUCCESS,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800512 eCSR_ROAM_RESULT_IBSS_JOIN_FAILED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700513 eCSR_ROAM_RESULT_IBSS_CONNECT,
514 eCSR_ROAM_RESULT_IBSS_INACTIVE,
515 //If roamStatus is eCSR_ROAM_ASSOCIATION_COMPLETION
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800516 //tCsrRoamInfo's pBssDesc may pass back. and the peer's MAC address in peerMacOrBssid
517 //If roamStatus is eCSR_ROAM_IBSS_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700518 //the peer's MAC address in peerMacOrBssid and a beacon frame of the IBSS in pbFrames
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800519 eCSR_ROAM_RESULT_IBSS_NEW_PEER,
Jeff Johnson295189b2012-06-20 16:38:30 -0700520 //Peer departed from IBSS, Callback may get a pointer tSmeIbssPeerInd in pIbssPeerInd
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800521 eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700522 //Coalescing in the IBSS network (joined an IBSS network)
523 //Callback pass a BSSID in peerMacOrBssid
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800524 eCSR_ROAM_RESULT_IBSS_COALESCED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700525 //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 -0800526 eCSR_ROAM_RESULT_IBSS_STOP,
527 eCSR_ROAM_RESULT_LOSTLINK,
Jeff Johnson295189b2012-06-20 16:38:30 -0700528 eCSR_ROAM_RESULT_MIC_ERROR_UNICAST,
529 eCSR_ROAM_RESULT_MIC_ERROR_GROUP,
530 eCSR_ROAM_RESULT_AUTHENTICATED,
531 eCSR_ROAM_RESULT_NEW_RSN_BSS,
532#ifdef FEATURE_WLAN_WAPI
533 eCSR_ROAM_RESULT_NEW_WAPI_BSS,
534#endif /* FEATURE_WLAN_WAPI */
535 // WDS started successfully
536 eCSR_ROAM_RESULT_WDS_STARTED,
537 // WDS start failed
538 eCSR_ROAM_RESULT_WDS_START_FAILED,
539 // WDS stopped
540 eCSR_ROAM_RESULT_WDS_STOPPED,
541 // WDS joined successfully in STA mode
542 eCSR_ROAM_RESULT_WDS_ASSOCIATED,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800543 // A station joined WDS AP
Jeff Johnson295189b2012-06-20 16:38:30 -0700544 eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND,
545 // WDS join failed in STA mode
546 eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED,
547 // WDS disassociated
548 eCSR_ROAM_RESULT_WDS_DISASSOCIATED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700549 // INFRA started successfully
550 eCSR_ROAM_RESULT_INFRA_STARTED,
551 // INFRA start failed
552 eCSR_ROAM_RESULT_INFRA_START_FAILED,
553 // INFRA stopped
554 eCSR_ROAM_RESULT_INFRA_STOPPED,
555 // A station joining INFRA AP
556 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND,
557 // A station joined INFRA AP
558 eCSR_ROAM_RESULT_INFRA_ASSOCIATION_CNF,
559 // INFRA disassociated
560 eCSR_ROAM_RESULT_INFRA_DISASSOCIATED,
561 eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND,
Jeff Johnson295189b2012-06-20 16:38:30 -0700562 eCSR_ROAM_RESULT_SEND_ACTION_FAIL,
Jeff Johnson295189b2012-06-20 16:38:30 -0700563 // peer rejected assoc because max assoc limit reached. callback gets pointer to peer
564 eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED,
Jeff Johnsone7245742012-09-05 17:12:55 -0700565 //Assoc rejected due to concurrent session running on a different channel
566 eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800567#ifdef FEATURE_WLAN_TDLS
568 eCSR_ROAM_RESULT_ADD_TDLS_PEER,
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800569 eCSR_ROAM_RESULT_UPDATE_TDLS_PEER,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800570 eCSR_ROAM_RESULT_DELETE_TDLS_PEER,
Hoonki Leee6bfe942013-02-05 15:01:19 -0800571 eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND,
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800572 eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND,
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530573 eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800574#endif
575
Jeff Johnson295189b2012-06-20 16:38:30 -0700576}eCsrRoamResult;
577
578
579
580/*----------------------------------------------------------------------------
581 List of link quality indications HDD can receive from SME
582-----------------------------------------------------------------------------*/
583typedef enum
584{
585 eCSR_ROAM_LINK_QUAL_MIN_IND = -1,
586
587 eCSR_ROAM_LINK_QUAL_POOR_IND = 0, /* bad link */
588 eCSR_ROAM_LINK_QUAL_GOOD_IND = 1, /* acceptable for voice */
589 eCSR_ROAM_LINK_QUAL_VERY_GOOD_IND = 2, /* suitable for voice */
590 eCSR_ROAM_LINK_QUAL_EXCELLENT_IND = 3, /* suitable for voice */
591
592 eCSR_ROAM_LINK_QUAL_MAX_IND /* invalid value */
593
594} eCsrRoamLinkQualityInd;
595
596typedef enum
597{
598 eCSR_DISCONNECT_REASON_UNSPECIFIED = 0,
599 eCSR_DISCONNECT_REASON_MIC_ERROR,
600 eCSR_DISCONNECT_REASON_DISASSOC,
601 eCSR_DISCONNECT_REASON_DEAUTH,
602 eCSR_DISCONNECT_REASON_HANDOFF,
603 eCSR_DISCONNECT_REASON_IBSS_JOIN_FAILURE,
604 eCSR_DISCONNECT_REASON_IBSS_LEAVE,
605}eCsrRoamDisconnectReason;
606
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800607typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700608{
609 // Not associated in Infra or participating in an IBSS / Ad-hoc network.
610 eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED,
611 // Associated in an Infrastructure network.
612 eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED,
613 // Participating in an IBSS network though disconnected (no partner stations
614 // in the IBSS).
615 eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED,
616 // Participating in an IBSS network with partner stations also present
617 eCSR_ASSOC_STATE_TYPE_IBSS_CONNECTED,
618 // Participating in a WDS network in AP or STA mode but not connected yet
619 eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED,
620 // Participating in a WDS network and connected peer to peer
621 eCSR_ASSOC_STATE_TYPE_WDS_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700622 // Participating in a Infra network in AP not yet in connected state
623 eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED,
624 // Participating in a Infra network and connected to a peer
625 eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700626
627}eCsrConnectState;
628
629
630// This parameter is no longer supported in the Profile. Need to set this in the global properties
631// for the adapter.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800632typedef enum eCSR_MEDIUM_ACCESS
Jeff Johnson295189b2012-06-20 16:38:30 -0700633{
634 eCSR_MEDIUM_ACCESS_AUTO = 0,
635 eCSR_MEDIUM_ACCESS_DCF,
636 eCSR_MEDIUM_ACCESS_eDCF,
637 eCSR_MEDIUM_ACCESS_HCF,
638
639 eCSR_MEDIUM_ACCESS_WMM_eDCF_802dot1p,
640 eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP,
641 eCSR_MEDIUM_ACCESS_WMM_eDCF_NoClassify,
642 eCSR_MEDIUM_ACCESS_11e_eDCF = eCSR_MEDIUM_ACCESS_eDCF,
643 eCSR_MEDIUM_ACCESS_11e_HCF = eCSR_MEDIUM_ACCESS_HCF,
644}eCsrMediaAccessType;
645
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800646typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700647{
648 eCSR_TX_RATE_AUTO = 0, // use rate adaption to determine Tx rate.
649
650 eCSR_TX_RATE_1Mbps = 0x00000001,
651 eCSR_TX_RATE_2Mbps = 0x00000002,
652 eCSR_TX_RATE_5_5Mbps = 0x00000004,
653 eCSR_TX_RATE_6Mbps = 0x00000008,
654 eCSR_TX_RATE_9Mbps = 0x00000010,
655 eCSR_TX_RATE_11Mbps = 0x00000020,
656 eCSR_TX_RATE_12Mbps = 0x00000040,
657 eCSR_TX_RATE_18Mbps = 0x00000080,
658 eCSR_TX_RATE_24Mbps = 0x00000100,
659 eCSR_TX_RATE_36Mbps = 0x00000200,
660 eCSR_TX_RATE_42Mbps = 0x00000400,
661 eCSR_TX_RATE_48Mbps = 0x00000800,
662 eCSR_TX_RATE_54Mbps = 0x00001000,
663 eCSR_TX_RATE_72Mbps = 0x00002000,
664 eCSR_TX_RATE_84Mbps = 0x00004000,
665 eCSR_TX_RATE_96Mbps = 0x00008000,
666 eCSR_TX_RATE_108Mbps = 0x00010000,
667 eCSR_TX_RATE_126Mbps = 0x00020000,
668 eCSR_TX_RATE_144Mbps = 0x00040000,
669 eCSR_TX_RATE_168Mbps = 0x00080000,
670 eCSR_TX_RATE_192Mbps = 0x00100000,
671 eCSR_TX_RATE_216Mbps = 0x00200000,
672 eCSR_TX_RATE_240Mbps = 0x00400000,
673
674}eCsrExposedTxRate;
675
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800676typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700677{
678 eCSR_OPERATING_CHANNEL_ALL = 0,
679 eCSR_OPERATING_CHANNEL_AUTO = eCSR_OPERATING_CHANNEL_ALL,
680 eCSR_OPERATING_CHANNEL_ANY = eCSR_OPERATING_CHANNEL_ALL,
681}eOperationChannel;
682
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800683typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700684{
685 eCSR_DOT11_FRAG_THRESH_AUTO = -1,
686 eCSR_DOT11_FRAG_THRESH_MIN = 256,
687 eCSR_DOT11_FRAG_THRESH_MAX = 2346,
688 eCSR_DOT11_FRAG_THRESH_DEFAULT = 2000
689}eCsrDot11FragThresh;
690
691
692//for channel bonding for ibss
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800693typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700694{
695 eCSR_CB_OFF = 0,
696 eCSR_CB_AUTO = 1,
697 eCSR_CB_DOWN = 2,
698 eCSR_CB_UP = 3,
699}eCsrCBChoice;
700
701//For channel bonding, the channel number gap is 4, either up or down. For both 11a and 11g mode.
702#define CSR_CB_CHANNEL_GAP 4
703#define CSR_CB_CENTER_CHANNEL_OFFSET 2
704#define CSR_MAX_24GHz_CHANNEL_NUMBER ( SIR_11B_CHANNEL_END )
Jeff Johnsone7245742012-09-05 17:12:55 -0700705#define CSR_MIN_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_BEGIN )
706#define CSR_MAX_5GHz_CHANNEL_NUMBER ( SIR_11A_CHANNEL_END )
Jeff Johnson295189b2012-06-20 16:38:30 -0700707
708// WEP keysize (in bits)...
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800709typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700710{
711 eCSR_SECURITY_WEP_KEYSIZE_40 = 40, // 40 bit key + 24bit IV = 64bit WEP
712 eCSR_SECURITY_WEP_KEYSIZE_104 = 104, // 104bit key + 24bit IV = 128bit WEP
713
714 eCSR_SECURITY_WEP_KEYSIZE_MIN = eCSR_SECURITY_WEP_KEYSIZE_40,
715 eCSR_SECURITY_WEP_KEYSIZE_MAX = eCSR_SECURITY_WEP_KEYSIZE_104,
716 eCSR_SECURITY_WEP_KEYSIZE_MAX_BYTES = ( eCSR_SECURITY_WEP_KEYSIZE_MAX / 8 ),
717}eCsrWEPKeySize;
718
719
720// Possible values for the WEP static key ID...
721typedef enum
722{
723
724 eCSR_SECURITY_WEP_STATIC_KEY_ID_MIN = 0,
725 eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX = 3,
726 eCSR_SECURITY_WEP_STATIC_KEY_ID_DEFAULT = 0,
727
728 eCSR_SECURITY_WEP_STATIC_KEY_ID_INVALID = -1,
729
730}eCsrWEPStaticKeyID;
731
Chet Lanctot186b5732013-03-18 10:26:30 -0700732// Two extra key indicies are used for the IGTK (which is used by BIP)
733#define CSR_MAX_NUM_KEY (eCSR_SECURITY_WEP_STATIC_KEY_ID_MAX + 2 + 1)
Jeff Johnson295189b2012-06-20 16:38:30 -0700734
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800735typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700736{
737 eCSR_SECURITY_SET_KEY_ACTION_NO_CHANGE,
738 eCSR_SECURITY_SET_KEY_ACTION_SET_KEY,
739 eCSR_SECURITY_SET_KEY_ACTION_DELETE_KEY,
740}eCsrSetKeyAction;
741
742typedef enum
743{
744 eCSR_BAND_ALL,
745 eCSR_BAND_24,
746 eCSR_BAND_5G,
747 eCSR_BAND_MAX,
748}eCsrBand;
749
750
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800751typedef enum
Jeff Johnson295189b2012-06-20 16:38:30 -0700752{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800753 // Roaming because HDD requested for reassoc by changing one of the fields in
Jeff Johnson295189b2012-06-20 16:38:30 -0700754 // tCsrRoamModifyProfileFields. OR
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800755 // Roaming because SME requested for reassoc by changing one of the fields in
Jeff Johnson295189b2012-06-20 16:38:30 -0700756 // tCsrRoamModifyProfileFields.
757 eCsrRoamReasonStaCapabilityChanged,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800758 // Roaming because SME requested for reassoc to a different AP, as part of
Jeff Johnson295189b2012-06-20 16:38:30 -0700759 // inter AP handoff.
760 eCsrRoamReasonBetterAP,
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800761 // Roaming because SME requested it as the link is lost - placeholder, will
Jeff Johnson295189b2012-06-20 16:38:30 -0700762 // clean it up once handoff code gets in
763 eCsrRoamReasonSmeIssuedForLostLink,
764
765}eCsrRoamReasonCodes;
766
767typedef enum
768{
769 eCsrRoamWmmAuto = 0,
770 eCsrRoamWmmQbssOnly = 1,
771 eCsrRoamWmmNoQos = 2,
772
773} eCsrRoamWmmUserModeType;
774
775typedef enum
776{
777 eCSR_REQUESTER_MIN = 0,
778 eCSR_DIAG,
779 eCSR_UMA_GAN,
780 eCSR_HDD
781} eCsrStatsRequesterType;
782
783typedef struct tagPmkidCandidateInfo
784{
785 tCsrBssid BSSID;
786 tANI_BOOLEAN preAuthSupported;
787}tPmkidCandidateInfo;
788
789typedef struct tagPmkidCacheInfo
790{
791 tCsrBssid BSSID;
792 tANI_U8 PMKID[CSR_RSN_PMKID_SIZE];
793}tPmkidCacheInfo;
794
795#ifdef FEATURE_WLAN_WAPI
796typedef struct tagBkidCandidateInfo
797{
798 tCsrBssid BSSID;
799 tANI_BOOLEAN preAuthSupported;
800}tBkidCandidateInfo;
801
802typedef struct tagBkidCacheInfo
803{
804 tCsrBssid BSSID;
805 tANI_U8 BKID[CSR_WAPI_BKID_SIZE];
806}tBkidCacheInfo;
807#endif /* FEATURE_WLAN_WAPI */
808
809typedef struct tagCsrKeys
810{
811 tANI_U8 KeyLength[ CSR_MAX_NUM_KEY ]; //Also use to indicate whether the key index is set
812 tANI_U8 KeyMaterial[ CSR_MAX_NUM_KEY ][ CSR_MAX_KEY_LEN ];
813 tANI_U8 defaultIndex;
814}tCsrKeys;
815
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800816/* Following are fields which are part of tCsrRoamConnectedProfile might need
Jeff Johnson295189b2012-06-20 16:38:30 -0700817 modification dynamically once STA is up & running and this could trigger
818 reassoc */
819typedef struct tagCsrRoamModifyProfileFields
820{
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800821 // during connect this specifies ACs U-APSD is to be setup
Jeff Johnson295189b2012-06-20 16:38:30 -0700822 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800823 // During assoc response this COULD carry confirmation of what ACs U-APSD
Jeff Johnson295189b2012-06-20 16:38:30 -0700824 // got setup for. Later if an APP looking for APSD, SME-QoS might need to
825 // modify this field
826 tANI_U8 uapsd_mask;
827 // HDD might ask to modify this field
828 tANI_U16 listen_interval;
829}tCsrRoamModifyProfileFields;
830
831typedef struct tagCsrRoamProfile
832{
833 //For eCSR_BSS_TYPE_WDS_AP. There must be one SSID in SSIDs.
834 //For eCSR_BSS_TYPE_WDS_STA. There must be two SSIDs. Index 0 is the SSID of the WDS-AP
835 //that we need to join. Index 1 is the SSID for self BSS.
836 tCsrSSIDs SSIDs;
837 tCsrBSSIDs BSSIDs;
838 tANI_U32 phyMode; //this is a bit mask of all the needed phy mode defined in eCsrPhyMode
839 eCsrRoamBssType BSSType;
840
841 tCsrAuthList AuthType;
842 eCsrAuthType negotiatedAuthType;
843
844 tCsrEncryptionList EncryptionType;
845 //This field is for output only, not for input
846 eCsrEncryptionType negotiatedUCEncryptionType;
847
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800848 //eCSR_ENCRYPT_TYPE_ANY cannot be set in multicast encryption type. If caller doesn't case,
Jeff Johnson295189b2012-06-20 16:38:30 -0700849 //put all supported encryption types in here
850 tCsrEncryptionList mcEncryptionType;
851 //This field is for output only, not for input
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800852 eCsrEncryptionType negotiatedMCEncryptionType;
Jeff Johnson295189b2012-06-20 16:38:30 -0700853
Chet Lanctot186b5732013-03-18 10:26:30 -0700854#ifdef WLAN_FEATURE_11W
855 // Management Frame Protection
856 tANI_BOOLEAN MFPEnabled;
857 tANI_U8 MFPRequired;
858 tANI_U8 MFPCapable;
859#endif
860
Jeff Johnson295189b2012-06-20 16:38:30 -0700861 tCsrKeys Keys;
862 eCsrCBChoice CBMode; //up, down or auto
863 tCsrChannelInfo ChannelInfo;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800864 tANI_U8 operationChannel;
Jeff Johnson295189b2012-06-20 16:38:30 -0700865 tANI_U16 beaconInterval; //If this is 0, SME will fill in for caller.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800866 // during connect this specifies ACs U-APSD is to be setup
Jeff Johnson295189b2012-06-20 16:38:30 -0700867 // for (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored).
868 // During assoc response this COULD carry confirmation of what ACs U-APSD got setup for
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800869 tANI_U8 uapsd_mask;
Jeff Johnson295189b2012-06-20 16:38:30 -0700870 tANI_U32 nWPAReqIELength; //The byte count in the pWPAReqIE
871 tANI_U8 *pWPAReqIE; //If not null, it has the IE byte stream for WPA
872 tANI_U32 nRSNReqIELength; //The byte count in the pRSNReqIE
873 tANI_U8 *pRSNReqIE; //If not null, it has the IE byte stream for RSN
874#ifdef FEATURE_WLAN_WAPI
875 tANI_U32 nWAPIReqIELength; //The byte count in the pWAPIReqIE
876 tANI_U8 *pWAPIReqIE; //If not null, it has the IE byte stream for WAPI
877#endif /* FEATURE_WLAN_WAPI */
878
Agarwal Ashish4f616132013-12-30 23:32:50 +0530879 //The byte count in the pAddIE for scan (at the time of join)
880 tANI_U32 nAddIEScanLength;
881 /* Additional IE information.
882 * It has the IE byte stream for additional IE,
883 * which can be WSC IE and/or P2P IE
884 */
885 tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2]; //Additional IE information.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800886 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
Jeff Johnson295189b2012-06-20 16:38:30 -0700887 tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
888
889 tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN]; //it is ignored if [0] is 0.
890 /*WPS Association if true => auth and ecryption should be ignored*/
891 tANI_BOOLEAN bWPSAssociation;
Leela Venkata Kiran Kumar Reddy Chiralaf257bef2014-04-11 18:48:12 -0700892 tANI_BOOLEAN bOSENAssociation;
Jeff Johnson295189b2012-06-20 16:38:30 -0700893 tANI_U32 nWSCReqIELength; //The byte count in the pWSCReqIE
894 tANI_U8 *pWSCReqIE; //If not null, it has the IE byte stream for WSC
895
Jeff Johnson295189b2012-06-20 16:38:30 -0700896 tANI_U8 ieee80211d;
897 tANI_U8 privacy;
898 tANI_BOOLEAN fwdWPSPBCProbeReq;
899 tAniAuthType csr80211AuthType;
900 tANI_U32 dtimPeriod;
901 tANI_BOOLEAN ApUapsdEnable;
902 tANI_BOOLEAN protEnabled;
903 tANI_BOOLEAN obssProtEnabled;
904 tANI_U16 cfg_protection;
905 tANI_U8 wps_state;
Jeff Johnson295189b2012-06-20 16:38:30 -0700906
907#ifdef WLAN_FEATURE_VOWIFI_11R
908 tCsrMobilityDomainInfo MDID;
909#endif
910 tVOS_CON_MODE csrPersona;
911
912}tCsrRoamProfile;
913
914
915typedef struct tagCsrRoamConnectedProfile
916{
917 tSirMacSSid SSID;
918 tANI_BOOLEAN handoffPermitted;
919 tANI_BOOLEAN ssidHidden;
920 tCsrBssid bssid;
921 eCsrRoamBssType BSSType;
922 eCsrAuthType AuthType;
923 tCsrAuthList AuthInfo;
924 eCsrEncryptionType EncryptionType;
925 tCsrEncryptionList EncryptionInfo;
926 eCsrEncryptionType mcEncryptionType;
927 tCsrEncryptionList mcEncryptionInfo;
928 eCsrCBChoice CBMode; //up, down or auto
929 tANI_U8 operationChannel;
Jeff Johnsone7245742012-09-05 17:12:55 -0700930 tANI_U16 beaconInterval;
Jeff Johnson295189b2012-06-20 16:38:30 -0700931 tCsrKeys Keys;
932 // meaningless on connect. It's an OUT param from CSR's point of view
933 // During assoc response carries the ACM bit-mask i.e. what
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800934 // ACs have ACM=1 (if any),
Jeff Johnson295189b2012-06-20 16:38:30 -0700935 // (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored)
936 tANI_U8 acm_mask;
937 tCsrRoamModifyProfileFields modifyProfileFields;
Madan Mohan Koyyalamudiea22cdc2012-10-18 21:02:23 -0700938 tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
939 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 -0800940
941 tSirBssDescription *pBssDesc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700942 tANI_BOOLEAN qap; //AP supports QoS
943 tANI_BOOLEAN qosConnection; //A connection is QoS enabled
944#ifdef WLAN_FEATURE_VOWIFI_11R
945 tCsrMobilityDomainInfo MDID;
946#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -0800947
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800948#ifdef FEATURE_WLAN_ESE
949 tCsrEseCckmInfo eseCckmInfo;
950 tANI_BOOLEAN isESEAssoc;
Jeff Johnson295189b2012-06-20 16:38:30 -0700951#endif
Gopichand Nakkaladacbcb52013-04-18 16:41:54 +0530952 tANI_U32 dot11Mode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700953}tCsrRoamConnectedProfile;
954
955
956#ifdef WLAN_FEATURE_VOWIFI_11R
957typedef struct tagCsr11rConfigParams
958{
959 tANI_BOOLEAN IsFTResourceReqSupported;
960} tCsr11rConfigParams;
961#endif
962
963#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
964typedef struct tagCsrNeighborRoamConfigParams
965{
966
967 tANI_U32 nNeighborScanTimerPeriod;
968 tANI_U8 nNeighborLookupRssiThreshold;
969 tANI_U8 nNeighborReassocRssiThreshold;
970 tANI_U16 nNeighborScanMinChanTime;
971 tANI_U16 nNeighborScanMaxChanTime;
972 sCsrChannel neighborScanChanList;
973 tANI_U8 nMaxNeighborRetries;
974 tANI_U16 nNeighborResultsRefreshPeriod;
Srinivas Girigowdade697412013-02-14 16:31:48 -0800975 tANI_U16 nEmptyScanRefreshPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -0700976}tCsrNeighborRoamConfigParams;
977#endif
978
979typedef struct tagCsrConfigParam
980{
981 tANI_U32 FragmentationThreshold;
Jeff Johnsone7245742012-09-05 17:12:55 -0700982 tANI_U32 channelBondingMode24GHz; // keep this tANI_U32. This gets converted to ePhyChannelBondState
983 tANI_U32 channelBondingMode5GHz; // in csrChangeDefaultConfigParam using convertCBIniValueToPhyCBState
Jeff Johnson295189b2012-06-20 16:38:30 -0700984 eCsrPhyMode phyMode;
985 eCsrBand eBand;
986 tANI_U32 RTSThreshold;
987 tANI_U32 HeartbeatThresh50;
988 tANI_U32 HeartbeatThresh24;
989 eCsrCBChoice cbChoice;
990 eCsrBand bandCapability; //indicate hw capability
991 tANI_U32 bgScanInterval;
992 tANI_U16 TxRate;
993 eCsrRoamWmmUserModeType WMMSupportMode;
994 tANI_BOOLEAN Is11eSupportEnabled;
995 tANI_BOOLEAN Is11dSupportEnabled;
996 tANI_BOOLEAN Is11dSupportEnabledOriginal;
997 tANI_BOOLEAN Is11hSupportEnabled;
998 tANI_BOOLEAN shortSlotTime;
999 tANI_BOOLEAN ProprietaryRatesEnabled;
1000 tANI_U8 AdHocChannel24;
1001 tANI_U8 AdHocChannel5G;
1002 tANI_U32 impsSleepTime; //in units of seconds
1003 tANI_U32 nScanResultAgeCount; //this number minus one is the number of times a scan doesn't find it before it is removed
1004 tANI_U32 scanAgeTimeNCNPS; //scan result aging time threshold when Not-Connect-No-Power-Save, in seconds
1005 tANI_U32 scanAgeTimeNCPS; //scan result aging time threshold when Not-Connect-Power-Save, in seconds
1006 tANI_U32 scanAgeTimeCNPS; //scan result aging time threshold when Connect-No-Power-Save, in seconds,
1007 tANI_U32 scanAgeTimeCPS; //scan result aging time threshold when Connect-Power-Savein seconds
1008 tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up. 0 means no roaming
1009 tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
1010 tANI_U8 fEnableMCCMode; //to set MCC Enable/Disable mode
Mohit Khanna7ed53f02012-09-11 17:52:10 -07001011 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
1012 //at the moment, this flag is provided only to pass Wi-Fi Cert. 5.1.12
Jeff Johnson295189b2012-06-20 16:38:30 -07001013 tCsr11dinfo Csr11dinfo;
1014 //Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001015 //channels are limited to the default channel list. It is an "AND" operation between the
Jeff Johnson295189b2012-06-20 16:38:30 -07001016 //default channels and the channels in the 802.11d IE.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001017 tANI_BOOLEAN fEnforce11dChannels;
Jeff Johnson295189b2012-06-20 16:38:30 -07001018 //Country Code Priority
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001019 //0 = 802.11D > Country IOCTL > NV
Jeff Johnson295189b2012-06-20 16:38:30 -07001020 //1 = Country IOCTL > 802.11D > NV
1021 tANI_BOOLEAN fSupplicantCountryCodeHasPriority;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001022 //When true, AP with unknown country code won't be see.
1023 //"Unknown country code" means either Ap doesn't have 11d IE or we cannot
1024 //find a domain for the country code in its 11d IE.
1025 tANI_BOOLEAN fEnforceCountryCodeMatch;
Jeff Johnson295189b2012-06-20 16:38:30 -07001026 //When true, only APs in the default domain can be seen. If the Ap has "unknown country
1027 //code", or the domain of the country code doesn't match the default domain, the Ap is
1028 //not acceptable.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001029 tANI_BOOLEAN fEnforceDefaultDomain;
Jeff Johnson295189b2012-06-20 16:38:30 -07001030
1031 tANI_U16 vccRssiThreshold;
1032 tANI_U32 vccUlMacLossThreshold;
1033
1034 tANI_U32 nPassiveMinChnTime; //in units of milliseconds
1035 tANI_U32 nPassiveMaxChnTime; //in units of milliseconds
1036 tANI_U32 nActiveMinChnTime; //in units of milliseconds
1037 tANI_U32 nActiveMaxChnTime; //in units of milliseconds
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001038
c_hpothu059edb02014-03-12 21:44:28 +05301039 tANI_U32 nInitialDwellTime; //in units of milliseconds
1040
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001041 tANI_U32 nActiveMinChnTimeBtc; //in units of milliseconds
1042 tANI_U32 nActiveMaxChnTimeBtc; //in units of milliseconds
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -07001043 tANI_U32 disableAggWithBtc;
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -07001044#ifdef WLAN_AP_STA_CONCURRENCY
1045 tANI_U32 nPassiveMinChnTimeConc; //in units of milliseconds
1046 tANI_U32 nPassiveMaxChnTimeConc; //in units of milliseconds
1047 tANI_U32 nActiveMinChnTimeConc; //in units of milliseconds
1048 tANI_U32 nActiveMaxChnTimeConc; //in units of milliseconds
1049 tANI_U32 nRestTimeConc; //in units of milliseconds
Sudhir Sattayappa Kohallieb97d502013-05-22 23:16:42 -07001050 tANI_U8 nNumStaChanCombinedConc; //number of channels combined for
1051 //STA in each split scan operation
1052 tANI_U8 nNumP2PChanCombinedConc; //number of channels combined for
1053 //P2P in each split scan operation
Madan Mohan Koyyalamudi4ff9cd62012-10-30 17:48:57 -07001054#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001055
1056 tANI_BOOLEAN IsIdleScanEnabled;
1057 //in dBm, the maximum TX power
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001058 //The actual TX power is the lesser of this value and 11d.
Jeff Johnson295189b2012-06-20 16:38:30 -07001059 //If 11d is disable, the lesser of this and default setting.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001060 tANI_U8 nTxPowerCap;
Jeff Johnson295189b2012-06-20 16:38:30 -07001061 tANI_U32 statsReqPeriodicity; //stats request frequency from PE while in full power
1062 tANI_U32 statsReqPeriodicityInPS;//stats request frequency from PE while in power save
1063#ifdef WLAN_FEATURE_VOWIFI_11R
1064 tCsr11rConfigParams csr11rConfig;
1065#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001066#ifdef FEATURE_WLAN_ESE
1067 tANI_U8 isEseIniFeatureEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001068#endif
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001069#ifdef FEATURE_WLAN_LFR
1070 tANI_U8 isFastRoamIniFeatureEnabled;
Sameer Thalappil4ae66ec2013-11-05 14:17:35 -08001071 tANI_U8 MAWCEnabled;
Jeff Johnson04dd8a82012-06-29 20:41:40 -07001072#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001073
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001074#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Srinivas Girigowda100eb322013-03-15 16:48:20 -07001075 tANI_U8 isFastTransitionEnabled;
1076 tANI_U8 RoamRssiDiff;
1077 tANI_U8 nImmediateRoamRssiDiff;
Srinivas Girigowdaad34ca92013-10-22 10:54:29 -07001078 tANI_BOOLEAN isWESModeEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -07001079#endif
1080
1081#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
1082 tCsrNeighborRoamConfigParams neighborRoamConfig;
1083#endif
1084
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001085 /* Instead of Reassoc, send ADDTS/DELTS even when ACM is off for that AC
Jeff Johnson295189b2012-06-20 16:38:30 -07001086 * This is mandated by WMM-AC certification */
1087 tANI_BOOLEAN addTSWhenACMIsOff;
1088
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001089
1090 /*channelPowerInfoList24 has been seen corrupted. Set this flag to true trying to
Jeff Johnson295189b2012-06-20 16:38:30 -07001091 * detect when it happens. Adding this into code because we can't reproduce it easily.
1092 * We don't know when it happens. */
1093 tANI_BOOLEAN fValidateList;
1094
1095 /*Customer wants to start with an active scan based on the default country code.
1096 * This optimization will minimize the driver load to association time.
1097 * Based on this flag we will bypass the initial passive scan needed for 11d
1098 * to determine the country code & domain */
1099 tANI_BOOLEAN fEnableBypass11d;
1100
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001101 /*Customer wants to optimize the scan time. Avoiding scans(passive) on DFS
1102 * channels while swipping through both bands can save some time
Jeff Johnson295189b2012-06-20 16:38:30 -07001103 * (apprx 1.3 sec) */
1104 tANI_BOOLEAN fEnableDFSChnlScan;
1105
1106 //To enable/disable scanning 2.4Ghz channels twice on a single scan request from HDD
1107 tANI_BOOLEAN fScanTwice;
Jeff Johnsone7245742012-09-05 17:12:55 -07001108#ifdef WLAN_FEATURE_11AC
Ravi Joshi83bfaa12013-05-28 22:12:08 -07001109 tANI_U32 nVhtChannelWidth;
1110 tANI_U8 enableTxBF;
1111 tANI_U8 txBFCsnValue;
1112 tANI_BOOLEAN enableVhtFor24GHz;
Jeff Johnsone7245742012-09-05 17:12:55 -07001113#endif
1114
1115 /*
1116 * To enable/disable scanning only 2.4Ghz channels on first scan
1117 */
1118 tANI_BOOLEAN fFirstScanOnly2GChnl;
Jeff Johnson295189b2012-06-20 16:38:30 -07001119
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001120#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudid5026072012-11-30 14:56:21 -08001121 tANI_BOOLEAN nRoamPrefer5GHz;
Srinivas Girigowdabbd16eb2013-03-21 12:34:46 -07001122 tANI_BOOLEAN nRoamIntraBand;
Varun Reddy Yeturu920df212013-05-22 08:07:23 -07001123 tANI_U8 nProbes;
1124 tANI_U16 nRoamScanHomeAwayTime;
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001125
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001126#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1127 tANI_BOOLEAN isRoamOffloadScanEnabled;
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07001128 tANI_BOOLEAN bFastRoamInConIniFeatureEnabled;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001129#endif
Srinivas Girigowda830bbd02013-06-13 19:44:16 -07001130#endif
1131
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -07001132
Sandeep Puligilla2b6dc632012-12-17 14:44:16 -08001133 tANI_U8 scanCfgAgingTime;
Gopichand Nakkalab2d2c312013-01-04 11:41:02 -08001134
1135 tANI_U8 enableTxLdpc;
krunal soni4f087d22013-07-29 16:32:26 -07001136
krunal soni5afa96c2013-09-06 22:19:02 -07001137 tANI_U8 isAmsduSupportInAMPDU;
Srinivas Girigowda41c7c5f2013-10-21 19:01:38 -07001138 tANI_U8 nSelect5GHzMargin;
krunal soni5afa96c2013-09-06 22:19:02 -07001139
krunal sonie9002db2013-11-25 14:24:17 -08001140 tANI_U8 isCoalesingInIBSSAllowed;
Sandeep Puligillac80f26e2014-03-11 18:36:10 +05301141 tANI_U8 allowDFSChannelRoam;
c_hpothu0d5a7352014-03-22 12:30:25 +05301142 tANI_BOOLEAN initialScanSkipDFSCh;
krunal sonie9002db2013-11-25 14:24:17 -08001143
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001144}tCsrConfigParam;
Jeff Johnson295189b2012-06-20 16:38:30 -07001145
1146//Tush
1147typedef struct tagCsrUpdateConfigParam
1148{
1149 tCsr11dinfo Csr11dinfo;
1150}tCsrUpdateConfigParam;
1151
1152typedef struct tagCsrRoamInfo
1153{
1154 tCsrRoamProfile *pProfile; //may be NULL
1155 tSirBssDescription *pBssDesc; //May be NULL
1156 tANI_U32 nBeaconLength; //the length, in bytes, of the beacon frame, can be 0
1157 tANI_U32 nAssocReqLength; //the length, in bytes, of the assoc req frame, can be 0
1158 tANI_U32 nAssocRspLength; //The length, in bytes, of the assoc rsp frame, can be 0
1159 tANI_U32 nFrameLength;
1160 tANI_U8 frameType;
1161 tANI_U8 *pbFrames; //Point to a buffer contain the beacon, assoc req, assoc rsp frame, in that order
1162 //user needs to use nBeaconLength, nAssocReqLength, nAssocRspLength to desice where
1163 //each frame starts and ends.
1164 tANI_BOOLEAN fReassocReq; //set to true if for re-association
1165 tANI_BOOLEAN fReassocRsp; //set to true if for re-association
1166 tCsrBssid bssid;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001167 //Only valid in IBSS
Jeff Johnson295189b2012-06-20 16:38:30 -07001168 //this is the peers MAC address for eCSR_ROAM_RESULT_IBSS_NEW_PEER or PEER_DEPARTED
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001169 tCsrBssid peerMac;
Jeff Johnson295189b2012-06-20 16:38:30 -07001170 tSirResultCodes statusCode;
1171 tANI_U32 reasonCode; //this could be our own defined or sent from the other BSS(per 802.11 spec)
1172 tANI_U8 staId; // Peer stationId when connected
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001173 /*The DPU signatures will be sent eventually to TL to help it determine the
Jeff Johnson295189b2012-06-20 16:38:30 -07001174 association to which a packet belongs to*/
1175 /*Unicast DPU signature*/
1176 tANI_U8 ucastSig;
1177
1178 /*Broadcast DPU signature*/
1179 tANI_U8 bcastSig;
1180
1181 tANI_BOOLEAN fAuthRequired; //FALSE means auth needed from supplicant. TRUE means authenticated(static WEP, open)
1182 tANI_U8 sessionId;
1183 tANI_U8 rsnIELen;
1184 tANI_U8 *prsnIE;
1185
1186 tANI_U8 addIELen;
1187 tANI_U8 *paddIE;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001188
Jeff Johnson295189b2012-06-20 16:38:30 -07001189 union
1190 {
1191 tSirMicFailureInfo *pMICFailureInfo;
1192 tCsrRoamConnectedProfile *pConnectedProfile;
Jeff Johnson295189b2012-06-20 16:38:30 -07001193 tSirWPSPBCProbeReq *pWPSPBCProbeReq;
Jeff Johnson295189b2012-06-20 16:38:30 -07001194 } u;
1195
Jeff Johnson295189b2012-06-20 16:38:30 -07001196 tANI_BOOLEAN wmmEnabledSta; //set to true if WMM enabled STA
1197 tANI_U32 dtimPeriod;
Jeff Johnson295189b2012-06-20 16:38:30 -07001198
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001199#ifdef FEATURE_WLAN_ESE
1200 tANI_BOOLEAN isESEAssoc;
1201#ifdef FEATURE_WLAN_ESE_UPLOAD
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001202 tSirTsmIE tsmIe;
1203 tANI_U32 timestamp[2];
1204 tANI_U16 tsmRoamDelay;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001205 tSirEseBcnReportRsp *pEseBcnReportRsp;
1206#endif /* FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001207#endif
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001208 void* pRemainCtx;
Jeff Johnson295189b2012-06-20 16:38:30 -07001209 tANI_U32 rxChan;
Jeff Johnson295189b2012-06-20 16:38:30 -07001210
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001211#ifdef FEATURE_WLAN_TDLS
1212 tANI_U8 staType;
1213#endif
1214
Jeff Johnson295189b2012-06-20 16:38:30 -07001215 // Required for indicating the frames to upper layer
1216 tANI_U32 beaconLength;
1217 tANI_U8* beaconPtr;
1218 tANI_U32 assocReqLength;
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001219 tANI_U8* assocReqPtr;
Chilam NG571c65a2013-01-19 12:27:36 +05301220
1221 tANI_S8 rxRssi;
Jeff Johnson295189b2012-06-20 16:38:30 -07001222}tCsrRoamInfo;
1223
1224
1225
1226
1227
1228typedef struct tagCsrFreqScanInfo
1229{
1230 tANI_U32 nStartFreq; //in unit of MHz
1231 tANI_U32 nEndFreq; //in unit of MHz
1232 tSirScanType scanType;
1233}tCsrFreqScanInfo;
1234
1235
Jeff Johnson295189b2012-06-20 16:38:30 -07001236typedef struct sSirSmeAssocIndToUpperLayerCnf
1237{
1238 tANI_U16 messageType; // eWNI_SME_ASSOC_CNF
1239 tANI_U16 length;
1240 tANI_U8 sessionId;
1241 tSirResultCodes statusCode;
1242 tSirMacAddr bssId; // Self BSSID
1243 tSirMacAddr peerMacAddr;
1244 tANI_U16 aid;
1245 tSirMacAddr alternateBssId;
1246 tANI_U8 alternateChannelId;
1247 tANI_U8 wmmEnabledSta; //set to true if WMM enabled STA
1248 tSirRSNie rsnIE; // RSN IE received from peer
1249 tSirAddie addIE; // Additional IE received from peer, which can be WSC and/or P2P IE
1250 tANI_U8 reassocReq; //set to true if reassoc
1251} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
Jeff Johnson295189b2012-06-20 16:38:30 -07001252
1253typedef struct tagCsrSummaryStatsInfo
1254{
1255 tANI_U32 retry_cnt[4];
1256 tANI_U32 multiple_retry_cnt[4];
1257 tANI_U32 tx_frm_cnt[4];
1258 //tANI_U32 num_rx_frm_crc_err; same as rx_error_cnt
1259 //tANI_U32 num_rx_frm_crc_ok; same as rx_frm_cnt
1260 tANI_U32 rx_frm_cnt;
1261 tANI_U32 frm_dup_cnt;
1262 tANI_U32 fail_cnt[4];
1263 tANI_U32 rts_fail_cnt;
1264 tANI_U32 ack_fail_cnt;
1265 tANI_U32 rts_succ_cnt;
1266 tANI_U32 rx_discard_cnt;
1267 tANI_U32 rx_error_cnt;
1268 tANI_U32 tx_byte_cnt;
1269
1270}tCsrSummaryStatsInfo;
1271
1272typedef struct tagCsrGlobalClassAStatsInfo
1273{
1274 tANI_U32 rx_frag_cnt;
1275 tANI_U32 promiscuous_rx_frag_cnt;
1276 //tANI_U32 rx_fcs_err;
1277 tANI_U32 rx_input_sensitivity;
1278 tANI_U32 max_pwr;
1279 //tANI_U32 default_pwr;
1280 tANI_U32 sync_fail_cnt;
1281 tANI_U32 tx_rate;
1282 //mcs index for HT20 and HT40 rates
1283 tANI_U32 mcs_index;
1284 //to defferentiate between HT20 and HT40 rates;short and long guard interval
1285 tANI_U32 tx_rate_flags;
1286
1287}tCsrGlobalClassAStatsInfo;
1288
1289typedef struct tagCsrGlobalClassBStatsInfo
1290{
1291 tANI_U32 uc_rx_wep_unencrypted_frm_cnt;
1292 tANI_U32 uc_rx_mic_fail_cnt;
1293 tANI_U32 uc_tkip_icv_err;
1294 tANI_U32 uc_aes_ccmp_format_err;
1295 tANI_U32 uc_aes_ccmp_replay_cnt;
1296 tANI_U32 uc_aes_ccmp_decrpt_err;
1297 tANI_U32 uc_wep_undecryptable_cnt;
1298 tANI_U32 uc_wep_icv_err;
1299 tANI_U32 uc_rx_decrypt_succ_cnt;
1300 tANI_U32 uc_rx_decrypt_fail_cnt;
1301 tANI_U32 mcbc_rx_wep_unencrypted_frm_cnt;
1302 tANI_U32 mcbc_rx_mic_fail_cnt;
1303 tANI_U32 mcbc_tkip_icv_err;
1304 tANI_U32 mcbc_aes_ccmp_format_err;
1305 tANI_U32 mcbc_aes_ccmp_replay_cnt;
1306 tANI_U32 mcbc_aes_ccmp_decrpt_err;
1307 tANI_U32 mcbc_wep_undecryptable_cnt;
1308 tANI_U32 mcbc_wep_icv_err;
1309 tANI_U32 mcbc_rx_decrypt_succ_cnt;
1310 tANI_U32 mcbc_rx_decrypt_fail_cnt;
1311
1312}tCsrGlobalClassBStatsInfo;
1313
1314typedef struct tagCsrGlobalClassCStatsInfo
1315{
1316 tANI_U32 rx_amsdu_cnt;
1317 tANI_U32 rx_ampdu_cnt;
1318 tANI_U32 tx_20_frm_cnt;
1319 tANI_U32 rx_20_frm_cnt;
1320 tANI_U32 rx_mpdu_in_ampdu_cnt;
1321 tANI_U32 ampdu_delimiter_crc_err;
1322
1323}tCsrGlobalClassCStatsInfo;
1324
1325typedef struct tagCsrGlobalClassDStatsInfo
1326{
1327 tANI_U32 tx_uc_frm_cnt;
1328 tANI_U32 tx_mc_frm_cnt;
1329 tANI_U32 tx_bc_frm_cnt;
1330 tANI_U32 rx_uc_frm_cnt;
1331 tANI_U32 rx_mc_frm_cnt;
1332 tANI_U32 rx_bc_frm_cnt;
1333 tANI_U32 tx_uc_byte_cnt[4];
1334 tANI_U32 tx_mc_byte_cnt;
1335 tANI_U32 tx_bc_byte_cnt;
1336 tANI_U32 rx_uc_byte_cnt[4];
1337 tANI_U32 rx_mc_byte_cnt;
1338 tANI_U32 rx_bc_byte_cnt;
1339 tANI_U32 rx_byte_cnt;
1340 tANI_U32 num_rx_bytes_crc_ok;
1341 tANI_U32 rx_rate;
1342
1343}tCsrGlobalClassDStatsInfo;
1344
1345typedef struct tagCsrPerStaStatsInfo
1346{
1347 tANI_U32 tx_frag_cnt[4];
1348 tANI_U32 tx_ampdu_cnt;
1349 tANI_U32 tx_mpdu_in_ampdu_cnt;
1350} tCsrPerStaStatsInfo;
1351
1352typedef struct tagCsrRoamSetKey
1353{
1354 eCsrEncryptionType encType;
1355 tAniKeyDirection keyDirection; //Tx, Rx or Tx-and-Rx
1356 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1357 tANI_U8 paeRole; //0 for supplicant
1358 tANI_U8 keyId; // Kye index
1359 tANI_U16 keyLength; //Number of bytes containing the key in pKey
1360 tANI_U8 Key[CSR_MAX_KEY_LEN];
1361 tANI_U8 keyRsc[CSR_MAX_RSC_LEN];
1362} tCsrRoamSetKey;
1363
1364typedef struct tagCsrRoamRemoveKey
1365{
1366 eCsrEncryptionType encType;
1367 tCsrBssid peerMac; //Peers MAC address. ALL 1's for group key
1368 tANI_U8 keyId; //key index
1369} tCsrRoamRemoveKey;
1370
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001371#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05301372
1373typedef struct tagCsrLinkEstablishParams
1374{
1375 tSirMacAddr peerMac;
1376 tANI_U8 uapsdQueues;
1377 tANI_U8 maxSp;
1378 tANI_U8 isBufSta;
Naresh Jayaramdff88f92014-02-12 21:44:29 +05301379 tANI_U8 isOffChannelSupported;
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05301380 tANI_U8 isResponder;
Naresh Jayaramdff88f92014-02-12 21:44:29 +05301381 tANI_U8 supportedChannelsLen;
1382 tANI_U8 supportedChannels[SIR_MAC_MAX_SUPP_CHANNELS];
1383 tANI_U8 supportedOperClassesLen;
1384 tANI_U8 supportedOperClasses[SIR_MAC_MAX_SUPP_OPER_CLASSES];
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +05301385}tCsrTdlsLinkEstablishParams;
1386
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001387typedef struct tagCsrTdlsSendMgmt
1388{
1389 tSirMacAddr peerMac;
1390 tANI_U8 frameType;
1391 tANI_U8 dialog;
1392 tANI_U16 statusCode;
Hoonki Leea34dd892013-02-05 22:56:02 -08001393 tANI_U8 responder;
Pradeep Reddy POTTETIca171f82014-03-21 14:17:35 +05301394 tANI_U32 peerCapability;
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001395 tANI_U8 *buf;
1396 tANI_U8 len;
1397
1398}tCsrTdlsSendMgmt;
1399
1400#ifdef FEATURE_WLAN_TDLS_INTERNAL
1401typedef struct tagCsrTdlsDisRequest
1402{
1403 tSirMacAddr peerMac;
1404 tANI_U8 disType;
1405}tCsrTdlsDisRequest;
1406
1407typedef struct tagCsrTdlsSetupRequest
1408{
1409 tSirMacAddr peerMac;
1410 tANI_U8 linkIndex;
1411}tCsrTdlsSetupRequest;
1412
1413typedef struct tagCsrTdlsTeardownRequest
1414{
1415 tSirMacAddr peerMac;
1416 tANI_U8 linkIndex;
1417}tCsrTdlsTeardownRequest ;
1418#endif
1419#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001420
1421typedef void * tScanResultHandle;
1422
1423#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
1424
Varun Reddy Yeturucc661d22013-05-20 11:47:10 -07001425#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
1426typedef struct tagCsrHandoffRequest
1427{
1428 tCsrBssid bssid;
1429 tANI_U8 channel;
1430}tCsrHandoffRequest;
1431#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001432
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001433#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
1434typedef struct tagCsrEseBeaconReqParams
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001435{
1436 tANI_U16 measurementToken;
1437 tANI_U8 channel;
1438 tANI_U8 scanMode;
1439 tANI_U16 measurementDuration;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001440} tCsrEseBeaconReqParams, *tpCsrEseBeaconReqParams;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001441
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001442typedef struct tagCsrEseBeaconReq
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -08001443{
1444 tANI_U8 numBcnReqIe;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001445 tCsrEseBeaconReqParams bcnReq[SIR_ESE_MAX_MEAS_IE_REQS];
1446} tCsrEseBeaconReq, *tpCsrEseBeaconReq;
1447#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Jeff Johnson295189b2012-06-20 16:38:30 -07001448
1449////////////////////////////////////////////Common SCAN starts
1450
1451//void *p2 -- the second context pass in for the caller
1452//***what if callback is called before requester gets the scanId??
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001453typedef eHalStatus (*csrScanCompleteCallback)(tHalHandle, void *p2, tANI_U32 scanID, eCsrScanStatus status);
Jeff Johnson295189b2012-06-20 16:38:30 -07001454
1455
1456
1457///////////////////////////////////////////Common Roam starts
1458
1459//pContext is the pContext passed in with the roam request
1460//pParam is a pointer to a tCsrRoamInfo, see definition of eRoamCmdStatus and
1461// eRoamCmdResult for detail valid members. It may be NULL
1462//roamId is to identify the callback related roam request. 0 means unsolicit
1463//roamStatus is a flag indicating the status of the callback
1464//roamResult is the result
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001465typedef eHalStatus (*csrRoamCompleteCallback)(void *pContext, tCsrRoamInfo *pParam, tANI_U32 roamId,
Jeff Johnson295189b2012-06-20 16:38:30 -07001466 eRoamCmdStatus roamStatus, eCsrRoamResult roamResult);
1467
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001468typedef eHalStatus (*csrRoamSessionCloseCallback)(void *pContext);
Jeff Johnson295189b2012-06-20 16:38:30 -07001469
1470/* ---------------------------------------------------------------------------
1471 \fn csrRoamGetNumPMKIDCache
1472 \brief return number of PMKID cache entries
1473 \return tANI_U32 - the number of PMKID cache entries
1474 -------------------------------------------------------------------------------*/
1475//tANI_U32 csrRoamGetNumPMKIDCache(tHalHandle hHal);
1476
1477/* ---------------------------------------------------------------------------
1478 \fn csrRoamGetPMKIDCache
1479 \brief return PMKID cache from CSR
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001480 \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 -07001481 needed or actually number in tPmkidCacheInfo.
1482 \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return
1483 \return eHalStatus - when fail, it usually means the buffer allocated is not big enough
1484 -------------------------------------------------------------------------------*/
1485//eHalStatus csrRoamGetPMKIDCache(tHalHandle hHal, tANI_U32 *pNum, tPmkidCacheInfo *pPmkidCache);
1486
1487//pProfile - pointer to tCsrRoamProfile
1488#define CSR_IS_START_IBSS(pProfile) (eCSR_BSS_TYPE_START_IBSS == (pProfile)->BSSType)
1489#define CSR_IS_JOIN_TO_IBSS(pProfile) (eCSR_BSS_TYPE_IBSS == (pProfile)->BSSType)
1490#define CSR_IS_IBSS(pProfile) ( CSR_IS_START_IBSS(pProfile) || CSR_IS_JOIN_TO_IBSS(pProfile) )
1491#define CSR_IS_INFRASTRUCTURE(pProfile) (eCSR_BSS_TYPE_INFRASTRUCTURE == (pProfile)->BSSType)
1492#define CSR_IS_ANY_BSS_TYPE(pProfile) (eCSR_BSS_TYPE_ANY == (pProfile)->BSSType)
1493#define CSR_IS_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1494#define CSR_IS_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1495#define CSR_IS_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
Jeff Johnson295189b2012-06-20 16:38:30 -07001496#define CSR_IS_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
Jeff Johnson295189b2012-06-20 16:38:30 -07001497
1498//pProfile - pointer to tCsrRoamConnectedProfile
Jeff Johnson295189b2012-06-20 16:38:30 -07001499#define CSR_IS_CONN_INFRA_AP( pProfile ) ( eCSR_BSS_TYPE_INFRA_AP == (pProfile)->BSSType )
Jeff Johnson295189b2012-06-20 16:38:30 -07001500#define CSR_IS_CONN_WDS_AP( pProfile ) ( eCSR_BSS_TYPE_WDS_AP == (pProfile)->BSSType )
1501#define CSR_IS_CONN_WDS_STA( pProfile ) ( eCSR_BSS_TYPE_WDS_STA == (pProfile)->BSSType )
1502#define CSR_IS_CONN_WDS( pProfile ) ( CSR_IS_WDS_AP( pProfile ) || CSR_IS_WDS_STA( pProfile ) )
1503
1504
1505
1506///////////////////////////////////////////Common Roam ends
1507
1508
1509
Jeff Johnson295189b2012-06-20 16:38:30 -07001510/* ---------------------------------------------------------------------------
1511 \fn csrSetChannels
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001512 \brief HDD calls this function to change some global settings.
Jeff Johnson295189b2012-06-20 16:38:30 -07001513 caller must set the all fields or call csrGetConfigParam to prefill the fields.
1514 \param pParam - caller allocated memory
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001515 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001516 -------------------------------------------------------------------------------*/
1517
1518eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam );
1519
1520eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode);
Jeff Johnson295189b2012-06-20 16:38:30 -07001521
1522
1523//enum to string conversion for debug output
1524const char * get_eRoamCmdStatus_str(eRoamCmdStatus val);
1525const char * get_eCsrRoamResult_str(eCsrRoamResult val);
1526/* ---------------------------------------------------------------------------
1527 \fn csrSetPhyMode
1528 \brief HDD calls this function to set the phyMode.
1529 This function must be called after CFG is downloaded and all the band/mode setting already passed into
1530 CSR.
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001531 \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 -07001532 See eCsrPhyMode for definition
1533 \param eBand - specify the operational band (2.4, 5 or both)
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001534 \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether
Jeff Johnson295189b2012-06-20 16:38:30 -07001535 a restart is needed to apply the change
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001536 \return eHalStatus
Jeff Johnson295189b2012-06-20 16:38:30 -07001537 -------------------------------------------------------------------------------*/
1538eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI_BOOLEAN *pfRestartNeeded);
1539
1540void csrDumpInit(tHalHandle hHal);
1541
1542
1543/*---------------------------------------------------------------------------
1544 This is the type for a link quality callback to be registered with SME
1545 for indications
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001546 Once the link quality has been indicated, subsequently, link indications are
Jeff Johnson295189b2012-06-20 16:38:30 -07001547 posted each time there is a CHANGE in link quality.
1548 *** If there is no change in link, there will be no indication ***
1549
1550 The indications may be based on one or more criteria internal to SME
1551 such as RSSI and PER.
1552
1553 \param ind - Indication being posted
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001554 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001555 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001556
Jeff Johnson295189b2012-06-20 16:38:30 -07001557---------------------------------------------------------------------------*/
1558typedef void (* csrRoamLinkQualityIndCallback)
1559 (eCsrRoamLinkQualityInd ind, void *pContext);
1560
1561
1562/*---------------------------------------------------------------------------
1563 This is the type for a statistics callback to be registered with SME
1564 for stats reporting
1565
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001566 Since the client requesting for the stats already know which class/type of
1567 stats it asked for, the callback will carry them in the rsp buffer
1568 (void * stats) whose size will be same as the size of requested stats &
Jeff Johnson295189b2012-06-20 16:38:30 -07001569 will be exactly in the same order requested in the stats mask from LSB to MSB
1570
1571 \param stats - stats rsp buffer sent back with the report
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001572 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001573 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001574
Jeff Johnson295189b2012-06-20 16:38:30 -07001575---------------------------------------------------------------------------*/
1576typedef void ( *tCsrStatsCallback) (void * stats, void *pContext);
1577
1578/*---------------------------------------------------------------------------
1579 This is the type for a rssi callback to be registered with SME
1580 for getting rssi
1581
1582 \param rssi - rssi
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001583 \param pContext - any user data given at callback registration.
Jeff Johnson295189b2012-06-20 16:38:30 -07001584 \return None
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001585
Jeff Johnson295189b2012-06-20 16:38:30 -07001586---------------------------------------------------------------------------*/
1587
1588typedef void ( *tCsrRssiCallback) (v_S7_t rssi, tANI_U32 staId, void *pContext);
1589
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001590
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001591#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001592/*---------------------------------------------------------------------------
1593 This is the type for a tsm stats callback to be registered with SME
1594 for getting tsm stats
1595
1596 \param tsmMetrics - tsmMetrics
1597 \param pContext - any user data given at callback registration.
1598 \return None
1599
1600---------------------------------------------------------------------------*/
1601
1602typedef void ( *tCsrTsmStatsCallback) (tAniTrafStrmMetrics tsmMetrics, tANI_U32 staId, void *pContext);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08001603#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -07001604
Madan Mohan Koyyalamudid9383fd2013-08-13 09:27:30 +05301605/*---------------------------------------------------------------------------
1606 This is the type for a snr callback to be registered with SME
1607 for getting snr
1608
1609 \param snr
1610 \param pContext - any user data given at callback registration.
1611 \return None
1612
1613---------------------------------------------------------------------------*/
1614typedef void (*tCsrSnrCallback) (v_S7_t snr, tANI_U32 staId, void *pContext);
1615
Jeff Johnson295189b2012-06-20 16:38:30 -07001616#ifdef WLAN_FEATURE_VOWIFI_11R
1617eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBssDescription pBssDescription);
1618#endif
1619
1620/*---------------------------------------------------------------------------
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001621 This is the function to change the Band configuraiton (ALL/2.4 GHZ/5 GHZ)
Jeff Johnson295189b2012-06-20 16:38:30 -07001622
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001623 \param hHal - handle to Hal context
Jeff Johnson295189b2012-06-20 16:38:30 -07001624 \param eBand - band value
1625 \return eHalStatus
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001626
Jeff Johnson295189b2012-06-20 16:38:30 -07001627---------------------------------------------------------------------------*/
1628eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand);
1629
1630/*---------------------------------------------------------------------------
1631 This is the function to get the current operating band value
1632 \param hHal - handl to Hal context
1633 \return eCsrband - band value
Kiran Kumar Lokere3527f0c2013-02-24 22:21:28 -08001634
Jeff Johnson295189b2012-06-20 16:38:30 -07001635---------------------------------------------------------------------------*/
1636eCsrBand csrGetCurrentBand (tHalHandle hHal);
1637
1638#endif
1639