Skip to content

command: Fix WiFi scan result failed in controller - #127

Open
ian77chen wants to merge 1 commit into
mainfrom
staging-WIFI-15235-fix-wifi-scan
Open

command: Fix WiFi scan result failed in controller#127
ian77chen wants to merge 1 commit into
mainfrom
staging-WIFI-15235-fix-wifi-scan

Conversation

@ian77chen

Copy link
Copy Markdown
Contributor

skip HaLow phys and harden the scan loop

The morse driver advertises unscannable 5G frequencies, so wifiscan hung or aborted on devices with a HaLow radio. Detect morse phys via debugfs (as renderer/wifi/phy.uc does) and skip them.

  • The module called require("fs") itself. cmd.uc already passes 'fs' in,
    and redeclaring it made it null, so every fs call threw.
  • The wiphy dump returns some entries without a phy number. Reading
    phy.wiphy on those threw.
  • One radio refusing to scan called die(), killing the whole command. It
    also left a 'scan' interface behind, which then broke every later run.
  • bandwidth arrived as a number but the lookup table uses strings, so it
    never matched and ch_width ended up invalid, making intersect() loop
    over nothing.

Fixes: WIFI-15235

@tanyasingh-ec tanyasingh-ec added this to the 5.1.0 milestone Aug 4, 2026
skip HaLow phys and harden the scan loop

The morse driver advertises unscannable 5G frequencies, so wifiscan hung
or aborted on devices with a HaLow radio. Detect morse phys via debugfs
(as renderer/wifi/phy.uc does) and skip them.

Also fixes faults exposed along the way: 'fs' was re-required inside the
module and shadowed cmd.uc's injected copy with null; split_wiphy_dump
fragments without a wiphy index were dereferenced; scan_trigger() die()'d
on a single failing radio and left a stale 'scan' interface behind;
bandwidth was compared against a string-keyed table, letting ch_width
fall through to an invalid key and making intersect() iterate over null.

Fixes: WIFI-15235

Signed-off-by: Ian Chen <ian77_chen@accton.com>
@ian77chen
ian77chen force-pushed the staging-WIFI-15235-fix-wifi-scan branch from 772d025 to 1a13060 Compare August 6, 2026 09:13
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.

3 participants