2 * Copyright (c) 2008-2009 Atheros Communications Inc.
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #include <linux/nl80211.h>
21 #include <net/cfg80211.h>
31 #define SD_NO_CTL 0xE0
41 #define CTRY_DEBUG 0x1ff
42 #define CTRY_DEFAULT 0
44 #define COUNTRY_ERD_FLAG 0x8000
45 #define WORLDWIDE_ROAMING_FLAG 0x4000
47 #define MULTI_DOMAIN_MASK 0xFF00
49 #define WORLD_SKU_MASK 0x00F0
50 #define WORLD_SKU_PREFIX 0x0060
52 #define CHANNEL_HALF_BW 10
53 #define CHANNEL_QUARTER_BW 5
55 struct country_code_to_enum_rd
{
79 CTRY_BOSNIA_HERZ
= 70,
81 CTRY_BRUNEI_DARUSSALAM
= 96,
88 CTRY_COSTA_RICA
= 188,
93 CTRY_DOMINICAN_REPUBLIC
= 214,
96 CTRY_EL_SALVADOR
= 222,
98 CTRY_FAEROE_ISLANDS
= 234,
104 CTRY_GREENLAND
= 304,
107 CTRY_GUATEMALA
= 320,
110 CTRY_HONG_KONG
= 344,
114 CTRY_INDONESIA
= 360,
123 CTRY_KAZAKHSTAN
= 398,
125 CTRY_KOREA_NORTH
= 408,
126 CTRY_KOREA_ROC
= 410,
127 CTRY_KOREA_ROC2
= 411,
128 CTRY_KOREA_ROC3
= 412,
133 CTRY_LIECHTENSTEIN
= 438,
134 CTRY_LITHUANIA
= 440,
135 CTRY_LUXEMBOURG
= 442,
137 CTRY_MACEDONIA
= 807,
140 CTRY_MAURITIUS
= 480,
143 CTRY_MONTENEGRO
= 499,
146 CTRY_NETHERLANDS
= 528,
147 CTRY_NETHERLANDS_ANTILLES
= 530,
148 CTRY_NEW_ZEALAND
= 554,
149 CTRY_NICARAGUA
= 558,
154 CTRY_PAPUA_NEW_GUINEA
= 598,
157 CTRY_PHILIPPINES
= 608,
160 CTRY_PUERTO_RICO
= 630,
164 CTRY_SAUDI_ARABIA
= 682,
166 CTRY_SERBIA_MONTENEGRO
= 891,
167 CTRY_SINGAPORE
= 702,
170 CTRY_SOUTH_AFRICA
= 710,
172 CTRY_SRI_LANKA
= 144,
174 CTRY_SWITZERLAND
= 756,
179 CTRY_TRINIDAD_Y_TOBAGO
= 780,
185 CTRY_UNITED_KINGDOM
= 826,
186 CTRY_UNITED_STATES
= 840,
187 CTRY_UNITED_STATES2
= 841,
188 CTRY_UNITED_STATES_FCC49
= 842,
189 CTRY_UNITED_STATES3
= 843,
191 CTRY_UZBEKISTAN
= 860,
192 CTRY_VENEZUELA
= 862,
255 CTRY_AUSTRALIA2
= 5000,
260 bool ath_is_world_regd(struct ath_regulatory
*reg
);
261 bool ath_is_49ghz_allowed(u16 redomain
);
262 u16
ath_regd_find_country_by_name(char *alpha2
);
263 int ath_regd_init(struct ath_regulatory
*reg
, struct wiphy
*wiphy
,
264 void (*reg_notifier
)(struct wiphy
*wiphy
,
265 struct regulatory_request
*request
));
266 u32
ath_regd_get_band_ctl(struct ath_regulatory
*reg
,
267 enum nl80211_band band
);
268 void ath_reg_notifier_apply(struct wiphy
*wiphy
,
269 struct regulatory_request
*request
,
270 struct ath_regulatory
*reg
);