diff --git a/tests/hwsim/test_ap_csa.py b/tests/hwsim/test_ap_csa.py index 07ae4a8e8..662fc2283 100644 --- a/tests/hwsim/test_ap_csa.py +++ b/tests/hwsim/test_ap_csa.py @@ -47,12 +47,26 @@ def csa_supported(dev): def test_ap_csa_1_switch(dev, apdev): """AP Channel Switch, one switch""" csa_supported(dev[0]) + freq = int(dev[0].get_driver_status_field("freq")) + if freq != 0: + raise Exception("Unexpected driver freq=%d in beginning" % freq) ap = connect(dev[0], apdev) + freq = int(dev[0].get_driver_status_field("freq")) + if freq != 2412: + raise Exception("Unexpected driver freq=%d after association" % freq) hwsim_utils.test_connectivity(dev[0], ap) switch_channel(ap, 10, 2462) wait_channel_switch(dev[0], 2462) hwsim_utils.test_connectivity(dev[0], ap) + freq = int(dev[0].get_driver_status_field("freq")) + if freq != 2462: + raise Exception("Unexpected driver freq=%d after channel switch" % freq) + dev[0].request("DISCONNECT") + dev[0].wait_disconnected() + freq = int(dev[0].get_driver_status_field("freq")) + if freq != 0: + raise Exception("Unexpected driver freq=%d after disconnection" % freq) @remote_compatible def test_ap_csa_2_switches(dev, apdev):