aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_bsd.c
diff options
context:
space:
mode:
authorRui Paulo <rpaulo@FreeBSD.org>2013-08-07 07:57:51 (GMT)
committerJouni Malinen <j@w1.fi>2013-08-07 07:57:51 (GMT)
commit89f4690005814cb2ce0aa5e40a1a6b92ee764fcd (patch)
tree2343a978528e3604ea2453973ce7bbdba87d89c6 /src/drivers/driver_bsd.c
parent5dd82c634cb5e24500ac4d1374f806fb37dd88bb (diff)
downloadhostap-89f4690005814cb2ce0aa5e40a1a6b92ee764fcd.zip
hostap-89f4690005814cb2ce0aa5e40a1a6b92ee764fcd.tar.gz
hostap-89f4690005814cb2ce0aa5e40a1a6b92ee764fcd.tar.bz2
bsd: Compute the RSSI level
Signed-hostap: Rui Paulo <rpaulo@FreeBSD.org>
Diffstat (limited to 'src/drivers/driver_bsd.c')
-rw-r--r--src/drivers/driver_bsd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index baf7ae8..4dd611a 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -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);