diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-11-13 01:21:55 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-26 00:41:21 +0300 |
commit | 91e9900418fb01229094fb83befa3591afcae1e7 (patch) | |
tree | 3342f14661e0d02a0c6815dc62b03f8b73cf9466 /net | |
parent | e0737a77d6cba100dea7e53bf490d67d110bc037 (diff) | |
download | linux-91e9900418fb01229094fb83befa3591afcae1e7.tar.xz |
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 <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/reg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 4c7e39d466c4..7a2ce270f4d3 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) |