tests: Use the ap_ifname variable instead of hardcoding ifname
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
ce26864e79
commit
8bc0799b93
1 changed files with 6 additions and 6 deletions
|
@ -24,13 +24,13 @@ def start_ap_wpa2_psk(ifname):
|
|||
|
||||
def connectivity(dev, ap_ifname):
|
||||
hwsim_utils.test_connectivity_sta(dev[0], dev[1])
|
||||
hwsim_utils.test_connectivity(dev[0].ifname, "wlan2")
|
||||
hwsim_utils.test_connectivity(dev[1].ifname, "wlan2")
|
||||
hwsim_utils.test_connectivity(dev[0].ifname, ap_ifname)
|
||||
hwsim_utils.test_connectivity(dev[1].ifname, ap_ifname)
|
||||
|
||||
def connect_2sta(dev, ssid):
|
||||
dev[0].connect(ssid, psk="12345678")
|
||||
dev[1].connect(ssid, psk="12345678")
|
||||
connectivity(dev, "wlan2")
|
||||
connectivity(dev, ap_ifname)
|
||||
|
||||
def connect_2sta_wpa2_psk(dev):
|
||||
connect_2sta(dev, "test-wpa2-psk")
|
||||
|
@ -41,17 +41,17 @@ def connect_2sta_wpa_psk(dev):
|
|||
def connect_2sta_wpa_psk_mixed(dev):
|
||||
dev[0].connect("test-wpa-mixed-psk", psk="12345678", proto="WPA")
|
||||
dev[1].connect("test-wpa-mixed-psk", psk="12345678", proto="WPA2")
|
||||
connectivity(dev, "wlan2")
|
||||
connectivity(dev, ap_ifname)
|
||||
|
||||
def connect_2sta_wep(dev):
|
||||
dev[0].connect("test-wep", key_mgmt="NONE", wep_key0='"hello"')
|
||||
dev[1].connect("test-wep", key_mgmt="NONE", wep_key0='"hello"')
|
||||
connectivity(dev, "wlan2")
|
||||
connectivity(dev, ap_ifname)
|
||||
|
||||
def connect_2sta_open(dev):
|
||||
dev[0].connect("test-open", key_mgmt="NONE")
|
||||
dev[1].connect("test-open", key_mgmt="NONE")
|
||||
connectivity(dev, "wlan2")
|
||||
connectivity(dev, ap_ifname)
|
||||
|
||||
def wlantest_tdls(field, bssid, addr1, addr2):
|
||||
res = subprocess.check_output(["../../wlantest/wlantest_cli",
|
||||
|
|
Loading…
Reference in a new issue