fix: push_radio_channel uses 'wifi' (full restart) instead of 'wifi reload'
'wifi reload' only reapplies the running config without physically changing the channel on many ath9k/ath10k/mt76 hardware+driver combinations. A full 'wifi' (down + up) cycle is required for channel changes to take effect. Also updated the test assertion accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
512871b1bb
commit
4c41345489
@@ -528,7 +528,12 @@ class OpenWrtWirelessMixin:
|
||||
return entries
|
||||
|
||||
def push_radio_channel(self, radio: str, channel: int) -> None:
|
||||
"""Set a new channel on *radio* via UCI and reload the wireless stack.
|
||||
"""Set a new channel on *radio* via UCI and restart the wireless stack.
|
||||
|
||||
Uses ``wifi`` (full down/up cycle) rather than ``wifi reload``.
|
||||
``wifi reload`` only re-applies the running config without changing
|
||||
the physical channel on many hardware/driver combinations; a full
|
||||
restart is required for channel changes to take effect.
|
||||
|
||||
:param radio: UCI radio name, e.g. ``"radio0"``.
|
||||
:param channel: Channel number to set; ``0`` sets UCI ``auto``.
|
||||
@@ -536,7 +541,7 @@ class OpenWrtWirelessMixin:
|
||||
ch_val = "auto" if channel == 0 else str(channel)
|
||||
self._send_command(f"uci set wireless.{radio}.channel={ch_val}")
|
||||
self._send_command("uci commit wireless")
|
||||
self._send_command("wifi reload")
|
||||
self._send_command("wifi")
|
||||
|
||||
def get_radio_status(self) -> dict[str, Any]:
|
||||
"""Return radio status from UCI and iwinfo.
|
||||
|
||||
Reference in New Issue
Block a user