summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2011-03-18 11:27:49 -0700
committerNick Pelly <npelly@google.com>2011-03-18 11:42:27 -0700
commit00c98d516cac9dcdad6c22400267a2fd2bea3adf (patch)
tree00919c0e9490c47690e4c14447612c2cd5e2b6ee
parentd625fb631ee97e320400f0c763839d166048c54b (diff)
downloadexternal_libnfc-nxp-00c98d516cac9dcdad6c22400267a2fd2bea3adf.zip
external_libnfc-nxp-00c98d516cac9dcdad6c22400267a2fd2bea3adf.tar.gz
external_libnfc-nxp-00c98d516cac9dcdad6c22400267a2fd2bea3adf.tar.bz2
Disable P2P target 106 passive mode.
P2P target 106 passive appears as an ISO 14443-3A target to reader/writers in the field. This can confuse some terminals, especially when we also have card emulation turned on, since it looks like we have two -3A targets in the field. P2P target 106 passive is just one of many P2P sub-modes. We do not know of any P2P devices that only initiate using only 106 passive, so this should not present inter-op issues. Change-Id: I1cb84ed791a86a7f225a51806e99bab031dcb6ca
-rw-r--r--inc/phNfcConfig.h5
-rw-r--r--src/phHciNfc_Emulation.c2
-rw-r--r--src/phHciNfc_RFReader.c2
-rw-r--r--src/phHciNfc_Sequence.c4
4 files changed, 7 insertions, 6 deletions
diff --git a/inc/phNfcConfig.h b/inc/phNfcConfig.h
index a346b8c..3f5a108 100644
--- a/inc/phNfcConfig.h
+++ b/inc/phNfcConfig.h
@@ -141,7 +141,7 @@
/**< Default Session ID for Initialisation */
#ifndef DEFAULT_SESSION
-#define DEFAULT_SESSION "android5"
+#define DEFAULT_SESSION "android6"
#endif
@@ -323,7 +323,8 @@
/**< Macro to Enable the Peer to Peer Feature */
#define ENABLE_P2P
-#define DEFAULT_NFCIP_MODE_SUPPORT 0x0FU
+#define DEFAULT_NFCIP_INITIATOR_MODE_SUPPORT 0x0FU
+#define DEFAULT_NFCIP_TARGET_MODE_SUPPORT 0x0EU
/**< Macro to Enable the ISO14443-B Feature */
#define TYPE_B
diff --git a/src/phHciNfc_Emulation.c b/src/phHciNfc_Emulation.c
index e01c540..5309f3a 100644
--- a/src/phHciNfc_Emulation.c
+++ b/src/phHciNfc_Emulation.c
@@ -453,7 +453,7 @@ phHciNfc_EmuMgmt_Initialise(
#define NFCIP_ACTIVE_SHIFT 0x03U
#define NFCIP_PASSIVE_MASK 0x07U
uint8_t mode = ( NXP_NFCIP_ACTIVE_DEFAULT << NFCIP_ACTIVE_SHIFT ) |
- ( DEFAULT_NFCIP_MODE_SUPPORT & NFCIP_PASSIVE_MASK );
+ ( DEFAULT_NFCIP_TARGET_MODE_SUPPORT & NFCIP_PASSIVE_MASK );
status = phHciNfc_NfcIP_SetMode( psHciContext, pHwRef,
NFCIP_TARGET, mode);
if(status == NFCSTATUS_PENDING )
diff --git a/src/phHciNfc_RFReader.c b/src/phHciNfc_RFReader.c
index 1ecba87..919f3fd 100644
--- a/src/phHciNfc_RFReader.c
+++ b/src/phHciNfc_RFReader.c
@@ -593,7 +593,7 @@ phHciNfc_ReaderMgmt_Initialise(
}
case NFCIP1_INITIATOR_MODE_CONFIG:
{
- uint8_t mode = DEFAULT_NFCIP_MODE_SUPPORT;
+ uint8_t mode = DEFAULT_NFCIP_INITIATOR_MODE_SUPPORT;
status = phHciNfc_NfcIP_SetMode( psHciContext, pHwRef,
NFCIP_INITIATOR, mode);
if(status == NFCSTATUS_PENDING )
diff --git a/src/phHciNfc_Sequence.c b/src/phHciNfc_Sequence.c
index 07a702a..13b8ad5 100644
--- a/src/phHciNfc_Sequence.c
+++ b/src/phHciNfc_Sequence.c
@@ -1587,7 +1587,7 @@ phHciNfc_PollLoop_Sequence(
#define NFCIP_ACTIVE_SHIFT 0x03U
#define NFCIP_PASSIVE_MASK 0x07U
uint8_t mode = ( NXP_NFCIP_ACTIVE_DEFAULT << NFCIP_ACTIVE_SHIFT ) |
- ( DEFAULT_NFCIP_MODE_SUPPORT & NFCIP_PASSIVE_MASK );
+ ( DEFAULT_NFCIP_TARGET_MODE_SUPPORT & NFCIP_PASSIVE_MASK );
status =
phHciNfc_NfcIP_SetMode( psHciContext, pHwRef, NFCIP_TARGET,
(uint8_t) mode );
@@ -1610,7 +1610,7 @@ phHciNfc_PollLoop_Sequence(
{
status =
phHciNfc_NfcIP_SetMode( psHciContext, pHwRef, NFCIP_INITIATOR,
- (uint8_t) (speed & DEFAULT_NFCIP_MODE_SUPPORT));
+ (uint8_t) (speed & DEFAULT_NFCIP_INITIATOR_MODE_SUPPORT));
if(NFCSTATUS_PENDING == status)
{
#if defined (NFCIP_TGT_DISABLE_CFG)