* [PATCH] wireless: update old static regulatory domain rules
@ 2009-12-09 20:15 John W. Linville
2009-12-09 22:37 ` Julian Calaby
0 siblings, 1 reply; 4+ messages in thread
From: John W. Linville @ 2009-12-09 20:15 UTC (permalink / raw)
To: linux-wireless; +Cc: mcgrof, John W. Linville
Update "US" and "JP" for current rules, and replace "EU" rules with the
world roaming domain (since it was only a pseudo-domain anyway).
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
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 c01470e..baa898a 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -141,62 +141,35 @@ static const struct ieee80211_regdomain us_regdom = {
.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, channel 36..48 */
+ REG_RULE(5180-10, 5240+10, 40, 6, 17, 0),
/* IEEE 802.11a, channels 48..64 */
- REG_RULE(5240-10, 5320+10, 40, 6, 23, 0),
+ 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 = 3,
+ .n_reg_rules = 6,
.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.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_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),
+ 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),
}
};
@@ -206,15 +179,17 @@ static const struct ieee80211_regdomain *static_regdom(char *alpha2)
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 &eu_regdom;
- /* Default, as per the old rules */
- return &us_regdom;
+ 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 == &eu_regdom)
+ if (rd == &us_regdom || rd == &jp_regdom || rd == &world_regdom)
return true;
return false;
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] wireless: update old static regulatory domain rules
2009-12-09 20:15 [PATCH] wireless: update old static regulatory domain rules John W. Linville
@ 2009-12-09 22:37 ` Julian Calaby
2009-12-10 0:06 ` John W. Linville
0 siblings, 1 reply; 4+ messages in thread
From: Julian Calaby @ 2009-12-09 22:37 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, mcgrof
On Thu, Dec 10, 2009 at 07:15, John W. Linville <linville@tuxdriver.com> wrote:
> Update "US" and "JP" for current rules, and replace "EU" rules with the
> world roaming domain (since it was only a pseudo-domain anyway).
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
> 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 c01470e..baa898a 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -206,15 +179,17 @@ static const struct ieee80211_regdomain *static_regdom(char *alpha2)
> 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 &eu_regdom;
> - /* Default, as per the old rules */
> - return &us_regdom;
> + return &world_regdom;
> + /* Default, world roaming rules */
> + return &world_regdom;
> }
Is the if statement for the "EU" regdom really necessary (except as
documentation) as we're returning &world_regdom by default?
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wireless: update old static regulatory domain rules
2009-12-09 22:37 ` Julian Calaby
@ 2009-12-10 0:06 ` John W. Linville
2009-12-10 0:18 ` Julian Calaby
0 siblings, 1 reply; 4+ messages in thread
From: John W. Linville @ 2009-12-10 0:06 UTC (permalink / raw)
To: Julian Calaby; +Cc: linux-wireless, mcgrof
On Thu, Dec 10, 2009 at 09:37:25AM +1100, Julian Calaby wrote:
> On Thu, Dec 10, 2009 at 07:15, John W. Linville <linville@tuxdriver.com> wrote:
> > Update "US" and "JP" for current rules, and replace "EU" rules with the
> > world roaming domain (since it was only a pseudo-domain anyway).
> >
> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
> > ---
> > 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 c01470e..baa898a 100644
> > --- a/net/wireless/reg.c
> > +++ b/net/wireless/reg.c
> > @@ -206,15 +179,17 @@ static const struct ieee80211_regdomain *static_regdom(char *alpha2)
> > 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 &eu_regdom;
> > - /* Default, as per the old rules */
> > - return &us_regdom;
> > + return &world_regdom;
> > + /* Default, world roaming rules */
> > + return &world_regdom;
> > }
>
> Is the if statement for the "EU" regdom really necessary (except as
> documentation) as we're returning &world_regdom by default?
No, it's not necessary except as documentation. However, I like it
just for that reason. :-)
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wireless: update old static regulatory domain rules
2009-12-10 0:06 ` John W. Linville
@ 2009-12-10 0:18 ` Julian Calaby
0 siblings, 0 replies; 4+ messages in thread
From: Julian Calaby @ 2009-12-10 0:18 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, mcgrof
On Thu, Dec 10, 2009 at 11:06, John W. Linville <linville@tuxdriver.com> wrote:
> On Thu, Dec 10, 2009 at 09:37:25AM +1100, Julian Calaby wrote:
>> On Thu, Dec 10, 2009 at 07:15, John W. Linville <linville@tuxdriver.com> wrote:
>> > Update "US" and "JP" for current rules, and replace "EU" rules with the
>> > world roaming domain (since it was only a pseudo-domain anyway).
>> >
>> > Signed-off-by: John W. Linville <linville@tuxdriver.com>
>> > ---
>> > 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 c01470e..baa898a 100644
>> > --- a/net/wireless/reg.c
>> > +++ b/net/wireless/reg.c
>> > @@ -206,15 +179,17 @@ static const struct ieee80211_regdomain *static_regdom(char *alpha2)
>> > 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 &eu_regdom;
>> > - /* Default, as per the old rules */
>> > - return &us_regdom;
>> > + return &world_regdom;
>> > + /* Default, world roaming rules */
>> > + return &world_regdom;
>> > }
>>
>> Is the if statement for the "EU" regdom really necessary (except as
>> documentation) as we're returning &world_regdom by default?
>
> No, it's not necessary except as documentation. However, I like it
> just for that reason. :-)
Fair enough =)
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-10 0:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-09 20:15 [PATCH] wireless: update old static regulatory domain rules John W. Linville
2009-12-09 22:37 ` Julian Calaby
2009-12-10 0:06 ` John W. Linville
2009-12-10 0:18 ` Julian Calaby
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.