]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Clear AP scan cache after primary BSS on channel 40
authorJouni Malinen <quic_jouni@quicinc.com>
Mon, 14 Feb 2022 22:34:55 +0000 (00:34 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 14 Feb 2022 22:34:55 +0000 (00:34 +0200)
A number of test cases using 40 MHz or wider channels with the primary
channel 36 were failing when executed after dpp_chirp_ap_5g since that
test case was running an AP on the channel 40 and resulting in need to
swap the primary and the secondary channels in the following test case.
Fix this by clearing the AP scan cache explicitly for such cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_ap_tdls.py
tests/hwsim/test_ap_vht.py
tests/hwsim/test_dpp.py

index 8cdd002355677b5720e4815aa1df7c19e0b77bcc..637dd3e531cc92bd889f978c5bce8152df0585c0 100644 (file)
@@ -415,6 +415,7 @@ def test_ap_open_tdls_vht(dev, apdev):
 
 def test_ap_open_tdls_vht80(dev, apdev):
     """Open AP and two stations using TDLS with VHT 80"""
+    clear_scan_cache(apdev[0])
     params = {"ssid": "test-open",
               "country_code": "US",
               "hw_mode": "a",
@@ -453,6 +454,7 @@ def test_ap_open_tdls_vht80(dev, apdev):
 
 def test_ap_open_tdls_vht80plus80(dev, apdev):
     """Open AP and two stations using TDLS with VHT 80+80"""
+    clear_scan_cache(apdev[0])
     params = {"ssid": "test-open",
               "country_code": "US",
               "hw_mode": "a",
index b47aaa2a43f78580e742e5ae00d9c4ad423b97bb..bd991686cc3a7a5d9395ba3ea98af35cdd6257fd 100644 (file)
@@ -18,6 +18,7 @@ from test_dfs import wait_dfs_event
 
 def test_ap_vht80(dev, apdev):
     """VHT with 80 MHz channel width"""
+    clear_scan_cache(apdev[0])
     try:
         hapd = None
         params = {"ssid": "vht",
@@ -82,6 +83,7 @@ def test_ap_vht80(dev, apdev):
 
 def test_ap_vht_wifi_generation(dev, apdev):
     """VHT and wifi_generation"""
+    clear_scan_cache(apdev[0])
     try:
         hapd = None
         params = {"ssid": "vht",
@@ -165,6 +167,7 @@ def test_ap_vht80d(dev, apdev):
 
 def test_ap_vht80_params(dev, apdev):
     """VHT with 80 MHz channel width and number of optional features enabled"""
+    clear_scan_cache(apdev[0])
     try:
         hapd = None
         params = {"ssid": "vht",
@@ -301,6 +304,7 @@ def test_ap_vht_40(devs, apdevs):
     """VHT and 40 MHz channel"""
     dev = devs[0]
     ap = apdevs[0]
+    clear_scan_cache(ap)
     try:
         hapd = None
         params = {"ssid": "test-vht40",
@@ -354,6 +358,7 @@ def test_ap_vht_capab_not_supported(dev, apdev):
 
 def test_ap_vht160(dev, apdev):
     """VHT with 160 MHz channel width (1)"""
+    clear_scan_cache(apdev[0])
     try:
         hapd = None
         params = {"ssid": "vht",
@@ -1077,6 +1082,7 @@ def test_ap_vht_on_24ghz_2(dev, apdev):
 
 def test_prefer_vht40(dev, apdev):
     """Preference on VHT40 over HT40"""
+    clear_scan_cache(apdev[0])
     try:
         hapd = None
         hapd2 = None
@@ -1124,6 +1130,7 @@ def test_prefer_vht40(dev, apdev):
 
 def test_ap_vht80_pwr_constraint(dev, apdev):
     """VHT with 80 MHz channel width and local power constraint"""
+    clear_scan_cache(apdev[0])
     hapd = None
     try:
         params = {"ssid": "vht",
@@ -1156,6 +1163,7 @@ def test_ap_vht80_pwr_constraint(dev, apdev):
 
 def test_ap_vht_use_sta_nsts(dev, apdev):
     """VHT with 80 MHz channel width and use_sta_nsts=1"""
+    clear_scan_cache(apdev[0])
     try:
         hapd = None
         params = {"ssid": "vht",
@@ -1184,6 +1192,7 @@ def test_ap_vht_use_sta_nsts(dev, apdev):
 def test_ap_vht_tkip(dev, apdev):
     """VHT and TKIP"""
     skip_without_tkip(dev[0])
+    clear_scan_cache(apdev[0])
     try:
         hapd = None
         params = {"ssid": "vht",
index 1e4296c4d4cac24ea27e34a110692fcd104b8adb..044875636741c4a13bafe711fce7a9c539873aeb 100644 (file)
@@ -6328,6 +6328,7 @@ def test_dpp_chirp_ap_5g(dev, apdev):
         update_hapd_config(hapd)
     finally:
         clear_regdom(hapd, dev)
+        clear_scan_cache(apdev[0])
 
 def test_dpp_chirp_ap_errors(dev, apdev):
     """DPP chirp errors in hostapd"""