nfc_initiator_transceive_bytes() returns NFC_EMFCAUTHFAIL when AUTH command failed on a Mifare Classic

This commit is contained in:
Romuald Conty 2012-11-01 01:27:06 +01:00
parent 3629219a3b
commit 9f90a04a84
4 changed files with 8 additions and 6 deletions

View file

@ -285,15 +285,12 @@ pn53x_transceive(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx
break;
case EMFAUTH:
// When a MIFARE Classic AUTH fails, the tag is automatically in HALT state
res = NFC_ETGRELEASED;
res = NFC_EMFCAUTHFAIL;
break;
default:
res = NFC_ECHIP;
break;
};
/*
{ EMFAUTH, "Mifare Authentication Error" },
*/
if (res < 0) {
pnd->last_error = res;