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>
32 #define SD_NO_CTL 0xE0
42 #define CTRY_DEBUG 0x1ff
43 #define CTRY_DEFAULT 0
45 #define COUNTRY_ERD_FLAG 0x8000
46 #define WORLDWIDE_ROAMING_FLAG 0x4000
48 #define MULTI_DOMAIN_MASK 0xFF00
50 #define WORLD_SKU_MASK 0x00F0
51 #define WORLD_SKU_PREFIX 0x0060
53 #define CHANNEL_HALF_BW 10
54 #define CHANNEL_QUARTER_BW 5
56 struct country_code_to_enum_rd
{
78 CTRY_BOSNIA_HERZ
= 70,
80 CTRY_BRUNEI_DARUSSALAM
= 96,
87 CTRY_COSTA_RICA
= 188,
92 CTRY_DOMINICAN_REPUBLIC
= 214,
95 CTRY_EL_SALVADOR
= 222,
97 CTRY_FAEROE_ISLANDS
= 234,
103 CTRY_GREENLAND
= 304,
106 CTRY_GUATEMALA
= 320,
109 CTRY_HONG_KONG
= 344,
113 CTRY_INDONESIA
= 360,
122 CTRY_KAZAKHSTAN
= 398,
124 CTRY_KOREA_NORTH
= 408,
125 CTRY_KOREA_ROC
= 410,
126 CTRY_KOREA_ROC2
= 411,
127 CTRY_KOREA_ROC3
= 412,
132 CTRY_LIECHTENSTEIN
= 438,
133 CTRY_LITHUANIA
= 440,
134 CTRY_LUXEMBOURG
= 442,
136 CTRY_MACEDONIA
= 807,
143 CTRY_NETHERLANDS
= 528,
144 CTRY_NETHERLANDS_ANTILLES
= 530,
145 CTRY_NEW_ZEALAND
= 554,
146 CTRY_NICARAGUA
= 558,
151 CTRY_PAPUA_NEW_GUINEA
= 598,
154 CTRY_PHILIPPINES
= 608,
157 CTRY_PUERTO_RICO
= 630,
161 CTRY_SAUDI_ARABIA
= 682,
162 CTRY_SERBIA_MONTENEGRO
= 891,
163 CTRY_SINGAPORE
= 702,
166 CTRY_SOUTH_AFRICA
= 710,
168 CTRY_SRI_LANKA
= 144,
170 CTRY_SWITZERLAND
= 756,
174 CTRY_TRINIDAD_Y_TOBAGO
= 780,
179 CTRY_UNITED_KINGDOM
= 826,
180 CTRY_UNITED_STATES
= 840,
181 CTRY_UNITED_STATES_FCC49
= 842,
183 CTRY_UZBEKISTAN
= 860,
184 CTRY_VENEZUELA
= 862,
247 CTRY_AUSTRALIA2
= 5000,
252 bool ath_is_world_regd(struct ath_regulatory
*reg
);
253 bool ath_is_49ghz_allowed(u16 redomain
);
254 int ath_regd_init(struct ath_regulatory
*reg
, struct wiphy
*wiphy
,
255 int (*reg_notifier
)(struct wiphy
*wiphy
,
256 struct regulatory_request
*request
));
257 u32
ath_regd_get_band_ctl(struct ath_regulatory
*reg
,
258 enum ieee80211_band band
);
259 int ath_reg_notifier_apply(struct wiphy
*wiphy
,
260 struct regulatory_request
*request
,
261 struct ath_regulatory
*reg
);