diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2010-01-14 13:27:46 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-14 18:16:56 -0500 |
commit | a0f2e0fca1e72c1de07e834be05b61d33842253e (patch) | |
tree | 02f1ecd172092dec6dec9a13806daccf3a53b290 /net/wireless/reg.c | |
parent | c99445b14054e0c4ed4715df1dad1fc608cbab46 (diff) |
cfg80211: Ingore country IEs with a zero set of number of channels
Previous to this and the last patch, titled,
"cfg80211: Fix 2 GHz subband calculation for country IEs"
we would end up treating these IEs as single channel units. These are in
fact just bogus IE triplets so ignore the entire IE if these are found.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index f0859eada758..f3b77f7b8e3d 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -585,6 +585,9 @@ static int max_subband_chan(int orig_cur_chan, | |||
585 | break; | 585 | break; |
586 | } | 586 | } |
587 | 587 | ||
588 | if (triplet->chans.num_channels == 0) | ||
589 | return 0; | ||
590 | |||
588 | /* Monitonically increasing channel order */ | 591 | /* Monitonically increasing channel order */ |
589 | if (triplet->chans.first_channel <= end_subband_chan) | 592 | if (triplet->chans.first_channel <= end_subband_chan) |
590 | return 0; | 593 | return 0; |
@@ -737,6 +740,9 @@ static struct ieee80211_regdomain *country_ie_2_rd( | |||
737 | break; | 740 | break; |
738 | } | 741 | } |
739 | 742 | ||
743 | if (triplet->chans.num_channels == 0) | ||
744 | return NULL; | ||
745 | |||
740 | /* 2 GHz */ | 746 | /* 2 GHz */ |
741 | if (triplet->chans.first_channel <= 14) | 747 | if (triplet->chans.first_channel <= 14) |
742 | end_channel = triplet->chans.first_channel + | 748 | end_channel = triplet->chans.first_channel + |