]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: nl80211 freq reporting in station mode
authorJouni Malinen <j@w1.fi>
Sun, 14 Apr 2019 09:41:26 +0000 (12:41 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 14 Apr 2019 09:41:26 +0000 (12:41 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_csa.py

index 07ae4a8e84549da3d27ff587b7713273261439ca..662fc22830e8551af51705129f0aceea02a8613a 100644 (file)
@@ -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):