Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: nfc: nci: Increase NCI_DATA_TIMEOUT to 3000 ms

An exchange with a NFC target must complete within NCI_DATA_TIMEOUT.
A delay of 700 ms is not sufficient for cryptographic operations on smart
cards. CardOS 6.0 may need up to 1.3 seconds to perform 256-bit ECDH
or 3072-bit RSA. To prevent brute-force attacks, passports and similar
documents introduce even longer delays into access control protocols
(BAC/PACE).

The timeout should be higher, but not too much. The expiration allows
us to detect that a NFC target has disappeared.

Signed-off-by: Juraj Šarinay <juraj@sarinay.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250902113630.62393-1-juraj@sarinay.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Juraj Šarinay and committed by
Jakub Kicinski
21f82062 648d628d

+1 -1
+1 -1
include/net/nfc/nci_core.h
··· 52 52 #define NCI_RF_DISC_SELECT_TIMEOUT 5000 53 53 #define NCI_RF_DEACTIVATE_TIMEOUT 30000 54 54 #define NCI_CMD_TIMEOUT 5000 55 - #define NCI_DATA_TIMEOUT 700 55 + #define NCI_DATA_TIMEOUT 3000 56 56 57 57 struct nci_dev; 58 58