Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159136
b: refs/heads/master
c: ae9e4b0
h: refs/heads/master
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Jul 24, 2009
1 parent b6fc0e4 commit 8ba5036
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 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: 64839170be296e6348fbaf83fd103711978669b9
refs/heads/master: ae9e4b0d1a43fd66da43918491834f9e5c1b6cca
25 changes: 9 additions & 16 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,7 @@ 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");
Expand Down Expand Up @@ -2287,22 +2283,12 @@ int regulatory_init(void)

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
/* We always try to get an update for the static regdomain */
err = regulatory_hint_core(cfg80211_regdomain->alpha2);
if (err) {
if (err == -ENOMEM)
return err;
Expand All @@ -2321,6 +2307,13 @@ int regulatory_init(void)
#endif
}

/*
* Finally, if the user set the module parameter treat it
* as a user hint.
*/
if (!is_world_regdom(ieee80211_regdom))
regulatory_hint_user(ieee80211_regdom);

return 0;
}

Expand Down

0 comments on commit 8ba5036

Please sign in to comment.