From e0e1fde8a8463adba6ff25996ecfdd21b815687b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 5 Oct 2017 14:54:15 +0300 Subject: [PATCH] tests: P2P GO with Interworking element Signed-off-by: Jouni Malinen --- tests/hwsim/test_p2p_autogo.py | 21 +++++++++++++++++++++ tests/hwsim/test_wpas_config.py | 5 +++++ 2 files changed, 26 insertions(+) diff --git a/tests/hwsim/test_p2p_autogo.py b/tests/hwsim/test_p2p_autogo.py index 3d154c3b5..d901933aa 100644 --- a/tests/hwsim/test_p2p_autogo.py +++ b/tests/hwsim/test_p2p_autogo.py @@ -878,3 +878,24 @@ def test_autogo_noa(dev): dev[1].request("SET p2p_disabled 0") dev[0].group_request("P2P_SET noa 0,0,0") + +def test_autogo_interworking(dev): + """P2P autonomous GO and Interworking""" + try: + run_autogo_interworking(dev) + finally: + dev[0].set("go_interworking", "0") + +def run_autogo_interworking(dev): + dev[0].set("go_interworking", "1") + dev[0].set("go_access_network_type", "1") + dev[0].set("go_internet", "1") + dev[0].set("go_venue_group", "2") + dev[0].set("go_venue_type", "3") + res = autogo(dev[0]) + bssid = dev[0].p2p_interface_addr() + dev[1].scan_for_bss(bssid, freq=res['freq']) + bss = dev[1].get_bss(bssid) + dev[0].remove_group() + if '6b03110203' not in bss['ie']: + raise Exception("Interworking element not seen") diff --git a/tests/hwsim/test_wpas_config.py b/tests/hwsim/test_wpas_config.py index 12cb6e8a4..96cbb9b09 100644 --- a/tests/hwsim/test_wpas_config.py +++ b/tests/hwsim/test_wpas_config.py @@ -120,6 +120,11 @@ config_checks = [ ("ap_scan", "0"), ("fst_group_id", "bond0"), ("fst_priority", "5"), ("fst_llt", "7"), + ("go_interworking", "1"), + ("go_access_network_type", "2"), + ("go_internet", "1"), + ("go_venue_group", "3"), + ("go_venue_type", "4"), ("openssl_ciphers", "DEFAULT") ] def check_config(config): with open(config, "r") as f: