tests: Fix autogo_chan_switch to not drop HT capability

This test case ended up dropping HT capability on channel switch which
is now resulting in mac80211 disconnecting. Avoid this by leaving HT
enabled. In addition, check the P2P Client events explicitly.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2024-04-22 16:17:39 +03:00 committed by Jouni Malinen
parent 42080798b5
commit 97da087c0c

View file

@ -359,7 +359,7 @@ def test_autogo_chan_switch(dev):
def run_autogo_chan_switch(dev): def run_autogo_chan_switch(dev):
autogo(dev[0], freq=2417) autogo(dev[0], freq=2417)
connect_cli(dev[0], dev[1], freq=2417) connect_cli(dev[0], dev[1], freq=2417)
res = dev[0].group_request("CHAN_SWITCH 5 2422") res = dev[0].group_request("CHAN_SWITCH 5 2422 ht")
if "FAIL" in res: if "FAIL" in res:
# for now, skip test since mac80211_hwsim support is not yet widely # for now, skip test since mac80211_hwsim support is not yet widely
# deployed # deployed
@ -368,7 +368,16 @@ def run_autogo_chan_switch(dev):
if ev is None: if ev is None:
raise Exception("CSA finished event timed out") raise Exception("CSA finished event timed out")
if "freq=2422" not in ev: if "freq=2422" not in ev:
raise Exception("Unexpected cahnnel in CSA finished event") raise Exception("Unexpected channel in CSA finished event")
ev = dev[1].wait_event(["CTRL-EVENT-STARTED-CHANNEL-SWITCH"], timeout=10)
if ev is None or "freq=2422" not in ev:
raise Exception("Channel switch started event not received on client")
ev = dev[1].wait_event(["CTRL-EVENT-CHANNEL-SWITCH"], timeout=10)
if ev is None or "freq=2422" not in ev:
raise Exception("Channel switch event not received on client")
ev = dev[1].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.1)
if ev is not None:
raise Exception("Unexpected disconnection after channel switch")
dev[0].dump_monitor() dev[0].dump_monitor()
dev[1].dump_monitor() dev[1].dump_monitor()
time.sleep(0.1) time.sleep(0.1)