From 1d6f4555beb5ecd2caaf6fa5a0d9eb4aed5fb34e Mon Sep 17 00:00:00 2001 From: "@shinhub" Date: Sat, 24 Aug 2019 19:00:16 +0200 Subject: [PATCH] Fix ATQA 4B/7B init inversion for MFC (#137) --- Firmware/ChameleonMini/Application/MifareClassic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Firmware/ChameleonMini/Application/MifareClassic.c b/Firmware/ChameleonMini/Application/MifareClassic.c index 3859acf..00456bd 100644 --- a/Firmware/ChameleonMini/Application/MifareClassic.c +++ b/Firmware/ChameleonMini/Application/MifareClassic.c @@ -410,9 +410,9 @@ void MifareClassicAppInit1K(void) State = STATE_IDLE; is7BitsUID = (ActiveConfiguration.UidSize == MEM_UID7_SIZE); if (is7BitsUID) { - CardATQAValue = MFCLASSIC_1K_ATQA_VALUE; - } else { CardATQAValue = MFCLASSIC_1K_7B_ATQA_VALUE; + } else { + CardATQAValue = MFCLASSIC_1K_ATQA_VALUE; } CardSAKValue = MFCLASSIC_1K_SAK_CL1_VALUE; } @@ -422,9 +422,9 @@ void MifareClassicAppInit4K(void) State = STATE_IDLE; is7BitsUID = (ActiveConfiguration.UidSize == MEM_UID7_SIZE); if (is7BitsUID) { - CardATQAValue = MFCLASSIC_4K_ATQA_VALUE; - } else { CardATQAValue = MFCLASSIC_4K_7B_ATQA_VALUE; + } else { + CardATQAValue = MFCLASSIC_4K_ATQA_VALUE; } CardSAKValue = MFCLASSIC_4K_SAK_CL1_VALUE; }