-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
luci-mod-status: channel analysis shows more radios than expected on BPI R4 #7483
Comments
Repros also on 24.10.0-rc4. |
Which LuCI version are you using? Did you use the image from downloads.openwrt.org or did you use the image builder? For me it is working with this version: |
OpenWrt 24.10.0-rc4 r28211-d55754ce0d / LuCI openwrt-24.10 branch 24.357.59006~41cbd31 built from the branch. |
hmm strange. I used a Linksys E8450 (UBI) and accessed LuCi using Firefox. |
On BPI r4, both Chrome and Edge, this is broken. |
I don't have 24.10 (using snapshot / my own build) however there have been changes both on mtk (by having a single physical device and "logical" radios using the following naming standard "phy.ap" and new ucode code that may be causing issues with luci (I actually noticed a new bug) however |
My wireless config isn't super fancy:
also ToT of 24.10 doesn't seem to have any relevant commits on top of RC4 but I'll give it a try nevertheless... |
so did some troubleshooting and I suspect the root cause is with iwinfo the code is querying radio 0 via a rpc call to iwinfo iwinfo radio0 info points to the 5Ghz radio (it should be the 2GHz radio) so the rpc call should be against the interface like radio0-2 always points to the 5GHz |
Somewhere luci pulls this info. It gets the 'radios' here ( luci/modules/luci-mod-status/htdocs/luci-static/resources/view/status/channel_analysis.js Line 388 in 527acd5
which calls: luci/modules/luci-base/htdocs/luci-static/resources/network.js Lines 1376 to 1388 in 527acd5
So this depends entirely on what is already in Three radios, each capable of 3 spectra. |
Yeah, I think the trouble lies with iwinfo as well. It seems to be written with the assumption that every phy maps to exactly one radio (and therefore that every separate radio must be a separate phy). However:
This seems to be a relatively new feature introduced to support MLO, see: |
I spent some time since yesterday learning about the various innerworkings of linux wireless and OpenWRT's wifi config stack. From what I can tell, the crucial part is how iwinfo goes from a UCI device name (e.g. radio0), or a PHY name (e.g. phy0) to an interface name (e.g. phy0.X-apY by default, with X = radio index and Y = VIF index), which it then uses to scan. Currently, given a UCI name 'radio0', iwinfo will look up that config section through UCI, then attempt to find a PHY index (always 0 in this case) through 'path', 'macaddr' and lastly 'phy' options. Crucially, all this will always just resolve to index 0 for all radios, because they belong to the same PHY.
UCI wifi-device sections are distinguished on this board through a relatively new option ('radio') specifying the radio index to use. Unfortunately, looking through e.g. /sys/class/net/phy0.1-ap0/, there is a phy80211 symlink pointing to the phy, but there seems to be no way to find out the radio index from an interface, not even through netlink (which does otherwise expose information about the radios belonging to a PHY). Deducing the radio index from the interface name is not a good solution, because the prefix (consisting of the phy0.0 part) may be overridden by configuration (openwrt/openwrt@a9ff3ba). From what I can tell, the expectation from netlink seems to be that you can uniquely address a specific radio by using an interface name. Because having multiple radios per PHY is a pretty recent feature, not being able to address a radio (for scanning etc) by just a (phy,radio) index pair seems like an oversight. The best solution would probably be to add something like an ieee80211_radio_index node to /sys/class/net/* for ieee80211 interfaces that would allow for identifying the radio a network interface is assigned to. |
Is there an existing issue for this?
screenshots or captures
Actual behaviour
In OpenWRT 24.10-RC2+, using a BPI r4, the radio stack is not identified correctly in the status -> channel analisys page resulting in multiple detection of radios. Also channel analisys is misbehaving.
Expected behaviour
Expected behavior is 3 tabs, one per radio/band (as opposed to one per radio per band) as it was in earlier builds.
This started happening after the "option path" identifier has been changed for the BPI r4 radios.
Steps to reproduce
Just run a normal openwrt build on a BPI r4.
Additional Information
What browsers do you see the problem on?
Microsoft Edge
Relevant log output
No response
The text was updated successfully, but these errors were encountered: