Signed-off-by: Masashi Honma <masashi.honma@xxxxxxxxx> --- tests/hwsim/test_wpas_wmm_ac.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_wpas_wmm_ac.py b/tests/hwsim/test_wpas_wmm_ac.py index f81588a18..3bf6c6715 100644 --- a/tests/hwsim/test_wpas_wmm_ac.py +++ b/tests/hwsim/test_wpas_wmm_ac.py @@ -8,6 +8,7 @@ from remotehost import remote_compatible import logging logger = logging.getLogger() import struct +import sys import hwsim_utils import hostapd @@ -171,7 +172,7 @@ def test_tspec_protocol(dev, apdev): hapd.mgmt_tx(msg) # too short WMM element - msg['payload'] = struct.pack('BBBB', 17, 1, dialog, 0) + payload[4:] + '\xdd\x06\x00\x50\xf2\x02\x02\x01' + msg['payload'] = struct.pack('BBBB', 17, 1, dialog, 0) + payload[4:] + b'\xdd\x06\x00\x50\xf2\x02\x02\x01' hapd.mgmt_tx(msg) # DELTS @@ -201,7 +202,10 @@ def test_tspec_protocol(dev, apdev): msg['sa'] = apdev[0]['bssid'] # modified parameters - msg['payload'] = struct.pack('BBBB', 17, 1, dialog, 1) + payload[4:12] + struct.pack('B', ord(payload[12]) & ~0x60) + payload[13:] + if sys.version_info[0] > 2: + msg['payload'] = struct.pack('BBBB', 17, 1, dialog, 1) + payload[4:12] + struct.pack('B', (payload[12]) & ~0x60) + payload[13:] + else: + msg['payload'] = struct.pack('BBBB', 17, 1, dialog, 1) + payload[4:12] + struct.pack('B', ord(payload[12]) & ~0x60) + payload[13:] hapd.mgmt_tx(msg) # reject request -- 2.17.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap