Skip to content

WiFi tuning: multicast-to-unicast, 802.11v band steering, radio health, self-heal (#41) - #88

Merged
Cd1s merged 1 commit into
mainfrom
feat/wifi-tuning
Sep 26, 2026
Merged

Cd1s merged 1 commit into
mainfrom
feat/wifi-tuning

Conversation

@Cd1s

@Cd1s Cd1s commented Sep 26, 2026

Copy link
Copy Markdown
Owner

What

Everything is off by default. There is no resident process: crond runs mr wifi tick every minute, only when steering or self-heal is on.

  1. multicast_to_unicast per SSID
    • mac80211 converts multicast on the AP's own transmit path, so the bridge does not need to change.
  2. 802.11v band steering (wifi.steering: {enabled, min_signal_2g, exclude})
    • Sends BSS Transition Management requests, never with disassoc_imminent: a station may decline and is never kicked.
    • Only 2.4G stations with a good signal that support 802.11v are asked, and only towards the 5G BSS of the same SSID (same name, security, key and network).
    • Neighbour reports are exchanged between the bands.
    • Rate limits per station: one request every 30 min, 4 h of quiet after a refusal, at most 3 a day.
    • mr wifi steer --dry-run shows who would be asked without sending anything.
  3. Radio health
    • Shows temperature and throttling, acknowledged TX frames (WED-forwarded traffic included), the air-time fairness state (vow_atf), firmware resets and per-station airtime.
    • Available as mr wifi health, API wifi.health (read), web UI 无线 › 射频健康, and a doctor check.
  4. wifi.self_heal
    • Triggers when stations are associated but the TX counters stop moving for 10 minutes.
    • Steps, 10 minutes apart: the driver's full-chip firmware recovery (once), then a hostapd restart, then only a risk event. It never reboots the router.
    • At most 4 actions per radio per day, and none while a change waits for confirmation.

Not included: PPSK, WDS, 802.11r.

Verification

  • On an MT7986 with the OpenWrt mt76 2026.09.01 package (read only):
    • vow_atf exists and is on;
    • sys_recovery accepts values 0–8;
    • the tx_stats / hwmon / airtime sources are present;
    • hostapd 2.11 has BSS_TM_REQ, SHOW/SET_NEIGHBOR and multicast_to_unicast.
  • Go tests: validation, rendering, parsing of real hostapd output, the steering decision table, a full steering run against a fake control socket, and self-heal against a fake sysfs.
  • tools/ci.d/wifi.sh: real hostapd 2.11 parses the rendered configs; the cron tick is present.
  • sh tools/ci.sh: ALL CHECKS PASSED.
  • Cost: +64 KiB binary; about 40–60 ms CPU per minute while on.

Closes #41

https://claude.ai/code/session_01HWeUjo1dmS7gBkCYHrVjCr

…h and self-heal

All off by default; no resident process (crond runs `mr wifi tick` every minute when needed).

- multicast_to_unicast per SSID (mac80211 converts on the AP's own TX path: no bridge change).
- wifi.steering: BSS Transition Management requests (never disassoc_imminent) to 2.4G stations
  with a good signal that support 802.11v, towards the 5G BSS of the same SSID (same name, security,
  key, network); neighbour reports on both bands; rate limits per station; `mr wifi steer --dry-run`.
- Radio health: temperature, throttling, acknowledged TX frames (WED-forwarded traffic included),
  air-time fairness state, firmware resets, per-station airtime — `mr wifi health`, API wifi.health,
  web UI 无线 › 射频健康, a doctor check.
- wifi.self_heal: stations associated but TX frozen for 10 minutes → the driver's full-chip firmware
  recovery once, then a hostapd restart, then only a risk event (never a reboot); 4 actions / radio / day.

Tests with a fake hostapd control socket and a fake sysfs; CI: real hostapd 2.11 parses the rendered
configs; web UI; docs/modules/wifi.md.

Closes #41

Claude-Session: https://claude.ai/code/session_01HWeUjo1dmS7gBkCYHrVjCr
@Cd1s
Cd1s merged commit 29889e1 into main Sep 26, 2026
2 checks passed
@Cd1s
Cd1s deleted the feat/wifi-tuning branch September 26, 2026 03:49
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.

提议:WiFi 自动调优(WED 空口公平、802.11v 频段引导、组播转单播、射频健康自愈)

1 participant