Skip to content

Conversation

@mattiaswal
Copy link
Contributor

@mattiaswal mattiaswal commented Dec 27, 2025

  • Refactor Wi-Fi model
  • Add Access Point support (including multi SSID)
  • Fix misc minor bugs

This fix #1082 by adding a scan mode which is a wifi interface with only a radio in the wifi container.

Description

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

@mattiaswal mattiaswal force-pushed the wifi-ap2 branch 2 times, most recently from a73ecce to b5cb686 Compare December 27, 2025 20:38
* Add support for AP (list connected stations)
* Add scan-mode (Scan without create a fully configured station)

Signed-off-by: Mattias Walström <lazzer@gmail.com>
@mattiaswal mattiaswal force-pushed the wifi-ap2 branch 2 times, most recently from 47a14d7 to aeabb3e Compare December 30, 2025 16:51
@mattiaswal mattiaswal marked this pull request as ready for review December 30, 2025 16:52
@mattiaswal mattiaswal requested a review from troglobit December 30, 2025 16:52
@mattiaswal mattiaswal changed the title WiP: Add WiFi Access point support Add WiFi Access point support Dec 30, 2025
* Wi-Fi station still work (changed YANG model)
* Wi-Fi access point supported

Model is flexible to support even more modes
Example usage:
./src/statd/python/yanger/yanger -p wifi0 -x "ixll -A ssh enp195s0f0 sudo" ietf-hardware | ./board/common/rootfs/usr/libexec/infix/wifi-channel-map.py

Show the congestion in the 2.4 band.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
This allows to run yanger remote.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
@mattiaswal
Copy link
Contributor Author

mattiaswal commented Dec 31, 2025

Future improvements (not included in this PR):

  • Check the hardware for supported modes and validate in the c-code (for example it is impossible to run 5ghz on a radio only supporting 2.4Ghz)
  • Implement show interface wifi0 survey or something, to see how crouded the 2.4Ghz band is
  • Implement auto for channel, when generating config, use the python script (wifi-channel-map.py) to automatic set the current best channel, with fallback to 6 or something for 2.4.
  • Implement more settings in AP mode (This only implement bare minimum)
  • Today generate primary SSID och generate BSS is two different function, these could most likely be one

Copy link
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of comments and suggestions.

Also, please run Coverity Scan on this branch. There's a lot of C changes and additions ...

@@ -0,0 +1,4 @@
# Rename WiFi PHY devices from phy0 to wifi-phy0 to avoid name clashes
# This must run before wlan interface cleanup (70-rename-wifi.rules)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confusing comment, 70-rename-wifi.rules is removed in this PR.

Comment on lines +369 to +370
/* Note: WiFi radio handling is now integrated into hardware_change() */

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lingering comment?

Comment on lines +245 to +246
/* Note: WiFi radio handling is now integrated into hardware.c/hardware_change() */

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here? I don't think this helps, just adds to the confusion. I mean, we didn't have radio handling before?


revision 2025-11-28 {
description
"Add support for 00 - World regularity domain.";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/regularity/regulatory/ I supposed?

Comment on lines +1 to +3
service <!> name:hostapd :%i \
[2345] hostapd -P/var/run/hostapd-%i.pid /etc/hostapd-%i.conf \
-- Wi-Fi Access Point @%i
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick, one tab indent for each continuation row is sufficient.

-------------------------

> [!WARNING]
> **BREAKING CHANGES:** This release includes breaking changes to WiFi configuration:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly think we should have a migrate script that detects and disables any wifi config so users don't end up with a broken config.

"name": "radio0",
"class": "infix-hardware:wifi",
"infix-hardware:wifi-radio": {
"country-code": "DE",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DE?

"name": "radio1",
"class": "infix-hardware:wifi",
"infix-hardware:wifi-radio": {
"country-code": "DE",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same ETSI domain as SE for Wi-Fi, and conservative enough to be legal across most of EU, I guess?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wi-Fi implementation is not according to agreed scope

3 participants