ccid fsm: proper wtime calculation

The timeouts had a minor off by a million problem because WT (in ETU) =
WI * 960 as per 7816-3 10.2, but WI was used as WT without the factor of
960 after the pps exchange, so WT (in ETU) was accidentally set to 10
instead of 9600 for the default WI=10.
Additionally that time was only added once, even though the wait time is
the time between the leading character edge of one character and the
next one, irrespective of direction, so the total wait time is this
multiplied with the number of expected bytes.

In practice this had no real effect due to to a reasonable minimum
timeout value and cards that were much faster than this.

Closes: OS#4742
Change-Id: I9ea0b6b51c8cc6f08a36b48e516c64b5e2bbaf9b
diff --git a/ccid_common/cuart.c b/ccid_common/cuart.c
index bc99631..c617754 100644
--- a/ccid_common/cuart.c
+++ b/ccid_common/cuart.c
@@ -74,9 +74,8 @@
 	int etu_in_us = get_etu_in_us(cuart) + 1;
 	cuart->wtime_etu = cuart->wtime_etu ? cuart->wtime_etu : 1;
 
-	/* timemout is wtime * ETU + expected number of bytes * (12ETU+1 slack)ETU */
-	usecs = etu_in_us * cuart->wtime_etu +
-			etu_in_us * cuart->current_wtime_byte * (12+1);
+	/* timemout is wtime * ETU * expected number of bytes */
+	usecs = etu_in_us * cuart->wtime_etu * cuart->current_wtime_byte;
 
 	/* limit lower wait time to reasonable value */
 	usecs = usecs < 300000 ? 300000 : usecs;