It was possible for the first wt.clear_bss_counters(bssid) call to fail
the test if timing worked out in a way that the wlantest process had not
received any Beacon frames from the first AP. Run a directed scan for
both of the BSSs before starting the test validation steps to make sure
such a case cannot fail this test case.
Signed-off-by: Jouni Malinen <j@w1.fi>
wt = Wlantest()
wt.flush()
+ # Make sure wlantest has seen both BSSs to avoid issues in trying to clear
+ # counters for non-existing BSS.
+ dev[0].scan_for_bss(bssid, freq="2412")
+ dev[0].scan_for_bss(bssid2, freq="2412")
+ wt.clear_bss_counters(bssid)
+ wt.clear_bss_counters(bssid2)
+
logger.info("Check probe request filtering based on HESSID")
dev[0].request("SET hessid " + bssid2)