Skip to content

fix: refuse up front when the WiFi channel can't host an AP (no IR) - #3

Merged
krotrn merged 1 commit into
mainfrom
fix/no-ir-channels
Oct 4, 2026
Merged

krotrn merged 1 commit into
mainfrom
fix/no-ir-channels

Conversation

@krotrn

@krotrn krotrn commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Found on real hardware right after 0.7.0: an Intel AX201 connected to a phone hotspot on 5 GHz channel 44. The card marks 5 GHz channels 36–144 no IR (it may join, but not start, networks there). Being a single-channel radio, it must host on the WiFi's channel, so hostapd failed and the NetworkManager fallback failed with "No suitable device found".

  • Parse which channels allow starting a network from iw phy info (skip disabled, no IR, radar detection).
  • Refuse up front with the fix (switch the network to 2.4 GHz); --allow-disconnect hosts on an allowed channel instead.
  • When free to choose, use only allowed channels (5 GHz 149–165 on this card), falling back to 2.4 GHz.
  • detect and the GUI warn before starting; detect --json adds capability.ap_frequencies and verdict.warnings.
  • NetworkManager strategies wait until NM adopts the new interface.

Test plan

  • 267 tests, incl. an integration test reproducing the real case with the card's real channel flags
  • apsta detect on the affected laptop now warns: "Your WiFi is on 5 GHz channel 44, where this card can't host."
  • GitHub Actions

Found on real hardware after 0.7.0: an Intel AX201 connected to a phone
hotspot on 5 GHz channel 44. The card marks 5 GHz 36-144 "no IR", and as a
single-channel radio it must host on the WiFi's channel, so hostapd failed
("Hardware does not support configured channel") and the NetworkManager
fallback failed with "No suitable device found".

- parse AP-capable frequencies from `iw phy info` (skip disabled, no IR,
  radar detection); expose as capability.ap_frequencies
- channel plan: refuse an unusable WiFi channel with the 2.4 GHz workaround;
  with --allow-disconnect only the single-interface method runs, on an
  allowed channel; free choice picks allowed channels, falling back to 2.4 GHz
- detect and the GUI hardware report show 5 GHz hosting and warn in advance
- NM strategies wait until NetworkManager adopts the virtual interface
- tests reproduce the real case with the card's real channel flags
Copilot AI balanced review requested due to automatic review settings October 4, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@krotrn
krotrn merged commit 97029f0 into main Oct 4, 2026
21 checks passed
@krotrn
krotrn deleted the fix/no-ir-channels branch October 4, 2026 20:55
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.

2 participants