提交 d71aaf60 编写于 作者: L Luis R. Rodriguez 提交者: John W. Linville

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: NLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 fc6971d4
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册