Skip to content

Commit 6023d44

Browse files
committed
Revert "fix(core/thp): disable THP ACK piggybacking as a workaround for #6506"
This reverts commit 586df8a.
1 parent f70b9f3 commit 6023d44

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

core/.changelog.d/6202.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Support receive-side THP ACK piggybacking.

core/src/trezor/wire/thp/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ def _get_device_properties(iface: WireInterface) -> ThpDeviceProperties:
210210
internal_model=utils.INTERNAL_MODEL,
211211
model_variant=model_variant,
212212
protocol_version_major=2,
213-
# TODO: re-enable THP ACK piggybacking after #6506 is fixed
214-
protocol_version_minor=0,
213+
protocol_version_minor=1,
215214
)
216215

217216

core/src/trezor/wire/thp/received_message_handler.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,10 @@ async def _handle_state_handshake(
106106
def _handshake_callback(ctrl_byte: int) -> bool:
107107
success = control_byte.is_handshake_init_req(ctrl_byte)
108108

109-
# TODO: re-enable THP ACK piggybacking after #6506 is fixed
110-
# if success and control_byte.get_ack_bit(ctrl_byte) == 1:
111-
# # Newer Suite versions will send `handshake_init_req` with a non-zero ACK bit.
112-
# # The device should not use ACK piggybacking with older Suite versions.
113-
# ABP.allow_ack_piggybacking(ctx.channel_cache)
109+
if success and control_byte.get_ack_bit(ctrl_byte) == 1:
110+
# Newer Suite versions will send `handshake_init_req` with a non-zero ACK bit.
111+
# The device should not use ACK piggybacking with older Suite versions.
112+
ABP.allow_ack_piggybacking(ctx.channel_cache)
114113

115114
if __debug__:
116115
ctx._log(

0 commit comments

Comments
 (0)