]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: WNM BSS Transition Management query
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 22 Feb 2016 08:57:37 +0000 (10:57 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 22 Feb 2016 17:53:04 +0000 (19:53 +0200)
This tests BSS Transition Management Query frame generation with
candidate list and transmission of the following request and response
frames.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_wnm.py

index 9b1c0405cc8395593b1ee8fcf952738dd9227174..77dd2e091341b53d2907648981ce04a4180079ba 100644 (file)
@@ -1085,3 +1085,26 @@ def test_wnm_bss_tm_req_with_mbo_ie(dev, apdev):
 
     if "OK" not in dev[0].request("SET mbo_cell_capa 3"):
        raise Exception("Failed to set STA as cellular data not-capable")
+
+def test_wnm_bss_transition_mgmt_query(dev, apdev):
+    """WNM BSS Transition Management query"""
+    params = { "ssid": "test-wnm",
+               "bss_transition": "1" }
+    hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+    params = { "ssid": "another" }
+    hapd2 = hostapd.add_ap(apdev[1]['ifname'], params)
+
+    dev[0].scan_for_bss(apdev[1]['bssid'], 2412)
+    dev[0].scan_for_bss(apdev[0]['bssid'], 2412)
+
+    dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412")
+    dev[0].request("WNM_BSS_QUERY 0 list")
+
+    ev = dev[0].wait_event(["WNM: BSS Transition Management Request"],
+                           timeout=5)
+    if ev is None:
+        raise Exception("No BSS Transition Management Request frame seen")
+
+    ev = hapd.wait_event(["BSS-TM-RESP"], timeout=5)
+    if ev is None:
+        raise Exception("No BSS Transition Management Response frame seen")