From 405d1ab77c0ec8a9f1879adf4162db0bc5ab479c Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 18 Aug 2025 07:30:40 -0700 Subject: [PATCH] auto-t: make waiting for channel switch configurable --- autotests/util/hostapd.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autotests/util/hostapd.py b/autotests/util/hostapd.py index 611d8a63..5db5ef21 100644 --- a/autotests/util/hostapd.py +++ b/autotests/util/hostapd.py @@ -288,13 +288,15 @@ class HostapdCLI(object): cmd = 'RESEND_M3 %s' % address self.ctrl_sock.sendall(cmd.encode('utf-8')) - def chan_switch(self, channel): + def chan_switch(self, channel, wait=True): if channel > len(chan_freq_map): raise Exception("Only 2.4GHz channels supported for chan_switch") cmd = self.cmdline + ['chan_switch', '50', str(chan_freq_map[channel])] ctx.start_process(cmd).wait() - self.wait_for_event('AP-CSA-FINISHED') + + if wait: + self.wait_for_event('AP-CSA-FINISHED') def _get_status(self): ret = {}