summaryrefslogtreecommitdiff
path: root/src/rfid_proto_mifare_classic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rfid_proto_mifare_classic.c')
-rw-r--r--src/rfid_proto_mifare_classic.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rfid_proto_mifare_classic.c b/src/rfid_proto_mifare_classic.c
index 66e4287..a6e2e4f 100644
--- a/src/rfid_proto_mifare_classic.c
+++ b/src/rfid_proto_mifare_classic.c
@@ -187,6 +187,14 @@ int mfcl_set_key(struct rfid_protocol_handle *ph, unsigned char *key)
return ph->l2h->rh->reader->mifare_classic.setkey(ph->l2h->rh, key);
}
+int mfcl_set_key_ee(struct rfid_protocol_handle *ph, unsigned int addr)
+{
+ if (!ph->l2h->rh->reader->mifare_classic.setkey_ee)
+ return -ENODEV;
+
+ return ph->l2h->rh->reader->mifare_classic.setkey_ee(ph->l2h->rh, addr);
+}
+
int mfcl_auth(struct rfid_protocol_handle *ph, u_int8_t cmd, u_int8_t block)
{
u_int32_t serno = *((u_int32_t *)ph->l2h->uid);
personal git repositories of Harald Welte. Your mileage may vary