summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2012-10-03 22:14:20 -0700
committerGerrit Code Review <gerrit@review.cyanogenmod.com>2012-10-03 22:14:20 -0700
commit5199e59069db67d4f3bb2a466adab2e4647e8e70 (patch)
tree1619aa9f5abaa880a3b99259591981cebbfa151b
parentebad753d0010683dc1299159354a55175b58f047 (diff)
parentaac6c7f9d9456f76bc7b4da9c964050a41da1414 (diff)
downloadexternal_libnfc-nxp-5199e59069db67d4f3bb2a466adab2e4647e8e70.zip
external_libnfc-nxp-5199e59069db67d4f3bb2a466adab2e4647e8e70.tar.gz
external_libnfc-nxp-5199e59069db67d4f3bb2a466adab2e4647e8e70.tar.bz2
Merge "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" into jellybean
-rwxr-xr-xsrc/phHciNfc_CE_A.c4
-rwxr-xr-xsrc/phHciNfc_CE_B.c4
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)