[Feature][Modem]Update MTK MODEM V1.6 baseline version: MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6

MTK modem version: MT2735_IVT_MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6.tar.gz
RF  modem version: NA

Change-Id: I45a4c2752fa9d1a618beacd5d40737fb39ab64fb
diff --git a/mcu/interface/service/mcf/mcf_if.h b/mcu/interface/service/mcf/mcf_if.h
new file mode 100644
index 0000000..38a38bc
--- /dev/null
+++ b/mcu/interface/service/mcf/mcf_if.h
@@ -0,0 +1,513 @@
+/*****************************************************************************
+*  Copyright Statement:
+*  --------------------
+*  This software is protected by Copyright and the information contained
+*  herein is confidential. The software may not be copied and the information
+*  contained herein may not be used or disclosed except with the written
+*  permission of MediaTek Inc. (C) 2018
+*
+*  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+*  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+*  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
+*  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
+*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
+*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+*  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
+*  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
+*  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
+*  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
+*  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
+*  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
+*
+*  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
+*  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
+*  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
+*  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
+*  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+*
+*  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
+*  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
+*  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
+*  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
+*  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
+*
+*****************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *   mcf_if.h
+ *
+ * Project:
+ * --------
+ *   UMOLYA
+ *
+ * Description:
+ * ------------
+ *   MD Configuration Framework public interface implementation.
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ *                 HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef __MCF_IF_H
+#define __MCF_IF_H
+
+#include "ps_public_struct.h"
+#include "nvram_defs.h"
+#include "nvram_enums.h"
+
+#include "mcf_enum.h"
+#include "mcf_struct.h"
+
+#ifndef GEN_FOR_PC
+
+#ifndef __MCF_SUPPORT__
+#define mcf_on_ilm                      mcf_dummy_on_ilm
+#define mcf_do_ota_full                 mcf_dummy_do_ota_full
+#define mcf_do_ota_by_lid               mcf_dummy_do_ota_by_lid
+#define mcf_read_ota_buffer             mcf_dummy_read_ota_buffer
+#define mcf_read_tlvota_buffer          mcf_dummy_read_tlvota_buffer
+#define mcf_read_tlvota_buffer_sbp_tag  mcf_dummy_read_tlvota_buffer_sbp_tag
+#define mcf_read_nvram_and_tlvota_buffer_sbp_tag mcf_dummy_read_nvram_and_tlvota_buffer_sbp_tag
+#define mcf_check_lid_need_reset        mcf_dummy_check_lid_need_reset
+#define mcf_check_ota_need_reset        mcf_dummy_check_ota_need_update
+#define mcf_check_lid_need_reset_by_psid        mcf_dummy_check_lid_need_reset_by_psid
+#define mcf_check_reset_and_tlvota_buffer_sbp_tag        mcf_dummy_check_reset_and_tlvota_buffer_sbp_tag
+#define mcf_get_tlvota_file_result               mcf_dummy_get_tlvota_file_result 
+
+static __inline void mcf_dummy_on_ilm(ilm_struct *ilm)
+{
+    return;
+}
+
+static __inline mcf_ota_result_e mcf_dummy_do_ota_full(void)
+{
+    return MCF_OTA_R_MCF_NOT_SUPPORT;
+}
+
+static __inline mcf_ota_result_e mcf_dummy_do_ota_by_lid(nvram_lid_enum lid, kal_uint16 record_idx, kal_uint16 record_amount, nvram_ltable_entry_struct *lid_info)
+{
+    return MCF_OTA_R_MCF_NOT_SUPPORT;
+}
+
+static __inline mcf_ota_result_e mcf_dummy_read_ota_buffer(nvram_lid_enum lid, kal_uint16 record_idx, kal_uint8 *buffer, kal_uint32 size)
+{
+    return MCF_OTA_R_MCF_NOT_SUPPORT;
+}
+
+static __inline mcf_ota_result_e mcf_dummy_read_tlvota_buffer(kal_uint8 ps_id, mcf_tlvota_tag_t tag, nvram_lid_enum lid, kal_uint8 *buffer, kal_uint32 size)
+{
+    return MCF_OTA_R_MCF_NOT_SUPPORT;
+}
+
+static __inline mcf_ota_result_e mcf_dummy_read_tlvota_buffer_sbp_tag(kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid, kal_uint8 *buffer, kal_uint32 size)
+{
+    return MCF_OTA_R_MCF_NOT_SUPPORT;
+}
+
+static __inline mcf_ota_result_e mcf_dummy_read_nvram_and_tlvota_buffer_sbp_tag(kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid, kal_uint16 record_idx, kal_uint8 *buffer, kal_uint32 size)
+{
+    return MCF_OTA_R_MCF_NOT_SUPPORT;
+}
+
+static __inline kal_bool mcf_dummy_check_lid_need_reset(nvram_lid_enum lid)
+{
+    return KAL_FALSE;
+}
+
+static __inline kal_bool mcf_dummy_check_ota_need_update(protocol_id_enum ps_id, mcf_tlvota_sbp_tag_t sbp_tag, kal_uint8* iccid)
+{
+    return KAL_FALSE;
+}
+
+static __inline kal_bool mcf_dummy_check_lid_need_reset_by_psid(nvram_lid_enum lid, kal_uint8 ps_id)
+{
+    return KAL_FALSE;
+}
+
+static __inline mcf_ota_result_e mcf_dummy_check_reset_and_tlvota_buffer_sbp_tag(kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid , kal_uint8 *buffer, kal_uint32 size, kal_uint16 record_idx)
+{
+    return MCF_OTA_R_MCF_NOT_SUPPORT;
+}
+
+static __inline mcf_ota_result_e mcf_dummy_get_tlvota_file_result(protocol_id_enum ps_id)
+{
+    return MCF_OTA_R_MCF_NOT_SUPPORT;
+}
+#else
+	
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_on_ilm
+ * DESCRIPTION
+ *  This function is used to process ilm.
+ * PARAMETERS
+ *  ilm_struct      [IN] ilm structure
+ *****************************************************************************/
+void mcf_on_ilm(ilm_struct *ilm);
+
+/*----------------------------------------------------------------------------------------
+ * OTA fucntions.
+ *--------------------------------------------------------------------------------------*/
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_do_ota_full
+ * DESCRIPTION
+ *  This function is used to do NVRAM OTA according to whole OTA file.
+ * PARAMETERS
+ *
+ * RETURNS
+ *  MCF_OTA_R_SUCCESS             : process successfully
+ *  MCF_OTA_R_MCF_NOT_SUPPORT     : MCF is not supported
+ *  MCF_OTA_R_VERSION_NOT_MATCH   : LID version of OTA file is different from LID version in device
+ *  MCF_OTA_R_WRONG_BUFFER_SIZE   : given buffer size is different from LID record size
+ *  MCF_OTA_R_INVALID_PARAMETER   : invalid parameter
+ *  MCF_OTA_R_READ_NVRAM_FAIL     : fail to read NVRAM
+ *  MCF_OTA_R_WRITE_NVRAM_FAIL    : fail to write NVRAM
+ *  MCF_OTA_R_READ_OTA_FILE_FAIL  : fail to read OTA/TLV_OTA file
+ *  MCF_OTA_R_INVALID_SBP_TAG     : invalid SBP tag
+ *  MCF_OTA_R_INVALID_FILE        : invalid OTA/TLV-OTA file
+ *  MCF_OTA_R_INVALID_ATTR        : invalid NVRAM attribute
+ *  MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
+ *****************************************************************************/
+mcf_ota_result_e mcf_do_ota_full(void);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_do_ota_by_lid
+ * DESCRIPTION
+ *  This function is used to do NVRAM OTA according to OTA file and specific LID.
+ * PARAMETERS
+ *  lid             [IN] NVRAM LID
+ *  record_idx      [IN] Start record index
+ *  record_amount   [IN] Record amount
+ *  lid_info        [IN] LID information
+ *
+ * RETURNS
+ *  MCF_OTA_R_SUCCESS             : process successfully
+ *  MCF_OTA_R_MCF_NOT_SUPPORT     : MCF is not supported
+ *  MCF_OTA_R_VERSION_NOT_MATCH   : LID version of OTA file is different from LID version in device
+ *  MCF_OTA_R_WRONG_BUFFER_SIZE   : given buffer size is different from LID record size
+ *  MCF_OTA_R_INVALID_PARAMETER   : invalid parameter
+ *  MCF_OTA_R_READ_NVRAM_FAIL     : fail to read NVRAM
+ *  MCF_OTA_R_WRITE_NVRAM_FAIL    : fail to write NVRAM
+ *  MCF_OTA_R_READ_OTA_FILE_FAIL  : fail to read OTA/TLV_OTA file
+ *  MCF_OTA_R_INVALID_SBP_TAG     : invalid SBP tag
+ *  MCF_OTA_R_INVALID_FILE        : invalid OTA/TLV-OTA file
+ *  MCF_OTA_R_INVALID_ATTR        : invalid NVRAM attribute
+ *  MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
+ *****************************************************************************/
+mcf_ota_result_e mcf_do_ota_by_lid(nvram_lid_enum lid, kal_uint16 record_idx, kal_uint16 record_amount, nvram_ltable_entry_struct *lid_info);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_read_ota_buffer
+ * DESCRIPTION
+ *  This function is used to query OTA file and get all data items with given LID.
+ * PARAMETERS
+ *  lid             [IN] NVRAM LID
+ *  record_idx      [IN] NVRAM LID record index
+ *  buffer          [IN] destination buffer
+ *  size            [IN] buffer size
+ *
+ * RETURNS
+ *  MCF_OTA_R_SUCCESS             : process successfully
+ *  MCF_OTA_R_MCF_NOT_SUPPORT     : MCF is not supported
+ *  MCF_OTA_R_VERSION_NOT_MATCH   : LID version of OTA file is different from LID version in device
+ *  MCF_OTA_R_WRONG_BUFFER_SIZE   : given buffer size is different from LID record size
+ *  MCF_OTA_R_INVALID_PARAMETER   : invalid parameter
+ *  MCF_OTA_R_READ_NVRAM_FAIL     : fail to read NVRAM
+ *  MCF_OTA_R_WRITE_NVRAM_FAIL    : fail to write NVRAM
+ *  MCF_OTA_R_READ_OTA_FILE_FAIL  : fail to read OTA/TLV_OTA file
+ *  MCF_OTA_R_INVALID_SBP_TAG     : invalid SBP tag
+ *  MCF_OTA_R_INVALID_FILE        : invalid OTA/TLV-OTA file
+ *  MCF_OTA_R_INVALID_ATTR        : invalid NVRAM attribute
+ *  MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
+ *****************************************************************************/
+mcf_ota_result_e mcf_read_ota_buffer(nvram_lid_enum lid, kal_uint16 record_idx, kal_uint8 *buffer, kal_uint32 size);
+
+/*----------------------------------------------------------------------------------------
+ * OTA by operator (TLV-OTA) fucntions.
+ *--------------------------------------------------------------------------------------*/
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_read_tlvota_buffer
+ * DESCRIPTION
+ *  This function is used to query TLV-OTA file and get all data items with given LID and tag.
+ * PARAMETERS
+ *  tag             [IN] ps_id
+ *  tag             [IN] TLV-OTA tag
+ *  lid             [IN] NVRAM LID
+ *  buffer          [IN] destination buffer
+ *  size            [IN] buffer size
+ *
+ * RETURNS
+ *  MCF_OTA_R_SUCCESS             : process successfully
+ *  MCF_OTA_R_MCF_NOT_SUPPORT     : MCF is not supported
+ *  MCF_OTA_R_VERSION_NOT_MATCH   : LID version of OTA file is different from LID version in device
+ *  MCF_OTA_R_WRONG_BUFFER_SIZE   : given buffer size is different from LID record size
+ *  MCF_OTA_R_INVALID_PARAMETER   : invalid parameter
+ *  MCF_OTA_R_READ_NVRAM_FAIL     : fail to read NVRAM
+ *  MCF_OTA_R_WRITE_NVRAM_FAIL    : fail to write NVRAM
+ *  MCF_OTA_R_READ_OTA_FILE_FAIL  : fail to read OTA/TLV_OTA file
+ *  MCF_OTA_R_INVALID_SBP_TAG     : invalid SBP tag
+ *  MCF_OTA_R_INVALID_FILE        : invalid OTA/TLV-OTA file
+ *  MCF_OTA_R_INVALID_ATTR        : invalid NVRAM attribute
+ *  MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
+ *****************************************************************************/
+mcf_ota_result_e mcf_read_tlvota_buffer(kal_uint8 ps_id, mcf_tlvota_tag_t tag, nvram_lid_enum lid, kal_uint8 *buffer, kal_uint32 size);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_read_tlvota_buffer_sbp_tag
+ * DESCRIPTION
+ *  This function is used to query TLV-OTA file and get all data items with given LID and SBP tag.
+ * PARAMETERS
+ *  tag             [IN] ps_id
+ *  sbp_tag         [IN] SBP information
+ *  lid             [IN] NVRAM LID
+ *  buffer          [IN] destination buffer
+ *  size            [IN] buffer size
+ *
+ * RETURNS
+ *  MCF_OTA_R_SUCCESS             : process successfully
+ *  MCF_OTA_R_MCF_NOT_SUPPORT     : MCF is not supported
+ *  MCF_OTA_R_VERSION_NOT_MATCH   : LID version of OTA file is different from LID version in device
+ *  MCF_OTA_R_WRONG_BUFFER_SIZE   : given buffer size is different from LID record size
+ *  MCF_OTA_R_INVALID_PARAMETER   : invalid parameter
+ *  MCF_OTA_R_READ_NVRAM_FAIL     : fail to read NVRAM
+ *  MCF_OTA_R_WRITE_NVRAM_FAIL    : fail to write NVRAM
+ *  MCF_OTA_R_READ_OTA_FILE_FAIL  : fail to read OTA/TLV_OTA file
+ *  MCF_OTA_R_INVALID_SBP_TAG     : invalid SBP tag
+ *  MCF_OTA_R_INVALID_FILE        : invalid OTA/TLV-OTA file
+ *  MCF_OTA_R_INVALID_ATTR        : invalid NVRAM attribute
+ *  MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
+ *****************************************************************************/
+mcf_ota_result_e mcf_read_tlvota_buffer_sbp_tag(kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid, kal_uint8 *buffer, kal_uint32 size);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_read_nvram_and_tlvota_buffer_sbp_tag
+ * DESCRIPTION
+ *  This function is used to read NVRAM LID, query TLV-OTA file and get all data items with given LID and SBP tag.
+ * PARAMETERS
+ *  tag             [IN] ps_id
+ *  sbp_tag         [IN] SBP information
+ *  lid             [IN] NVRAM LID
+ *  record_idx      [IN] NVRAM LID record index
+ *  buffer          [IN] destination buffer
+ *  size            [IN] buffer size
+ *
+ * RETURNS
+ *  MCF_OTA_R_SUCCESS             : process successfully
+ *  MCF_OTA_R_MCF_NOT_SUPPORT     : MCF is not supported
+ *  MCF_OTA_R_VERSION_NOT_MATCH   : LID version of OTA file is different from LID version in device
+ *  MCF_OTA_R_WRONG_BUFFER_SIZE   : given buffer size is different from LID record size
+ *  MCF_OTA_R_INVALID_PARAMETER   : invalid parameter
+ *  MCF_OTA_R_READ_NVRAM_FAIL     : fail to read NVRAM
+ *  MCF_OTA_R_WRITE_NVRAM_FAIL    : fail to write NVRAM
+ *  MCF_OTA_R_READ_OTA_FILE_FAIL  : fail to read OTA/TLV_OTA file
+ *  MCF_OTA_R_INVALID_SBP_TAG     : invalid SBP tag
+ *  MCF_OTA_R_INVALID_FILE        : invalid OTA/TLV-OTA file
+ *  MCF_OTA_R_INVALID_ATTR        : invalid NVRAM attribute
+ *  MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
+ *****************************************************************************/
+mcf_ota_result_e mcf_read_nvram_and_tlvota_buffer_sbp_tag(kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid, kal_uint16 record_idx, kal_uint8 *buffer, kal_uint32 size);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_auto_select_tlvota_file
+ * DESCRIPTION
+ *  This function is used to read TLV-OTA file according to given sbp information.
+ * PARAMETERS
+ *  param_ptr       [IN] sbp parameter
+ *
+ * RETURNS
+ *  KAL_TRUE                      : Success
+ *  KAL_FALSE                     : Fail
+ *****************************************************************************/
+kal_bool mcf_auto_select_tlvota_file(sbp_reconfig_custom_param_struct *param_ptr);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_check_lid_need_reset
+ * DESCRIPTION
+ *  This function is used to query if LID is needed to be reset. If LID attribute is set to (NVRAM_ATTR_MCF_OTA or NVRAM_ATTR_MCF_OTA_FOR_QUERY)
+ *  with NVRAM_ATTR_OTA_RESET and OTA file is updated, it will be stored in modified LID list. 
+ * PARAMETERS
+ *  param_ptr       [IN] lid
+ *
+ * RETURNS
+ *  KAL_TRUE                      : Success
+ *  KAL_FALSE                     : Fail
+ *****************************************************************************/
+kal_bool mcf_check_lid_need_reset(nvram_lid_enum lid);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_check_ota_need_update
+ * DESCRIPTION
+ *  This function is used to check OTA file need update when same SIM insert. This detemine whether trigger dsbp.
+ * PARAMETERS
+ *  ps_id           [IN] protocol ID
+ *  sbp_tag       [IN] sbp parameter
+ *  iccid          [IN] iccid
+ *
+ * RETURNS
+ *  KAL_TRUE                      : Success
+ *  KAL_FALSE                     : Fail
+ *****************************************************************************/
+kal_bool mcf_check_ota_need_update(protocol_id_enum ps_id, mcf_tlvota_sbp_tag_t sbp_tag, kal_uint8* iccid);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_set_config_after_dsbp
+ * DESCRIPTION
+ *  This is called after dsbp user callback. This function is used to store mcf info into NVRAM.
+ * PARAMETERS
+ *  ps_id           [IN] protocol ID
+ *
+ *
+ * RETURNS
+ *  KAL_TRUE                      : Success
+ *  KAL_FALSE                     : Fail
+ *****************************************************************************/
+kal_bool mcf_set_config_after_dsbp(protocol_id_enum ps_id);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_check_lid_need_reset_by_psid
+ * DESCRIPTION
+ *  This function is used to query if LID is needed to be reset. If LID attribute is set to NVRAM_ATTR_MCF_OTA_BY_OP
+ *  with NVRAM_ATTR_OTA_RESET and TLVOTA file is updated, it will be stored in modified LID list. 
+ * PARAMETERS
+ *  lid       [IN] lid
+ *  ps_id     [IN] protocol id
+ *
+ * RETURNS
+ *  KAL_TRUE                      : Success
+ *  KAL_FALSE                     : Fail
+ *****************************************************************************/
+kal_bool mcf_check_lid_need_reset_by_psid (nvram_lid_enum lid, kal_uint8 ps_id);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_check_reset_and_tlvota_buffer_sbp_tag
+ * DESCRIPTION
+ *  This function is used to check LID needed to be reset, and query TLV-OTA file and get all data items with given LID and SBP tag.
+ * PARAMETERS
+ *  ps_id           [IN] ps_id
+ *  sbp_tag         [IN] SBP information
+ *  lid             [IN] NVRAM LID
+ *  record_idx      [IN] NVRAM LID record index
+ *  buffer          [IN] destination buffer
+ *  size            [IN] buffer size
+ *  record_idx      [IN] NVRAM LID record index
+ *
+ * RETURNS
+ *  MCF_OTA_R_SUCCESS             : process successfully
+ *  MCF_OTA_R_MCF_NOT_SUPPORT     : MCF is not supported
+ *  MCF_OTA_R_VERSION_NOT_MATCH   : LID version of OTA file is different from LID version in device
+ *  MCF_OTA_R_WRONG_BUFFER_SIZE   : given buffer size is different from LID record size
+ *  MCF_OTA_R_INVALID_PARAMETER   : invalid parameter
+ *  MCF_OTA_R_READ_NVRAM_FAIL     : fail to read NVRAM
+ *  MCF_OTA_R_WRITE_NVRAM_FAIL    : fail to write NVRAM
+ *  MCF_OTA_R_READ_OTA_FILE_FAIL  : fail to read OTA/TLV_OTA file
+ *  MCF_OTA_R_INVALID_SBP_TAG     : invalid SBP tag
+ *  MCF_OTA_R_INVALID_FILE        : invalid OTA/TLV-OTA file
+ *  MCF_OTA_R_INVALID_ATTR        : invalid NVRAM attribute
+ *  MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
+ *****************************************************************************/
+mcf_ota_result_e mcf_check_reset_and_tlvota_buffer_sbp_tag (kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid , kal_uint8 *buffer, kal_uint32 size, kal_uint16 record_idx);
+
+/*****************************************************************************
+ * FUNCTION
+ *  mcf_get_tlvota_file_result
+ * DESCRIPTION
+ *  This function is used to check OTA file need update when same SIM insert. This detemine whether trigger dsbp.
+ * PARAMETERS
+ *  ps_id           [IN] protocol ID
+ *
+ * RETURNS
+ *  MCF_OTA_R_SUCCESS             : process successfully
+ *  MCF_OTA_R_MCF_NOT_SUPPORT     : MCF is not supported
+ *  MCF_OTA_R_VERSION_NOT_MATCH   : LID version of OTA file is different from LID version in device
+ *  MCF_OTA_R_WRONG_BUFFER_SIZE   : given buffer size is different from LID record size
+ *  MCF_OTA_R_INVALID_PARAMETER   : invalid parameter
+ *  MCF_OTA_R_READ_NVRAM_FAIL     : fail to read NVRAM
+ *  MCF_OTA_R_WRITE_NVRAM_FAIL    : fail to write NVRAM
+ *  MCF_OTA_R_READ_OTA_FILE_FAIL  : fail to read OTA/TLV_OTA file
+ *  MCF_OTA_R_INVALID_SBP_TAG     : invalid SBP tag
+ *  MCF_OTA_R_INVALID_FILE        : invalid OTA/TLV-OTA file
+ *  MCF_OTA_R_INVALID_ATTR        : invalid NVRAM attribute
+ *  MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
+ *****************************************************************************/
+mcf_ota_result_e mcf_get_tlvota_file_result(protocol_id_enum ps_id);
+
+#endif /* __MCF_SUPPORT__ */
+#endif /* !GEN_FOR_PC */
+#endif /* !__MCF_IF_H */
+