From 65eef7a9742097179ea52341130424b2f3139a55 Mon Sep 17 00:00:00 2001 From: ploetz Date: Wed, 14 Feb 2007 22:36:35 +0000 Subject: Fix "key format error" on cm5121 (Pierrick Hascoet ) git-svn-id: https://svn.gnumonks.org/trunk/librfid@1976 e0336214-984f-0b4b-a45f-81c69e1f0ede --- src/rfid_asic_rc632.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rfid_asic_rc632.c b/src/rfid_asic_rc632.c index 2890d6d..0d6824c 100644 --- a/src/rfid_asic_rc632.c +++ b/src/rfid_asic_rc632.c @@ -1467,11 +1467,11 @@ rc632_mifare_set_key(struct rfid_asic_handle *h, const u_int8_t *key) if (ret < 0) return ret; - ret = rc632_reg_write(h, RC632_REG_COMMAND, RC632_CMD_LOAD_KEY); + ret = rc632_fifo_write(h, RFID_MIFARE_KEY_CODED_LEN, coded_key, 0x03); if (ret < 0) return ret; - ret = rc632_fifo_write(h, RFID_MIFARE_KEY_CODED_LEN, coded_key, 0x03); + ret = rc632_reg_write(h, RC632_REG_COMMAND, RC632_CMD_LOAD_KEY); if (ret < 0) return ret; -- cgit v1.2.3