diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2010-01-07 23:24:55 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-15 00:16:53 +0100 |
commit | e99c7cd57b2481ee36b2338040e3ce1cd17e0763 (patch) | |
tree | c4571af4478a1b020702b361aec4bd6e34f4ec58 /net/wireless | |
parent | b43: Declare at least one real firmware file using MODULE_FIRMWARE. (diff) | |
download | linux-e99c7cd57b2481ee36b2338040e3ce1cd17e0763.tar.xz linux-e99c7cd57b2481ee36b2338040e3ce1cd17e0763.zip |
cfg80211: fix 2 GHz subband calculation for country IEs
Country IEs triplets are getting an extra channel with
the current count. This does not affect regulatory because
we always took the intersection between what the AP gave
and what CRDA believed is correct.
This however does fix processing some Country IEs with multiple
sequential 2 GHz triplets. Since our parser and the spec mandates
all channels be monitonically increasing we would drop the IE after
noticing the second triplet begins on a channel already processed.
APs that send these type of country IEs seems rare though.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/reg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index a5c2d3a6cbb2..f0859eada758 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -740,7 +740,7 @@ static struct ieee80211_regdomain *country_ie_2_rd( /* 2 GHz */ if (triplet->chans.first_channel <= 14) end_channel = triplet->chans.first_channel + - triplet->chans.num_channels; + triplet->chans.num_channels - 1; else /* * 5 GHz -- For example in country IEs if the first @@ -863,7 +863,7 @@ static struct ieee80211_regdomain *country_ie_2_rd( /* 2 GHz */ if (triplet->chans.first_channel <= 14) end_channel = triplet->chans.first_channel + - triplet->chans.num_channels; + triplet->chans.num_channels -1; else end_channel = triplet->chans.first_channel + (4 * (triplet->chans.num_channels - 1)); |