From db038022e8df6f9f3d2c470534da1312c1a533fb Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Tue, 29 Sep 2020 18:37:13 +0200 Subject: [PATCH] test-runner: Make hwsim medium optional Allow the "hwsim_medium=no" setting in hw.conf's SETUP section to disable starting hwsim. It looks like the packets going through userspace add enough latency that active scans don't work, probe responses don't arrive within the "dwell time" or probe requests are not ACKed on time. I've tried modifying tools/hwsim.c to respond with the HWSIM_CMD_TX_INFO_FRAME cmd as the first thing after receiving a HWSIM_CMD_FRAME and even skipping the queue in ell/genl.c by writing the command synchronously, but neither helped enough to make the scans work. This does not rule out that hwsim or the way our scans are done can be fixed and that would obviously be better than what I did in this patch. --- tools/test-runner | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/test-runner b/tools/test-runner index c2559dd1..3b9c1854 100755 --- a/tools/test-runner +++ b/tools/test-runner @@ -524,8 +524,9 @@ class TestContext: self.radios.append(VirtualRadio(name, rad_config)) self.cur_radio_id += 1 - # register hwsim as medium - self.start_process(['hwsim']) + if self.hw_config['SETUP'].get('hwsim_medium', 'yes') in ['yes', '1', 'true']: + # register hwsim as medium + self.start_process(['hwsim']) def discover_radios(self): phys = []