aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-15 13:23:51 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-16 14:51:28 +0100
commit4d4405ff3aa54c2894930dbcde5e63f219076423 (patch)
tree3e682625e96e30abdf5b13ba5a41fbd89c5435dd
parent6a3a714e2f327f6062f7bed07762a2133442865f (diff)
card_emu: Remove extraneous code
card_set_state(ch, ISO_S_WAIT_ATR) internally calls tc_etu_enable(), so there's no need for the caller to do the same, too. Change-Id: I2a2b4d64c40264623313a867957ffcefe57748f9
-rw-r--r--firmware/libcommon/source/card_emu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c
index 4c29d41..5488fad 100644
--- a/firmware/libcommon/source/card_emu.c
+++ b/firmware/libcommon/source/card_emu.c
@@ -453,7 +453,7 @@ static void card_set_state(struct card_handle *ch,
* since the initial ETU is Fd=372/Dd=1 clock cycles long, we have to wait 2-107 ETU.
*/
tc_etu_set_wtime(ch->tc_chan, 2);
- /* ensure the TC_ETU timer is enabled */
+ /* enable the TC/ETU counter once reset has been released */
tc_etu_enable(ch->tc_chan);
break;
case ISO_S_IN_ATR:
@@ -1129,8 +1129,6 @@ void card_emu_io_statechg(struct card_handle *ch, enum card_io io, int active)
/* check end activation state (even if the reader does
* not respect the activation sequence) */
if (ch->vcc_active && ch->clocked && !ch->in_reset) {
- /* enable the TC/ETU counter once reset has been released */
- tc_etu_enable(ch->tc_chan);
/* prepare to send the ATR */
card_set_state(ch, ISO_S_WAIT_ATR);
}