diff --git a/tests/hwsim/test_ap_dynamic.py b/tests/hwsim/test_ap_dynamic.py index 19eb9c43d..ca418dc05 100644 --- a/tests/hwsim/test_ap_dynamic.py +++ b/tests/hwsim/test_ap_dynamic.py @@ -90,6 +90,7 @@ def test_ap_bss_add_remove(dev, apdev): def _test_ap_bss_add_remove(dev, apdev): for i in range(3): + dev[i].flush_scan_cache() dev[i].request("SCAN_INTERVAL 1") ifname1 = apdev[0]['ifname'] ifname2 = apdev[0]['ifname'] + '-2' @@ -152,6 +153,8 @@ def _test_ap_bss_add_remove(dev, apdev): def test_ap_bss_add_remove_during_ht_scan(dev, apdev): """Dynamic BSS add during HT40 co-ex scan""" + for i in range(3): + dev[i].flush_scan_cache() ifname1 = apdev[0]['ifname'] ifname2 = apdev[0]['ifname'] + '-2' hostapd.add_bss('phy3', ifname1, 'bss-ht40-1.conf') @@ -173,6 +176,8 @@ def test_ap_bss_add_remove_during_ht_scan(dev, apdev): def test_ap_multi_bss_config(dev, apdev): """hostapd start with a multi-BSS configuration file""" + for i in range(3): + dev[i].flush_scan_cache() ifname1 = apdev[0]['ifname'] ifname2 = apdev[0]['ifname'] + '-2' ifname3 = apdev[0]['ifname'] + '-3' diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py index 8a8aa9f98..001e7224a 100644 --- a/tests/hwsim/test_ap_ht.py +++ b/tests/hwsim/test_ap_ht.py @@ -768,6 +768,7 @@ def test_ap_require_ht(dev, apdev): disable_ht="1", wait_connect=False) dev[0].connect("require-ht", key_mgmt="NONE", scan_freq="2412") ev = dev[1].wait_event(["CTRL-EVENT-ASSOC-REJECT"]) + dev[1].request("DISCONNECT") if ev is None: raise Exception("Association rejection timed out") if "status_code=27" not in ev: @@ -789,6 +790,7 @@ def test_ap_require_ht_limited_rates(dev, apdev): disable_ht="1", wait_connect=False) dev[0].connect("require-ht", key_mgmt="NONE", scan_freq="2412") ev = dev[1].wait_event(["CTRL-EVENT-ASSOC-REJECT"]) + dev[1].request("DISCONNECT") if ev is None: raise Exception("Association rejection timed out") if "status_code=27" not in ev: