drivers/pn53x_usb: do not send ACK when its not needed, enable abort() mecanism on InJumpForDEP command

This commit is contained in:
Romuald Conty 2011-04-27 14:37:24 +00:00
parent 1198a71d64
commit ee718d6f9b

View file

@ -404,8 +404,8 @@ pn53x_usb_receive (nfc_device_t * pnd, byte_t * pbtData, const size_t szDataLen)
int abort_fd = 0; int abort_fd = 0;
switch (CHIP_DATA (pnd)->ui8LastCommand) { switch (CHIP_DATA (pnd)->ui8LastCommand) {
case InAutoPoll:
case TgInitAsTarget: case TgInitAsTarget:
case InJumpForDEP:
case TgGetData: case TgGetData:
abort_fd = pnd->iAbortFds[1]; abort_fd = pnd->iAbortFds[1];
break; break;
@ -453,8 +453,6 @@ read:
return false; return false;
} }
pn53x_usb_ack (pnd);
const byte_t pn53x_preamble[3] = { 0x00, 0x00, 0xff }; const byte_t pn53x_preamble[3] = { 0x00, 0x00, 0xff };
if (0 != (memcmp (abtRxBuf, pn53x_preamble, 3))) { if (0 != (memcmp (abtRxBuf, pn53x_preamble, 3))) {
ERR ("%s", "Frame preamble+start code mismatch"); ERR ("%s", "Frame preamble+start code mismatch");