2 * Copyright (c) 2008 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 #define COUNTRY_ERD_FLAG 0x8000
21 #define WORLDWIDE_ROAMING_FLAG 0x4000
23 #define MULTI_DOMAIN_MASK 0xFF00
25 #define WORLD_SKU_MASK 0x00F0
26 #define WORLD_SKU_PREFIX 0x0060
28 #define CHANNEL_HALF_BW 10
29 #define CHANNEL_QUARTER_BW 5
31 struct reg_dmn_pair_mapping
{
37 struct country_code_to_enum_rd
{
43 struct ath9k_regulatory
{
51 struct reg_dmn_pair_mapping
*regpair
;
67 CTRY_BOSNIA_HERZ
= 70,
69 CTRY_BRUNEI_DARUSSALAM
= 96,
75 CTRY_COSTA_RICA
= 188,
80 CTRY_DOMINICAN_REPUBLIC
= 214,
83 CTRY_EL_SALVADOR
= 222,
85 CTRY_FAEROE_ISLANDS
= 234,
106 CTRY_KAZAKHSTAN
= 398,
108 CTRY_KOREA_NORTH
= 408,
109 CTRY_KOREA_ROC
= 410,
110 CTRY_KOREA_ROC2
= 411,
111 CTRY_KOREA_ROC3
= 412,
116 CTRY_LIECHTENSTEIN
= 438,
117 CTRY_LITHUANIA
= 440,
118 CTRY_LUXEMBOURG
= 442,
120 CTRY_MACEDONIA
= 807,
127 CTRY_NETHERLANDS
= 528,
128 CTRY_NETHERLANDS_ANTILLES
= 530,
129 CTRY_NEW_ZEALAND
= 554,
130 CTRY_NICARAGUA
= 558,
135 CTRY_PAPUA_NEW_GUINEA
= 598,
138 CTRY_PHILIPPINES
= 608,
141 CTRY_PUERTO_RICO
= 630,
145 CTRY_SAUDI_ARABIA
= 682,
146 CTRY_SERBIA_MONTENEGRO
= 891,
147 CTRY_SINGAPORE
= 702,
150 CTRY_SOUTH_AFRICA
= 710,
152 CTRY_SRI_LANKA
= 144,
154 CTRY_SWITZERLAND
= 756,
158 CTRY_TRINIDAD_Y_TOBAGO
= 780,
163 CTRY_UNITED_KINGDOM
= 826,
164 CTRY_UNITED_STATES
= 840,
165 CTRY_UNITED_STATES_FCC49
= 842,
167 CTRY_UZBEKISTAN
= 860,
168 CTRY_VENEZUELA
= 862,
231 CTRY_AUSTRALIA2
= 5000,
236 u16
ath9k_regd_get_rd(struct ath_hw
*ah
);
237 bool ath9k_is_world_regd(struct ath_hw
*ah
);
238 const struct ieee80211_regdomain
*ath9k_world_regdomain(struct ath_hw
*ah
);
239 const struct ieee80211_regdomain
*ath9k_default_world_regdomain(void);
240 void ath9k_reg_apply_world_flags(struct wiphy
*wiphy
, enum reg_set_by setby
);
241 void ath9k_reg_apply_radar_flags(struct wiphy
*wiphy
);
242 int ath9k_regd_init(struct ath_hw
*ah
);
243 bool ath9k_regd_is_eeprom_valid(struct ath_hw
*ah
);
244 u32
ath9k_regd_get_ctl(struct ath_hw
*ah
, struct ath9k_channel
*chan
);
245 int ath9k_reg_notifier(struct wiphy
*wiphy
, struct regulatory_request
*request
);
246 void ath9k_regd_get_current_country(struct ath_hw
*ah
,
247 struct ath9k_country_entry
*ctry
);