diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index cefc9572..bcd5fd6c 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -505,8 +505,11 @@ static int tx_byte_atr(struct card_handle *ch) } } } - /* update waiting time (see ISO 7816-3 10.2) */ - ch->waiting_time = ch->wi * 960 * iso7816_3_fi_table[ch->F_index]; + /* update waiting time (see ISO 7816-3 10.2). We can drop the Fi + * multiplier as we store the waiting time in units of 'etu', and + * don't really care what the number of clock cycles or the absolute + * wall clock time is */ + ch->waiting_time = ch->wi * 960; /* go to next state */ card_set_state(ch, ISO_S_WAIT_TPDU); return 0; diff --git a/firmware/libcommon/source/mode_cardemu.c b/firmware/libcommon/source/mode_cardemu.c index 14f62a66..127556c1 100644 --- a/firmware/libcommon/source/mode_cardemu.c +++ b/firmware/libcommon/source/mode_cardemu.c @@ -225,7 +225,6 @@ static uint16_t compute_next_timeout(struct cardem_inst *ci) want_to_expire = ci->wt.remaining - (ci->wt.total / 2); } else want_to_expire = ci->wt.remaining; - TRACE_INFO("want_to_expire=%u (total=%u, remaining=%u)\r\n", want_to_expire, ci->wt.total, ci->wt.remaining); /* if value exceeds the USART TO range, use the maximum possible value for one round */ return OSMO_MIN(want_to_expire, 0xffff); }