diff options
author | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2008-02-07 16:17:18 +0000 |
---|---|---|
committer | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2008-02-07 16:17:18 +0000 |
commit | 621d27cc64f984e435d3ee66846d29ac5f052ba6 (patch) | |
tree | f46ed219710047a6a552064ead20b88eab0f5531 /src/rfid_layer2_iso14443a.c | |
parent | 9a7ba1f0d886fba6fff5da3e3340a986df23db0a (diff) |
add (preliminary?) SAK based detection of mifare mini.
git-svn-id: https://svn.gnumonks.org/trunk/librfid@2073 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'src/rfid_layer2_iso14443a.c')
-rw-r--r-- | src/rfid_layer2_iso14443a.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rfid_layer2_iso14443a.c b/src/rfid_layer2_iso14443a.c index 281f709..90af0f2 100644 --- a/src/rfid_layer2_iso14443a.c +++ b/src/rfid_layer2_iso14443a.c @@ -250,6 +250,7 @@ cascade: h->level = ISO14443A_LEVEL_NONE; h->state = ISO14443A_STATE_SELECTED; + h->sak = sak[0]; if (sak[0] & 0x20) { DEBUGP("we have a T=CL compliant PICC\n"); @@ -323,9 +324,14 @@ iso14443a_getopt(struct rfid_layer2_handle *handle, int optname, int ret = -EINVAL; struct iso14443a_handle *h = &handle->priv.iso14443a; struct iso14443a_atqa *atqa = optval; + u_int8_t *opt_u8 = optval; int *wupa = optval; switch (optname) { + case RFID_OPT_14443A_SAK: + *opt_u8 = h->sak; + optlen = sizeof(*opt_u8); + break; case RFID_OPT_14443A_ATQA: *atqa = h->atqa; ret = 0; |