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