From: Jouni Malinen Date: Thu, 6 Mar 2014 20:59:38 +0000 (+0200) Subject: tests: Verify open mode AP functionality X-Git-Tag: hostap_2_2~653 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a92bda635758174cd18da67532ba9292f089dec;p=thirdparty%2Fhostap.git tests: Verify open mode AP functionality Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py new file mode 100644 index 000000000..42d32f67c --- /dev/null +++ b/tests/hwsim/test_ap_open.py @@ -0,0 +1,21 @@ +# Open mode AP tests +# Copyright (c) 2014, Qualcomm Atheros, Inc. +# +# This software may be distributed under the terms of the BSD license. +# See README for more details. + +import hostapd +import hwsim_utils + +def test_ap_open(dev, apdev): + """AP with open mode (no security) configuration""" + hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" }) + dev[0].connect("open", key_mgmt="NONE", scan_freq="2412") + hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname']) + ev = hapd.wait_event([ "AP-STA-CONNECTED" ], timeout=5) + if ev is None: + raise Exception("No connection event received from hostapd") + dev[0].request("DISCONNECT") + ev = hapd.wait_event([ "AP-STA-DISCONNECTED" ], timeout=5) + if ev is None: + raise Exception("No disconnection event received from hostapd")