summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2011-06-06 11:13:10 +0200
committerMartijn Coenen <maco@google.com>2011-06-06 11:17:09 +0200
commit97ffda519d438861f34d6de511f9025656470af6 (patch)
treeee12b570cefe524f611bd1615e3b4e9ac512be4c /src
parent60d8ea84bfbf2dabd0e851edd812f89d42043c1a (diff)
downloadexternal_libnfc-nxp-97ffda519d438861f34d6de511f9025656470af6.zip
external_libnfc-nxp-97ffda519d438861f34d6de511f9025656470af6.tar.gz
external_libnfc-nxp-97ffda519d438861f34d6de511f9025656470af6.tar.bz2
Add support for connecting to NfcA on IsoDep tags.
Always add a ISO14443-3A device handle for tags that are found through the A-gate. This allows the upper stack to connect and maintain a connection to the NfcA technology, even if the tag has IsoDep on top of NfcA. The reason this can work is that libnfc does do the IsoDep activation in software, and if the NfcA target is on a separate handle this activation will not take place if you connect to this handle. Bug: 4195403 Change-Id: I00015e74bdadc6666c2971f8102244670a76e340
Diffstat (limited to 'src')
-rw-r--r--src/phHal4Nfc_ADD.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/phHal4Nfc_ADD.c b/src/phHal4Nfc_ADD.c
index 0be1670..5751219 100644
--- a/src/phHal4Nfc_ADD.c
+++ b/src/phHal4Nfc_ADD.c
@@ -489,17 +489,13 @@ void phHal4Nfc_TargetDiscoveryComplete(
psRemoteDevInfo->RemoteDevInfo.Iso14443A_Info.UidLength))
{
aRemoteDevTypes[Count] = phHal_eMifare_PICC;
-
+ Count++;
}
- else/*TYPE 3A*/
- {
- aRemoteDevTypes[Count] = phHal_eISO14443_3A_PICC;
- }
- Count++;
}
- else if ( !(Sak & ISO_14443_BITMASK) &&
- !(Sak & NFCIP_BITMASK) && (0 == Count))
+ if ( !(Sak & NFCIP_BITMASK) )
{
+ // Always add a separate 3A target on a separate
+ // handle, so the upper layers can connect to it.
aRemoteDevTypes[Count] = phHal_eISO14443_3A_PICC;
Count++;
}