Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183388
b: refs/heads/master
c: baeb66f
h: refs/heads/master
v: v3
  • Loading branch information
John W. Linville committed Dec 28, 2009
1 parent dec96df commit 1ab756d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 130 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f648c00039a42e67a9dff034c77d41502dab1f3
refs/heads/master: baeb66fe2306783e3b9a492b03882f2e249b2eeb
21 changes: 0 additions & 21 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,6 @@ Who: Luis R. Rodriguez <lrodriguez@atheros.com>

---------------------------

What: CONFIG_WIRELESS_OLD_REGULATORY - old static regulatory information
When: March 2010 / desktop catchup

Why: The old regulatory infrastructure has been replaced with a new one
which does not require statically defined regulatory domains. We do
not want to keep static regulatory domains in the kernel due to the
the dynamic nature of regulatory law and localization. We kept around
the old static definitions for the regulatory domains of:

* US
* JP
* EU

and used by default the US when CONFIG_WIRELESS_OLD_REGULATORY was
set. We will remove this option once the standard Linux desktop catches
up with the new userspace APIs we have implemented.

Who: Luis R. Rodriguez <lrodriguez@atheros.com>

---------------------------

What: dev->power.power_state
When: July 2007
Why: Broken design for runtime control over driver power states, confusing
Expand Down
15 changes: 0 additions & 15 deletions trunk/net/wireless/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,6 @@ config CFG80211_DEBUGFS

If unsure, say N.

config WIRELESS_OLD_REGULATORY
bool "Old wireless static regulatory definitions"
default n
depends on CFG80211
---help---
This option enables the old static regulatory information
and uses it within the new framework. This option is available
for historical reasons and it is advised to leave it off.

For details see:

http://wireless.kernel.org/en/developers/Regulatory

Say N and if you say Y, please tell us why. The default is N.

config CFG80211_INTERNAL_REGDB
bool "use statically compiled regulatory rules database" if EMBEDDED
default n
Expand Down
6 changes: 0 additions & 6 deletions trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2550,12 +2550,6 @@ static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info)

data = nla_data(info->attrs[NL80211_ATTR_REG_ALPHA2]);

#ifdef CONFIG_WIRELESS_OLD_REGULATORY
/* We ignore world regdom requests with the old regdom setup */
if (is_world_regdom(data))
return -EINVAL;
#endif

r = regulatory_hint_user(data);

return r;
Expand Down
89 changes: 2 additions & 87 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,78 +129,6 @@ static char *ieee80211_regdom = "00";
module_param(ieee80211_regdom, charp, 0444);
MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain code");

#ifdef CONFIG_WIRELESS_OLD_REGULATORY
/*
* We assume 40 MHz bandwidth for the old regulatory work.
* We make emphasis we are using the exact same frequencies
* as before
*/

static const struct ieee80211_regdomain us_regdom = {
.n_reg_rules = 6,
.alpha2 = "US",
.reg_rules = {
/* IEEE 802.11b/g, channels 1..11 */
REG_RULE(2412-10, 2462+10, 40, 6, 27, 0),
/* IEEE 802.11a, channel 36..48 */
REG_RULE(5180-10, 5240+10, 40, 6, 17, 0),
/* IEEE 802.11a, channels 48..64 */
REG_RULE(5260-10, 5320+10, 40, 6, 20, NL80211_RRF_DFS),
/* IEEE 802.11a, channels 100..124 */
REG_RULE(5500-10, 5590+10, 40, 6, 20, NL80211_RRF_DFS),
/* IEEE 802.11a, channels 132..144 */
REG_RULE(5660-10, 5700+10, 40, 6, 20, NL80211_RRF_DFS),
/* IEEE 802.11a, channels 149..165, outdoor */
REG_RULE(5745-10, 5825+10, 40, 6, 30, 0),
}
};

static const struct ieee80211_regdomain jp_regdom = {
.n_reg_rules = 6,
.alpha2 = "JP",
.reg_rules = {
/* IEEE 802.11b/g, channels 1..11 */
REG_RULE(2412-10, 2462+10, 40, 6, 20, 0),
/* IEEE 802.11b/g, channels 12..13 */
REG_RULE(2467-10, 2472+10, 20, 6, 20, 0),
/* IEEE 802.11b/g, channel 14 */
REG_RULE(2484-10, 2484+10, 20, 6, 20, NL80211_RRF_NO_OFDM),
/* IEEE 802.11a, channels 36..48 */
REG_RULE(5180-10, 5240+10, 40, 6, 20, 0),
/* IEEE 802.11a, channels 52..64 */
REG_RULE(5260-10, 5320+10, 40, 6, 20, NL80211_RRF_DFS),
/* IEEE 802.11a, channels 100..144 */
REG_RULE(5500-10, 5700+10, 40, 6, 23, NL80211_RRF_DFS),
}
};

static const struct ieee80211_regdomain *static_regdom(char *alpha2)
{
if (alpha2[0] == 'U' && alpha2[1] == 'S')
return &us_regdom;
if (alpha2[0] == 'J' && alpha2[1] == 'P')
return &jp_regdom;
/* Use world roaming rules for "EU", since it was a pseudo
domain anyway... */
if (alpha2[0] == 'E' && alpha2[1] == 'U')
return &world_regdom;
/* Default, world roaming rules */
return &world_regdom;
}

static bool is_old_static_regdom(const struct ieee80211_regdomain *rd)
{
if (rd == &us_regdom || rd == &jp_regdom || rd == &world_regdom)
return true;
return false;
}
#else
static inline bool is_old_static_regdom(const struct ieee80211_regdomain *rd)
{
return false;
}
#endif

static void reset_regdomains(void)
{
/* avoid freeing static information or freeing something twice */
Expand All @@ -210,8 +138,6 @@ static void reset_regdomains(void)
cfg80211_world_regdom = NULL;
if (cfg80211_regdomain == &world_regdom)
cfg80211_regdomain = NULL;
if (is_old_static_regdom(cfg80211_regdomain))
cfg80211_regdomain = NULL;

kfree(cfg80211_regdomain);
kfree(cfg80211_world_regdom);
Expand Down Expand Up @@ -1490,8 +1416,6 @@ static int ignore_request(struct wiphy *wiphy,
return REG_INTERSECT;
case NL80211_REGDOM_SET_BY_DRIVER:
if (last_request->initiator == NL80211_REGDOM_SET_BY_CORE) {
if (is_old_static_regdom(cfg80211_regdomain))
return 0;
if (regdom_changes(pending_request->alpha2))
return 0;
return -EALREADY;
Expand Down Expand Up @@ -1528,8 +1452,7 @@ static int ignore_request(struct wiphy *wiphy,
return -EAGAIN;
}

if (!is_old_static_regdom(cfg80211_regdomain) &&
!regdom_changes(pending_request->alpha2))
if (!regdom_changes(pending_request->alpha2))
return -EALREADY;

return 0;
Expand Down Expand Up @@ -2111,8 +2034,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
* If someone else asked us to change the rd lets only bother
* checking if the alpha2 changes if CRDA was already called
*/
if (!is_old_static_regdom(cfg80211_regdomain) &&
!regdom_changes(rd->alpha2))
if (!regdom_changes(rd->alpha2))
return -EINVAL;
}

Expand Down Expand Up @@ -2311,15 +2233,8 @@ int regulatory_init(void)
spin_lock_init(&reg_requests_lock);
spin_lock_init(&reg_pending_beacons_lock);

#ifdef CONFIG_WIRELESS_OLD_REGULATORY
cfg80211_regdomain = static_regdom(ieee80211_regdom);

printk(KERN_INFO "cfg80211: Using static regulatory domain info\n");
print_regdomain_info(cfg80211_regdomain);
#else
cfg80211_regdomain = cfg80211_world_regdom;

#endif
/* We always try to get an update for the static regdomain */
err = regulatory_hint_core(cfg80211_regdomain->alpha2);
if (err) {
Expand Down

0 comments on commit 1ab756d

Please sign in to comment.