aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/wireless/reg.c75
1 files changed, 25 insertions, 50 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index c01470e7de15..baa898add287 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -141,62 +141,35 @@ static const struct ieee80211_regdomain us_regdom = {
141 .reg_rules = { 141 .reg_rules = {
142 /* IEEE 802.11b/g, channels 1..11 */ 142 /* IEEE 802.11b/g, channels 1..11 */
143 REG_RULE(2412-10, 2462+10, 40, 6, 27, 0), 143 REG_RULE(2412-10, 2462+10, 40, 6, 27, 0),
144 /* IEEE 802.11a, channel 36 */ 144 /* IEEE 802.11a, channel 36..48 */
145 REG_RULE(5180-10, 5180+10, 40, 6, 23, 0), 145 REG_RULE(5180-10, 5240+10, 40, 6, 17, 0),
146 /* IEEE 802.11a, channel 40 */
147 REG_RULE(5200-10, 5200+10, 40, 6, 23, 0),
148 /* IEEE 802.11a, channel 44 */
149 REG_RULE(5220-10, 5220+10, 40, 6, 23, 0),
150 /* IEEE 802.11a, channels 48..64 */ 146 /* IEEE 802.11a, channels 48..64 */
151 REG_RULE(5240-10, 5320+10, 40, 6, 23, 0), 147 REG_RULE(5260-10, 5320+10, 40, 6, 20, NL80211_RRF_DFS),
148 /* IEEE 802.11a, channels 100..124 */
149 REG_RULE(5500-10, 5590+10, 40, 6, 20, NL80211_RRF_DFS),
150 /* IEEE 802.11a, channels 132..144 */
151 REG_RULE(5660-10, 5700+10, 40, 6, 20, NL80211_RRF_DFS),
152 /* IEEE 802.11a, channels 149..165, outdoor */ 152 /* IEEE 802.11a, channels 149..165, outdoor */
153 REG_RULE(5745-10, 5825+10, 40, 6, 30, 0), 153 REG_RULE(5745-10, 5825+10, 40, 6, 30, 0),
154 } 154 }
155}; 155};
156 156
157static const struct ieee80211_regdomain jp_regdom = { 157static const struct ieee80211_regdomain jp_regdom = {
158 .n_reg_rules = 3, 158 .n_reg_rules = 6,
159 .alpha2 = "JP", 159 .alpha2 = "JP",
160 .reg_rules = { 160 .reg_rules = {
161 /* IEEE 802.11b/g, channels 1..14 */ 161 /* IEEE 802.11b/g, channels 1..11 */
162 REG_RULE(2412-10, 2484+10, 40, 6, 20, 0), 162 REG_RULE(2412-10, 2462+10, 40, 6, 20, 0),
163 /* IEEE 802.11a, channels 34..48 */ 163 /* IEEE 802.11b/g, channels 12..13 */
164 REG_RULE(5170-10, 5240+10, 40, 6, 20, 164 REG_RULE(2467-10, 2472+10, 20, 6, 20, 0),
165 NL80211_RRF_PASSIVE_SCAN), 165 /* IEEE 802.11b/g, channel 14 */
166 REG_RULE(2484-10, 2484+10, 20, 6, 20, NL80211_RRF_NO_OFDM),
167 /* IEEE 802.11a, channels 36..48 */
168 REG_RULE(5180-10, 5240+10, 40, 6, 20, 0),
166 /* IEEE 802.11a, channels 52..64 */ 169 /* IEEE 802.11a, channels 52..64 */
167 REG_RULE(5260-10, 5320+10, 40, 6, 20, 170 REG_RULE(5260-10, 5320+10, 40, 6, 20, NL80211_RRF_DFS),
168 NL80211_RRF_NO_IBSS | 171 /* IEEE 802.11a, channels 100..144 */
169 NL80211_RRF_DFS), 172 REG_RULE(5500-10, 5700+10, 40, 6, 23, NL80211_RRF_DFS),
170 }
171};
172
173static const struct ieee80211_regdomain eu_regdom = {
174 .n_reg_rules = 6,
175 /*
176 * This alpha2 is bogus, we leave it here just for stupid
177 * backward compatibility
178 */
179 .alpha2 = "EU",
180 .reg_rules = {
181 /* IEEE 802.11b/g, channels 1..13 */
182 REG_RULE(2412-10, 2472+10, 40, 6, 20, 0),
183 /* IEEE 802.11a, channel 36 */
184 REG_RULE(5180-10, 5180+10, 40, 6, 23,
185 NL80211_RRF_PASSIVE_SCAN),
186 /* IEEE 802.11a, channel 40 */
187 REG_RULE(5200-10, 5200+10, 40, 6, 23,
188 NL80211_RRF_PASSIVE_SCAN),
189 /* IEEE 802.11a, channel 44 */
190 REG_RULE(5220-10, 5220+10, 40, 6, 23,
191 NL80211_RRF_PASSIVE_SCAN),
192 /* IEEE 802.11a, channels 48..64 */
193 REG_RULE(5240-10, 5320+10, 40, 6, 20,
194 NL80211_RRF_NO_IBSS |
195 NL80211_RRF_DFS),
196 /* IEEE 802.11a, channels 100..140 */
197 REG_RULE(5500-10, 5700+10, 40, 6, 30,
198 NL80211_RRF_NO_IBSS |
199 NL80211_RRF_DFS),
200 } 173 }
201}; 174};
202 175
@@ -206,15 +179,17 @@ static const struct ieee80211_regdomain *static_regdom(char *alpha2)
206 return &us_regdom; 179 return &us_regdom;
207 if (alpha2[0] == 'J' && alpha2[1] == 'P') 180 if (alpha2[0] == 'J' && alpha2[1] == 'P')
208 return &jp_regdom; 181 return &jp_regdom;
182 /* Use world roaming rules for "EU", since it was a pseudo
183 domain anyway... */
209 if (alpha2[0] == 'E' && alpha2[1] == 'U') 184 if (alpha2[0] == 'E' && alpha2[1] == 'U')
210 return &eu_regdom; 185 return &world_regdom;
211 /* Default, as per the old rules */ 186 /* Default, world roaming rules */
212 return &us_regdom; 187 return &world_regdom;
213} 188}
214 189
215static bool is_old_static_regdom(const struct ieee80211_regdomain *rd) 190static bool is_old_static_regdom(const struct ieee80211_regdomain *rd)
216{ 191{
217 if (rd == &us_regdom || rd == &jp_regdom || rd == &eu_regdom) 192 if (rd == &us_regdom || rd == &jp_regdom || rd == &world_regdom)
218 return true; 193 return true;
219 return false; 194 return false;
220} 195}