tests: Use CS more carefully in p2p_device_autogo_chan_switch
Do not disable HT support on the GO and wait for the channel switch event on the P2P Client before proceeding with connectivity test. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
541fa25246
commit
695277a5b3
1 changed files with 7 additions and 2 deletions
|
@ -545,7 +545,7 @@ def test_p2p_device_autogo_chan_switch(dev):
|
||||||
wpas.global_request("SET p2p_no_group_iface 1")
|
wpas.global_request("SET p2p_no_group_iface 1")
|
||||||
autogo(wpas, freq=2417)
|
autogo(wpas, freq=2417)
|
||||||
connect_cli(wpas, dev[1])
|
connect_cli(wpas, dev[1])
|
||||||
res = wpas.group_request("CHAN_SWITCH 5 2422")
|
res = wpas.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
|
||||||
|
@ -554,7 +554,12 @@ def test_p2p_device_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-CHANNEL-SWITCH"], timeout=2)
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("Channel switch not reported on P2P Client")
|
||||||
|
if "freq=2422" not in ev:
|
||||||
|
raise Exception("Unexpected channel in CS event")
|
||||||
wpas.dump_monitor()
|
wpas.dump_monitor()
|
||||||
dev[1].dump_monitor()
|
dev[1].dump_monitor()
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|
Loading…
Reference in a new issue