summaryrefslogtreecommitdiff
path: root/src/rfid_layer2_iso14443a.c
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2006-10-15 19:17:22 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2006-10-15 19:17:22 +0000
commit7f44cae7c1c1a7e54099655365afde4f20aeee6a (patch)
tree2214b97f6172e0d3446f04f50003a55c356a2983 /src/rfid_layer2_iso14443a.c
parent966a8e3acc6244025d265db0af5e20365566f2a4 (diff)
- fix multiple include of rfid_protocol_mifare_classic.h problem
- add some more layer2 {get,set}opt()s - add rfid_protocol_{get,set}opt() - export functions for l2/proto scanning, not just for combined scanning - add support for sending WUPA instead of REQA in iso14443a git-svn-id: https://svn.gnumonks.org/trunk/librfid@1910 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'src/rfid_layer2_iso14443a.c')
-rw-r--r--src/rfid_layer2_iso14443a.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rfid_layer2_iso14443a.c b/src/rfid_layer2_iso14443a.c
index 34bd93f..b8e6ef4 100644
--- a/src/rfid_layer2_iso14443a.c
+++ b/src/rfid_layer2_iso14443a.c
@@ -112,7 +112,10 @@ iso14443a_anticol(struct rfid_layer2_handle *handle)
memset(&atqa, 0, sizeof(atqa));
memset(&acf, 0, sizeof(acf));
- ret = iso14443a_transceive_sf(handle, ISO14443A_SF_CMD_REQA, &atqa);
+ if (handle->flags & RFID_OPT_LAYER2_WUP)
+ ret = iso14443a_transceive_sf(handle, ISO14443A_SF_CMD_WUPA, &atqa);
+ else
+ ret = iso14443a_transceive_sf(handle, ISO14443A_SF_CMD_REQA, &atqa);
if (ret < 0) {
h->state = ISO14443A_STATE_REQA_SENT;
DEBUGP("error during transceive_sf: %d\n", ret);
@@ -291,6 +294,8 @@ iso14443a_init(struct rfid_reader_handle *rh)
if (!h)
return NULL;
+ memset(h, 0, sizeof(*h));
+
h->l2 = &rfid_layer2_iso14443a;
h->rh = rh;
h->priv.iso14443a.state = ISO14443A_STATE_NONE;
personal git repositories of Harald Welte. Your mileage may vary