diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-10-30 16:33:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-10 15:17:41 -0500 |
commit | d71aaf6053e380996e40c9ecfe39a8dced52694c (patch) | |
tree | b93dd65c7611a4661208d1ad88d03278b3d67589 /net/wireless | |
parent | fc6971d491517ba15e800540ff88caa55dc65b01 (diff) |
cfg80211: a reg rule is invalid if freq diff is 0
A regulatory rule is invalid when the frequency difference
between the end of the frequency range and the start is 0.
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 8e5d23975a0d..34983a825ac1 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -321,7 +321,7 @@ static bool is_valid_reg_rule(const struct ieee80211_reg_rule *rule) | |||
321 | 321 | ||
322 | freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz; | 322 | freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz; |
323 | 323 | ||
324 | if (freq_range->max_bandwidth_khz > freq_diff) | 324 | if (freq_diff <= 0 || freq_range->max_bandwidth_khz > freq_diff) |
325 | return false; | 325 | return false; |
326 | 326 | ||
327 | return true; | 327 | return true; |