blob: 3a2368ea831dc1a038fbd6ffd8490617f22a1801 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
2 * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/** ------------------------------------------------------------------------- *
23 ------------------------------------------------------------------------- *
24
25
26 \file csrSupport.h
27
28 Exports and types for the Common Scan and Roaming supporting interfaces.
29
30 Copyright (C) 2006 Airgo Networks, Incorporated
31
32 ========================================================================== */
33#ifndef CSR_SUPPORT_H__
34#define CSR_SUPPORT_H__
35
36#include "csrLinkList.h"
37#include "csrApi.h"
38#include "vos_nvitem.h"
39
40#ifdef FEATURE_WLAN_WAPI
41#define CSR_WAPI_OUI_SIZE ( 4 )
42#define CSR_WAPI_VERSION_SUPPORTED ( 1 )
43#define CSR_WAPI_MAX_AUTH_SUITES ( 2 )
44#define CSR_WAPI_MAX_CYPHERS ( 5 )
45#define CSR_WAPI_MAX_UNICAST_CYPHERS ( 5 )
46#define CSR_WAPI_MAX_MULTICAST_CYPHERS ( 1 )
47#endif /* FEATURE_WLAN_WAPI */
48
49#define CSR_RSN_OUI_SIZE ( 4 )
50#define CSR_RSN_VERSION_SUPPORTED ( 1 )
51#define CSR_RSN_MAX_AUTH_SUITES ( 2 )
52#define CSR_RSN_MAX_CYPHERS ( 5 )
53#define CSR_RSN_MAX_UNICAST_CYPHERS ( 5 )
54#define CSR_RSN_MAX_MULTICAST_CYPHERS ( 1 )
55
56#define CSR_WPA_OUI_SIZE ( 4 )
57#define CSR_WPA_VERSION_SUPPORTED ( 1 )
58#define CSR_WME_OUI_SIZE ( 4 )
59#define CSR_WPA_MAX_AUTH_SUITES ( 2 )
60#define CSR_WPA_MAX_CYPHERS ( 5 )
61#define CSR_WPA_MAX_UNICAST_CYPHERS ( 5 )
62#define CSR_WPA_MAX_MULTICAST_CYPHERS ( 1 )
63#define CSR_WPA_IE_MIN_SIZE ( 6 ) // minimum size of the IE->length is the size of the Oui + Version.
64#define CSR_WPA_IE_MIN_SIZE_W_MULTICAST ( HDD_WPA_IE_MIN_SIZE + HDD_WPA_OUI_SIZE )
65#define CSR_WPA_IE_MIN_SIZE_W_UNICAST ( HDD_WPA_IE_MIN_SIZE + HDD_WPA_OUI_SIZE + sizeof( pWpaIe->cUnicastCyphers ) )
66
67#define CSR_DOT11_SUPPORTED_RATES_MAX ( 12 )
68#define CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX ( 8 )
69
70#define CSR_DOT11_MAX_NUM_SUPPORTED_11B_RATES ( 4 )
71#define CSR_DOT11_MAX_NUM_SUPPORTED_11A_RATES ( 8 )
72#define CSR_DOT11_BASIC_RATE_MASK ( 0x80 )
73
74#define CSR_WME_INFO_IE_VERSION_SUPPORTED ( 1 )
75#define CSR_WME_PARM_IE_VERSION_SUPPORTED ( 1 )
76
77#define CSR_PASSIVE_SCAN_STARTING_CHANNEL ( 52)
78#define CSR_PASSIVE_SCAN_ENDING_CHANNEL ( 140)
79
80#define CSR_DOT11_MAX_11A_RATE ( 54 * 2 )
81#define CSR_DOT11_MIN_11A_RATE ( 6 * 2 )
82#define CSR_DOT11_MAX_11B_RATE ( 11 * 2 )
83#define CSR_DOT11_MIN_11B_RATE ( 1 * 2 )
84#define CSR_DOT11_MAX_11G_RATE ( 54 * 2 )
85#define CSR_DOT11_MIN_11G_RATE ( 6 * 2 )
86
87//Define the frequency ranges that need to be passive scan, MHz
88#define CSR_PASSIVE_SCAN_CAT1_LOW 5250
89#define CSR_PASSIVE_SCAN_CAT1_HIGH 5350
90#define CSR_PASSIVE_SCAN_CAT2_LOW 5470
91#define CSR_PASSIVE_SCAN_CAT2_HIGH 5725
92#define CSR_PASSIVE_SCAN_CAT3_LOW 5500
93#define CSR_PASSIVE_SCAN_CAT3_HIGH 5560
94
95#define CSR_OUI_USE_GROUP_CIPHER_INDEX 0x00
96#define CSR_OUI_WEP40_OR_1X_INDEX 0x01
97#define CSR_OUI_TKIP_OR_PSK_INDEX 0x02
98#define CSR_OUI_RESERVED_INDEX 0x03
99#define CSR_OUI_AES_INDEX 0x04
100#define CSR_OUI_WEP104_INDEX 0x05
101
102#ifdef FEATURE_WLAN_WAPI
103#define CSR_OUI_WAPI_RESERVED_INDEX 0x00
104#define CSR_OUI_WAPI_WAI_CERT_OR_SMS4_INDEX 0x01
105#define CSR_OUI_WAPI_WAI_PSK_INDEX 0x02
106#endif /* FEATURE_WLAN_WAPI */
107
108
109typedef enum
110{
111 // 11b rates
112 eCsrSuppRate_1Mbps = 1 * 2,
113 eCsrSuppRate_2Mbps = 2 * 2,
114 eCsrSuppRate_5_5Mbps = 11, // 5.5 * 2
115 eCsrSuppRate_11Mbps = 11 * 2,
116
117 // 11a / 11g rates
118 eCsrSuppRate_6Mbps = 6 * 2,
119 eCsrSuppRate_9Mbps = 9 * 2,
120 eCsrSuppRate_12Mbps = 12 * 2,
121 eCsrSuppRate_18Mbps = 18 * 2,
122 eCsrSuppRate_24Mbps = 24 * 2,
123 eCsrSuppRate_36Mbps = 36 * 2,
124 eCsrSuppRate_48Mbps = 48 * 2,
125 eCsrSuppRate_54Mbps = 54 * 2,
126
127 // airgo proprietary rates
128 eCsrSuppRate_10Mbps = 10 * 2,
129 eCsrSuppRate_10_5Mbps= 21, // 10.5 * 2
130 eCsrSuppRate_20Mbps = 20 * 2,
131 eCsrSuppRate_21Mbps = 21 * 2,
132 eCsrSuppRate_40Mbps = 40 * 2,
133 eCsrSuppRate_42Mbps = 42 * 2,
134 eCsrSuppRate_60Mbps = 60 * 2,
135 eCsrSuppRate_63Mbps = 63 * 2,
136 eCsrSuppRate_72Mbps = 72 * 2,
137 eCsrSuppRate_80Mbps = 80 * 2,
138 eCsrSuppRate_84Mbps = 84 * 2,
139 eCsrSuppRate_96Mbps = 96 * 2,
140 eCsrSuppRate_108Mbps = 108 * 2,
141 eCsrSuppRate_120Mbps = 120 * 2,
142 eCsrSuppRate_126Mbps = 126 * 2,
143 eCsrSuppRate_144Mbps = 144 * 2,
144 eCsrSuppRate_160Mbps = 160 * 2,
145 eCsrSuppRate_168Mbps = 168 * 2,
146 eCsrSuppRate_192Mbps = 192 * 2,
147 eCsrSuppRate_216Mbps = 216 * 2,
148 eCsrSuppRate_240Mbps = 240 * 2
149}eCsrSupportedRates;
150
151typedef enum
152{
153 eCsrPassiveScanNot, //can be scanned actively on the whole 5GHz band
154 eCsrPassiveScanCat1, //always passive scan from 5250 to 5350MHz
155 eCsrPassiveScanCat2, //always passive scan from 5250 to 5350MHz, and from 5470 to 5725MHz
156 eCsrPassiveScanCat3, //always passive scan from 5250 to 5350MHz, from 5470 to 5725MHz, and from 5500 to 5560MHz
157}eCsrPassiveScanCat;
158
159
160//Please donot insert in the middle of the enum here because they tie to the indiex
161typedef enum
162{
163 eCSR_COUNTRY_INDEX_US = 0, //Always set US as index 0
164 eCSR_COUNTRY_INDEX_ANDORRA,
165 eCSR_COUNTRY_INDEX_UAE, //United Arab Emirates
166 eCSR_COUNTRY_INDEX_AFGHANISTAN,
167 eCSR_COUNTRY_INDEX_ANTIGUA_AND_BARBUDA,
168 eCSR_COUNTRY_INDEX_ANGUILLA,
169 eCSR_COUNTRY_INDEX_ALBANIA,
170 eCSR_COUNTRY_INDEX_ARMENIA,
171 eCSR_COUNTRY_INDEX_NETHERLANDS_ANTILLES,
172 eCSR_COUNTRY_INDEX_ANGOLA,
173 eCSR_COUNTRY_INDEX_ANTARCTICA,
174 eCSR_COUNTRY_INDEX_ARGENTINA,
175 eCSR_COUNTRY_INDEX_AMERICAN_SAMOA,
176 eCSR_COUNTRY_INDEX_AUSTRIA,
177 eCSR_COUNTRY_INDEX_AUSTRALIA,
178 eCSR_COUNTRY_INDEX_ARUBA,
179 eCSR_COUNTRY_INDEX_ALAND_ISLANDS,
180 eCSR_COUNTRY_INDEX_AZERBAIJAN,
181 eCSR_COUNTRY_INDEX_BOSNIA_AND_HERZEGOVINA,
182 eCSR_COUNTRY_INDEX_BARBADOS,
183 eCSR_COUNTRY_INDEX_BANGLADESH,
184 eCSR_COUNTRY_INDEX_BELGIUM,
185 eCSR_COUNTRY_INDEX_BURKINA_FASO,
186 eCSR_COUNTRY_INDEX_BULGARIA,
187 eCSR_COUNTRY_INDEX_BAHRAIN,
188 eCSR_COUNTRY_INDEX_BURUNDI,
189 eCSR_COUNTRY_INDEX_BENIN,
190 eCSR_COUNTRY_INDEX_SAINT_BARTHELEMY,
191 eCSR_COUNTRY_INDEX_BERMUDA,
192 eCSR_COUNTRY_INDEX_BRUNEI_DARUSSALAM,
193 eCSR_COUNTRY_INDEX_BOLVIA,
194 eCSR_COUNTRY_INDEX_BRAZIL,
195 eCSR_COUNTRY_INDEX_BAHAMAS,
196 eCSR_COUNTRY_INDEX_BHUTAN,
197 eCSR_COUNTRY_INDEX_BOUVET_ISLAND,
198 eCSR_COUNTRY_INDEX_BOTSWANA,
199 eCSR_COUNTRY_INDEX_BELARUS,
200 eCSR_COUNTRY_INDEX_BELIZE,
201 eCSR_COUNTRY_INDEX_CANADA,
202 eCSR_COUNTRY_INDEX_COCOS_KEELING_ISLANDS,
203 eCSR_COUNTRY_INDEX_CONGO_REP,
204 eCSR_COUNTRY_INDEX_CENTRAL_AFRICAN,
205 eCSR_COUNTRY_INDEX_CONGO,
206 eCSR_COUNTRY_INDEX_SWITZERLAND,
207 eCSR_COUNTRY_INDEX_COTE_DIVOIRE,
208 eCSR_COUNTRY_INDEX_COOK_ISLANDS,
209 eCSR_COUNTRY_INDEX_CHILE,
210 eCSR_COUNTRY_INDEX_CAMEROON,
211 eCSR_COUNTRY_INDEX_CHINA,
212 eCSR_COUNTRY_INDEX_COLUMBIA,
213 eCSR_COUNTRY_INDEX_COSTA_RICA,
214 eCSR_COUNTRY_INDEX_CUBA,
215 eCSR_COUNTRY_INDEX_CAPE_VERDE,
216 eCSR_COUNTRY_INDEX_CHRISTMAS_ISLAND,
217 eCSR_COUNTRY_INDEX_CYPRUS,
218 eCSR_COUNTRY_INDEX_CZECH,
219 eCSR_COUNTRY_INDEX_GERMANY,
220 eCSR_COUNTRY_INDEX_DJIBOUTI,
221 eCSR_COUNTRY_INDEX_DENMARK,
222 eCSR_COUNTRY_INDEX_DOMINICA,
223 eCSR_COUNTRY_INDEX_DOMINICAN_REP,
224 eCSR_COUNTRY_INDEX_ALGERIA,
225 eCSR_COUNTRY_INDEX_ECUADOR,
226 eCSR_COUNTRY_INDEX_ESTONIA,
227 eCSR_COUNTRY_INDEX_EGYPT,
228 eCSR_COUNTRY_INDEX_WESTERN_SAHARA,
229 eCSR_COUNTRY_INDEX_ERITREA,
230 eCSR_COUNTRY_INDEX_SPAIN,
231 eCSR_COUNTRY_INDEX_ETHIOPIA,
232 eCSR_COUNTRY_INDEX_FINLAND,
233 eCSR_COUNTRY_INDEX_FIJI,
234 eCSR_COUNTRY_INDEX_FALKLAND_ISLANDS,
235 eCSR_COUNTRY_INDEX_MICRONESIA,
236 eCSR_COUNTRY_INDEX_FAROE_ISLANDS,
237 eCSR_COUNTRY_INDEX_FRANCE,
238 eCSR_COUNTRY_INDEX_GABON,
239 eCSR_COUNTRY_INDEX_UNITED_KINGDOM,
240 eCSR_COUNTRY_INDEX_GRENADA,
241 eCSR_COUNTRY_INDEX_GEORGIA,
242 eCSR_COUNTRY_INDEX_FRENCH_GUIANA,
243 eCSR_COUNTRY_INDEX_GUERNSEY,
244 eCSR_COUNTRY_INDEX_GHANA,
245 eCSR_COUNTRY_INDEX_GIBRALTAR,
246 eCSR_COUNTRY_INDEX_GREENLAND,
247 eCSR_COUNTRY_INDEX_GAMBIA,
248 eCSR_COUNTRY_INDEX_GUINEA,
249 eCSR_COUNTRY_INDEX_GUADELOUPE,
250 eCSR_COUNTRY_INDEX_EQUATORIAL_GUINEA,
251 eCSR_COUNTRY_INDEX_GREECE,
252 eCSR_COUNTRY_INDEX_SOUTH_GEORGIA,
253 eCSR_COUNTRY_INDEX_GUATEMALA,
254 eCSR_COUNTRY_INDEX_GUAM,
255 eCSR_COUNTRY_INDEX_GUINEA_BISSAU,
256 eCSR_COUNTRY_INDEX_GUYANA,
257 eCSR_COUNTRY_INDEX_HONGKONG,
258 eCSR_COUNTRY_INDEX_HEARD_ISLAND,
259 eCSR_COUNTRY_INDEX_HONDURAS,
260 eCSR_COUNTRY_INDEX_CROATIA,
261 eCSR_COUNTRY_INDEX_HAITI,
262 eCSR_COUNTRY_INDEX_HUNGARY,
263 eCSR_COUNTRY_INDEX_INDONESIA,
264 eCSR_COUNTRY_INDEX_IRELAND,
265 eCSR_COUNTRY_INDEX_ISRAEL,
266 eCSR_COUNTRY_INDEX_ISLE_OF_MAN,
267 eCSR_COUNTRY_INDEX_INDIA,
268 eCSR_COUNTRY_INDEX_BRITISH_INDIAN,
269 eCSR_COUNTRY_INDEX_IRAQ,
270 eCSR_COUNTRY_INDEX_IRAN,
271 eCSR_COUNTRY_INDEX_ICELAND,
272 eCSR_COUNTRY_INDEX_ITALY,
273 eCSR_COUNTRY_INDEX_JERSEY,
274 eCSR_COUNTRY_INDEX_JAMAICA,
275 eCSR_COUNTRY_INDEX_JORDAN,
276 eCSR_COUNTRY_INDEX_JAPAN,
277 eCSR_COUNTRY_INDEX_KENYA,
278 eCSR_COUNTRY_INDEX_KYRGYZSTAN,
279 eCSR_COUNTRY_INDEX_CAMBODIA,
280 eCSR_COUNTRY_INDEX_KIRIBATI,
281 eCSR_COUNTRY_INDEX_COMOROS,
282 eCSR_COUNTRY_INDEX_SAINT_KITTS_AND_NEVIS,
283 eCSR_COUNTRY_INDEX_KOREA_NORTH,
284 eCSR_COUNTRY_INDEX_KOREA_SOUTH,
285 eCSR_COUNTRY_INDEX_KUWAIT,
286 eCSR_COUNTRY_INDEX_CAYMAN_ISLANDS,
287 eCSR_COUNTRY_INDEX_KAZAKHSTAN,
288 eCSR_COUNTRY_INDEX_LAO,
289 eCSR_COUNTRY_INDEX_LEBANON,
290 eCSR_COUNTRY_INDEX_SAINT_LUCIA,
291 eCSR_COUNTRY_INDEX_LIECHTENSTEIN,
292 eCSR_COUNTRY_INDEX_SRI_LANKA,
293 eCSR_COUNTRY_INDEX_LIBERIA,
294 eCSR_COUNTRY_INDEX_LESOTHO,
295 eCSR_COUNTRY_INDEX_LITHUANIA,
296 eCSR_COUNTRY_INDEX_LUXEMBOURG,
297 eCSR_COUNTRY_INDEX_LATVIA,
298 eCSR_COUNTRY_INDEX_LIBYAN_ARAB_JAMAHIRIYA,
299 eCSR_COUNTRY_INDEX_MOROCCO,
300 eCSR_COUNTRY_INDEX_MONACO,
301 eCSR_COUNTRY_INDEX_MOLDOVA,
302 eCSR_COUNTRY_INDEX_MONTENEGRO,
303 eCSR_COUNTRY_INDEX_MADAGASCAR,
304 eCSR_COUNTRY_INDEX_MARSHALL_ISLANDS,
305 eCSR_COUNTRY_INDEX_MACEDONIA,
306 eCSR_COUNTRY_INDEX_MALI,
307 eCSR_COUNTRY_INDEX_MYANMAR,
308 eCSR_COUNTRY_INDEX_MONGOLIA,
309 eCSR_COUNTRY_INDEX_MACAO,
310 eCSR_COUNTRY_INDEX_NORTHERN_MARIANA_ISLANDS,
311 eCSR_COUNTRY_INDEX_MARTINIQUE,
312 eCSR_COUNTRY_INDEX_MAURITANIA,
313 eCSR_COUNTRY_INDEX_MONTSERRAT,
314 eCSR_COUNTRY_INDEX_MALTA,
315 eCSR_COUNTRY_INDEX_MAURITIUS,
316 eCSR_COUNTRY_INDEX_MALDIVES,
317 eCSR_COUNTRY_INDEX_MALAWI,
318 eCSR_COUNTRY_INDEX_MEXICO,
319 eCSR_COUNTRY_INDEX_MALAYSIA,
320 eCSR_COUNTRY_INDEX_MOZAMBIQUE,
321 eCSR_COUNTRY_INDEX_NAMIBIA,
322 eCSR_COUNTRY_INDEX_NEW_CALENDONIA,
323 eCSR_COUNTRY_INDEX_NIGER,
324 eCSR_COUNTRY_INDEX_NORFOLK_ISLAND,
325 eCSR_COUNTRY_INDEX_NIGERIA,
326 eCSR_COUNTRY_INDEX_NICARAGUA,
327 eCSR_COUNTRY_INDEX_NETHERLANDS,
328 eCSR_COUNTRY_INDEX_NORWAY,
329 eCSR_COUNTRY_INDEX_NEPAL,
330 eCSR_COUNTRY_INDEX_NAURU,
331 eCSR_COUNTRY_INDEX_NIUE,
332 eCSR_COUNTRY_INDEX_NEW_ZEALAND,
333 eCSR_COUNTRY_INDEX_OMAN,
334 eCSR_COUNTRY_INDEX_PANAMA,
335 eCSR_COUNTRY_INDEX_PERU,
336 eCSR_COUNTRY_INDEX_FRENCH_POLYNESIA,
337 eCSR_COUNTRY_INDEX_PAPUA_NEW_HUINEA,
338 eCSR_COUNTRY_INDEX_PHILIPPINES,
339 eCSR_COUNTRY_INDEX_PAKISTAN,
340 eCSR_COUNTRY_INDEX_POLAND,
341 eCSR_COUNTRY_INDEX_SAINT_PIERRE_AND_MIQUELON,
342 eCSR_COUNTRY_INDEX_PITCAIRN,
343 eCSR_COUNTRY_INDEX_PUERTO_RICO,
344 eCSR_COUNTRY_INDEX_PALESTINIAN_TERRITOTY_OCCUPIED,
345 eCSR_COUNTRY_INDEX_PORTUGAL,
346 eCSR_COUNTRY_INDEX_PALAU,
347 eCSR_COUNTRY_INDEX_PARAGUAY,
348 eCSR_COUNTRY_INDEX_QATAR,
349 eCSR_COUNTRY_INDEX_REUNION,
350 eCSR_COUNTRY_INDEX_ROMANIA,
351 eCSR_COUNTRY_INDEX_SERBIA,
352 eCSR_COUNTRY_INDEX_RUSSIAN,
353 eCSR_COUNTRY_INDEX_RWANDA,
354 eCSR_COUNTRY_INDEX_SAUDI_ARABIA,
355 eCSR_COUNTRY_INDEX_SOLOMON_ISLANDS,
356 eCSR_COUNTRY_INDEX_SEYCHELLES,
357 eCSR_COUNTRY_INDEX_SUDAN,
358 eCSR_COUNTRY_INDEX_SWEDEN,
359 eCSR_COUNTRY_INDEX_SINGAPORE,
360 eCSR_COUNTRY_INDEX_SAINT_HELENA,
361 eCSR_COUNTRY_INDEX_SLOVENIA,
362 eCSR_COUNTRY_INDEX_SVALBARD_AND_JAN_MAYEN,
363 eCSR_COUNTRY_INDEX_SLOVAKIA,
364 eCSR_COUNTRY_INDEX_SIERRA_LEONE,
365 eCSR_COUNTRY_INDEX_SAN_MARINO,
366 eCSR_COUNTRY_INDEX_SENEGAL,
367 eCSR_COUNTRY_INDEX_SOMOLIA,
368 eCSR_COUNTRY_INDEX_SURINAME,
369 eCSR_COUNTRY_INDEX_SAO_TOME_AND_PRINCIPE,
370 eCSR_COUNTRY_INDEX_EL_SALVADOR,
371 eCSR_COUNTRY_INDEX_SYRIAN_REP,
372 eCSR_COUNTRY_INDEX_SWAZILAND,
373 eCSR_COUNTRY_INDEX_TURKS_AND_CAICOS_ISLANDS,
374 eCSR_COUNTRY_INDEX_CHAD,
375 eCSR_COUNTRY_INDEX_FRENCH_SOUTHERN_TERRRTORY,
376 eCSR_COUNTRY_INDEX_TOGO,
377 eCSR_COUNTRY_INDEX_THAILAND,
378 eCSR_COUNTRY_INDEX_TAJIKSTAN,
379 eCSR_COUNTRY_INDEX_TOKELAU,
380 eCSR_COUNTRY_INDEX_TIMOR_LESTE,
381 eCSR_COUNTRY_INDEX_TURKMENISTAN,
382 eCSR_COUNTRY_INDEX_TUNISIA,
383 eCSR_COUNTRY_INDEX_TONGA,
384 eCSR_COUNTRY_INDEX_TURKEY,
385 eCSR_COUNTRY_INDEX_TRINIDAD_AND_TOBAGO,
386 eCSR_COUNTRY_INDEX_TUVALU,
387 eCSR_COUNTRY_INDEX_TAIWAN,
388 eCSR_COUNTRY_INDEX_TANZANIA,
389 eCSR_COUNTRY_INDEX_UKRAINE,
390 eCSR_COUNTRY_INDEX_UGANDA,
391 eCSR_COUNTRY_INDEX_US_MINOR_OUTLYING_ISLANDS,
392 eCSR_COUNTRY_INDEX_URUGUAY,
393 eCSR_COUNTRY_INDEX_UZBEKISTAN,
394 eCSR_COUNTRY_INDEX_HOLY_SEE,
395 eCSR_COUNTRY_INDEX_SAINT_VINCENT_AND_THE_GRENADINES,
396 eCSR_COUNTRY_INDEX_VENESUELA,
397 eCSR_COUNTRY_INDEX_VIRGIN_ISLANDS_BRITISH,
398 eCSR_COUNTRY_INDEX_VIRGIN_ISLANDS_US,
399 eCSR_COUNTRY_INDEX_VIET_NAM,
400 eCSR_COUNTRY_INDEX_VANUATU,
401 eCSR_COUNTRY_INDEX_WALLIS_AND_FUTUNA,
402 eCSR_COUNTRY_INDEX_SAMOA,
403 eCSR_COUNTRY_INDEX_YEMEN,
404 eCSR_COUNTRY_INDEX_MAYOTTE,
405 eCSR_COUNTRY_INDEX_SOTHER_AFRICA,
406 eCSR_COUNTRY_INDEX_ZAMBIA,
407 eCSR_COUNTRY_INDEX_ZIMBABWE,
408
409 eCSR_COUNTRY_INDEX_KOREA_1,
410 eCSR_COUNTRY_INDEX_KOREA_2,
411 eCSR_COUNTRY_INDEX_KOREA_3,
412 eCSR_COUNTRY_INDEX_KOREA_4,
413
414 eCSR_NUM_COUNTRY_INDEX,
415}eCsrCountryIndex;
416//Please donot insert in the middle of the enum above because they tie to the indiex
417
418
419typedef struct tagCsrSirMBMsgHdr
420{
421 tANI_U16 type;
422 tANI_U16 msgLen;
423
424}tCsrSirMBMsgHdr;
425
426typedef struct tagCsrCfgMsgTlvHdr
427{
428 tANI_U32 type;
429 tANI_U32 length;
430
431}tCsrCfgMsgTlvHdr;
432
433
434
435typedef struct tagCsrCfgMsgTlv
436{
437 tCsrCfgMsgTlvHdr Hdr;
438 tANI_U32 variable[ 1 ]; // placeholder for the data
439
440}tCsrCfgMsgTlv;
441
442typedef struct tagCsrCfgGetRsp
443{
444 tCsrSirMBMsgHdr hdr;
445 tANI_U32 respStatus;
446 tANI_U32 paramId;
447 tANI_U32 attribLen;
448 tANI_U32 attribVal[1];
449}tCsrCfgGetRsp;
450
451typedef struct tagCsrCfgSetRsp
452{
453
454 tCsrSirMBMsgHdr hdr;
455 tANI_U32 respStatus;
456 tANI_U32 paramId;
457}tCsrCfgSetRsp;
458
459
460typedef struct tagCsrDomainChnScanInfo
461{
462 tANI_U8 chnId;
463 tSirScanType scanType; //whether this channel must be scan passively
464}tCsrDomainChnScanInfo;
465
466
467#if defined(__ANI_COMPILER_PRAGMA_PACK_STACK)
468#pragma pack( push )
469#pragma pack( 1 )
470#elif defined(__ANI_COMPILER_PRAGMA_PACK)
471#pragma pack( 1 )
472#endif
473
474// Generic Information Element Structure
475typedef __ani_attr_pre_packed struct sDot11IEHeader
476{
477 tANI_U8 ElementID;
478 tANI_U8 Length;
479}__ani_attr_packed tDot11IEHeader;
480
481typedef __ani_attr_pre_packed struct tagCsrWmeInfoIe
482{
483 tDot11IEHeader IeHeader;
484 tANI_U8 Oui[ CSR_WME_OUI_SIZE ]; // includes the 3 byte OUI + 1 byte Type
485 tANI_U8 Subtype;
486 tANI_U8 Version;
487 tANI_U8 QoSInfo;
488
489} __ani_attr_packed tCsrWmeInfoIe;
490
491typedef __ani_attr_pre_packed struct tagCsrWmeAcParms
492{
493 tANI_U8 AciAifsn;
494 tANI_U8 EcwMinEcwMax;
495 tANI_U16 TxOpLimit;
496
497} __ani_attr_packed tCsrWmeAcParms;
498
499typedef __ani_attr_pre_packed struct tagCsrWmeParmIe
500{
501 tDot11IEHeader IeHeader;
502 tANI_U8 Oui[ CSR_WME_OUI_SIZE ]; // includes the 3 byte OUI + 1 byte Type
503 tANI_U8 Subtype;
504 tANI_U8 Version;
505 tANI_U8 QoSInfo;
506 tANI_U8 Reserved;
507 tCsrWmeAcParms BestEffort;
508 tCsrWmeAcParms Background;
509 tCsrWmeAcParms Video;
510 tCsrWmeAcParms Voice;
511
512} __ani_attr_packed tCsrWmeParmIe;
513
514typedef __ani_attr_pre_packed struct tagCsrWpaIe
515{
516 tDot11IEHeader IeHeader;
517 tANI_U8 Oui[ CSR_WPA_OUI_SIZE ];
518 tANI_U16 Version;
519 tANI_U8 MulticastOui[ CSR_WPA_OUI_SIZE ];
520 tANI_U16 cUnicastCyphers;
521
522 __ani_attr_pre_packed struct {
523
524 tANI_U8 Oui[ CSR_WPA_OUI_SIZE ];
525
526 } __ani_attr_packed UnicastOui[ 1 ];
527
528} __ani_attr_packed tCsrWpaIe;
529
530typedef __ani_attr_pre_packed struct tagCsrWpaAuthIe
531{
532
533 tANI_U16 cAuthenticationSuites;
534
535 __ani_attr_pre_packed struct {
536
537 tANI_U8 Oui[ CSR_WPA_OUI_SIZE ];
538
539 } __ani_attr_packed AuthOui[ 1 ];
540
541} __ani_attr_packed tCsrWpaAuthIe;
542
543
544typedef __ani_attr_pre_packed struct tagCsrRSNIe
545{
546 tDot11IEHeader IeHeader;
547 tANI_U16 Version;
548 tANI_U8 MulticastOui[ CSR_RSN_OUI_SIZE ];
549 tANI_U16 cUnicastCyphers;
550
551 __ani_attr_pre_packed struct {
552
553 tANI_U8 Oui[ CSR_RSN_OUI_SIZE ];
554
555 } __ani_attr_packed UnicastOui[ 1 ];
556
557} __ani_attr_packed tCsrRSNIe;
558
559typedef __ani_attr_pre_packed struct tagCsrRSNAuthIe
560{
561 tANI_U16 cAuthenticationSuites;
562 __ani_attr_pre_packed struct {
563
564 tANI_U8 Oui[ CSR_RSN_OUI_SIZE ];
565
566 } __ani_attr_packed AuthOui[ 1 ];
567
568} __ani_attr_packed tCsrRSNAuthIe;
569
570typedef __ani_attr_pre_packed struct tagCsrRSNCapabilities
571{
572 tANI_U16 PreAuthSupported:1;
573 tANI_U16 NoPairwise:1;
574 tANI_U16 PTKSAReplayCounter:2;
575 tANI_U16 GTKSAReplayCounter:2;
576 tANI_U16 Reserved:10;
577} __ani_attr_packed tCsrRSNCapabilities;
578
579typedef __ani_attr_pre_packed struct tagCsrRSNPMKIe
580{
581 tANI_U16 cPMKIDs;
582
583 __ani_attr_pre_packed struct {
584
585 tANI_U8 PMKID[ CSR_RSN_PMKID_SIZE ];
586
587 } __ani_attr_packed PMKIDList[ 1 ];
588
589
590} __ani_attr_packed tCsrRSNPMKIe;
591
592typedef __ani_attr_pre_packed struct tCsrIELenInfo
593{
594 tANI_U8 min;
595 tANI_U8 max;
596} __ani_attr_packed tCsrIELenInfo;
597
598#ifdef FEATURE_WLAN_WAPI
599typedef __ani_attr_pre_packed struct tagCsrWapiIe
600{
601 tDot11IEHeader IeHeader;
602 tANI_U16 Version;
603
604 tANI_U16 cAuthenticationSuites;
605 __ani_attr_pre_packed struct {
606
607 tANI_U8 Oui[ CSR_WAPI_OUI_SIZE ];
608
609 } __ani_attr_packed AuthOui[ 1 ];
610
611 tANI_U16 cUnicastCyphers;
612 __ani_attr_pre_packed struct {
613
614 tANI_U8 Oui[ CSR_WAPI_OUI_SIZE ];
615
616 } __ani_attr_packed UnicastOui[ 1 ];
617
618 tANI_U8 MulticastOui[ CSR_WAPI_OUI_SIZE ];
619
620 __ani_attr_pre_packed struct {
621 tANI_U16 PreAuthSupported:1;
622 tANI_U16 Reserved:15;
623 } __ani_attr_packed tCsrWapiCapabilities;
624
625
626} __ani_attr_packed tCsrWapiIe;
627
628typedef __ani_attr_pre_packed struct tagCsrWAPIBKIe
629{
630 tANI_U16 cBKIDs;
631 __ani_attr_pre_packed struct {
632
633 tANI_U8 BKID[ CSR_WAPI_BKID_SIZE ];
634
635 } __ani_attr_packed BKIDList[ 1 ];
636
637
638} __ani_attr_packed tCsrWAPIBKIe;
639#endif /* FEATURE_WLAN_WAPI */
640
641#if defined(__ANI_COMPILER_PRAGMA_PACK_STACK)
642#pragma pack( pop )
643#endif
644
645// Structure used to describe a group of continuous channels and hook it into the
646// corresponding channel list
647typedef struct tagCsrChannelSet
648{
649 tListElem channelListLink;
650 tANI_U8 firstChannel;
651 tANI_U8 interChannelOffset;
652 tANI_U8 numChannels;
653 tANI_U8 txPower;
654}tCsrChannelSet;
655
656
657typedef struct sDot11InfoIBSSParmSet
658{
659 tDot11IEHeader dot11IEHeader;
660 tANI_U8 ATIMWindow;
661}tDot11InfoIBSSParmSet;
662
663
664typedef struct sDot11IECountry
665{
666 tDot11IEHeader dot11IEHeader;
667 tANI_U8 countryString[3];
668 tSirMacChanInfo chanInfo[1];
669}tDot11IECountry;
670
671
672typedef struct sDot11IEExtenedSupportedRates
673{
674 tDot11IEHeader dot11IEHeader;
675 tANI_U8 ExtendedSupportedRates[ CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX ];
676}tDot11IEExtenedSupportedRates;
677
678#define CSR_DOT11_AP_NAME_MAX_LENGTH ( 32 )
679
680typedef struct tagDot11IEAPName
681{
682 tDot11IEHeader dot11IEHeader;
683 tANI_U8 ApName[ CSR_DOT11_AP_NAME_MAX_LENGTH ];
684}tDot11IEAPName;
685
686typedef struct tagDot11IE11HLocalPowerConstraint
687{
688 tDot11IEHeader dot11IEHeader;
689 tANI_U8 localPowerConstraint;
690
691}tDot11IE11HLocalPowerConstraint;
692
693typedef struct tagRoamingTimerInfo
694{
695 tpAniSirGlobal pMac;
696 tANI_U8 sessionId;
697} tCsrTimerInfo;
698
699
700#define CSR_IS_11A_BSS(pBssDesc) ( eSIR_11A_NW_TYPE == (pBssDesc)->nwType )
701#define CSR_IS_BASIC_RATE(rate) ((rate) & CSR_DOT11_BASIC_RATE_MASK)
702#define CSR_IS_QOS_BSS(pIes) ( (pIes)->WMMParams.present || (pIes)->WMMInfoAp.present )
703
704#define CSR_IS_UAPSD_BSS(pIes) \
705 ( ((pIes)->WMMParams.present && ((pIes)->WMMParams.qosInfo & SME_QOS_AP_SUPPORTS_APSD)) || \
706 ((pIes)->WMMInfoAp.present && (pIes)->WMMInfoAp.uapsd) )
707
708//This macro returns the total length needed of Tlv with with len bytes of data
709#define GET_TLV_MSG_LEN(len) GET_ROUND_UP((sizeof(tCsrCfgMsgTlvHdr) + (len)), sizeof(tANI_U32))
710
711tANI_BOOLEAN csrGetBssIdBssDesc( tHalHandle hHal, tSirBssDescription *pSirBssDesc, tCsrBssid *pBssId );
712tANI_BOOLEAN csrIsBssIdEqual( tHalHandle hHal, tSirBssDescription *pSirBssDesc1, tSirBssDescription *pSirBssDesc2 );
713
714eCsrMediaAccessType csrGetQoSFromBssDesc( tHalHandle hHal, tSirBssDescription *pSirBssDesc,
715 tDot11fBeaconIEs *pIes);
716tANI_BOOLEAN csrIsNULLSSID( tANI_U8 *pBssSsid, tANI_U8 len );
717tANI_BOOLEAN csrIsInfraBssDesc( tSirBssDescription *pSirBssDesc );
718tANI_BOOLEAN csrIsIbssBssDesc( tSirBssDescription *pSirBssDesc );
719tANI_BOOLEAN csrIsPrivacy( tSirBssDescription *pSirBssDesc );
720tSirResultCodes csrGetDisassocRspStatusCode( tSirSmeDisassocRsp *pSmeDisassocRsp );
721tSirResultCodes csrGetDeAuthRspStatusCode( tSirSmeDeauthRsp *pSmeRsp );
722tANI_U32 csrGetFragThresh( tHalHandle hHal );
723tANI_U32 csrGetRTSThresh( tHalHandle hHal );
724eCsrPhyMode csrGetPhyModeFromBssDesc( tSirBssDescription *pSirBssDesc );
725tANI_U32 csrGet11hPowerConstraint( tHalHandle hHal, tDot11fIEPowerConstraints *pPowerConstraint );
726tANI_U8 csrConstructRSNIe( tHalHandle hHal, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
727 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrRSNIe *pRSNIe );
728tANI_U8 csrConstructWpaIe( tHalHandle hHal, tCsrRoamProfile *pProfile, tSirBssDescription *pSirBssDesc,
729 tDot11fBeaconIEs *pIes, tCsrWpaIe *pWpaIe );
730#ifdef FEATURE_WLAN_WAPI
731
732tANI_BOOLEAN csrIsProfileWapi( tCsrRoamProfile *pProfile );
733#endif /* FEATURE_WLAN_WAPI */
734//If a WPAIE exists in the profile, just use it. Or else construct one from the BSS
735//Caller allocated memory for pWpaIe and guarrantee it can contain a max length WPA IE
736tANI_U8 csrRetrieveWpaIe( tHalHandle hHal, tCsrRoamProfile *pProfile, tSirBssDescription *pSirBssDesc,
737 tDot11fBeaconIEs *pIes, tCsrWpaIe *pWpaIe );
738tANI_BOOLEAN csrIsSsidEqual( tHalHandle hHal, tSirBssDescription *pSirBssDesc1,
739 tSirBssDescription *pSirBssDesc2, tDot11fBeaconIEs *pIes2 );
740//Null ssid means match
741tANI_BOOLEAN csrIsSsidInList( tHalHandle hHal, tSirMacSSid *pSsid, tCsrSSIDs *pSsidList );
742tANI_BOOLEAN csrIsProfileWpa( tCsrRoamProfile *pProfile );
743tANI_BOOLEAN csrIsProfileRSN( tCsrRoamProfile *pProfile );
744//This function returns the raw byte array of WPA and/or RSN IE
745tANI_BOOLEAN csrGetWpaRsnIe( tHalHandle hHal, tANI_U8 *pIes, tANI_U32 len,
746 tANI_U8 *pWpaIe, tANI_U8 *pcbWpaIe, tANI_U8 *pRSNIe, tANI_U8 *pcbRSNIe);
747//If a RSNIE exists in the profile, just use it. Or else construct one from the BSS
748//Caller allocated memory for pWpaIe and guarrantee it can contain a max length WPA IE
749tANI_U8 csrRetrieveRsnIe( tHalHandle hHal, tANI_U32 sessionId, tCsrRoamProfile *pProfile, tSirBssDescription *pSirBssDesc,
750 tDot11fBeaconIEs *pIes, tCsrRSNIe *pRsnIe );
751#ifdef FEATURE_WLAN_WAPI
752//If a WAPI IE exists in the profile, just use it. Or else construct one from the BSS
753//Caller allocated memory for pWapiIe and guarrantee it can contain a max length WAPI IE
754tANI_U8 csrRetrieveWapiIe( tHalHandle hHal, tANI_U32 sessionId, tCsrRoamProfile *pProfile, tSirBssDescription *pSirBssDesc,
755 tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe );
756#endif /* FEATURE_WLAN_WAPI */
757tANI_BOOLEAN csrSearchChannelListForTxPower(tHalHandle hHal, tSirBssDescription *pBssDescription, tCsrChannelSet *returnChannelGroup);
758tANI_BOOLEAN csrRatesIsDot11Rate11bSupportedRate( tANI_U8 dot11Rate );
759tANI_BOOLEAN csrRatesIsDot11Rate11aSupportedRate( tANI_U8 dot11Rate );
760tAniEdType csrTranslateEncryptTypeToEdType( eCsrEncryptionType EncryptType );
761//pIes shall contain IEs from pSirBssDesc. It shall be returned from function csrGetParsedBssDescriptionIEs
762tANI_BOOLEAN csrIsSecurityMatch( tHalHandle hHal, tCsrAuthList *authType, tCsrEncryptionList *pUCEncryptionType, tCsrEncryptionList *pMCEncryptionType,
763 tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes,
764 eCsrAuthType *negotiatedAuthtype, eCsrEncryptionType *negotiatedUCCipher, eCsrEncryptionType *negotiatedMCCipher );
765tANI_BOOLEAN csrIsBSSTypeMatch(eCsrRoamBssType bssType1, eCsrRoamBssType bssType2);
766tANI_BOOLEAN csrIsBssTypeIBSS(eCsrRoamBssType bssType);
767tANI_BOOLEAN csrIsBssTypeWDS(eCsrRoamBssType bssType);
768//ppIes can be NULL. If caller want to get the *ppIes allocated by this function, pass in *ppIes = NULL
769//Caller needs to free the memory in this case
770tANI_BOOLEAN csrMatchBSS( tHalHandle hHal, tSirBssDescription *pBssDesc, tCsrScanResultFilter *pFilter,
771 eCsrAuthType *pNegAuth, eCsrEncryptionType *pNegUc, eCsrEncryptionType *pNegMc,
772 tDot11fBeaconIEs **ppIes);
773
774tANI_BOOLEAN csrIsBssidMatch( tHalHandle hHal, tCsrBssid *pProfBssid, tCsrBssid *BssBssid );
775tANI_BOOLEAN csrMatchBSSToConnectProfile( tHalHandle hHal, tCsrRoamConnectedProfile *pProfile,
776 tSirBssDescription *pBssDesc, tDot11fBeaconIEs *pIes );
777tANI_BOOLEAN csrRatesIsDot11RateSupported( tHalHandle hHal, tANI_U8 rate );
778tANI_U16 csrRatesFindBestRate( tSirMacRateSet *pSuppRates, tSirMacRateSet *pExtRates, tSirMacPropRateSet *pPropRates );
779tSirBssType csrTranslateBsstypeToMacType(eCsrRoamBssType csrtype);
780
781//Caller allocates memory for pIEStruct
782eHalStatus csrParseBssDescriptionIEs(tHalHandle hHal, tSirBssDescription *pBssDesc, tDot11fBeaconIEs *pIEStruct);
783//This function will allocate memory for the parsed IEs to the caller. Caller must free the memory
784//after it is done with the data only if this function succeeds
785eHalStatus csrGetParsedBssDescriptionIEs(tHalHandle hHal, tSirBssDescription *pBssDesc, tDot11fBeaconIEs **ppIEStruct);
786
787tANI_BOOLEAN csrValidateCountryString( tHalHandle hHal, tANI_U8 *pCountryString );
788tSirScanType csrGetScanType(tpAniSirGlobal pMac, tANI_U8 chnId);
789
790tANI_U8 csrToUpper( tANI_U8 ch );
791eHalStatus csrGetPhyModeFromBss(tpAniSirGlobal pMac, tSirBssDescription *pBSSDescription,
792 eCsrPhyMode *pPhyMode, tDot11fBeaconIEs *pIes);
793
794//fForce -- force reassoc regardless of whether there is any change
795//The reason is that for UAPSD-bypass, the code underneath this call determine whether
796//to allow UAPSD. The information in pModProfileFields reflects what the user wants.
797//There may be discrepency in it. UAPSD-bypass logic should decide if it needs to reassoc
798eHalStatus csrReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId,
799 tCsrRoamModifyProfileFields *pModProfileFields,
800 tANI_U32 *pRoamId, v_BOOL_t fForce);
801
Jeff Johnsone7245742012-09-05 17:12:55 -0700802eHalStatus
803csrIsconcurrentsessionValid(tpAniSirGlobal pMac,tANI_U32 cursessionId,
804 tVOS_CON_MODE currBssPersona);
805
806//BeaconInterval valiadation for MCC support
807eHalStatus csrValidateBeaconInterval(tpAniSirGlobal pMac, tANI_U8 channelId,
808 tANI_U16 *beaconInterval, tANI_U32 cursessionId,
809 tVOS_CON_MODE currBssPersona);
810
Jeff Johnson295189b2012-06-20 16:38:30 -0700811#ifdef WLAN_FEATURE_VOWIFI_11R
812tANI_BOOLEAN csrIsProfile11r( tCsrRoamProfile *pProfile );
813tANI_BOOLEAN csrIsAuthType11r( eCsrAuthType AuthType );
814#endif
815
816#ifdef FEATURE_WLAN_CCX
817tANI_BOOLEAN csrIsAuthTypeCCX( eCsrAuthType AuthType );
818tANI_BOOLEAN csrIsProfileCCX( tCsrRoamProfile *pProfile );
819#endif
820
821#endif
822