]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Validate AP connection in each TDLS step
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 31 Jul 2013 10:38:34 +0000 (13:38 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 31 Jul 2013 10:38:34 +0000 (13:38 +0300)
Make sure the connection between each STA and the AP is in working state
between each TDLS setup/teardown operation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

tests/hwsim/test_ap_tdls.py

index 391454b00378dc3ef01be17d100dd2fd3d493a97..b906a2be9b4b4472281be2442252859f8d99a6fb 100644 (file)
@@ -93,8 +93,14 @@ def tdls_check_ap(sta0, sta1, bssid, addr0, addr1):
     if inv_ap > 0:
         raise Exception("Invalid frames through AP path")
 
+def check_connectivity(sta0, sta1, ap):
+    hwsim_utils.test_connectivity_sta(sta0, sta1)
+    hwsim_utils.test_connectivity(sta0.ifname, ap['ifname'])
+    hwsim_utils.test_connectivity(sta1.ifname, ap['ifname'])
+
 def setup_tdls(sta0, sta1, ap, reverse=False, expect_fail=False):
     logger.info("Setup TDLS")
+    check_connectivity(sta0, sta1, ap)
     bssid = ap['bssid']
     addr0 = sta0.p2p_interface_addr()
     addr1 = sta1.p2p_interface_addr()
@@ -113,9 +119,11 @@ def setup_tdls(sta0, sta1, ap, reverse=False, expect_fail=False):
     if conf == 0:
         raise Exception("No TDLS Setup Confirm (success) seen")
     tdls_check_dl(sta0, sta1, bssid, addr0, addr1)
+    check_connectivity(sta0, sta1, ap)
 
 def teardown_tdls(sta0, sta1, ap):
     logger.info("Teardown TDLS")
+    check_connectivity(sta0, sta1, ap)
     bssid = ap['bssid']
     addr0 = sta0.p2p_interface_addr()
     addr1 = sta1.p2p_interface_addr()
@@ -126,6 +134,7 @@ def teardown_tdls(sta0, sta1, ap):
     if teardown == 0:
         raise Exception("No TDLS Setup Teardown seen")
     tdls_check_ap(sta0, sta1, bssid, addr0, addr1)
+    check_connectivity(sta0, sta1, ap)
 
 def test_ap_wpa2_tdls(dev, apdev):
     """WPA2-PSK AP and two stations using TDLS"""