mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 15:11:50 +00:00
[PATCH] ieee80211: division by zero fix
This fixes division by zero bug in ieee80211_wx_get_scan(). Signed-off-by: Jiri Benc <jbenc@suse.cz> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
parent
28af493cd7
commit
757d18faee
@ -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) *
|
||||
|
Loading…
Reference in New Issue
Block a user