fix(network): fill iwd band and RSSI from Station diagnostics - #4275
Open
kvnloo wants to merge 2 commits into
Open
fix(network): fill iwd band and RSSI from Station diagnostics#4275kvnloo wants to merge 2 commits into
kvnloo wants to merge 2 commits into
Conversation
…talia-dev#4148) iwd never wrote frequencyMhz, so the Wi-Fi band chip stayed empty on NixOS. On a connected station call StationDiagnostic.GetDiagnostics, copy Frequency into frequencyMhz, and map RSSI only when OrderedNetworks left signalStrength at 0. Missing diagnostic interface stays fail-closed. Refs noctalia-dev#4148
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On iwd connected refresh, call
StationDiagnostic.GetDiagnostics(). WhenFrequency> 0, setfrequencyMhz. When OrderedNetworks leftsignalStrengthat 0 and RSSI is present, map dBm with existingsignalToPercent. RSSI is read only via supported D-Bus integer forms (int16_t/int32_t), notint8_t.Motivation
Origin issue #4148: the connection chip never showed band/RSSI on iwd because the backend never filled
frequencyMhz/ fallback strength even though the display path already existed.Type of Change
Related Issue
Closes #4148
Testing
iwd_diagnostics_test: exit 0 — 2437 MHz →2.4 GHz, 5180 →5 GHz, 5955 →6 GHz; frequency 0 unlabeled; RSSI -70 → 60% only when OrderedNetworks left strength 0.-DIWD_DIAGNOSTICS_BASELINE) failsconnected.frequencyMhz == 2437(exit 1).src/**/*.cppandsrc/**/*.h: exit 0.iwd_service.cppC++23 syntax-only with sdbus-c++ flags: exit 0 (confirms unsupportedVariant::get<std::int8_t>()is gone).Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed, or this PR has no code changes.docs/user/when this PR changes documented behavior or configuration, or this PR does not require documentation changes.assets/translations/en.json, or this PR adds no new user-facing strings.Additional Notes
Prior PR #4240 was closed for an incomplete template body and had a debug-build failure on
Variant::get<std::int8_t>(). This reopens the same branch at CI-fixed head5de755e4135bce5c6c44bf47dc9f89a5ae49c1bb.