tests: Clear AP scan cache after primary BSS on channel 40

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>
This commit is contained in:
Jouni Malinen 2022-02-15 00:34:55 +02:00 committed by Jouni Malinen
parent f5ce9111c5
commit b9897f1f3c
3 changed files with 12 additions and 0 deletions

View 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",

View 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",

View 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"""