Merge d420007de419920b1f333684a3c0c51fb54b9a53 on remote branch

Change-Id: Id26f230f724f53d1dfa252de3c455e94f94c995d
diff --git a/SN100x/src/nfa/dm/nfa_dm_act.cc b/SN100x/src/nfa/dm/nfa_dm_act.cc
index ff6021e..7a94bba 100644
--- a/SN100x/src/nfa/dm/nfa_dm_act.cc
+++ b/SN100x/src/nfa/dm/nfa_dm_act.cc
@@ -36,6 +36,14 @@
  ******************************************************************************/
 /******************************************************************************
  *
+ *  Changes from Qualcomm Innovation Center are provided under the following license:
+ *
+ *  Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *  SPDX-License-Identifier: BSD-3-Clause-Clear
+ *
+ ******************************************************************************/
+/******************************************************************************
+ *
  *  This file contains the action functions for device manager state
  *  machine.
  *
@@ -488,6 +496,10 @@
       break;
 #endif
 
+    case NFC_TZ_SECURE_ZONE_DISABLE_NFC_REVT:
+      (*nfa_dm_cb.p_dm_cback)(NFA_DM_TZ_SECURE_ZONE_DISABLE_NFC_EVT, nullptr);
+      break;
+
     default:
       break;
   }
@@ -2090,6 +2102,8 @@
     case NFC_RF_INTF_EXT_STOP_REVT:
       return "NFC_RF_INTF_EXT_STOP_EVT";
 #endif
+    case NFC_TZ_SECURE_ZONE_DISABLE_NFC_REVT:
+      return "NFC_TZ_SECURE_ZONE_DISABLE_NFC_REVT";
     default:
       return "unknown revt";
   }
diff --git a/SN100x/src/nfa/include/nfa_api.h b/SN100x/src/nfa/include/nfa_api.h
old mode 100755
new mode 100644
index 445294c..28d7977
--- a/SN100x/src/nfa/include/nfa_api.h
+++ b/SN100x/src/nfa/include/nfa_api.h
@@ -34,6 +34,14 @@
  *  Copyright 2018-2022 NXP
  *
  ******************************************************************************/
+ /******************************************************************************
+ *
+ *  Changes from Qualcomm Innovation Center are provided under the following license:
+ *
+ *  Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *  SPDX-License-Identifier: BSD-3-Clause-Clear
+ *
+ ******************************************************************************/
 
 /******************************************************************************
  *
@@ -229,6 +237,10 @@
 
 #define NFA_DM_GEN_ERROR_REVT 12
 #endif
+
+/*secure zone event to disable NFC*/
+#define NFA_DM_TZ_SECURE_ZONE_DISABLE_NFC_EVT 0xC1
+
 /* T1T HR length            */
 #define NFA_T1T_HR_LEN T1T_HR_LEN
 /* Max UID length of T1/T2  */
diff --git a/SN100x/src/nfc/include/nfc_api.h b/SN100x/src/nfc/include/nfc_api.h
index c182448..c0aa61e 100644
--- a/SN100x/src/nfc/include/nfc_api.h
+++ b/SN100x/src/nfc/include/nfc_api.h
@@ -34,6 +34,15 @@
  *  Copyright 2018-2021 NXP
  *
  ******************************************************************************/
+ /******************************************************************************
+ *
+ *  Changes from Qualcomm Innovation Center are provided under the following license:
+ *
+ *  Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *  SPDX-License-Identifier: BSD-3-Clause-Clear
+ *
+ ******************************************************************************/
+
 /******************************************************************************
  *
  *  This file contains the Near Field Communication (NFC) API function
@@ -268,6 +277,9 @@
 #define NFC_TL_SIZE 2
 #define NFC_SAVED_CMD_SIZE 2
 
+/*NFC secure zone event*/
+#define NFC_TZ_SECURE_ZONE_DISABLE_NFC_REVT 0xC01
+
 typedef tNCI_DISCOVER_MAPS tNFC_DISCOVER_MAPS;
 typedef tNCI_DISCOVER_PARAMS tNFC_DISCOVER_PARAMS;
 
diff --git a/SN100x/src/nfc/nfc/nfc_main.cc b/SN100x/src/nfc/nfc/nfc_main.cc
old mode 100755
new mode 100644
index 7033680..d01ced7
--- a/SN100x/src/nfc/nfc/nfc_main.cc
+++ b/SN100x/src/nfc/nfc/nfc_main.cc
@@ -34,6 +34,14 @@
  *  Copyright 2018-2021 NXP
  *
  ******************************************************************************/
+ /******************************************************************************
+ *
+ *  Changes from Qualcomm Innovation Center are provided under the following license:
+ *
+ *  Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *  SPDX-License-Identifier: BSD-3-Clause-Clear
+ *
+ ******************************************************************************/
 
 /******************************************************************************
  *
@@ -67,6 +75,10 @@
 
 #include "llcp_int.h"
 
+
+/*secure zone entry event from HAL*/
+#define HAL_TZ_SECURE_ZONE_DISABLE_NFC_EVT 0xC1
+
 /* NFC mandates support for at least one logical connection;
  * Update max_conn to the NFCC capability on InitRsp */
 #if (NXP_EXTNS == TRUE)
@@ -205,6 +217,8 @@
       return "HAL_NFC_ERROR_EVT";
     case (uint32_t)NfcEvent::HCI_NETWORK_RESET:
       return "HCI_NETWORK_RESET";
+    case HAL_TZ_SECURE_ZONE_DISABLE_NFC_EVT:
+      return "HAL_TZ_SECURE_ZONE_DISABLE_NFC_EVT";
 #if (NXP_EXTNS == TRUE)
     case HAL_NFC_FW_UPDATE_STATUS_EVT:
       return "HAL_NFC_FW_UPDATE_STATUS_EVT";
@@ -751,6 +765,10 @@
       }
       break;
 #endif
+    case HAL_TZ_SECURE_ZONE_DISABLE_NFC_EVT:
+      /*received secure zone entry evt from TZ*/
+      (*nfc_cb.p_resp_cback)(NFC_TZ_SECURE_ZONE_DISABLE_NFC_REVT, nullptr);
+      break;
     default:
       DLOG_IF(INFO, nfc_debug_enabled)
           << StringPrintf("nfc_main_hal_cback unhandled event %x", event);