Repository navigation
Refuse Wi-Fi radio settings the hardware cannot do, offer only valid ones in the WebUI - #1811
Open
mattiaswal wants to merge 11 commits into
Open
mattiaswal wants to merge 11 commits into
mattiaswal wants to merge 11 commits into
Conversation
A split wiphy dump carries one frequency per message and each one replaced the band's list, so only the last frequency of a band was kept. 2484 MHz is channel 14, and 5 GHz reaches channel 177. Signed-off-by: Mattias Walström <lazzer@gmail.com>
hostapd fails to start on a band, channel or width the radio lacks and the operator only sees an access point that never comes up. Ask yangerd once per change, and skip the check when it does not answer, as at boot. Signed-off-by: Mattias Walström <lazzer@gmail.com>
Signed-off-by: Mattias Walström <lazzer@gmail.com>
Needed to tell whether a radio can carry a mesh point before an interface is created on it. Signed-off-by: Mattias Walström <lazzer@gmail.com>
A mesh point on a radio without 802.11s support was accepted and the interface never came up. Signed-off-by: Mattias Walström <lazzer@gmail.com>
The run script for DDI images never passed opt/wifi to the guest, so make run on x86 lost the option to start with mac80211_hwsim radios. Signed-off-by: Mattias Walström <lazzer@gmail.com>
The flat channel list cannot tell 2.4 GHz channel 1 from 6 GHz channel 1. A band the country code disables every channel of was dropped, so 6 GHz looked unsupported in the world domain. Signed-off-by: Mattias Walström <lazzer@gmail.com>
The flat list accepted a channel number on 6 GHz that the radio only has on 2.4 GHz. Signed-off-by: Mattias Walström <lazzer@gmail.com>
Only a station radio goes without a band, and it follows its access point, so a channel, width or legacy rates did nothing there. Signed-off-by: Mattias Walström <lazzer@gmail.com>
A free-text channel and every band of the model let the operator pick what confd then refuses. The lists follow the applied country code, so it becomes one setting on the interfaces page, saved on change, and the forms say when it is not applied yet. Signed-off-by: Mattias Walström <lazzer@gmail.com>
A table in the handler capitalized some types and passed the rest through, so the list mixed "Bridge" and "VXLAN" with "wifi". Signed-off-by: Mattias Walström <lazzer@gmail.com>
mattiaswal
force-pushed
the
wifi-radio-validate
branch
from
November 20, 2026 20:24
3b92fc5 to
addda29
Compare
mattiaswal
marked this pull request as ready for review
November 20, 2026 21:40
This branch has not been deployed
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.
Description
Wi-Fi radio settings the hardware cannot do are now refused when configured, instead of leaving an access point that never comes up. The WebUI radio forms offer only the bands and channels the radio reports.
confd checks every changed radio against what yangerd reports and fails the commit with an error naming the radio or interface and the setting:
The radio data is read with a single
yangerctl get /ietf-hardware:hardwareper change, and only when a Wi-Fi radio is part of it. The check is skipped when yangerd does not answer, as at boot, when the radio is not present, and forchannel auto. The channel list check is also skipped when the country code changes in the same commit, since the list follows the regulatory domain and that is not applied yet.yangerd
supported-channelsheld only the last frequency of each band. A split wiphy dump carries one frequency per message and each one replaced the band's list. 2484 MHz was reported as channel 15 and is now 14, and the 5 GHz range reaches channel 177.supported-modesleaf-list on the radio.channelsleaf-list in each entry ofbands. The flat list cannot tell 2.4 GHz channel 1 from 6 GHz channel 1.YANG (
infix-hardware, same revision 2026-11-04)A radio without a band no longer takes a
channel,channel-widthorlegacy-rates. Only a station radio goes without a band, and it follows its access point. A migration drops the three leaves from such a radio on upgrade.WebUI
autoplus the channels of the chosen band. Without a band onlyautois offered.qemu:
make runon DDI images passes the number of mac80211_hwsim radios to the guest again.Known gaps:
autoand its current channel in the WebUI channel selectThe test
wifi_radio_validationcovers a channel outside the band and a channel the country code does not allow. The band, width and access point checks cannot be made to fail on hwsim, which has HE everywhere and 2048 access points. The new YANG rule is not covered by a test: it was checked with yanglint and a RESTCONF PUT on a QEMU guest, and the migration on a sample file only. The WebUI forms were checked in headless Chromium against a QEMU guest with two hwsim radios.Checklist
Tick relevant boxes, this PR is-a or has-a: