From: Luis R. Rodriguez Date: Wed, 12 Nov 2008 22:21:55 +0000 (-0800) Subject: cfg80211: mark negative frequencies as invalid X-Git-Tag: v2.6.29-rc1~581^2~383^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91e9900418fb01229094fb83befa3591afcae1e7;p=profile%2Fivi%2Fkernel-x86-ivi.git cfg80211: mark negative frequencies as invalid Regulatory rules with negative frequencies are now marked as invalid in is_valid_reg_rule(). Signed-off-by: Luis R. Rodriguez Acked-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 4c7e39d..7a2ce27 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -330,7 +330,7 @@ static bool is_valid_reg_rule(const struct ieee80211_reg_rule *rule) const struct ieee80211_freq_range *freq_range = &rule->freq_range; u32 freq_diff; - if (freq_range->start_freq_khz == 0 || freq_range->end_freq_khz == 0) + if (freq_range->start_freq_khz <= 0 || freq_range->end_freq_khz <= 0) return false; if (freq_range->start_freq_khz > freq_range->end_freq_khz)