From c24c144fc7486707a288f22c729ee3437ec54530 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 22 Feb 2016 10:57:37 +0200 Subject: [PATCH] tests: WNM BSS Transition Management query 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 --- tests/hwsim/test_wnm.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/hwsim/test_wnm.py b/tests/hwsim/test_wnm.py index 9b1c0405c..77dd2e091 100644 --- a/tests/hwsim/test_wnm.py +++ b/tests/hwsim/test_wnm.py @@ -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")