From 2a5622a76f91bacfe554dfea1117a7b84273c585 Mon Sep 17 00:00:00 2001 From: eadler Date: Sat, 11 May 2013 20:55:14 +0000 Subject: Teach wpa_supplicant to properly compute wireless signal strength. PR: bin/170631 Submitted by: Daan Vreeken Reviewed by: adrian --- usr.sbin/wpa/wpa_supplicant/driver_freebsd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'usr.sbin/wpa') diff --git a/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c b/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c index 0ac3c50..24a0b9c 100644 --- a/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c +++ b/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c @@ -693,6 +693,11 @@ wpa_driver_bsd_add_scan_entry(struct wpa_scan_results *res, result->caps = sr->isr_capinfo; result->qual = sr->isr_rssi; result->noise = sr->isr_noise; + /* + * the rssi value reported by the kernel is in 0.5dB steps relative to + * the reported noise floor. see ieee80211_node.h for details. + */ + result->level = sr->isr_rssi / 2 + sr->isr_noise; pos = (u8 *)(result + 1); -- cgit v1.1