tests: Verify GO channel switch behavior
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
334bf36ac5
commit
393e90191e
1 changed files with 21 additions and 2 deletions
|
@ -14,9 +14,9 @@ logger = logging.getLogger()
|
||||||
import hwsim_utils
|
import hwsim_utils
|
||||||
from wlantest import Wlantest
|
from wlantest import Wlantest
|
||||||
|
|
||||||
def autogo(go):
|
def autogo(go, freq=None):
|
||||||
logger.info("Start autonomous GO " + go.ifname)
|
logger.info("Start autonomous GO " + go.ifname)
|
||||||
res = go.p2p_start_go()
|
res = go.p2p_start_go(freq=freq)
|
||||||
logger.debug("res: " + str(res))
|
logger.debug("res: " + str(res))
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
@ -131,3 +131,22 @@ def test_autogo_legacy(dev):
|
||||||
|
|
||||||
dev[0].remove_group()
|
dev[0].remove_group()
|
||||||
dev[1].wait_go_ending_session()
|
dev[1].wait_go_ending_session()
|
||||||
|
|
||||||
|
def test_autogo_chan_switch(dev):
|
||||||
|
"""P2P autonomous GO switching channels"""
|
||||||
|
autogo(dev[0], freq=2417)
|
||||||
|
connect_cli(dev[0], dev[1])
|
||||||
|
res = dev[0].request("CHAN_SWITCH 5 2422")
|
||||||
|
if "FAIL" in res:
|
||||||
|
# for now, skip test since mac80211_hwsim support is not yet widely
|
||||||
|
# deployed
|
||||||
|
return 'skip'
|
||||||
|
ev = dev[0].wait_event(["AP-CSA-FINISHED"], timeout=10)
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("CSA finished event timed out")
|
||||||
|
if "freq=2422" not in ev:
|
||||||
|
raise Exception("Unexpected cahnnel in CSA finished event")
|
||||||
|
dev[0].dump_monitor()
|
||||||
|
dev[1].dump_monitor()
|
||||||
|
time.sleep(0.1)
|
||||||
|
hwsim_utils.test_connectivity_p2p(dev[0], dev[1])
|
||||||
|
|
Loading…
Reference in a new issue