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
43 #define CTRY_DEBUG 0x1ff
44 #define CTRY_DEFAULT 0
46 #define COUNTRY_ERD_FLAG 0x8000
47 #define WORLDWIDE_ROAMING_FLAG 0x4000
49 #define MULTI_DOMAIN_MASK 0xFF00
51 #define WORLD_SKU_MASK 0x00F0
52 #define WORLD_SKU_PREFIX 0x0060
54 #define CHANNEL_HALF_BW 10
55 #define CHANNEL_QUARTER_BW 5
57 struct country_code_to_enum_rd
{
76 CTRY_BOSNIA_HERZ
= 70,
78 CTRY_BRUNEI_DARUSSALAM
= 96,
84 CTRY_COSTA_RICA
= 188,
89 CTRY_DOMINICAN_REPUBLIC
= 214,
92 CTRY_EL_SALVADOR
= 222,
94 CTRY_FAEROE_ISLANDS
= 234,
100 CTRY_GUATEMALA
= 320,
102 CTRY_HONG_KONG
= 344,
106 CTRY_INDONESIA
= 360,
115 CTRY_KAZAKHSTAN
= 398,
117 CTRY_KOREA_NORTH
= 408,
118 CTRY_KOREA_ROC
= 410,
119 CTRY_KOREA_ROC2
= 411,
120 CTRY_KOREA_ROC3
= 412,
125 CTRY_LIECHTENSTEIN
= 438,
126 CTRY_LITHUANIA
= 440,
127 CTRY_LUXEMBOURG
= 442,
129 CTRY_MACEDONIA
= 807,
136 CTRY_NETHERLANDS
= 528,
137 CTRY_NETHERLANDS_ANTILLES
= 530,
138 CTRY_NEW_ZEALAND
= 554,
139 CTRY_NICARAGUA
= 558,
144 CTRY_PAPUA_NEW_GUINEA
= 598,
147 CTRY_PHILIPPINES
= 608,
150 CTRY_PUERTO_RICO
= 630,
154 CTRY_SAUDI_ARABIA
= 682,
155 CTRY_SERBIA_MONTENEGRO
= 891,
156 CTRY_SINGAPORE
= 702,
159 CTRY_SOUTH_AFRICA
= 710,
161 CTRY_SRI_LANKA
= 144,
163 CTRY_SWITZERLAND
= 756,
167 CTRY_TRINIDAD_Y_TOBAGO
= 780,
172 CTRY_UNITED_KINGDOM
= 826,
173 CTRY_UNITED_STATES
= 840,
174 CTRY_UNITED_STATES_FCC49
= 842,
176 CTRY_UZBEKISTAN
= 860,
177 CTRY_VENEZUELA
= 862,
240 CTRY_AUSTRALIA2
= 5000,
245 bool ath_is_world_regd(struct ath_regulatory
*reg
);
246 int ath_regd_init(struct ath_regulatory
*reg
, struct wiphy
*wiphy
,
247 int (*reg_notifier
)(struct wiphy
*wiphy
,
248 struct regulatory_request
*request
));
249 u32
ath_regd_get_band_ctl(struct ath_regulatory
*reg
,
250 enum ieee80211_band band
);
251 int ath_reg_notifier_apply(struct wiphy
*wiphy
,
252 struct regulatory_request
*request
,
253 struct ath_regulatory
*reg
);