diff options
Diffstat (limited to 'rfid_reader_cm5121.c')
-rw-r--r-- | rfid_reader_cm5121.c | 15 |
1 files changed, 11 insertions, 4 deletions
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, @@ -226,6 +226,12 @@ cm5121_15693_init(struct rfid_reader_handle *rh) } 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, }, }; |