Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42650?usp=email )


Change subject: timers: fix ATR timeout
......................................................................

timers: fix ATR timeout

Default WWT to 1.5s.

Both atr and card uart timeouts were combined in
7ae9a65c7fadf3d9d89370761c7352cbcac83a00 but the timeout
was accidentally left as 0 which was the original ATR fsm
state change timeout. The current code uses 0 as
"no timeout", so that killed the timeouts during the ATR.

Related: SYS#7991
Change-Id: I94d6641a10bf6d1df8640727e753da8171267339
---
M ccid_common/iso7816_fsm.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware 
refs/changes/50/42650/1

diff --git a/ccid_common/iso7816_fsm.c b/ccid_common/iso7816_fsm.c
index 4f01bd7..bad827a 100644
--- a/ccid_common/iso7816_fsm.c
+++ b/ccid_common/iso7816_fsm.c
@@ -1679,6 +1679,10 @@

        ip->user_cb = user_cb;
        ip->user_priv = user_priv;
+       /* ATR inter-byte WWT starts at 9600 ETU (ISO 7816-3 ยง8.1), which is
+        * ~1.43s at 2.5 MHz / Fd=372. 1500ms covers that and is a safe initial
+        * value that could be adjusted later based on ATR-parsed params. */
+       ip->guard_time_ms = 1500;

        ip->atr_fi = osmo_fsm_inst_alloc_child(&atr_fsm, fi, 
ISO7816_E_SW_ERR_IND);
        if (!ip->atr_fi)

--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42650?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I94d6641a10bf6d1df8640727e753da8171267339
Gerrit-Change-Number: 42650
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <[email protected]>

Reply via email to