* [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG
@ 2009-03-21 3:53 Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 1/5] cfg80211: force last_request to be set for OLD_REG if regdom is EU Luis R. Rodriguez
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Luis R. Rodriguez @ 2009-03-21 3:53 UTC (permalink / raw)
To: linville, johannes; +Cc: linux-wireless, Quentin, Luis R. Rodriguez
First two are bug fixes candidates for stable, the rest removes OLD_REG.
Luis R. Rodriguez (5):
cfg80211: force last_request to be set for OLD_REG if regdom is EU
cfg80211: fix incorrect assumption on last_request for 11d
cfg80211: make regdom module parameter available oustide of OLD_REG
cfg80211: remove code about country IE support with OLD_REG
cfg80211: remove CONFIG_WIRELESS_OLD_REGULATORY
Documentation/feature-removal-schedule.txt | 34 +++--
net/wireless/Kconfig | 33 -----
net/wireless/nl80211.c | 6 -
net/wireless/reg.c | 187 ++++------------------------
4 files changed, 46 insertions(+), 214 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] cfg80211: force last_request to be set for OLD_REG if regdom is EU
2009-03-21 3:53 [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG Luis R. Rodriguez
@ 2009-03-21 3:53 ` Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 2/5] cfg80211: fix incorrect assumption on last_request for 11d Luis R. Rodriguez
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Luis R. Rodriguez @ 2009-03-21 3:53 UTC (permalink / raw)
To: linville, johannes; +Cc: linux-wireless, Quentin, Luis R. Rodriguez, stable
Although EU is a bogus alpha2 we need to process the send request
as our code depends on last_request being set.
Cc: stable@kernel.org
Reported-by: Quentin Armitage <Quentin@armitage.org.uk>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
net/wireless/reg.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index eb8b8ed..ead9dcc 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2135,11 +2135,14 @@ int regulatory_init(void)
/*
* The old code still requests for a new regdomain and if
* you have CRDA you get it updated, otherwise you get
- * stuck with the static values. We ignore "EU" code as
- * that is not a valid ISO / IEC 3166 alpha2
+ * stuck with the static values. Since "EU" is not a valid
+ * ISO / IEC 3166 alpha2 code we can't expect userpace to
+ * give us a regulatory domain for it. We need last_request
+ * iniitalized though so lets just send a request which we
+ * know will be ignored... this crap will be removed once
+ * OLD_REG dies.
*/
- if (ieee80211_regdom[0] != 'E' || ieee80211_regdom[1] != 'U')
- err = regulatory_hint_core(ieee80211_regdom);
+ err = regulatory_hint_core(ieee80211_regdom);
#else
cfg80211_regdomain = cfg80211_world_regdom;
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] cfg80211: fix incorrect assumption on last_request for 11d
2009-03-21 3:53 [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 1/5] cfg80211: force last_request to be set for OLD_REG if regdom is EU Luis R. Rodriguez
@ 2009-03-21 3:53 ` Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 3/5] cfg80211: make regdom module parameter available oustide of OLD_REG Luis R. Rodriguez
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Luis R. Rodriguez @ 2009-03-21 3:53 UTC (permalink / raw)
To: linville, johannes; +Cc: linux-wireless, Quentin, Luis R. Rodriguez, stable
The incorrect assumption is the last regulatory request
(last_request) is always a country IE when processing
country IEs. Although this is true 99% of the time the
first time this happens this could not be true.
This fixes an oops in the branch check for the last_request
when accessing drv_last_ie. The access was done under the
assumption the struct won't be null.
Note to stable: to port to 29 replace as follows, only 29 has
country IE code:
s|NL80211_REGDOM_SET_BY_COUNTRY_IE|REGDOM_SET_BY_COUNTRY_IE
Cc: stable@kernel.org
Reported-by: Quentin Armitage <Quentin@armitage.org.uk>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
net/wireless/reg.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index ead9dcc..9afc916 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1601,6 +1601,10 @@ static bool reg_same_country_ie_hint(struct wiphy *wiphy,
assert_cfg80211_lock();
+ if (unlikely(last_request->initiator !=
+ NL80211_REGDOM_SET_BY_COUNTRY_IE))
+ return false;
+
request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
if (!request_wiphy)
@@ -1663,7 +1667,9 @@ void regulatory_hint_11d(struct wiphy *wiphy,
* we optimize an early check to exit out early if we don't have to
* do anything
*/
- if (likely(wiphy_idx_valid(last_request->wiphy_idx))) {
+ if (likely(last_request->initiator ==
+ NL80211_REGDOM_SET_BY_COUNTRY_IE &&
+ wiphy_idx_valid(last_request->wiphy_idx))) {
struct cfg80211_registered_device *drv_last_ie;
drv_last_ie =
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] cfg80211: make regdom module parameter available oustide of OLD_REG
2009-03-21 3:53 [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 1/5] cfg80211: force last_request to be set for OLD_REG if regdom is EU Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 2/5] cfg80211: fix incorrect assumption on last_request for 11d Luis R. Rodriguez
@ 2009-03-21 3:53 ` Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 4/5] cfg80211: remove code about country IE support with OLD_REG Luis R. Rodriguez
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Luis R. Rodriguez @ 2009-03-21 3:53 UTC (permalink / raw)
To: linville, johannes; +Cc: linux-wireless, Quentin, Luis R. Rodriguez
It seems a few users are using this module parameter although its not
recommended. People are finding it useful despite there being utilities
for setting this in userspace. I'm not aware of any distribution using
this though.
Until userspace and distributions catch up with a default userspace
automatic replacement (GeoClue integration would be nirvana) we copy
the ieee80211_regdom module parameter from OLD_REG to the new reg
code to help these users migrate.
Users who are using the non-valid ISO / IEC 3166 alpha "EU" in their
ieee80211_regdom module parameter and migrate to non-OLD_REG enabled
system will world roam.
This also schedules removal of this same ieee80211_regdom module
parameter circa March 2010. Hope is by then nirvana is reached and
users will abandoned the module parameter completely.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
Documentation/feature-removal-schedule.txt | 30 ++++++++++++++++++++++++---
net/wireless/reg.c | 7 +++++-
2 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 802c6fd..020bc66 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -6,7 +6,31 @@ be removed from this file.
---------------------------
-What: old static regulatory information and ieee80211_regdom module parameter
+What: The ieee80211_regdom module parameter
+When: March 2010
+
+Why: This was inherited by the CONFIG_WIRELESS_OLD_REGULATORY code,
+ and currently serves as an option for users to define an
+ ISO / IEC 3166 alpha2 code for the country they are currently
+ present in. Although there are userspace API replacements for this
+ through nl80211 distributions haven't yet caught up with implementing
+ decent alternatives through standard GUIs. Although available as an
+ option through iw or wpa_supplicant its just a matter of time before
+ distributions pick up good GUI options for this. The ideal solution
+ would actually consist of intelligent designs which would do this for
+ the user automatically even when travelling through different countries.
+ Until then we leave this module parameter as a compromise.
+
+ When userspace improves with reasonable widely-available alternatives for
+ this we will no longer need this module parameter. This entry hopes that
+ by the super-futuristically looking date of "March 2010" we will have
+ such replacements widely available.
+
+Who: Luis R. Rodriguez <lrodriguez@atheros.com>
+
+---------------------------
+
+What: old static regulatory information
When: 2.6.29
Why: The old regulatory infrastructure has been replaced with a new one
which does not require statically defined regulatory domains. We do
@@ -17,9 +41,7 @@ Why: The old regulatory infrastructure has been replaced with a new one
* JP
* EU
and used by default the US when CONFIG_WIRELESS_OLD_REGULATORY was
- set. We also kept around the ieee80211_regdom module parameter in case
- some applications were relying on it. Changing regulatory domains
- can now be done instead by using nl80211, as is done with iw.
+ set.
Who: Luis R. Rodriguez <lrodriguez@atheros.com>
---------------------------
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 9afc916..ac048a1 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -122,9 +122,14 @@ static const struct ieee80211_regdomain *cfg80211_world_regdom =
#ifdef CONFIG_WIRELESS_OLD_REGULATORY
static char *ieee80211_regdom = "US";
+#else
+static char *ieee80211_regdom = "00";
+#endif
+
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
@@ -2152,7 +2157,7 @@ int regulatory_init(void)
#else
cfg80211_regdomain = cfg80211_world_regdom;
- err = regulatory_hint_core("00");
+ err = regulatory_hint_core(ieee80211_regdom);
#endif
if (err) {
if (err == -ENOMEM)
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] cfg80211: remove code about country IE support with OLD_REG
2009-03-21 3:53 [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG Luis R. Rodriguez
` (2 preceding siblings ...)
2009-03-21 3:53 ` [PATCH 3/5] cfg80211: make regdom module parameter available oustide of OLD_REG Luis R. Rodriguez
@ 2009-03-21 3:53 ` Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 5/5] cfg80211: remove CONFIG_WIRELESS_OLD_REGULATORY Luis R. Rodriguez
2009-03-21 14:23 ` [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG Johannes Berg
5 siblings, 0 replies; 7+ messages in thread
From: Luis R. Rodriguez @ 2009-03-21 3:53 UTC (permalink / raw)
To: linville, johannes; +Cc: linux-wireless, Quentin, Luis R. Rodriguez
We had left in code to allow interested developers to add
support for parsing country IEs when OLD_REG was enabled.
This never happened and since we're going to remove OLD_REG
lets just remove these comments and code for it.
This code path was never being entered so this has no
functional change.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
net/wireless/reg.c | 39 +++++++++++----------------------------
1 files changed, 11 insertions(+), 28 deletions(-)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index ac048a1..6327e16 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1420,16 +1420,6 @@ new_request:
return r;
}
- /*
- * Note: When CONFIG_WIRELESS_OLD_REGULATORY is enabled
- * AND if CRDA is NOT present nothing will happen, if someone
- * wants to bother with 11d with OLD_REG you can add a timer.
- * If after x amount of time nothing happens you can call:
- *
- * return set_regdom(country_ie_regdomain);
- *
- * to intersect with the static rd
- */
return call_crda(last_request->alpha2);
}
@@ -2033,28 +2023,21 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
*/
BUG_ON(!country_ie_regdomain);
+ BUG_ON(rd == country_ie_regdomain);
- if (rd != country_ie_regdomain) {
- /*
- * Intersect what CRDA returned and our what we
- * had built from the Country IE received
- */
+ /*
+ * Intersect what CRDA returned and our what we
+ * had built from the Country IE received
+ */
- intersected_rd = regdom_intersect(rd, country_ie_regdomain);
+ intersected_rd = regdom_intersect(rd, country_ie_regdomain);
- reg_country_ie_process_debug(rd, country_ie_regdomain,
- intersected_rd);
+ reg_country_ie_process_debug(rd,
+ country_ie_regdomain,
+ intersected_rd);
- kfree(country_ie_regdomain);
- country_ie_regdomain = NULL;
- } else {
- /*
- * This would happen when CRDA was not present and
- * OLD_REGULATORY was enabled. We intersect our Country
- * IE rd and what was set on cfg80211 originally
- */
- intersected_rd = regdom_intersect(rd, cfg80211_regdomain);
- }
+ kfree(country_ie_regdomain);
+ country_ie_regdomain = NULL;
if (!intersected_rd)
return -EINVAL;
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] cfg80211: remove CONFIG_WIRELESS_OLD_REGULATORY
2009-03-21 3:53 [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG Luis R. Rodriguez
` (3 preceding siblings ...)
2009-03-21 3:53 ` [PATCH 4/5] cfg80211: remove code about country IE support with OLD_REG Luis R. Rodriguez
@ 2009-03-21 3:53 ` Luis R. Rodriguez
2009-03-21 14:23 ` [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG Johannes Berg
5 siblings, 0 replies; 7+ messages in thread
From: Luis R. Rodriguez @ 2009-03-21 3:53 UTC (permalink / raw)
To: linville, johannes; +Cc: linux-wireless, Quentin, Luis R. Rodriguez
Distributions are already shipping with this disabled
and we now have improved wireless roaming considerably.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
Documentation/feature-removal-schedule.txt | 16 ---
net/wireless/Kconfig | 33 -------
net/wireless/nl80211.c | 6 -
net/wireless/reg.c | 144 +--------------------------
4 files changed, 6 insertions(+), 193 deletions(-)
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 020bc66..49dc5c5 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -30,22 +30,6 @@ Who: Luis R. Rodriguez <lrodriguez@atheros.com>
---------------------------
-What: old static regulatory information
-When: 2.6.29
-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.
-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
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
index d1d18f3..defa802 100644
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
@@ -10,39 +10,6 @@ config CFG80211_REG_DEBUG
If unsure, say N.
-config WIRELESS_OLD_REGULATORY
- bool "Old wireless static regulatory definitions"
- default y
- ---help---
- This option enables the old static regulatory information
- and uses it within the new framework. This is available
- temporarily as an option to help prevent immediate issues
- due to the switch to the new regulatory framework which
- does require a new userspace application which has the
- database of regulatory information (CRDA) and another for
- setting regulatory domains (iw).
-
- For more information see:
-
- http://wireless.kernel.org/en/developers/Regulatory/CRDA
- http://wireless.kernel.org/en/users/Documentation/iw
-
- It is important to note though that if you *do* have CRDA present
- and if this option is enabled CRDA *will* be called to update the
- regulatory domain (for US and JP only). Support for letting the user
- set the regulatory domain through iw is also supported. This option
- mainly exists to leave around for a kernel release some old static
- regulatory domains that were defined and to keep around the old
- ieee80211_regdom module parameter. This is being phased out and you
- should stop using them ASAP.
-
- Note: You will need CRDA if you want 802.11d support
-
- Say Y unless you have installed a new userspace application.
- Also say Y if have one currently depending on the ieee80211_regdom
- module parameter and cannot port it to use the new userspace
- interfaces.
-
config WIRELESS_EXT
bool "Wireless extensions"
default n
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index a81a499..6f95975 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2058,12 +2058,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;
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 6327e16..6e5ff66 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -120,112 +120,10 @@ static const struct ieee80211_regdomain world_regdom = {
static const struct ieee80211_regdomain *cfg80211_world_regdom =
&world_regdom;
-#ifdef CONFIG_WIRELESS_OLD_REGULATORY
-static char *ieee80211_regdom = "US";
-#else
static char *ieee80211_regdom = "00";
-#endif
-
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 */
- REG_RULE(5180-10, 5180+10, 40, 6, 23, 0),
- /* IEEE 802.11a, channel 40 */
- REG_RULE(5200-10, 5200+10, 40, 6, 23, 0),
- /* IEEE 802.11a, channel 44 */
- REG_RULE(5220-10, 5220+10, 40, 6, 23, 0),
- /* IEEE 802.11a, channels 48..64 */
- REG_RULE(5240-10, 5320+10, 40, 6, 23, 0),
- /* 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 = 3,
- .alpha2 = "JP",
- .reg_rules = {
- /* IEEE 802.11b/g, channels 1..14 */
- REG_RULE(2412-10, 2484+10, 40, 6, 20, 0),
- /* IEEE 802.11a, channels 34..48 */
- REG_RULE(5170-10, 5240+10, 40, 6, 20,
- NL80211_RRF_PASSIVE_SCAN),
- /* IEEE 802.11a, channels 52..64 */
- REG_RULE(5260-10, 5320+10, 40, 6, 20,
- NL80211_RRF_NO_IBSS |
- NL80211_RRF_DFS),
- }
-};
-
-static const struct ieee80211_regdomain eu_regdom = {
- .n_reg_rules = 6,
- /*
- * This alpha2 is bogus, we leave it here just for stupid
- * backward compatibility
- */
- .alpha2 = "EU",
- .reg_rules = {
- /* IEEE 802.11b/g, channels 1..13 */
- REG_RULE(2412-10, 2472+10, 40, 6, 20, 0),
- /* IEEE 802.11a, channel 36 */
- REG_RULE(5180-10, 5180+10, 40, 6, 23,
- NL80211_RRF_PASSIVE_SCAN),
- /* IEEE 802.11a, channel 40 */
- REG_RULE(5200-10, 5200+10, 40, 6, 23,
- NL80211_RRF_PASSIVE_SCAN),
- /* IEEE 802.11a, channel 44 */
- REG_RULE(5220-10, 5220+10, 40, 6, 23,
- NL80211_RRF_PASSIVE_SCAN),
- /* IEEE 802.11a, channels 48..64 */
- REG_RULE(5240-10, 5320+10, 40, 6, 20,
- NL80211_RRF_NO_IBSS |
- NL80211_RRF_DFS),
- /* IEEE 802.11a, channels 100..140 */
- REG_RULE(5500-10, 5700+10, 40, 6, 30,
- NL80211_RRF_NO_IBSS |
- 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;
- if (alpha2[0] == 'E' && alpha2[1] == 'U')
- return &eu_regdom;
- /* Default, as per the old rules */
- return &us_regdom;
-}
-
-static bool is_old_static_regdom(const struct ieee80211_regdomain *rd)
-{
- if (rd == &us_regdom || rd == &jp_regdom || rd == &eu_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 */
@@ -235,8 +133,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);
@@ -1297,8 +1193,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;
@@ -1335,8 +1229,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;
@@ -1933,19 +1826,12 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
return -EINVAL;
/*
- * Lets only bother proceeding on the same alpha2 if the current
- * rd is non static (it means CRDA was present and was used last)
- * and the pending request came in from a country IE
+ * Lets only bother proceeding on the same alpha2 if the
+ * pending request came in from a country IE
*/
- if (last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
- /*
- * 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))
- return -EINVAL;
- }
+ if (last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE &&
+ !regdom_changes(rd->alpha2))
+ return -EINVAL;
/*
* Now lets set the regulatory domain, update all driver channels
@@ -2121,27 +2007,9 @@ int regulatory_init(void)
spin_lock_init(®_requests_lock);
spin_lock_init(®_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);
- /*
- * The old code still requests for a new regdomain and if
- * you have CRDA you get it updated, otherwise you get
- * stuck with the static values. Since "EU" is not a valid
- * ISO / IEC 3166 alpha2 code we can't expect userpace to
- * give us a regulatory domain for it. We need last_request
- * iniitalized though so lets just send a request which we
- * know will be ignored... this crap will be removed once
- * OLD_REG dies.
- */
- err = regulatory_hint_core(ieee80211_regdom);
-#else
cfg80211_regdomain = cfg80211_world_regdom;
err = regulatory_hint_core(ieee80211_regdom);
-#endif
if (err) {
if (err == -ENOMEM)
return err;
--
1.6.0.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG
2009-03-21 3:53 [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG Luis R. Rodriguez
` (4 preceding siblings ...)
2009-03-21 3:53 ` [PATCH 5/5] cfg80211: remove CONFIG_WIRELESS_OLD_REGULATORY Luis R. Rodriguez
@ 2009-03-21 14:23 ` Johannes Berg
5 siblings, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2009-03-21 14:23 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linville, linux-wireless, Quentin
[-- Attachment #1: Type: text/plain, Size: 674 bytes --]
On Fri, 2009-03-20 at 23:53 -0400, Luis R. Rodriguez wrote:
> First two are bug fixes candidates for stable, the rest removes OLD_REG.
>
> Luis R. Rodriguez (5):
> cfg80211: force last_request to be set for OLD_REG if regdom is EU
> cfg80211: fix incorrect assumption on last_request for 11d
> cfg80211: make regdom module parameter available oustide of OLD_REG
> cfg80211: remove code about country IE support with OLD_REG
> cfg80211: remove CONFIG_WIRELESS_OLD_REGULATORY
Looks good, except the comment for 5/5 seems a little misleading,
roaming is generally thought of going from one AP to another, not from
one country to another :)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-03-21 14:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-21 3:53 [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 1/5] cfg80211: force last_request to be set for OLD_REG if regdom is EU Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 2/5] cfg80211: fix incorrect assumption on last_request for 11d Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 3/5] cfg80211: make regdom module parameter available oustide of OLD_REG Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 4/5] cfg80211: remove code about country IE support with OLD_REG Luis R. Rodriguez
2009-03-21 3:53 ` [PATCH 5/5] cfg80211: remove CONFIG_WIRELESS_OLD_REGULATORY Luis R. Rodriguez
2009-03-21 14:23 ` [PATCH 0/5] cfg80211: few reg fixes and removes OLD_REG Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox