git: cfc216559c92 - stable/14 - bsnmp: wlan: use correct value for rssi
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 16 Jan 2026 19:40:18 UTC
The branch stable/14 has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=cfc216559c92e8c4b610175d58a10c09a6a5e66d
commit cfc216559c92e8c4b610175d58a10c09a6a5e66d
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-06-19 00:01:07 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-01-16 19:37:40 +0000
bsnmp: wlan: use correct value for rssi
net80211 keeps the rssi value in 0.5bm relative to the noise floor
(see comment in ieee80211_node.h). Do proper maths to get a plain
rssi value back (once further fixes are in net80211).
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D50930
(cherry picked from commit 69ffe3a6e778c3400a27a1098969802ac4cb5f56)
---
usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
index b129e42b9d85..e80b53dcf44e 100644
--- a/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
+++ b/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c
@@ -2167,7 +2167,7 @@ wlan_add_new_scan_result(struct wlan_iface *wif,
return (-1);
sr->opchannel = wlan_channel_flags_to_snmp_phy(isr->isr_flags);
- sr->rssi = isr->isr_rssi;
+ sr->rssi = (isr->isr_rssi / 2) - isr->isr_noise;
sr->frequency = isr->isr_freq;
sr->noise = isr->isr_noise;
sr->bintval = isr->isr_intval;