Page MenuHomeFreeBSD

wtap: use typed rssi and noise floor values
ClosedPublic

Authored by bz on May 15 2026, 5:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 9, 9:33 AM
Unknown Object (File)
Sat, Aug 8, 7:28 PM
Unknown Object (File)
Mon, Aug 3, 5:25 PM
Unknown Object (File)
Sun, Aug 2, 6:24 AM
Unknown Object (File)
Sun, Aug 2, 4:58 AM
Unknown Object (File)
Sat, Aug 1, 7:53 AM
Unknown Object (File)
Wed, Jul 29, 2:16 PM
Unknown Object (File)
Fri, Jul 24, 1:44 PM
Subscribers

Details

Summary

Adjust the rssi and nf arguments to typed int8_t and adjust the maths
for rssi to be consistant with what net80211 expects.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.May 15 2026, 5:18 PM

Want to rebase this to use the net80211_rssi_t once that diff lands?

Want to rebase this to use the net80211_rssi_t once that diff lands?

No, this needs to go before that. Well, it technically needs to go before net80211_rssi_t becoming int16_t as the old code breaks the compile otherwise. So yes, update in two steps later.

This revision is now accepted and ready to land.May 15 2026, 5:23 PM
sys/dev/wtap/if_wtap.c
539

This seems making value of rssi to 137 (42 + 95) and then 247 (137 * 2) and exceed the range of int8_t?

bz marked an inline comment as done.
bz added inline comments.
sys/dev/wtap/if_wtap.c
539

I just added the child revision; there is a link to yet another Dxxxx in it which explains the entire problem and also why @adrian asks if I will update this as well later.

This revision was automatically updated to reflect the committed changes.
bz marked an inline comment as done.