cardem: fix spurious NULL bytes during transfers

The "wait time extension timer" was apparently not being reset during
normal tx operations, which led to occasional NULL (0x60) bytes getting
injected into transfers, which in turn led to more tx bytes than what
the reader side expects...

The odd thing is that this was only noticeable with high baud rates,
probably due to the very long default WT of 9600 ETU, and even then only
because it led to weird ngff modem resets after benign transfers.

Change-Id: I15b0b83b7d93b8e5589f3640bd6eb2fc82f93394
Related: SYS#5553
This commit is contained in:
Eric Wild
2021-08-08 04:14:38 +02:00
parent a951c4ae02
commit 7ca68359f3

View File

@@ -922,6 +922,7 @@ static int tx_byte_tpdu(struct card_handle *ch)
byte = msgb_pull_u8(msg);
card_emu_uart_tx(ch->uart_chan, byte);
card_emu_uart_reset_wt(ch->uart_chan);
/* this must happen _after_ the byte has been transmitted */
switch (ch->tpdu.state) {