tests: AP Channel Switch, one switch with only ECSA IE

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2015-09-08 12:46:32 +03:00 committed by Jouni Malinen
parent 2b6e121676
commit f227043711

View file

@ -12,9 +12,10 @@ import hwsim_utils
import hostapd import hostapd
from utils import HwsimSkip from utils import HwsimSkip
def connect(dev, apdev): def connect(dev, apdev, **kwargs):
params = { "ssid": "ap-csa", params = { "ssid": "ap-csa",
"channel": "1" } "channel": "1" }
params.update(kwargs)
ap = hostapd.add_ap(apdev[0]['ifname'], params) ap = hostapd.add_ap(apdev[0]['ifname'], params)
dev.connect("ap-csa", key_mgmt="NONE") dev.connect("ap-csa", key_mgmt="NONE")
return ap return ap
@ -109,3 +110,12 @@ def test_ap_csa_1_switch_count_2(dev, apdev):
hwsim_utils.test_connectivity(dev[0], ap) hwsim_utils.test_connectivity(dev[0], ap)
switch_channel(ap, 2, 2462) switch_channel(ap, 2, 2462)
hwsim_utils.test_connectivity(dev[0], ap) hwsim_utils.test_connectivity(dev[0], ap)
def test_ap_csa_ecsa_only(dev, apdev):
"""AP Channel Switch, one switch with only ECSA IE"""
csa_supported(dev[0])
ap = connect(dev[0], apdev, ecsa_ie_only="1")
hwsim_utils.test_connectivity(dev[0], ap)
switch_channel(ap, 10, 2462)
hwsim_utils.test_connectivity(dev[0], ap)