From b9e8c17d8c4f28938c7cb0a665a1f21232ebdf66 Mon Sep 17 00:00:00 2001 From: laforge Date: Sun, 23 Oct 2005 20:03:56 +0000 Subject: make "frametype" a parameter of transcieve functions git-svn-id: https://svn.gnumonks.org/trunk/librfid@1559 e0336214-984f-0b4b-a45f-81c69e1f0ede --- rfid_reader_cm5121.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'rfid_reader_cm5121.c') diff --git a/rfid_reader_cm5121.c b/rfid_reader_cm5121.c index e1fc859..0a72836 100644 --- a/rfid_reader_cm5121.c +++ b/rfid_reader_cm5121.c @@ -180,14 +180,14 @@ static int TestFIFO(struct rc632_handle *handle) #endif static int cm5121_transcieve(struct rfid_reader_handle *rh, + enum rfid_frametype frametype, const unsigned char *tx_data, unsigned int tx_len, unsigned char *rx_data, unsigned int *rx_len, u_int64_t timeout, unsigned int flags) { - return rh->ah->asic->priv.rc632.fn.transcieve(rh->ah, tx_data, - tx_len, rx_data, - rx_len, timeout, - flags); + return rh->ah->asic->priv.rc632.fn.transcieve(rh->ah, frametype, + tx_data, tx_len, rx_data, + rx_len, timeout, flags); } static int cm5121_transcieve_sf(struct rfid_reader_handle *rh, @@ -225,6 +225,12 @@ cm5121_15693_init(struct rfid_reader_handle *rh) return rh->ah->asic->priv.rc632.fn.iso15693.init(rh->ah); } +static int +cm5121_mifare_setkey(struct rfid_reader_handle *rh, const u_int8_t *key) +{ + return rh->ah->asic->priv.rc632.fn.mifare_classic.setkey(rh->ah, key); +} + static int cm5121_mifare_auth(struct rfid_reader_handle *rh, u_int8_t cmd, u_int32_t serno, u_int8_t block) @@ -321,6 +327,7 @@ struct rfid_reader rfid_reader_cm5121 = { .init = &cm5121_14443b_init, }, .mifare_classic = { + .setkey = &cm5121_mifare_setkey, .auth = &cm5121_mifare_auth, }, }; -- cgit v1.2.3