aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index ce66bfdf57ec..58df98f10990 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -392,7 +392,8 @@ static bool is_valid_reg_rule(const struct ieee80211_reg_rule *rule)
392 392
393 freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz; 393 freq_diff = freq_range->end_freq_khz - freq_range->start_freq_khz;
394 394
395 if (freq_diff <= 0 || freq_range->max_bandwidth_khz > freq_diff) 395 if (freq_range->end_freq_khz <= freq_range->start_freq_khz ||
396 freq_range->max_bandwidth_khz > freq_diff)
396 return false; 397 return false;
397 398
398 return true; 399 return true;