aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/feature-removal-schedule.txt21
-rw-r--r--net/wireless/Kconfig15
-rw-r--r--net/wireless/nl80211.c6
-rw-r--r--net/wireless/reg.c89
4 files changed, 2 insertions, 129 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 591e94448e6..86f2ec90af8 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -88,27 +88,6 @@ Who: Luis R. Rodriguez <lrodriguez@atheros.com>
88 88
89--------------------------- 89---------------------------
90 90
91What: CONFIG_WIRELESS_OLD_REGULATORY - old static regulatory information
92When: March 2010 / desktop catchup
93
94Why: The old regulatory infrastructure has been replaced with a new one
95 which does not require statically defined regulatory domains. We do
96 not want to keep static regulatory domains in the kernel due to the
97 the dynamic nature of regulatory law and localization. We kept around
98 the old static definitions for the regulatory domains of:
99
100 * US
101 * JP
102 * EU
103
104 and used by default the US when CONFIG_WIRELESS_OLD_REGULATORY was
105 set. We will remove this option once the standard Linux desktop catches
106 up with the new userspace APIs we have implemented.
107
108Who: Luis R. Rodriguez <lrodriguez@atheros.com>
109
110---------------------------
111
112What: dev->power.power_state 91What: dev->power.power_state
113When: July 2007 92When: July 2007
114Why: Broken design for runtime control over driver power states, confusing 93Why: Broken design for runtime control over driver power states, confusing
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
index 8419971f07c..d0ee29063e5 100644
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
@@ -94,21 +94,6 @@ config CFG80211_DEBUGFS
94 94
95 If unsure, say N. 95 If unsure, say N.
96 96
97config WIRELESS_OLD_REGULATORY
98 bool "Old wireless static regulatory definitions"
99 default n
100 depends on CFG80211
101 ---help---
102 This option enables the old static regulatory information
103 and uses it within the new framework. This option is available
104 for historical reasons and it is advised to leave it off.
105
106 For details see:
107
108 http://wireless.kernel.org/en/developers/Regulatory
109
110 Say N and if you say Y, please tell us why. The default is N.
111
112config CFG80211_INTERNAL_REGDB 97config CFG80211_INTERNAL_REGDB
113 bool "use statically compiled regulatory rules database" if EMBEDDED 98 bool "use statically compiled regulatory rules database" if EMBEDDED
114 default n 99 default n
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7cb0d647fc3..60f854377f9 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2550,12 +2550,6 @@ static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info)
2550 2550
2551 data = nla_data(info->attrs[NL80211_ATTR_REG_ALPHA2]); 2551 data = nla_data(info->attrs[NL80211_ATTR_REG_ALPHA2]);
2552 2552
2553#ifdef CONFIG_WIRELESS_OLD_REGULATORY
2554 /* We ignore world regdom requests with the old regdom setup */
2555 if (is_world_regdom(data))
2556 return -EINVAL;
2557#endif
2558
2559 r = regulatory_hint_user(data); 2553 r = regulatory_hint_user(data);
2560 2554
2561 return r; 2555 return r;
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index dc13c3ffeca..87ea60d84c3 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -129,78 +129,6 @@ static char *ieee80211_regdom = "00";
129module_param(ieee80211_regdom, charp, 0444); 129module_param(ieee80211_regdom, charp, 0444);
130MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain code"); 130MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain code");
131 131
132#ifdef CONFIG_WIRELESS_OLD_REGULATORY
133/*
134 * We assume 40 MHz bandwidth for the old regulatory work.
135 * We make emphasis we are using the exact same frequencies
136 * as before
137 */
138
139static const struct ieee80211_regdomain us_regdom = {
140 .n_reg_rules = 6,
141 .alpha2 = "US",
142 .reg_rules = {
143 /* IEEE 802.11b/g, channels 1..11 */
144 REG_RULE(2412-10, 2462+10, 40, 6, 27, 0),
145 /* IEEE 802.11a, channel 36..48 */
146 REG_RULE(5180-10, 5240+10, 40, 6, 17, 0),
147 /* IEEE 802.11a, channels 48..64 */
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 */
154 REG_RULE(5745-10, 5825+10, 40, 6, 30, 0),
155 }
156};
157
158static const struct ieee80211_regdomain jp_regdom = {
159 .n_reg_rules = 6,
160 .alpha2 = "JP",
161 .reg_rules = {
162 /* IEEE 802.11b/g, channels 1..11 */
163 REG_RULE(2412-10, 2462+10, 40, 6, 20, 0),
164 /* IEEE 802.11b/g, channels 12..13 */
165 REG_RULE(2467-10, 2472+10, 20, 6, 20, 0),
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),
170 /* IEEE 802.11a, channels 52..64 */
171 REG_RULE(5260-10, 5320+10, 40, 6, 20, NL80211_RRF_DFS),
172 /* IEEE 802.11a, channels 100..144 */
173 REG_RULE(5500-10, 5700+10, 40, 6, 23, NL80211_RRF_DFS),
174 }
175};
176
177static const struct ieee80211_regdomain *static_regdom(char *alpha2)
178{
179 if (alpha2[0] == 'U' && alpha2[1] == 'S')
180 return &us_regdom;
181 if (alpha2[0] == 'J' && alpha2[1] == 'P')
182 return &jp_regdom;
183 /* Use world roaming rules for "EU", since it was a pseudo
184 domain anyway... */
185 if (alpha2[0] == 'E' && alpha2[1] == 'U')
186 return &world_regdom;
187 /* Default, world roaming rules */
188 return &world_regdom;
189}
190
191static bool is_old_static_regdom(const struct ieee80211_regdomain *rd)
192{
193 if (rd == &us_regdom || rd == &jp_regdom || rd == &world_regdom)
194 return true;
195 return false;
196}
197#else
198static inline bool is_old_static_regdom(const struct ieee80211_regdomain *rd)
199{
200 return false;
201}
202#endif
203
204static void reset_regdomains(void) 132static void reset_regdomains(void)
205{ 133{
206 /* avoid freeing static information or freeing something twice */ 134 /* avoid freeing static information or freeing something twice */
@@ -210,8 +138,6 @@ static void reset_regdomains(void)
210 cfg80211_world_regdom = NULL; 138 cfg80211_world_regdom = NULL;
211 if (cfg80211_regdomain == &world_regdom) 139 if (cfg80211_regdomain == &world_regdom)
212 cfg80211_regdomain = NULL; 140 cfg80211_regdomain = NULL;
213 if (is_old_static_regdom(cfg80211_regdomain))
214 cfg80211_regdomain = NULL;
215 141
216 kfree(cfg80211_regdomain); 142 kfree(cfg80211_regdomain);
217 kfree(cfg80211_world_regdom); 143 kfree(cfg80211_world_regdom);
@@ -1490,8 +1416,6 @@ static int ignore_request(struct wiphy *wiphy,
1490 return REG_INTERSECT; 1416 return REG_INTERSECT;
1491 case NL80211_REGDOM_SET_BY_DRIVER: 1417 case NL80211_REGDOM_SET_BY_DRIVER:
1492 if (last_request->initiator == NL80211_REGDOM_SET_BY_CORE) { 1418 if (last_request->initiator == NL80211_REGDOM_SET_BY_CORE) {
1493 if (is_old_static_regdom(cfg80211_regdomain))
1494 return 0;
1495 if (regdom_changes(pending_request->alpha2)) 1419 if (regdom_changes(pending_request->alpha2))
1496 return 0; 1420 return 0;
1497 return -EALREADY; 1421 return -EALREADY;
@@ -1528,8 +1452,7 @@ static int ignore_request(struct wiphy *wiphy,
1528 return -EAGAIN; 1452 return -EAGAIN;
1529 } 1453 }
1530 1454
1531 if (!is_old_static_regdom(cfg80211_regdomain) && 1455 if (!regdom_changes(pending_request->alpha2))
1532 !regdom_changes(pending_request->alpha2))
1533 return -EALREADY; 1456 return -EALREADY;
1534 1457
1535 return 0; 1458 return 0;
@@ -2111,8 +2034,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
2111 * If someone else asked us to change the rd lets only bother 2034 * If someone else asked us to change the rd lets only bother
2112 * checking if the alpha2 changes if CRDA was already called 2035 * checking if the alpha2 changes if CRDA was already called
2113 */ 2036 */
2114 if (!is_old_static_regdom(cfg80211_regdomain) && 2037 if (!regdom_changes(rd->alpha2))
2115 !regdom_changes(rd->alpha2))
2116 return -EINVAL; 2038 return -EINVAL;
2117 } 2039 }
2118 2040
@@ -2311,15 +2233,8 @@ int regulatory_init(void)
2311 spin_lock_init(&reg_requests_lock); 2233 spin_lock_init(&reg_requests_lock);
2312 spin_lock_init(&reg_pending_beacons_lock); 2234 spin_lock_init(&reg_pending_beacons_lock);
2313 2235
2314#ifdef CONFIG_WIRELESS_OLD_REGULATORY
2315 cfg80211_regdomain = static_regdom(ieee80211_regdom);
2316
2317 printk(KERN_INFO "cfg80211: Using static regulatory domain info\n");
2318 print_regdomain_info(cfg80211_regdomain);
2319#else
2320 cfg80211_regdomain = cfg80211_world_regdom; 2236 cfg80211_regdomain = cfg80211_world_regdom;
2321 2237
2322#endif
2323 /* We always try to get an update for the static regdomain */ 2238 /* We always try to get an update for the static regdomain */
2324 err = regulatory_hint_core(cfg80211_regdomain->alpha2); 2239 err = regulatory_hint_core(cfg80211_regdomain->alpha2);
2325 if (err) { 2240 if (err) {