chg: 'hf mf nack' - use faster iso select

This commit is contained in:
iceman1001 2017-12-05 10:52:53 +01:00
commit ea6136456c

View file

@ -1782,7 +1782,6 @@ int ReaderReceive(uint8_t *receivedAnswer, uint8_t *parity) {
return Demod.len; return Demod.len;
} }
static void iso14a_set_ATS_times(uint8_t *ats) { static void iso14a_set_ATS_times(uint8_t *ats) {
uint8_t tb1; uint8_t tb1;
@ -1810,7 +1809,6 @@ static void iso14a_set_ATS_times(uint8_t *ats) {
} }
} }
static int GetATQA(uint8_t *resp, uint8_t *resp_par) { static int GetATQA(uint8_t *resp, uint8_t *resp_par) {
#define WUPA_RETRY_TIMEOUT 10 // 10ms #define WUPA_RETRY_TIMEOUT 10 // 10ms
@ -2012,7 +2010,6 @@ int iso14443a_fast_select_card(uint8_t *uid_ptr, uint8_t num_cascades) {
return 0; return 0;
} }
// OK we will select at least at cascade 1, lets see if first byte of UID was 0x88 in // OK we will select at least at cascade 1, lets see if first byte of UID was 0x88 in
// which case we need to make a cascade 2 request and select - this is a long UID // which case we need to make a cascade 2 request and select - this is a long UID
// While the UID is not complete, the 3nd bit (from the right) is set in the SAK. // While the UID is not complete, the 3nd bit (from the right) is set in the SAK.
@ -2628,7 +2625,7 @@ void DetectNACKbug() {
} }
have_uid = true; have_uid = true;
} else { // no need for anticollision. We can directly select the card } else { // no need for anticollision. We can directly select the card
if(!iso14443a_select_card(uid, NULL, &cuid, false, cascade_levels, true)) { if (!iso14443a_fast_select_card(uid, cascade_levels)) {
if (MF_DBGLEVEL >= 4) Dbprintf("Mifare: Can't select card (UID)"); if (MF_DBGLEVEL >= 4) Dbprintf("Mifare: Can't select card (UID)");
continue; continue;
} }