tests: Open mesh network on VHT 80+80 MHz channel

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2015-11-26 17:56:45 +02:00 committed by Jouni Malinen
parent 13f6ef9c79
commit a74a1e4eab

View file

@ -103,12 +103,14 @@ def test_wpas_add_set_remove_support(dev):
dev[0].remove_network(id) dev[0].remove_network(id)
def add_open_mesh_network(dev, freq="2412", start=True, beacon_int=0, def add_open_mesh_network(dev, freq="2412", start=True, beacon_int=0,
basic_rates=None): basic_rates=None, chwidth=0):
id = dev.add_network() id = dev.add_network()
dev.set_network(id, "mode", "5") dev.set_network(id, "mode", "5")
dev.set_network_quoted(id, "ssid", "wpas-mesh-open") dev.set_network_quoted(id, "ssid", "wpas-mesh-open")
dev.set_network(id, "key_mgmt", "NONE") dev.set_network(id, "key_mgmt", "NONE")
dev.set_network(id, "frequency", freq) dev.set_network(id, "frequency", freq)
if chwidth > 0:
dev.set_network(id, "max_oper_chwidth", str(chwidth))
if beacon_int: if beacon_int:
dev.set_network(id, "beacon_int", str(beacon_int)) dev.set_network(id, "beacon_int", str(beacon_int))
if basic_rates: if basic_rates:
@ -511,6 +513,54 @@ def _test_wpas_mesh_open_5ghz(dev, apdev):
# Test connectivity 0->1 and 1->0 # Test connectivity 0->1 and 1->0
hwsim_utils.test_connectivity(dev[0], dev[1]) hwsim_utils.test_connectivity(dev[0], dev[1])
def test_wpas_mesh_open_vht_80p80(dev, apdev):
"""wpa_supplicant open MESH network on VHT 80+80 MHz channel"""
try:
_test_wpas_mesh_open_vht_80p80(dev, apdev)
finally:
subprocess.call(['iw', 'reg', 'set', '00'])
dev[0].flush_scan_cache()
dev[1].flush_scan_cache()
def _test_wpas_mesh_open_vht_80p80(dev, apdev):
check_mesh_support(dev[0])
subprocess.call(['iw', 'reg', 'set', 'US'])
for i in range(2):
for j in range(5):
ev = dev[i].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=5)
if ev is None:
raise Exception("No regdom change event")
if "alpha2=US" in ev:
break
add_open_mesh_network(dev[i], freq="5180", chwidth=3)
# Check for mesh joined
check_mesh_group_added(dev[0])
check_mesh_group_added(dev[1])
# Check for peer connected
check_mesh_peer_connected(dev[0])
check_mesh_peer_connected(dev[1])
# Test connectivity 0->1 and 1->0
hwsim_utils.test_connectivity(dev[0], dev[1])
sig = dev[0].request("SIGNAL_POLL").splitlines()
if "WIDTH=80+80 MHz" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig))
if "CENTER_FRQ1=5210" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(3): " + str(sig))
if "CENTER_FRQ2=5775" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(4): " + str(sig))
sig = dev[1].request("SIGNAL_POLL").splitlines()
if "WIDTH=80+80 MHz" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(2b): " + str(sig))
if "CENTER_FRQ1=5210" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(3b): " + str(sig))
if "CENTER_FRQ2=5775" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(4b): " + str(sig))
def test_wpas_mesh_password_mismatch(dev, apdev): def test_wpas_mesh_password_mismatch(dev, apdev):
"""Mesh network and one device with mismatching password""" """Mesh network and one device with mismatching password"""
check_mesh_support(dev[0], secure=True) check_mesh_support(dev[0], secure=True)