Returns a NFC_ETGRELEASED error when MIFARE Classic's authentication failed (instead of NFC_ECHIP): a MIFARE Classic is halted on AUTH command failure.

This commit is contained in:
Romuald Conty 2012-06-03 21:02:31 +00:00
parent c7820c6a77
commit b7a74931f6

View file

@ -267,6 +267,10 @@ pn53x_transceive(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx
case ECDISCARDED:
res = NFC_ETGRELEASED;
break;
case EMFAUTH:
// When a MIFARE Classic AUTH fails, the tag is automatically in HALT state
res = NFC_ETGRELEASED;
break;
default:
res = NFC_ECHIP;
break;