tests: Fix p2p_ext_vendor_elem_assoc test with P2P Device interface
For configurations that use a dedicated P2P Device interface, which mandates that a separate interface is used for the P2P group, vendor specific IE's must be added to the VENDOR_ELEM_P2P_* frame types in order to be used by the P2P group interface. The VENDOR_ELEM_ASSOC_REQ (13) parameter would need to be issued on the group interface which would be challenging to do due to timing in case a separate group interface gets used. In case a dedicated P2P Device interface is used, don't include a test for VENDOR_ELEM_ASSOC_REQ to avoid failing this part of the test case. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
This commit is contained in:
parent
5ac8f8623d
commit
a71a3d6d46
1 changed files with 6 additions and 2 deletions
|
@ -336,11 +336,15 @@ def test_p2p_ext_vendor_elem_assoc(dev, apdev, params):
|
||||||
def _test_p2p_ext_vendor_elem_assoc(dev, apdev, params):
|
def _test_p2p_ext_vendor_elem_assoc(dev, apdev, params):
|
||||||
addr0 = dev[0].p2p_dev_addr()
|
addr0 = dev[0].p2p_dev_addr()
|
||||||
addr1 = dev[1].p2p_dev_addr()
|
addr1 = dev[1].p2p_dev_addr()
|
||||||
|
|
||||||
|
res = dev[0].get_driver_status()
|
||||||
|
p2p_device = True if (int(res['capa.flags'], 0) & 0x20000000) else False
|
||||||
|
|
||||||
if "OK" not in dev[0].request("VENDOR_ELEM_ADD 11 dd050011223308"):
|
if "OK" not in dev[0].request("VENDOR_ELEM_ADD 11 dd050011223308"):
|
||||||
raise Exception("VENDOR_ELEM_ADD failed")
|
raise Exception("VENDOR_ELEM_ADD failed")
|
||||||
if "OK" not in dev[1].request("VENDOR_ELEM_ADD 12 dd050011223309"):
|
if "OK" not in dev[1].request("VENDOR_ELEM_ADD 12 dd050011223309"):
|
||||||
raise Exception("VENDOR_ELEM_ADD failed")
|
raise Exception("VENDOR_ELEM_ADD failed")
|
||||||
if "OK" not in dev[0].request("VENDOR_ELEM_ADD 13 dd05001122330a"):
|
if not p2p_device and "OK" not in dev[0].request("VENDOR_ELEM_ADD 13 dd05001122330a"):
|
||||||
raise Exception("VENDOR_ELEM_ADD failed")
|
raise Exception("VENDOR_ELEM_ADD failed")
|
||||||
dev[0].p2p_listen()
|
dev[0].p2p_listen()
|
||||||
dev[1].p2p_listen()
|
dev[1].p2p_listen()
|
||||||
|
@ -355,7 +359,7 @@ def _test_p2p_ext_vendor_elem_assoc(dev, apdev, params):
|
||||||
"wlan.fc.type_subtype == 0x00", wait=False)
|
"wlan.fc.type_subtype == 0x00", wait=False)
|
||||||
if "Vendor Specific Data: 3308" not in out:
|
if "Vendor Specific Data: 3308" not in out:
|
||||||
raise Exception("Vendor element (P2P) not found from Association Request frame")
|
raise Exception("Vendor element (P2P) not found from Association Request frame")
|
||||||
if "Vendor Specific Data: 330a" not in out:
|
if not p2p_device and "Vendor Specific Data: 330a" not in out:
|
||||||
raise Exception("Vendor element (non-P2P) not found from Association Request frame")
|
raise Exception("Vendor element (non-P2P) not found from Association Request frame")
|
||||||
|
|
||||||
out = run_tshark(os.path.join(params['logdir'], "hwsim0.pcapng"),
|
out = run_tshark(os.path.join(params['logdir'], "hwsim0.pcapng"),
|
||||||
|
|
Loading…
Reference in a new issue