diff options
author | Harald Welte <laforge@osmocom.org> | 2021-04-05 18:08:49 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2021-04-08 21:28:37 +0000 |
commit | c1ffc8a6039326a0f080b6d25408e8b06acaa73f (patch) | |
tree | 0897b6b17808722b8acd37724313e50703c179a0 /firmware/libcommon/source/card_emu.c | |
parent | 79f0ea73a2da29b358e2488abe949d2a494af100 (diff) |
iso7816_fidi: Add iso7816_3_ prefix to symbols; fix terminology
Fi/Di are not the index into the table, but the contents of the table
as resolved by Fi_index / Di_index. Let's clarify the terminology.
Change-Id: If364e08e7c9a3a9707e6d54b9267c6a7c088e415
Diffstat (limited to 'firmware/libcommon/source/card_emu.c')
-rw-r--r-- | firmware/libcommon/source/card_emu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index 1193121..c5e4cfa 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -377,7 +377,7 @@ static void emu_update_fidi(struct card_handle *ch) { int rc; - rc = compute_fidi_ratio(ch->F_index, ch->D_index); + rc = iso7816_3_compute_fd_ratio(ch->F_index, ch->D_index); if (rc > 0 && rc < 0x400) { TRACE_INFO("%u: computed F(%u)/D(%u) ratio: %d\r\n", ch->num, ch->F_index, ch->D_index, rc); @@ -508,7 +508,7 @@ static int tx_byte_atr(struct card_handle *ch) } } /* update waiting time (see ISO 7816-3 10.2) */ - ch->waiting_time = ch->wi * 960 * fi_table[ch->F_index]; + ch->waiting_time = ch->wi * 960 * iso7816_3_fi_table[ch->F_index]; tc_etu_set_wtime(ch->tc_chan, ch->waiting_time); /* go to next state */ card_set_state(ch, ISO_S_WAIT_TPDU); @@ -647,7 +647,7 @@ static int tx_byte_pts(struct card_handle *ch) ch->F_index = byte >> 4; ch->D_index = byte & 0xf; TRACE_DEBUG("%u: found F=%u D=%u\r\n", ch->num, - fi_table[ch->F_index], di_table[ch->D_index]); + iso7816_3_fi_table[ch->F_index], iso7816_3_di_table[ch->D_index]); /* FIXME: if F or D are 0, become unresponsive to signal error condition */ break; case PTS_S_WAIT_RESP_PTS2: |