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
F162725667: D57020.id177907.diff
Thu, Jul 16, 4:46 AM
F162680681: D57020.diff
Wed, Jul 15, 5:00 PM
F162637627: D57020.diff
Wed, Jul 15, 7:22 AM
F162637626: D57020.diff
Wed, Jul 15, 7:22 AM
Unknown Object (File)
Thu, Jul 9, 12:43 AM
Unknown Object (File)
Sun, Jul 5, 6:16 AM
Unknown Object (File)
Sat, Jul 4, 12:33 PM
Unknown Object (File)
Sat, Jul 4, 5:53 AM
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.