tests: WPA2/WPA-PSK cfg80211 connect command to trigger roam

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2021-10-06 20:55:58 +03:00 committed by Jouni Malinen
parent 9cf4bb0ef0
commit 19307ef69a

View file

@ -191,6 +191,25 @@ def test_connect_cmd_roam(dev, apdev):
wpas.wait_disconnected()
wpas.dump_monitor()
def test_connect_cmd_wpa_psk_roam(dev, apdev):
"""WPA2/WPA-PSK connection using cfg80211 connect command to trigger roam"""
params = hostapd.wpa2_params(ssid="sta-connect", passphrase="12345678")
hostapd.add_ap(apdev[0], params)
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
wpas.connect("sta-connect", psk="12345678", scan_freq="2412")
wpas.dump_monitor()
params = hostapd.wpa_params(ssid="sta-connect", passphrase="12345678")
hostapd.add_ap(apdev[1], params)
wpas.scan_for_bss(apdev[1]['bssid'], freq=2412, force_scan=True)
wpas.roam(apdev[1]['bssid'])
time.sleep(0.1)
wpas.request("DISCONNECT")
wpas.wait_disconnected()
wpas.dump_monitor()
def test_connect_cmd_bssid_hint(dev, apdev):
"""cfg80211 connect command with bssid_hint"""
params = {"ssid": "sta-connect"}