summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-10-29 01:45:03 -0700
committerLuis R. Rodriguez <lrodriguez@atheros.com>2008-10-29 01:45:03 -0700
commit84ff22a581b17fdc6702d45cbdc257cdd5da106a (patch)
tree33b8ec97fcf08a6ebd5a934611246bb8d1c79bc6
parent94858a2faff5d6c09db0291271b09fba841d10c9 (diff)
downloadcrda-84ff22a581b17fdc6702d45cbdc257cdd5da106a.tar.gz
crda-84ff22a581b17fdc6702d45cbdc257cdd5da106a.tar.bz2
crda-84ff22a581b17fdc6702d45cbdc257cdd5da106a.zip
is_valid_reg_rule() is false when freq_diff is 0
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r--reglib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/reglib.c b/reglib.c
index de6bb10..feb4af8 100644
--- a/reglib.c
+++ b/reglib.c
@@ -211,7 +211,7 @@ int is_valid_reg_rule(const struct ieee80211_reg_rule *rule)
freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz;
- if (freq_range->max_bandwidth_khz > freq_diff)
+ if (freq_diff == 0 || freq_range->max_bandwidth_khz > freq_diff)
return 0;
return 1;