From 0b36f497c5ed7d77bda3d94baafb6504a5fc1aa8 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Tue, 11 Jan 2022 16:55:56 -0800 Subject: [PATCH] auto-t: wpas.py: add freq argument to configurator_start This forces the configurator to request a new channel during the authentication protocol. --- autotests/util/wpas.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/autotests/util/wpas.py b/autotests/util/wpas.py index 2e50eb58..f8ef3357 100644 --- a/autotests/util/wpas.py +++ b/autotests/util/wpas.py @@ -268,11 +268,17 @@ class Wpas: print("DPP Configurator ID: %s. DPP QR ID: %s" % (self._dpp_conf_id, self._dpp_qr_id)) - def dpp_configurator_start(self, ssid, passphrase): + def dpp_configurator_start(self, ssid, passphrase, freq=None): ssid = binascii.hexlify(ssid.encode()).decode() passphrase = binascii.hexlify(passphrase.encode()).decode() - self._ctrl_request('DPP_AUTH_INIT peer=%s conf=sta-psk ssid=%s pass=%s' % (self._dpp_qr_id, ssid, passphrase)) + cmd = 'DPP_AUTH_INIT peer=%s conf=sta-psk ssid=%s pass=%s ' % (self._dpp_qr_id, ssid, passphrase) + + if freq: + cmd += 'neg_freq=%u ' % freq + + self._rx_data = [] + self._ctrl_request(cmd) self.wait_for_event('DPP-AUTH-SUCCESS') self.wait_for_event('DPP-CONF-SENT')