sh: Ignore R_SH_NONE module relocations.
[pandora-kernel.git] / drivers / staging / ath6kl / include / common / regulatory / reg_dbvalues.h
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2005-2010 Atheros Corporation.  All rights reserved.
3 // 
4 //
5 // Permission to use, copy, modify, and/or distribute this software for any
6 // purpose with or without fee is hereby granted, provided that the above
7 // copyright notice and this permission notice appear in all copies.
8 //
9 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 //
17 //
18 //------------------------------------------------------------------------------
19 //==============================================================================
20 // Author(s): ="Atheros"
21 //==============================================================================
22
23
24 #ifndef __REG_DBVALUE_H__
25 #define __REG_DBVALUE_H__
26
27 /*
28  * Numbering from ISO 3166
29  */
30 enum CountryCode {
31     CTRY_ALBANIA              = 8,       /* Albania */
32     CTRY_ALGERIA              = 12,      /* Algeria */
33     CTRY_ARGENTINA            = 32,      /* Argentina */
34     CTRY_ARMENIA              = 51,      /* Armenia */
35     CTRY_ARUBA                = 533,     /* Aruba */
36     CTRY_AUSTRALIA            = 36,      /* Australia (for STA) */
37     CTRY_AUSTRALIA_AP         = 5000,    /* Australia (for AP) */
38     CTRY_AUSTRIA              = 40,      /* Austria */
39     CTRY_AZERBAIJAN           = 31,      /* Azerbaijan */
40     CTRY_BAHRAIN              = 48,      /* Bahrain */
41     CTRY_BANGLADESH           = 50,      /* Bangladesh */
42     CTRY_BARBADOS             = 52,      /* Barbados */
43     CTRY_BELARUS              = 112,     /* Belarus */
44     CTRY_BELGIUM              = 56,      /* Belgium */
45     CTRY_BELIZE               = 84,      /* Belize */
46     CTRY_BOLIVIA              = 68,      /* Bolivia */
47     CTRY_BOSNIA_HERZEGOWANIA  = 70,      /* Bosnia & Herzegowania */
48     CTRY_BRAZIL               = 76,      /* Brazil */
49     CTRY_BRUNEI_DARUSSALAM    = 96,      /* Brunei Darussalam */
50     CTRY_BULGARIA             = 100,     /* Bulgaria */
51     CTRY_CAMBODIA             = 116,     /* Cambodia */
52     CTRY_CANADA               = 124,     /* Canada (for STA) */
53     CTRY_CANADA_AP            = 5001,    /* Canada (for AP) */
54     CTRY_CHILE                = 152,     /* Chile */
55     CTRY_CHINA                = 156,     /* People's Republic of China */
56     CTRY_COLOMBIA             = 170,     /* Colombia */
57     CTRY_COSTA_RICA           = 188,     /* Costa Rica */
58     CTRY_CROATIA              = 191,     /* Croatia */
59     CTRY_CYPRUS               = 196,
60     CTRY_CZECH                = 203,     /* Czech Republic */
61     CTRY_DENMARK              = 208,     /* Denmark */
62     CTRY_DOMINICAN_REPUBLIC   = 214,     /* Dominican Republic */
63     CTRY_ECUADOR              = 218,     /* Ecuador */
64     CTRY_EGYPT                = 818,     /* Egypt */
65     CTRY_EL_SALVADOR          = 222,     /* El Salvador */
66     CTRY_ESTONIA              = 233,     /* Estonia */
67     CTRY_FAEROE_ISLANDS       = 234,     /* Faeroe Islands */
68     CTRY_FINLAND              = 246,     /* Finland */
69     CTRY_FRANCE               = 250,     /* France */
70     CTRY_FRANCE2              = 255,     /* France2 */
71     CTRY_GEORGIA              = 268,     /* Georgia */
72     CTRY_GERMANY              = 276,     /* Germany */
73     CTRY_GREECE               = 300,     /* Greece */
74     CTRY_GREENLAND            = 304,     /* Greenland */
75     CTRY_GRENADA              = 308,     /* Grenada */
76     CTRY_GUAM                 = 316,     /* Guam */
77     CTRY_GUATEMALA            = 320,     /* Guatemala */
78     CTRY_HAITI                = 332,     /* Haiti */
79     CTRY_HONDURAS             = 340,     /* Honduras */
80     CTRY_HONG_KONG            = 344,     /* Hong Kong S.A.R., P.R.C. */
81     CTRY_HUNGARY              = 348,     /* Hungary */
82     CTRY_ICELAND              = 352,     /* Iceland */
83     CTRY_INDIA                = 356,     /* India */
84     CTRY_INDONESIA            = 360,     /* Indonesia */
85     CTRY_IRAN                 = 364,     /* Iran */
86     CTRY_IRAQ                 = 368,     /* Iraq */
87     CTRY_IRELAND              = 372,     /* Ireland */
88     CTRY_ISRAEL               = 376,     /* Israel */
89     CTRY_ITALY                = 380,     /* Italy */
90     CTRY_JAMAICA              = 388,     /* Jamaica */
91     CTRY_JAPAN                = 392,     /* Japan */
92     CTRY_JAPAN1               = 393,     /* Japan (JP1) */
93     CTRY_JAPAN2               = 394,     /* Japan (JP0) */
94     CTRY_JAPAN3               = 395,     /* Japan (JP1-1) */
95     CTRY_JAPAN4               = 396,     /* Japan (JE1) */
96     CTRY_JAPAN5               = 397,     /* Japan (JE2) */
97     CTRY_JAPAN6               = 399,     /* Japan (JP6) */
98     CTRY_JORDAN               = 400,     /* Jordan */
99     CTRY_KAZAKHSTAN           = 398,     /* Kazakhstan */
100     CTRY_KENYA                = 404,     /* Kenya */
101     CTRY_KOREA_NORTH          = 408,     /* North Korea */
102     CTRY_KOREA_ROC            = 410,     /* South Korea (for STA) */
103     CTRY_KOREA_ROC2           = 411,     /* South Korea */
104     CTRY_KOREA_ROC3           = 412,     /* South Korea (for AP) */
105     CTRY_KUWAIT               = 414,     /* Kuwait */
106     CTRY_LATVIA               = 428,     /* Latvia */
107     CTRY_LEBANON              = 422,     /* Lebanon */
108     CTRY_LIBYA                = 434,     /* Libya */
109     CTRY_LIECHTENSTEIN        = 438,     /* Liechtenstein */
110     CTRY_LITHUANIA            = 440,     /* Lithuania */
111     CTRY_LUXEMBOURG           = 442,     /* Luxembourg */
112     CTRY_MACAU                = 446,     /* Macau */
113     CTRY_MACEDONIA            = 807,     /* the Former Yugoslav Republic of Macedonia */
114     CTRY_MALAYSIA             = 458,     /* Malaysia */
115     CTRY_MALTA                = 470,     /* Malta */
116     CTRY_MEXICO               = 484,     /* Mexico */
117     CTRY_MONACO               = 492,     /* Principality of Monaco */
118     CTRY_MOROCCO              = 504,     /* Morocco */
119     CTRY_NEPAL                = 524,     /* Nepal */   
120     CTRY_NETHERLANDS          = 528,     /* Netherlands */
121     CTRY_NETHERLAND_ANTILLES  = 530,     /* Netherlands-Antilles */
122     CTRY_NEW_ZEALAND          = 554,     /* New Zealand */
123     CTRY_NICARAGUA            = 558,     /* Nicaragua */
124     CTRY_NORWAY               = 578,     /* Norway */
125     CTRY_OMAN                 = 512,     /* Oman */
126     CTRY_PAKISTAN             = 586,     /* Islamic Republic of Pakistan */
127     CTRY_PANAMA               = 591,     /* Panama */
128     CTRY_PARAGUAY             = 600,     /* Paraguay */
129     CTRY_PERU                 = 604,     /* Peru */
130     CTRY_PHILIPPINES          = 608,     /* Republic of the Philippines */
131     CTRY_POLAND               = 616,     /* Poland */
132     CTRY_PORTUGAL             = 620,     /* Portugal */
133     CTRY_PUERTO_RICO          = 630,     /* Puerto Rico */
134     CTRY_QATAR                = 634,     /* Qatar */
135     CTRY_ROMANIA              = 642,     /* Romania */
136     CTRY_RUSSIA               = 643,     /* Russia */
137     CTRY_SAUDI_ARABIA         = 682,     /* Saudi Arabia */
138     CTRY_MONTENEGRO           = 891,     /* Montenegro */
139     CTRY_SINGAPORE            = 702,     /* Singapore */
140     CTRY_SLOVAKIA             = 703,     /* Slovak Republic */
141     CTRY_SLOVENIA             = 705,     /* Slovenia */
142     CTRY_SOUTH_AFRICA         = 710,     /* South Africa */
143     CTRY_SPAIN                = 724,     /* Spain */
144     CTRY_SRILANKA             = 144,     /* Sri Lanka */
145     CTRY_SWEDEN               = 752,     /* Sweden */
146     CTRY_SWITZERLAND          = 756,     /* Switzerland */
147     CTRY_SYRIA                = 760,     /* Syria */
148     CTRY_TAIWAN               = 158,     /* Taiwan */
149     CTRY_THAILAND             = 764,     /* Thailand */
150     CTRY_TRINIDAD_Y_TOBAGO    = 780,     /* Trinidad y Tobago */
151     CTRY_TUNISIA              = 788,     /* Tunisia */
152     CTRY_TURKEY               = 792,     /* Turkey */
153     CTRY_UAE                  = 784,     /* U.A.E. */
154     CTRY_UKRAINE              = 804,     /* Ukraine */
155     CTRY_UNITED_KINGDOM       = 826,     /* United Kingdom */
156     CTRY_UNITED_STATES        = 840,     /* United States (for STA) */
157     CTRY_UNITED_STATES_AP     = 841,     /* United States (for AP) */
158     CTRY_UNITED_STATES_PS     = 842,     /* United States - public safety */
159     CTRY_URUGUAY              = 858,     /* Uruguay */
160     CTRY_UZBEKISTAN           = 860,     /* Uzbekistan */
161     CTRY_VENEZUELA            = 862,     /* Venezuela */
162     CTRY_VIET_NAM             = 704,     /* Viet Nam */
163     CTRY_YEMEN                = 887,     /* Yemen */
164     CTRY_ZIMBABWE             = 716      /* Zimbabwe */
165 };
166
167 #define CTRY_DEBUG      0
168 #define CTRY_DEFAULT    0x1ff
169
170 /*
171  * The following regulatory domain definitions are
172  * found in the EEPROM. Each regulatory domain
173  * can operate in either a 5GHz or 2.4GHz wireless mode or
174  * both 5GHz and 2.4GHz wireless modes.
175  * In general, the value holds no special
176  * meaning and is used to decode into either specific
177  * 2.4GHz or 5GHz wireless mode for that particular
178  * regulatory domain.
179  *
180  * Enumerated Regulatory Domain Information 8 bit values indicate that
181  * the regdomain is really a pair of unitary regdomains.  12 bit values
182  * are the real unitary regdomains and are the only ones which have the
183  * frequency bitmasks and flags set.
184  */
185
186 enum EnumRd {
187     NO_ENUMRD   = 0x00,
188     NULL1_WORLD = 0x03,     /* For 11b-only countries (no 11a allowed) */
189     NULL1_ETSIB = 0x07,     /* Israel */
190     NULL1_ETSIC = 0x08,
191
192     FCC1_FCCA   = 0x10,     /* USA */
193     FCC1_WORLD  = 0x11,     /* Hong Kong */
194     FCC2_FCCA   = 0x20,     /* Canada */
195     FCC2_WORLD  = 0x21,     /* Australia & HK */
196     FCC2_ETSIC  = 0x22,
197     FCC3_FCCA   = 0x3A,     /* USA & Canada w/5470 band, 11h, DFS enabled */
198     FCC3_WORLD  = 0x3B,     /* USA & Canada w/5470 band, 11h, DFS enabled */
199     FCC4_FCCA   = 0x12,     /* FCC public safety plus UNII bands */
200     FCC5_FCCA   = 0x13,     /* US with no DFS */
201     FCC5_WORLD  = 0x16,     /* US with no DFS */
202     FCC6_FCCA   = 0x14,     /* Same as FCC2_FCCA but with 5600-5650MHz channels disabled for US & Canada APs */
203     FCC6_WORLD  = 0x23,     /* Same as FCC2_FCCA but with 5600-5650MHz channels disabled for Australia APs */
204
205     ETSI1_WORLD = 0x37,
206
207     ETSI2_WORLD = 0x35,     /* Hungary & others */
208     ETSI3_WORLD = 0x36,     /* France & others */
209     ETSI4_WORLD = 0x30,
210     ETSI4_ETSIC = 0x38,
211     ETSI5_WORLD = 0x39,
212     ETSI6_WORLD = 0x34,     /* Bulgaria */
213     ETSI_RESERVED   = 0x33,     /* Reserved (Do not used) */
214     FRANCE_RES  = 0x31,     /* Legacy France for OEM */
215
216     APL6_WORLD  = 0x5B,     /* Singapore */
217     APL4_WORLD  = 0x42,     /* Singapore */
218     APL3_FCCA   = 0x50,
219     APL_RESERVED    = 0x44,     /* Reserved (Do not used)  */
220     APL2_WORLD  = 0x45,     /* Korea */
221     APL2_APLC   = 0x46,
222     APL3_WORLD  = 0x47,
223     APL2_APLD   = 0x49,     /* Korea with 2.3G channels */
224     APL2_FCCA   = 0x4D,     /* Specific Mobile Customer */
225     APL1_WORLD  = 0x52,     /* Latin America */
226     APL1_FCCA   = 0x53,
227     APL1_ETSIC  = 0x55,
228     APL2_ETSIC  = 0x56,     /* Venezuela */
229     APL5_WORLD  = 0x58,     /* Chile */
230     APL7_FCCA   = 0x5C,
231     APL8_WORLD  = 0x5D,
232     APL9_WORLD  = 0x5E,
233     APL10_WORLD = 0x5F,     /* Korea 5GHz for STA */
234
235
236     MKK5_MKKA   = 0x99, /* This is a temporary value. MG and DQ have to give official one */
237     MKK5_FCCA   = 0x9A, /* This is a temporary value. MG and DQ have to give official one */
238     MKK5_MKKC   = 0x88,
239     MKK11_MKKA  = 0xD4,
240     MKK11_FCCA  = 0xD5,
241     MKK11_MKKC  = 0xD7,
242
243     /*
244      * World mode SKUs
245      */
246     WOR0_WORLD  = 0x60,     /* World0 (WO0 SKU) */
247     WOR1_WORLD  = 0x61,     /* World1 (WO1 SKU) */
248     WOR2_WORLD  = 0x62,     /* World2 (WO2 SKU) */
249     WOR3_WORLD  = 0x63,     /* World3 (WO3 SKU) */
250     WOR4_WORLD  = 0x64,     /* World4 (WO4 SKU) */  
251     WOR5_ETSIC  = 0x65,     /* World5 (WO5 SKU) */    
252
253     WOR01_WORLD = 0x66,     /* World0-1 (WW0-1 SKU) */
254     WOR02_WORLD = 0x67,     /* World0-2 (WW0-2 SKU) */
255     EU1_WORLD   = 0x68,     /* Same as World0-2 (WW0-2 SKU), except active scan ch1-13. No ch14 */
256
257     WOR9_WORLD  = 0x69,     /* World9 (WO9 SKU) */  
258     WORA_WORLD  = 0x6A,     /* WorldA (WOA SKU) */  
259     WORB_WORLD  = 0x6B,     /* WorldB (WOA SKU) */  
260     WORC_WORLD  = 0x6C,     /* WorldC (WOA SKU) */  
261
262     /*
263      * Regulator domains ending in a number (e.g. APL1,
264      * MK1, ETSI4, etc) apply to 5GHz channel and power
265      * information.  Regulator domains ending in a letter
266      * (e.g. APLA, FCCA, etc) apply to 2.4GHz channel and
267      * power information.
268      */
269     APL1        = 0x0150,   /* LAT & Asia */
270     APL2        = 0x0250,   /* LAT & Asia */
271     APL3        = 0x0350,   /* Taiwan */
272     APL4        = 0x0450,   /* Jordan */
273     APL5        = 0x0550,   /* Chile */
274     APL6        = 0x0650,   /* Singapore */
275     APL7        = 0x0750,   /* Taiwan */
276     APL8        = 0x0850,   /* Malaysia */
277     APL9        = 0x0950,   /* Korea */
278     APL10       = 0x1050,   /* Korea 5GHz */
279
280     ETSI1       = 0x0130,   /* Europe & others */
281     ETSI2       = 0x0230,   /* Europe & others */
282     ETSI3       = 0x0330,   /* Europe & others */
283     ETSI4       = 0x0430,   /* Europe & others */
284     ETSI5       = 0x0530,   /* Europe & others */
285     ETSI6       = 0x0630,   /* Europe & others */
286     ETSIB       = 0x0B30,   /* Israel */
287     ETSIC       = 0x0C30,   /* Latin America */
288
289     FCC1        = 0x0110,   /* US & others */
290     FCC2        = 0x0120,   /* Canada, Australia & New Zealand */
291     FCC3        = 0x0160,   /* US w/new middle band & DFS */    
292     FCC4        = 0x0165,
293     FCC5        = 0x0180,
294     FCC6        = 0x0610,
295     FCCA        = 0x0A10,    
296
297     APLD        = 0x0D50,   /* South Korea */
298
299     MKK1        = 0x0140,   /* Japan */
300     MKK2        = 0x0240,   /* Japan Extended */
301     MKK3        = 0x0340,   /* Japan new 5GHz */
302     MKK4        = 0x0440,   /* Japan new 5GHz */
303     MKK5        = 0x0540,   /* Japan new 5GHz */
304     MKK6        = 0x0640,   /* Japan new 5GHz */
305     MKK7        = 0x0740,   /* Japan new 5GHz */
306     MKK8        = 0x0840,   /* Japan new 5GHz */
307     MKK9        = 0x0940,   /* Japan new 5GHz */
308     MKK10       = 0x1040,   /* Japan new 5GHz */
309     MKK11       = 0x1140,   /* Japan new 5GHz */
310     MKK12       = 0x1240,   /* Japan new 5GHz */
311
312     MKKA        = 0x0A40,   /* Japan */
313     MKKC        = 0x0A50,
314
315     NULL1       = 0x0198,
316     WORLD       = 0x0199,
317     DEBUG_REG_DMN   = 0x01ff,
318     UNINIT_REG_DMN  = 0x0fff,
319 };
320
321 enum {                  /* conformance test limits */
322     FCC = 0x10,
323     MKK = 0x40,
324     ETSI    = 0x30,
325     NO_CTL  = 0xff,
326     CTL_11B = 1,
327     CTL_11G = 2
328 };
329
330
331 /*
332  * The following are flags for different requirements per reg domain.
333  * These requirements are either inhereted from the reg domain pair or
334  * from the unitary reg domain if the reg domain pair flags value is
335  * 0
336  */
337
338 enum {
339     NO_REQ              = 0x00,
340     DISALLOW_ADHOC_11A  = 0x01,
341     ADHOC_PER_11D       = 0x02,
342     ADHOC_NO_11A        = 0x04,
343     DISALLOW_ADHOC_11G  = 0x08
344 };
345
346
347
348
349 /*
350  * The following describe the bit masks for different passive scan
351  * capability/requirements per regdomain.
352  */
353 #define NO_PSCAN        0x00000000
354 #define PSCAN_FCC       0x00000001
355 #define PSCAN_ETSI      0x00000002
356 #define PSCAN_MKK       0x00000004
357 #define PSCAN_ETSIB     0x00000008
358 #define PSCAN_ETSIC     0x00000010
359 #define PSCAN_WWR       0x00000020
360 #define PSCAN_DEFER     0xFFFFFFFF
361
362 /* Bit masks for DFS per regdomain */
363
364 enum {
365     NO_DFS   = 0x00,
366     DFS_FCC3 = 0x01,
367     DFS_ETSI = 0x02,
368     DFS_MKK  = 0x04
369 };
370
371
372 #define DEF_REGDMN      FCC1_FCCA
373
374 /* 
375  * The following table is the master list for all different freqeuncy
376  * bands with the complete matrix of all possible flags and settings
377  * for each band if it is used in ANY reg domain.
378  *
379  * The table of frequency bands is indexed by a bitmask.  The ordering
380  * must be consistent with the enum below.  When adding a new
381  * frequency band, be sure to match the location in the enum with the
382  * comments 
383  */
384
385 /*
386  * These frequency values are as per channel tags and regulatory domain
387  * info. Please update them as database is updated.
388  */
389 #define A_FREQ_MIN              4920
390 #define A_FREQ_MAX              5825
391
392 #define A_CHAN0_FREQ            5000
393 #define A_CHAN_MAX              ((A_FREQ_MAX - A_CHAN0_FREQ)/5)
394
395 #define BG_FREQ_MIN             2412
396 #define BG_FREQ_MAX             2484
397
398 #define BG_CHAN0_FREQ           2407
399 #define BG_CHAN_MIN             ((BG_FREQ_MIN - BG_CHAN0_FREQ)/5)
400 #define BG_CHAN_MAX             14      /* corresponding to 2484 MHz */
401
402 #define A_20MHZ_BAND_FREQ_MAX   5000
403
404
405 /*
406  * 5GHz 11A channel tags
407  */
408
409 enum {
410     F1_4920_4980,
411     F1_5040_5080,
412
413     F1_5120_5240,
414
415     F1_5180_5240,
416     F2_5180_5240,
417     F3_5180_5240,
418     F4_5180_5240,
419     F5_5180_5240,
420     F6_5180_5240,
421     F7_5180_5240,
422
423     F1_5260_5280,
424
425     F1_5260_5320,
426     F2_5260_5320,
427     F3_5260_5320,
428     F4_5260_5320,
429     F5_5260_5320,
430     F6_5260_5320,
431
432     F1_5260_5700,
433
434     F1_5280_5320,
435
436     F1_5500_5620,
437
438     F1_5500_5700,
439     F2_5500_5700,
440     F3_5500_5700,
441     F4_5500_5700,
442     F5_5500_5700,
443     F6_5500_5700,
444     F7_5500_5700,
445
446     F1_5745_5805,
447     F2_5745_5805,
448
449     F1_5745_5825,
450     F2_5745_5825,
451     F3_5745_5825,
452     F4_5745_5825,
453     F5_5745_5825,
454     F6_5745_5825,
455
456     W1_4920_4980,
457     W1_5040_5080,
458     W1_5170_5230,
459     W1_5180_5240,
460     W1_5260_5320,
461     W1_5745_5825,
462     W1_5500_5700,
463 };
464
465
466 /* 2.4 GHz table - for 11b and 11g info */
467 enum {
468     BG1_2312_2372,
469     BG2_2312_2372,
470
471     BG1_2412_2472,
472     BG2_2412_2472,
473     BG3_2412_2472,
474     BG4_2412_2472,
475
476     BG1_2412_2462,
477     BG2_2412_2462,
478
479     BG1_2432_2442,
480
481     BG1_2457_2472,
482
483     BG1_2467_2472,
484
485     BG1_2484_2484, /* No G */
486     BG2_2484_2484, /* No G */
487
488     BG1_2512_2732,
489
490     WBG1_2312_2372,
491     WBG1_2412_2412,
492     WBG1_2417_2432,
493     WBG1_2437_2442,
494     WBG1_2447_2457,
495     WBG1_2462_2462,
496     WBG1_2467_2467,
497     WBG2_2467_2467,
498     WBG1_2472_2472,
499     WBG2_2472_2472,
500     WBG1_2484_2484, /* No G */
501     WBG2_2484_2484, /* No G */
502 };
503     
504 #endif /* __REG_DBVALUE_H__ */