summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Chu <evanchu@broadcom.com>2014-01-29 17:08:28 -0500
committerMartijn Coenen <maco@google.com>2014-05-19 13:28:25 -0700
commit40f9717d1d3b664f23724f3457f97164b23d7614 (patch)
treea7620d5ea58a8fa9acdde99a85cc18147e96f961
parent40e67c9ec7191cbda00cde97e4f988d1d5737762 (diff)
downloadlibnfc-nci-40f9717d1d3b664f23724f3457f97164b23d7614.tar.gz
Determine how many secure elements to discover.
Let .conf variable NFA_MAX_EE_SUPPORTED determine how many secure element to discover. If the variable is undefined, then stack automatically discovers all secure element. Change-Id: I752a952aa023d7dbb86b7511bc435b9f6a8c7b49
-rw-r--r--halimpl/bcm2079x/adaptation/patchram.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/halimpl/bcm2079x/adaptation/patchram.cpp b/halimpl/bcm2079x/adaptation/patchram.cpp
index 955be5f..4c278cd 100644
--- a/halimpl/bcm2079x/adaptation/patchram.cpp
+++ b/halimpl/bcm2079x/adaptation/patchram.cpp
@@ -366,9 +366,7 @@ static void getNfaValues (UINT32 chipid)
//configure how many secure elements are available for each type of chip
if (p_nfc_hal_cfg->nfc_hal_hci_uicc_support > 0)
{
- if (GetNumValue(NAME_NFA_MAX_EE_SUPPORTED, &num, sizeof(num)))
- nfc_hal_cb.max_ee = num;
- else if ((chipid & BRCM_NFC_GEN_MASK) == BRCM_NFC_20791_GEN)
+ if ((chipid & BRCM_NFC_GEN_MASK) == BRCM_NFC_20791_GEN)
{
nfc_hal_cb.max_ee = BRCM_NFC_20791_GEN_MAX_EE;
p_nfc_hal_cfg->nfc_hal_hci_uicc_support = HAL_NFC_HCI_UICC0_HOST | HAL_NFC_HCI_UICC1_HOST;
@@ -383,6 +381,10 @@ static void getNfaValues (UINT32 chipid)
nfc_hal_cb.max_ee = BRCM_NFC_20795_GEN_MAX_EE;
p_nfc_hal_cfg->nfc_hal_hci_uicc_support = HAL_NFC_HCI_UICC0_HOST | HAL_NFC_HCI_UICC1_HOST | HAL_NFC_HCI_UICC2_HOST;
}
+
+ //let .conf variable determine how many EE's to discover
+ if (GetNumValue(NAME_NFA_MAX_EE_SUPPORTED, &num, sizeof(num)))
+ nfc_hal_cb.max_ee = num;
}
}