]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: wpa_supplicant BSS CURRENT command
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 21 Dec 2016 10:46:14 +0000 (12:46 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 21 Dec 2016 10:46:14 +0000 (12:46 +0200)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_wpas_ctrl.py

index 76731e525d604d8bcb16a2d9c79143263b109525..e35b95820525873f08dd0c14438d14e08da3dd7e 100644 (file)
@@ -1975,3 +1975,15 @@ def test_wpas_ctrl_driver_flags(dev, apdev):
     flags = hapd_flags.split('\n')
     if 'AP' not in flags:
         raise Exception("AP flag missing from DRIVER_FLAGS")
+
+def test_wpas_ctrl_bss_current(dev, apdev):
+    """wpa_supplicant BSS CURRENT command"""
+    hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
+    bssid = hapd.own_addr()
+    res = dev[0].request("BSS CURRENT")
+    if res != '':
+        raise Exception("Unexpected BSS CURRENT response in disconnected state")
+    dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
+    res = dev[0].request("BSS CURRENT")
+    if bssid not in res:
+        raise Exception("Unexpected BSS CURRENT response in connected state")