tests: nl80211 freq reporting in station mode

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2019-04-14 12:41:26 +03:00
parent c5fff8bbd2
commit 815f58a96f

View 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):