Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130153
b: refs/heads/master
c: 02e68a3
h: refs/heads/master
i:
  130151: 637e2f6
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Jan 16, 2009
1 parent 0cb4288 commit a481465
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 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: 0c7dc45d21de6ae212b5ccb7cdff5beff795ccf0
refs/heads/master: 02e68a3da0fbdb178cdec54b7db48edeefd1691d
21 changes: 19 additions & 2 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ static struct ieee80211_regdomain *country_ie_2_rd(

/* This time around we fill in the rd */
while (country_ie_len >= 3) {
int end_channel = 0;
struct ieee80211_country_ie_triplet *triplet =
(struct ieee80211_country_ie_triplet *) country_ie;
struct ieee80211_reg_rule *reg_rule = NULL;
Expand All @@ -584,6 +585,23 @@ static struct ieee80211_regdomain *country_ie_2_rd(

reg_rule->flags = flags;

/* 2 GHz */
if (triplet->chans.first_channel <= 14)
end_channel = triplet->chans.first_channel +
triplet->chans.num_channels;
else
/*
* 5 GHz -- For example in country IEs if the first
* channel given is 36 and the number of channels is 4
* then the individual channel numbers defined for the
* 5 GHz PHY by these parameters are: 36, 40, 44, and 48
* and not 36, 37, 38, 39.
*
* See: http://tinyurl.com/11d-clarification
*/
end_channel = triplet->chans.first_channel +
(4 * (triplet->chans.num_channels - 1));

/* The +10 is since the regulatory domain expects
* the actual band edge, not the center of freq for
* its start and end freqs, assuming 20 MHz bandwidth on
Expand All @@ -593,8 +611,7 @@ static struct ieee80211_regdomain *country_ie_2_rd(
triplet->chans.first_channel) - 10);
freq_range->end_freq_khz =
MHZ_TO_KHZ(ieee80211_channel_to_frequency(
triplet->chans.first_channel +
triplet->chans.num_channels) + 10);
end_channel) + 10);

/* Large arbitrary values, we intersect later */
/* Increment this if we ever support >= 40 MHz channels
Expand Down

0 comments on commit a481465

Please sign in to comment.