aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-09-05 18:43:36 (GMT)
committerJouni Malinen <j@w1.fi>2016-09-05 18:43:36 (GMT)
commit30ee6cc4364b3eb504a4b3df902308bb32006bfa (patch)
treee3e9dfac570577215b1ed446eb8bb7f04cc6e71c
parentd1723c5566d0b582cf4309e725e22970fa1ce0a1 (diff)
downloadhostap-30ee6cc4364b3eb504a4b3df902308bb32006bfa.zip
hostap-30ee6cc4364b3eb504a4b3df902308bb32006bfa.tar.gz
hostap-30ee6cc4364b3eb504a4b3df902308bb32006bfa.tar.bz2
tests: FTM capability indication
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--tests/hwsim/test_rrm.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py
index 25f1e4f..a33280e 100644
--- a/tests/hwsim/test_rrm.py
+++ b/tests/hwsim/test_rrm.py
@@ -301,3 +301,23 @@ def test_rrm_ftm_range_req(dev, apdev):
# request and not because the responder is not in the database.
if "FAIL" not in hapd.request("REQ_RANGE " + dev[0].own_addr() + " 10 10 00:11:22:33:44:55"):
raise Exception("REQ_RANGE succeeded unexpectedly (responder not in database)")
+
+def test_rrm_ftm_capa_indication(dev, apdev):
+ """FTM capability indication"""
+ try:
+ _test_rrm_ftm_capa_indication(dev, apdev)
+ finally:
+ dev[0].request("SET ftm_initiator 0")
+ dev[0].request("SET ftm_responder 0")
+
+def _test_rrm_ftm_capa_indication(dev, apdev):
+ params = { "ssid": "ftm",
+ "ftm_responder": "1",
+ "ftm_initiator": "1", }
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+ if "OK" not in dev[0].request("SET ftm_initiator 1"):
+ raise Exception("could not set ftm_initiator")
+ if "OK" not in dev[0].request("SET ftm_responder 1"):
+ raise Exception("could not set ftm_responder")
+ dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412, force_scan=True)