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
MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D50930
This commit is contained in:
Bjoern A. Zeeb 2025-06-19 00:01:07 +00:00
parent 0f8a8416a4
commit 69ffe3a6e7

View file

@ -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;