tests: Validate AP connection in each TDLS step
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>
This commit is contained in:
parent
ec9589fdac
commit
9d86f37f78
1 changed files with 9 additions and 0 deletions
|
@ -93,8 +93,14 @@ def tdls_check_ap(sta0, sta1, bssid, addr0, addr1):
|
||||||
if inv_ap > 0:
|
if inv_ap > 0:
|
||||||
raise Exception("Invalid frames through AP path")
|
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):
|
def setup_tdls(sta0, sta1, ap, reverse=False, expect_fail=False):
|
||||||
logger.info("Setup TDLS")
|
logger.info("Setup TDLS")
|
||||||
|
check_connectivity(sta0, sta1, ap)
|
||||||
bssid = ap['bssid']
|
bssid = ap['bssid']
|
||||||
addr0 = sta0.p2p_interface_addr()
|
addr0 = sta0.p2p_interface_addr()
|
||||||
addr1 = sta1.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:
|
if conf == 0:
|
||||||
raise Exception("No TDLS Setup Confirm (success) seen")
|
raise Exception("No TDLS Setup Confirm (success) seen")
|
||||||
tdls_check_dl(sta0, sta1, bssid, addr0, addr1)
|
tdls_check_dl(sta0, sta1, bssid, addr0, addr1)
|
||||||
|
check_connectivity(sta0, sta1, ap)
|
||||||
|
|
||||||
def teardown_tdls(sta0, sta1, ap):
|
def teardown_tdls(sta0, sta1, ap):
|
||||||
logger.info("Teardown TDLS")
|
logger.info("Teardown TDLS")
|
||||||
|
check_connectivity(sta0, sta1, ap)
|
||||||
bssid = ap['bssid']
|
bssid = ap['bssid']
|
||||||
addr0 = sta0.p2p_interface_addr()
|
addr0 = sta0.p2p_interface_addr()
|
||||||
addr1 = sta1.p2p_interface_addr()
|
addr1 = sta1.p2p_interface_addr()
|
||||||
|
@ -126,6 +134,7 @@ def teardown_tdls(sta0, sta1, ap):
|
||||||
if teardown == 0:
|
if teardown == 0:
|
||||||
raise Exception("No TDLS Setup Teardown seen")
|
raise Exception("No TDLS Setup Teardown seen")
|
||||||
tdls_check_ap(sta0, sta1, bssid, addr0, addr1)
|
tdls_check_ap(sta0, sta1, bssid, addr0, addr1)
|
||||||
|
check_connectivity(sta0, sta1, ap)
|
||||||
|
|
||||||
def test_ap_wpa2_tdls(dev, apdev):
|
def test_ap_wpa2_tdls(dev, apdev):
|
||||||
"""WPA2-PSK AP and two stations using TDLS"""
|
"""WPA2-PSK AP and two stations using TDLS"""
|
||||||
|
|
Loading…
Reference in a new issue