bsd: Compute the RSSI level

Signed-hostap: Rui Paulo <rpaulo@FreeBSD.org>
This commit is contained in:
Rui Paulo 2013-08-07 10:57:51 +03:00 committed by Jouni Malinen
parent 5dd82c634c
commit 89f4690005

View file

@ -1336,6 +1336,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);