summaryrefslogtreecommitdiff
path: root/rfid_reader_cm5121.c
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2005-10-23 20:03:56 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2005-10-23 20:03:56 +0000
commitb9e8c17d8c4f28938c7cb0a665a1f21232ebdf66 (patch)
treed4d3004078f2de09d76f2798fba06d4eecc25a77 /rfid_reader_cm5121.c
parent5fc01ff6f98d72219420bc29fb59d2d6eb93e887 (diff)
make "frametype" a parameter of transcieve functions
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1559 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'rfid_reader_cm5121.c')
-rw-r--r--rfid_reader_cm5121.c15
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,
},
};
personal git repositories of Harald Welte. Your mileage may vary