summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-10-30 13:33:52 -0700
committerJohn W. Linville <linville@tuxdriver.com>2008-11-10 15:17:41 -0500
commitd71aaf6053e380996e40c9ecfe39a8dced52694c (patch)
treeb93dd65c7611a4661208d1ad88d03278b3d67589 /net/wireless
parentfc6971d491517ba15e800540ff88caa55dc65b01 (diff)
downloadop-kernel-dev-d71aaf6053e380996e40c9ecfe39a8dced52694c.zip
op-kernel-dev-d71aaf6053e380996e40c9ecfe39a8dced52694c.tar.gz
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 8e5d239..34983a8 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)
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 false;
return true;
OpenPOWER on IntegriCloud