From b157f0e265b83f5a181bb5f78bd9bf33b7f9f92d Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 3 Jan 2017 17:28:20 +0200 Subject: [PATCH] tests: wpa_supplicant and concurrent NEIGHBOR_REP_REQUEST commands Signed-off-by: Jouni Malinen --- tests/hwsim/test_rrm.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py index b3c49b870..7375042b0 100644 --- a/tests/hwsim/test_rrm.py +++ b/tests/hwsim/test_rrm.py @@ -401,6 +401,31 @@ def test_rrm_neighbor_rep_req_not_supported(dev, apdev): if "FAIL" not in dev[0].request("NEIGHBOR_REP_REQUEST"): raise Exception("Request accepted unexpectedly") +def test_rrm_neighbor_rep_req_busy(dev, apdev): + """wpa_supplicant and concurrent NEIGHBOR_REP_REQUEST commands""" + params = { "ssid": "test2", "rrm_neighbor_report": "1", + "stationary_ap": "1", "lci": lci, "civic": civic } + hapd = hostapd.add_ap(apdev[0]['ifname'], params) + + bssid = apdev[0]['bssid'] + + rrm = int(dev[0].get_driver_status_field("capa.rrm_flags"), 16) + if rrm & 0x5 != 0x5 and rrm & 0x10 != 0x10: + raise HwsimSkip("Required RRM capabilities are not supported") + + dev[0].connect("test2", key_mgmt="NONE", scan_freq="2412") + + hapd.set("ext_mgmt_frame_handling", "1") + + if "OK" not in dev[0].request("NEIGHBOR_REP_REQUEST"): + raise Exception("Request failed") + msg = hapd.mgmt_rx() + if msg is None: + raise Exception("Neighbor report request not seen") + + if "FAIL" not in dev[0].request("NEIGHBOR_REP_REQUEST"): + raise Exception("Request accepted while disconnected") + def test_rrm_ftm_range_req(dev, apdev): """hostapd FTM range request command"""