wifi(linux): query associated station directly

mdlayher/wifi only dumps stations, which some full-MAC drivers (e.g.
out-of-tree Realtek USB) answer with an empty list, leaving RSSI
unavailable. Request the associated BSSID's station directly, as
`iw link` does, and parse it with native.ParseStationInfo.
This commit is contained in:
henrygd
2026-09-25 19:53:35 -04:00
parent fe83f5b831
commit a042e19549
3 changed files with 79 additions and 14 deletions

4
go.mod
View File

@@ -10,6 +10,8 @@ require (
github.com/fxamacker/cbor/v2 v2.9.4
github.com/gliderlabs/ssh v0.3.8
github.com/lxzan/gws v1.10.2
github.com/mdlayher/genetlink v1.4.0
github.com/mdlayher/netlink v1.11.2
github.com/mdlayher/wifi v0.8.0
github.com/nicholas-fedor/shoutrrr v0.21.0
github.com/opencontainers/go-digest v1.0.0
@@ -52,8 +54,6 @@ require (
github.com/lufia/plan9stats v0.0.0-20260802145828-341c2f0c90b5 // indirect
github.com/mattn/go-colorable v0.1.15 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
github.com/mdlayher/genetlink v1.4.0 // indirect
github.com/mdlayher/netlink v1.11.2 // indirect
github.com/mdlayher/socket v0.6.0 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/pocketbase/ozzo-validation/v4 v4.3.0 // indirect