iPXE
regd.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2009 Atheros Communications Inc.
3  *
4  * Modified for iPXE by Scott K Logan <logans@cottsay.net> July 2011
5  * Original from Linux kernel 3.0.1
6  *
7  * Permission to use, copy, modify, and/or distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef REGD_H
21 #define REGD_H
22 
23 FILE_LICENCE ( BSD2 );
24 
25 #include "ath.h"
26 
27 enum ctl_group {
28  CTL_FCC = 0x10,
29  CTL_MKK = 0x40,
30  CTL_ETSI = 0x30,
31 };
32 
33 #define NO_CTL 0xff
34 #define SD_NO_CTL 0xE0
35 #define NO_CTL 0xff
36 #define CTL_11A 0
37 #define CTL_11B 1
38 #define CTL_11G 2
39 #define CTL_2GHT20 5
40 #define CTL_5GHT20 6
41 #define CTL_2GHT40 7
42 #define CTL_5GHT40 8
43 
44 #define CTRY_DEBUG 0x1ff
45 #define CTRY_DEFAULT 0
46 
47 #define COUNTRY_ERD_FLAG 0x8000
48 #define WORLDWIDE_ROAMING_FLAG 0x4000
49 
50 #define MULTI_DOMAIN_MASK 0xFF00
51 
52 #define WORLD_SKU_MASK 0x00F0
53 #define WORLD_SKU_PREFIX 0x0060
54 
55 #define CHANNEL_HALF_BW 10
56 #define CHANNEL_QUARTER_BW 5
57 
61  const char *isoName;
62 };
63 
69  CTRY_ARUBA = 533,
76  CTRY_BELARUS = 112,
85  CTRY_CANADA = 124,
86  CTRY_CHILE = 152,
87  CTRY_CHINA = 156,
90  CTRY_CROATIA = 191,
91  CTRY_CYPRUS = 196,
92  CTRY_CZECH = 203,
93  CTRY_DENMARK = 208,
95  CTRY_ECUADOR = 218,
96  CTRY_EGYPT = 818,
98  CTRY_ESTONIA = 233,
101  CTRY_FRANCE = 250,
104  CTRY_GREECE = 300,
107  CTRY_GUAM = 316,
109  CTRY_HAITI = 332,
114  CTRY_INDIA = 356,
116  CTRY_IRAN = 364,
117  CTRY_IRAQ = 368,
119  CTRY_ISRAEL = 376,
120  CTRY_ITALY = 380,
122  CTRY_JAPAN = 392,
123  CTRY_JORDAN = 400,
125  CTRY_KENYA = 404,
130  CTRY_KUWAIT = 414,
131  CTRY_LATVIA = 428,
133  CTRY_LIBYA = 434,
137  CTRY_MACAU = 446,
140  CTRY_MALTA = 470,
141  CTRY_MEXICO = 484,
142  CTRY_MONACO = 492,
144  CTRY_NEPAL = 524,
149  CTRY_NORWAY = 578,
150  CTRY_OMAN = 512,
152  CTRY_PANAMA = 591,
155  CTRY_PERU = 604,
157  CTRY_POLAND = 616,
160  CTRY_QATAR = 634,
162  CTRY_RUSSIA = 643,
169  CTRY_SPAIN = 724,
171  CTRY_SWEDEN = 752,
173  CTRY_SYRIA = 760,
174  CTRY_TAIWAN = 158,
178  CTRY_TURKEY = 792,
179  CTRY_UAE = 784,
188  CTRY_YEMEN = 887,
190  CTRY_JAPAN1 = 393,
191  CTRY_JAPAN2 = 394,
192  CTRY_JAPAN3 = 395,
193  CTRY_JAPAN4 = 396,
194  CTRY_JAPAN5 = 397,
195  CTRY_JAPAN6 = 4006,
196  CTRY_JAPAN7 = 4007,
197  CTRY_JAPAN8 = 4008,
198  CTRY_JAPAN9 = 4009,
199  CTRY_JAPAN10 = 4010,
200  CTRY_JAPAN11 = 4011,
201  CTRY_JAPAN12 = 4012,
202  CTRY_JAPAN13 = 4013,
203  CTRY_JAPAN14 = 4014,
204  CTRY_JAPAN15 = 4015,
205  CTRY_JAPAN16 = 4016,
206  CTRY_JAPAN17 = 4017,
207  CTRY_JAPAN18 = 4018,
208  CTRY_JAPAN19 = 4019,
209  CTRY_JAPAN20 = 4020,
210  CTRY_JAPAN21 = 4021,
211  CTRY_JAPAN22 = 4022,
212  CTRY_JAPAN23 = 4023,
213  CTRY_JAPAN24 = 4024,
214  CTRY_JAPAN25 = 4025,
215  CTRY_JAPAN26 = 4026,
216  CTRY_JAPAN27 = 4027,
217  CTRY_JAPAN28 = 4028,
218  CTRY_JAPAN29 = 4029,
219  CTRY_JAPAN30 = 4030,
220  CTRY_JAPAN31 = 4031,
221  CTRY_JAPAN32 = 4032,
222  CTRY_JAPAN33 = 4033,
223  CTRY_JAPAN34 = 4034,
224  CTRY_JAPAN35 = 4035,
225  CTRY_JAPAN36 = 4036,
226  CTRY_JAPAN37 = 4037,
227  CTRY_JAPAN38 = 4038,
228  CTRY_JAPAN39 = 4039,
229  CTRY_JAPAN40 = 4040,
230  CTRY_JAPAN41 = 4041,
231  CTRY_JAPAN42 = 4042,
232  CTRY_JAPAN43 = 4043,
233  CTRY_JAPAN44 = 4044,
234  CTRY_JAPAN45 = 4045,
235  CTRY_JAPAN46 = 4046,
236  CTRY_JAPAN47 = 4047,
237  CTRY_JAPAN48 = 4048,
238  CTRY_JAPAN49 = 4049,
239  CTRY_JAPAN50 = 4050,
240  CTRY_JAPAN51 = 4051,
241  CTRY_JAPAN52 = 4052,
242  CTRY_JAPAN53 = 4053,
243  CTRY_JAPAN54 = 4054,
244  CTRY_JAPAN55 = 4055,
245  CTRY_JAPAN56 = 4056,
246  CTRY_JAPAN57 = 4057,
247  CTRY_JAPAN58 = 4058,
248  CTRY_JAPAN59 = 4059,
250  CTRY_CANADA2 = 5001,
252 };
253 
255 int ath_is_49ghz_allowed(u16 redomain);
256 //int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy,
257 // int (*reg_notifier)(struct wiphy *wiphy,
258 // struct regulatory_request *request));
260  int band);
261 //int ath_reg_notifier_apply(struct wiphy *wiphy,
262 // struct regulatory_request *request,
263 // struct ath_regulatory *reg);
264 
265 #endif
uint16_t u16
Definition: stdint.h:21
Definition: regd.h:30
u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, int band)
Definition: ath_regd.c:584
Definition: regd.h:179
int ath_is_49ghz_allowed(u16 redomain)
Definition: regd.h:28
ctl_group
Definition: regd.h:27
const char * isoName
Definition: regd.h:61
static unsigned int unsigned int reg
Definition: intel.h:245
Definition: regd.h:29
CountryCode
Definition: regd.h:64
int ath_is_world_regd(struct ath_regulatory *reg)
FILE_LICENCE(BSD2)
uint32_t u32
Definition: stdint.h:23