aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKévin Redon <kredon@sysmocom.de>2019-09-24 17:48:25 +0200
committerKévin Redon <kredon@sysmocom.de>2019-09-24 17:48:33 +0200
commitb149ea30393b0cc1eddb1d5785563fc983a80a78 (patch)
tree2d932f88cfee9172978d7b74e2660590df2323aa
parent6b0afb3761a03d5d345f381f97b5c863e243efb0 (diff)
cardem: ignore set ATRkevin/cardem
the PPS procedure with baud rate change has not been tested. by keeping the default ATR instead of applying the ATR sent by the host software, no other baud rate choice is offered. Change-Id: Ibf7c6b83d2cf68172c7aa25116d838e24a95d5fe
-rw-r--r--firmware/libcommon/source/card_emu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c
index 45e70dc..f861b63 100644
--- a/firmware/libcommon/source/card_emu.c
+++ b/firmware/libcommon/source/card_emu.c
@@ -1111,17 +1111,20 @@ int card_emu_set_atr(struct card_handle *ch, const uint8_t *atr, uint8_t len)
if (len > sizeof(ch->atr.atr))
return -1;
+/* ignore new ATR for now since we PPS has not been tested
memcpy(ch->atr.atr, atr, len);
ch->atr.len = len;
ch->atr.idx = 0;
+*/
#if TRACE_LEVEL >= TRACE_LEVEL_INFO
uint8_t i;
TRACE_INFO("%u: ATR set: ", ch->num);
- for (i = 0; i < ch->atr.len; i++) {
+ for (i = 0; i < len; i++) {
TRACE_INFO_WP("%02x ", atr[i]);
}
TRACE_INFO_WP("\n\r");
+ TRACE_INFO("%u: ATR set currently ignored\n\r", ch->num);
#endif
/* FIXME: race condition with transmitting ATR to reader? */