tests: DPP association with nl80211 connect command

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-08-24 23:31:46 +03:00 committed by Jouni Malinen
parent 64a0a75b5b
commit ee8ef9cacf

View file

@ -10,6 +10,7 @@ import time
import hostapd import hostapd
from utils import HwsimSkip from utils import HwsimSkip
from wpasupplicant import WpaSupplicant
def check_dpp_capab(dev): def check_dpp_capab(dev):
if "UNKNOWN COMMAND" in dev.request("DPP_BOOTSTRAP_GET_URI 0"): if "UNKNOWN COMMAND" in dev.request("DPP_BOOTSTRAP_GET_URI 0"):
@ -1017,6 +1018,16 @@ def test_dpp_auto_connect_2(dev, apdev):
finally: finally:
dev[0].set("dpp_config_processing", "0") dev[0].set("dpp_config_processing", "0")
def test_dpp_auto_connect_2_connect_cmd(dev, apdev):
"""DPP and auto connect (2) using connect_cmd"""
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
dev_new = [ wpas, dev[1] ]
try:
run_dpp_auto_connect(dev_new, apdev, 2)
finally:
wpas.set("dpp_config_processing", "0")
def run_dpp_auto_connect(dev, apdev, processing): def run_dpp_auto_connect(dev, apdev, processing):
check_dpp_capab(dev[0]) check_dpp_capab(dev[0])
check_dpp_capab(dev[1]) check_dpp_capab(dev[1])