提交 757d18fa 编写于 作者: J Jiri Benc 提交者: Jeff Garzik

[PATCH] ieee80211: division by zero fix

This fixes division by zero bug in ieee80211_wx_get_scan().
Signed-off-by: NJiri Benc <jbenc@suse.cz>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 28af493c
......@@ -152,6 +152,9 @@ static inline char *ipw2100_translate_scan(struct ieee80211_device *ieee,
iwe.u.qual.level = 0;
} else {
iwe.u.qual.level = network->stats.rssi;
if (ieee->perfect_rssi == ieee->worst_rssi)
iwe.u.qual.qual = 100;
else
iwe.u.qual.qual =
(100 *
(ieee->perfect_rssi - ieee->worst_rssi) *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册