HACK: cuart: Artificially extend WTIME by 100ms

It seems some cards / transactions take longer than we expect, see
https://osmocom.org/issues/4742

With sysmoUSIM-SJS1 a timeout of 12.5ms is sufficient.  But let's better
be tolerant here.

Change-Id: I85a7a0ae6195856fad17f249f0903f144a9aec85
Related: OS#4742
This commit is contained in:
Harald Welte 2020-09-02 19:21:49 +02:00
parent 172b44388e
commit 41177fe084
1 changed files with 3 additions and 0 deletions

View File

@ -80,6 +80,9 @@ void card_uart_wtime_restart(struct card_uart *cuart)
/* limit lower wait time to reasonable value */
usecs = usecs < 300000 ? 300000 : usecs;
/* HACK: Some cards seem to take more time than specified? SO#4742 */
usecs += 100000;
if (usecs > 1000000) {
secs = usecs / 1000000;
usecs = usecs % 1000000;