]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
bsd: Compute the RSSI level
authorRui Paulo <rpaulo@FreeBSD.org>
Wed, 7 Aug 2013 07:57:51 +0000 (10:57 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 7 Aug 2013 07:57:51 +0000 (10:57 +0300)
Signed-hostap: Rui Paulo <rpaulo@FreeBSD.org>

src/drivers/driver_bsd.c

index baf7ae8f1c34d81d59d993809f80c0c5abb6c278..4dd611ae7c79b040d9f3daf9694651841949b888 100644 (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);