halimpl: NCI2.0 Added HCI network initialization and NFCEE Discover support.
am: 946df52e94

Change-Id: I799bfd4cd57983c2c11358bc400e80c78c5b9e8c
diff --git a/halimpl/pn54x/hal/phNxpNciHal_ext.c b/halimpl/pn54x/hal/phNxpNciHal_ext.c
index cbfa296..bdcba3f 100644
--- a/halimpl/pn54x/hal/phNxpNciHal_ext.c
+++ b/halimpl/pn54x/hal/phNxpNciHal_ext.c
@@ -674,23 +674,25 @@
         "Going through extns - Adding Mifare in RF Discovery - END");
   } else if (p_cmd_data[3] == 0x81 && p_cmd_data[4] == 0x01 &&
              p_cmd_data[5] == 0x03) {
-    NXPLOG_NCIHAL_D("> Going through workaround - set host list");
+    if (nxpncihal_ctrl.nci_info.nci_version != NCI_VERSION_2_0) {
+      NXPLOG_NCIHAL_D("> Going through workaround - set host list");
 
 #if (NFC_NXP_CHIP_TYPE != PN547C2)
-    *cmd_len = 8;
+      *cmd_len = 8;
 
-    p_cmd_data[2] = 0x05;
-    p_cmd_data[6] = 0x02;
-    p_cmd_data[7] = 0xC0;
+      p_cmd_data[2] = 0x05;
+      p_cmd_data[6] = 0x02;
+      p_cmd_data[7] = 0xC0;
 #else
-    *cmd_len = 7;
+      *cmd_len = 7;
 
-    p_cmd_data[2] = 0x04;
-    p_cmd_data[6] = 0xC0;
+      p_cmd_data[2] = 0x04;
+      p_cmd_data[6] = 0xC0;
 #endif
 
-    NXPLOG_NCIHAL_D("> Going through workaround - set host list - END");
-    status = NFCSTATUS_SUCCESS;
+      NXPLOG_NCIHAL_D("> Going through workaround - set host list - END");
+      status = NFCSTATUS_SUCCESS;
+    }
   } else if (icode_detected) {
     if ((p_cmd_data[3] & 0x40) == 0x40 &&
         (p_cmd_data[4] == 0x21 || p_cmd_data[4] == 0x22 ||
diff --git a/halimpl/pn54x/libnfc-brcm.conf b/halimpl/pn54x/libnfc-brcm.conf
index 14c6912..c1dfe47 100644
--- a/halimpl/pn54x/libnfc-brcm.conf
+++ b/halimpl/pn54x/libnfc-brcm.conf
@@ -398,3 +398,7 @@
 # Bail out mode
 #  If set to 1, NFCC is using bail out mode for either Type A or Type B poll.
 NFA_POLL_BAIL_OUT_MODE=0x01
+############################################################################## #
+# White list of Hosts
+# This values will be the Hosts(NFCEEs) in the HCI Network.
+DEVICE_HOST_WHITE_LIST={C0 : 02}
diff --git a/halimpl/pn54x/libnfc-brcm_NCI2_0.conf b/halimpl/pn54x/libnfc-brcm_NCI2_0.conf
index a4d3290..919964a 100644
--- a/halimpl/pn54x/libnfc-brcm_NCI2_0.conf
+++ b/halimpl/pn54x/libnfc-brcm_NCI2_0.conf
@@ -405,3 +405,7 @@
 # Block Route enable   0x01
 # Block Route disable  0x00
 NFA_BLOCK_ROUTE=0x00
+############################################################################## #
+# White list of Hosts
+# This values will be the Hosts(NFCEEs) in the HCI Network.
+DEVICE_HOST_WHITE_LIST={C0 : 02}
diff --git a/halimpl/pn54x/libnfc-nxp-PN553_example_NCI2_0.conf b/halimpl/pn54x/libnfc-nxp-PN553_example_NCI2_0.conf
index 3dca16e..935b73e 100644
--- a/halimpl/pn54x/libnfc-nxp-PN553_example_NCI2_0.conf
+++ b/halimpl/pn54x/libnfc-nxp-PN553_example_NCI2_0.conf
@@ -149,7 +149,7 @@
     A0, 40, 01, 01,
     A0, DD, 01, 2D,
     A0, D1, 01, 02,
-    A0, D4, 01, 01,
+    A0, D4, 01, 00,
     A0, 37, 01, 35
    }
 #       A0, F2, 01, 01,
diff --git a/halimpl/pn54x/libnfc-nxp-PN80T_example_NCI2_0.conf b/halimpl/pn54x/libnfc-nxp-PN80T_example_NCI2_0.conf
index 1f64ec7..185b07d 100644
--- a/halimpl/pn54x/libnfc-nxp-PN80T_example_NCI2_0.conf
+++ b/halimpl/pn54x/libnfc-nxp-PN80T_example_NCI2_0.conf
@@ -150,7 +150,7 @@
     A0, 12, 01, 02,
     A0, 40, 01, 01,
     A0, D1, 01, 02,
-    A0, D4, 01, 01,
+    A0, D4, 01, 00,
     A0, 37, 01, 35,
     A0, D8, 01, 02,
     A0, D5, 01, 0A