]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: NEIGHBOR_REP_REQUEST for AP not supporting neighbor report
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 3 Jan 2017 15:26:02 +0000 (17:26 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 3 Jan 2017 17:53:03 +0000 (19:53 +0200)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_rrm.py

index 104aa5a4d790c988c6b51b784c71cf6020175ea7..b3c49b87075e0053a0844c6d5e8a85f219c3b211 100644 (file)
@@ -385,6 +385,22 @@ def test_rrm_neighbor_rep_req_disconnect(dev, apdev):
     dev[0].request("DISCONNECT")
     check_nr_results(dev[0])
 
+def test_rrm_neighbor_rep_req_not_supported(dev, apdev):
+    """NEIGHBOR_REP_REQUEST for AP not supporting neighbor report"""
+    params = { "ssid": "test2", "rrm_beacon_report": "1" }
+    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")
+
+    if "FAIL" not in dev[0].request("NEIGHBOR_REP_REQUEST"):
+        raise Exception("Request accepted unexpectedly")
+
 def test_rrm_ftm_range_req(dev, apdev):
     """hostapd FTM range request command"""