From ca4fd18290cc0966cba6d71a079d8c9177e53d1d Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 4 Apr 2014 23:13:49 +0300 Subject: [PATCH] tests: Speed up IBSS test using single channel scan on SELECT_NETWORK This removes unnecessary waits and adds test coverage for SELECT_NETWORK freq parameter. Signed-off-by: Jouni Malinen --- tests/hwsim/test_ibss.py | 2 +- tests/hwsim/wpasupplicant.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/hwsim/test_ibss.py b/tests/hwsim/test_ibss.py index 641a23674..a83253e23 100644 --- a/tests/hwsim/test_ibss.py +++ b/tests/hwsim/test_ibss.py @@ -13,7 +13,7 @@ import hwsim_utils def connect_ibss_cmd(dev, id): dev.dump_monitor() - dev.select_network(id) + dev.select_network(id, freq="2412") def wait_ibss_connection(dev): logger.info(dev.ifname + " waiting for IBSS start/join to complete") diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index 8a2a3fb88..cd64b147b 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -231,8 +231,12 @@ class WpaSupplicant: return id; - def select_network(self, id): - id = self.request("SELECT_NETWORK " + str(id)) + def select_network(self, id, freq=None): + if freq: + extra = " freq=" + freq + else: + extra = "" + id = self.request("SELECT_NETWORK " + str(id) + extra) if "FAIL" in id: raise Exception("SELECT_NETWORK failed") return None