tests: Modify test_p2p_discovery to use global control interface

1. Modify discovery_stop to use global control interface when calling
   P2P_FLUSH.
2. Modify p2p_listen_and_offchannel_tx to use the global control
   interface when waiting for P2P PD event.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
Ilan Peer 2015-02-04 04:30:34 -05:00 committed by Jouni Malinen
parent a918e48af1
commit e9986d8b0b

View file

@ -363,7 +363,7 @@ def test_discovery_stop(dev):
ev = dev[0].wait_event(["CTRL-EVENT-SCAN-STARTED"], timeout=0.5)
if ev is None:
logger.info("No CTRL-EVENT-SCAN-STARTED event")
dev[0].request("P2P_FLUSH")
dev[0].global_request("P2P_FLUSH")
ev = dev[0].wait_global_event(["P2P-FIND-STOPPED"], timeout=1)
if ev is None:
raise Exception("P2P_STOP not reported")
@ -414,7 +414,7 @@ def test_p2p_listen_and_offchannel_tx(dev):
dev[0].p2p_listen()
dev[0].global_request("P2P_PROV_DISC " + addr1 + " display")
ev = dev[0].wait_event(["P2P-PROV-DISC-ENTER-PIN"], timeout=15)
ev = dev[0].wait_global_event(["P2P-PROV-DISC-ENTER-PIN"], timeout=15)
if ev is None:
raise Exception("No PD result reported")
dev[1].p2p_stop_find()