tests: FT/RRM: Wait for STA before check_beacon_req()
check_beacon_req() will request from hostapd to request a beacon report from the STA, but that only works if it already knows about the STA. Due to scheduling issues, it may not know even if wpa_s reports it has successfully connected, so also wait for the STA to show up in hostapd before check_beacon_req(). Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
257ba3afae
commit
434d557bc3
2 changed files with 7 additions and 0 deletions
|
@ -3476,6 +3476,7 @@ def test_ap_ft_roam_rrm(dev, apdev):
|
|||
dev[0].flush_scan_cache()
|
||||
dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2",
|
||||
scan_freq="2412")
|
||||
hapd0.wait_sta()
|
||||
check_beacon_req(hapd0, addr, 1)
|
||||
|
||||
params = ft_params2(ssid=ssid, passphrase=passphrase)
|
||||
|
@ -3485,10 +3486,12 @@ def test_ap_ft_roam_rrm(dev, apdev):
|
|||
|
||||
dev[0].scan_for_bss(bssid1, freq=2412)
|
||||
dev[0].roam(bssid1)
|
||||
hapd1.wait_sta()
|
||||
check_beacon_req(hapd1, addr, 2)
|
||||
|
||||
dev[0].scan_for_bss(bssid0, freq=2412)
|
||||
dev[0].roam(bssid0)
|
||||
hapd0.wait_sta()
|
||||
check_beacon_req(hapd0, addr, 3)
|
||||
|
||||
def test_ap_ft_pmksa_caching(dev, apdev):
|
||||
|
|
|
@ -2193,18 +2193,22 @@ def test_rrm_reassociation(dev, apdev):
|
|||
addr = dev[0].own_addr()
|
||||
dev[0].flush_scan_cache()
|
||||
dev[0].connect("rrm", key_mgmt="NONE", scan_freq="2412")
|
||||
hapd.wait_sta()
|
||||
check_beacon_req(hapd, addr, 1)
|
||||
|
||||
dev[0].request("REASSOCIATE")
|
||||
dev[0].wait_connected()
|
||||
hapd.wait_sta()
|
||||
check_beacon_req(hapd, addr, 1)
|
||||
|
||||
hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
|
||||
bssid2 = hapd2.own_addr()
|
||||
dev[0].scan_for_bss(bssid2, freq=2412)
|
||||
dev[0].roam(bssid2)
|
||||
hapd2.wait_sta()
|
||||
check_beacon_req(hapd2, addr, 2)
|
||||
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
dev[0].roam(bssid)
|
||||
hapd.wait_sta()
|
||||
check_beacon_req(hapd, addr, 3)
|
||||
|
|
Loading…
Add table
Reference in a new issue