diff options
author | doug yeager <doug@simplytapp.com> | 2012-09-26 10:35:28 -0500 |
---|---|---|
committer | doug yeager <doug@simplytapp.com> | 2012-09-26 10:35:28 -0500 |
commit | aac6c7f9d9456f76bc7b4da9c964050a41da1414 (patch) | |
tree | 1619aa9f5abaa880a3b99259591981cebbfa151b | |
parent | 55f43da8fa1a5ac7e9e88f81381a80345fa3ac50 (diff) | |
download | external_libnfc-nxp-aac6c7f9d9456f76bc7b4da9c964050a41da1414.zip external_libnfc-nxp-aac6c7f9d9456f76bc7b4da9c964050a41da1414.tar.gz external_libnfc-nxp-aac6c7f9d9456f76bc7b4da9c964050a41da1414.tar.bz2 |
On some handsets, there is a configuration of hardware that causes a conflict with HCE. Primarily it is something in the SWP configuration with a SWP sim card. It appears to be a PN544 register setting that blocks HCE type A only from initialization. This patch checks for this conflict and disables HCE for those configurations. The better way would be to understand how to set the PN544 registers to unblock the conflict, but this is a sufficient work around for this minority of configurations
Change-Id: I64d79acaa7eb58e15f1fb4bbe298883036f6d45a
-rwxr-xr-x | src/phHciNfc_CE_A.c | 4 | ||||
-rwxr-xr-x | src/phHciNfc_CE_B.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/phHciNfc_CE_A.c b/src/phHciNfc_CE_A.c index 8cb1aca..8c7879e 100755 --- a/src/phHciNfc_CE_A.c +++ b/src/phHciNfc_CE_A.c @@ -255,6 +255,7 @@ phHciNfc_CE_A_Initialise( } default : { + status=NFCSTATUS_FAILED; break; } } @@ -340,6 +341,7 @@ phHciNfc_CE_A_Release( } default : { + status=NFCSTATUS_FAILED; break; } } @@ -376,7 +378,7 @@ phHciNfc_CE_A_Update_PipeInfo( /* Update the pipe_id of the card emulation A Gate o btained from the HCI Response */ ps_ce_a_info->pipe_id = pipeID; - if (HCI_UNKNOWN_PIPE_ID != pipeID) + if (HCI_UNKNOWN_PIPE_ID != pipeID && pipeID>0) { ps_ce_a_info->p_pipe_info = pPipeInfo; if (NULL != pPipeInfo) diff --git a/src/phHciNfc_CE_B.c b/src/phHciNfc_CE_B.c index 6583160..aa7a849 100755 --- a/src/phHciNfc_CE_B.c +++ b/src/phHciNfc_CE_B.c @@ -252,6 +252,7 @@ phHciNfc_CE_B_Initialise( } default : { + status=NFCSTATUS_FAILED; break; } } @@ -334,6 +335,7 @@ phHciNfc_CE_B_Release( } default : { + status=NFCSTATUS_FAILED; break; } } @@ -442,7 +444,7 @@ phHciNfc_CE_B_Update_PipeInfo( /* Update the pipe_id of the card emulation A Gate o btained from the HCI Response */ ps_ce_b_info->pipe_id = pipeID; - if (HCI_UNKNOWN_PIPE_ID != pipeID) + if (HCI_UNKNOWN_PIPE_ID != pipeID && pipeID>0) { ps_ce_b_info->p_pipe_info = pPipeInfo; if (NULL != pPipeInfo) |