From aac6c7f9d9456f76bc7b4da9c964050a41da1414 Mon Sep 17 00:00:00 2001 From: doug yeager Date: Wed, 26 Sep 2012 10:35:28 -0500 Subject: 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 --- src/phHciNfc_CE_A.c | 4 +++- 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) -- cgit v1.1